VideoCommon/Statistics: Normalize statistic variable names

Normalizes all variables related to statistics so that they follow our
coding style.

These are relatively low traffic areas, so this modification isn't too
noisy.
This commit is contained in:
Lioncash 2019-07-10 23:11:14 -04:00
parent 0a7395bfba
commit a99c7d01e1
19 changed files with 169 additions and 163 deletions

View File

@ -50,7 +50,7 @@ static void UpdateConstantBuffer(ID3D11Buffer* const buffer, const void* data, u
memcpy(map.pData, data, data_size); memcpy(map.pData, data, data_size);
D3D::context->Unmap(buffer, 0); D3D::context->Unmap(buffer, 0);
ADDSTAT(stats.thisFrame.bytesUniformStreamed, data_size); ADDSTAT(stats.this_frame.bytes_uniform_streamed, data_size);
} }
static ComPtr<ID3D11ShaderResourceView> static ComPtr<ID3D11ShaderResourceView>
@ -166,7 +166,7 @@ bool VertexManager::UploadTexelBuffer(const void* data, u32 data_size, TexelBuff
*out_offset = m_texel_buffer_offset / elem_size; *out_offset = m_texel_buffer_offset / elem_size;
std::memcpy(static_cast<u8*>(sr.pData) + m_texel_buffer_offset, data, data_size); std::memcpy(static_cast<u8*>(sr.pData) + m_texel_buffer_offset, data, data_size);
ADDSTAT(stats.thisFrame.bytesUniformStreamed, data_size); ADDSTAT(stats.this_frame.bytes_uniform_streamed, data_size);
m_texel_buffer_offset += data_size; m_texel_buffer_offset += data_size;
D3D::context->Unmap(m_texel_buffer.Get(), 0); D3D::context->Unmap(m_texel_buffer.Get(), 0);
@ -194,7 +194,7 @@ bool VertexManager::UploadTexelBuffer(const void* data, u32 data_size, TexelBuff
std::memcpy(static_cast<u8*>(sr.pData) + m_texel_buffer_offset, data, data_size); std::memcpy(static_cast<u8*>(sr.pData) + m_texel_buffer_offset, data, data_size);
std::memcpy(static_cast<u8*>(sr.pData) + m_texel_buffer_offset + palette_byte_offset, std::memcpy(static_cast<u8*>(sr.pData) + m_texel_buffer_offset + palette_byte_offset,
palette_data, palette_size); palette_data, palette_size);
ADDSTAT(stats.thisFrame.bytesUniformStreamed, palette_byte_offset + palette_size); ADDSTAT(stats.this_frame.bytes_uniform_streamed, palette_byte_offset + palette_size);
*out_offset = m_texel_buffer_offset / elem_size; *out_offset = m_texel_buffer_offset / elem_size;
*out_palette_offset = (m_texel_buffer_offset + palette_byte_offset) / palette_elem_size; *out_palette_offset = (m_texel_buffer_offset + palette_byte_offset) / palette_elem_size;
m_texel_buffer_offset += palette_byte_offset + palette_size; m_texel_buffer_offset += palette_byte_offset + palette_size;
@ -251,8 +251,8 @@ void VertexManager::CommitBuffer(u32 num_vertices, u32 vertex_stride, u32 num_in
m_buffer_cursor = cursor + totalBufferSize; m_buffer_cursor = cursor + totalBufferSize;
ADDSTAT(stats.thisFrame.bytesVertexStreamed, vertexBufferSize); ADDSTAT(stats.this_frame.bytes_vertex_streamed, vertexBufferSize);
ADDSTAT(stats.thisFrame.bytesIndexStreamed, indexBufferSize); ADDSTAT(stats.this_frame.bytes_index_streamed, indexBufferSize);
D3D::stateman->SetVertexBuffer(m_buffers[m_current_buffer].Get(), vertex_stride, 0); D3D::stateman->SetVertexBuffer(m_buffers[m_current_buffer].Get(), vertex_stride, 0);
D3D::stateman->SetIndexBuffer(m_buffers[m_current_buffer].Get()); D3D::stateman->SetIndexBuffer(m_buffers[m_current_buffer].Get());

View File

@ -112,8 +112,8 @@ void VertexManager::CommitBuffer(u32 num_vertices, u32 vertex_stride, u32 num_in
m_vertex_stream_buffer.CommitMemory(vertex_data_size); m_vertex_stream_buffer.CommitMemory(vertex_data_size);
m_index_stream_buffer.CommitMemory(index_data_size); m_index_stream_buffer.CommitMemory(index_data_size);
ADDSTAT(stats.thisFrame.bytesVertexStreamed, static_cast<int>(vertex_data_size)); ADDSTAT(stats.this_frame.bytes_vertex_streamed, static_cast<int>(vertex_data_size));
ADDSTAT(stats.thisFrame.bytesIndexStreamed, static_cast<int>(index_data_size)); ADDSTAT(stats.this_frame.bytes_index_streamed, static_cast<int>(index_data_size));
Renderer::GetInstance()->SetVertexBuffer(m_vertex_stream_buffer.GetGPUPointer(), vertex_stride, Renderer::GetInstance()->SetVertexBuffer(m_vertex_stream_buffer.GetGPUPointer(), vertex_stride,
m_vertex_stream_buffer.GetSize()); m_vertex_stream_buffer.GetSize());
@ -137,7 +137,7 @@ void VertexManager::UpdateVertexShaderConstants()
std::memcpy(m_uniform_stream_buffer.GetCurrentHostPointer(), &VertexShaderManager::constants, std::memcpy(m_uniform_stream_buffer.GetCurrentHostPointer(), &VertexShaderManager::constants,
sizeof(VertexShaderConstants)); sizeof(VertexShaderConstants));
m_uniform_stream_buffer.CommitMemory(sizeof(VertexShaderConstants)); m_uniform_stream_buffer.CommitMemory(sizeof(VertexShaderConstants));
ADDSTAT(stats.thisFrame.bytesUniformStreamed, sizeof(VertexShaderConstants)); ADDSTAT(stats.this_frame.bytes_uniform_streamed, sizeof(VertexShaderConstants));
VertexShaderManager::dirty = false; VertexShaderManager::dirty = false;
} }
@ -150,7 +150,7 @@ void VertexManager::UpdateGeometryShaderConstants()
std::memcpy(m_uniform_stream_buffer.GetCurrentHostPointer(), &GeometryShaderManager::constants, std::memcpy(m_uniform_stream_buffer.GetCurrentHostPointer(), &GeometryShaderManager::constants,
sizeof(GeometryShaderConstants)); sizeof(GeometryShaderConstants));
m_uniform_stream_buffer.CommitMemory(sizeof(GeometryShaderConstants)); m_uniform_stream_buffer.CommitMemory(sizeof(GeometryShaderConstants));
ADDSTAT(stats.thisFrame.bytesUniformStreamed, sizeof(GeometryShaderConstants)); ADDSTAT(stats.this_frame.bytes_uniform_streamed, sizeof(GeometryShaderConstants));
GeometryShaderManager::dirty = false; GeometryShaderManager::dirty = false;
} }
@ -163,7 +163,7 @@ void VertexManager::UpdatePixelShaderConstants()
std::memcpy(m_uniform_stream_buffer.GetCurrentHostPointer(), &PixelShaderManager::constants, std::memcpy(m_uniform_stream_buffer.GetCurrentHostPointer(), &PixelShaderManager::constants,
sizeof(PixelShaderConstants)); sizeof(PixelShaderConstants));
m_uniform_stream_buffer.CommitMemory(sizeof(PixelShaderConstants)); m_uniform_stream_buffer.CommitMemory(sizeof(PixelShaderConstants));
ADDSTAT(stats.thisFrame.bytesUniformStreamed, sizeof(PixelShaderConstants)); ADDSTAT(stats.this_frame.bytes_uniform_streamed, sizeof(PixelShaderConstants));
PixelShaderManager::dirty = false; PixelShaderManager::dirty = false;
} }
@ -227,7 +227,7 @@ void VertexManager::UploadAllConstants()
// Finally, flush buffer memory after copying // Finally, flush buffer memory after copying
m_uniform_stream_buffer.CommitMemory(allocation_size); m_uniform_stream_buffer.CommitMemory(allocation_size);
ADDSTAT(stats.thisFrame.bytesUniformStreamed, allocation_size); ADDSTAT(stats.this_frame.bytes_uniform_streamed, allocation_size);
// Clear dirty flags // Clear dirty flags
VertexShaderManager::dirty = false; VertexShaderManager::dirty = false;
@ -250,7 +250,7 @@ void VertexManager::UploadUtilityUniforms(const void* data, u32 data_size)
Renderer::GetInstance()->SetConstantBuffer(2, m_uniform_stream_buffer.GetCurrentGPUPointer()); Renderer::GetInstance()->SetConstantBuffer(2, m_uniform_stream_buffer.GetCurrentGPUPointer());
std::memcpy(m_uniform_stream_buffer.GetCurrentHostPointer(), data, data_size); std::memcpy(m_uniform_stream_buffer.GetCurrentHostPointer(), data, data_size);
m_uniform_stream_buffer.CommitMemory(data_size); m_uniform_stream_buffer.CommitMemory(data_size);
ADDSTAT(stats.thisFrame.bytesUniformStreamed, data_size); ADDSTAT(stats.this_frame.bytes_uniform_streamed, data_size);
} }
bool VertexManager::UploadTexelBuffer(const void* data, u32 data_size, TexelBufferFormat format, bool VertexManager::UploadTexelBuffer(const void* data, u32 data_size, TexelBufferFormat format,
@ -275,7 +275,7 @@ bool VertexManager::UploadTexelBuffer(const void* data, u32 data_size, TexelBuff
std::memcpy(m_texel_stream_buffer.GetCurrentHostPointer(), data, data_size); std::memcpy(m_texel_stream_buffer.GetCurrentHostPointer(), data, data_size);
*out_offset = static_cast<u32>(m_texel_stream_buffer.GetCurrentOffset()) / elem_size; *out_offset = static_cast<u32>(m_texel_stream_buffer.GetCurrentOffset()) / elem_size;
m_texel_stream_buffer.CommitMemory(data_size); m_texel_stream_buffer.CommitMemory(data_size);
ADDSTAT(stats.thisFrame.bytesUniformStreamed, data_size); ADDSTAT(stats.this_frame.bytes_uniform_streamed, data_size);
Renderer::GetInstance()->SetTextureDescriptor(0, m_texel_buffer_views[format].cpu_handle); Renderer::GetInstance()->SetTextureDescriptor(0, m_texel_buffer_views[format].cpu_handle);
return true; return true;
} }
@ -312,7 +312,7 @@ bool VertexManager::UploadTexelBuffer(const void* data, u32 data_size, TexelBuff
palette_elem_size; palette_elem_size;
m_texel_stream_buffer.CommitMemory(palette_byte_offset + palette_size); m_texel_stream_buffer.CommitMemory(palette_byte_offset + palette_size);
ADDSTAT(stats.thisFrame.bytesUniformStreamed, palette_byte_offset + palette_size); ADDSTAT(stats.this_frame.bytes_uniform_streamed, palette_byte_offset + palette_size);
Renderer::GetInstance()->SetTextureDescriptor(0, m_texel_buffer_views[format].cpu_handle); Renderer::GetInstance()->SetTextureDescriptor(0, m_texel_buffer_views[format].cpu_handle);
Renderer::GetInstance()->SetTextureDescriptor(1, m_texel_buffer_views[palette_format].cpu_handle); Renderer::GetInstance()->SetTextureDescriptor(1, m_texel_buffer_views[palette_format].cpu_handle);
return true; return true;

View File

@ -158,7 +158,7 @@ void SHADER::Bind() const
{ {
if (CurrentProgram != glprogid) if (CurrentProgram != glprogid)
{ {
INCSTAT(stats.thisFrame.numShaderChanges); INCSTAT(stats.this_frame.num_shader_changes);
glUseProgram(glprogid); glUseProgram(glprogid);
CurrentProgram = glprogid; CurrentProgram = glprogid;
} }
@ -248,7 +248,7 @@ void ProgramShaderCache::UploadConstants()
VertexShaderManager::dirty = false; VertexShaderManager::dirty = false;
GeometryShaderManager::dirty = false; GeometryShaderManager::dirty = false;
ADDSTAT(stats.thisFrame.bytesUniformStreamed, s_ubo_buffer_size); ADDSTAT(stats.this_frame.bytes_uniform_streamed, s_ubo_buffer_size);
} }
} }
@ -264,7 +264,7 @@ void ProgramShaderCache::UploadConstants(const void* data, u32 data_size)
for (u32 index = 1; index <= 3; index++) for (u32 index = 1; index <= 3; index++)
glBindBufferRange(GL_UNIFORM_BUFFER, index, s_buffer->m_buffer, buffer.second, data_size); glBindBufferRange(GL_UNIFORM_BUFFER, index, s_buffer->m_buffer, buffer.second, data_size);
ADDSTAT(stats.thisFrame.bytesUniformStreamed, data_size); ADDSTAT(stats.this_frame.bytes_uniform_streamed, data_size);
} }
bool ProgramShaderCache::CompileComputeShader(SHADER& shader, const std::string& code) bool ProgramShaderCache::CompileComputeShader(SHADER& shader, const std::string& code)

