r600g: fix db flush breaking config state

This commit is contained in:
Dave Airlie 2010-09-28 14:27:22 +10:00
parent e4fd65e9d7
commit 34dba5f05a
1 changed files with 9 additions and 9 deletions

View File

@ -662,10 +662,9 @@ static int setup_db_flush(struct r600_context *rctx, struct radeon_state *flush)
surf = rctx->framebuffer->state.framebuffer.zsbuf;
if (!surf)
return 0;
radeon_state_init(flush, rscreen->rw, R600_STATE_DB_FLUSH, 0, 0);
if (surf) {
rtex = (struct r600_resource_texture*)surf->texture;
rbuffer = &rtex->resource;
/* just need to the bo to the flush list */
@ -673,6 +672,7 @@ static int setup_db_flush(struct r600_context *rctx, struct radeon_state *flush)
flush->placement[0] = RADEON_GEM_DOMAIN_VRAM;
flush->nbo = 1;
}
return radeon_state_pm4(flush);
}