pan/midgard: Set xyzx swizzle for load_compute_arg
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 12 Feb 2020 13:39:29 +0000 (08:39 -0500)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Sun, 16 Feb 2020 14:16:48 +0000 (09:16 -0500)
Probably harmless but the w component doesn't appear valid so let's
match the blob... one less bit to be nervous about.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>

src/panfrost/midgard/midgard_compile.c

index c0334081574f336373290b3dfccbe6e4e4add826..8aa54bfb0a21dcac047b0ea06a745c894cf8cf71 100644 (file)
@@ -1481,6 +1481,7 @@ emit_compute_builtin(compiler_context *ctx, nir_intrinsic_instr *instr)
         unsigned reg = nir_dest_index(ctx, &instr->dest);
         midgard_instruction ins = m_ld_compute_id(reg, 0);
         ins.mask = mask_of(3);
+        ins.swizzle[0][3] = COMPONENT_X; /* xyzx */
         ins.load_store.arg_1 = compute_builtin_arg(instr->intrinsic);
         emit_mir_instruction(ctx, ins);
 }