panfrost: fix undefined value access on mir_set_intr_mask()
authorItalo Nicola <italonicola@collabora.com>
Wed, 26 Aug 2020 14:56:13 +0000 (14:56 +0000)
committerMarge Bot <eric+marge@anholt.net>
Tue, 1 Sep 2020 21:04:09 +0000 (21:04 +0000)
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6439>

src/panfrost/midgard/midgard_compile.c

index 1f54cfdcf39fe3a40765be6a3489559a7447889b..06ed3f62cf44a74677620f54405513c55be823c2 100644 (file)
@@ -1291,8 +1291,8 @@ mir_set_intr_mask(nir_instr *instr, midgard_instruction *ins, bool is_read)
 
         /* Once we have the NIR mask, we need to normalize to work in 32-bit space */
         unsigned bytemask = pan_to_bytemask(dsize, nir_mask);
-        mir_set_bytemask(ins, bytemask);
         ins->dest_type = nir_type_uint | dsize;
+        mir_set_bytemask(ins, bytemask);
 }
 
 /* Uniforms and UBOs use a shared code path, as uniforms are just (slightly