[Mesa-dev] [PATCH 1/3] st/mesa: make st_draw_vbo static

Marek Olšák maraeo at gmail.com
Mon May 8 17:09:08 UTC 2017


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

---
 src/mesa/state_tracker/st_cb_feedback.c |  2 +-
 src/mesa/state_tracker/st_draw.c        |  2 +-
 src/mesa/state_tracker/st_draw.h        | 12 ------------
 3 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_feedback.c b/src/mesa/state_tracker/st_cb_feedback.c
index 2ca2def..436062b 100644
--- a/src/mesa/state_tracker/st_cb_feedback.c
+++ b/src/mesa/state_tracker/st_cb_feedback.c
@@ -275,21 +275,21 @@ static void
 st_RenderMode(struct gl_context *ctx, GLenum newMode )
 {
    struct st_context *st = st_context(ctx);
    struct draw_context *draw = st_get_draw_context(st);
 
    if (!st->draw)
       return;
 
    if (newMode == GL_RENDER) {
       /* restore normal VBO draw function */
-      vbo_set_draw_func(ctx, st_draw_vbo);
+      st_init_draw(st);
    }
    else if (newMode == GL_SELECT) {
       if (!st->selection_stage)
          st->selection_stage = draw_glselect_stage(ctx, draw);
       draw_set_rasterize_stage(draw, st->selection_stage);
       /* Plug in new vbo draw function */
       vbo_set_draw_func(ctx, st_feedback_draw_vbo);
    }
    else {
       struct gl_program *vp = st->ctx->VertexProgram._Current;
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index 8b657be..78aabb0 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -123,21 +123,21 @@ translate_prim(const struct gl_context *ctx, unsigned prim)
 
    return prim;
 }
 
 
 /**
  * This function gets plugged into the VBO module and is called when
  * we have something to render.
  * Basically, translate the information into the format expected by gallium.
  */
-void
+static void
 st_draw_vbo(struct gl_context *ctx,
             const struct _mesa_prim *prims,
             GLuint nr_prims,
             const struct _mesa_index_buffer *ib,
 	    GLboolean index_bounds_valid,
             GLuint min_index,
             GLuint max_index,
             struct gl_transform_feedback_object *tfb_vertcount,
             unsigned stream,
             struct gl_buffer_object *indirect)
diff --git a/src/mesa/state_tracker/st_draw.h b/src/mesa/state_tracker/st_draw.h
index 2c69ca4..12a30ee 100644
--- a/src/mesa/state_tracker/st_draw.h
+++ b/src/mesa/state_tracker/st_draw.h
@@ -43,32 +43,20 @@ struct gl_vertex_array;
 struct gl_context;
 struct st_context;
 
 void st_init_draw( struct st_context *st );
 
 void st_destroy_draw( struct st_context *st );
 
 struct draw_context *st_get_draw_context(struct st_context *st);
 
 extern void
-st_draw_vbo(struct gl_context *ctx,
-            const struct _mesa_prim *prims,
-            GLuint nr_prims,
-            const struct _mesa_index_buffer *ib,
-	    GLboolean index_bounds_valid,
-            GLuint min_index,
-            GLuint max_index,
-            struct gl_transform_feedback_object *tfb_vertcount,
-            unsigned stream,
-            struct gl_buffer_object *indirect);
-
-extern void
 st_feedback_draw_vbo(struct gl_context *ctx,
                      const struct _mesa_prim *prims,
                      GLuint nr_prims,
                      const struct _mesa_index_buffer *ib,
 		     GLboolean index_bounds_valid,
                      GLuint min_index,
                      GLuint max_index,
                      struct gl_transform_feedback_object *tfb_vertcount,
                      unsigned stream,
                      struct gl_buffer_object *indirect);
-- 
2.7.4



More information about the mesa-dev mailing list