From 4f474c7d1e1e6807af0f3db55f641fbd66be2e90 Mon Sep 17 00:00:00 2001 From: Ove Kaaven Date: Tue, 29 Apr 2008 22:14:05 +0200 Subject: r200: fix state submission issue causing bogus textures (bug 15730) --- src/mesa/drivers/dri/r200/r200_texstate.c | 6 ++++++ 1 file changed, 6 insertions(+) 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++) { -- cgit v1.2.3