mesa/st: Don't copy propagate from swizzles. 14/6514/1
authorFabian Bieler <fabianbieler@fastmail.fm>
Sat, 20 Apr 2013 17:40:11 +0000 (19:40 +0200)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 8 May 2013 20:59:14 +0000 (13:59 -0700)
commite1ff753d67a355ad20443173b99613a1198331c1
tree6166bd6bdb8f502abd34610fc9a6fbfbc0b9b325
parent5d06c9ea0f1aa2f312660413acd1bd6a1dafe1a6
mesa/st: Don't copy propagate from swizzles.

Do not propagate a copy if source and destination are identical.

Otherwise code like

MOV TEMP[0].xyzw, TEMP[0].wzyx
MOV TEMP[1].xyzw, TEMP[0].xyzw

is changed to

MOV TEMP[0].xyzw, TEMP[0].wzyx
MOV TEMP[1].xyzw, TEMP[0].wzyx

This fixes Piglit test shaders/glsl-copy-propagation-self-2 for gallium drivers.

NOTE: This is a candidate for the stable branches.
Signed-off-by: Fabian Bieler <fabianbieler@fastmail.fm>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp