diff options
| author | degasus <wickmarkus@web.de> | 2014-07-08 15:58:25 +0200 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2014-07-11 16:10:20 +0200 |
| commit | 6d3f249dcc746cc7845ef88ddb8ce3bcc9221aca (patch) | |
| tree | e2ca5783d36a54283ff241ef9a053053bb5cc258 /Source/Core/VideoCommon | |
| parent | 9560ecdbec319ab4bb7aca2b8bd2e6ed27d0b7c0 (diff) | |
mark all local variables as static
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/CommandProcessor.cpp | 20 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/DriverDetails.cpp | 12 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/HiresTextures.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/MainBase.cpp | 4 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/PixelEngine.cpp | 8 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/RenderBase.cpp | 6 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/TextureCacheBase.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/TextureDecoder_x64.cpp | 4 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/VertexLoader.h | 9 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/VertexShaderManager.cpp | 2 |
10 files changed, 38 insertions, 31 deletions
diff --git a/Source/Core/VideoCommon/CommandProcessor.cpp b/Source/Core/VideoCommon/CommandProcessor.cpp index c27681ac3c..e42b7227db 100644 --- a/Source/Core/VideoCommon/CommandProcessor.cpp +++ b/Source/Core/VideoCommon/CommandProcessor.cpp @@ -24,21 +24,21 @@ namespace CommandProcessor { -int et_UpdateInterrupts; +static int et_UpdateInterrupts; // TODO(ector): Warn on bbox read/write // STATE_TO_SAVE SCPFifoStruct fifo; -UCPStatusReg m_CPStatusReg; -UCPCtrlReg m_CPCtrlReg; -UCPClearReg m_CPClearReg; - -u16 m_bboxleft; -u16 m_bboxtop; -u16 m_bboxright; -u16 m_bboxbottom; -u16 m_tokenReg; +static UCPStatusReg m_CPStatusReg; +static UCPCtrlReg m_CPCtrlReg; +static UCPClearReg m_CPClearReg; + +static u16 m_bboxleft; +static u16 m_bboxtop; +static u16 m_bboxright; +static u16 m_bboxbottom; +static u16 m_tokenReg; volatile bool isPossibleWaitingSetDrawDone = false; volatile bool interruptSet= false; diff --git a/Source/Core/VideoCommon/DriverDetails.cpp b/Source/Core/VideoCommon/DriverDetails.cpp index 9646e6a140..0580bd98c9 100644 --- a/Source/Core/VideoCommon/DriverDetails.cpp +++ b/Source/Core/VideoCommon/DriverDetails.cpp @@ -32,14 +32,14 @@ namespace DriverDetails const u32 m_os = OS_ALL | OS_LINUX; #endif - Vendor m_vendor = VENDOR_UNKNOWN; - Driver m_driver = DRIVER_UNKNOWN; - s32 m_family = 0; - double m_version = 0.0; + static Vendor m_vendor = VENDOR_UNKNOWN; + static Driver m_driver = DRIVER_UNKNOWN; + static s32 m_family = 0; + static double m_version = 0.0; // This is a list of all known bugs for each vendor // We use this to check if the device and driver has a issue - BugInfo m_known_bugs[] = { + static BugInfo m_known_bugs[] = { {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_NODYNUBOACCESS, 14.0, -1.0, true}, {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_BROKENCENTROID, 14.0, 46.0, true}, {OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_BROKENINFOLOG, -1.0, 46.0, true}, @@ -59,7 +59,7 @@ namespace DriverDetails {OS_LINUX, VENDOR_NVIDIA, DRIVER_NVIDIA, -1, BUG_BROKENUNSYNCMAPPING, -1.0, -1.0, true}, }; - std::map<Bug, BugInfo> m_bugs; + static std::map<Bug, BugInfo> m_bugs; void Init(Vendor vendor, Driver driver, const double version, const s32 family) { diff --git a/Source/Core/VideoCommon/HiresTextures.cpp b/Source/Core/VideoCommon/HiresTextures.cpp index af7e8bbe40..f9e7d918c9 100644 --- a/Source/Core/VideoCommon/HiresTextures.cpp +++ b/Source/Core/VideoCommon/HiresTextures.cpp @@ -18,7 +18,7 @@ namespace HiresTextures { -std::map<std::string, std::string> textureMap; +static std::map<std::string, std::string> textureMap; void Init(const std::string& gameCode) { diff --git a/Source/Core/VideoCommon/MainBase.cpp b/Source/Core/VideoCommon/MainBase.cpp index f9ccc47375..f96201c92d 100644 --- a/Source/Core/VideoCommon/MainBase.cpp +++ b/Source/Core/VideoCommon/MainBase.cpp @@ -22,8 +22,8 @@ volatile u32 s_swapRequested = false; u32 s_efbAccessRequested = false; volatile u32 s_FifoShuttingDown = false; -std::condition_variable s_perf_query_cond; -std::mutex s_perf_query_lock; +static std::condition_variable s_perf_query_cond; +static std::mutex s_perf_query_lock; static volatile bool s_perf_query_requested; static volatile struct diff --git a/Source/Core/VideoCommon/PixelEngine.cpp b/Source/Core/VideoCommon/PixelEngine.cpp index 85d4ed34f8..a66dd5ee98 100644 --- a/Source/Core/VideoCommon/PixelEngine.cpp +++ b/Source/Core/VideoCommon/PixelEngine.cpp @@ -97,14 +97,14 @@ static UPEAlphaReadReg m_AlphaRead; static UPECtrlReg m_Control; //static u16 m_Token; // token value most recently encountered -volatile u32 g_bSignalTokenInterrupt; -volatile u32 g_bSignalFinishInterrupt; +static volatile u32 g_bSignalTokenInterrupt; +static volatile u32 g_bSignalFinishInterrupt; static int et_SetTokenOnMainThread; static int et_SetFinishOnMainThread; -volatile u32 interruptSetToken = 0; -volatile u32 interruptSetFinish = 0; +static volatile u32 interruptSetToken = 0; +static volatile u32 interruptSetFinish = 0; u16 bbox[4]; bool bbox_active; diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index 2c95cdf89d..508dda77ca 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -40,7 +40,8 @@ // TODO: Move these out of here. int frameCount; -int OSDChoice, OSDTime; +int OSDChoice; +static int OSDTime; Renderer *g_renderer = nullptr; @@ -350,9 +351,6 @@ void Renderer::DrawDebugText() g_renderer->RenderText(final_yellow, 20, 20, 0xFFFFFF00); } -// TODO: remove -extern bool g_aspect_wide; - void Renderer::UpdateDrawRectangle(int backbuffer_width, int backbuffer_height) { float FloatGLWidth = (float)backbuffer_width; diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index edb0f49ac2..33d6b3b919 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -36,7 +36,7 @@ TextureCache::TexCache TextureCache::textures; TextureCache::BackupConfig TextureCache::backup_config; -bool invalidate_texture_cache_requested; +static bool invalidate_texture_cache_requested; TextureCache::TCacheEntryBase::~TCacheEntryBase() { diff --git a/Source/Core/VideoCommon/TextureDecoder_x64.cpp b/Source/Core/VideoCommon/TextureDecoder_x64.cpp index 45bd06f06d..63e5207c82 100644 --- a/Source/Core/VideoCommon/TextureDecoder_x64.cpp +++ b/Source/Core/VideoCommon/TextureDecoder_x64.cpp @@ -32,8 +32,8 @@ #pragma clang diagnostic ignored "-Wshadow" #endif -bool TexFmt_Overlay_Enable=false; -bool TexFmt_Overlay_Center=false; +static bool TexFmt_Overlay_Enable=false; +static bool TexFmt_Overlay_Center=false; extern const char* texfmt[]; extern const unsigned char sfont_map[]; diff --git a/Source/Core/VideoCommon/VertexLoader.h b/Source/Core/VideoCommon/VertexLoader.h index 407a20edc8..853d5d4bc4 100644 --- a/Source/Core/VideoCommon/VertexLoader.h +++ b/Source/Core/VideoCommon/VertexLoader.h @@ -23,6 +23,15 @@ #endif #endif +// They are used for the communication with the loader functions +extern NativeVertexFormat *g_nativeVertexFmt; +extern int tcIndex; +extern int colIndex; +extern TVtxAttr* pVtxAttr; +extern int colElements[2]; +extern float posScale; +extern float tcScale[8]; + class VertexLoaderUID { u32 vid[5]; diff --git a/Source/Core/VideoCommon/VertexShaderManager.cpp b/Source/Core/VideoCommon/VertexShaderManager.cpp index 2507acfbb7..dd233403cb 100644 --- a/Source/Core/VideoCommon/VertexShaderManager.cpp +++ b/Source/Core/VideoCommon/VertexShaderManager.cpp @@ -18,7 +18,7 @@ #include "VideoCommon/VideoConfig.h" #include "VideoCommon/XFMemory.h" -float GC_ALIGNED16(g_fProjectionMatrix[16]); +static float GC_ALIGNED16(g_fProjectionMatrix[16]); // track changes static bool bTexMatricesChanged[2], bPosNormalMatrixChanged, bProjectionChanged, bViewportChanged; |
