diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-06-04 17:36:16 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-06-15 21:53:09 +0000 |
commit | 8b6820c92d213087c3ed050fdd0e8bd5847a90e6 (patch) | |
tree | 65e1b3769e7227bee2befab8cfaeaf35d1501e3b /src/panfrost/encoder/pan_afbc.c | |
parent | 27d3685528bc7ee79e94738af8f6bee1a4f8b795 (diff) |
panfrost: Simplify AFBC format check
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5484>
Diffstat (limited to 'src/panfrost/encoder/pan_afbc.c')
-rw-r--r-- | src/panfrost/encoder/pan_afbc.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/panfrost/encoder/pan_afbc.c b/src/panfrost/encoder/pan_afbc.c index 272a7133478..f1f62baffc9 100644 --- a/src/panfrost/encoder/pan_afbc.c +++ b/src/panfrost/encoder/pan_afbc.c @@ -92,7 +92,12 @@ panfrost_format_supports_afbc(enum pipe_format format) if (util_format_is_rgba8_variant(desc)) return true; - /* List some special formats */ + /* Only Z24S8 variants are compressible as Z/S */ + + if (panfrost_is_z24s8_variant(format)) + return true; + + /* Lookup special formats */ switch (format) { case PIPE_FORMAT_R8G8B8_UNORM: case PIPE_FORMAT_B8G8R8_UNORM: @@ -100,17 +105,8 @@ panfrost_format_supports_afbc(enum pipe_format format) case PIPE_FORMAT_B5G6R5_UNORM: return true; default: - break; + return false; } - - /* Only Z24S8 variants are compressible as Z/S */ - - if (panfrost_is_z24s8_variant(format)) - return true; - - /* TODO: AFBC of other formats */ - - return false; } unsigned |