From: Alyssa Rosenzweig Date: Thu, 27 Feb 2020 14:37:28 +0000 (-0500) Subject: pan/midgard: Round up bytemasks when promoting uniforms X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=93ca47e046ca1cd1385e5941f3dea731ffe8e5af;p=mesa.git pan/midgard: Round up bytemasks when promoting uniforms Fixes crashes with uniform promotion in certain mixed type circumstances. Signed-off-by: Alyssa Rosenzweig Part-of: --- 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);