diff options
author | Samuel Pitoiset <[email protected]> | 2018-02-09 13:54:19 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2018-02-12 11:54:04 +0100 |
commit | 460d3ce7264f0da6db537fe8f99f6872d33ed269 (patch) | |
tree | 6b598d787b2bb574d17ecfdbe0a6e44f58baa0eb /src | |
parent | 054c92190c1c3b91ebc33118a4518346805948ca (diff) |
ac: move tg_size to the ABI
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src')
-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 e82348b83b0..9d149b49eab 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -87,7 +87,6 @@ struct nir_to_llvm_context { LLVMValueRef ring_offsets; LLVMValueRef push_constants; LLVMValueRef view_index; - LLVMValueRef tg_size; LLVMValueRef vertex_buffers; LLVMValueRef rel_auto_id; @@ -789,7 +788,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_SGPR, ctx->ac.i32, &ctx->abi.tg_size); add_arg(&args, ARG_VGPR, ctx->ac.v3i32, &ctx->abi.local_invocation_ids); break; @@ -3906,7 +3905,7 @@ visit_load_local_invocation_index(struct nir_to_llvm_context *ctx) { LLVMValueRef result; LLVMValueRef thread_id = ac_get_thread_id(&ctx->ac); - result = LLVMBuildAnd(ctx->builder, ctx->tg_size, + result = LLVMBuildAnd(ctx->builder, ctx->abi.tg_size, LLVMConstInt(ctx->ac.i32, 0xfc0, false), ""); return LLVMBuildAdd(ctx->builder, result, thread_id, ""); diff --git a/src/amd/common/ac_shader_abi.h b/src/amd/common/ac_shader_abi.h index 9499c1a15fd..5d525849966 100644 --- a/src/amd/common/ac_shader_abi.h +++ b/src/amd/common/ac_shader_abi.h @@ -58,6 +58,7 @@ struct ac_shader_abi { LLVMValueRef local_invocation_ids; LLVMValueRef num_work_groups; LLVMValueRef workgroup_ids[3]; + LLVMValueRef tg_size; /* For VS and PS: pre-loaded shader inputs. * |