diff options
author | Dave Airlie <airlied@redhat.com> | 2010-08-27 15:45:58 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-08-27 15:45:58 +1000 |
commit | 2184f3ec3059eaf8a9a2b04c995162543f000862 (patch) | |
tree | e0d2e070b1688b56384d0deca0fb6ddf15a2787b /src/gallium/drivers/r600/r600_context.c | |
parent | a03d456f5a41926e39194de70b2d50776e64b8a2 (diff) |
Revert "r600g: simplify states"
This reverts commit bd25e23bf3740f59ce8859848c715daeb9e9821f.
Apart from introducing a lot of hex magic numbers and being highly impenetable code,
it causes lots of lockups on an average piglit run that always runs without lockups.
Always run piglit before/after doing big things like this.
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 790a85110b..9af28356c5 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) { |