[Mesa-dev] [PATCH] Mesa prog_optimize.c: solve glsl2 regression
Benjamin Segovia
benjamin.segovia at intel.com
Mon Aug 16 20:40:09 PDT 2010
- In one optimization pass, register files may have been messed therefore
merging instructions which use the same index in two different register files
- The fix consists in only processing temporary registers as it must be
---
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 ab87875..0dc7790 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;
--
1.7.2.1
More information about the mesa-dev
mailing list