Check compat with mip tail only for opaque sparse images. Closes #3044

* These images don't have a direct page table.
This commit is contained in:
baldurk committed 2023-09-01 13:26:33 +01:00
1 parent a56aa9ed21
commit 5b852c8573
1 file changed
+12
+12
View File
@@ -751,6 +751,18 @@ SparseBinding::SparseBinding(WrappedVulkan *vk, VkImage unwrappedImage,
VkSparseImageMemoryRequirements reqs[8];
ObjDisp(device)->GetImageSparseMemoryRequirements(Unwrap(device), unwrappedImage, &numreqs, reqs);
if(numreqs == 0)
{
numreqs = 1;
reqs[0].formatProperties.aspectMask = VK_IMAGE_ASPECT_NONE;
reqs[0].formatProperties.flags = 0;
reqs[0].formatProperties.imageGranularity = {mrq.alignment & 0xFFFFFFFFu, 1, 1};
reqs[0].imageMipTailFirstLod = 0;
reqs[0].imageMipTailOffset = 0;
reqs[0].imageMipTailStride = 0;
reqs[0].imageMipTailSize = mrq.size;
}
// if we have a different number of aspwects, we can't apply this page table
if(numreqs != tables.size())
{