pan/midgard: Fix crash with txs
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 19 Dec 2019 16:12:25 +0000 (11:12 -0500)
committerTomeu Vizoso <tomeu.vizoso@collabora.com>
Fri, 20 Dec 2019 08:10:36 +0000 (09:10 +0100)
This regressed since we implemented RECT textures natively, oops.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3169>

src/panfrost/midgard/midgard_compile.c

index f332335cdd4229edd699d6e0d6ba4d02899e6196..ab62770c69e18ac6241d256a92411231af0bfd99 100644 (file)
@@ -1165,7 +1165,9 @@ emit_ubo_read(
 
         midgard_instruction ins = m_ld_ubo_int4(dest, 0);
         ins.constants[0] = offset;
-        mir_set_intr_mask(instr, &ins, true);
+
+        if (instr->type == nir_instr_type_intrinsic)
+                mir_set_intr_mask(instr, &ins, true);
 
         if (indirect_offset) {
                 ins.src[2] = nir_src_index(ctx, indirect_offset);