freedreno/a4xx: Fix sign compare warnings
authorfrancians@gmail.com <francians@gmail.com>
Thu, 30 Jun 2016 17:16:08 +0000 (19:16 +0200)
committerRob Clark <robdclark@gmail.com>
Thu, 14 Jul 2016 13:55:02 +0000 (09:55 -0400)
Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/a4xx/fd4_screen.c

index c193f361e4c84a2ad366df683c62a441db35ff2f..57fecf14724ce2d7acd9a4b9bbad0668cd839812 100644 (file)
@@ -52,14 +52,14 @@ fd4_screen_is_format_supported(struct pipe_screen *pscreen,
        }
 
        if ((usage & PIPE_BIND_VERTEX_BUFFER) &&
-                       (fd4_pipe2vtx(format) != ~0)) {
+                       (fd4_pipe2vtx(format) != ~0u)) {
                retval |= PIPE_BIND_VERTEX_BUFFER;
        }
 
        if ((usage & PIPE_BIND_SAMPLER_VIEW) &&
                        (target == PIPE_BUFFER ||
                         util_format_get_blocksize(format) != 12) &&
-                       (fd4_pipe2tex(format) != ~0)) {
+                       (fd4_pipe2tex(format) != ~0u)) {
                retval |= PIPE_BIND_SAMPLER_VIEW;
        }
 
@@ -67,8 +67,8 @@ fd4_screen_is_format_supported(struct pipe_screen *pscreen,
                                PIPE_BIND_DISPLAY_TARGET |
                                PIPE_BIND_SCANOUT |
                                PIPE_BIND_SHARED)) &&
-                       (fd4_pipe2color(format) != ~0) &&
-                       (fd4_pipe2tex(format) != ~0)) {
+                       (fd4_pipe2color(format) != ~0u) &&
+                       (fd4_pipe2tex(format) != ~0u)) {
                retval |= usage & (PIPE_BIND_RENDER_TARGET |
                                PIPE_BIND_DISPLAY_TARGET |
                                PIPE_BIND_SCANOUT |
@@ -76,13 +76,13 @@ fd4_screen_is_format_supported(struct pipe_screen *pscreen,
        }
 
        if ((usage & PIPE_BIND_DEPTH_STENCIL) &&
-                       (fd4_pipe2depth(format) != ~0) &&
-                       (fd4_pipe2tex(format) != ~0)) {
+                       (fd4_pipe2depth(format) != ~0u) &&
+                       (fd4_pipe2tex(format) != ~0u)) {
                retval |= PIPE_BIND_DEPTH_STENCIL;
        }
 
        if ((usage & PIPE_BIND_INDEX_BUFFER) &&
-                       (fd_pipe2index(format) != ~0)) {
+                       (fd_pipe2index(format) != ~0u)) {
                retval |= PIPE_BIND_INDEX_BUFFER;
        }