ir3/lower_subgroups: Support 16-bit READ_* sources

With VK_EXT_shader_subgroup_extended_types these will have 16-bit
sources that need to be expanded to 32-bit (and then narrowed again).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13271>
This commit is contained in:
Connor Abbott 2021-10-08 18:03:05 +02:00 committed by Marge Bot
parent 3b9b6db031
commit bf0013f3c5
1 changed files with 3 additions and 1 deletions

View File

@ -218,7 +218,9 @@ lower_block(struct ir3 *ir, struct ir3_block **block)
ir3_dst_create(mov, instr->dsts[0]->num, instr->dsts[0]->flags);
struct ir3_register *new_src = ir3_src_create(mov, 0, 0);
*new_src = *instr->srcs[src];
mov->cat1.dst_type = mov->cat1.src_type = TYPE_U32;
mov->cat1.dst_type = TYPE_U32;
mov->cat1.src_type =
(new_src->flags & IR3_REG_HALF) ? TYPE_U16 : TYPE_U32;
break;
}