anv/image: Fix interpretation of 'disjoint'

The calculation of the subsurfaces' memory requirements assumed that the
image was disjoint if the image was created with
VK_IMAGE_CREATE_DISJOINT_BIT. But the Vulkan spec also requires that the
VkFormat be multi-planar.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8097>
This commit is contained in:
Chad Versace
2021-02-05 12:07:08 -08:00
committed by chadversary
parent 6fa56273be
commit 449df3808f
2 changed files with 11 additions and 3 deletions

View File

@@ -3759,8 +3759,9 @@ struct anv_image {
VkDeviceSize size;
uint32_t alignment;
/* Whether the image is made of several underlying buffer objects rather a
* single one with different offsets.
/**
* Image has multi-planar format and was created with
* VK_IMAGE_CREATE_DISJOINT_BIT.
*/
bool disjoint;