radv: Fix up 2_10_10_10 alpha sign.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sat, 12 May 2018 21:50:04 +0000 (23:50 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 14 May 2018 16:58:20 +0000 (18:58 +0200)
commit3d4d388e3929d7948b62d90867357aecbfba5aeb
treef39c61ddf84d3519f7684761102a894421d834d1
parente361970ed73d0f0a11d93a718dbfe2bf4f38b56d
radv: Fix up 2_10_10_10 alpha sign.

Pre-Vega HW always interprets the alpha for this format as unsigned,
so we have to implement a fixup to do the sign correctly for signed
formats.

v2: Improve indexing mess.

CC: 18.0 18.1 <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106480
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_nir_to_llvm.c
src/amd/vulkan/radv_pipeline.c
src/amd/vulkan/radv_private.h
src/amd/vulkan/radv_shader.h