pan/midgard: Set mask for lowered read-hazard moves
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 15 Aug 2019 23:29:15 +0000 (16:29 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 19 Aug 2019 15:32:17 +0000 (08:32 -0700)
If we need to lower a move for a read from a vec2 texture coordinate, we
shouldn't write zw, even incidentally.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/midgard/midgard_ra.c

index 5df8ecf0df06be973660e13f5a892a8c962a2796..6a417d48c9161949ee271959552c22f2839000a6 100644 (file)
@@ -501,6 +501,7 @@ mir_lower_special_reads(compiler_context *ctx)
                                 } else {
                                         idx = spill_idx++;
                                         m = v_mov(i, blank_alu_src, idx);
+                                        m.mask = mir_mask_of_read_components(pre_use, i);
                                         mir_insert_instruction_before(pre_use, m);
                                         mir_rewrite_index_src_single(pre_use, i, idx);
                                 }