Merge pull request #13498 from jordan-woyak/immxfb-dualcore-todo

BPStructs: Add TODO for unsafe usage of GetTicks.
This commit is contained in:
JMC47 2025-04-09 23:20:35 -04:00 committed by GitHub
commit fc0179c1ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -357,8 +357,13 @@ static void BPWritten(PixelShaderManager& pixel_shader_manager, XFStateManager&
auto& system = Core::System::GetInstance();
if (g_ActiveConfig.bImmediateXFB)
{
// TODO: GetTicks is not sane from the GPU thread.
// This value is currently used for frame dumping and the custom shader "time_ms" value.
// Frame dumping has more calls that aren't sane from the GPU thread.
// i.e. Frame dumping is not sane in "Dual Core" mode in general.
const u64 ticks = system.GetCoreTiming().GetTicks();
// below div two to convert from bytes to pixels - it expects width, not stride
u64 ticks = system.GetCoreTiming().GetTicks();
g_presenter->ImmediateSwap(destAddr, destStride / 2, destStride, height, ticks);
}
else