freedreno: reorder format check
[mesa.git] / src / gallium / drivers / freedreno / a5xx / fd5_screen.c
index b478be3aa66809f535408b85e5f9f87fdf072cbd..12dcb8a6e8014bec63bcf425e8f6099ed2d1d1bb 100644 (file)
@@ -76,9 +76,9 @@ fd5_screen_is_format_supported(struct pipe_screen *pscreen,
        }
 
        if ((usage & (PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_SHADER_IMAGE)) &&
+                       (fd5_pipe2tex(format) != (enum a5xx_tex_fmt)~0) &&
                        (target == PIPE_BUFFER ||
-                        util_format_get_blocksize(format) != 12) &&
-                       (fd5_pipe2tex(format) != (enum a5xx_tex_fmt)~0)) {
+                        util_format_get_blocksize(format) != 12)) {
                retval |= usage & (PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_SHADER_IMAGE);
        }