summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2010-09-28 14:27:22 +1000
committerDave Airlie <[email protected]>2010-09-28 14:32:13 +1000
commit34dba5f05aa36baecdc655f7f94fed871006d590 (patch)
tree9aabec230ceda2252da53fb94dbb6b4aafc9e107 /src/gallium/drivers
parente4fd65e9d752a021c8fcd23d36fbea53933761a6 (diff)
r600g: fix db flush breaking config state
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/r600/r600_state.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index 791b39a001e..86f9825b526 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -662,17 +662,17 @@ 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);
- rtex = (struct r600_resource_texture*)surf->texture;
- rbuffer = &rtex->resource;
- /* just need to the bo to the flush list */
- radeon_ws_bo_reference(rscreen->rw, &flush->bo[0], rbuffer->bo);
- flush->placement[0] = RADEON_GEM_DOMAIN_VRAM;
- flush->nbo = 1;
+ if (surf) {
+ rtex = (struct r600_resource_texture*)surf->texture;
+ rbuffer = &rtex->resource;
+ /* just need to the bo to the flush list */
+ radeon_ws_bo_reference(rscreen->rw, &flush->bo[0], rbuffer->bo);
+ flush->placement[0] = RADEON_GEM_DOMAIN_VRAM;
+
+ flush->nbo = 1;
+ }
return radeon_state_pm4(flush);
}