From ce6557cc04856787b5e196ec43055c1c35f362a1 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Mon, 27 May 2024 09:16:13 +0200 Subject: [PATCH] aco: adjust loading local invocation ID for GS on GFX12 It uses gs_vtx_offset[0] instead. Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/compiler/aco_instruction_selection.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 6c0f9fdbda6..2f03fcb0c6a 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -9019,7 +9019,11 @@ visit_intrinsic(isel_context* ctx, nir_intrinsic_instr* instr) Temp dst = get_ssa_temp(ctx, &instr->def); if (ctx->shader->info.stage == MESA_SHADER_GEOMETRY) { - if (ctx->options->gfx_level >= GFX10) + if (ctx->options->gfx_level >= GFX12) + bld.vop3(aco_opcode::v_bfe_u32, Definition(dst), + get_arg(ctx, ctx->args->gs_vtx_offset[0]), Operand::c32(27u), + Operand::c32(5u)); + else if (ctx->options->gfx_level >= GFX10) bld.vop2_e64(aco_opcode::v_and_b32, Definition(dst), Operand::c32(127u), get_arg(ctx, ctx->args->gs_invocation_id)); else