summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-01-14 20:51:35 +1100
committerTimothy Arceri <[email protected]>2018-01-31 09:14:07 +1100
commit97058168a4bcf7d0dddbb13af02972a0edbcefd4 (patch)
treea9e8cfc44ff729b5f4dac2fc8d1ebcc50d6c5470 /src/gallium/drivers/radeonsi
parent3ff012f142f42faed6d281cf4a17f72ec977c8cb (diff)
radeonsi/nir: add prim_mask to the abi
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 71a8733780c..dfec070d33e 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -1848,7 +1848,7 @@ void si_llvm_load_input_fs(
interp_fs_input(ctx, input_index, semantic_name,
semantic_index, 0, /* this param is unused */
shader->selector->info.colors_read, interp_param,
- LLVMGetParam(main_fn, SI_PARAM_PRIM_MASK),
+ ctx->abi.prim_mask,
LLVMGetParam(main_fn, SI_PARAM_FRONT_FACE),
&out[0]);
}
@@ -4076,7 +4076,7 @@ static void build_interp_intrinsic(const struct lp_build_tgsi_action *action,
int input_base, input_array_size;
int chan;
int i;
- LLVMValueRef prim_mask = LLVMGetParam(ctx->main_fn, SI_PARAM_PRIM_MASK);
+ LLVMValueRef prim_mask = ctx->abi.prim_mask;
LLVMValueRef array_idx;
int interp_param_idx;
unsigned interp;
@@ -4879,7 +4879,8 @@ static void create_function(struct si_shader_context *ctx)
declare_global_desc_pointers(ctx, &fninfo);
declare_per_stage_desc_pointers(ctx, &fninfo, true);
add_arg_checked(&fninfo, ARG_SGPR, ctx->f32, SI_PARAM_ALPHA_REF);
- add_arg_checked(&fninfo, ARG_SGPR, ctx->i32, SI_PARAM_PRIM_MASK);
+ add_arg_assign_checked(&fninfo, ARG_SGPR, ctx->i32,
+ &ctx->abi.prim_mask, SI_PARAM_PRIM_MASK);
add_arg_checked(&fninfo, ARG_VGPR, ctx->v2i32, SI_PARAM_PERSP_SAMPLE);
add_arg_checked(&fninfo, ARG_VGPR, ctx->v2i32, SI_PARAM_PERSP_CENTER);