Mesa (main): freedreno/a4xx: make luminance formats renderable, add missing L8A8_SNORM
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Feb 20 17:23:23 UTC 2022
Module: Mesa
Branch: main
Commit: 357dae424fe4ea153827d8c7e3cd1e645a8a5ff5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=357dae424fe4ea153827d8c7e3cd1e645a8a5ff5
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Sat Feb 19 12:19:58 2022 -0500
freedreno/a4xx: make luminance formats renderable, add missing L8A8_SNORM
If the luminance formats aren't renderable, they back out to R*
formats, but those will end up with a 1 in alpha rather than 0 when
textured. So instead make them explicitly renderable, which will cause
the correct texture format swizzle to be applied.
Fixes query-rgba-signed-components and probably others.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15097>
---
src/gallium/drivers/freedreno/a4xx/fd4_format.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_format.c b/src/gallium/drivers/freedreno/a4xx/fd4_format.c
index 5c34213cd02..c66e9a3d564 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_format.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_format.c
@@ -105,11 +105,11 @@ static struct fd4_format formats[PIPE_FORMAT_COUNT] = {
_T(A16_UINT, 16_UINT, NONE, WZYX),
_T(A16_SINT, 16_SINT, NONE, WZYX),
_T(A16_FLOAT, 16_FLOAT, NONE, WZYX),
- _T(L16_UNORM, 16_UNORM, NONE, WZYX),
- _T(L16_SNORM, 16_SNORM, NONE, WZYX),
- _T(L16_UINT, 16_UINT, NONE, WZYX),
- _T(L16_SINT, 16_SINT, NONE, WZYX),
- _T(L16_FLOAT, 16_FLOAT, NONE, WZYX),
+ _T(L16_UNORM, 16_UNORM, R16_UNORM, WZYX),
+ _T(L16_SNORM, 16_SNORM, R16_SNORM, WZYX),
+ _T(L16_UINT, 16_UINT, R16_UINT, WZYX),
+ _T(L16_SINT, 16_SINT, R16_SINT, WZYX),
+ _T(L16_FLOAT, 16_FLOAT, R16_FLOAT, WZYX),
_T(I16_UNORM, 16_UNORM, NONE, WZYX),
_T(I16_SNORM, 16_SNORM, NONE, WZYX),
_T(I16_UINT, 16_UINT, NONE, WZYX),
@@ -125,6 +125,7 @@ static struct fd4_format formats[PIPE_FORMAT_COUNT] = {
V_(R8G8_SSCALED, 8_8_SINT, NONE, WZYX),
_T(L8A8_UNORM, 8_8_UNORM, NONE, WZYX),
+ _T(L8A8_SNORM, 8_8_SNORM, NONE, WZYX),
_T(L8A8_UINT, 8_8_UINT, NONE, WZYX),
_T(L8A8_SINT, 8_8_SINT, NONE, WZYX),
@@ -152,9 +153,9 @@ static struct fd4_format formats[PIPE_FORMAT_COUNT] = {
_T(A32_UINT, 32_UINT, NONE, WZYX),
_T(A32_SINT, 32_SINT, NONE, WZYX),
_T(A32_FLOAT, 32_FLOAT, NONE, WZYX),
- _T(L32_UINT, 32_UINT, NONE, WZYX),
- _T(L32_SINT, 32_SINT, NONE, WZYX),
- _T(L32_FLOAT, 32_FLOAT, NONE, WZYX),
+ _T(L32_UINT, 32_UINT, R32_UINT, WZYX),
+ _T(L32_SINT, 32_SINT, R32_SINT, WZYX),
+ _T(L32_FLOAT, 32_FLOAT, R32_FLOAT,WZYX),
_T(I32_UINT, 32_UINT, NONE, WZYX),
_T(I32_SINT, 32_SINT, NONE, WZYX),
_T(I32_FLOAT, 32_FLOAT, NONE, WZYX),
More information about the mesa-commit
mailing list