From: Alyssa Rosenzweig Date: Fri, 10 Jul 2020 21:18:00 +0000 (-0400) Subject: panfrost: Filter compressed texture formats X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6da405ca7773745cdb383b5bb43a6a1575eea4f3;p=mesa.git panfrost: Filter compressed texture formats Signed-off-by: Alyssa Rosenzweig Part-of: --- 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); }