r600g: fix check for empty cs

This commit is contained in:
Vadim Girlin
2011-06-29 16:29:18 +04:00
committed by Alex Deucher
parent 9e9d73ef10
commit 61c976c3cc
3 changed files with 4 additions and 4 deletions

View File

@@ -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;

View File

@@ -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) {

View File

@@ -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 */