mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 23:10:11 +01:00
panfrost: Don't use AFBC of sRGB luminance-alpha
This isn't allowed for the same reason that AFBC of regular luminance-alpha
isn't allowed (and will raise DATA_INVALID_FAULTs). Reorder the checks to
ensure these formats are checked.
Fixes Piglit texwrap GL_EXT_texture_sRGB-s3tc.
Fixes: 476be5cb27 ("panfrost: Don't use texture format swizzles on v7")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20686>
This commit is contained in:
parent
48a0478126
commit
5fdfd8044d
1 changed files with 7 additions and 7 deletions
|
|
@ -118,6 +118,13 @@ unswizzled_format(enum pipe_format format)
|
|||
enum pan_afbc_mode
|
||||
panfrost_afbc_format(unsigned arch, enum pipe_format format)
|
||||
{
|
||||
/* 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
|
||||
* formats by using the corresponding linear format.
|
||||
*/
|
||||
format = util_format_linear(format);
|
||||
|
||||
/* Luminance-alpha not supported for AFBC on v7+ */
|
||||
switch (format) {
|
||||
case PIPE_FORMAT_A8_UNORM:
|
||||
|
|
@ -132,13 +139,6 @@ panfrost_afbc_format(unsigned arch, enum pipe_format format)
|
|||
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
|
||||
* formats by using the corresponding linear format.
|
||||
*/
|
||||
format = util_format_linear(format);
|
||||
|
||||
/* We handle swizzling orthogonally to AFBC */
|
||||
format = unswizzled_format(format);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue