From: Timothy Arceri Date: Thu, 17 Aug 2017 23:32:15 +0000 (+1000) Subject: glsl: set old ldexp operand to NULL when lowering X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c03eefdf843098c93c8e95856e0e482a60915590;p=mesa.git glsl: set old ldexp operand to NULL when lowering This fixes an assert during IR validation in LLVMpipe. Fixes: e2e2c5abd279 (glsl: calculate number of operands in an expression once) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102274 Reviewed-by: Brian Paul Tested-by: Brian Paul --- diff --git a/src/compiler/glsl/lower_instructions.cpp b/src/compiler/glsl/lower_instructions.cpp index dfce900a16b..0c1408911d2 100644 --- a/src/compiler/glsl/lower_instructions.cpp +++ b/src/compiler/glsl/lower_instructions.cpp @@ -482,6 +482,7 @@ lower_instructions_visitor::ldexp_to_arith(ir_expression *ir) 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;