diff options
author | Timothy Arceri <[email protected]> | 2018-02-02 14:33:06 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-02-07 08:43:08 +1100 |
commit | 9c52902c7686e781935703f4ed0e22f6c1837cfb (patch) | |
tree | b235adaf91d3b96791ed99f3fce08613150a5f83 /src/amd | |
parent | f12e2f9c12cae539ecc43578d3e3a6a33df473bc (diff) |
ac/radeonsi: add num_work_groups to the abi
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 5 | ||||
-rw-r--r-- | src/amd/common/ac_shader_abi.h | 1 |
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 4588feb690e..e44afbb9b22 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -90,7 +90,6 @@ struct nir_to_llvm_context { LLVMValueRef ring_offsets; LLVMValueRef push_constants; LLVMValueRef view_index; - LLVMValueRef num_work_groups; LLVMValueRef tg_size; LLVMValueRef vertex_buffers; @@ -780,7 +779,7 @@ static void create_function(struct nir_to_llvm_context *ctx, if (ctx->shader_info->info.cs.uses_grid_size) { add_arg(&args, ARG_SGPR, ctx->ac.v3i32, - &ctx->num_work_groups); + &ctx->abi.num_work_groups); } for (int i = 0; i < 3; i++) { @@ -4376,7 +4375,7 @@ static void visit_intrinsic(struct ac_nir_context *ctx, result = ctx->abi->instance_id; break; case nir_intrinsic_load_num_work_groups: - result = ctx->nctx->num_work_groups; + result = ctx->abi->num_work_groups; break; case nir_intrinsic_load_local_invocation_index: result = visit_load_local_invocation_index(ctx->nctx); diff --git a/src/amd/common/ac_shader_abi.h b/src/amd/common/ac_shader_abi.h index 55842ea342d..9499c1a15fd 100644 --- a/src/amd/common/ac_shader_abi.h +++ b/src/amd/common/ac_shader_abi.h @@ -56,6 +56,7 @@ struct ac_shader_abi { LLVMValueRef prim_mask; /* CS */ LLVMValueRef local_invocation_ids; + LLVMValueRef num_work_groups; LLVMValueRef workgroup_ids[3]; /* For VS and PS: pre-loaded shader inputs. |