i965: Resolve GCC sign-compare warning.
authorRhys Kidd <rhyskidd@gmail.com>
Thu, 6 Aug 2015 06:34:12 +0000 (16:34 +1000)
committerMatt Turner <mattst88@gmail.com>
Tue, 18 Aug 2015 18:34:44 +0000 (11:34 -0700)
mesa/src/mesa/drivers/dri/i965/brw_tex_layout.c: In function 'brw_miptree_layout_texture_array':
mesa/src/mesa/drivers/dri/i965/brw_tex_layout.c:560:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for (int q = 0; q < mt->level[level].depth; q++) {
                         ^

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
src/mesa/drivers/dri/i965/brw_tex_layout.c

index b8b03932065dac3251545432742598604f5572bc..e96732a1908992d918996adfd247a4daa17bc593 100644 (file)
@@ -555,7 +555,7 @@ brw_miptree_layout_texture_array(struct brw_context *brw,
       if (mt->compressed)
          img_height /= mt->align_h;
 
-      for (int q = 0; q < mt->level[level].depth; q++) {
+      for (unsigned q = 0; q < mt->level[level].depth; q++) {
          if (mt->array_layout == ALL_SLICES_AT_EACH_LOD) {
             intel_miptree_set_image_offset(mt, level, q, 0, q * img_height);
          } else {