summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-06-25 12:56:49 +0200
committerNicolai Hähnle <[email protected]>2017-07-31 14:55:42 +0200
commite247357240f4d429f954b5019852053683b6dd1c (patch)
treedcc0638e1a6f09a99d58aba14821faead75d33d1 /src/amd
parent28634ff7d3fb010f8fc400f332e96dd72abfbbb6 (diff)
ac/nir,radeonsi: add ac_shader_abi::front_face
v2: update for LLVMValueRefs in ac_shader_abi Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/common/ac_nir_to_llvm.c5
-rw-r--r--src/amd/common/ac_shader_abi.h1
2 files changed, 3 insertions, 3 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 9a88bbc3461..a089d69a843 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -132,7 +132,6 @@ struct nir_to_llvm_context {
LLVMValueRef sample_pos_offset;
LLVMValueRef persp_sample, persp_center, persp_centroid;
LLVMValueRef linear_sample, linear_center, linear_centroid;
- LLVMValueRef front_face;
LLVMValueRef ancillary;
LLVMValueRef sample_coverage;
LLVMValueRef frag_pos[4];
@@ -816,7 +815,7 @@ static void create_function(struct nir_to_llvm_context *ctx)
add_vgpr_argument(&args, ctx->f32, &ctx->frag_pos[1]); /* pos y float */
add_vgpr_argument(&args, ctx->f32, &ctx->frag_pos[2]); /* pos z float */
add_vgpr_argument(&args, ctx->f32, &ctx->frag_pos[3]); /* pos w float */
- add_vgpr_argument(&args, ctx->i32, &ctx->front_face); /* front face */
+ add_vgpr_argument(&args, ctx->i32, &ctx->abi.front_face); /* front face */
add_vgpr_argument(&args, ctx->i32, &ctx->ancillary); /* ancillary */
add_vgpr_argument(&args, ctx->i32, &ctx->sample_coverage); /* sample coverage */
add_vgpr_argument(&args, ctx->i32, NULL); /* fixed pt */
@@ -4023,7 +4022,7 @@ static void visit_intrinsic(struct ac_nir_context *ctx,
result = ctx->nctx->sample_coverage;
break;
case nir_intrinsic_load_front_face:
- result = ctx->nctx->front_face;
+ result = ctx->abi->front_face;
break;
case nir_intrinsic_load_instance_id:
result = ctx->abi->instance_id;
diff --git a/src/amd/common/ac_shader_abi.h b/src/amd/common/ac_shader_abi.h
index efbd7de4608..1c8d0e8b3ab 100644
--- a/src/amd/common/ac_shader_abi.h
+++ b/src/amd/common/ac_shader_abi.h
@@ -44,6 +44,7 @@ struct ac_shader_abi {
LLVMValueRef draw_id;
LLVMValueRef vertex_id;
LLVMValueRef instance_id;
+ LLVMValueRef front_face;
/* For VS and PS: pre-loaded shader inputs.
*