Mesa (master): zink: Fix VK_FORMAT_A8B8G8R8_SRGB_PACK32 mapping on big-endian

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Jan 10 21:34:07 UTC 2021


Module: Mesa
Branch: master
Commit: a22a1c0324e0d20c03ee4dceb9ddc4fa4d07ec04
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a22a1c0324e0d20c03ee4dceb9ddc4fa4d07ec04

Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Jan  8 14:45:31 2021 -0500

zink: Fix VK_FORMAT_A8B8G8R8_SRGB_PACK32 mapping on big-endian

The PACK32 Vulkan formats need to map to the corresponding XYZWxxxx pipe
formats, since the latter take endianness into account.

Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8394>

---

 src/gallium/drivers/zink/zink_format.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_format.c b/src/gallium/drivers/zink/zink_format.c
index c901c5cd1f0..18b6d4ef61e 100644
--- a/src/gallium/drivers/zink/zink_format.c
+++ b/src/gallium/drivers/zink/zink_format.c
@@ -82,7 +82,7 @@ static const VkFormat formats[PIPE_FORMAT_COUNT] = {
    MAP_FORMAT_SCALED(B8G8R8A8)
    MAP_FORMAT_INT(B8G8R8A8)
    MAP_FORMAT_SRGB(B8G8R8A8)
-   [PIPE_FORMAT_R8G8B8A8_SRGB] = VK_FORMAT_A8B8G8R8_SRGB_PACK32,
+   [PIPE_FORMAT_RGBA8888_SRGB] = VK_FORMAT_A8B8G8R8_SRGB_PACK32,
    // 16-bits
    MAP_FORMAT_NORM(R16G16B16A16)
    MAP_FORMAT_SCALED(R16G16B16A16)



More information about the mesa-commit mailing list