radv: move radv_declare_shader_args() out of shader_variant_compile()

Declaring them earlier will allow us to access them in NIR.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12773>
This commit is contained in:
Rhys Perry
2020-09-24 14:50:54 +01:00
committed by Marge Bot
parent a56bb2d545
commit e6672f6fd1
7 changed files with 150 additions and 100 deletions
@@ -8181,7 +8181,7 @@ visit_intrinsic(isel_context* ctx, nir_intrinsic_instr* instr)
case nir_intrinsic_scoped_barrier: emit_scoped_barrier(ctx, instr); break;
case nir_intrinsic_load_num_workgroups: {
Temp dst = get_ssa_temp(ctx, &instr->dest.ssa);
if (ctx->options->load_grid_size_from_user_sgpr) {
if (ctx->args->load_grid_size_from_user_sgpr) {
bld.copy(Definition(dst), get_arg(ctx, ctx->args->ac.num_work_groups));
} else {
Temp addr = get_arg(ctx, ctx->args->ac.num_work_groups);