Improve and clean up GPU stats

This commit is contained in:
Henrik Rydgård committed 2026-07-16 15:03:20 +02:00
1 parent ea95eb420d
commit 31b21d6bef
3 files changed
+23 -18

No files matched your search

+1
View File
@@ -320,6 +320,7 @@ static bool __GeTriggerWait(WaitType waitType, SceUID waitId, WaitingThreadList
wokeThreads |= HLEKernel::ResumeFromWait(threadID, waitType, waitId, 0);
waitingThreads.clear();
gstate_c.textureSyncTimeDomain++;
gpuStats.perFrame.numGEInterrupts++;
return wokeThreads;
}
+1
View File
@@ -95,6 +95,7 @@ struct GPUStatsPerFrame {
int numUpdateStall;
int numDrawSyncs;
int numListSyncs;
int numGEInterrupts;
int numDrawCalls;
int numVertexDecodes;
int numCulledDraws;
+21 -18
View File
@@ -1721,23 +1721,17 @@ int GPUCommonHW::ListSync(int listid, int mode) {
void GPUCommonHW::FormatGPUStatsCommon(StringWriter &w) {
float vertexAverageCycles = gpuStats.perFrame.numVertsSubmitted > 0 ? (float)gpuStats.perFrame.vertexGPUCycles / (float)gpuStats.perFrame.numVertsSubmitted : 0.0f;
w.F(
"DL processing time: %0.2f ms\n"
"%d enqueue, %d updatestall, %d drawsync, %d listsync\n"
"Draw: %d (%d dec, %d culled), flushes %d, clears %d, bbox jumps %d\n"
"%d soft. Vertices: %d dec: %d drawn: %d clipped tris: %d\n"
"FBOs active: %d (evaluations: %d, created %d)\n"
"Textures: %d (s: %d), dec: %d, invalidated: %d, changed %d, hashed: %d kB, clut %d\n"
"readbacks %d (%d non-block), upload %d (cached %d), depal %d\n"
"block transfers: %d\n"
"replacer: tracks %d references, %d unique textures\n"
"Cpy: depth %d, color %d, reint %d, blend %d, self %d\n"
"GPU cycles: %d (%0.1f per vertex)\n",
gpuStats.perFrame.msProcessingDisplayLists * 1000.0f,
w.F("DL processing time: %0.2f ms\n", gpuStats.perFrame.msProcessingDisplayLists * 1000.0f);
w.F("%d enqueue, %d updstall, %d drawsync, %d listsync, %d geint (td: %d)\n",
gpuStats.perFrame.numEnqueue,
gpuStats.perFrame.numUpdateStall,
gpuStats.perFrame.numDrawSyncs,
gpuStats.perFrame.numListSyncs,
gpuStats.perFrame.numGEInterrupts,
gstate_c.textureSyncTimeDomain);
w.F("Draw: %d (%d dec, %d culled), flushes %d, clears %d, bbox jumps %d\n"
"%d soft. Vertices: %d dec: %d drawn: %d clipped tris: %d\n"
"GPU cycles: %d (%0.1f per vertex)\n",
gpuStats.perFrame.numDrawCalls,
gpuStats.perFrame.numVertexDecodes,
gpuStats.perFrame.numCulledDraws,
@@ -1749,6 +1743,13 @@ void GPUCommonHW::FormatGPUStatsCommon(StringWriter &w) {
gpuStats.perFrame.numVertsDecoded,
gpuStats.perFrame.numVertsDrawn,
gpuStats.perFrame.numSoftClippedTriangles,
gpuStats.perFrame.vertexGPUCycles + gpuStats.perFrame.otherGPUCycles,
vertexAverageCycles);
w.F("FBOs active: %d (evaluations: %d, created %d)\n"
"Textures: %d (s: %d), dec: %d, invalidated: %d, changed %d, hashed: %d kB, clut %d\n"
"readbacks %d (%d non-block), upload %d (cached %d), depal %d\n"
"block transfers: %d\n"
"Cpy: depth %d, color %d, reint %d, blend %d, self %d\n",
(int)framebufferManager_->NumVFBs(),
gpuStats.perFrame.numFramebufferEvaluations,
gpuStats.perFrame.numFBOsCreated,
@@ -1765,15 +1766,17 @@ void GPUCommonHW::FormatGPUStatsCommon(StringWriter &w) {
gpuStats.perFrame.numCachedUploads,
gpuStats.perFrame.numDepal,
gpuStats.perFrame.numBlockTransfers,
gpuStats.perFrame.numReplacerTrackedTex,
gpuStats.perFrame.numCachedReplacedTextures,
gpuStats.perFrame.numDepthCopies,
gpuStats.perFrame.numColorCopies,
gpuStats.perFrame.numReinterpretCopies,
gpuStats.perFrame.numCopiesForShaderBlend,
gpuStats.perFrame.numCopiesForSelfTex,
gpuStats.perFrame.vertexGPUCycles + gpuStats.perFrame.otherGPUCycles,
vertexAverageCycles);
gpuStats.perFrame.numCopiesForSelfTex);
if (gpuStats.perFrame.numReplacerTrackedTex) {
w.F("replacer: tracks %d references, %d unique textures\n",
gpuStats.perFrame.numReplacerTrackedTex,
gpuStats.perFrame.numCachedReplacedTextures);
}
if (PSP_CoreParameter().compat.flags().SoftwareRasterDepth) {
w.F("Z-rast: %0.2f+%0.2f+%0.2f (total %0.2f/%0.2f) ms\n"