From cd5cf87120f172d762f37a1fbf7258305836eade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 18 Aug 2026 14:31:13 +0200 Subject: [PATCH] Fix performance bug in IRJit when using rewind states --- Core/MIPS/IR/IRFrontend.cpp | 4 +++- GPU/ge_constants.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Core/MIPS/IR/IRFrontend.cpp b/Core/MIPS/IR/IRFrontend.cpp index bfd334ca88..4f14d4aa60 100644 --- a/Core/MIPS/IR/IRFrontend.cpp +++ b/Core/MIPS/IR/IRFrontend.cpp @@ -51,7 +51,9 @@ void IRFrontend::DoState(PointerWrap &p) { Do(p, js.startDefaultPrefix); if (s >= 2) { Do(p, js.hasSetRounding); - js.lastSetRounding = 0; + if (p.mode == p.MODE_READ) { + js.lastSetRounding = 0; + } } else { js.hasSetRounding = 1; } diff --git a/GPU/ge_constants.h b/GPU/ge_constants.h index c065bb5a99..779faa6e81 100644 --- a/GPU/ge_constants.h +++ b/GPU/ge_constants.h @@ -336,7 +336,7 @@ enum GEVertexType : uint32_t { }; #define GE_CLEARMODE_COLOR (1<<8) -#define GE_CLEARMODE_ALPHA (1<<9) //or stencil? +#define GE_CLEARMODE_ALPHA (1<<9) // and stencil #define GE_CLEARMODE_Z (1<<10) #define GE_CLEARMODE_ALL (GE_CLEARMODE_COLOR|GE_CLEARMODE_ALPHA|GE_CLEARMODE_Z)