summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/cell/ppu/cell_context.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-10-07 14:34:08 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-10-07 14:34:29 -0600
commit44799c3b7e0e4260b93e68a5da5a03c9279ac26a (patch)
tree90adb77c64b78841f8d8839fca75eebb58c20b22 /src/gallium/drivers/cell/ppu/cell_context.c
parentf192ad5ebca138a21fd372fa268ba2b0f4f8b147 (diff)
cell: use new keymap to save/re-use fragment ops code
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 62e213ea35..30ce6f9762 100644
--- a/src/gallium/drivers/cell/ppu/cell_context.c
+++ b/src/gallium/drivers/cell/ppu/cell_context.c
@@ -62,6 +62,8 @@ cell_destroy_context( struct pipe_context *pipe )
{
struct cell_context *cell = cell_context(pipe);
+ util_delete_keymap(cell->fragment_ops_cache, NULL);
+
cell_spu_exit(cell);
align_free(cell);
@@ -131,6 +133,10 @@ cell_create_context(struct pipe_screen *screen,
cell->draw = cell_draw_create(cell);
+ /* Create cache of fragment ops generated code */
+ cell->fragment_ops_cache =
+ util_new_keymap(sizeof(struct cell_fragment_ops_key), ~0, NULL);
+
cell_init_vbuf(cell);
draw_set_rasterize_stage(cell->draw, cell->vbuf);