Mesa (main): aco: Fix workgroup_id.y and .z for NV_mesh_shader.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 25 06:51:17 UTC 2022


Module: Mesa
Branch: main
Commit: 082b691141a5aa088afb532a2ca909ddca16b654
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=082b691141a5aa088afb532a2ca909ddca16b654

Author: Timur Kristóf <timur.kristof at gmail.com>
Date:   Sat Feb 12 20:29:50 2022 +0100

aco: Fix workgroup_id.y and .z for NV_mesh_shader.

Signed-off-by: Timur Kristóf <timur.kristof at gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15034>

---

 src/amd/compiler/aco_instruction_selection.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp
index b709c476405..c3cf3db160e 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -8141,8 +8141,8 @@ visit_intrinsic(isel_context* ctx, nir_intrinsic_instr* instr)
          Temp base_arg = get_arg(ctx, ctx->args->ac.base_vertex);
          Temp idx = bld.vop1(aco_opcode::v_readfirstlane_b32, bld.def(s1), idx_arg);
          Temp workgroup_index = bld.sop2(aco_opcode::s_add_u32, bld.def(s1), bld.def(s1, scc), idx, base_arg);
-         Temp one = bld.copy(bld.def(s1), Operand::c32(1));
-         Temp workgroup_ids[3] = {workgroup_index, one, one};
+         Temp zero = bld.copy(bld.def(s1), Operand::zero());
+         Temp workgroup_ids[3] = {workgroup_index, zero, zero};
          create_vec_from_array(ctx, workgroup_ids, 3, RegType::sgpr, 4, 0, dst);
       }
       break;



More information about the mesa-commit mailing list