The callee can derive the current enable state itself.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
}
}
-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;
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);
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);
}
}
}
}
}
-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;