Commit a5bfe591 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig Committed by Marge Bot
Browse files

pan/bi: Force BI_SELECT arguments scalar



Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <mesa/mesa!4766>
parent c12081dc
...@@ -100,6 +100,10 @@ bi_get_component_count(bi_instruction *ins, signed src) ...@@ -100,6 +100,10 @@ bi_get_component_count(bi_instruction *ins, signed src)
return (src <= 0) ? ins->vector_channels : 1; return (src <= 0) ? ins->vector_channels : 1;
} else { } else {
unsigned bytes = nir_alu_type_get_type_size(src < 0 ? ins->dest_type : ins->src_types[src]); unsigned bytes = nir_alu_type_get_type_size(src < 0 ? ins->dest_type : ins->src_types[src]);
if (ins->type == BI_ATEST || ins->type == BI_SELECT)
return 1;
return MAX2(32 / bytes, 1); return MAX2(32 / bytes, 1);
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment