radv/llvm: fix exporting the viewport index if the fragment shader needs it
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 15 Apr 2020 06:37:40 +0000 (08:37 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 17 Apr 2020 16:23:24 +0000 (16:23 +0000)
commitb424d49ac05563fd7d9f217fae9c25fc602f4330
tree4064083fe75e8ea7f2357b3a04c97c722228df7e
parent19aa68ae315df7654bd81a4c293aeaf5f7a7f4a6
radv/llvm: fix exporting the viewport index if the fragment shader needs it

It's like the layer, it has to be exported via the pos and also
as a varying if the fragment shader reads it.

Fixes dEQP-VK.draw.shader_viewport_index.fragment_shader_*

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4564>
src/amd/vulkan/radv_nir_to_llvm.c