pan/bi: Account for bool32 ld_ubo reads
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 22 Oct 2020 14:58:04 +0000 (10:58 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 23 Oct 2020 14:48:23 +0000 (14:48 +0000)
Fixes crash in sway.

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

src/panfrost/bifrost/bi_pack.c

index 9f3cd9c..ba2bc55 100644 (file)
@@ -401,7 +401,8 @@ bi_pack_fma(bi_clause *clause, bi_bundle bundle, bi_registers *regs)
 
         bool f16 = bundle.fma->dest_type == nir_type_float16;
         bool f32 = bundle.fma->dest_type == nir_type_float32;
-        bool u32 = bundle.fma->dest_type == nir_type_uint32;
+        bool u32 = bundle.fma->dest_type == nir_type_uint32 ||
+                bundle.fma->dest_type == nir_type_bool32;
         bool u16 = bundle.fma->dest_type == nir_type_uint16;
         ASSERTED bool u8 = bundle.fma->dest_type == nir_type_uint8;
         bool s32 = bundle.fma->dest_type == nir_type_int32;
@@ -664,7 +665,8 @@ bi_pack_add(bi_clause *clause, bi_bundle bundle, bi_registers *regs, gl_shader_s
 
         bool f16 = bundle.add->dest_type == nir_type_float16;
         bool f32 = bundle.add->dest_type == nir_type_float32;
-        bool u32 = bundle.add->dest_type == nir_type_uint32;
+        bool u32 = bundle.add->dest_type == nir_type_uint32 ||
+                bundle.add->dest_type == nir_type_bool32;
         bool u16 = bundle.add->dest_type == nir_type_uint16;
         bool s32 = bundle.add->dest_type == nir_type_int32;
         bool s16 = bundle.add->dest_type == nir_type_int16;