<div dir="ltr"><div>Reviewed-by: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>></div><div><br></div><div>Marek<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 22, 2019 at 10:30 AM Qiang Yu <<a href="mailto:yuq825@gmail.com">yuq825@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This helper function can be used by driver which<br>
always need min/max index.<br>
<br>
Signed-off-by: Qiang Yu <<a href="mailto:yuq825@gmail.com" target="_blank">yuq825@gmail.com</a>><br>
---<br>
 src/gallium/auxiliary/util/u_vbuf.c | 7 +++----<br>
 src/gallium/auxiliary/util/u_vbuf.h | 3 +++<br>
 2 files changed, 6 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c<br>
index f721613cbc5..02a59bc0575 100644<br>
--- a/src/gallium/auxiliary/util/u_vbuf.c<br>
+++ b/src/gallium/auxiliary/util/u_vbuf.c<br>
@@ -1093,10 +1093,9 @@ u_vbuf_get_minmax_index_mapped(const struct pipe_draw_info *info,<br>
    *out_max_index = max;<br>
 }<br>
<br>
-static void<br>
-u_vbuf_get_minmax_index(struct pipe_context *pipe,<br>
-                        const struct pipe_draw_info *info,<br>
-                        unsigned *out_min_index, unsigned *out_max_index)<br>
+void u_vbuf_get_minmax_index(struct pipe_context *pipe,<br>
+                             const struct pipe_draw_info *info,<br>
+                             unsigned *out_min_index, unsigned *out_max_index)<br>
 {<br>
    struct pipe_transfer *transfer = NULL;<br>
    const void *indices;<br>
diff --git a/src/gallium/auxiliary/util/u_vbuf.h b/src/gallium/auxiliary/util/u_vbuf.h<br>
index a6139834575..604e8c8b8b0 100644<br>
--- a/src/gallium/auxiliary/util/u_vbuf.h<br>
+++ b/src/gallium/auxiliary/util/u_vbuf.h<br>
@@ -72,6 +72,9 @@ void u_vbuf_set_vertex_buffers(struct u_vbuf *mgr,<br>
                                unsigned start_slot, unsigned count,<br>
                                const struct pipe_vertex_buffer *bufs);<br>
 void u_vbuf_draw_vbo(struct u_vbuf *mgr, const struct pipe_draw_info *info);<br>
+void u_vbuf_get_minmax_index(struct pipe_context *pipe,<br>
+                             const struct pipe_draw_info *info,<br>
+                             unsigned *out_min_index, unsigned *out_max_index);<br>
<br>
 /* Save/restore functionality. */<br>
 void u_vbuf_save_vertex_elements(struct u_vbuf *mgr);<br>
-- <br>
2.17.1<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a></blockquote></div>