ir3: Actually use wrmask in emit_sam
authorConnor Abbott <cwabbott0@gmail.com>
Tue, 8 Mar 2022 19:49:01 +0000 (20:49 +0100)
committerMarge Bot <emma+marge@anholt.net>
Tue, 15 Mar 2022 21:36:38 +0000 (21:36 +0000)
I noticed that isam emitted for SSBO loads was writing all 4 components,
which this fixes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15288>

src/freedreno/ir3/ir3_compiler_nir.c

index 0e73063..8ff0440 100644 (file)
@@ -1379,7 +1379,7 @@ emit_sam(struct ir3_context *ctx, opc_t opc, struct tex_src_info info,
    if (info.flags & IR3_INSTR_A1EN) {
       addr = ir3_get_addr1(ctx, info.a1_val);
    }
-   sam = ir3_SAM(ctx->block, opc, type, 0b1111, info.flags, info.samp_tex, src0,
+   sam = ir3_SAM(ctx->block, opc, type, wrmask, info.flags, info.samp_tex, src0,
                  src1);
    if (info.flags & IR3_INSTR_A1EN) {
       ir3_instr_set_address(sam, addr);