Skip to content

anv: Do not emulate texture swizzle for INPUT_ATTACHMENT, STORAGE_IMAGE

Danylo Piliaiev requested to merge GL/mesa:fix/tex-swizzle-emulation into master

With d2aa65eb vkQuake began crashing when starting on IVB. It uses swizzle with VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT (Shaders/postprocess.frag#L10) and crashed with:

vkquake: ../src/intel/vulkan/anv_nir_apply_pipeline_layout.c:938: lower_gen7_tex_swizzle: Assertion 'bind_layout->data & ANV_DESCRIPTOR_TEXTURE_SWIZZLE' failed.

Vulkan spec says:

If descriptorType is VK_DESCRIPTOR_TYPE_STORAGE_IMAGE
or VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the imageView member of each
element of pImageInfo must have been created with the identity swizzle.

Fixes: d2aa65eb

Edited by Danylo Piliaiev

Merge request reports