mirror of https://github.com/PCSX2/pcsx2.git
GS: Support wrapping off-the-end offsets in GSOffset
This commit is contained in:
parent
074ffacf9d
commit
283dcaffe2
|
@ -320,9 +320,9 @@ constexpr GSSizedPixelRowOffsetTable<BlocksWide * ColWidth> makeRowOffsetTable(c
|
|||
{
|
||||
int base = pxOffset(blockTable, colTable, 0, y);
|
||||
GSSizedPixelRowOffsetTable<BlocksWide * ColWidth> table = {};
|
||||
for (int x = 0; x < 2048; x++)
|
||||
for (size_t x = 0; x < std::size(table.value); x++)
|
||||
{
|
||||
table.value[x] = pxOffset(blockTable, colTable, x, y) - base;
|
||||
table.value[x] = pxOffset(blockTable, colTable, x % 2048, y) - base;
|
||||
}
|
||||
return table;
|
||||
}
|
||||
|
|
|
@ -50,11 +50,11 @@ struct alignas(128) GSPixelColOffsetTable
|
|||
/// Unlike ColOffsets, this table stretches to the maximum size of a texture so no masking is needed
|
||||
struct alignas(128) GSPixelRowOffsetTable
|
||||
{
|
||||
int value[2048] = {};
|
||||
int value[4096] = {};
|
||||
|
||||
int operator[](size_t x) const
|
||||
{
|
||||
ASSERT(x < 2048);
|
||||
ASSERT(x < 4096);
|
||||
return value[x];
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue