From: Ove Kaaven Date: Tue, 29 Apr 2008 20:14:05 +0000 (+0200) Subject: r200: fix state submission issue causing bogus textures (bug 15730) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4f474c7d1e1e6807af0f3db55f641fbd66be2e90;p=mesa.git r200: fix state submission issue causing bogus textures (bug 15730) --- diff --git a/src/mesa/drivers/dri/r200/r200_texstate.c b/src/mesa/drivers/dri/r200/r200_texstate.c index 05ff5952f3e..4edf3044388 100644 --- a/src/mesa/drivers/dri/r200/r200_texstate.c +++ b/src/mesa/drivers/dri/r200/r200_texstate.c @@ -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++) {