panfrost: Filter compressed texture formats

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5856>
This commit is contained in:
Alyssa Rosenzweig 2020-07-10 17:18:00 -04:00
parent 407a052ced
commit 6da405ca77
1 changed files with 8 additions and 0 deletions

View 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);
}