Reviewed-by: Brian Paul <bri...@vmware.com>
Tested-by: Brian Paul <bri...@vmware.com>

Thanks!

On 08/17/2017 05:43 PM, Timothy Arceri wrote:
This fixes an assert during IR validation in LLVMpipe.

Fixes: e2e2c5abd279 (glsl: calculate number of operands in an expression once)
Bugzilla: 
https://urldefense.proofpoint.com/v2/url?u=https-3A__bugs.freedesktop.org_show-5Fbug.cgi-3Fid-3D102274&d=DwIBAg&c=uilaK90D4TOVoH58JNXRgQ&r=Ie7_encNUsqxbSRbqbNgofw0ITcfE8JKfaUjIQhncGA&m=C_HR2mMHwC4AVFdmCWl4AlP-l2SmUkyM4Grzb8OIZ70&s=YgK1rxcOGtoM0IDUW2YNH9ICE5cd2rTXP3v1Lx5SUeA&e=
Cc: Brian Paul <bri...@vmware.com>
---
  src/compiler/glsl/lower_instructions.cpp | 1 +
  1 file changed, 1 insertion(+)

diff --git a/src/compiler/glsl/lower_instructions.cpp 
b/src/compiler/glsl/lower_instructions.cpp
index dfce900a16..0c1408911d 100644
--- a/src/compiler/glsl/lower_instructions.cpp
+++ b/src/compiler/glsl/lower_instructions.cpp
@@ -475,20 +475,21 @@ lower_instructions_visitor::ldexp_to_arith(ir_expression 
*ir)
        ir->init_num_operands();
        ir->operands[0] = bitfield_insert(bitcast_f2i(x), resulting_biased_exp,
                                          exp_shift_clone, exp_width);
        ir->operands[1] = NULL;
     } else {
        ir_constant *sign_mantissa_mask = new(ir) ir_constant(0x807fffffu, 
vec_elem);
        ir->operation = ir_unop_bitcast_u2f;
        ir->init_num_operands();
        ir->operands[0] = bit_or(bit_and(bitcast_f2u(x), sign_mantissa_mask),
                                 lshift(i2u(resulting_biased_exp), 
exp_shift_clone));
+      ir->operands[1] = NULL;
     }

     this->progress = true;
  }

  void
  lower_instructions_visitor::dldexp_to_arith(ir_expression *ir)
  {
     /* See ldexp_to_arith for structure. Uses frexp_exp to extract the exponent
      * from the significand.


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to