mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
panfrost: Luminance-alpha AFBC unsupported on v7+
The L8_UNORM, A8_UNORM, and L8A8_UNORM v7 formats do not support AFBC, regardless of swizzling. We're about to lift the restrictions on swizzling with AFBC on v7, so we'll need to handle these cases explicitly to avoid using AFBC in these cases. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20311>
This commit is contained in:
parent
a3f9aa3b3e
commit
0784adc668
1 changed files with 14 additions and 0 deletions
|
|
@ -118,6 +118,20 @@ unswizzled_format(enum pipe_format format)
|
|||
enum pipe_format
|
||||
panfrost_afbc_format(unsigned arch, enum pipe_format format)
|
||||
{
|
||||
/* Luminance-alpha not supported for AFBC on v7+ */
|
||||
switch (format) {
|
||||
case PIPE_FORMAT_A8_UNORM:
|
||||
case PIPE_FORMAT_L8_UNORM:
|
||||
case PIPE_FORMAT_I8_UNORM:
|
||||
case PIPE_FORMAT_L8A8_UNORM:
|
||||
if (arch >= 7)
|
||||
return PIPE_FORMAT_NONE;
|
||||
else
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* sRGB does not change the pixel format itself, only the
|
||||
* interpretation. The interpretation is handled by conversion hardware
|
||||
* independent to the compression hardware, so we can compress sRGB
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue