zink: fix format-mapping
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 7 Dec 2020 19:51:45 +0000 (20:51 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 16 Dec 2020 20:51:33 +0000 (20:51 +0000)
These formats are incorrectly mapped, and should be reversed.

Fixes: 8d46e35d16e ("zink: introduce opengl over vulkan")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7982>

src/gallium/drivers/zink/zink_format.c

index 1bf104bc4fde853bf94c3e2610cede576caf1d0d..165ee12ab41f6ffc5654c5335c687498f195ced9 100644 (file)
@@ -74,7 +74,7 @@ static const VkFormat formats[PIPE_FORMAT_COUNT] = {
    MAP_FORMAT_SRGB(R8G8B8A8)
    [PIPE_FORMAT_B8G8R8A8_UNORM] = VK_FORMAT_B8G8R8A8_UNORM,
    MAP_FORMAT_SRGB(B8G8R8A8)
-   [PIPE_FORMAT_A8B8G8R8_SRGB] = VK_FORMAT_A8B8G8R8_SRGB_PACK32,
+   [PIPE_FORMAT_R8G8B8A8_SRGB] = VK_FORMAT_A8B8G8R8_SRGB_PACK32,
    // 16-bits
    MAP_FORMAT_NORM(R16G16B16A16)
    MAP_FORMAT_SCALED(R16G16B16A16)
@@ -86,7 +86,7 @@ static const VkFormat formats[PIPE_FORMAT_COUNT] = {
 
    // other color formats
    [PIPE_FORMAT_B5G6R5_UNORM] = VK_FORMAT_R5G6B5_UNORM_PACK16,
-   [PIPE_FORMAT_B5G5R5A1_UNORM] = VK_FORMAT_B5G5R5A1_UNORM_PACK16,
+   [PIPE_FORMAT_A1R5G5B5_UNORM] = VK_FORMAT_B5G5R5A1_UNORM_PACK16,
    [PIPE_FORMAT_R11G11B10_FLOAT] = VK_FORMAT_B10G11R11_UFLOAT_PACK32,
    [PIPE_FORMAT_R9G9B9E5_FLOAT] = VK_FORMAT_E5B9G9R9_UFLOAT_PACK32,
    /* ARB_vertex_type_2_10_10_10 */