[Mesa-dev] [PATCH 08/55] radeonsi: remove r600_common_context::set_occlusion_query_state

Marek Olšák maraeo at gmail.com
Mon Apr 2 04:08:01 UTC 2018


From: Marek Olšák <marek.olsak at amd.com>

and remove unused old_enable parameter.
---
 src/gallium/drivers/radeon/r600_pipe_common.h | 5 -----
 src/gallium/drivers/radeon/r600_query.c       | 3 +--
 src/gallium/drivers/radeonsi/si_state.c       | 6 ++----
 src/gallium/drivers/radeonsi/si_state.h       | 2 ++
 4 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h
index 99bba0a..1381a67 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.h
+++ b/src/gallium/drivers/radeon/r600_pipe_common.h
@@ -504,11 +504,6 @@ struct r600_common_context {
 	 * the invalidation. */
 	void (*rebind_buffer)(struct pipe_context *ctx, struct pipe_resource *buf,
 			      uint64_t old_gpu_address);
-
-	/* Enable or disable occlusion queries. */
-	void (*set_occlusion_query_state)(struct pipe_context *ctx,
-					  bool old_enable,
-					  bool old_perfect_enable);
 };
 
 /* r600_buffer_common.c */
diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c
index d9c402c..aa23aac 100644
--- a/src/gallium/drivers/radeon/r600_query.c
+++ b/src/gallium/drivers/radeon/r600_query.c
@@ -713,8 +713,7 @@ static void r600_update_occlusion_query_state(struct r600_common_context *rctx,
 		perfect_enable = rctx->num_perfect_occlusion_queries != 0;
 
 		if (enable != old_enable || perfect_enable != old_perfect_enable) {
-			rctx->set_occlusion_query_state(&rctx->b, old_enable,
-							old_perfect_enable);
+			si_set_occlusion_query_state(&rctx->b, old_perfect_enable);
 		}
 	}
 }
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 06dcecc..ee4f96d 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -1347,9 +1347,8 @@ static void si_set_active_query_state(struct pipe_context *ctx, boolean enable)
 	}
 }
 
-static void si_set_occlusion_query_state(struct pipe_context *ctx,
-					 bool old_enable,
-					 bool old_perfect_enable)
+void si_set_occlusion_query_state(struct pipe_context *ctx,
+				  bool old_perfect_enable)
 {
 	struct si_context *sctx = (struct si_context*)ctx;
 
@@ -4582,7 +4581,6 @@ void si_init_state_functions(struct si_context *sctx)
 	sctx->b.b.set_tess_state = si_set_tess_state;
 
 	sctx->b.b.set_active_query_state = si_set_active_query_state;
-	sctx->b.set_occlusion_query_state = si_set_occlusion_query_state;
 
 	sctx->b.b.draw_vbo = si_draw_vbo;
 
diff --git a/src/gallium/drivers/radeonsi/si_state.h b/src/gallium/drivers/radeonsi/si_state.h
index 60a724a..95dc2d3 100644
--- a/src/gallium/drivers/radeonsi/si_state.h
+++ b/src/gallium/drivers/radeonsi/si_state.h
@@ -396,6 +396,8 @@ si_create_sampler_view_custom(struct pipe_context *ctx,
 			      unsigned force_level);
 void si_update_fb_dirtiness_after_rendering(struct si_context *sctx);
 void si_save_qbo_state(struct pipe_context *ctx, struct r600_qbo_state *st);
+void si_set_occlusion_query_state(struct pipe_context *ctx,
+				  bool old_perfect_enable);
 
 /* si_state_binning.c */
 void si_emit_dpbb_state(struct si_context *sctx, struct r600_atom *state);
-- 
2.7.4



More information about the mesa-dev mailing list