[Mesa-dev] [PATCH] gallium/util: use enum pipe_prim_type instead of unsigned some more

Brian Paul brianp at vmware.com
Fri May 27 16:54:39 UTC 2016


Reviewed-by: Brian Paul <brianp at vmware.com>

On 05/27/2016 10:53 AM, sroland at vmware.com wrote:
> From: Roland Scheidegger <sroland at vmware.com>
>
> There were complaints from a mingw build:
> u_draw.h:134:14: error: invalid conversion from ‘uint {aka unsigned int}’
> to ‘pipe_prim_type’ [-fpermissive]
> ---
>   src/gallium/auxiliary/util/u_draw.h | 21 ++++++++++++++++-----
>   1 file changed, 16 insertions(+), 5 deletions(-)
>
> diff --git a/src/gallium/auxiliary/util/u_draw.h b/src/gallium/auxiliary/util/u_draw.h
> index 5c0880f..b16f106 100644
> --- a/src/gallium/auxiliary/util/u_draw.h
> +++ b/src/gallium/auxiliary/util/u_draw.h
> @@ -49,7 +49,10 @@ util_draw_init_info(struct pipe_draw_info *info)
>
>
>   static inline void
> -util_draw_arrays(struct pipe_context *pipe, uint mode, uint start, uint count)
> +util_draw_arrays(struct pipe_context *pipe,
> +                 enum pipe_prim_type mode,
> +                 uint start,
> +                 uint count)
>   {
>      struct pipe_draw_info info;
>
> @@ -65,7 +68,9 @@ util_draw_arrays(struct pipe_context *pipe, uint mode, uint start, uint count)
>
>   static inline void
>   util_draw_elements(struct pipe_context *pipe, int index_bias,
> -                   uint mode, uint start, uint count)
> +                   enum pipe_prim_type mode,
> +                   uint start,
> +                   uint count)
>   {
>      struct pipe_draw_info info;
>
> @@ -81,7 +86,9 @@ util_draw_elements(struct pipe_context *pipe, int index_bias,
>
>   static inline void
>   util_draw_arrays_instanced(struct pipe_context *pipe,
> -                           uint mode, uint start, uint count,
> +                           enum pipe_prim_type mode,
> +                           uint start,
> +                           uint count,
>                              uint start_instance,
>                              uint instance_count)
>   {
> @@ -102,7 +109,9 @@ util_draw_arrays_instanced(struct pipe_context *pipe,
>   static inline void
>   util_draw_elements_instanced(struct pipe_context *pipe,
>                                int index_bias,
> -                             uint mode, uint start, uint count,
> +                             enum pipe_prim_type mode,
> +                             uint start,
> +                             uint count,
>                                uint start_instance,
>                                uint instance_count)
>   {
> @@ -125,7 +134,9 @@ util_draw_range_elements(struct pipe_context *pipe,
>                            int index_bias,
>                            uint min_index,
>                            uint max_index,
> -                         uint mode, uint start, uint count)
> +                         enum pipe_prim_type mode,
> +                         uint start,
> +                         uint count)
>   {
>      struct pipe_draw_info info;
>
>



More information about the mesa-dev mailing list