ir3: always set wrmask for movmsk
We failed to set the wrmask of movmsk expanded from ballot.macro. This
caused legalization to miss the need for (ss) when a component other
than the first is used.
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 1a78604d20
("ir3: Add support for subgroup arithmetic")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32918>
This commit is contained in:
@@ -468,10 +468,13 @@ lower_instr(struct ir3 *ir, struct ir3_block **block, struct ir3_instruction *in
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case OPC_BALLOT_MACRO: {
|
case OPC_BALLOT_MACRO: {
|
||||||
unsigned comp_count = util_last_bit(instr->dsts[0]->wrmask);
|
unsigned wrmask = instr->dsts[0]->wrmask;
|
||||||
|
unsigned comp_count = util_last_bit(wrmask);
|
||||||
struct ir3_instruction *movmsk = ir3_instr_create_at(
|
struct ir3_instruction *movmsk = ir3_instr_create_at(
|
||||||
ir3_before_terminator(then_block), OPC_MOVMSK, 1, 0);
|
ir3_before_terminator(then_block), OPC_MOVMSK, 1, 0);
|
||||||
ir3_dst_create(movmsk, instr->dsts[0]->num, instr->dsts[0]->flags);
|
struct ir3_register *dst =
|
||||||
|
ir3_dst_create(movmsk, instr->dsts[0]->num, instr->dsts[0]->flags);
|
||||||
|
dst->wrmask = wrmask;
|
||||||
movmsk->repeat = comp_count - 1;
|
movmsk->repeat = comp_count - 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user