From fd73522efcf35c9ec87875ee6fdd69b3ac74a867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 3 Dec 2023 19:21:55 +0100 Subject: [PATCH] Changing UV scale/offset requires us to stop "extending" prims This is because we currently can't change these scales mid-decode, so we need to break up the collection there. Note that this still won't cause a full flush, just that the new extra-efficient tristrip merging can't go through these commands. --- GPU/GPUCommonHW.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/GPU/GPUCommonHW.cpp b/GPU/GPUCommonHW.cpp index 7916a8966694..08da763bfda9 100644 --- a/GPU/GPUCommonHW.cpp +++ b/GPU/GPUCommonHW.cpp @@ -1108,20 +1108,27 @@ void GPUCommonHW::Execute_Prim(u32 op, u32 diff) { gstate.cmdmem[GE_CMD_BONEMATRIXNUMBER] = data; break; case GE_CMD_TEXSCALEU: + // We don't "dirty-check" - we could avoid getFloat24 and setting canExtend=false, but usually + // when texscale commands are in line with the prims like this, they actually have an effect + // and requires us to stop extending strips anyway. gstate.cmdmem[GE_CMD_TEXSCALEU] = data; gstate_c.uv.uScale = getFloat24(data); + canExtend = false; break; case GE_CMD_TEXSCALEV: gstate.cmdmem[GE_CMD_TEXSCALEV] = data; gstate_c.uv.vScale = getFloat24(data); + canExtend = false; break; case GE_CMD_TEXOFFSETU: gstate.cmdmem[GE_CMD_TEXOFFSETU] = data; gstate_c.uv.uOff = getFloat24(data); + canExtend = false; break; case GE_CMD_TEXOFFSETV: gstate.cmdmem[GE_CMD_TEXOFFSETV] = data; gstate_c.uv.vOff = getFloat24(data); + canExtend = false; break; case GE_CMD_TEXLEVEL: // Same Gran Turismo hack from Execute_TexLevel