diff options
Diffstat (limited to 'src/gallium/drivers/r600/r600_context.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_context.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/r600_context.c b/src/gallium/drivers/r600/r600_context.c index 790a85110bf..9af28356c5c 100644 --- a/src/gallium/drivers/r600/r600_context.c +++ b/src/gallium/drivers/r600/r600_context.c @@ -53,10 +53,12 @@ void r600_flush(struct pipe_context *ctx, unsigned flags, /* suspend queries */ r600_queries_suspend(ctx); + if (radeon_ctx_pm4(rctx->ctx)) + goto out; /* FIXME dumping should be removed once shader support instructions * without throwing bad code */ - if (!rctx->ctx->id) + if (!rctx->ctx->cpm4) goto out; sprintf(dname, "gallium-%08d.bof", dc); if (dc < 2) { @@ -71,7 +73,8 @@ void r600_flush(struct pipe_context *ctx, unsigned flags, } dc++; out: - radeon_ctx_clear(rctx->ctx); + rctx->ctx = radeon_ctx_decref(rctx->ctx); + rctx->ctx = radeon_ctx(rscreen->rw); /* resume queries */ r600_queries_resume(ctx); } @@ -215,7 +218,7 @@ static void r600_init_config(struct r600_context *rctx) num_es_stack_entries = 0; break; } - rctx->hw_states.config = radeon_state(rctx->rw, R600_CONFIG); + rctx->hw_states.config = radeon_state(rctx->rw, R600_CONFIG_TYPE, R600_CONFIG); rctx->hw_states.config->states[R600_CONFIG__SQ_CONFIG] = 0x00000000; switch (family) { |