vkd3d: Fix out of range in UpdateTileMappings
Previously this incremented and indexed before the loop checked this. Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
parent
fd466058f0
commit
4a7686d5dc
|
@ -8911,6 +8911,24 @@ static void STDMETHODCALLTYPE d3d12_command_queue_UpdateTileMappings(ID3D12Comma
|
|||
|
||||
while (region_idx < region_count && range_idx < range_count)
|
||||
{
|
||||
if (range_tile == range_size)
|
||||
{
|
||||
if (range_flags)
|
||||
range_flag = range_flags[range_idx];
|
||||
|
||||
range_size = range_tile_counts[range_idx];
|
||||
range_offset = heap_range_offsets[range_idx];
|
||||
}
|
||||
|
||||
if (region_tile == region_size.NumTiles)
|
||||
{
|
||||
if (region_coords)
|
||||
region_coord = region_coords[region_idx];
|
||||
|
||||
if (region_sizes)
|
||||
region_size = region_sizes[region_idx];
|
||||
}
|
||||
|
||||
if (range_flag != D3D12_TILE_RANGE_FLAG_SKIP)
|
||||
{
|
||||
unsigned int tile_index = vkd3d_get_tile_index_from_region(sparse, ®ion_coord, ®ion_size, region_tile);
|
||||
|
@ -8950,24 +8968,12 @@ static void STDMETHODCALLTYPE d3d12_command_queue_UpdateTileMappings(ID3D12Comma
|
|||
{
|
||||
range_idx += 1;
|
||||
range_tile = 0;
|
||||
|
||||
if (range_flags)
|
||||
range_flag = range_flags[range_idx];
|
||||
|
||||
range_size = range_tile_counts[range_idx];
|
||||
range_offset = heap_range_offsets[range_idx];
|
||||
}
|
||||
|
||||
if (++region_tile == region_size.NumTiles)
|
||||
{
|
||||
region_idx += 1;
|
||||
region_tile = 0;
|
||||
|
||||
if (region_coords)
|
||||
region_coord = region_coords[region_idx];
|
||||
|
||||
if (region_sizes)
|
||||
region_size = region_sizes[region_idx];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue