rasterizer_cache: Handle texture swizzle case with unaligned offsets in same tile. (#23)
This commit is contained in:
@ -308,6 +308,8 @@ static constexpr void MortonCopy(u32 width, u32 height, u32 start_offset, u32 en
|
||||
LinearNextTile();
|
||||
}
|
||||
|
||||
// If the copy spans multiple tiles, copy the fully aligned tiles in between.
|
||||
if (aligned_start_offset < aligned_end_offset) {
|
||||
const u32 buffer_end = tiled_offset + aligned_end_offset - aligned_start_offset;
|
||||
while (tiled_offset < buffer_end) {
|
||||
auto linear_data = linear_buffer.subspan(linear_offset, linear_tile_stride);
|
||||
@ -316,6 +318,7 @@ static constexpr void MortonCopy(u32 width, u32 height, u32 start_offset, u32 en
|
||||
tiled_offset += tile_size;
|
||||
LinearNextTile();
|
||||
}
|
||||
}
|
||||
|
||||
// If during a texture download the end coordinate is not tile aligned, swizzle
|
||||
// the tile affected to a temporary buffer and copy the part we are interested in
|
||||
|
Reference in New Issue
Block a user