[Mesa-dev] [PATCH 2/3] gallium/u_vbuf: split u_vbuf_get_minmax_index function

Eric Anholt eric at anholt.net
Tue Jul 17 19:08:37 UTC 2018


Marek Olšák <maraeo at gmail.com> writes:

> From: Marek Olšák <marek.olsak at amd.com>
>
> This will be used by indirect multidraws.
> ---
>  src/gallium/auxiliary/util/u_vbuf.c | 54 +++++++++++++++++------------
>  1 file changed, 31 insertions(+), 23 deletions(-)
>
> diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c
> index 76a1d143d91..87b159ec1bf 100644
> --- a/src/gallium/auxiliary/util/u_vbuf.c
> +++ b/src/gallium/auxiliary/util/u_vbuf.c
> @@ -1015,110 +1015,118 @@ static boolean u_vbuf_mapping_vertex_buffer_blocks(const struct u_vbuf *mgr)
>      * We could query whether each buffer is busy, but that would
>      * be way more costly than this. */
>     return (mgr->ve->used_vb_mask &
>             (~mgr->user_vb_mask &
>              ~mgr->incompatible_vb_mask &
>              mgr->ve->compatible_vb_mask_all &
>              mgr->ve->noninstance_vb_mask_any &
>              mgr->nonzero_stride_vb_mask)) != 0;
>  }
>  
> -static void u_vbuf_get_minmax_index(struct pipe_context *pipe,
> -                                    const struct pipe_draw_info *info,
> -                                    int *out_min_index, int *out_max_index)
> +static void
> +u_vbuf_get_minmax_index_mapped(const struct pipe_draw_info *info,
> +                               const void *indices, int *out_min_index,
> +                               int *out_max_index)

It seems like these types should be unsigned *.  It would save a gross
cast in the next patch.

Other than that, 1-2 are:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180717/06892249/attachment.sig>


More information about the mesa-dev mailing list