Mesa (7.11): r600g: fix check for empty cs
Alex Deucher
agd5f at kemper.freedesktop.org
Thu Jun 30 20:41:53 UTC 2011
Module: Mesa
Branch: 7.11
Commit: 2196feb47f7734eb73c8f4163ca2d2169b037419
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2196feb47f7734eb73c8f4163ca2d2169b037419
Author: Vadim Girlin <vadimgirlin at gmail.com>
Date: Wed Jun 29 16:29:18 2011 +0400
r600g: fix check for empty cs
---
src/gallium/drivers/r600/r600.h | 1 +
src/gallium/drivers/r600/r600_pipe.c | 3 ---
src/gallium/winsys/r600/drm/r600_hw_context.c | 4 +++-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/r600/r600.h b/src/gallium/drivers/r600/r600.h
index 225c17c..151e831 100644
--- a/src/gallium/drivers/r600/r600.h
+++ b/src/gallium/drivers/r600/r600.h
@@ -245,6 +245,7 @@ struct r600_context {
unsigned pm4_cdwords;
unsigned pm4_dirty_cdwords;
unsigned ctx_pm4_ndwords;
+ unsigned init_dwords;
unsigned nreloc;
unsigned creloc;
struct r600_reloc *reloc;
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index 12599bf..8f3a175 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -126,9 +126,6 @@ static void r600_flush(struct pipe_context *ctx,
if (rfence)
*rfence = r600_create_fence(rctx);
- if (!rctx->ctx.pm4_cdwords)
- return;
-
#if 0
sprintf(dname, "gallium-%08d.bof", dc);
if (dc < 20) {
diff --git a/src/gallium/winsys/r600/drm/r600_hw_context.c b/src/gallium/winsys/r600/drm/r600_hw_context.c
index f89f24c..19dc729 100644
--- a/src/gallium/winsys/r600/drm/r600_hw_context.c
+++ b/src/gallium/winsys/r600/drm/r600_hw_context.c
@@ -62,6 +62,8 @@ void r600_init_cs(struct r600_context *ctx)
ctx->pm4[ctx->pm4_cdwords++] = PKT3(PKT3_CONTEXT_CONTROL, 1, 0);
ctx->pm4[ctx->pm4_cdwords++] = 0x80000000;
ctx->pm4[ctx->pm4_cdwords++] = 0x80000000;
+
+ ctx->init_dwords = ctx->pm4_cdwords;
}
static void INLINE r600_context_update_fenced_list(struct r600_context *ctx)
@@ -1496,7 +1498,7 @@ void r600_context_flush(struct r600_context *ctx)
int r;
struct r600_block *enable_block = NULL;
- if (!ctx->pm4_cdwords)
+ if (ctx->pm4_cdwords == ctx->init_dwords)
return;
/* suspend queries */
More information about the mesa-commit
mailing list