jay: legalize shuffle(ugpr) for now

fixes sascha descriptorindexing .. we'll probably want to revert once divergence
analysis & isel agree but until the multipolygon + anv circus settles this
is better than blowing up. See
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41670 for context.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41808>
This commit is contained in:
Alyssa Rosenzweig 2026-05-27 10:43:49 -04:00 committed by Marge Bot
parent 4a74c773ff
commit 283eef8ac0

View file

@ -194,6 +194,16 @@ jay_lower_pre_ra(jay_shader *s)
jay_foreach_inst_in_func(f, block, I) {
jay_builder b = { .shader = s, .func = f };
/* Shuffle(UGPR) can result from copyprop if there's a mismatch between
* isel and divergence analysis (e.g. because multipolygon is
* disabled). Legalize.
*/
if (I->op == JAY_OPCODE_SHUFFLE && I->src[0].file == UGPR) {
assert(!I->predication);
I->op = JAY_OPCODE_MOV;
jay_shrink_sources(I, 1);
}
/* lower_immediates must be last since it consumes I */
lower_contiguous_sources(&b, I);
lower_immediates(&b, I, constants);