summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/cell/ppu/cell_context.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-12-26 18:43:39 +0100
committerMarek Olšák <maraeo@gmail.com>2011-01-06 16:16:29 +0100
commit3c9aa3a7b12cfe178c14fea93cfb64a32db0b8ad (patch)
tree5bc57604dfc2f71d6ce696689750a0bec2147bf8 /src/gallium/drivers/cell/ppu/cell_context.c
parent58c5e782e351621bde2693fa945d0c90d140b855 (diff)
gallium: drivers should reference vertex buffers
So that a state tracker can unreference them after set_vertex_buffers.
Diffstat (limited to 'src/gallium/drivers/cell/ppu/cell_context.c')
-rw-r--r--src/gallium/drivers/cell/ppu/cell_context.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/cell/ppu/cell_context.c b/src/gallium/drivers/cell/ppu/cell_context.c
index b6b3a700cd..f9b83c8666 100644
--- a/src/gallium/drivers/cell/ppu/cell_context.c
+++ b/src/gallium/drivers/cell/ppu/cell_context.c
@@ -37,6 +37,7 @@
#include "pipe/p_format.h"
#include "util/u_memory.h"
#include "pipe/p_screen.h"
+#include "util/u_inlines.h"
#include "draw/draw_context.h"
#include "draw/draw_private.h"
@@ -61,6 +62,11 @@ static void
cell_destroy_context( struct pipe_context *pipe )
{
struct cell_context *cell = cell_context(pipe);
+ unsigned i;
+
+ for (i = 0; i < cell->num_vertex_buffers; i++) {
+ pipe_resource_reference(&cell->vertex_buffer[i].buffer, NULL);
+ }
util_delete_keymap(cell->fragment_ops_cache, NULL);