i965/vec4: Fix constant propagation across different types.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 3 Feb 2015 20:48:27 +0000 (22:48 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Thu, 19 Feb 2015 12:06:42 +0000 (14:06 +0200)
commitbda7698fce21daa1b94bc79c0a0ed3da8d385997
tree34a02cf0f2f2f5b8e7d37b7e9f77c29f518052a8
parent187ace73a93d87122a977e4afade237be159ab04
i965/vec4: Fix constant propagation across different types.

If the source type differs from the original type of the constant we
need to bit-cast it before propagating, otherwise the original type
information will be lost.  If the constant was a vector float there
isn't much we can do, because the result of bit-casting the component
values of a vector float cannot itself be represented as an immediate.

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