vkd3d: Store subresource index in d3d12_sparse_image_region.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
This commit is contained in:
Philip Rebohle 2021-03-09 23:35:24 +01:00 committed by Hans-Kristian Arntzen
parent ff78b2df1c
commit ead9f2d620
2 changed files with 2 additions and 0 deletions

View File

@ -2151,6 +2151,7 @@ static HRESULT d3d12_resource_init_sparse_info(struct d3d12_resource *resource,
region->subresource.aspectMask = vk_memory_requirements.formatProperties.aspectMask;
region->subresource.mipLevel = subresource % resource->desc.MipLevels;
region->subresource.arrayLayer = subresource / resource->desc.MipLevels;
region->subresource_index = subresource;
region->offset.x = tile_offset.x * block_extent.width;
region->offset.y = tile_offset.y * block_extent.height;

View File

@ -750,6 +750,7 @@ enum vkd3d_resource_flag
struct d3d12_sparse_image_region
{
VkImageSubresource subresource;
uint32_t subresource_index;
VkOffset3D offset;
VkExtent3D extent;
};