ac/llvm: fix tcs_wave_id unpacking on gfx11
authorMarek Olšák <marek.olsak@amd.com>
Thu, 19 May 2022 17:01:56 +0000 (13:01 -0400)
committerMarge Bot <emma+marge@anholt.net>
Wed, 15 Jun 2022 20:52:42 +0000 (20:52 +0000)
no effect on behavior because the higher bits are always zero

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16990>

src/amd/llvm/ac_nir_to_llvm.c

index 074774e..1dd6e3a 100644 (file)
@@ -3038,7 +3038,7 @@ static LLVMValueRef visit_load_local_invocation_index(struct ac_nir_context *ctx
 {
    if (ctx->args->tcs_wave_id.used) {
       return ac_build_imad(&ctx->ac,
-                           ac_unpack_param(&ctx->ac, ac_get_arg(&ctx->ac, ctx->args->tcs_wave_id), 0, 5),
+                           ac_unpack_param(&ctx->ac, ac_get_arg(&ctx->ac, ctx->args->tcs_wave_id), 0, 3),
                            LLVMConstInt(ctx->ac.i32, ctx->ac.wave_size, 0),
                            ac_get_thread_id(&ctx->ac));
    } else if (ctx->args->vs_rel_patch_id.used) {