diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-02-27 09:37:28 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-02-27 21:02:35 +0000 |
commit | 93ca47e046ca1cd1385e5941f3dea731ffe8e5af (patch) | |
tree | 09ef9710c9f413610f5ae9eef0f5cfc65376cb24 /src/panfrost | |
parent | fd888d351f60c7dcfaff475c083c9be7bc1be626 (diff) |
pan/midgard: Round up bytemasks when promoting uniforms
Fixes crashes with uniform promotion in certain mixed type
circumstances.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3978>
Diffstat (limited to 'src/panfrost')
-rw-r--r-- | src/panfrost/midgard/mir_promote_uniforms.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/panfrost/midgard/mir_promote_uniforms.c b/src/panfrost/midgard/mir_promote_uniforms.c index 2dbea712579..2d7aabed49c 100644 --- a/src/panfrost/midgard/mir_promote_uniforms.c +++ b/src/panfrost/midgard/mir_promote_uniforms.c @@ -160,7 +160,8 @@ midgard_promote_uniforms(compiler_context *ctx) if (ins->load_64) mov.alu.reg_mode = midgard_reg_mode_64; - mir_set_bytemask(&mov, mir_bytemask(ins)); + uint16_t rounded = mir_round_bytemask_up(mir_bytemask(ins), mov.alu.reg_mode); + mir_set_bytemask(&mov, rounded); mir_insert_instruction_before(ctx, ins, mov); } else { mir_rewrite_index_src(ctx, ins->dest, promoted); |