i965: Avoid applying negate to wrong MAD source.
authorMatt Turner <mattst88@gmail.com>
Fri, 27 Feb 2015 18:59:17 +0000 (10:59 -0800)
committerMatt Turner <mattst88@gmail.com>
Sat, 28 Feb 2015 04:24:12 +0000 (20:24 -0800)
commitd528907fd2950c7bb968fff66dd79863cd128890
treee33753ff7b607c9dd5dd61790b563d7797a8cd75
parent43ef2657a08f850c5756f28520f2cbe506807f24
i965: Avoid applying negate to wrong MAD source.

For some given GLSL IR like (+ (neg x) (* 1.2 x)), the try_emit_mad
function would see that one of the +'s sources was a negate expression
and set mul_negate = true without confirming that it was actually a
multiply.

Cc: 10.5 <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89315
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89095
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp