From a8eed0299df3b233a80031ebe86cac785458eade Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sun, 28 Apr 2013 14:35:01 -0700 Subject: 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 --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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: -- cgit v1.2.3