View File

@ -105,7 +105,7 @@ bool VertexManager::UploadTexelBuffer(const void* data, u32 data_size, TexelBuff
const u32 elem_size = GetTexelBufferElementSize(format); const u32 elem_size = GetTexelBufferElementSize(format);
const auto dst = m_texel_buffer->Map(data_size, elem_size); const auto dst = m_texel_buffer->Map(data_size, elem_size);
std::memcpy(dst.first, data, data_size); std::memcpy(dst.first, data, data_size);
ADDSTAT(stats.thisFrame.bytesUniformStreamed, data_size); ADDSTAT(stats.this_frame.bytes_uniform_streamed, data_size);
*out_offset = dst.second / elem_size; *out_offset = dst.second / elem_size;
m_texel_buffer->Unmap(data_size); m_texel_buffer->Unmap(data_size);
@ -130,7 +130,7 @@ bool VertexManager::UploadTexelBuffer(const void* data, u32 data_size, TexelBuff
const u32 palette_byte_offset = Common::AlignUp(data_size, palette_elem_size); const u32 palette_byte_offset = Common::AlignUp(data_size, palette_elem_size);
std::memcpy(dst.first, data, data_size); std::memcpy(dst.first, data, data_size);
std::memcpy(dst.first + palette_byte_offset, palette_data, palette_size); std::memcpy(dst.first + palette_byte_offset, palette_data, palette_size);
ADDSTAT(stats.thisFrame.bytesUniformStreamed, palette_byte_offset + palette_size); ADDSTAT(stats.this_frame.bytes_uniform_streamed, palette_byte_offset + palette_size);
*out_offset = dst.second / elem_size; *out_offset = dst.second / elem_size;
*out_palette_offset = (dst.second + palette_byte_offset) / palette_elem_size; *out_palette_offset = (dst.second + palette_byte_offset) / palette_elem_size;
m_texel_buffer->Unmap(palette_byte_offset + palette_size); m_texel_buffer->Unmap(palette_byte_offset + palette_size);
@ -181,8 +181,8 @@ void VertexManager::CommitBuffer(u32 num_vertices, u32 vertex_stride, u32 num_in
m_vertex_buffer->Unmap(vertex_data_size); m_vertex_buffer->Unmap(vertex_data_size);
m_index_buffer->Unmap(index_data_size); m_index_buffer->Unmap(index_data_size);
ADDSTAT(stats.thisFrame.bytesVertexStreamed, vertex_data_size); ADDSTAT(stats.this_frame.bytes_vertex_streamed, vertex_data_size);
ADDSTAT(stats.thisFrame.bytesIndexStreamed, index_data_size); ADDSTAT(stats.this_frame.bytes_index_streamed, index_data_size);
} }
void VertexManager::UploadUniforms() void VertexManager::UploadUniforms()

View File

@ -221,7 +221,7 @@ static void ClipTriangle(int* indices, int* numIndices)
POLY_CLIP(CLIP_POS_Z_BIT, 0, 0, 0, 1); POLY_CLIP(CLIP_POS_Z_BIT, 0, 0, 0, 1);
POLY_CLIP(CLIP_NEG_Z_BIT, 0, 0, 1, 1); POLY_CLIP(CLIP_NEG_Z_BIT, 0, 0, 1, 1);
INCSTAT(stats.thisFrame.numTrianglesClipped); INCSTAT(stats.this_frame.num_triangles_clipped);
// transform the poly in inlist into triangles // transform the poly in inlist into triangles
indices[0] = inlist[0]; indices[0] = inlist[0];
@ -288,7 +288,7 @@ static void ClipLine(int* indices)
void ProcessTriangle(OutputVertexData* v0, OutputVertexData* v1, OutputVertexData* v2) void ProcessTriangle(OutputVertexData* v0, OutputVertexData* v1, OutputVertexData* v2)
{ {
INCSTAT(stats.thisFrame.numTrianglesIn) INCSTAT(stats.this_frame.num_triangles_in)
bool backface; bool backface;
@ -410,7 +410,7 @@ bool CullTest(const OutputVertexData* v0, const OutputVertexData* v1, const Outp
if (mask) if (mask)
{ {
INCSTAT(stats.thisFrame.numTrianglesRejected) INCSTAT(stats.this_frame.num_triangles_rejected)
return false; return false;
} }
@ -430,13 +430,13 @@ bool CullTest(const OutputVertexData* v0, const OutputVertexData* v1, const Outp
if ((bpmem.genMode.cullmode & 1) && !backface) // cull frontfacing if ((bpmem.genMode.cullmode & 1) && !backface) // cull frontfacing
{ {
INCSTAT(stats.thisFrame.numTrianglesCulled) INCSTAT(stats.this_frame.num_triangles_culled)
return false; return false;
} }
if ((bpmem.genMode.cullmode & 2) && backface) // cull backfacing if ((bpmem.genMode.cullmode & 2) && backface) // cull backfacing
{ {
INCSTAT(stats.thisFrame.numTrianglesCulled) INCSTAT(stats.this_frame.num_triangles_culled)
return false; return false;
} }

View File

@ -106,7 +106,7 @@ void DumpActiveTextures()
{ {
SaveTexture(StringFromFormat("%star%i_ind%i_map%i_mip%i.png", SaveTexture(StringFromFormat("%star%i_ind%i_map%i_mip%i.png",
File::GetUserPath(D_DUMPTEXTURES_IDX).c_str(), File::GetUserPath(D_DUMPTEXTURES_IDX).c_str(),
stats.thisFrame.numDrawnObjects, stageNum, texmap, mip), stats.this_frame.num_drawn_objects, stageNum, texmap, mip),
texmap, mip); texmap, mip);
} }
} }
@ -124,7 +124,7 @@ void DumpActiveTextures()
{ {
SaveTexture(StringFromFormat("%star%i_stage%i_map%i_mip%i.png", SaveTexture(StringFromFormat("%star%i_stage%i_map%i_mip%i.png",
File::GetUserPath(D_DUMPTEXTURES_IDX).c_str(), File::GetUserPath(D_DUMPTEXTURES_IDX).c_str(),
stats.thisFrame.numDrawnObjects, stageNum, texmap, mip), stats.this_frame.num_drawn_objects, stageNum, texmap, mip),
texmap, mip); texmap, mip);
} }
} }
@ -191,32 +191,38 @@ void CopyTempBuffer(s16 x, s16 y, int bufferBase, int subBuffer, const char* nam
void OnObjectBegin() void OnObjectBegin()
{ {
if (g_ActiveConfig.bDumpTextures && stats.thisFrame.numDrawnObjects >= g_ActiveConfig.drawStart && if (g_ActiveConfig.bDumpTextures &&
stats.thisFrame.numDrawnObjects < g_ActiveConfig.drawEnd) stats.this_frame.num_drawn_objects >= g_ActiveConfig.drawStart &&
stats.this_frame.num_drawn_objects < g_ActiveConfig.drawEnd)
{
DumpActiveTextures(); DumpActiveTextures();
}
} }
void OnObjectEnd() void OnObjectEnd()
{ {
if (g_ActiveConfig.bDumpObjects && stats.thisFrame.numDrawnObjects >= g_ActiveConfig.drawStart && if (g_ActiveConfig.bDumpObjects &&
stats.thisFrame.numDrawnObjects < g_ActiveConfig.drawEnd) stats.this_frame.num_drawn_objects >= g_ActiveConfig.drawStart &&
stats.this_frame.num_drawn_objects < g_ActiveConfig.drawEnd)
{
DumpEfb(StringFromFormat("%sobject%i.png", File::GetUserPath(D_DUMPOBJECTS_IDX).c_str(), DumpEfb(StringFromFormat("%sobject%i.png", File::GetUserPath(D_DUMPOBJECTS_IDX).c_str(),
stats.thisFrame.numDrawnObjects)); stats.this_frame.num_drawn_objects));
}
for (int i = 0; i < NUM_OBJECT_BUFFERS; i++) for (int i = 0; i < NUM_OBJECT_BUFFERS; i++)
{ {
if (DrawnToBuffer[i]) if (DrawnToBuffer[i])
{ {
DrawnToBuffer[i] = false; DrawnToBuffer[i] = false;
std::string filename = std::string filename = StringFromFormat(
StringFromFormat("%sobject%i_%s(%i).png", File::GetUserPath(D_DUMPOBJECTS_IDX).c_str(), "%sobject%i_%s(%i).png", File::GetUserPath(D_DUMPOBJECTS_IDX).c_str(),
stats.thisFrame.numDrawnObjects, ObjectBufferName[i], i - BufferBase[i]); stats.this_frame.num_drawn_objects, ObjectBufferName[i], i - BufferBase[i]);
TextureToPng((u8*)ObjectBuffer[i], EFB_WIDTH * 4, filename, EFB_WIDTH, EFB_HEIGHT, true); TextureToPng((u8*)ObjectBuffer[i], EFB_WIDTH * 4, filename, EFB_WIDTH, EFB_HEIGHT, true);
memset(ObjectBuffer[i], 0, EFB_WIDTH * EFB_HEIGHT * sizeof(u32)); memset(ObjectBuffer[i], 0, EFB_WIDTH * EFB_HEIGHT * sizeof(u32));
} }
} }
stats.thisFrame.numDrawnObjects++; stats.this_frame.num_drawn_objects++;
} }
} // namespace DebugUtil } // namespace DebugUtil

View File

@ -72,7 +72,7 @@ void SetTevReg(int reg, int comp, s16 color)
static void Draw(s32 x, s32 y, s32 xi, s32 yi) static void Draw(s32 x, s32 y, s32 xi, s32 yi)
{ {
INCSTAT(stats.thisFrame.rasterizedPixels); INCSTAT(stats.this_frame.rasterized_pixels);
float dx = vertexOffsetX + (float)(x - vertex0X); float dx = vertexOffsetX + (float)(x - vertex0X);
float dy = vertexOffsetY + (float)(y - vertex0Y); 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, void DrawTriangleFrontFace(const OutputVertexData* v0, const OutputVertexData* v1,
const OutputVertexData* v2) const OutputVertexData* v2)
{ {
INCSTAT(stats.thisFrame.numTrianglesDrawn); INCSTAT(stats.this_frame.num_triangles_drawn);
// adapted from http://devmaster.net/posts/6145/advanced-rasterization // adapted from http://devmaster.net/posts/6145/advanced-rasterization

View File

@ -91,7 +91,7 @@ void SWVertexLoader::DrawCurrentBatch(u32 base_index, u32 num_indices, u32 base_
// assemble and rasterize the primitive // assemble and rasterize the primitive
m_setup_unit.SetupVertex(); m_setup_unit.SetupVertex();
INCSTAT(stats.thisFrame.numVerticesLoaded) INCSTAT(stats.this_frame.num_vertices_loaded)
} }
DebugUtil::OnObjectEnd(); DebugUtil::OnObjectEnd();

View File

@ -568,7 +568,7 @@ void Tev::Draw()
ASSERT(Position[0] >= 0 && Position[0] < EFB_WIDTH); ASSERT(Position[0] >= 0 && Position[0] < EFB_WIDTH);
ASSERT(Position[1] >= 0 && Position[1] < EFB_HEIGHT); ASSERT(Position[1] >= 0 && Position[1] < EFB_HEIGHT);
INCSTAT(stats.thisFrame.tevPixelsIn); INCSTAT(stats.this_frame.tev_pixels_in);
// initial color values // initial color values
for (int i = 0; i < 4; i++) for (int i = 0; i < 4; i++)
@ -869,7 +869,7 @@ void Tev::Draw()
} }
#endif #endif
INCSTAT(stats.thisFrame.tevPixelsOut); INCSTAT(stats.this_frame.tev_pixels_out);
EfbInterface::IncPerfCounterQuadCount(PQ_BLEND_INPUT); EfbInterface::IncPerfCounterQuadCount(PQ_BLEND_INPUT);
EfbInterface::BlendTev(Position[0], Position[1], output); EfbInterface::BlendTev(Position[0], Position[1], output);

View File

@ -181,8 +181,8 @@ void VertexManager::CommitBuffer(u32 num_vertices, u32 vertex_stride, u32 num_in
m_vertex_stream_buffer->CommitMemory(vertex_data_size); m_vertex_stream_buffer->CommitMemory(vertex_data_size);
m_index_stream_buffer->CommitMemory(index_data_size); m_index_stream_buffer->CommitMemory(index_data_size);
ADDSTAT(stats.thisFrame.bytesVertexStreamed, static_cast<int>(vertex_data_size)); ADDSTAT(stats.this_frame.bytes_vertex_streamed, static_cast<int>(vertex_data_size));
ADDSTAT(stats.thisFrame.bytesIndexStreamed, static_cast<int>(index_data_size)); ADDSTAT(stats.this_frame.bytes_index_streamed, static_cast<int>(index_data_size));
StateTracker::GetInstance()->SetVertexBuffer(m_vertex_stream_buffer->GetBuffer(), 0); StateTracker::GetInstance()->SetVertexBuffer(m_vertex_stream_buffer->GetBuffer(), 0);
StateTracker::GetInstance()->SetIndexBuffer(m_index_stream_buffer->GetBuffer(), 0, StateTracker::GetInstance()->SetIndexBuffer(m_index_stream_buffer->GetBuffer(), 0,
@ -207,7 +207,7 @@ void VertexManager::UpdateVertexShaderConstants()
std::memcpy(m_uniform_stream_buffer->GetCurrentHostPointer(), &VertexShaderManager::constants, std::memcpy(m_uniform_stream_buffer->GetCurrentHostPointer(), &VertexShaderManager::constants,
sizeof(VertexShaderConstants)); sizeof(VertexShaderConstants));
m_uniform_stream_buffer->CommitMemory(sizeof(VertexShaderConstants)); m_uniform_stream_buffer->CommitMemory(sizeof(VertexShaderConstants));
ADDSTAT(stats.thisFrame.bytesUniformStreamed, sizeof(VertexShaderConstants)); ADDSTAT(stats.this_frame.bytes_uniform_streamed, sizeof(VertexShaderConstants));
VertexShaderManager::dirty = false; VertexShaderManager::dirty = false;
} }
@ -222,7 +222,7 @@ void VertexManager::UpdateGeometryShaderConstants()
std::memcpy(m_uniform_stream_buffer->GetCurrentHostPointer(), &GeometryShaderManager::constants, std::memcpy(m_uniform_stream_buffer->GetCurrentHostPointer(), &GeometryShaderManager::constants,
sizeof(GeometryShaderConstants)); sizeof(GeometryShaderConstants));
m_uniform_stream_buffer->CommitMemory(sizeof(GeometryShaderConstants)); m_uniform_stream_buffer->CommitMemory(sizeof(GeometryShaderConstants));
ADDSTAT(stats.thisFrame.bytesUniformStreamed, sizeof(GeometryShaderConstants)); ADDSTAT(stats.this_frame.bytes_uniform_streamed, sizeof(GeometryShaderConstants));
GeometryShaderManager::dirty = false; GeometryShaderManager::dirty = false;
} }
@ -237,7 +237,7 @@ void VertexManager::UpdatePixelShaderConstants()
std::memcpy(m_uniform_stream_buffer->GetCurrentHostPointer(), &PixelShaderManager::constants, std::memcpy(m_uniform_stream_buffer->GetCurrentHostPointer(), &PixelShaderManager::constants,
sizeof(PixelShaderConstants)); sizeof(PixelShaderConstants));
m_uniform_stream_buffer->CommitMemory(sizeof(PixelShaderConstants)); m_uniform_stream_buffer->CommitMemory(sizeof(PixelShaderConstants));
ADDSTAT(stats.thisFrame.bytesUniformStreamed, sizeof(PixelShaderConstants)); ADDSTAT(stats.this_frame.bytes_uniform_streamed, sizeof(PixelShaderConstants));
PixelShaderManager::dirty = false; PixelShaderManager::dirty = false;
} }
@ -302,7 +302,7 @@ void VertexManager::UploadAllConstants()
// Finally, flush buffer memory after copying // Finally, flush buffer memory after copying
m_uniform_stream_buffer->CommitMemory(allocation_size); m_uniform_stream_buffer->CommitMemory(allocation_size);
ADDSTAT(stats.thisFrame.bytesUniformStreamed, allocation_size); ADDSTAT(stats.this_frame.bytes_uniform_streamed, allocation_size);
// Clear dirty flags // Clear dirty flags
VertexShaderManager::dirty = false; VertexShaderManager::dirty = false;
@ -324,7 +324,7 @@ void VertexManager::UploadUtilityUniforms(const void* data, u32 data_size)
m_uniform_stream_buffer->GetBuffer(), m_uniform_stream_buffer->GetCurrentOffset(), data_size); m_uniform_stream_buffer->GetBuffer(), m_uniform_stream_buffer->GetCurrentOffset(), data_size);
std::memcpy(m_uniform_stream_buffer->GetCurrentHostPointer(), data, data_size); std::memcpy(m_uniform_stream_buffer->GetCurrentHostPointer(), data, data_size);
m_uniform_stream_buffer->CommitMemory(data_size); m_uniform_stream_buffer->CommitMemory(data_size);
ADDSTAT(stats.thisFrame.bytesUniformStreamed, data_size); ADDSTAT(stats.this_frame.bytes_uniform_streamed, data_size);
} }
bool VertexManager::UploadTexelBuffer(const void* data, u32 data_size, TexelBufferFormat format, bool VertexManager::UploadTexelBuffer(const void* data, u32 data_size, TexelBufferFormat format,
@ -349,7 +349,7 @@ bool VertexManager::UploadTexelBuffer(const void* data, u32 data_size, TexelBuff
std::memcpy(m_texel_stream_buffer->GetCurrentHostPointer(), data, data_size); std::memcpy(m_texel_stream_buffer->GetCurrentHostPointer(), data, data_size);
*out_offset = static_cast<u32>(m_texel_stream_buffer->GetCurrentOffset()) / elem_size; *out_offset = static_cast<u32>(m_texel_stream_buffer->GetCurrentOffset()) / elem_size;
m_texel_stream_buffer->CommitMemory(data_size); m_texel_stream_buffer->CommitMemory(data_size);
ADDSTAT(stats.thisFrame.bytesUniformStreamed, data_size); ADDSTAT(stats.this_frame.bytes_uniform_streamed, data_size);
StateTracker::GetInstance()->SetTexelBuffer(0, m_texel_buffer_views[format]); StateTracker::GetInstance()->SetTexelBuffer(0, m_texel_buffer_views[format]);
return true; return true;
} }
@ -386,7 +386,7 @@ bool VertexManager::UploadTexelBuffer(const void* data, u32 data_size, TexelBuff
palette_elem_size; palette_elem_size;
m_texel_stream_buffer->CommitMemory(palette_byte_offset + palette_size); m_texel_stream_buffer->CommitMemory(palette_byte_offset + palette_size);
ADDSTAT(stats.thisFrame.bytesUniformStreamed, palette_byte_offset + palette_size); ADDSTAT(stats.this_frame.bytes_uniform_streamed, palette_byte_offset + palette_size);
StateTracker::GetInstance()->SetTexelBuffer(0, m_texel_buffer_views[format]); StateTracker::GetInstance()->SetTexelBuffer(0, m_texel_buffer_views[format]);
StateTracker::GetInstance()->SetTexelBuffer(1, m_texel_buffer_views[palette_format]); StateTracker::GetInstance()->SetTexelBuffer(1, m_texel_buffer_views[palette_format]);
return true; return true;

View File

@ -117,7 +117,7 @@ void AsyncRequests::HandleEvent(const AsyncRequests::Event& e)
{ {
case Event::EFB_POKE_COLOR: case Event::EFB_POKE_COLOR:
{ {
INCSTAT(stats.thisFrame.numEFBPokes); INCSTAT(stats.this_frame.num_efb_pokes);
EfbPokeData poke = {e.efb_poke.x, e.efb_poke.y, e.efb_poke.data}; EfbPokeData poke = {e.efb_poke.x, e.efb_poke.y, e.efb_poke.data};
g_renderer->PokeEFB(EFBAccessType::PokeColor, &poke, 1); g_renderer->PokeEFB(EFBAccessType::PokeColor, &poke, 1);
} }
@ -125,20 +125,20 @@ void AsyncRequests::HandleEvent(const AsyncRequests::Event& e)
case Event::EFB_POKE_Z: case Event::EFB_POKE_Z:
{ {
INCSTAT(stats.thisFrame.numEFBPokes); INCSTAT(stats.this_frame.num_efb_pokes);
EfbPokeData poke = {e.efb_poke.x, e.efb_poke.y, e.efb_poke.data}; EfbPokeData poke = {e.efb_poke.x, e.efb_poke.y, e.efb_poke.data};
g_renderer->PokeEFB(EFBAccessType::PokeZ, &poke, 1); g_renderer->PokeEFB(EFBAccessType::PokeZ, &poke, 1);
} }
break; break;
case Event::EFB_PEEK_COLOR: case Event::EFB_PEEK_COLOR:
INCSTAT(stats.thisFrame.numEFBPeeks); INCSTAT(stats.this_frame.num_efb_peeks);
*e.efb_peek.data = *e.efb_peek.data =
g_renderer->AccessEFB(EFBAccessType::PeekColor, e.efb_peek.x, e.efb_peek.y, 0); g_renderer->AccessEFB(EFBAccessType::PeekColor, e.efb_peek.x, e.efb_peek.y, 0);
break; break;
case Event::EFB_PEEK_Z: case Event::EFB_PEEK_Z:
INCSTAT(stats.thisFrame.numEFBPeeks); INCSTAT(stats.this_frame.num_efb_peeks);
*e.efb_peek.data = g_renderer->AccessEFB(EFBAccessType::PeekZ, e.efb_peek.x, e.efb_peek.y, 0); *e.efb_peek.data = g_renderer->AccessEFB(EFBAccessType::PeekZ, e.efb_peek.x, e.efb_peek.y, 0);
break; break;

View File

@ -54,7 +54,7 @@ static u32 InterpretDisplayList(u32 address, u32 size)
Statistics::SwapDL(); Statistics::SwapDL();
Run(DataReader(startAddress, startAddress + size), &cycles, true); Run(DataReader(startAddress, startAddress + size), &cycles, true);
INCSTAT(stats.thisFrame.numDListsCalled); INCSTAT(stats.this_frame.num_dlists_called);
// un-swap // un-swap
Statistics::SwapDL(); Statistics::SwapDL();
@ -114,7 +114,7 @@ u8* Run(DataReader src, u32* cycles, bool in_display_list)
u32 value = src.Read<u32>(); u32 value = src.Read<u32>();
LoadCPReg(sub_cmd, value, is_preprocess); LoadCPReg(sub_cmd, value, is_preprocess);
if (!is_preprocess) if (!is_preprocess)
INCSTAT(stats.thisFrame.numCPLoads); INCSTAT(stats.this_frame.num_cp_loads);
} }
break; break;
@ -132,7 +132,7 @@ u8* Run(DataReader src, u32* cycles, bool in_display_list)
u32 xf_address = Cmd2 & 0xFFFF; u32 xf_address = Cmd2 & 0xFFFF;
LoadXFReg(transfer_size, xf_address, src); LoadXFReg(transfer_size, xf_address, src);
INCSTAT(stats.thisFrame.numXFLoads); INCSTAT(stats.this_frame.num_xf_loads);
} }
src.Skip<u32>(transfer_size); src.Skip<u32>(transfer_size);
} }
@ -208,7 +208,7 @@ u8* Run(DataReader src, u32* cycles, bool in_display_list)
else else
{ {
LoadBPReg(bp_cmd); LoadBPReg(bp_cmd);
INCSTAT(stats.thisFrame.numBPLoads); INCSTAT(stats.this_frame.num_bp_loads);
} }
} }
break; break;

View File

@ -1280,8 +1280,8 @@ void Renderer::Swap(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_height, u6
DolphinAnalytics::PerformanceSample perf_sample; DolphinAnalytics::PerformanceSample perf_sample;
perf_sample.speed_ratio = SystemTimers::GetEstimatedEmulationPerformance(); perf_sample.speed_ratio = SystemTimers::GetEstimatedEmulationPerformance();
perf_sample.num_prims = stats.thisFrame.numPrims + stats.thisFrame.numDLPrims; perf_sample.num_prims = stats.this_frame.num_prims + stats.this_frame.num_dl_prims;
perf_sample.num_draw_calls = stats.thisFrame.numDrawCalls; perf_sample.num_draw_calls = stats.this_frame.num_draw_calls;
DolphinAnalytics::Instance().ReportPerformanceInfo(std::move(perf_sample)); DolphinAnalytics::Instance().ReportPerformanceInfo(std::move(perf_sample));
if (IsFrameDumping()) if (IsFrameDumping())

View File

@ -221,12 +221,12 @@ void ShaderCache::LoadShaderCache(T& cache, APIType api_type, const char* type,
switch (stage) switch (stage)
{ {
case ShaderStage::Vertex: case ShaderStage::Vertex:
INCSTAT(stats.numVertexShadersCreated); INCSTAT(stats.num_vertex_shaders_created);
INCSTAT(stats.numVertexShadersAlive); INCSTAT(stats.num_vertex_shaders_alive);
break; break;
case ShaderStage::Pixel: case ShaderStage::Pixel:
INCSTAT(stats.numPixelShadersCreated); INCSTAT(stats.num_pixel_shaders_created);
INCSTAT(stats.numPixelShadersAlive); INCSTAT(stats.num_pixel_shaders_alive);
break; break;
default: default:
break; break;
@ -369,10 +369,10 @@ void ShaderCache::ClearCaches()
ClearShaderCache(m_uber_vs_cache); ClearShaderCache(m_uber_vs_cache);
ClearShaderCache(m_uber_ps_cache); ClearShaderCache(m_uber_ps_cache);
SETSTAT(stats.numPixelShadersCreated, 0); SETSTAT(stats.num_pixel_shaders_created, 0);
SETSTAT(stats.numPixelShadersAlive, 0); SETSTAT(stats.num_pixel_shaders_alive, 0);
SETSTAT(stats.numVertexShadersCreated, 0); SETSTAT(stats.num_vertex_shaders_created, 0);
SETSTAT(stats.numVertexShadersAlive, 0); SETSTAT(stats.num_vertex_shaders_alive, 0);
} }
void ShaderCache::CompileMissingPipelines() void ShaderCache::CompileMissingPipelines()
@ -434,8 +434,8 @@ const AbstractShader* ShaderCache::InsertVertexShader(const VertexShaderUid& uid
if (!binary.empty()) if (!binary.empty())
m_vs_cache.disk_cache.Append(uid, binary.data(), static_cast<u32>(binary.size())); m_vs_cache.disk_cache.Append(uid, binary.data(), static_cast<u32>(binary.size()));
} }
INCSTAT(stats.numVertexShadersCreated); INCSTAT(stats.num_vertex_shaders_created);
INCSTAT(stats.numVertexShadersAlive); INCSTAT(stats.num_vertex_shaders_alive);
entry.shader = std::move(shader); entry.shader = std::move(shader);
} }
@ -456,8 +456,8 @@ const AbstractShader* ShaderCache::InsertVertexUberShader(const UberShader::Vert
if (!binary.empty()) if (!binary.empty())
m_uber_vs_cache.disk_cache.Append(uid, binary.data(), static_cast<u32>(binary.size())); m_uber_vs_cache.disk_cache.Append(uid, binary.data(), static_cast<u32>(binary.size()));
} }
INCSTAT(stats.numVertexShadersCreated); INCSTAT(stats.num_vertex_shaders_created);
INCSTAT(stats.numVertexShadersAlive); INCSTAT(stats.num_vertex_shaders_alive);
entry.shader = std::move(shader); entry.shader = std::move(shader);
} }
@ -478,8 +478,8 @@ const AbstractShader* ShaderCache::InsertPixelShader(const PixelShaderUid& uid,
if (!binary.empty()) if (!binary.empty())
m_ps_cache.disk_cache.Append(uid, binary.data(), static_cast<u32>(binary.size())); m_ps_cache.disk_cache.Append(uid, binary.data(), static_cast<u32>(binary.size()));
} }
INCSTAT(stats.numPixelShadersCreated); INCSTAT(stats.num_pixel_shaders_created);
INCSTAT(stats.numPixelShadersAlive); INCSTAT(stats.num_pixel_shaders_alive);
entry.shader = std::move(shader); entry.shader = std::move(shader);
} }
@ -500,8 +500,8 @@ const AbstractShader* ShaderCache::InsertPixelUberShader(const UberShader::Pixel
if (!binary.empty()) if (!binary.empty())
m_uber_ps_cache.disk_cache.Append(uid, binary.data(), static_cast<u32>(binary.size())); m_uber_ps_cache.disk_cache.Append(uid, binary.data(), static_cast<u32>(binary.size()));
} }
INCSTAT(stats.numPixelShadersCreated); INCSTAT(stats.num_pixel_shaders_created);
INCSTAT(stats.numPixelShadersAlive); INCSTAT(stats.num_pixel_shaders_alive);
entry.shader = std::move(shader); entry.shader = std::move(shader);
} }

View File

@ -14,15 +14,15 @@ Statistics stats;
void Statistics::ResetFrame() void Statistics::ResetFrame()
{ {
thisFrame = {}; this_frame = {};
} }
void Statistics::SwapDL() void Statistics::SwapDL()
{ {
std::swap(stats.thisFrame.numDLPrims, stats.thisFrame.numPrims); std::swap(stats.this_frame.num_dl_prims, stats.this_frame.num_prims);
std::swap(stats.thisFrame.numXFLoadsInDL, stats.thisFrame.numXFLoads); std::swap(stats.this_frame.num_xf_loads_in_dl, stats.this_frame.num_xf_loads);
std::swap(stats.thisFrame.numCPLoadsInDL, stats.thisFrame.numCPLoads); std::swap(stats.this_frame.num_cp_loads_in_dl, stats.this_frame.num_cp_loads);
std::swap(stats.thisFrame.numBPLoadsInDL, stats.thisFrame.numBPLoads); std::swap(stats.this_frame.num_bp_loads_in_dl, stats.this_frame.num_bp_loads);
} }
void Statistics::Display() void Statistics::Display()
@ -48,43 +48,43 @@ void Statistics::Display()
if (g_ActiveConfig.backend_info.api_type == APIType::Nothing) if (g_ActiveConfig.backend_info.api_type == APIType::Nothing)
{ {
draw_statistic("Objects", "%d", stats.thisFrame.numDrawnObjects); draw_statistic("Objects", "%d", stats.this_frame.num_drawn_objects);
draw_statistic("Vertices Loaded", "%d", stats.thisFrame.numVerticesLoaded); draw_statistic("Vertices Loaded", "%d", stats.this_frame.num_vertices_loaded);
draw_statistic("Triangles Input", "%d", stats.thisFrame.numTrianglesIn); draw_statistic("Triangles Input", "%d", stats.this_frame.num_triangles_in);
draw_statistic("Triangles Rejected", "%d", stats.thisFrame.numTrianglesRejected); draw_statistic("Triangles Rejected", "%d", stats.this_frame.num_triangles_rejected);
draw_statistic("Triangles Culled", "%d", stats.thisFrame.numTrianglesCulled); draw_statistic("Triangles Culled", "%d", stats.this_frame.num_triangles_culled);
draw_statistic("Triangles Clipped", "%d", stats.thisFrame.numTrianglesClipped); draw_statistic("Triangles Clipped", "%d", stats.this_frame.num_triangles_clipped);
draw_statistic("Triangles Drawn", "%d", stats.thisFrame.numTrianglesDrawn); draw_statistic("Triangles Drawn", "%d", stats.this_frame.num_triangles_drawn);
draw_statistic("Rasterized Pix", "%d", stats.thisFrame.rasterizedPixels); draw_statistic("Rasterized Pix", "%d", stats.this_frame.rasterized_pixels);
draw_statistic("TEV Pix In", "%d", stats.thisFrame.tevPixelsIn); draw_statistic("TEV Pix In", "%d", stats.this_frame.tev_pixels_in);
draw_statistic("TEV Pix Out", "%d", stats.thisFrame.tevPixelsOut); draw_statistic("TEV Pix Out", "%d", stats.this_frame.tev_pixels_out);
} }
draw_statistic("Textures created", "%d", stats.numTexturesCreated); draw_statistic("Textures created", "%d", stats.num_textures_created);
draw_statistic("Textures uploaded", "%d", stats.numTexturesUploaded); draw_statistic("Textures uploaded", "%d", stats.num_textures_uploaded);
draw_statistic("Textures alive", "%d", stats.numTexturesAlive); draw_statistic("Textures alive", "%d", stats.num_textures_alive);
draw_statistic("pshaders created", "%d", stats.numPixelShadersCreated); draw_statistic("pshaders created", "%d", stats.num_pixel_shaders_created);
draw_statistic("pshaders alive", "%d", stats.numPixelShadersAlive); draw_statistic("pshaders alive", "%d", stats.num_pixel_shaders_alive);
draw_statistic("vshaders created", "%d", stats.numVertexShadersCreated); draw_statistic("vshaders created", "%d", stats.num_vertex_shaders_created);
draw_statistic("vshaders alive", "%d", stats.numVertexShadersAlive); draw_statistic("vshaders alive", "%d", stats.num_vertex_shaders_alive);
draw_statistic("shaders changes", "%d", stats.thisFrame.numShaderChanges); draw_statistic("shaders changes", "%d", stats.this_frame.num_shader_changes);
draw_statistic("dlists called", "%d", stats.thisFrame.numDListsCalled); draw_statistic("dlists called", "%d", stats.this_frame.num_dlists_called);
draw_statistic("Primitive joins", "%d", stats.thisFrame.numPrimitiveJoins); draw_statistic("Primitive joins", "%d", stats.this_frame.num_primitive_joins);
draw_statistic("Draw calls", "%d", stats.thisFrame.numDrawCalls); draw_statistic("Draw calls", "%d", stats.this_frame.num_draw_calls);
draw_statistic("Primitives", "%d", stats.thisFrame.numPrims); draw_statistic("Primitives", "%d", stats.this_frame.num_prims);
draw_statistic("Primitives (DL)", "%d", stats.thisFrame.numDLPrims); draw_statistic("Primitives (DL)", "%d", stats.this_frame.num_dl_prims);
draw_statistic("XF loads", "%d", stats.thisFrame.numXFLoads); draw_statistic("XF loads", "%d", stats.this_frame.num_xf_loads);
draw_statistic("XF loads (DL)", "%d", stats.thisFrame.numXFLoadsInDL); draw_statistic("XF loads (DL)", "%d", stats.this_frame.num_xf_loads_in_dl);
draw_statistic("CP loads", "%d", stats.thisFrame.numCPLoads); draw_statistic("CP loads", "%d", stats.this_frame.num_cp_loads);
draw_statistic("CP loads (DL)", "%d", stats.thisFrame.numCPLoadsInDL); draw_statistic("CP loads (DL)", "%d", stats.this_frame.num_cp_loads_in_dl);
draw_statistic("BP loads", "%d", stats.thisFrame.numBPLoads); draw_statistic("BP loads", "%d", stats.this_frame.num_bp_loads);
draw_statistic("BP loads (DL)", "%d", stats.thisFrame.numBPLoadsInDL); draw_statistic("BP loads (DL)", "%d", stats.this_frame.num_bp_loads_in_dl);
draw_statistic("Vertex streamed", "%i kB", stats.thisFrame.bytesVertexStreamed / 1024); draw_statistic("Vertex streamed", "%i kB", stats.this_frame.bytes_vertex_streamed / 1024);
draw_statistic("Index streamed", "%i kB", stats.thisFrame.bytesIndexStreamed / 1024); draw_statistic("Index streamed", "%i kB", stats.this_frame.bytes_index_streamed / 1024);
draw_statistic("Uniform streamed", "%i kB", stats.thisFrame.bytesUniformStreamed / 1024); draw_statistic("Uniform streamed", "%i kB", stats.this_frame.bytes_uniform_streamed / 1024);
draw_statistic("Vertex Loaders", "%d", stats.numVertexLoaders); draw_statistic("Vertex Loaders", "%d", stats.num_vertex_loaders);
draw_statistic("EFB peeks:", "%d", stats.thisFrame.numEFBPeeks); draw_statistic("EFB peeks:", "%d", stats.this_frame.num_efb_peeks);
draw_statistic("EFB pokes:", "%d", stats.thisFrame.numEFBPokes); draw_statistic("EFB pokes:", "%d", stats.this_frame.num_efb_pokes);
ImGui::Columns(1); ImGui::Columns(1);

