SoftGPU: Don't count a block ending at the stride as reaching the next row

PendingWriteIn took a block that ends exactly at the stride for one running into the next row.
Ridge Racer keeps its CLUTs in the framebuffer's stride gap (the last 64 bytes of 1024-byte rows,
past the 960 drawn), so every CLUT load flushed all queued drawing. Ridge Racer 8% faster.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-09 12:27:45 +02:00
1 parent 284934ff23
commit 60be0cde40
1 file changed
+2 -2
+2 -2
View File
@@ -932,8 +932,8 @@ bool BinManager::PendingWriteIn(const BinDirtyRange &range, uint32_t start, uint
int32_t rangeY = offset / (int32_t)range.strideBytes;
uint32_t rangeX = offset % (int32_t)range.strideBytes;
if (rangeY >= 0 && (uint32_t)rangeY < range.height) {
// If this row is either within width, or extends beyond stride, overlap.
if (rangeX < range.widthBytes || rangeX + w >= range.strideBytes)
// If this row is either within width, or extends beyond stride (into the next row), overlap.
if (rangeX < range.widthBytes || rangeX + w > range.strideBytes)
return true;
}