mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
mark all local functions as static
This commit is contained in:
@ -48,12 +48,12 @@ volatile bool interruptFinishWaiting = false;
|
||||
|
||||
volatile u32 VITicks = CommandProcessor::m_cpClockOrigin;
|
||||
|
||||
bool IsOnThread()
|
||||
static bool IsOnThread()
|
||||
{
|
||||
return SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread;
|
||||
}
|
||||
|
||||
void UpdateInterrupts_Wrapper(u64 userdata, int cyclesLate)
|
||||
static void UpdateInterrupts_Wrapper(u64 userdata, int cyclesLate)
|
||||
{
|
||||
UpdateInterrupts(userdata);
|
||||
}
|
||||
|
@ -17,6 +17,9 @@ extern volatile bool g_bSkipCurrentFrame;
|
||||
void Fifo_Init();
|
||||
void Fifo_Shutdown();
|
||||
|
||||
u8* GetVideoBufferStartPtr();
|
||||
u8* GetVideoBufferEndPtr();
|
||||
|
||||
void Fifo_DoState(PointerWrap &f);
|
||||
void Fifo_PauseAndLock(bool doLock, bool unpauseOnUnlock);
|
||||
|
||||
|
@ -66,7 +66,7 @@ void VideoBackendHardware::Video_SetRendering(bool bEnabled)
|
||||
}
|
||||
|
||||
// Run from the graphics thread (from Fifo.cpp)
|
||||
void VideoFifo_CheckSwapRequest()
|
||||
static void VideoFifo_CheckSwapRequest()
|
||||
{
|
||||
if (g_ActiveConfig.bUseXFB)
|
||||
{
|
||||
@ -177,7 +177,7 @@ static bool QueryResultIsReady()
|
||||
return !s_perf_query_requested || s_FifoShuttingDown;
|
||||
}
|
||||
|
||||
void VideoFifo_CheckPerfQueryRequest()
|
||||
static void VideoFifo_CheckPerfQueryRequest()
|
||||
{
|
||||
if (s_perf_query_requested)
|
||||
{
|
||||
|
@ -74,9 +74,6 @@ DataReadU32xNfunc DataReadU32xFuncs[16] = {
|
||||
DataReadU32xN<16>
|
||||
};
|
||||
|
||||
extern u8* GetVideoBufferStartPtr();
|
||||
extern u8* GetVideoBufferEndPtr();
|
||||
|
||||
static void Decode();
|
||||
|
||||
void InterpretDisplayList(u32 address, u32 size)
|
||||
@ -107,7 +104,7 @@ void InterpretDisplayList(u32 address, u32 size)
|
||||
g_pVideoData = old_pVideoData;
|
||||
}
|
||||
|
||||
u32 FifoCommandRunnable(u32 &command_size)
|
||||
static u32 FifoCommandRunnable(u32 &command_size)
|
||||
{
|
||||
u32 cycleTime = 0;
|
||||
u32 buffer_size = (u32)(GetVideoBufferEndPtr() - g_pVideoData);
|
||||
@ -267,7 +264,7 @@ u32 FifoCommandRunnable(u32 &command_size)
|
||||
return cycleTime;
|
||||
}
|
||||
|
||||
u32 FifoCommandRunnable()
|
||||
static u32 FifoCommandRunnable()
|
||||
{
|
||||
u32 command_size = 0;
|
||||
return FifoCommandRunnable(command_size);
|
||||
|
@ -252,7 +252,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
||||
}
|
||||
}
|
||||
|
||||
bool AllowIdleSkipping()
|
||||
static bool AllowIdleSkipping()
|
||||
{
|
||||
return !SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread || (!m_Control.PETokenEnable && !m_Control.PEFinishEnable);
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ u16 GetEncodedSampleCount(u32 format)
|
||||
|
||||
// block dimensions : widthStride, heightStride
|
||||
// texture dims : width, height, x offset, y offset
|
||||
void WriteSwizzler(char*& p, u32 format, API_TYPE ApiType)
|
||||
static void WriteSwizzler(char*& p, u32 format, API_TYPE ApiType)
|
||||
{
|
||||
// left, top, of source rectangle within source texture
|
||||
// width of the destination rectangle, scale_factor (1 or 2)
|
||||
@ -118,14 +118,14 @@ void WriteSwizzler(char*& p, u32 format, API_TYPE ApiType)
|
||||
WRITE(p, " float sample_offset = float(position.w) / float(%d);\n", EFB_WIDTH);
|
||||
}
|
||||
|
||||
void WriteSampleColor(char*& p, const char* colorComp, const char* dest, int xoffset, API_TYPE ApiType)
|
||||
static void WriteSampleColor(char*& p, const char* colorComp, const char* dest, int xoffset, API_TYPE ApiType)
|
||||
{
|
||||
WRITE(p, " %s = texture(samp0, uv0 + float2(%d, 0) * sample_offset).%s;\n",
|
||||
dest, xoffset, colorComp
|
||||
);
|
||||
}
|
||||
|
||||
void WriteColorToIntensity(char*& p, const char* src, const char* dest)
|
||||
static void WriteColorToIntensity(char*& p, const char* src, const char* dest)
|
||||
{
|
||||
if (!IntensityConstantAdded)
|
||||
{
|
||||
@ -136,18 +136,18 @@ void WriteColorToIntensity(char*& p, const char* src, const char* dest)
|
||||
// don't add IntensityConst.a yet, because doing it later is faster and uses less instructions, due to vectorization
|
||||
}
|
||||
|
||||
void WriteToBitDepth(char*& p, u8 depth, const char* src, const char* dest)
|
||||
static void WriteToBitDepth(char*& p, u8 depth, const char* src, const char* dest)
|
||||
{
|
||||
WRITE(p, " %s = floor(%s * 255.0 / exp2(8.0 - %d.0));\n", dest, src, depth);
|
||||
}
|
||||
|
||||
void WriteEncoderEnd(char*& p, API_TYPE ApiType)
|
||||
static void WriteEncoderEnd(char*& p, API_TYPE ApiType)
|
||||
{
|
||||
WRITE(p, "}\n");
|
||||
IntensityConstantAdded = false;
|
||||
}
|
||||
|
||||
void WriteI8Encoder(char*& p, API_TYPE ApiType)
|
||||
static void WriteI8Encoder(char*& p, API_TYPE ApiType)
|
||||
{
|
||||
WriteSwizzler(p, GX_TF_I8, ApiType);
|
||||
WRITE(p, " float3 texSample;\n");
|
||||
@ -169,7 +169,7 @@ void WriteI8Encoder(char*& p, API_TYPE ApiType)
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
}
|
||||
|
||||
void WriteI4Encoder(char*& p, API_TYPE ApiType)
|
||||
static void WriteI4Encoder(char*& p, API_TYPE ApiType)
|
||||
{
|
||||
WriteSwizzler(p, GX_TF_I4, ApiType);
|
||||
WRITE(p, " float3 texSample;\n");
|
||||
@ -210,7 +210,7 @@ void WriteI4Encoder(char*& p, API_TYPE ApiType)
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
}
|
||||
|
||||
void WriteIA8Encoder(char*& p,API_TYPE ApiType)
|
||||
static void WriteIA8Encoder(char*& p,API_TYPE ApiType)
|
||||
{
|
||||
WriteSwizzler(p, GX_TF_IA8, ApiType);
|
||||
WRITE(p, " float4 texSample;\n");
|
||||
@ -228,7 +228,7 @@ void WriteIA8Encoder(char*& p,API_TYPE ApiType)
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
}
|
||||
|
||||
void WriteIA4Encoder(char*& p,API_TYPE ApiType)
|
||||
static void WriteIA4Encoder(char*& p,API_TYPE ApiType)
|
||||
{
|
||||
WriteSwizzler(p, GX_TF_IA4, ApiType);
|
||||
WRITE(p, " float4 texSample;\n");
|
||||
@ -260,7 +260,7 @@ void WriteIA4Encoder(char*& p,API_TYPE ApiType)
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
}
|
||||
|
||||
void WriteRGB565Encoder(char*& p,API_TYPE ApiType)
|
||||
static void WriteRGB565Encoder(char*& p,API_TYPE ApiType)
|
||||
{
|
||||
WriteSwizzler(p, GX_TF_RGB565, ApiType);
|
||||
|
||||
@ -283,7 +283,7 @@ void WriteRGB565Encoder(char*& p,API_TYPE ApiType)
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
}
|
||||
|
||||
void WriteRGB5A3Encoder(char*& p,API_TYPE ApiType)
|
||||
static void WriteRGB5A3Encoder(char*& p,API_TYPE ApiType)
|
||||
{
|
||||
WriteSwizzler(p, GX_TF_RGB5A3, ApiType);
|
||||
|
||||
@ -349,7 +349,7 @@ void WriteRGB5A3Encoder(char*& p,API_TYPE ApiType)
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
}
|
||||
|
||||
void WriteRGBA4443Encoder(char*& p,API_TYPE ApiType)
|
||||
static void WriteRGBA4443Encoder(char*& p,API_TYPE ApiType)
|
||||
{
|
||||
WriteSwizzler(p, GX_TF_RGB5A3, ApiType);
|
||||
|
||||
@ -373,7 +373,7 @@ void WriteRGBA4443Encoder(char*& p,API_TYPE ApiType)
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
}
|
||||
|
||||
void WriteRGBA8Encoder(char*& p,API_TYPE ApiType)
|
||||
static void WriteRGBA8Encoder(char*& p,API_TYPE ApiType)
|
||||
{
|
||||
WriteSwizzler(p, GX_TF_RGBA8, ApiType);
|
||||
|
||||
@ -398,7 +398,7 @@ void WriteRGBA8Encoder(char*& p,API_TYPE ApiType)
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
}
|
||||
|
||||
void WriteC4Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
||||
static void WriteC4Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
||||
{
|
||||
WriteSwizzler(p, GX_CTF_R4, ApiType);
|
||||
WRITE(p, " float4 color0;\n");
|
||||
@ -420,7 +420,7 @@ void WriteC4Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
}
|
||||
|
||||
void WriteC8Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
||||
static void WriteC8Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
||||
{
|
||||
WriteSwizzler(p, GX_CTF_R8, ApiType);
|
||||
|
||||
@ -432,7 +432,7 @@ void WriteC8Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
}
|
||||
|
||||
void WriteCC4Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
||||
static void WriteCC4Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
||||
{
|
||||
WriteSwizzler(p, GX_CTF_RA4, ApiType);
|
||||
WRITE(p, " float2 texSample;\n");
|
||||
@ -462,7 +462,7 @@ void WriteCC4Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
}
|
||||
|
||||
void WriteCC8Encoder(char*& p, const char* comp, API_TYPE ApiType)
|
||||
static void WriteCC8Encoder(char*& p, const char* comp, API_TYPE ApiType)
|
||||
{
|
||||
WriteSwizzler(p, GX_CTF_RA8, ApiType);
|
||||
|
||||
@ -472,7 +472,7 @@ void WriteCC8Encoder(char*& p, const char* comp, API_TYPE ApiType)
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
}
|
||||
|
||||
void WriteZ8Encoder(char*& p, const char* multiplier,API_TYPE ApiType)
|
||||
static void WriteZ8Encoder(char*& p, const char* multiplier,API_TYPE ApiType)
|
||||
{
|
||||
WriteSwizzler(p, GX_CTF_Z8M, ApiType);
|
||||
|
||||
@ -493,7 +493,7 @@ void WriteZ8Encoder(char*& p, const char* multiplier,API_TYPE ApiType)
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
}
|
||||
|
||||
void WriteZ16Encoder(char*& p,API_TYPE ApiType)
|
||||
static void WriteZ16Encoder(char*& p,API_TYPE ApiType)
|
||||
{
|
||||
WriteSwizzler(p, GX_TF_Z16, ApiType);
|
||||
|
||||
@ -525,7 +525,7 @@ void WriteZ16Encoder(char*& p,API_TYPE ApiType)
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
}
|
||||
|
||||
void WriteZ16LEncoder(char*& p,API_TYPE ApiType)
|
||||
static void WriteZ16LEncoder(char*& p,API_TYPE ApiType)
|
||||
{
|
||||
WriteSwizzler(p, GX_CTF_Z16L, ApiType);
|
||||
|
||||
@ -561,7 +561,7 @@ void WriteZ16LEncoder(char*& p,API_TYPE ApiType)
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
}
|
||||
|
||||
void WriteZ24Encoder(char*& p, API_TYPE ApiType)
|
||||
static void WriteZ24Encoder(char*& p, API_TYPE ApiType)
|
||||
{
|
||||
WriteSwizzler(p, GX_TF_Z24X8, ApiType);
|
||||
|
||||
|
@ -521,7 +521,7 @@ inline u32 makeRGBA(int r, int g, int b, int a)
|
||||
return (a<<24)|(b<<16)|(g<<8)|r;
|
||||
}
|
||||
|
||||
void decodeDXTBlock(u32 *dst, const DXTBlock *src, int pitch)
|
||||
static void decodeDXTBlock(u32 *dst, const DXTBlock *src, int pitch)
|
||||
{
|
||||
// S3TC Decoder (Note: GCN decodes differently from PC so we can't use native support)
|
||||
// Needs more speed.
|
||||
@ -564,7 +564,7 @@ void decodeDXTBlock(u32 *dst, const DXTBlock *src, int pitch)
|
||||
}
|
||||
}
|
||||
|
||||
void decodeDXTBlockRGBA(u32 *dst, const DXTBlock *src, int pitch)
|
||||
static void decodeDXTBlockRGBA(u32 *dst, const DXTBlock *src, int pitch)
|
||||
{
|
||||
// S3TC Decoder (Note: GCN decodes differently from PC so we can't use native support)
|
||||
// Needs more speed.
|
||||
@ -689,7 +689,7 @@ inline void SetOpenMPThreadCount(int width, int height)
|
||||
//TODO: to save memory, don't blindly convert everything to argb8888
|
||||
//also ARGB order needs to be swapped later, to accommodate modern hardware better
|
||||
//need to add DXT support too
|
||||
PC_TexFormat TexDecoder_Decode_real(u8 *dst, const u8 *src, int width, int height, int texformat, int tlutaddr, int tlutfmt)
|
||||
static PC_TexFormat TexDecoder_Decode_real(u8 *dst, const u8 *src, int width, int height, int texformat, int tlutaddr, int tlutfmt)
|
||||
{
|
||||
SetOpenMPThreadCount(width, height);
|
||||
|
||||
@ -956,7 +956,7 @@ PC_TexFormat TexDecoder_Decode_real(u8 *dst, const u8 *src, int width, int heigh
|
||||
// TODO: complete SSE2 optimization of less often used texture formats.
|
||||
// TODO: refactor algorithms using _mm_loadl_epi64 unaligned loads to prefer 128-bit aligned loads.
|
||||
|
||||
PC_TexFormat TexDecoder_Decode_RGBA(u32 * dst, const u8 * src, int width, int height, int texformat, int tlutaddr, int tlutfmt)
|
||||
static PC_TexFormat TexDecoder_Decode_RGBA(u32 * dst, const u8 * src, int width, int height, int texformat, int tlutaddr, int tlutfmt)
|
||||
{
|
||||
SetOpenMPThreadCount(width, height);
|
||||
|
||||
|
@ -84,13 +84,13 @@ static const float fractionTable[32] = {
|
||||
|
||||
using namespace Gen;
|
||||
|
||||
void LOADERDECL PosMtx_ReadDirect_UByte()
|
||||
static void LOADERDECL PosMtx_ReadDirect_UByte()
|
||||
{
|
||||
s_curposmtx = DataReadU8() & 0x3f;
|
||||
PRIM_LOG("posmtx: %d, ", s_curposmtx);
|
||||
}
|
||||
|
||||
void LOADERDECL PosMtx_Write()
|
||||
static void LOADERDECL PosMtx_Write()
|
||||
{
|
||||
DataWrite<u8>(s_curposmtx);
|
||||
DataWrite<u8>(0);
|
||||
@ -101,7 +101,7 @@ void LOADERDECL PosMtx_Write()
|
||||
s_curposmtx = (u8) MatrixIndexA.PosNormalMtxIdx;
|
||||
}
|
||||
|
||||
void LOADERDECL UpdateBoundingBoxPrepare()
|
||||
static void LOADERDECL UpdateBoundingBoxPrepare()
|
||||
{
|
||||
if (!PixelEngine::bbox_active)
|
||||
return;
|
||||
@ -112,7 +112,7 @@ void LOADERDECL UpdateBoundingBoxPrepare()
|
||||
VertexManager::s_pCurBufferPointer = (u8*)s_bbox_vertex_buffer;
|
||||
}
|
||||
|
||||
inline bool UpdateBoundingBoxVars()
|
||||
static inline bool UpdateBoundingBoxVars()
|
||||
{
|
||||
switch (s_bbox_primitive)
|
||||
{
|
||||
@ -198,7 +198,7 @@ inline bool UpdateBoundingBoxVars()
|
||||
}
|
||||
}
|
||||
|
||||
void LOADERDECL UpdateBoundingBox()
|
||||
static void LOADERDECL UpdateBoundingBox()
|
||||
{
|
||||
if (!PixelEngine::bbox_active)
|
||||
return;
|
||||
@ -431,25 +431,25 @@ void LOADERDECL UpdateBoundingBox()
|
||||
PixelEngine::bbox[3] = (bottom > PixelEngine::bbox[3]) ? bottom : PixelEngine::bbox[3];
|
||||
}
|
||||
|
||||
void LOADERDECL TexMtx_ReadDirect_UByte()
|
||||
static void LOADERDECL TexMtx_ReadDirect_UByte()
|
||||
{
|
||||
s_curtexmtx[s_texmtxread] = DataReadU8() & 0x3f;
|
||||
PRIM_LOG("texmtx%d: %d, ", s_texmtxread, s_curtexmtx[s_texmtxread]);
|
||||
s_texmtxread++;
|
||||
}
|
||||
|
||||
void LOADERDECL TexMtx_Write_Float()
|
||||
static void LOADERDECL TexMtx_Write_Float()
|
||||
{
|
||||
DataWrite(float(s_curtexmtx[s_texmtxwrite++]));
|
||||
}
|
||||
|
||||
void LOADERDECL TexMtx_Write_Float2()
|
||||
static void LOADERDECL TexMtx_Write_Float2()
|
||||
{
|
||||
DataWrite(0.f);
|
||||
DataWrite(float(s_curtexmtx[s_texmtxwrite++]));
|
||||
}
|
||||
|
||||
void LOADERDECL TexMtx_Write_Float4()
|
||||
static void LOADERDECL TexMtx_Write_Float4()
|
||||
{
|
||||
DataWrite(0.f);
|
||||
DataWrite(0.f);
|
||||
|
@ -37,7 +37,7 @@ __forceinline void LOG_TEX<2>()
|
||||
extern int tcIndex;
|
||||
extern float tcScale[8];
|
||||
|
||||
void LOADERDECL TexCoord_Read_Dummy()
|
||||
static void LOADERDECL TexCoord_Read_Dummy()
|
||||
{
|
||||
tcIndex++;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ static ProjectionHack g_ProjHack1;
|
||||
static ProjectionHack g_ProjHack2;
|
||||
} // Namespace
|
||||
|
||||
float PHackValue(std::string sValue)
|
||||
static float PHackValue(std::string sValue)
|
||||
{
|
||||
float f = 0;
|
||||
bool fp = false;
|
||||
|
@ -11,13 +11,13 @@
|
||||
#include "VideoCommon/VideoCommon.h"
|
||||
#include "VideoCommon/XFMemory.h"
|
||||
|
||||
void XFMemWritten(u32 transferSize, u32 baseAddress)
|
||||
static void XFMemWritten(u32 transferSize, u32 baseAddress)
|
||||
{
|
||||
VertexManager::Flush();
|
||||
VertexShaderManager::InvalidateXFRange(baseAddress, baseAddress + transferSize);
|
||||
}
|
||||
|
||||
void XFRegWritten(int transferSize, u32 baseAddress, u32 *pData)
|
||||
static void XFRegWritten(int transferSize, u32 baseAddress, u32 *pData)
|
||||
{
|
||||
u32 address = baseAddress;
|
||||
u32 dataIndex = 0;
|
||||
|
Reference in New Issue
Block a user