diff options
author | Nicolai Hähnle <[email protected]> | 2017-06-25 19:40:40 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-07-31 14:55:43 +0200 |
commit | f03c54e05a7a539216db5a5cb0da43766a8c27fe (patch) | |
tree | a9ad80cc23faf5bf63293c9610d6f13921117cd0 /src/amd/common | |
parent | 7de445377c261e20412cb4f34b8d309b62f78fac (diff) |
ac/nir,radeonsi: add and use ac_shader_abi::{ancillary,sample_coverage}
v2: update for LLVMValueRefs in ac_shader_abi
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/amd/common')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 10 | ||||
-rw-r--r-- | src/amd/common/ac_shader_abi.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index a60a900073c..622b97896df 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -132,8 +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 ancillary; - LLVMValueRef sample_coverage; LLVMValueRef frag_pos[4]; LLVMTypeRef i1; @@ -816,8 +814,8 @@ static void create_function(struct nir_to_llvm_context *ctx) 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->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, &ctx->abi.ancillary); /* ancillary */ + add_vgpr_argument(&args, ctx->i32, &ctx->abi.sample_coverage); /* sample coverage */ add_vgpr_argument(&args, ctx->i32, NULL); /* fixed pt */ break; default: @@ -4003,13 +4001,13 @@ static void visit_intrinsic(struct ac_nir_context *ctx, fprintf(stderr, "Unknown primitive id intrinsic: %d", ctx->stage); break; case nir_intrinsic_load_sample_id: - result = unpack_param(ctx->nctx, ctx->nctx->ancillary, 8, 4); + result = unpack_param(ctx->nctx, ctx->abi->ancillary, 8, 4); break; case nir_intrinsic_load_sample_pos: result = load_sample_pos(ctx->nctx); break; case nir_intrinsic_load_sample_mask_in: - result = ctx->nctx->sample_coverage; + result = ctx->abi->sample_coverage; break; case nir_intrinsic_load_front_face: result = ctx->abi->front_face; diff --git a/src/amd/common/ac_shader_abi.h b/src/amd/common/ac_shader_abi.h index 1c8d0e8b3ab..fd62f22e2bf 100644 --- a/src/amd/common/ac_shader_abi.h +++ b/src/amd/common/ac_shader_abi.h @@ -45,6 +45,8 @@ struct ac_shader_abi { LLVMValueRef vertex_id; LLVMValueRef instance_id; LLVMValueRef front_face; + LLVMValueRef ancillary; + LLVMValueRef sample_coverage; /* For VS and PS: pre-loaded shader inputs. * |