From: notaz Date: Fri, 14 Mar 2025 22:09:48 +0000 (+0200) Subject: gpulib: avoid forced clears on state load X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60e4e7d4dcc495d2c677161b0de439c063674419;p=pcsx_rearmed.git gpulib: avoid forced clears on state load forcing reg writes caused full fb clears each frame on run-ahead --- diff --git a/plugins/gpulib/gpu.c b/plugins/gpulib/gpu.c index 8c1b8e85..40682b30 100644 --- a/plugins/gpulib/gpu.c +++ b/plugins/gpulib/gpu.c @@ -921,14 +921,12 @@ long GPUfreeze(uint32_t type, GPUFreeze_t *freeze) case 0: // load renderer_sync(); memcpy(gpu.vram, freeze->psxVRam, 1024 * 512 * 2); - memcpy(gpu.regs, freeze->ulControl, sizeof(gpu.regs)); + //memcpy(gpu.regs, freeze->ulControl, sizeof(gpu.regs)); memcpy(gpu.ex_regs, freeze->ulControl + 0xe0, sizeof(gpu.ex_regs)); gpu.status = freeze->ulStatus; gpu.cmd_len = 0; - for (i = 8; i > 0; i--) { - gpu.regs[i] ^= 1; // avoid reg change detection - GPUwriteStatus((i << 24) | (gpu.regs[i] ^ 1)); - } + for (i = 8; i > 1; i--) + GPUwriteStatus((i << 24) | freeze->ulControl[i]); renderer_sync_ecmds(gpu.ex_regs); renderer_update_caches(0, 0, 1024, 512, 0); break;