freedreno: Use explicit *_NONE enum for undefined formats
[mesa.git] / src / gallium / drivers / freedreno / a3xx / fd3_screen.c
index bdf8eaa06984a679aedba8ce30dca0e24723132e..772426c82f32c59ff9a80f4541ffa3a7b44ac555 100644 (file)
@@ -56,12 +56,12 @@ fd3_screen_is_format_supported(struct pipe_screen *pscreen,
                return false;
 
        if ((usage & PIPE_BIND_VERTEX_BUFFER) &&
-                       (fd3_pipe2vtx(format) != (enum a3xx_vtx_fmt)~0)) {
+                       (fd3_pipe2vtx(format) != VFMT_NONE)) {
                retval |= PIPE_BIND_VERTEX_BUFFER;
        }
 
        if ((usage & PIPE_BIND_SAMPLER_VIEW) &&
-                       (fd3_pipe2tex(format) != (enum a3xx_tex_fmt)~0)) {
+                       (fd3_pipe2tex(format) != TFMT_NONE)) {
                retval |= PIPE_BIND_SAMPLER_VIEW;
        }
 
@@ -70,8 +70,8 @@ fd3_screen_is_format_supported(struct pipe_screen *pscreen,
                                PIPE_BIND_SCANOUT |
                                PIPE_BIND_SHARED |
                                PIPE_BIND_BLENDABLE)) &&
-                       (fd3_pipe2color(format) != (enum a3xx_color_fmt)~0) &&
-                       (fd3_pipe2tex(format) != (enum a3xx_tex_fmt)~0)) {
+                       (fd3_pipe2color(format) != RB_NONE) &&
+                       (fd3_pipe2tex(format) != TFMT_NONE)) {
                retval |= usage & (PIPE_BIND_RENDER_TARGET |
                                PIPE_BIND_DISPLAY_TARGET |
                                PIPE_BIND_SCANOUT |
@@ -82,7 +82,7 @@ fd3_screen_is_format_supported(struct pipe_screen *pscreen,
 
        if ((usage & PIPE_BIND_DEPTH_STENCIL) &&
                        (fd_pipe2depth(format) != (enum adreno_rb_depth_format)~0) &&
-                       (fd3_pipe2tex(format) != (enum a3xx_tex_fmt)~0)) {
+                       (fd3_pipe2tex(format) != TFMT_NONE)) {
                retval |= PIPE_BIND_DEPTH_STENCIL;
        }