Mesa (master): r600g: flush the whole context when CS is full, not just hw_context
Marek Olšák
mareko at kemper.freedesktop.org
Thu Nov 10 18:02:50 UTC 2011
Module: Mesa
Branch: master
Commit: ec3d2c7f089e0a4750dc42f10da914b58858499e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ec3d2c7f089e0a4750dc42f10da914b58858499e
Author: Marek Olšák <maraeo at gmail.com>
Date: Thu Nov 10 18:42:10 2011 +0100
r600g: flush the whole context when CS is full, not just hw_context
Because we disable render condition in r600_flush, but not in r600_context_flush.
---
src/gallium/drivers/r600/r600.h | 3 +++
src/gallium/drivers/r600/r600_hw_context.c | 2 +-
src/gallium/drivers/r600/r600_pipe.c | 2 ++
3 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/gallium/drivers/r600/r600.h b/src/gallium/drivers/r600/r600.h
index 5bd808a..28c1ee1 100644
--- a/src/gallium/drivers/r600/r600.h
+++ b/src/gallium/drivers/r600/r600.h
@@ -192,6 +192,9 @@ struct r600_context {
struct r600_screen *screen;
struct radeon_winsys *ws;
struct radeon_winsys_cs *cs;
+ struct pipe_context *pipe;
+
+ void (*flush)(void *pipe, unsigned flags);
struct r600_range *range;
unsigned nblocks;
diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c
index 3a0cde3..905ea85 100644
--- a/src/gallium/drivers/r600/r600_hw_context.c
+++ b/src/gallium/drivers/r600/r600_hw_context.c
@@ -956,7 +956,7 @@ void r600_need_cs_space(struct r600_context *ctx, unsigned num_dw,
/* Flush if there's not enough space. */
if (num_dw > RADEON_MAX_CMDBUF_DWORDS) {
- r600_context_flush(ctx, RADEON_FLUSH_ASYNC);
+ ctx->flush(ctx->pipe, RADEON_FLUSH_ASYNC);
}
}
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index dcfcd66..243de14 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -272,6 +272,8 @@ static struct pipe_context *r600_create_context(struct pipe_screen *screen, void
return NULL;
}
+ rctx->ctx.pipe = &rctx->context;
+ rctx->ctx.flush = r600_flush_from_winsys;
rctx->ws->cs_set_flush_callback(rctx->ctx.cs, r600_flush_from_winsys, rctx);
util_slab_create(&rctx->pool_transfers,
More information about the mesa-commit
mailing list