Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85683
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85691
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
if (count >= op_const[i]->type->vector_elements)
break;
+ ir_expression_operation op = count == 1 ?
+ ir_binop_mul : ir_binop_dot;
+
/* Swizzle both operands to remove the channels that were zero. */
return new(mem_ctx)
- ir_expression(ir_binop_dot, glsl_type::float_type,
+ ir_expression(op, glsl_type::float_type,
new(mem_ctx) ir_swizzle(ir->operands[0],
components, count),
new(mem_ctx) ir_swizzle(ir->operands[1],