aco: Make unused workgroup id's 0
authorConnor Abbott <cwabbott0@gmail.com>
Mon, 18 Nov 2019 14:36:20 +0000 (15:36 +0100)
committerConnor Abbott <cwabbott0@gmail.com>
Mon, 25 Nov 2019 13:17:51 +0000 (14:17 +0100)
It shouldn't matter, but the 1 was leftover from when it was handled
together with workgroup_size and num_work_groups.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
src/amd/compiler/aco_instruction_selection.cpp

index ce8a7b02c77f816207c0c4de706ca13fc49208eb..de46348c0918e2eb2d5d83a5310ec95a75d38cf3 100644 (file)
@@ -5530,9 +5530,9 @@ void visit_intrinsic(isel_context *ctx, nir_intrinsic_instr *instr)
       Temp dst = get_ssa_temp(ctx, &instr->dest.ssa);
       struct ac_arg *args = ctx->args->ac.workgroup_ids;
       bld.pseudo(aco_opcode::p_create_vector, Definition(dst),
-                 args[0].used ? Operand(get_arg(ctx, args[0])) : Operand(1u),
-                 args[1].used ? Operand(get_arg(ctx, args[1])) : Operand(1u),
-                 args[2].used ? Operand(get_arg(ctx, args[2])) : Operand(1u));
+                 args[0].used ? Operand(get_arg(ctx, args[0])) : Operand(0u),
+                 args[1].used ? Operand(get_arg(ctx, args[1])) : Operand(0u),
+                 args[2].used ? Operand(get_arg(ctx, args[2])) : Operand(0u));
       emit_split_vector(ctx, dst, 3);
       break;
    }