summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/i965/brw_context.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-11-06 14:20:04 +0000
committerKeith Whitwell <keithw@vmware.com>2009-11-06 17:26:52 +0000
commit4fbe6c4e4e754e0e850165d5a303990515ceaba6 (patch)
tree850e74504fde989fcd5dbc1c7cac04edae2ddc5d /src/gallium/drivers/i965/brw_context.c
parent0532cc0c86d36f98ae33291847fbd9f2564cbed2 (diff)
i965g: get rid of cc key, simplify state upload
Keep a valid reloc table active between uploads, avoid recalculating it every time.
Diffstat (limited to 'src/gallium/drivers/i965/brw_context.c')
-rw-r--r--src/gallium/drivers/i965/brw_context.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/i965/brw_context.c b/src/gallium/drivers/i965/brw_context.c
index f85116a568..e67551882d 100644
--- a/src/gallium/drivers/i965/brw_context.c
+++ b/src/gallium/drivers/i965/brw_context.c
@@ -65,6 +65,9 @@ static void brw_destroy_context( struct pipe_context *pipe )
brw_pipe_vertex_cleanup( brw );
brw_pipe_clear_cleanup( brw );
+ brw_hw_cc_cleanup( brw );
+
+
FREE(brw->wm.compile_data);
for (i = 0; i < brw->curr.fb.nr_cbufs; i++)
@@ -96,9 +99,6 @@ static void brw_destroy_context( struct pipe_context *pipe )
bo_reference(&brw->wm.sampler_bo, NULL);
bo_reference(&brw->wm.prog_bo, NULL);
bo_reference(&brw->wm.state_bo, NULL);
- bo_reference(&brw->cc.prog_bo, NULL);
- bo_reference(&brw->cc.state_bo, NULL);
- bo_reference(&brw->cc.vp_bo, NULL);
}
@@ -128,6 +128,8 @@ struct pipe_context *brw_create_context(struct pipe_screen *screen)
brw_pipe_vertex_init( brw );
brw_pipe_clear_init( brw );
+ brw_hw_cc_init( brw );
+
brw_init_state( brw );
brw_draw_init( brw );