radv: set the slot_index correctly for VARYING_SLOT_CLIP_DIST1
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 10 Jul 2019 13:18:57 +0000 (15:18 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 10 Jul 2019 21:36:59 +0000 (23:36 +0200)
For selecting a different SQ_EXP_POS target.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_nir_to_llvm.c

index ba0fb557266529ad885bf8da1ae69461bc871870..597d006284a70d6d057ebd0013660e9b681af4bc 100644 (file)
@@ -3043,7 +3043,7 @@ handle_vs_outputs_post(struct radv_shader_context *ctx,
                        continue;
 
                outputs[noutput].slot_name = i;
-               outputs[noutput].slot_index = 0;
+               outputs[noutput].slot_index = i == VARYING_SLOT_CLIP_DIST1;
 
                if (ctx->stage == MESA_SHADER_VERTEX &&
                    !ctx->is_gs_copy_shader) {