From 2897cee99fb877e1f3cd9a881a61418c9c31867f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 29 Jan 2009 09:20:18 -0700 Subject: mesa: fix a render to texture FBO validation bug When glTexImage() is called we need to re-validate any FBOs that point to the texture (i.e. render-to-texture) since changing the texture's size/format will effect FBO completeness. We don't keep a list of all FBOs rendering into each texture (which would be a bit messy) so we check all FBOs in existance. To optimize this, the gl_texture_object->_RenderToTexture flag is used to avoid checking textures that have never been used as renderbuffers. So, we only walk over all FBOs (there's usually only a few) when glTexImage() modifies a RTT texture. Fixes a bug seen in shadowtex.c when toggling packed depth/stencil mode. --- src/mesa/main/mtypes.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa/main/mtypes.h') diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index da243eceac..ad9225e5a9 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1448,6 +1448,7 @@ struct gl_texture_object GLuint _Swizzle; /**< same as Swizzle, but SWIZZLE_* format */ GLboolean GenerateMipmap; /**< GL_SGIS_generate_mipmap */ GLboolean _Complete; /**< Is texture object complete? */ + GLboolean _RenderToTexture; /**< Any rendering to this texture? */ /** Actual texture images, indexed by [cube face] and [mipmap level] */ struct gl_texture_image *Image[MAX_FACES][MAX_TEXTURE_LEVELS]; -- cgit v1.2.3