summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorRhys Kidd <[email protected]>2015-08-06 16:34:09 +1000
committerMatt Turner <[email protected]>2015-08-18 11:34:44 -0700
commit5be455281eca77955aff52f01c6adb9281f4d747 (patch)
treee474844eeaffa37faf38c1f1baf77b5dc4fa4098 /src/mesa
parent82bc45bb0863f895a6ac7c734bf127a7d0290eeb (diff)
i965: Resolve GCC sign-compare warning.
mesa/src/mesa/drivers/dri/i965/brw_draw_upload.c: In function 'brw_prepare_vertices': mesa/src/mesa/drivers/dri/i965/brw_draw_upload.c:434:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = j = 0; i < brw->vb.nr_enabled; i++) { ^ mesa/src/mesa/drivers/dri/i965/brw_draw_upload.c:557:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < nr_uploads; i++) { ^ mesa/src/mesa/drivers/dri/i965/brw_draw_upload.c:569:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < nr_uploads; i++) { ^ Signed-off-by: Rhys Kidd <[email protected]> Reviewed-by: Thomas Helland <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw_upload.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index cbfd5855410..33b1e41b1a5 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -395,7 +395,8 @@ brw_prepare_vertices(struct brw_context *brw)
GLuint interleaved = 0;
unsigned int min_index = brw->vb.min_index + brw->basevertex;
unsigned int max_index = brw->vb.max_index + brw->basevertex;
- int delta, i, j;
+ unsigned i;
+ int delta, j;
struct brw_vertex_element *upload[VERT_ATTRIB_MAX];
GLuint nr_uploads = 0;
@@ -418,10 +419,10 @@ brw_prepare_vertices(struct brw_context *brw)
/* Accumulate the list of enabled arrays. */
brw->vb.nr_enabled = 0;
while (vs_inputs) {
- GLuint i = ffsll(vs_inputs) - 1;
- struct brw_vertex_element *input = &brw->vb.inputs[i];
+ GLuint index = ffsll(vs_inputs) - 1;
+ struct brw_vertex_element *input = &brw->vb.inputs[index];
- vs_inputs &= ~BITFIELD64_BIT(i);
+ vs_inputs &= ~BITFIELD64_BIT(index);
brw->vb.enabled[brw->vb.nr_enabled++] = input;
}
@@ -438,7 +439,7 @@ brw_prepare_vertices(struct brw_context *brw)
if (_mesa_is_bufferobj(glarray->BufferObj)) {
struct intel_buffer_object *intel_buffer =
intel_buffer_object(glarray->BufferObj);
- int k;
+ unsigned k;
/* If we have a VB set to be uploaded for this buffer object
* already, reuse that VB state so that we emit fewer