gallium/u_vbuf: export u_vbuf_get_minmax_index
authorQiang Yu <yuq825@gmail.com>
Wed, 20 Mar 2019 12:31:17 +0000 (20:31 +0800)
committerQiang Yu <yuq825@gmail.com>
Thu, 11 Apr 2019 01:57:53 +0000 (09:57 +0800)
This helper function can be used by driver which
always need min/max index.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
src/gallium/auxiliary/util/u_vbuf.c
src/gallium/auxiliary/util/u_vbuf.h

index f721613cbc52dc3e124848a09cb90a0cf7d7636b..02a59bc057570254627dcd09d840585b296cb2ef 100644 (file)
@@ -1093,10 +1093,9 @@ u_vbuf_get_minmax_index_mapped(const struct pipe_draw_info *info,
    *out_max_index = max;
 }
 
-static void
-u_vbuf_get_minmax_index(struct pipe_context *pipe,
-                        const struct pipe_draw_info *info,
-                        unsigned *out_min_index, unsigned *out_max_index)
+void u_vbuf_get_minmax_index(struct pipe_context *pipe,
+                             const struct pipe_draw_info *info,
+                             unsigned *out_min_index, unsigned *out_max_index)
 {
    struct pipe_transfer *transfer = NULL;
    const void *indices;
index a6139834575369cc164415e2dc62d421bb223519..604e8c8b8b0f2358fb4b0f5cfff867f93e513198 100644 (file)
@@ -72,6 +72,9 @@ void u_vbuf_set_vertex_buffers(struct u_vbuf *mgr,
                                unsigned start_slot, unsigned count,
                                const struct pipe_vertex_buffer *bufs);
 void u_vbuf_draw_vbo(struct u_vbuf *mgr, const struct pipe_draw_info *info);
+void u_vbuf_get_minmax_index(struct pipe_context *pipe,
+                             const struct pipe_draw_info *info,
+                             unsigned *out_min_index, unsigned *out_max_index);
 
 /* Save/restore functionality. */
 void u_vbuf_save_vertex_elements(struct u_vbuf *mgr);