summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_context.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-07-14 01:59:57 +0200
committerMarek Olšák <maraeo@gmail.com>2010-07-16 08:51:16 +0200
commitfe3caa91d3f637bf9cf9f9e7adb992aa8c7ef8e4 (patch)
treead13a3ebec02d124511d6897402b8b3fdd5835e2 /src/gallium/drivers/r300/r300_context.c
parent5f9d7bb2425aee65e75667953a6cc304072f2b11 (diff)
r300g: rebuild winsys and command submission to support multiple contexts
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.c')
-rw-r--r--src/gallium/drivers/r300/r300_context.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index 1beab7628a..0f7deca282 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -100,6 +100,8 @@ static void r300_destroy_context(struct pipe_context* context)
r300_release_referenced_objects(r300);
+ r300->rws->cs_destroy(r300->cs);
+
FREE(r300->aa_state.state);
FREE(r300->blend_color_state.state);
FREE(r300->clip_state.state);
@@ -354,6 +356,8 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
r300->context.destroy = r300_destroy_context;
+ r300->cs = rws->cs_create(rws);
+
if (!r300screen->caps.has_tcl) {
/* Create a Draw. This is used for SW TCL. */
r300->draw = draw_create(&r300->context);
@@ -381,7 +385,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
/* Render functions must be initialized after blitter. */
r300_init_render_functions(r300);
- rws->set_flush_cb(r300->rws, r300_flush_cb, r300);
+ rws->cs_set_flush(r300->cs, r300_flush_cb, r300);
r300->upload_ib = u_upload_create(&r300->context,
32 * 1024, 16,
@@ -433,11 +437,6 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
return NULL;
}
-boolean r300_check_cs(struct r300_context *r300, unsigned size)
-{
- return size <= r300->rws->get_cs_free_dwords(r300->rws);
-}
-
void r300_finish(struct r300_context *r300)
{
struct pipe_framebuffer_state *fb;