Mesa (main): ir3/lower_subgroups: Support 16-bit READ_* sources
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Oct 11 11:42:37 UTC 2021
Module: Mesa
Branch: main
Commit: bf0013f3c54f2f6a3748bc1637585b49f09de1f4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bf0013f3c54f2f6a3748bc1637585b49f09de1f4
Author: Connor Abbott <cwabbott0 at gmail.com>
Date: Fri Oct 8 18:03:05 2021 +0200
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>
---
src/freedreno/ir3/ir3_lower_subgroups.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/freedreno/ir3/ir3_lower_subgroups.c b/src/freedreno/ir3/ir3_lower_subgroups.c
index 84235cea917..b5295357059 100644
--- a/src/freedreno/ir3/ir3_lower_subgroups.c
+++ b/src/freedreno/ir3/ir3_lower_subgroups.c
@@ -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;
}
More information about the mesa-commit
mailing list