From fd656c629daeb5095fb87000d7a5995250dc1e62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 30 Jul 2023 17:45:19 +0200 Subject: [PATCH] More dirtying --- GPU/GPUState.cpp | 7 +++++++ GPU/Software/SoftGpu.cpp | 3 +++ 2 files changed, 10 insertions(+) diff --git a/GPU/GPUState.cpp b/GPU/GPUState.cpp index 28c13b871a..c5f9882202 100644 --- a/GPU/GPUState.cpp +++ b/GPU/GPUState.cpp @@ -128,6 +128,8 @@ void GPUgstate::Reset() { memset(gstate.boneMatrix, 0, sizeof(gstate.boneMatrix)); savedContextVersion = 1; + + gstate_c.Dirty(DIRTY_CULL_PLANES); } void GPUgstate::Save(u32_le *ptr) { @@ -258,6 +260,8 @@ void GPUgstate::Restore(const u32_le *ptr) { if (gpu) gpu->ResetMatrices(); + + gstate_c.Dirty(DIRTY_CULL_PLANES); } bool vertTypeIsSkinningEnabled(u32 vertType) { @@ -366,6 +370,9 @@ void GPUStateCache::DoState(PointerWrap &p) { } else { Do(p, savedContextVersion); } + + if (p.GetMode() == PointerWrap::MODE_READ) + gstate_c.Dirty(DIRTY_CULL_PLANES); } static const char *const gpuUseFlagNames[32] = { diff --git a/GPU/Software/SoftGpu.cpp b/GPU/Software/SoftGpu.cpp index 5f708a2df0..c02b0ed9f9 100644 --- a/GPU/Software/SoftGpu.cpp +++ b/GPU/Software/SoftGpu.cpp @@ -1081,6 +1081,7 @@ void SoftGPU::Execute_WorldMtxData(u32 op, u32 diff) { if (newVal != *target) { *target = newVal; dirtyFlags_ |= SoftDirty::TRANSFORM_MATRIX; + gstate_c.Dirty(DIRTY_CULL_PLANES); } } @@ -1101,6 +1102,7 @@ void SoftGPU::Execute_ViewMtxData(u32 op, u32 diff) { if (newVal != *target) { *target = newVal; dirtyFlags_ |= SoftDirty::TRANSFORM_MATRIX; + gstate_c.Dirty(DIRTY_CULL_PLANES); } } @@ -1121,6 +1123,7 @@ void SoftGPU::Execute_ProjMtxData(u32 op, u32 diff) { if (newVal != *target) { *target = newVal; dirtyFlags_ |= SoftDirty::TRANSFORM_MATRIX; + gstate_c.Dirty(DIRTY_CULL_PLANES); } }