diff options
| author | Lioncash <mathew1800@gmail.com> | 2019-07-10 23:34:50 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2019-07-10 23:34:54 -0400 |
| commit | d4337eebdeb999df380394cdd20d054f5e9fe375 (patch) | |
| tree | b2c04979677aa138cbc3202c510a96040ba9adcd /Source/Core/VideoBackends/Software | |
| parent | 9802a5e16b5860d1c6b42beeb1b8ca883467e1b1 (diff) | |
VideoCommon/Statistics: Rename stats global to g_stats
Makes the global variable follow our convention of prefixing g_ on
global variables to make it obvious in surrounding code that it's not a
local variable.
Diffstat (limited to 'Source/Core/VideoBackends/Software')
| -rw-r--r-- | Source/Core/VideoBackends/Software/Clipper.cpp | 10 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/Software/DebugUtil.cpp | 18 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/Software/Rasterizer.cpp | 4 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/Software/SWVertexLoader.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/Software/Tev.cpp | 4 |
5 files changed, 19 insertions, 19 deletions
diff --git a/Source/Core/VideoBackends/Software/Clipper.cpp b/Source/Core/VideoBackends/Software/Clipper.cpp index 5608ee5884..67712fa9da 100644 --- a/Source/Core/VideoBackends/Software/Clipper.cpp +++ b/Source/Core/VideoBackends/Software/Clipper.cpp @@ -221,7 +221,7 @@ static void ClipTriangle(int* indices, int* numIndices) POLY_CLIP(CLIP_POS_Z_BIT, 0, 0, 0, 1); POLY_CLIP(CLIP_NEG_Z_BIT, 0, 0, 1, 1); - INCSTAT(stats.this_frame.num_triangles_clipped); + INCSTAT(g_stats.this_frame.num_triangles_clipped); // transform the poly in inlist into triangles indices[0] = inlist[0]; @@ -288,7 +288,7 @@ static void ClipLine(int* indices) void ProcessTriangle(OutputVertexData* v0, OutputVertexData* v1, OutputVertexData* v2) { - INCSTAT(stats.this_frame.num_triangles_in) + INCSTAT(g_stats.this_frame.num_triangles_in) bool backface; @@ -410,7 +410,7 @@ bool CullTest(const OutputVertexData* v0, const OutputVertexData* v1, const Outp if (mask) { - INCSTAT(stats.this_frame.num_triangles_rejected) + INCSTAT(g_stats.this_frame.num_triangles_rejected) return false; } @@ -430,13 +430,13 @@ bool CullTest(const OutputVertexData* v0, const OutputVertexData* v1, const Outp if ((bpmem.genMode.cullmode & 1) && !backface) // cull frontfacing { - INCSTAT(stats.this_frame.num_triangles_culled) + INCSTAT(g_stats.this_frame.num_triangles_culled) return false; } if ((bpmem.genMode.cullmode & 2) && backface) // cull backfacing { - INCSTAT(stats.this_frame.num_triangles_culled) + INCSTAT(g_stats.this_frame.num_triangles_culled) return false; } diff --git a/Source/Core/VideoBackends/Software/DebugUtil.cpp b/Source/Core/VideoBackends/Software/DebugUtil.cpp index fa54450780..7b9be6e503 100644 --- a/Source/Core/VideoBackends/Software/DebugUtil.cpp +++ b/Source/Core/VideoBackends/Software/DebugUtil.cpp @@ -106,7 +106,7 @@ void DumpActiveTextures() { SaveTexture(StringFromFormat("%star%i_ind%i_map%i_mip%i.png", File::GetUserPath(D_DUMPTEXTURES_IDX).c_str(), - stats.this_frame.num_drawn_objects, stageNum, texmap, mip), + g_stats.this_frame.num_drawn_objects, stageNum, texmap, mip), texmap, mip); } } @@ -124,7 +124,7 @@ void DumpActiveTextures() { SaveTexture(StringFromFormat("%star%i_stage%i_map%i_mip%i.png", File::GetUserPath(D_DUMPTEXTURES_IDX).c_str(), - stats.this_frame.num_drawn_objects, stageNum, texmap, mip), + g_stats.this_frame.num_drawn_objects, stageNum, texmap, mip), texmap, mip); } } @@ -192,8 +192,8 @@ void CopyTempBuffer(s16 x, s16 y, int bufferBase, int subBuffer, const char* nam void OnObjectBegin() { if (g_ActiveConfig.bDumpTextures && - stats.this_frame.num_drawn_objects >= g_ActiveConfig.drawStart && - stats.this_frame.num_drawn_objects < g_ActiveConfig.drawEnd) + g_stats.this_frame.num_drawn_objects >= g_ActiveConfig.drawStart && + g_stats.this_frame.num_drawn_objects < g_ActiveConfig.drawEnd) { DumpActiveTextures(); } @@ -202,11 +202,11 @@ void OnObjectBegin() void OnObjectEnd() { if (g_ActiveConfig.bDumpObjects && - stats.this_frame.num_drawn_objects >= g_ActiveConfig.drawStart && - stats.this_frame.num_drawn_objects < g_ActiveConfig.drawEnd) + g_stats.this_frame.num_drawn_objects >= g_ActiveConfig.drawStart && + g_stats.this_frame.num_drawn_objects < g_ActiveConfig.drawEnd) { DumpEfb(StringFromFormat("%sobject%i.png", File::GetUserPath(D_DUMPOBJECTS_IDX).c_str(), - stats.this_frame.num_drawn_objects)); + g_stats.this_frame.num_drawn_objects)); } for (int i = 0; i < NUM_OBJECT_BUFFERS; i++) @@ -216,13 +216,13 @@ void OnObjectEnd() DrawnToBuffer[i] = false; std::string filename = StringFromFormat( "%sobject%i_%s(%i).png", File::GetUserPath(D_DUMPOBJECTS_IDX).c_str(), - stats.this_frame.num_drawn_objects, ObjectBufferName[i], i - BufferBase[i]); + g_stats.this_frame.num_drawn_objects, ObjectBufferName[i], i - BufferBase[i]); TextureToPng((u8*)ObjectBuffer[i], EFB_WIDTH * 4, filename, EFB_WIDTH, EFB_HEIGHT, true); memset(ObjectBuffer[i], 0, EFB_WIDTH * EFB_HEIGHT * sizeof(u32)); } } - stats.this_frame.num_drawn_objects++; + g_stats.this_frame.num_drawn_objects++; } } // namespace DebugUtil diff --git a/Source/Core/VideoBackends/Software/Rasterizer.cpp b/Source/Core/VideoBackends/Software/Rasterizer.cpp index a904d28498..5fc21340fe 100644 --- a/Source/Core/VideoBackends/Software/Rasterizer.cpp +++ b/Source/Core/VideoBackends/Software/Rasterizer.cpp @@ -72,7 +72,7 @@ void SetTevReg(int reg, int comp, s16 color) static void Draw(s32 x, s32 y, s32 xi, s32 yi) { - INCSTAT(stats.this_frame.rasterized_pixels); + INCSTAT(g_stats.this_frame.rasterized_pixels); float dx = vertexOffsetX + (float)(x - vertex0X); float dy = vertexOffsetY + (float)(y - vertex0Y); @@ -267,7 +267,7 @@ static void BuildBlock(s32 blockX, s32 blockY) void DrawTriangleFrontFace(const OutputVertexData* v0, const OutputVertexData* v1, const OutputVertexData* v2) { - INCSTAT(stats.this_frame.num_triangles_drawn); + INCSTAT(g_stats.this_frame.num_triangles_drawn); // adapted from http://devmaster.net/posts/6145/advanced-rasterization diff --git a/Source/Core/VideoBackends/Software/SWVertexLoader.cpp b/Source/Core/VideoBackends/Software/SWVertexLoader.cpp index f0cfb1c3b9..266f1046a1 100644 --- a/Source/Core/VideoBackends/Software/SWVertexLoader.cpp +++ b/Source/Core/VideoBackends/Software/SWVertexLoader.cpp @@ -91,7 +91,7 @@ void SWVertexLoader::DrawCurrentBatch(u32 base_index, u32 num_indices, u32 base_ // assemble and rasterize the primitive m_setup_unit.SetupVertex(); - INCSTAT(stats.this_frame.num_vertices_loaded) + INCSTAT(g_stats.this_frame.num_vertices_loaded) } DebugUtil::OnObjectEnd(); diff --git a/Source/Core/VideoBackends/Software/Tev.cpp b/Source/Core/VideoBackends/Software/Tev.cpp index cafb5f346e..b0285867b9 100644 --- a/Source/Core/VideoBackends/Software/Tev.cpp +++ b/Source/Core/VideoBackends/Software/Tev.cpp @@ -568,7 +568,7 @@ void Tev::Draw() ASSERT(Position[0] >= 0 && Position[0] < EFB_WIDTH); ASSERT(Position[1] >= 0 && Position[1] < EFB_HEIGHT); - INCSTAT(stats.this_frame.tev_pixels_in); + INCSTAT(g_stats.this_frame.tev_pixels_in); // initial color values for (int i = 0; i < 4; i++) @@ -869,7 +869,7 @@ void Tev::Draw() } #endif - INCSTAT(stats.this_frame.tev_pixels_out); + INCSTAT(g_stats.this_frame.tev_pixels_out); EfbInterface::IncPerfCounterQuadCount(PQ_BLEND_INPUT); EfbInterface::BlendTev(Position[0], Position[1], output); |
