i965: Handle negated unsigned immediate values in constant propagation.
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 6 Feb 2015 12:38:20 +0000 (14:38 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Tue, 10 Feb 2015 17:09:25 +0000 (19:09 +0200)
commitaef83957e1e13ecb96df436d53373ecc4cedeb08
treea400b93bd0d32410407db97934d4e9a86358208f
parent64fde7b31c419685aa8ef6060828e21b9a11ef51
i965: Handle negated unsigned immediate values in constant propagation.

Negation of UD/UW sources behaves the same as for D/W sources, taking
the two's complement of the source, except for bitwise logical
operations on Gen8 and up which take the one's complement.  Fixes
crash in a GLSL shader with subtraction of two unsigned values.

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
src/mesa/drivers/dri/i965/brw_shader.cpp
src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp