From: Kenneth Graunke Date: Mon, 1 Apr 2019 18:46:36 +0000 (-0700) Subject: iris: Move iris_resolve_conditional_render to the vtable. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=975f7e4a59ff43a5fdadc08b86f1d4cb23f872ae;p=mesa.git iris: Move iris_resolve_conditional_render to the vtable. It's going to be in genxml code shortly. Reviewed-by: Caio Marcelo de Oliveira Filho --- diff --git a/src/gallium/drivers/iris/iris_clear.c b/src/gallium/drivers/iris/iris_clear.c index 8ed37b68eba..5b2961f8a7d 100644 --- a/src/gallium/drivers/iris/iris_clear.c +++ b/src/gallium/drivers/iris/iris_clear.c @@ -216,7 +216,7 @@ fast_clear_color(struct iris_context *ice, * is not something that should happen often, we stall on the CPU here * to resolve the predication, and then proceed. */ - iris_resolve_conditional_render(ice); + ice->vtbl.resolve_conditional_render(ice); if (ice->state.predicate == IRIS_PREDICATE_STATE_DONT_RENDER) return; @@ -462,7 +462,7 @@ fast_clear_depth(struct iris_context *ice, * even more complex, so the easiest thing to do when the fast clear * depth is changing is to stall on the CPU and resolve the predication. */ - iris_resolve_conditional_render(ice); + ice->vtbl.resolve_conditional_render(ice); if (ice->state.predicate == IRIS_PREDICATE_STATE_DONT_RENDER) return; diff --git a/src/gallium/drivers/iris/iris_context.h b/src/gallium/drivers/iris/iris_context.h index 35460445309..5161cb8dd43 100644 --- a/src/gallium/drivers/iris/iris_context.h +++ b/src/gallium/drivers/iris/iris_context.h @@ -426,6 +426,7 @@ struct iris_vtable { void (*rebind_buffer)(struct iris_context *ice, struct iris_resource *res, uint64_t old_address); + void (*resolve_conditional_render)(struct iris_context *ice); void (*load_register_reg32)(struct iris_batch *batch, uint32_t dst, uint32_t src); void (*load_register_reg64)(struct iris_batch *batch, uint32_t dst, @@ -862,8 +863,6 @@ void iris_math_add32_gpr0(struct iris_context *ice, struct iris_batch *batch, uint32_t x); -void iris_resolve_conditional_render(struct iris_context *ice); - /* iris_resolve.c */ void iris_predraw_resolve_inputs(struct iris_context *ice, diff --git a/src/gallium/drivers/iris/iris_query.c b/src/gallium/drivers/iris/iris_query.c index 6cc0bd59a65..08439ed127b 100644 --- a/src/gallium/drivers/iris/iris_query.c +++ b/src/gallium/drivers/iris/iris_query.c @@ -1093,7 +1093,7 @@ iris_render_condition(struct pipe_context *ctx, } } -void +static void iris_resolve_conditional_render(struct iris_context *ice) { struct pipe_context *ctx = (void *) ice; @@ -1113,6 +1113,8 @@ iris_resolve_conditional_render(struct iris_context *ice) void iris_init_query_functions(struct pipe_context *ctx) { + struct iris_context *ice = (void *) ctx; + ctx->create_query = iris_create_query; ctx->destroy_query = iris_destroy_query; ctx->begin_query = iris_begin_query; @@ -1121,4 +1123,6 @@ iris_init_query_functions(struct pipe_context *ctx) ctx->get_query_result_resource = iris_get_query_result_resource; ctx->set_active_query_state = iris_set_active_query_state; ctx->render_condition = iris_render_condition; + + ice->vtbl.resolve_conditional_render = iris_resolve_conditional_render; }