From ee997d13537dd7c354ae8ca3c128087687918539 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 1 Jan 2023 20:35:04 +0100 Subject: [PATCH] Account for the GPU cycle cost of loading bone matrices. This could change timing slightly in games that use many of these, like maybe God of War for example. We should probably get it in for 1.15 and just handle any fallout. --- GPU/GPUCommon.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index e8b81492a8..b27b0f15ef 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -2762,6 +2762,13 @@ void GPUCommon::FastLoadBoneMatrix(u32 target) { gstate_c.deferredVertTypeDirty |= uniformsToDirty; } gstate.FastLoadBoneMatrix(target); + + cyclesExecuted += 2 * 14; // one to reset the counter, 12 to load the matrix, and a return. + + if (coreCollectDebugStats) { + gpuStats.otherGPUCycles += 2 * 14; + gpuStats.gpuCommandsAtCallLevel[std::min(currentList->stackptr, 3)] += 14; + } } struct DisplayList_v1 {