mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
pan/bi: Handle discard/branch in get_component_count
No dest requires special handling. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4883>
This commit is contained in:
parent
8ab5c97895
commit
7a9b9859e7
1 changed files with 5 additions and 0 deletions
|
|
@ -96,6 +96,11 @@ bi_from_bytemask(uint16_t bytemask, unsigned bytes)
|
|||
unsigned
|
||||
bi_get_component_count(bi_instruction *ins, signed src)
|
||||
{
|
||||
/* Discards and branches are oddball since they're not BI_VECTOR but no
|
||||
* destination. So special case.. */
|
||||
if (ins->type == BI_DISCARD || ins->type == BI_BRANCH)
|
||||
return 1;
|
||||
|
||||
if (bi_class_props[ins->type] & BI_VECTOR) {
|
||||
assert(ins->vector_channels);
|
||||
return (src <= 0) ? ins->vector_channels : 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue