diff options
author | Benjamin Segovia <benjamin.segovia@intel.com> | 2010-08-16 20:40:09 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-08-17 14:57:18 -0700 |
commit | 5a38e70d59eb54aa375fb0f19c824bb74b71486d (patch) | |
tree | 7e1bd1f7fe23a197f86316938ef6caea445e4542 /src | |
parent | 608f749ec3fc655d3e67e572fa2e256a42c16878 (diff) |
prog_optimize: Only merge writes to temporary registers
In one optimization pass, register files may have been messed therefore
merging instructions which use the same index in two different register
files.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/program/prog_optimize.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/program/prog_optimize.c b/src/mesa/program/prog_optimize.c index ab878755e2..0dc779073d 100644 --- a/src/mesa/program/prog_optimize.c +++ b/src/mesa/program/prog_optimize.c @@ -758,7 +758,11 @@ _mesa_remove_extra_moves(struct gl_program *prog) nesting--; break; case OPCODE_MOV: - if (i > 0 && can_downward_mov_be_modifed(mov) && nesting == 0) { + if (i > 0 && + can_downward_mov_be_modifed(mov) && + mov->SrcReg[0].File == PROGRAM_TEMPORARY && + nesting == 0) + { /* see if this MOV can be removed */ const GLuint id = mov->SrcReg[0].Index; |