Reviewed-by: Marek Olšák <marek.ol...@amd.com>

Marek

On Fri, Mar 22, 2019 at 10:30 AM Qiang Yu <yuq...@gmail.com> wrote:

> This helper function can be used by driver which
> always need min/max index.
>
> Signed-off-by: Qiang Yu <yuq...@gmail.com>
> ---
>  src/gallium/auxiliary/util/u_vbuf.c | 7 +++----
>  src/gallium/auxiliary/util/u_vbuf.h | 3 +++
>  2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/src/gallium/auxiliary/util/u_vbuf.c
> b/src/gallium/auxiliary/util/u_vbuf.c
> index f721613cbc5..02a59bc0575 100644
> --- a/src/gallium/auxiliary/util/u_vbuf.c
> +++ b/src/gallium/auxiliary/util/u_vbuf.c
> @@ -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;
> diff --git a/src/gallium/auxiliary/util/u_vbuf.h
> b/src/gallium/auxiliary/util/u_vbuf.h
> index a6139834575..604e8c8b8b0 100644
> --- a/src/gallium/auxiliary/util/u_vbuf.h
> +++ b/src/gallium/auxiliary/util/u_vbuf.h
> @@ -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);
> --
> 2.17.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to