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/gallium/drivers | |
parent | f12e2f9c12cae539ecc43578d3e3a6a33df473bc (diff) |
ac/radeonsi: add num_work_groups to the abi
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_internal.h | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index b2ff5b24e68..f7413a2d6f0 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -2146,7 +2146,7 @@ void si_load_system_value(struct si_shader_context *ctx, break; case TGSI_SEMANTIC_GRID_SIZE: - value = LLVMGetParam(ctx->main_fn, ctx->param_grid_size); + value = ctx->abi.num_work_groups; break; case TGSI_SEMANTIC_BLOCK_SIZE: @@ -4879,7 +4879,7 @@ static void create_function(struct si_shader_context *ctx) declare_global_desc_pointers(ctx, &fninfo); declare_per_stage_desc_pointers(ctx, &fninfo, true); if (shader->selector->info.uses_grid_size) - ctx->param_grid_size = add_arg(&fninfo, ARG_SGPR, v3i32); + add_arg_assign(&fninfo, ARG_SGPR, v3i32, &ctx->abi.num_work_groups); if (shader->selector->info.uses_block_size) ctx->param_block_size = add_arg(&fninfo, ARG_SGPR, v3i32); diff --git a/src/gallium/drivers/radeonsi/si_shader_internal.h b/src/gallium/drivers/radeonsi/si_shader_internal.h index aed6ea07f0b..02d5fc8e379 100644 --- a/src/gallium/drivers/radeonsi/si_shader_internal.h +++ b/src/gallium/drivers/radeonsi/si_shader_internal.h @@ -184,7 +184,6 @@ struct si_shader_context { int param_gs_vtx23_offset; /* in dwords (GFX9) */ int param_gs_vtx45_offset; /* in dwords (GFX9) */ /* CS */ - int param_grid_size; int param_block_size; LLVMTargetMachineRef tm; |