Mesa (master): mesa: Update texenv program when _NEW_ARRAYS is updated as well.

Eric Anholt anholt at kemper.freedesktop.org
Wed Apr 15 12:56:57 PDT 2009


Module: Mesa
Branch: master
Commit: c710430f3ac05c0c6a528bb7b4f82383a26103d1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c710430f3ac05c0c6a528bb7b4f82383a26103d1

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Apr 10 16:47:14 2009 -0700

mesa: Update texenv program when _NEW_ARRAYS is updated as well.

This fixes a regression in fbotest1 on 915, where a transition from
color+vertex array enabled to texcoord0+vertex array enabled wouldn't trigger
program update on the second _mesa_update_state of DrawArrays, and we'd sample
a constant texcoord of 0,0,0,1 instead of the array.

The double state update in DrawArrays from
1680ef869625dc1fe9cf481b180382a34e0738e7 still needs fixing.

---

 src/mesa/main/state.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index cc37d63..4f9088d 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -470,7 +470,8 @@ _mesa_update_state_locked( GLcontext *ctx )
 
    /* Determine which state flags effect vertex/fragment program state */
    if (ctx->FragmentProgram._MaintainTexEnvProgram) {
-      prog_flags |= (_NEW_TEXTURE | _NEW_FOG | _DD_NEW_SEPARATE_SPECULAR);
+      prog_flags |= (_NEW_TEXTURE | _NEW_FOG | _DD_NEW_SEPARATE_SPECULAR |
+		     _NEW_ARRAY);
    }
    if (ctx->VertexProgram._MaintainTnlProgram) {
       prog_flags |= (_NEW_ARRAY | _NEW_TEXTURE | _NEW_TEXTURE_MATRIX |



More information about the mesa-commit mailing list