freedreno/a2xx: fix comparison out of range warnings
authorfrancians@gmail.com <francians@gmail.com>
Sat, 30 Jul 2016 07:49:57 +0000 (09:49 +0200)
committerRob Clark <robdclark@gmail.com>
Sat, 30 Jul 2016 13:25:16 +0000 (09:25 -0400)
Signed-off-by: Francesco Ansanelli <francians@gmail.com>
Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/a2xx/fd2_screen.c

index fe4849b32f7cae1c434eebc59ff587009110f44b..007b9e668705a31e7ad740bd63cd462d1d818046 100644 (file)
@@ -61,7 +61,7 @@ fd2_screen_is_format_supported(struct pipe_screen *pscreen,
 
        if ((usage & (PIPE_BIND_SAMPLER_VIEW |
                                PIPE_BIND_VERTEX_BUFFER)) &&
-                       (fd2_pipe2surface(format) != ~0u)) {
+                       (fd2_pipe2surface(format) != (enum a2xx_sq_surfaceformat)~0)) {
                retval |= usage & (PIPE_BIND_SAMPLER_VIEW |
                                PIPE_BIND_VERTEX_BUFFER);
        }
@@ -70,7 +70,7 @@ fd2_screen_is_format_supported(struct pipe_screen *pscreen,
                                PIPE_BIND_DISPLAY_TARGET |
                                PIPE_BIND_SCANOUT |
                                PIPE_BIND_SHARED)) &&
-                       (fd2_pipe2color(format) != ~0u)) {
+                       (fd2_pipe2color(format) != (enum a2xx_colorformatx)~0)) {
                retval |= usage & (PIPE_BIND_RENDER_TARGET |
                                PIPE_BIND_DISPLAY_TARGET |
                                PIPE_BIND_SCANOUT |
@@ -78,12 +78,12 @@ fd2_screen_is_format_supported(struct pipe_screen *pscreen,
        }
 
        if ((usage & PIPE_BIND_DEPTH_STENCIL) &&
-                       (fd_pipe2depth(format) != ~0u)) {
+                       (fd_pipe2depth(format) != (enum adreno_rb_depth_format)~0)) {
                retval |= PIPE_BIND_DEPTH_STENCIL;
        }
 
        if ((usage & PIPE_BIND_INDEX_BUFFER) &&
-                       (fd_pipe2index(format) != ~0u)) {
+                       (fd_pipe2index(format) != (enum pc_di_index_size)~0)) {
                retval |= PIPE_BIND_INDEX_BUFFER;
        }