Mesa (master): r600g: remove unused flag have_depth_fb

Marek Olšák mareko at kemper.freedesktop.org
Tue Jul 17 19:56:14 UTC 2012


Module: Mesa
Branch: master
Commit: d1ca16b2738644d17c10e736ca36981f69f5fa87
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d1ca16b2738644d17c10e736ca36981f69f5fa87

Author: Marek Olšák <maraeo at gmail.com>
Date:   Sat Jul 14 15:34:29 2012 +0200

r600g: remove unused flag have_depth_fb

This is a leftover from:

commit fe1fd675565231b49d3ac53d0b4bec39d8bc6781
Author: Marek Olšák <maraeo at gmail.com>
Date:   Sun Jul 8 03:10:37 2012 +0200

    r600g: don't flush depth textures set as colorbuffers

---

 src/gallium/drivers/r600/evergreen_state.c   |    4 ----
 src/gallium/drivers/r600/r600_pipe.h         |    2 +-
 src/gallium/drivers/r600/r600_state.c        |    4 ----
 src/gallium/drivers/r600/r600_state_common.c |    3 ++-
 4 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index 72ddc0b..ad0eb2f 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -1315,9 +1315,6 @@ void evergreen_cb(struct r600_context *rctx, struct r600_pipe_state *rstate,
 	rtex = (struct r600_resource_texture*)state->cbufs[cb]->texture;
 	pipe_tex = state->cbufs[cb]->texture;
 
-	if (rtex->is_depth)
-		rctx->have_depth_fb = TRUE;
-
 	if (rtex->is_depth && !rtex->is_flushing_texture) {
 		r600_init_flushed_depth_texture(&rctx->context,
 				state->cbufs[cb]->texture, NULL);
@@ -1695,7 +1692,6 @@ static void evergreen_set_framebuffer_state(struct pipe_context *ctx,
 	util_copy_framebuffer_state(&rctx->framebuffer, state);
 
 	/* build states */
-	rctx->have_depth_fb = 0;
 	rctx->export_16bpc = true;
 	rctx->nr_cbufs = state->nr_cbufs;
 	for (i = 0; i < state->nr_cbufs; i++) {
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h
index 200f0a2..4688b62 100644
--- a/src/gallium/drivers/r600/r600_pipe.h
+++ b/src/gallium/drivers/r600/r600_pipe.h
@@ -329,7 +329,7 @@ struct r600_context {
 
 	struct u_upload_mgr	        *uploader;
 	struct util_slab_mempool	pool_transfers;
-	boolean				have_depth_texture, have_depth_fb;
+	boolean				have_depth_texture;
 
 	unsigned default_ps_gprs, default_vs_gprs;
 
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index 4f475b3..0091fe7 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -1395,9 +1395,6 @@ static void r600_cb(struct r600_context *rctx, struct r600_pipe_state *rstate,
 	surf = (struct r600_surface *)state->cbufs[cb];
 	rtex = (struct r600_resource_texture*)state->cbufs[cb]->texture;
 
-	if (rtex->is_depth)
-		rctx->have_depth_fb = TRUE;
-
 	if (rtex->is_depth && !rtex->is_flushing_texture) {
 		rtex = rtex->flushed_depth_texture;
 	}
@@ -1662,7 +1659,6 @@ static void r600_set_framebuffer_state(struct pipe_context *ctx,
 	util_copy_framebuffer_state(&rctx->framebuffer, state);
 
 	/* build states */
-	rctx->have_depth_fb = 0;
 	rctx->export_16bpc = true;
 	rctx->nr_cbufs = state->nr_cbufs;
 
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index 4fa2699..84c7d5e 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -845,8 +845,9 @@ static void r600_update_derived_state(struct r600_context *rctx)
 	unsigned ps_dirty = 0;
 
 	if (!rctx->blitter->running) {
-		if (rctx->have_depth_fb || rctx->have_depth_texture)
+		if (rctx->have_depth_texture) {
 			r600_flush_all_depth_textures(rctx);
+		}
 	}
 
 	if (rctx->chip_class < EVERGREEN) {




More information about the mesa-commit mailing list