diff options
author | Timothy Arceri <[email protected]> | 2018-02-02 10:23:46 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-02-07 08:43:08 +1100 |
commit | c8066cdfa7e1f79a30869ea37ac0bd04763b93aa (patch) | |
tree | 327c7004504231dfbb9bf56d3c1849b6bef5fc1e /src/amd/common | |
parent | fa5239c1534a6ce5bf85602dddddba6df6d67724 (diff) |
ac/radeonsi: add local_invocation_ids to the 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 | 5 | ||||
-rw-r--r-- | src/amd/common/ac_shader_abi.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 4b1c921f606..dcfeae85665 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -91,7 +91,6 @@ struct nir_to_llvm_context { LLVMValueRef push_constants; LLVMValueRef view_index; LLVMValueRef num_work_groups; - LLVMValueRef local_invocation_ids; LLVMValueRef tg_size; LLVMValueRef vertex_buffers; @@ -795,7 +794,7 @@ static void create_function(struct nir_to_llvm_context *ctx, if (ctx->shader_info->info.cs.uses_local_invocation_idx) add_arg(&args, ARG_SGPR, ctx->ac.i32, &ctx->tg_size); add_arg(&args, ARG_VGPR, ctx->ac.v3i32, - &ctx->local_invocation_ids); + &ctx->abi.local_invocation_ids); break; case MESA_SHADER_VERTEX: declare_global_input_sgprs(ctx, stage, has_previous_stage, @@ -4314,7 +4313,7 @@ static void visit_intrinsic(struct ac_nir_context *ctx, break; } case nir_intrinsic_load_local_invocation_id: { - result = ctx->nctx->local_invocation_ids; + result = ctx->abi->local_invocation_ids; break; } case nir_intrinsic_load_base_instance: diff --git a/src/amd/common/ac_shader_abi.h b/src/amd/common/ac_shader_abi.h index 3d3dcc2e8e7..9a35ff925b4 100644 --- a/src/amd/common/ac_shader_abi.h +++ b/src/amd/common/ac_shader_abi.h @@ -54,6 +54,8 @@ struct ac_shader_abi { LLVMValueRef ancillary; LLVMValueRef sample_coverage; LLVMValueRef prim_mask; + /* CS */ + LLVMValueRef local_invocation_ids; LLVMValueRef workgroup_ids[3]; /* For VS and PS: pre-loaded shader inputs. |