[Mesa-dev] [PATCH] meta: Unbind texture from FBO after completeness check
Ian Romanick
idr at freedesktop.org
Thu Feb 9 17:27:36 PST 2012
From: Ian Romanick <ian.d.romanick at intel.com>
---
src/mesa/drivers/common/meta.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index aa5fef8..3647395 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -2661,6 +2661,13 @@ _mesa_meta_check_generate_mipmap_fallback(struct gl_context *ctx, GLenum target,
status = _mesa_CheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
+ /* Unbind the texture from the FBO. Note that the texture will be rebound
+ * (many times) during mipmap generation.
+ */
+ _mesa_FramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT,
+ GL_COLOR_ATTACHMENT0_EXT,
+ GL_TEXTURE_2D, 0, 0);
+
_mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, fboSave);
if (status != GL_FRAMEBUFFER_COMPLETE_EXT) {
--
1.7.6.4
More information about the mesa-dev
mailing list