From 56f90a6ac1946adbac3cd43102479158efd58bb1 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 22 Oct 2020 10:58:04 -0400 Subject: [PATCH] pan/bi: Account for bool32 ld_ubo reads Fixes crash in sway. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bi_pack.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/panfrost/bifrost/bi_pack.c b/src/panfrost/bifrost/bi_pack.c index 9f3cd9cb7ed..ba2bc55162c 100644 --- a/src/panfrost/bifrost/bi_pack.c +++ b/src/panfrost/bifrost/bi_pack.c @@ -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;