GPU debug stats: Show how many bytes of texture data we hash per frame

This commit is contained in:
Henrik Rydgård 2020-09-20 22:03:08 +02:00
parent f288e64679
commit 277333682f
2 changed files with 13 additions and 11 deletions

View File

@ -313,6 +313,8 @@ protected:
const u32 sizeInRAM = (textureBitsPerPixel[format] * bufw * h) / 8;
const u32 *checkp = (const u32 *)Memory::GetPointer(addr);
gpuStats.numTextureDataBytesHashed += sizeInRAM;
if (Memory::IsValidAddress(addr + sizeInRAM)) {
return DoQuickTexHash(checkp, sizeInRAM);
} else {

View File

@ -2881,23 +2881,20 @@ size_t GPUCommon::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\n"
"Draw calls: %i, flushes %i, clears %i (cached: %d)\n"
"Num Tracked Vertex Arrays: %i\n"
"GPU cycles executed: %d (%f per vertex)\n"
"Draw calls: %d, flushes %d, clears %d (cached: %d)\n"
"Num Tracked Vertex Arrays: %d\n"
"Commands per call level: %i %i %i %i\n"
"Vertices submitted: %i\n"
"Cached, Uncached Vertices Drawn: %i, %i\n"
"FBOs active: %i (evaluations: %d)\n"
"Textures active: %i, decoded: %i invalidated: %i\n"
"Readbacks: %d, uploads: %d\n",
"Vertices: %d cached: %d uncached: %d\n"
"FBOs active: %d (evaluations: %d)\n"
"Textures: %d, dec: %d, invalidated: %d, hashed: %d kB\n"
"Readbacks: %d, uploads: %d\n"
"GPU cycles executed: %d (%f per vertex)\n",
gpuStats.msProcessingDisplayLists * 1000.0f,
gpuStats.numDrawCalls,
gpuStats.numFlushes,
gpuStats.numClears,
gpuStats.numCachedDrawCalls,
gpuStats.numTrackedVertexArrays,
gpuStats.vertexGPUCycles + gpuStats.otherGPUCycles,
vertexAverageCycles,
gpuStats.gpuCommandsAtCallLevel[0], gpuStats.gpuCommandsAtCallLevel[1], gpuStats.gpuCommandsAtCallLevel[2], gpuStats.gpuCommandsAtCallLevel[3],
gpuStats.numVertsSubmitted,
gpuStats.numCachedVertsDrawn,
@ -2907,7 +2904,10 @@ size_t GPUCommon::FormatGPUStatsCommon(char *buffer, size_t size) {
(int)textureCache_->NumLoadedTextures(),
gpuStats.numTexturesDecoded,
gpuStats.numTextureInvalidations,
gpuStats.numTextureDataBytesHashed / 1024,
gpuStats.numReadbacks,
gpuStats.numUploads
gpuStats.numUploads,
gpuStats.vertexGPUCycles + gpuStats.otherGPUCycles,
vertexAverageCycles
);
}