iris: Move iris_resolve_conditional_render to the vtable.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 1 Apr 2019 18:46:36 +0000 (11:46 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 25 Jul 2019 18:42:55 +0000 (18:42 +0000)
It's going to be in genxml code shortly.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/gallium/drivers/iris/iris_clear.c
src/gallium/drivers/iris/iris_context.h
src/gallium/drivers/iris/iris_query.c

index 8ed37b68eba00e81014c9be0ba91ae24cb1bb9f1..5b2961f8a7d901c5d5b5613ec0748bd8bfb37937 100644 (file)
@@ -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;
 
index 35460445309e1967615322a8215b5dc5c67905c6..5161cb8dd43019958901c7ef9ca47c2e0e384d51 100644 (file)
@@ -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,
index 6cc0bd59a6528a02894e1a9cc2d627cc932a862e..08439ed127b6ba03e7e9b33db0e1c47c0a1aa23f 100644 (file)
@@ -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;
 }