From: Samuel Pitoiset Date: Wed, 15 Apr 2020 06:37:40 +0000 (+0200) Subject: radv/llvm: fix exporting the viewport index if the fragment shader needs it X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b424d49ac05563fd7d9f217fae9c25fc602f4330;p=mesa.git 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: Signed-off-by: Samuel Pitoiset Reviewed-by: Rhys Perry Reviewed-by: Bas Nieuwenhuizen Part-of: --- 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)