View File

@ -8,16 +8,16 @@
struct Statistics struct Statistics
{ {
int numPixelShadersCreated; int num_pixel_shaders_created;
int numPixelShadersAlive; int num_pixel_shaders_alive;
int numVertexShadersCreated; int num_vertex_shaders_created;
int numVertexShadersAlive; int num_vertex_shaders_alive;
int numTexturesCreated; int num_textures_created;
int numTexturesUploaded; int num_textures_uploaded;
int numTexturesAlive; int num_textures_alive;
int numVertexLoaders; int num_vertex_loaders;
std::array<float, 6> proj; std::array<float, 6> proj;
std::array<float, 16> gproj; std::array<float, 16> gproj;
@ -25,42 +25,42 @@ struct Statistics
struct ThisFrame struct ThisFrame
{ {
int numBPLoads; int num_bp_loads;
int numCPLoads; int num_cp_loads;
int numXFLoads; int num_xf_loads;
int numBPLoadsInDL; int num_bp_loads_in_dl;
int numCPLoadsInDL; int num_cp_loads_in_dl;
int numXFLoadsInDL; int num_xf_loads_in_dl;
int numPrims; int num_prims;
int numDLPrims; int num_dl_prims;
int numShaderChanges; int num_shader_changes;
int numPrimitiveJoins; int num_primitive_joins;
int numDrawCalls; int num_draw_calls;
int numDListsCalled; int num_dlists_called;
int bytesVertexStreamed; int bytes_vertex_streamed;
int bytesIndexStreamed; int bytes_index_streamed;
int bytesUniformStreamed; int bytes_uniform_streamed;
int numTrianglesClipped; int num_triangles_clipped;
int numTrianglesIn; int num_triangles_in;
int numTrianglesRejected; int num_triangles_rejected;
int numTrianglesCulled; int num_triangles_culled;
int numDrawnObjects; int num_drawn_objects;
int rasterizedPixels; int rasterized_pixels;
int numTrianglesDrawn; int num_triangles_drawn;
int numVerticesLoaded; int num_vertices_loaded;
int tevPixelsIn; int tev_pixels_in;
int tevPixelsOut; int tev_pixels_out;
int numEFBPeeks; int num_efb_peeks;
int numEFBPokes; int num_efb_pokes;
}; };
ThisFrame thisFrame; ThisFrame this_frame;
void ResetFrame(); void ResetFrame();
static void SwapDL(); static void SwapDL();
static void Display(); static void Display();

View File

@ -1200,8 +1200,8 @@ TextureCacheBase::GetTexture(u32 address, u32 width, u32 height, const TextureFo
} }
} }
INCSTAT(stats.numTexturesUploaded); INCSTAT(stats.num_textures_uploaded);
SETSTAT(stats.numTexturesAlive, textures_by_address.size()); SETSTAT(stats.num_textures_alive, static_cast<int>(textures_by_address.size()));
entry = DoPartialTextureUpdates(iter->second, &texMem[tlutaddr], tlutfmt); entry = DoPartialTextureUpdates(iter->second, &texMem[tlutaddr], tlutfmt);
@ -1277,8 +1277,8 @@ TextureCacheBase::GetXFBTexture(u32 address, u32 width, u32 height, u32 stride,
// Insert into the texture cache so we can re-use it next frame, if needed. // Insert into the texture cache so we can re-use it next frame, if needed.
textures_by_address.emplace(entry->addr, entry); textures_by_address.emplace(entry->addr, entry);
SETSTAT(stats.numTexturesAlive, textures_by_address.size()); SETSTAT(stats.num_textures_alive, static_cast<int>(textures_by_address.size()));
INCSTAT(stats.numTexturesUploaded); INCSTAT(stats.num_textures_uploaded);
if (g_ActiveConfig.bDumpXFBTarget) if (g_ActiveConfig.bDumpXFBTarget)
{ {
@ -2017,7 +2017,7 @@ TextureCacheBase::AllocateTexture(const TextureConfig& config)
} }
} }
INCSTAT(stats.numTexturesCreated); INCSTAT(stats.num_textures_created);
return TexPoolEntry(std::move(texture), std::move(framebuffer)); return TexPoolEntry(std::move(texture), std::move(framebuffer));
} }

View File

@ -54,7 +54,7 @@ void Init()
map_entry = nullptr; map_entry = nullptr;
for (auto& map_entry : g_preprocess_cp_state.vertex_loaders) for (auto& map_entry : g_preprocess_cp_state.vertex_loaders)
map_entry = nullptr; map_entry = nullptr;
SETSTAT(stats.numVertexLoaders, 0); SETSTAT(stats.num_vertex_loaders, 0);
} }
void Clear() void Clear()
@ -223,7 +223,7 @@ static VertexLoaderBase* RefreshLoader(int vtx_attr_group, bool preprocess = fal
s_vertex_loader_map[uid] = s_vertex_loader_map[uid] =
VertexLoaderBase::CreateVertexLoader(state->vtx_desc, state->vtx_attr[vtx_attr_group]); VertexLoaderBase::CreateVertexLoader(state->vtx_desc, state->vtx_attr[vtx_attr_group]);
loader = s_vertex_loader_map[uid].get(); loader = s_vertex_loader_map[uid].get();
INCSTAT(stats.numVertexLoaders); INCSTAT(stats.num_vertex_loaders);
} }
if (check_for_native_format) if (check_for_native_format)
{ {
@ -287,8 +287,8 @@ int RunVertices(int vtx_attr_group, int primitive, int count, DataReader src, bo
g_vertex_manager->FlushData(count, loader->m_native_vtx_decl.stride); g_vertex_manager->FlushData(count, loader->m_native_vtx_decl.stride);
ADDSTAT(stats.thisFrame.numPrims, count); ADDSTAT(stats.this_frame.num_prims, count);
INCSTAT(stats.thisFrame.numPrimitiveJoins); INCSTAT(stats.this_frame.num_primitive_joins);
return size; return size;
} }

View File

@ -442,7 +442,7 @@ void VertexManagerBase::Flush()
g_perf_query->EnableQuery(bpmem.zcontrol.early_ztest ? PQG_ZCOMP_ZCOMPLOC : PQG_ZCOMP); g_perf_query->EnableQuery(bpmem.zcontrol.early_ztest ? PQG_ZCOMP_ZCOMPLOC : PQG_ZCOMP);
DrawCurrentBatch(base_index, num_indices, base_vertex); DrawCurrentBatch(base_index, num_indices, base_vertex);
INCSTAT(stats.thisFrame.numDrawCalls); INCSTAT(stats.this_frame.num_draw_calls);
if (PerfQueryBase::ShouldEmulate()) if (PerfQueryBase::ShouldEmulate())
g_perf_query->DisableQuery(bpmem.zcontrol.early_ztest ? PQG_ZCOMP_ZCOMPLOC : PQG_ZCOMP); g_perf_query->DisableQuery(bpmem.zcontrol.early_ztest ? PQG_ZCOMP_ZCOMPLOC : PQG_ZCOMP);