diff options
author | Eric Anholt <[email protected]> | 2009-05-16 01:47:44 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2009-11-06 13:16:49 -0800 |
commit | e4e312d493847e07ced026b93d2b588b8036ae02 (patch) | |
tree | 818a1506a6d37fb672b2f16f18dfb27508d543f2 /src/mesa/shader/program_lexer.l | |
parent | ee0a9e6e10060287747d9dd4afead3cbbb168e09 (diff) |
mesa: Add an optimization path to remove use of pointless MOVs.
GLSL code such as:
vec4 result = {0, 1, 0, 0};
gl_FragColor = result;
emits code like:
0: MOV TEMP[0], CONST[0];
1: MOV OUTPUT[1], TEMP[0];
and this replaces it with:
0: MOV TEMP[0], CONST[0];
1: MOV OUTPUT[1], CONST[0];
Even when the dead code eliminator fails to clean up a now-useless MOV
instruction (since it doesn't do live/dead ranges), this should at reduce
dependencies.
Diffstat (limited to 'src/mesa/shader/program_lexer.l')
0 files changed, 0 insertions, 0 deletions