OSDN Git Service

r200: fix state submission issue causing bogus textures (bug 15730)
authorOve Kaaven <ovek@arcticnet.no>
Tue, 29 Apr 2008 20:14:05 +0000 (22:14 +0200)
committerRoland Scheidegger <sroland@tungstengraphics.com>
Tue, 29 Apr 2008 20:14:05 +0000 (22:14 +0200)
src/mesa/drivers/dri/r200/r200_texstate.c

index 05ff595..4edf304 100644 (file)
@@ -1815,6 +1815,12 @@ void r200UpdateTextureState( GLcontext *ctx )
    GLboolean ok;
    GLuint dbg;
 
+   /* NOTE: must not manipulate rmesa->state.texture.unit[].unitneeded or
+      rmesa->state.envneeded before a R200_STATECHANGE (or R200_NEWPRIM) since
+      we use these to determine if we want to emit the corresponding state
+      atoms. */
+   R200_NEWPRIM( rmesa );
+
    if (ctx->ATIFragmentShader._Enabled) {
       GLuint i;
       for (i = 0; i < R200_MAX_TEXTURE_UNITS; i++) {