From: Matt Turner Date: Sun, 28 Apr 2013 21:35:01 +0000 (-0700) Subject: i965/vs: Fix order of source arguments to LRP. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a8eed0299df3b233a80031ebe86cac785458eade;p=mesa.git i965/vs: Fix order of source arguments to LRP. The order or arguments matches DirectX, and is backwards from GLSL's mix() built-in. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63983 --- diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index 88c435ca292..31da01f143b 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp @@ -1631,7 +1631,10 @@ vec4_visitor::visit(ir_expression *ir) op[0] = fix_3src_operand(op[0]); op[1] = fix_3src_operand(op[1]); op[2] = fix_3src_operand(op[2]); - emit(LRP(result_dst, op[0], op[1], op[2])); + /* Note that the instruction's argument order is reversed from GLSL + * and the IR. + */ + emit(LRP(result_dst, op[2], op[1], op[0])); break; case ir_quadop_vector: