vkd3d: Optimize unmapping adjacent resource regions.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
This commit is contained in:
Philip Rebohle 2021-03-11 13:18:00 +01:00 committed by Hans-Kristian Arntzen
parent 2ef8106136
commit 85f15916c4
1 changed files with 2 additions and 2 deletions

View File

@ -9858,8 +9858,8 @@ static unsigned int vkd3d_compact_sparse_bind_ranges(const struct d3d12_resource
vk_offset = src_tile->vk_offset;
}
if (range && bind->dst_tile == range->tile_index + range->tile_count &&
vk_memory == range->vk_memory && vk_offset == range->vk_offset + range->tile_count * VKD3D_TILE_SIZE)
if (range && bind->dst_tile == range->tile_index + range->tile_count && vk_memory == range->vk_memory &&
(vk_offset == range->vk_offset + range->tile_count * VKD3D_TILE_SIZE || !vk_memory))
{
range->tile_count++;
}