anv: Emulate texture swizzle in the shader when needed
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 17 May 2019 15:04:58 +0000 (10:04 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Fri, 17 May 2019 17:25:58 +0000 (12:25 -0500)
commitd2aa65eb1892f7b300ac24560f9dbda6b600b5a7
tree0877c1d5ce4d5d739049ddfce097c07aff6e6351
parentea479fdc1d04f8548fb6628f5d5bda83324a76da
anv: Emulate texture swizzle in the shader when needed

Now that we have the descriptor buffer mechanism, emulated texture
swizzle can be implemented in a very non-invasive way.  Previous
attempts all tried to extend the push constant based image param
mechanism which was gross.  This could, in theory, be done much faster
with a magic back-end instruction which does indirect MOVs but Vulkan on
IVB is already so slow this isn't going to matter much.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104355
Cc: "19.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_descriptor_set.c
src/intel/vulkan/anv_image.c
src/intel/vulkan/anv_nir_apply_pipeline_layout.c
src/intel/vulkan/anv_private.h