diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-05-07 10:13:35 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-21 17:49:13 +0000 |
commit | 40e9bee714ebecd8ebbba39d81712ba3714319f4 (patch) | |
tree | 5d5c33eb722dcafe70466abc18823eb8423a9ffd /src/panfrost/midgard | |
parent | eb28a3669be8e9d13b80d1a2859120058c9bccb5 (diff) |
pan/mdg: Fix constant combining crash
We need to round up.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151>
Diffstat (limited to 'src/panfrost/midgard')
-rw-r--r-- | src/panfrost/midgard/midgard_schedule.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/panfrost/midgard/midgard_schedule.c b/src/panfrost/midgard/midgard_schedule.c index 77737410cfd..c77eee16fce 100644 --- a/src/panfrost/midgard/midgard_schedule.c +++ b/src/panfrost/midgard/midgard_schedule.c @@ -399,7 +399,9 @@ mir_adjust_constants(midgard_instruction *ins, midgard_reg_mode src_mode = mir_srcsize(ins, src); unsigned type_size = mir_bytes_for_mode(src_mode); unsigned max_comp = 16 / type_size; - unsigned comp_mask = mir_from_bytemask(mir_bytemask_of_read_components_index(ins, src), + unsigned comp_mask = mir_from_bytemask(mir_round_bytemask_up( + mir_bytemask_of_read_components_index(ins, src), + dst_mode), dst_mode); unsigned type_mask = (1 << type_size) - 1; |