summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_context.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2010-09-16 17:18:39 +1000
committerDave Airlie <[email protected]>2010-09-17 10:57:44 +1000
commitec9d838aa56d2c4bc5649d7c26ac61abb6c4b9bb (patch)
tree511802682639b8a4e991d906c34905c4de8f775a /src/gallium/drivers/r600/r600_context.c
parentb54d10b62e536c56774024761942f3b159d7470f (diff)
r600g: hide radeon_ctx inside winsys.
no need for this info to be exported to pipe driver.
Diffstat (limited to 'src/gallium/drivers/r600/r600_context.c')
-rw-r--r--src/gallium/drivers/r600/r600_context.c31
1 files changed, 7 insertions, 24 deletions
diff --git a/src/gallium/drivers/r600/r600_context.c b/src/gallium/drivers/r600/r600_context.c
index 00df4dcd428..2ec25548e3c 100644
--- a/src/gallium/drivers/r600/r600_context.c
+++ b/src/gallium/drivers/r600/r600_context.c
@@ -56,7 +56,7 @@ static void r600_destroy_context(struct pipe_context *context)
free(rctx->vs_constant);
free(rctx->vs_resource);
- radeon_ctx_fini(&rctx->ctx);
+ radeon_ctx_fini(rctx->ctx);
FREE(rctx);
}
@@ -65,34 +65,17 @@ void r600_flush(struct pipe_context *ctx, unsigned flags,
{
struct r600_context *rctx = r600_context(ctx);
struct r600_query *rquery = NULL;
- static int dc = 0;
-#if 0
- char dname[256];
-#endif
/* suspend queries */
r600_queries_suspend(ctx);
- /* FIXME dumping should be removed once shader support instructions
- * without throwing bad code
- */
- if (!rctx->ctx.cdwords)
- goto out;
-#if 0
- sprintf(dname, "gallium-%08d.bof", dc);
- if (dc < 2) {
- radeon_ctx_dump_bof(&rctx->ctx, dname);
- R600_ERR("dumped %s\n", dname);
- }
-#endif
-#if 1
- radeon_ctx_submit(&rctx->ctx);
-#endif
+
+ radeon_ctx_submit(rctx->ctx);
+
LIST_FOR_EACH_ENTRY(rquery, &rctx->query_list, list) {
rquery->flushed = true;
}
- dc++;
-out:
- radeon_ctx_clear(&rctx->ctx);
+
+ radeon_ctx_clear(rctx->ctx);
/* resume queries */
r600_queries_resume(ctx);
}
@@ -151,7 +134,7 @@ struct pipe_context *r600_create_context(struct pipe_screen *screen, void *priv)
return NULL;
}
- radeon_ctx_init(&rctx->ctx, rscreen->rw);
+ rctx->ctx = radeon_ctx_init(rscreen->rw);
radeon_draw_init(&rctx->draw, rscreen->rw);
return &rctx->context;
}