From c03eefdf843098c93c8e95856e0e482a60915590 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Fri, 18 Aug 2017 09:32:15 +1000 Subject: [PATCH] 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 --- 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 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; -- 2.30.2