Count listsyncs and drawsyncs in gpu stats. Eat some cycles in listSync

Chose a conservative number (same as sceGeContinue)
This commit is contained in:
Henrik Rydgård committed 2023-02-08 00:41:26 +01:00
1 parent d1e0061dcd
commit 9827dd536c
3 files changed
+12 -1

No files matched your search

+1
View File
@@ -383,6 +383,7 @@ static int sceGeListUpdateStallAddr(u32 displayListID, u32 stallAddress) {
// 0 : wait for completion. 1:check and return
int sceGeListSync(u32 displayListID, u32 mode) {
DEBUG_LOG(SCEGE, "sceGeListSync(dlid=%08x, mode=%08x)", displayListID, mode);
hleEatCycles(220); // Fudged without measuring, copying sceGeContinue.
return gpu->ListSync(LIST_ID_MAGIC ^ displayListID, mode);
}
+4
View File
@@ -74,6 +74,8 @@ struct GPUStatistics {
void ResetFrame() {
numDrawCalls = 0;
numDrawSyncs = 0;
numListSyncs = 0;
numCachedDrawCalls = 0;
numVertsSubmitted = 0;
numCachedVertsDrawn = 0;
@@ -104,6 +106,8 @@ struct GPUStatistics {
// Per frame statistics
int numDrawCalls;
int numDrawSyncs;
int numListSyncs;
int numCachedDrawCalls;
int numFlushes;
int numVertsSubmitted;
+7 -1
View File
@@ -675,6 +675,8 @@ void GPUCommon::DumpNextFrame() {
}
u32 GPUCommon::DrawSync(int mode) {
gpuStats.numDrawSyncs++;
if (mode < 0 || mode > 1)
return SCE_KERNEL_ERROR_INVALID_MODE;
@@ -723,6 +725,8 @@ void GPUCommon::CheckDrawSync() {
}
int GPUCommon::ListSync(int listid, int mode) {
gpuStats.numListSyncs++;
if (listid < 0 || listid >= DisplayListMaxCount)
return SCE_KERNEL_ERROR_INVALID_ID;
@@ -3461,7 +3465,7 @@ void GPUCommon::UpdateUVScaleOffset() {
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"
"DL processing time: %0.2f ms, %d drawsync, %d listsync\n"
"Draw calls: %d, flushes %d, clears %d (cached: %d)\n"
"Num Tracked Vertex Arrays: %d\n"
"Vertices: %d cached: %d uncached: %d\n"
@@ -3471,6 +3475,8 @@ size_t GPUCommon::FormatGPUStatsCommon(char *buffer, size_t size) {
"Copies: depth %d, color %d, reint %d, blend %d, selftex %d\n"
"GPU cycles executed: %d (%f per vertex)\n",
gpuStats.msProcessingDisplayLists * 1000.0f,
gpuStats.numDrawSyncs,
gpuStats.numListSyncs,
gpuStats.numDrawCalls,
gpuStats.numFlushes,
gpuStats.numClears,