softpipe: Don't call pipe_buffer_destroy directly.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Thu, 30 Oct 2008 07:47:20 +0000 (16:47 +0900)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Mon, 3 Nov 2008 13:35:24 +0000 (22:35 +0900)
Use pipe_buffer_reference instead.

src/mesa/state_tracker/st_cb_bitmap.c
src/mesa/state_tracker/st_cb_clear.c

index 694104f9cfb10734406b030c8d8a1a1cd07ae02c..3d508227e1266e59bf935cbe0bf13b2142f25a1f 100644 (file)
@@ -779,7 +779,7 @@ st_destroy_bitmap(struct st_context *st)
    }
 
    if (st->bitmap.vbuf) {
-      pipe_buffer_destroy(pipe->screen, st->bitmap.vbuf);
+      pipe_buffer_reference(pipe->screen, &st->bitmap.vbuf, NULL);
       st->bitmap.vbuf = NULL;
    }
 
index 47ad3c2bc1264d5e56b8c42197ee6521e4e29371..ee282e8e20c9f796f9510c30d1c3b1d60d9fe6d6 100644 (file)
@@ -116,7 +116,7 @@ st_destroy_clear(struct st_context *st)
       st->clear.vs = NULL;
    }
    if (st->clear.vbuf) {
-      pipe_buffer_destroy(pipe->screen, st->clear.vbuf);
+      pipe_buffer_reference(pipe->screen, &st->clear.vbuf, NULL);
       st->clear.vbuf = NULL;
    }
 }