svga: s/unsigned/enum pipe_prim_type/ for primitive type variables
authorBrian Paul <brianp@vmware.com>
Wed, 25 May 2016 22:52:34 +0000 (16:52 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 26 May 2016 23:44:17 +0000 (17:44 -0600)
Proper enum types were only added recently.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/drivers/svga/svga_draw.h
src/gallium/drivers/svga/svga_draw_arrays.c
src/gallium/drivers/svga/svga_draw_elements.c
src/gallium/drivers/svga/svga_draw_private.h
src/gallium/drivers/svga/svga_pipe_draw.c
src/gallium/drivers/svga/svga_swtnl_backend.c
src/gallium/drivers/svga/svga_swtnl_private.h

index af8ecabcbae8df0073aba639cb95fd866993c157..baefcd94ec86a59d3455ca486299978b6ebb4c99 100644 (file)
@@ -59,7 +59,7 @@ svga_hwtnl_vertex_buffers(struct svga_hwtnl *hwtnl,
 
 enum pipe_error
 svga_hwtnl_draw_arrays(struct svga_hwtnl *hwtnl,
-                       unsigned prim, unsigned start, unsigned count,
+                       enum pipe_prim_type prim, unsigned start, unsigned count,
                        unsigned start_instance, unsigned instance_count);
 
 enum pipe_error
@@ -69,7 +69,7 @@ svga_hwtnl_draw_range_elements(struct svga_hwtnl *hwtnl,
                                int index_bias,
                                unsigned min_index,
                                unsigned max_index,
-                               unsigned prim, unsigned start, unsigned count,
+                               enum pipe_prim_type prim, unsigned start, unsigned count,
                                unsigned start_instance, unsigned instance_count);
 
 boolean
index 43d7a975695924f502ed4f1bebd0ae22b746747c..4bd1a33021711f9c291dbc3a67105308656e5ed9 100644 (file)
@@ -90,7 +90,7 @@ compare(unsigned cached_nr, unsigned nr, unsigned type)
 
 static enum pipe_error
 retrieve_or_generate_indices(struct svga_hwtnl *hwtnl,
-                             unsigned prim,
+                             enum pipe_prim_type prim,
                              unsigned gen_type,
                              unsigned gen_nr,
                              unsigned gen_size,
@@ -170,7 +170,7 @@ retrieve_or_generate_indices(struct svga_hwtnl *hwtnl,
 
 static enum pipe_error
 simple_draw_arrays(struct svga_hwtnl *hwtnl,
-                   unsigned prim, unsigned start, unsigned count,
+                   enum pipe_prim_type prim, unsigned start, unsigned count,
                    unsigned start_instance, unsigned instance_count)
 {
    SVGA3dPrimitiveRange range;
@@ -202,7 +202,7 @@ simple_draw_arrays(struct svga_hwtnl *hwtnl,
 
 enum pipe_error
 svga_hwtnl_draw_arrays(struct svga_hwtnl *hwtnl,
-                       unsigned prim, unsigned start, unsigned count,
+                       enum pipe_prim_type prim, unsigned start, unsigned count,
                        unsigned start_instance, unsigned instance_count)
 {
    unsigned gen_prim, gen_size, gen_nr;
index b74c745ee4a045766d0dea24dcc3164f541f79c2..6eb5067beec25050c5c1402548e4c900d559f58f 100644 (file)
@@ -39,7 +39,7 @@
 
 static enum pipe_error
 translate_indices(struct svga_hwtnl *hwtnl, struct pipe_resource *src,
-                  unsigned offset, unsigned prim, unsigned nr,
+                  unsigned offset, enum pipe_prim_type prim, unsigned nr,
                   unsigned index_size,
                   u_translate_func translate, struct pipe_resource **out_buf)
 {
@@ -98,7 +98,7 @@ svga_hwtnl_simple_draw_range_elements(struct svga_hwtnl *hwtnl,
                                       struct pipe_resource *index_buffer,
                                       unsigned index_size, int index_bias,
                                       unsigned min_index, unsigned max_index,
-                                      unsigned prim, unsigned start,
+                                      enum pipe_prim_type prim, unsigned start,
                                       unsigned count,
                                       unsigned start_instance,
                                       unsigned instance_count)
@@ -130,7 +130,7 @@ svga_hwtnl_draw_range_elements(struct svga_hwtnl *hwtnl,
                                struct pipe_resource *index_buffer,
                                unsigned index_size, int index_bias,
                                unsigned min_index, unsigned max_index,
-                               unsigned prim, unsigned start, unsigned count,
+                               enum pipe_prim_type prim, unsigned start, unsigned count,
                                unsigned start_instance, unsigned instance_count)
 {
    unsigned gen_prim, gen_size, gen_nr;
index da5d60e38f7baf5735d34112f04c97f44612243b..38e5e66fd5a8cbc4065acb58cc854dd0a301d8f8 100644 (file)
@@ -189,7 +189,8 @@ struct svga_hwtnl {
  * triangles?
  */
 static inline boolean
-svga_need_unfilled_fallback(const struct svga_hwtnl *hwtnl, unsigned prim)
+svga_need_unfilled_fallback(const struct svga_hwtnl *hwtnl,
+                            enum pipe_prim_type prim)
 {
    const struct svga_context *svga = hwtnl->svga;
 
@@ -235,7 +236,7 @@ svga_hwtnl_simple_draw_range_elements( struct svga_hwtnl *hwtnl,
                                        int index_bias,
                                        unsigned min_index,
                                        unsigned max_index,
-                                       unsigned prim, 
+                                       enum pipe_prim_type prim,
                                        unsigned start,
                                        unsigned count,
                                        unsigned start_instance,
index 50ebb53df906c69ee5ada6a5049181aea2e44caf..c9bcf3a5b6cff505b54d7267525c89412da3f9c8 100644 (file)
@@ -50,7 +50,7 @@ retry_draw_range_elements( struct svga_context *svga,
                            int index_bias,
                            unsigned min_index,
                            unsigned max_index,
-                           unsigned prim,
+                           enum pipe_prim_type prim,
                            unsigned start,
                            unsigned count,
                            unsigned start_instance,
@@ -101,7 +101,7 @@ retry:
 
 static enum pipe_error
 retry_draw_arrays( struct svga_context *svga,
-                   unsigned prim, unsigned start, unsigned count,
+                   enum pipe_prim_type prim, unsigned start, unsigned count,
                    unsigned start_instance, unsigned instance_count,
                    boolean do_retry )
 {
index 4bdb21a98427991779638827f53b583692d99e16..82fb11d59c25328508e6c3b5654d0fc6db9d79b1 100644 (file)
@@ -181,7 +181,7 @@ svga_vbuf_render_unmap_vertices( struct vbuf_render *render,
 
 static void
 svga_vbuf_render_set_primitive( struct vbuf_render *render,
-                                unsigned prim )
+                                enum pipe_prim_type prim )
 {
    struct svga_vbuf_render *svga_render = svga_vbuf_render(render);
    svga_render->prim = prim;
index 0a226abca88b4789f50a92469342f8707e34b06f..489b3bc0e36036ddcde1fe2dedb81c47537606e7 100644 (file)
@@ -45,7 +45,7 @@ struct svga_vbuf_render {
 
    SVGA3dElementLayoutId layout_id; /**< current element layout id */
 
-   unsigned prim;
+   enum pipe_prim_type prim;
 
    struct pipe_resource *vbuf;
    struct pipe_resource *ibuf;