aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/cell/ppu/cell_context.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-10-22 10:34:13 -0600
committerBrian Paul <[email protected]>2008-10-22 10:34:13 -0600
commit70dd4379d2cd54f229c3940312537912470218d3 (patch)
treecf24b8e884221c7637cf9c9b27890c2c9b8ec599 /src/gallium/drivers/cell/ppu/cell_context.c
parent0ae4728eb429d7b5217d34ec96fc973a5e7cfe95 (diff)
cell: implement fencing for texture buffers
If we delete a texture, we need to keep the underlying tiled data buffer around until any rendering that references it has completed. Keep a list of buffers referenced by a rendering batch. Unref/free them when the associated batch's fence is executed/signalled.
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 7a2d93ecb4f..22d552d8e3d 100644
--- a/src/gallium/drivers/cell/ppu/cell_context.c
+++ b/src/gallium/drivers/cell/ppu/cell_context.c
@@ -47,6 +47,7 @@
#include "cell_clear.h"
#include "cell_context.h"
#include "cell_draw_arrays.h"
+#include "cell_fence.h"
#include "cell_flush.h"
#include "cell_state.h"
#include "cell_surface.h"
@@ -104,6 +105,7 @@ cell_create_context(struct pipe_screen *screen,
struct cell_winsys *cws)
{
struct cell_context *cell;
+ uint i;
/* some fields need to be 16-byte aligned, so align the whole object */
cell = (struct cell_context*) align_malloc(sizeof(struct cell_context), 16);
@@ -151,6 +153,10 @@ cell_create_context(struct pipe_screen *screen,
cell_debug_flags,
0 );
+ for (i = 0; i < CELL_NUM_BUFFERS; i++)
+ cell_fence_init(&cell->fenced_buffers[i].fence);
+
+
/*
* SPU stuff
*/