From f03191048668ebcda56053f4c908e1ac0d98edd0 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 16 Oct 2012 18:32:57 -0600 Subject: [PATCH] draw: silence MSVC signed/unsigned comparison warnings Reviewed-by: Jose Fonseca --- src/gallium/auxiliary/draw/draw_context.c | 2 +- src/gallium/auxiliary/draw/draw_gs.c | 4 ++-- src/gallium/auxiliary/draw/draw_pipe_stipple.c | 2 +- src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c index 53be8f7eac5..48b5db34027 100644 --- a/src/gallium/auxiliary/draw/draw_context.c +++ b/src/gallium/auxiliary/draw/draw_context.c @@ -159,7 +159,7 @@ boolean draw_init(struct draw_context *draw) void draw_destroy( struct draw_context *draw ) { struct pipe_context *pipe; - int i, j; + unsigned i, j; if (!draw) return; diff --git a/src/gallium/auxiliary/draw/draw_gs.c b/src/gallium/auxiliary/draw/draw_gs.c index c5647268595..0152c1a0cbb 100644 --- a/src/gallium/auxiliary/draw/draw_gs.c +++ b/src/gallium/auxiliary/draw/draw_gs.c @@ -87,7 +87,7 @@ draw_create_geometry_shader(struct draw_context *draw, const struct pipe_shader_state *state) { struct draw_geometry_shader *gs; - int i; + unsigned i; gs = CALLOC_STRUCT(draw_geometry_shader); @@ -162,7 +162,7 @@ void draw_delete_geometry_shader(struct draw_context *draw, /*#define DEBUG_OUTPUTS 1*/ static INLINE void draw_geometry_fetch_outputs(struct draw_geometry_shader *shader, - int num_primitives, + unsigned num_primitives, float (**p_output)[4]) { struct tgsi_exec_machine *machine = shader->machine; diff --git a/src/gallium/auxiliary/draw/draw_pipe_stipple.c b/src/gallium/auxiliary/draw/draw_pipe_stipple.c index 4b3f4e7ae11..d97e52be09b 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_stipple.c +++ b/src/gallium/auxiliary/draw/draw_pipe_stipple.c @@ -73,7 +73,7 @@ screen_interp( struct draw_context *draw, const struct vertex_header *v1 ) { uint attr; - int num_outputs = draw_current_shader_outputs(draw); + uint num_outputs = draw_current_shader_outputs(draw); for (attr = 0; attr < num_outputs; attr++) { const float *val0 = v0->data[attr]; const float *val1 = v1->data[attr]; diff --git a/src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h b/src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h index 98a4668efb7..75cbec87bed 100644 --- a/src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h +++ b/src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h @@ -71,7 +71,7 @@ CONCAT(vsplit_primitive_, ELT_TYPE)(struct vsplit_frontend *vsplit, if (max_index - min_index > icount - 1) return FALSE; - if (elt_bias < 0 && min_index < -elt_bias) + if (elt_bias < 0 && (int) min_index < -elt_bias) return FALSE; /* why this check? */ @@ -158,19 +158,19 @@ CONCAT(vsplit_segment_cache_, ELT_TYPE)(struct vsplit_frontend *vsplit, } else { if (spoken) { - if (ib[ispoken] < -ibias) + if ((int) ib[ispoken] < -ibias) return; ADD_CACHE(vsplit, ib[ispoken] + ibias); } for (i = spoken; i < icount; i++) { - if (ib[istart + i] < -ibias) + if ((int) ib[istart + i] < -ibias) return; ADD_CACHE(vsplit, ib[istart + i] + ibias); } if (close) { - if (ib[iclose] < -ibias) + if ((int) ib[iclose] < -ibias) return; ADD_CACHE(vsplit, ib[iclose] + ibias); } -- 2.30.2