pan/bi: Force BI_SELECT arguments scalar

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4766>
This commit is contained in:
Alyssa Rosenzweig 2020-04-24 20:52:28 -04:00 committed by Marge Bot
parent c12081dca1
commit a5bfe59196
1 changed files with 4 additions and 0 deletions

View File

@ -100,6 +100,10 @@ bi_get_component_count(bi_instruction *ins, signed src)
return (src <= 0) ? ins->vector_channels : 1;
} else {
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);
}
}