[Mesa-dev] [PATCH 4/5] util/indices, svga: s/unsigned/enum pipe_prim_type/

Brian Paul brianp at vmware.com
Thu May 26 14:09:45 UTC 2016


---
 src/gallium/auxiliary/indices/u_indices.c          |  6 +++---
 src/gallium/auxiliary/indices/u_indices.h          | 17 +++++++++--------
 src/gallium/auxiliary/indices/u_unfilled_indices.c | 10 +++++-----
 src/gallium/drivers/svga/svga_draw_arrays.c        |  3 ++-
 src/gallium/drivers/svga/svga_draw_elements.c      |  3 ++-
 5 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/src/gallium/auxiliary/indices/u_indices.c b/src/gallium/auxiliary/indices/u_indices.c
index 2b2d10c..91f00f2 100644
--- a/src/gallium/auxiliary/indices/u_indices.c
+++ b/src/gallium/auxiliary/indices/u_indices.c
@@ -72,7 +72,7 @@ static void translate_memcpy_uint( const void *in,
  */
 enum indices_mode
 u_index_translator(unsigned hw_mask,
-                   unsigned prim,
+                   enum pipe_prim_type prim,
                    unsigned in_index_size,
                    unsigned nr,
                    unsigned in_pv,
@@ -235,12 +235,12 @@ u_index_translator(unsigned hw_mask,
  */
 enum indices_mode
 u_index_generator(unsigned hw_mask,
-                  unsigned prim,
+                  enum pipe_prim_type prim,
                   unsigned start,
                   unsigned nr,
                   unsigned in_pv,
                   unsigned out_pv,
-                  unsigned *out_prim,
+                  enum pipe_prim_type *out_prim,
                   unsigned *out_index_size,
                   unsigned *out_nr,
                   u_generate_func *out_generate)
diff --git a/src/gallium/auxiliary/indices/u_indices.h b/src/gallium/auxiliary/indices/u_indices.h
index 7f696ab..f160fcb 100644
--- a/src/gallium/auxiliary/indices/u_indices.h
+++ b/src/gallium/auxiliary/indices/u_indices.h
@@ -26,6 +26,7 @@
 #define U_INDICES_H
 
 #include "pipe/p_compiler.h"
+#include "pipe/p_defines.h"
 
 /* First/last provoking vertex */
 #define PV_FIRST      0
@@ -92,13 +93,13 @@ void u_index_init( void );
  */
 enum indices_mode
 u_index_translator(unsigned hw_mask,
-                   unsigned prim,
+                   enum pipe_prim_type prim,
                    unsigned in_index_size,
                    unsigned nr,
                    unsigned in_pv,   /* API */
                    unsigned out_pv,  /* hardware */
                    unsigned prim_restart,
-                   unsigned *out_prim,
+                   enum pipe_prim_type *out_prim,
                    unsigned *out_index_size,
                    unsigned *out_nr,
                    u_translate_func *out_translate);
@@ -115,12 +116,12 @@ u_index_translator(unsigned hw_mask,
  */
 enum indices_mode
 u_index_generator(unsigned hw_mask,
-                  unsigned prim,
+                  enum pipe_prim_type prim,
                   unsigned start,
                   unsigned nr,
                   unsigned in_pv,   /* API */
                   unsigned out_pv,  /* hardware */
-                  unsigned *out_prim,
+                  enum pipe_prim_type *out_prim,
                   unsigned *out_index_size,
                   unsigned *out_nr,
                   u_generate_func *out_generate);
@@ -135,11 +136,11 @@ void u_unfilled_init( void );
  * points.
  */
 enum indices_mode
-u_unfilled_translator(unsigned prim,
+u_unfilled_translator(enum pipe_prim_type prim,
                       unsigned in_index_size,
                       unsigned nr,
                       unsigned unfilled_mode,
-                      unsigned *out_prim,
+                      enum pipe_prim_type *out_prim,
                       unsigned *out_index_size,
                       unsigned *out_nr,
                       u_translate_func *out_translate);
@@ -148,11 +149,11 @@ u_unfilled_translator(unsigned prim,
  * As above, but for non-indexed (array) primitives.
  */
 enum indices_mode
-u_unfilled_generator(unsigned prim,
+u_unfilled_generator(enum pipe_prim_type prim,
                      unsigned start,
                      unsigned nr,
                      unsigned unfilled_mode,
-                     unsigned *out_prim,
+                     enum pipe_prim_type *out_prim,
                      unsigned *out_index_size,
                      unsigned *out_nr,
                      u_generate_func *out_generate);
diff --git a/src/gallium/auxiliary/indices/u_unfilled_indices.c b/src/gallium/auxiliary/indices/u_unfilled_indices.c
index 8cb5192..0ca1d04 100644
--- a/src/gallium/auxiliary/indices/u_unfilled_indices.c
+++ b/src/gallium/auxiliary/indices/u_unfilled_indices.c
@@ -95,7 +95,7 @@ static void generate_linear_uint( unsigned start,
  * separate lines (PIPE_PRIM_LINES).
  */
 static unsigned
-nr_lines(unsigned prim, unsigned nr)
+nr_lines(enum pipe_prim_type prim, unsigned nr)
 {
    switch (prim) {
    case PIPE_PRIM_TRIANGLES:
@@ -126,11 +126,11 @@ nr_lines(unsigned prim, unsigned nr)
 
 
 enum indices_mode
-u_unfilled_translator(unsigned prim,
+u_unfilled_translator(enum pipe_prim_type prim,
                       unsigned in_index_size,
                       unsigned nr,
                       unsigned unfilled_mode,
-                      unsigned *out_prim,
+                      enum pipe_prim_type *out_prim,
                       unsigned *out_index_size,
                       unsigned *out_nr,
                       u_translate_func *out_translate)
@@ -186,11 +186,11 @@ u_unfilled_translator(unsigned prim,
  * 'draw' module.
  */
 enum indices_mode
-u_unfilled_generator(unsigned prim,
+u_unfilled_generator(enum pipe_prim_type prim,
                      unsigned start,
                      unsigned nr,
                      unsigned unfilled_mode,
-                     unsigned *out_prim,
+                     enum pipe_prim_type *out_prim,
                      unsigned *out_index_size,
                      unsigned *out_nr,
                      u_generate_func *out_generate)
diff --git a/src/gallium/drivers/svga/svga_draw_arrays.c b/src/gallium/drivers/svga/svga_draw_arrays.c
index 4bd1a33..e5fab88 100644
--- a/src/gallium/drivers/svga/svga_draw_arrays.c
+++ b/src/gallium/drivers/svga/svga_draw_arrays.c
@@ -205,7 +205,8 @@ svga_hwtnl_draw_arrays(struct svga_hwtnl *hwtnl,
                        enum pipe_prim_type prim, unsigned start, unsigned count,
                        unsigned start_instance, unsigned instance_count)
 {
-   unsigned gen_prim, gen_size, gen_nr;
+   enum pipe_prim_type gen_prim;
+   unsigned gen_size, gen_nr;
    enum indices_mode gen_type;
    u_generate_func gen_func;
    enum pipe_error ret = PIPE_OK;
diff --git a/src/gallium/drivers/svga/svga_draw_elements.c b/src/gallium/drivers/svga/svga_draw_elements.c
index 6eb5067..54a6826 100644
--- a/src/gallium/drivers/svga/svga_draw_elements.c
+++ b/src/gallium/drivers/svga/svga_draw_elements.c
@@ -133,7 +133,8 @@ svga_hwtnl_draw_range_elements(struct svga_hwtnl *hwtnl,
                                enum pipe_prim_type prim, unsigned start, unsigned count,
                                unsigned start_instance, unsigned instance_count)
 {
-   unsigned gen_prim, gen_size, gen_nr;
+   enum pipe_prim_type gen_prim;
+   unsigned gen_size, gen_nr;
    enum indices_mode gen_type;
    u_translate_func gen_func;
    enum pipe_error ret = PIPE_OK;
-- 
1.9.1



More information about the mesa-dev mailing list