svga: s/unsigned/pipe_prim_type/
authorBrian Paul <brianp@vmware.com>
Wed, 1 Mar 2017 21:52:46 +0000 (14:52 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 2 Mar 2017 17:11:19 +0000 (10:11 -0700)
And add some default switch cases to silence compiler warnings.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/gallium/drivers/svga/svga_context.h
src/gallium/drivers/svga/svga_pipe_draw.c
src/gallium/drivers/svga/svga_state_framebuffer.c
src/gallium/drivers/svga/svga_swtnl_state.c

index 02aa666154c9723c807ab62667b8d9cd806aa9cd..40966e9b52ec7bc3af14875408208c5136ce1267 100644 (file)
@@ -293,7 +293,7 @@ struct svga_state
    unsigned num_samplers[PIPE_SHADER_TYPES];
    unsigned num_sampler_views[PIPE_SHADER_TYPES];
    unsigned num_vertex_buffers;
-   unsigned reduced_prim;
+   enum pipe_prim_type reduced_prim;
 
    struct {
       unsigned flag_1d;
index b9637b25b344ff846a60f86dc71011f18f3d8f03..30524a0e3ec49a7a820c3efdf2b62d6f6c4dc1d4 100644 (file)
@@ -182,7 +182,7 @@ static void
 svga_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
 {
    struct svga_context *svga = svga_context( pipe );
-   unsigned reduced_prim = u_reduced_prim( info->mode );
+   enum pipe_prim_type reduced_prim = u_reduced_prim( info->mode );
    unsigned count = info->count;
    enum pipe_error ret = 0;
    boolean needed_swtnl;
index b1362a981689ffe0ca183db9ca5a1ea159f0fc5f..8584c5d42b6986322375cb6267d5537f5f48afe3 100644 (file)
@@ -525,6 +525,9 @@ emit_viewport( struct svga_context *svga,
             adjust_x = -0.5;
             adjust_y = -0.5;
             break;
+         default:
+            /* nothing */
+            break;
          }
       }
 
index db41f3cdab0083b1816cc6803294612563283675..71faf3a610e6cb98abc542196c3c6b646b68aab8 100644 (file)
@@ -84,6 +84,9 @@ static void set_draw_viewport( struct svga_context *svga )
          adjx += SVGA_TRIANGLE_ADJ_X;
          adjy += SVGA_TRIANGLE_ADJ_Y;
          break;
+      default:
+         /* nothing */
+         break;
       }
    }