[Mesa-dev] [PATCH 1/2] svga: s/unsigned/pipe_prim_type/
Brian Paul
brianp at vmware.com
Thu Mar 2 02:45:53 UTC 2017
And add some default switch cases to silence compiler warnings.
---
src/gallium/drivers/svga/svga_context.h | 2 +-
src/gallium/drivers/svga/svga_pipe_draw.c | 2 +-
src/gallium/drivers/svga/svga_state_framebuffer.c | 3 +++
src/gallium/drivers/svga/svga_swtnl_state.c | 3 +++
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/svga/svga_context.h b/src/gallium/drivers/svga/svga_context.h
index 02aa666..40966e9 100644
--- a/src/gallium/drivers/svga/svga_context.h
+++ b/src/gallium/drivers/svga/svga_context.h
@@ -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;
diff --git a/src/gallium/drivers/svga/svga_pipe_draw.c b/src/gallium/drivers/svga/svga_pipe_draw.c
index b9637b2..30524a0 100644
--- a/src/gallium/drivers/svga/svga_pipe_draw.c
+++ b/src/gallium/drivers/svga/svga_pipe_draw.c
@@ -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;
diff --git a/src/gallium/drivers/svga/svga_state_framebuffer.c b/src/gallium/drivers/svga/svga_state_framebuffer.c
index b1362a9..8584c5d 100644
--- a/src/gallium/drivers/svga/svga_state_framebuffer.c
+++ b/src/gallium/drivers/svga/svga_state_framebuffer.c
@@ -525,6 +525,9 @@ emit_viewport( struct svga_context *svga,
adjust_x = -0.5;
adjust_y = -0.5;
break;
+ default:
+ /* nothing */
+ break;
}
}
diff --git a/src/gallium/drivers/svga/svga_swtnl_state.c b/src/gallium/drivers/svga/svga_swtnl_state.c
index db41f3c..71faf3a 100644
--- a/src/gallium/drivers/svga/svga_swtnl_state.c
+++ b/src/gallium/drivers/svga/svga_swtnl_state.c
@@ -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;
}
}
--
1.9.1
More information about the mesa-dev
mailing list