Skip to content

zink: limit images we mark as cube-compatible

Erik Faye-Lund requested to merge kusma/mesa:zink-cube-compatible-fix into main

The Vulkan spec says the following:

If imageType is VK_IMAGE_TYPE_2D and flags contains VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, extent.width and extent.height must be equal and arrayLayers must be greater than or equal to 6

This makes a lot of sense, as these are also requirements for being able to create cubemaps from them in the first place.

Let's thread a bit more careful, and only set this bit in these cases. This matters in the new case of setting this flag on 2D array textures. In the other cases, this should already be the case.

I haven't seen this trigger any issues, I just realized this while reading the Vulkan-spec.

Fixes: 1887ff2e ("zink: mark 2d-arrays as cube-compatible")

Merge request reports