Add a new stat, so we can see per game if the optimization has an effect

This commit is contained in:
Henrik Rydgård 2023-10-02 17:28:25 +02:00
parent 1c49d5718c
commit e63bb0459c
6 changed files with 8 additions and 1 deletions

View file

@ -727,6 +727,7 @@ rotateVBO:
gpuStats.numFlushes++;
gpuStats.numDrawCalls += numDrawInds_;
gpuStats.numVertexDecodes += numDrawVerts_;
gpuStats.numVertsSubmitted += vertexCountInDrawCalls_;
indexGen.Reset();

View file

@ -668,6 +668,7 @@ rotateVBO:
gpuStats.numFlushes++;
gpuStats.numDrawCalls += numDrawInds_;
gpuStats.numVertexDecodes += numDrawVerts_;
gpuStats.numVertsSubmitted += vertexCountInDrawCalls_;
// TODO: The below should be shared.

View file

@ -475,6 +475,7 @@ void DrawEngineGLES::DoFlush() {
bail:
gpuStats.numFlushes++;
gpuStats.numDrawCalls += numDrawInds_;
gpuStats.numVertexDecodes += numDrawVerts_;
gpuStats.numVertsSubmitted += vertexCountInDrawCalls_;
// TODO: When the next flush has the same vertex format, we can continue with the same offset in the vertex buffer,

View file

@ -75,6 +75,7 @@ struct GPUStatistics {
void ResetFrame() {
numDrawCalls = 0;
numVertexDecodes = 0;
numDrawSyncs = 0;
numListSyncs = 0;
numCachedDrawCalls = 0;
@ -111,6 +112,7 @@ struct GPUStatistics {
// Per frame statistics
int numDrawCalls;
int numVertexDecodes;
int numDrawSyncs;
int numListSyncs;
int numCachedDrawCalls;

View file

@ -1647,7 +1647,7 @@ size_t GPUCommonHW::FormatGPUStatsCommon(char *buffer, size_t size) {
float vertexAverageCycles = gpuStats.numVertsSubmitted > 0 ? (float)gpuStats.vertexGPUCycles / (float)gpuStats.numVertsSubmitted : 0.0f;
return snprintf(buffer, size,
"DL processing time: %0.2f ms, %d drawsync, %d listsync\n"
"Draw calls: %d, flushes %d, clears %d, bbox jumps %d (%d updates)\n"
"Draw: %d (%d dec), flushes %d, clears %d, bbox jumps %d (%d updates)\n"
"Cached draws: %d (tracked: %d)\n"
"Vertices: %d cached: %d uncached: %d\n"
"FBOs active: %d (evaluations: %d)\n"
@ -1660,6 +1660,7 @@ size_t GPUCommonHW::FormatGPUStatsCommon(char *buffer, size_t size) {
gpuStats.numDrawSyncs,
gpuStats.numListSyncs,
gpuStats.numDrawCalls,
gpuStats.numVertexDecodes,
gpuStats.numFlushes,
gpuStats.numClears,
gpuStats.numBBOXJumps,

View file

@ -1016,6 +1016,7 @@ void DrawEngineVulkan::DoFlush() {
gpuStats.numFlushes++;
gpuStats.numDrawCalls += numDrawInds_;
gpuStats.numVertexDecodes += numDrawVerts_;
gpuStats.numVertsSubmitted += vertexCountInDrawCalls_;
indexGen.Reset();