glsl2: Catch pointless copies in copy propagation.
authorEric Anholt <eric@anholt.net>
Thu, 5 Aug 2010 06:23:15 +0000 (23:23 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 5 Aug 2010 16:17:45 +0000 (09:17 -0700)
commitc5b9cab49900cbcab78911361976a3678d49e853
tree31b1e314919911b72ffeb2cc27807ae9adffeec4
parent8f6a0c9ed985267c2d202cf85d17ac04bddfb9d2
glsl2: Catch pointless copies in copy propagation.

We wouldn't want to go rewriting dereferences to variables to point at
the same variable it did before.  While I didn't find a way to trigger
that, a shader in Yo Frankie managed to produce a self-assignment by
passing a constant to a function doing self assignment like this.

Cleans up the IR for glsl-deadcode-self-assign.shader_test
src/glsl/ir_copy_propagation.cpp