util/indices,svga: s/unsigned/enum pipe_prim_type/
authorBrian Paul <brianp@vmware.com>
Thu, 26 May 2016 13:12:59 +0000 (07:12 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 26 May 2016 23:44:18 +0000 (17:44 -0600)
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/indices/u_indices.c
src/gallium/auxiliary/indices/u_indices.h
src/gallium/auxiliary/indices/u_unfilled_indices.c
src/gallium/drivers/svga/svga_draw_arrays.c
src/gallium/drivers/svga/svga_draw_elements.c

index 2b2d10c9cba74745bb8130941016866824812fb9..91f00f2bb7d3e7f8f9f73210d3cd6d0384176f27 100644 (file)
@@ -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)
index 7f696ab06636ffbc90bad119d3140ceb4c69006d..f160fcbc678b399b98acc7fc4de7991035b5e7ea 100644 (file)
@@ -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);
index 8cb5192d9a252952761068c6e62a839202ad49d8..0ca1d04040b42149c0fa4c0f7da2987ea2a66265 100644 (file)
@@ -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)
index 4bd1a33021711f9c291dbc3a67105308656e5ed9..e5fab886f1014aa202a046fcd8afd558cdedd8a3 100644 (file)
@@ -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;
index 6eb5067beec25050c5c1402548e4c900d559f58f..54a6826329afc6402b95dc108c6aab73b73708eb 100644 (file)
@@ -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;