panfrost: Filter compressed texture formats
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 10 Jul 2020 21:18:00 +0000 (17:18 -0400)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 13 Jul 2020 15:22:00 +0000 (11:22 -0400)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5856>

src/gallium/drivers/panfrost/pan_screen.c

index 472529e52addf6dc0640e4bc2d2650227fac123a..1cb7fc3cbda996c84be0628f9b815c17bfa370eb 100644 (file)
@@ -496,6 +496,14 @@ panfrost_is_format_supported( struct pipe_screen *screen,
                 | PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_SAMPLER_VIEW);
 
         struct panfrost_format fmt = panfrost_pipe_format_table[format];
+
+        /* Also check that compressed texture formats are supported on this
+         * particular chip. They may not be depending on system integration
+         * differences. */
+
+        if (!panfrost_supports_compressed_format(dev, fmt.hw))
+                return false;
+
         return fmt.hw && ((relevant_bind & ~fmt.bind) == 0);
 }