summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2017-09-08 11:54:37 +0200
committerNicolai Hähnle <nicolai.haehnle@amd.com>2017-09-09 12:40:18 +0200
commit2d9433d8f16aadf2d2b4aaefe7ab487f7bcaab94 (patch)
treed81861854b0cd039861e6e9512a12cd0a2dd00df
parentf756c92b8b897f39ea237f4c2172dc839961f694 (diff)
gallium/radeon: pass old_(perfect_)enable to set_occlusion_query_state
The callee can derive the current enable state itself.
-rw-r--r--src/gallium/drivers/r600/r600_state_common.c4
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.h4
-rw-r--r--src/gallium/drivers/radeon/r600_query.c3
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c4
4 files changed, 11 insertions, 4 deletions
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index c1bce8304b..d9b47299b6 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -2910,7 +2910,9 @@ static void r600_set_active_query_state(struct pipe_context *ctx, boolean enable
}
}
-static void r600_set_occlusion_query_state(struct pipe_context *ctx, bool enable)
+static void r600_set_occlusion_query_state(struct pipe_context *ctx,
+ bool old_enable,
+ bool old_perfect_enable)
{
struct r600_context *rctx = (struct r600_context*)ctx;
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h
index 42480ec84b..ed93d99669 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.h
+++ b/src/gallium/drivers/radeon/r600_pipe_common.h
@@ -704,7 +704,9 @@ struct r600_common_context {
uint64_t old_gpu_address);
/* Enable or disable occlusion queries. */
- void (*set_occlusion_query_state)(struct pipe_context *ctx, bool enable);
+ void (*set_occlusion_query_state)(struct pipe_context *ctx,
+ bool old_enable,
+ bool old_perfect_enable);
void (*save_qbo_state)(struct pipe_context *ctx, struct r600_qbo_state *st);
diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c
index 03ff1018a7..8c2efda356 100644
--- a/src/gallium/drivers/radeon/r600_query.c
+++ b/src/gallium/drivers/radeon/r600_query.c
@@ -710,7 +710,8 @@ 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, enable);
+ rctx->set_occlusion_query_state(&rctx->b, old_enable,
+ old_perfect_enable);
}
}
}
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index ee070107fd..6978c6ca9a 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -1191,7 +1191,9 @@ 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 enable)
+static void si_set_occlusion_query_state(struct pipe_context *ctx,
+ bool old_enable,
+ bool old_perfect_enable)
{
struct si_context *sctx = (struct si_context*)ctx;