summaryrefslogtreecommitdiff
path: root/dist/Mesa/src/mesa/main/framebuffer.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2008-02-12 21:09:28 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2008-02-12 21:09:28 +0000
commitb597d23cbc3cc1c1361b89e621fcca7ddf9c024a (patch)
tree931175127192ecb3f18f61b71ed40d57e5612576 /dist/Mesa/src/mesa/main/framebuffer.c
parent95e90dfb93882027d8e88ed60c6d24fb226511e7 (diff)
Update to Mesa 7.0.2. Tested by naddy@ (full ports build), simon@
and oga@ (with dri enabled).
Diffstat (limited to 'dist/Mesa/src/mesa/main/framebuffer.c')
-rw-r--r--dist/Mesa/src/mesa/main/framebuffer.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/dist/Mesa/src/mesa/main/framebuffer.c b/dist/Mesa/src/mesa/main/framebuffer.c
index 1fd31a532..8aeb36950 100644
--- a/dist/Mesa/src/mesa/main/framebuffer.c
+++ b/dist/Mesa/src/mesa/main/framebuffer.c
@@ -38,6 +38,7 @@
#include "fbobject.h"
#include "framebuffer.h"
#include "renderbuffer.h"
+#include "texobj.h"
@@ -190,17 +191,11 @@ _mesa_free_framebuffer_data(struct gl_framebuffer *fb)
_mesa_reference_renderbuffer(&att->Renderbuffer, NULL);
}
if (att->Texture) {
- /* render to texture */
- att->Texture->RefCount--;
- if (att->Texture->RefCount == 0) {
- GET_CURRENT_CONTEXT(ctx);
- if (ctx) {
- ctx->Driver.DeleteTexture(ctx, att->Texture);
- }
- }
+ _mesa_reference_texobj(&att->Texture, NULL);
}
+ ASSERT(!att->Renderbuffer);
+ ASSERT(!att->Texture);
att->Type = GL_NONE;
- att->Texture = NULL;
}
/* unbind _Depth/_StencilBuffer to decr ref counts */