From 904ed4b78560d12bc26c4459d3d200cbae899979 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Thu, 2 Apr 2026 11:06:28 +0200 Subject: [PATCH] Jit64: Use dcbz slow path with accurate dcache Jit64::dcbz's fast path bypasses the dcache, so we shouldn't use it if accurate dcache is turned on. This fixes the graphical corruption that would occur in Mario Kart Wii's menu FMVs with accurate dcache. JitArm64 never had this problem, because it implements dcbz in a different way. It calls EmitBackpatchRoutine, which already has a check for accurate dcache. --- Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp index b4a3b4ef43..eae7eee207 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp @@ -448,7 +448,8 @@ void Jit64::dcbz(UGeckoInstruction inst) end_dcbz_hack = J_CC(CC_L); } - bool emit_fast_path = (m_ppc_state.feature_flags & FEATURE_FLAG_MSR_DR) && m_jit.jo.fastmem_arena; + bool emit_fast_path = (m_ppc_state.feature_flags & FEATURE_FLAG_MSR_DR) && + m_jit.jo.fastmem_arena && !m_accurate_cpu_cache_enabled; if (emit_fast_path) {