ac/nir: add a workaround for viewing a slice of 3D as a 2D image
authorConnor Abbott <cwabbott0@gmail.com>
Thu, 22 Aug 2019 15:09:21 +0000 (17:09 +0200)
committerConnor Abbott <cwabbott0@gmail.com>
Mon, 26 Aug 2019 09:00:44 +0000 (11:00 +0200)
commit4849276ea8774329b3330fce22b2bfb03b80c97a
treebc8ec6db215561f573cccd57946dc986665d0b0b
parent89671ef205fa93d391e01884da48a876847a5682
ac/nir: add a workaround for viewing a slice of 3D as a 2D image

GL and Vulkan allow you to bind a single layer of a 3D texture to a 2D
image, and we weren't implementing a workaround for that on gfx9 that
TGSI was. Copy it over.

Fixes KHR-GL45.shader_image_load_store.non-layered_binding with radeonsi
NIR.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/common/ac_nir_to_llvm.c