radeon/r200/r600: fix drivers for changes in 433f0a82f5a4696e6b0c4061f645485ec8079bb4
authorAlex Deucher <alexdeucher@gmail.com>
Sat, 5 Dec 2009 23:24:41 +0000 (18:24 -0500)
committerAlex Deucher <alexdeucher@gmail.com>
Sat, 5 Dec 2009 23:24:41 +0000 (18:24 -0500)
src/mesa/drivers/dri/r200/r200_texstate.c
src/mesa/drivers/dri/r600/r600_texstate.c
src/mesa/drivers/dri/radeon/radeon_texstate.c

index 7782404a7944711d3ea6f9b42ae5830589b96159..e2f9cf0ea86f9a03e3f1764682dfb5e59f9cdfe0 100644 (file)
@@ -797,24 +797,13 @@ void r200SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo
            return;
        }
 
-       radeon_update_renderbuffers(pDRICtx, dPriv);
-       /* back & depth buffer are useless free them right away */
-       rb = (void*)rfb->base.Attachment[BUFFER_DEPTH].Renderbuffer;
-       if (rb && rb->bo) {
-               radeon_bo_unref(rb->bo);
-        rb->bo = NULL;
-       }
-       rb = (void*)rfb->base.Attachment[BUFFER_BACK_LEFT].Renderbuffer;
-       if (rb && rb->bo) {
-               radeon_bo_unref(rb->bo);
-               rb->bo = NULL;
-       }
+       radeon_update_renderbuffers(pDRICtx, dPriv, GL_TRUE);
        rb = rfb->color_rb[0];
        if (rb->bo == NULL) {
                /* Failed to BO for the buffer */
                return;
        }
-       
+
        _mesa_lock_texture(radeon->glCtx, texObj);
        if (t->bo) {
                radeon_bo_unref(t->bo);
index 4ec315b78c7439a8f053bf96db3a3aeae4d1d19c..2a4a6e6ee146bd599348b6bf9f0618027ad8a59e 100644 (file)
@@ -917,18 +917,7 @@ void r600SetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_fo
            return;
        }
 
-       radeon_update_renderbuffers(pDRICtx, dPriv);
-       /* back & depth buffer are useless free them right away */
-       rb = (void*)rfb->base.Attachment[BUFFER_DEPTH].Renderbuffer;
-       if (rb && rb->bo) {
-               radeon_bo_unref(rb->bo);
-        rb->bo = NULL;
-       }
-       rb = (void*)rfb->base.Attachment[BUFFER_BACK_LEFT].Renderbuffer;
-       if (rb && rb->bo) {
-               radeon_bo_unref(rb->bo);
-               rb->bo = NULL;
-       }
+       radeon_update_renderbuffers(pDRICtx, dPriv, GL_TRUE);
        rb = rfb->color_rb[0];
        if (rb->bo == NULL) {
                /* Failed to BO for the buffer */
index 3cbe3b472548b792a532c4c8895fadb92dc32044..84ddcfd4fd36c9462cc84ec887ad5510ce71ea0d 100644 (file)
@@ -672,24 +672,13 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_
            return;
        }
 
-       radeon_update_renderbuffers(pDRICtx, dPriv);
-       /* back & depth buffer are useless free them right away */
-       rb = (void*)rfb->base.Attachment[BUFFER_DEPTH].Renderbuffer;
-       if (rb && rb->bo) {
-               radeon_bo_unref(rb->bo);
-        rb->bo = NULL;
-       }
-       rb = (void*)rfb->base.Attachment[BUFFER_BACK_LEFT].Renderbuffer;
-       if (rb && rb->bo) {
-               radeon_bo_unref(rb->bo);
-               rb->bo = NULL;
-       }
+       radeon_update_renderbuffers(pDRICtx, dPriv, GL_TRUE);
        rb = rfb->color_rb[0];
        if (rb->bo == NULL) {
                /* Failed to BO for the buffer */
                return;
        }
-       
+
        _mesa_lock_texture(radeon->glCtx, texObj);
        if (t->bo) {
                radeon_bo_unref(t->bo);