From 6da405ca7773745cdb383b5bb43a6a1575eea4f3 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 10 Jul 2020 17:18:00 -0400 Subject: [PATCH] panfrost: Filter compressed texture formats Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/panfrost/pan_screen.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index 472529e52ad..1cb7fc3cbda 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -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); } -- 2.30.2