diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-10-23 20:19:11 -0400 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-10-25 08:45:39 -0400 |
commit | 9bba18284027bfa26826c458b0b726a79edd9a63 (patch) | |
tree | bc88eea30abf1af9d541add63a3bbab282f4245c /src/panfrost/midgard/mir.c | |
parent | 85cc40f7ce3460ea4b4b1a6a98a9f56520dbbb04 (diff) |
pan/midgard: Add mir_set_bytemask helper
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/midgard/mir.c')
-rw-r--r-- | src/panfrost/midgard/mir.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/panfrost/midgard/mir.c b/src/panfrost/midgard/mir.c index 76c99a2e05c..db26acd8cb1 100644 --- a/src/panfrost/midgard/mir.c +++ b/src/panfrost/midgard/mir.c @@ -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.: * |