aco: fix tcs_wave_id unpacking on GFX11

Only the first 3 bits are useful.
Ported from ac/llvm.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19194>
This commit is contained in:
Samuel Pitoiset
2022-10-20 01:41:51 +00:00
committed by Marge Bot
parent 1f573c44ab
commit ef5fc6a764

View File

@@ -8444,7 +8444,7 @@ visit_intrinsic(isel_context* ctx, nir_intrinsic_instr* instr)
/* On GFX11, RelAutoIndex is WaveID * WaveSize + ThreadID. */
Temp wave_id =
bld.sop2(aco_opcode::s_bfe_u32, bld.def(s1), bld.def(s1, scc),
get_arg(ctx, ctx->args->ac.tcs_wave_id), Operand::c32(0u | (5u << 16)));
get_arg(ctx, ctx->args->ac.tcs_wave_id), Operand::c32(0u | (3u << 16)));
Temp temp = bld.sop2(aco_opcode::s_mul_i32, bld.def(s1), wave_id,
Operand::c32(ctx->program->wave_size));