diff options
author | Brian Paul <brianp@vmware.com> | 2010-01-08 08:21:12 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-01-08 08:21:12 -0700 |
commit | fd70841121475d7aad98812d6bf9c9c67567b89a (patch) | |
tree | 13f7eef837abc0151dc663a2b6fed04d7f2cc578 /src/mesa/shader | |
parent | a1de400e8de06a80ab140bb0fa950e990607572d (diff) | |
parent | 674c76310fe93dd3d7a15af0f72bb9f04351d09f (diff) | |
download | external_mesa3d-fd70841121475d7aad98812d6bf9c9c67567b89a.zip external_mesa3d-fd70841121475d7aad98812d6bf9c9c67567b89a.tar.gz external_mesa3d-fd70841121475d7aad98812d6bf9c9c67567b89a.tar.bz2 |
Merge branch 'mesa_7_7_branch'
Conflicts:
src/mesa/drivers/dri/i965/brw_wm_emit.c
Diffstat (limited to 'src/mesa/shader')
-rw-r--r-- | src/mesa/shader/nvfragparse.c | 2 | ||||
-rw-r--r-- | src/mesa/shader/prog_optimize.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c index b739a6a..8ee7c93 100644 --- a/src/mesa/shader/nvfragparse.c +++ b/src/mesa/shader/nvfragparse.c @@ -642,7 +642,7 @@ Parse_SwizzleSuffix(const GLubyte *token, GLuint swizzle[4]) else { /* 4-component swizzle (vector) */ GLint k; - for (k = 0; token[k] && k < 4; k++) { + for (k = 0; k < 4 && token[k]; k++) { if (token[k] == 'x') swizzle[k] = 0; else if (token[k] == 'y') diff --git a/src/mesa/shader/prog_optimize.c b/src/mesa/shader/prog_optimize.c index 83d119e..ce41173 100644 --- a/src/mesa/shader/prog_optimize.c +++ b/src/mesa/shader/prog_optimize.c @@ -577,7 +577,7 @@ _mesa_remove_extra_moves(struct gl_program *prog) /* get pointer to previous instruction */ prevI = i - 1; - while (removeInst[prevI] && prevI > 0) + while (prevI > 0 && removeInst[prevI]) prevI--; prevInst = prog->Instructions + prevI; |