From: Dave Airlie <airl...@redhat.com> If this function saw a 32-bit source it would just return the IR without doing any conversion, this adds the ability to denote where 32-bit sources are expected and will be used in subsequent patches to add 32->64 conversions.
Signed-off-by: Dave Airlie <airl...@redhat.com> --- src/compiler/glsl/lower_64bit.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/compiler/glsl/lower_64bit.cpp b/src/compiler/glsl/lower_64bit.cpp index cee7982..8405598 100644 --- a/src/compiler/glsl/lower_64bit.cpp +++ b/src/compiler/glsl/lower_64bit.cpp @@ -122,7 +122,7 @@ private: ir_factory added_functions; ir_rvalue *handle_op(ir_expression *ir, const char *function_name, - function_generator generator); + function_generator generator, bool conv_from_32bit = false); }; } /* anonymous namespace */ @@ -350,12 +350,15 @@ lower_64bit::lower_op_to_function_call(ir_instruction *base_ir, ir_rvalue * lower_64bit_visitor::handle_op(ir_expression *ir, const char *function_name, - function_generator generator) + function_generator generator, + bool conv_from_32bit) { - for (unsigned i = 0; i < ir->num_operands; i++) - if (!ir->operands[i]->type->is_integer_64()) - return ir; - + if (conv_from_32bit == false) { + for (unsigned i = 0; i < ir->num_operands; i++) + if (!ir->operands[i]->type->is_integer_64() && + !ir->operands[i]->type->is_double()) + return ir; + } /* Get a handle to the correct ir_function_signature for the core * operation. */ -- 2.9.5 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev