gpu: GP0(02h) fill ignores the low 4 bits of X and rounds the width up to 16

This commit is contained in:
Rix
2026-10-10 04:17:36 -07:00
parent 3253fa54c7
commit c5739b5880
+4
View File
@@ -779,6 +779,10 @@ void PCSX::GPU::FastFill::processWrite(Buffer &buf, Logged::Origin origin, uint3
raw.y = y;
raw.w = w;
raw.h = h;
// GP0(02h) parameter masking (psx-spx): Xpos ignores its low 4 bits,
// Xsiz rounds up to the next multiple of 16 within 0..400h.
x &= 0x3f0;
w = ((w & 0x3ff) + 0xf) & ~0xf;
clipped = GPU::clip(x, y, w, h);
m_state = READ_COLOR;
m_gpu->m_defaultProcessor.setActive();