Mesa (master): radv/llvm: fix exporting the viewport index if the fragment shader needs it

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Apr 17 16:43:56 UTC 2020


Module: Mesa
Branch: master
Commit: b424d49ac05563fd7d9f217fae9c25fc602f4330
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b424d49ac05563fd7d9f217fae9c25fc602f4330

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Wed Apr 15 08:37:40 2020 +0200

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 at lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4564>

---

 src/amd/vulkan/radv_nir_to_llvm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c
index 900246d275e..85128ed0798 100644
--- a/src/amd/vulkan/radv_nir_to_llvm.c
+++ b/src/amd/vulkan/radv_nir_to_llvm.c
@@ -1772,6 +1772,7 @@ radv_build_param_exports(struct radv_shader_context *ctx,
 
 		if (slot_name != VARYING_SLOT_LAYER &&
 		    slot_name != VARYING_SLOT_PRIMITIVE_ID &&
+		    slot_name != VARYING_SLOT_VIEWPORT &&
 		    slot_name != VARYING_SLOT_CLIP_DIST0 &&
 		    slot_name != VARYING_SLOT_CLIP_DIST1 &&
 		    slot_name < VARYING_SLOT_VAR0)



More information about the mesa-commit mailing list