mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 19:58:09 +02:00
pan/midgard: Add mir_set_bytemask helper
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
parent
85cc40f7ce
commit
9bba182840
2 changed files with 7 additions and 0 deletions
|
|
@ -518,6 +518,7 @@ midgard_reg_mode mir_typesize(midgard_instruction *ins);
|
|||
uint16_t mir_from_bytemask(uint16_t bytemask, midgard_reg_mode mode);
|
||||
uint16_t mir_bytemask(midgard_instruction *ins);
|
||||
uint16_t mir_round_bytemask_down(uint16_t mask, midgard_reg_mode mode);
|
||||
void mir_set_bytemask(midgard_instruction *ins, uint16_t bytemask);
|
||||
|
||||
/* MIR printing */
|
||||
|
||||
|
|
|
|||
|
|
@ -525,6 +525,12 @@ mir_bytemask(midgard_instruction *ins)
|
|||
return mir_to_bytemask(mir_typesize(ins), ins->mask);
|
||||
}
|
||||
|
||||
void
|
||||
mir_set_bytemask(midgard_instruction *ins, uint16_t bytemask)
|
||||
{
|
||||
ins->mask = mir_from_bytemask(bytemask, mir_typesize(ins));
|
||||
}
|
||||
|
||||
/* Creates a mask of the components of a node read by an instruction, by
|
||||
* analyzing the swizzle with respect to the instruction's mask. E.g.:
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue