[Mesa-dev] [PATCH] gallium; s/unsigned/enum pipe_prim_type/

Roland Scheidegger sroland at vmware.com
Fri Oct 27 21:41:14 UTC 2017


Reviewed-by: Roland Scheidegger <sroland at vmware.com>

Am 27.10.2017 um 23:16 schrieb Brian Paul:
> In the vbuf_render::set_primitive() functions.
> ---
>  src/gallium/auxiliary/draw/draw_vbuf.h       | 3 ++-
>  src/gallium/drivers/i915/i915_prim_vbuf.c    | 2 +-
>  src/gallium/drivers/llvmpipe/lp_setup_vbuf.c | 2 +-
>  src/gallium/drivers/nouveau/nv30/nv30_draw.c | 2 +-
>  src/gallium/drivers/r300/r300_render.c       | 2 +-
>  src/gallium/drivers/softpipe/sp_prim_vbuf.c  | 4 ++--
>  6 files changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/src/gallium/auxiliary/draw/draw_vbuf.h b/src/gallium/auxiliary/draw/draw_vbuf.h
> index 194796b..8faccda 100644
> --- a/src/gallium/auxiliary/draw/draw_vbuf.h
> +++ b/src/gallium/auxiliary/draw/draw_vbuf.h
> @@ -38,6 +38,7 @@
>  
>  
>  #include "pipe/p_compiler.h"
> +#include "pipe/p_defines.h"
>  
>  
>  struct pipe_rasterizer_state;
> @@ -96,7 +97,7 @@ struct vbuf_render {
>      * the discretion of the driver, for the benefit of the passthrough
>      * path.
>      */
> -   void (*set_primitive)( struct vbuf_render *, unsigned prim );
> +   void (*set_primitive)( struct vbuf_render *, enum pipe_prim_type prim );
>  
>     /**
>      * Draw indexed primitives.  Note that indices are ushort.  The driver
> diff --git a/src/gallium/drivers/i915/i915_prim_vbuf.c b/src/gallium/drivers/i915/i915_prim_vbuf.c
> index c0ba23b..8f2f5c1 100644
> --- a/src/gallium/drivers/i915/i915_prim_vbuf.c
> +++ b/src/gallium/drivers/i915/i915_prim_vbuf.c
> @@ -324,7 +324,7 @@ i915_vbuf_ensure_index_bounds(struct vbuf_render *render,
>  
>  static void
>  i915_vbuf_render_set_primitive(struct vbuf_render *render, 
> -                               unsigned prim)
> +                               enum pipe_prim_type prim)
>  {
>     struct i915_vbuf_render *i915_render = i915_vbuf_render(render);
>     i915_render->prim = prim;
> diff --git a/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c b/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c
> index d7fa9fd..28a48d4 100644
> --- a/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c
> +++ b/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c
> @@ -115,7 +115,7 @@ lp_setup_unmap_vertices(struct vbuf_render *vbr,
>  
>  
>  static void
> -lp_setup_set_primitive(struct vbuf_render *vbr, unsigned prim)
> +lp_setup_set_primitive(struct vbuf_render *vbr, enum pipe_prim_type prim)
>  {
>     lp_setup_context(vbr)->prim = prim;
>  }
> diff --git a/src/gallium/drivers/nouveau/nv30/nv30_draw.c b/src/gallium/drivers/nouveau/nv30/nv30_draw.c
> index 4c587fc..798ec14 100644
> --- a/src/gallium/drivers/nouveau/nv30/nv30_draw.c
> +++ b/src/gallium/drivers/nouveau/nv30/nv30_draw.c
> @@ -111,7 +111,7 @@ nv30_render_unmap_vertices(struct vbuf_render *render,
>  }
>  
>  static void
> -nv30_render_set_primitive(struct vbuf_render *render, unsigned prim)
> +nv30_render_set_primitive(struct vbuf_render *render, enum pipe_prim_type prim)
>  {
>     struct nv30_render *r = nv30_render(render);
>  
> diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
> index 4cae766..9397aae 100644
> --- a/src/gallium/drivers/r300/r300_render.c
> +++ b/src/gallium/drivers/r300/r300_render.c
> @@ -964,7 +964,7 @@ static void r300_render_release_vertices(struct vbuf_render* render)
>  }
>  
>  static void r300_render_set_primitive(struct vbuf_render* render,
> -                                      unsigned prim)
> +                                      enum pipe_prim_type prim)
>  {
>      struct r300_render* r300render = r300_render(render);
>  
> diff --git a/src/gallium/drivers/softpipe/sp_prim_vbuf.c b/src/gallium/drivers/softpipe/sp_prim_vbuf.c
> index 95d1ac1..1ce04a2 100644
> --- a/src/gallium/drivers/softpipe/sp_prim_vbuf.c
> +++ b/src/gallium/drivers/softpipe/sp_prim_vbuf.c
> @@ -60,7 +60,7 @@ struct softpipe_vbuf_render
>     struct softpipe_context *softpipe;
>     struct setup_context *setup;
>  
> -   uint prim;
> +   enum pipe_prim_type prim;
>     uint vertex_size;
>     uint nr_vertices;
>     uint vertex_buffer_size;
> @@ -133,7 +133,7 @@ sp_vbuf_unmap_vertices(struct vbuf_render *vbr,
>  
>  
>  static void
> -sp_vbuf_set_primitive(struct vbuf_render *vbr, unsigned prim)
> +sp_vbuf_set_primitive(struct vbuf_render *vbr, enum pipe_prim_type prim)
>  {
>     struct softpipe_vbuf_render *cvbr = softpipe_vbuf_render(vbr);
>     struct setup_context *setup_ctx = cvbr->setup;
> 



More information about the mesa-dev mailing list