diff options
author | Timothy Arceri <[email protected]> | 2018-02-02 10:08:52 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-02-07 08:43:08 +1100 |
commit | fa5239c1534a6ce5bf85602dddddba6df6d67724 (patch) | |
tree | 2156690852da847cf5aa0c79beca5a95bb5b1d11 /src/amd | |
parent | 64c10c9737c87544ba40eef68a344d53bcb6a51e (diff) |
ac/radeonsi: add workgroup_ids 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 | 9 | ||||
-rw-r--r-- | src/amd/common/ac_shader_abi.h | 1 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 22956bc86bf..4b1c921f606 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 workgroup_ids[3]; LLVMValueRef local_invocation_ids; LLVMValueRef tg_size; @@ -786,10 +785,10 @@ static void create_function(struct nir_to_llvm_context *ctx, } for (int i = 0; i < 3; i++) { - ctx->workgroup_ids[i] = NULL; + ctx->abi.workgroup_ids[i] = NULL; if (ctx->shader_info->info.cs.uses_block_id[i]) { add_arg(&args, ARG_SGPR, ctx->ac.i32, - &ctx->workgroup_ids[i]); + &ctx->abi.workgroup_ids[i]); } } @@ -4299,8 +4298,8 @@ static void visit_intrinsic(struct ac_nir_context *ctx, LLVMValueRef values[3]; for (int i = 0; i < 3; i++) { - values[i] = ctx->nctx->workgroup_ids[i] ? - ctx->nctx->workgroup_ids[i] : ctx->ac.i32_0; + values[i] = ctx->abi->workgroup_ids[i] ? + ctx->abi->workgroup_ids[i] : ctx->ac.i32_0; } result = ac_build_gather_values(&ctx->ac, values, 3); diff --git a/src/amd/common/ac_shader_abi.h b/src/amd/common/ac_shader_abi.h index d9bb5a1e329..3d3dcc2e8e7 100644 --- a/src/amd/common/ac_shader_abi.h +++ b/src/amd/common/ac_shader_abi.h @@ -54,6 +54,7 @@ struct ac_shader_abi { LLVMValueRef ancillary; LLVMValueRef sample_coverage; LLVMValueRef prim_mask; + LLVMValueRef workgroup_ids[3]; /* For VS and PS: pre-loaded shader inputs. * |