From: Matt Turner Date: Fri, 1 Mar 2013 00:26:57 +0000 (-0800) Subject: i965/fs: Put immediate operand as src2 X-Git-Tag: mesa-9.2.1~2532 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4154ac066f2cdeddfe934884b59c8f1ff393545d;p=platform%2Fupstream%2Fmesa.git i965/fs: Put immediate operand as src2 Immediate operands can only be src2 in 2-source instructions. Fixes piglit failures since 0a1d145e (oops!). Spotted-by: Eric Anholt Reviewed-by: Matt Turner --- diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index e6daf2f..de08b0b 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -210,7 +210,7 @@ fs_visitor::emit_lrp(fs_reg dst, fs_reg x, fs_reg y, fs_reg a) emit(MUL(y_times_a, y, a)); a.negate = !a.negate; - emit(ADD(one_minus_a, fs_reg(1.0f), a)); + emit(ADD(one_minus_a, a, fs_reg(1.0f))); emit(MUL(x_times_one_minus_a, x, one_minus_a)); emit(ADD(dst, x_times_one_minus_a, y_times_a));