radv: only enable one channel when exporting prim id
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 20 Mar 2018 09:07:30 +0000 (10:07 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 20 Mar 2018 20:54:48 +0000 (21:54 +0100)
It's a 32-bit integer like the layer.

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 ad046adfdb9374967c3cbc3ec71762a1e823a011..c8d383e021d0fbf51624cd94d81fbf14e37703b9 100644 (file)
@@ -2357,7 +2357,7 @@ handle_vs_outputs_post(struct radv_shader_context *ctx,
                for (unsigned j = 1; j < 4; j++)
                        values[j] = ctx->ac.f32_0;
 
-               radv_export_param(ctx, param_count, values, 0xf);
+               radv_export_param(ctx, param_count, values, 0x1);
 
                outinfo->vs_output_param_offset[VARYING_SLOT_PRIMITIVE_ID] = param_count++;
                outinfo->export_prim_id = true;