glsl: set old ldexp operand to NULL when lowering
authorTimothy Arceri <tarceri@itsqueeze.com>
Thu, 17 Aug 2017 23:32:15 +0000 (09:32 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Fri, 18 Aug 2017 02:07:34 +0000 (12:07 +1000)
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 <brianp@vmware.com>
Tested-by: Brian Paul <brianp@vmware.com>
src/compiler/glsl/lower_instructions.cpp

index dfce900a16b0417babf0d63dc744a75004e90b15..0c1408911d2164d41e303403723ec6a4e85658b2 100644 (file)
@@ -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;