Mesa (19.3): zink: correct depth-stencil format

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 13 19:28:39 UTC 2019


Module: Mesa
Branch: 19.3
Commit: 05be7259233443ac71095c174b65d69bd223dbe3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=05be7259233443ac71095c174b65d69bd223dbe3

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Fri Nov  8 12:22:00 2019 +0100

zink: correct depth-stencil format

When using packed vulkan-formats on little-endian systems, we need to
swap the components for the gallium formats. And since Zink isn't
big-endian safe yet, little-endian is the only endianess we care about
right now.

This fixes a bunch of piglit tests, amongs others:
- spec at arb_depth_texture@depth-level-clamp
- spec at arb_depth_texture@depthstencil-render-miplevels * d=z24
- spec at arb_depth_texture@fbo-depth-gl_depth_component24-blit
- spec at arb_depth_texture@fbo-depth-gl_depth_component24-copypixels
- spec at arb_depth_texture@fbo-depth-gl_depth_component24-drawpixels
- spec at arb_depth_texture@fbo-depth-gl_depth_component24-readpixels

Signed-off-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Fixes: 8d46e35d16e ("zink: introduce opengl over vulkan")
(cherry picked from commit b4d47e21d7004412a16c12b762239dbeee665752)

---

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

diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c
index 7addb9d9660..25aa369b4cc 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -551,7 +551,7 @@ static const VkFormat formats[PIPE_FORMAT_COUNT] = {
    [PIPE_FORMAT_Z32_FLOAT] = VK_FORMAT_D32_SFLOAT,
    [PIPE_FORMAT_Z32_FLOAT_S8X24_UINT] = VK_FORMAT_D32_SFLOAT_S8_UINT,
    [PIPE_FORMAT_Z16_UNORM] = VK_FORMAT_D16_UNORM,
-   [PIPE_FORMAT_X8Z24_UNORM] = VK_FORMAT_X8_D24_UNORM_PACK32,
+   [PIPE_FORMAT_Z24X8_UNORM] = VK_FORMAT_X8_D24_UNORM_PACK32,
    [PIPE_FORMAT_Z24_UNORM_S8_UINT] = VK_FORMAT_D24_UNORM_S8_UINT,
 
    // compressed formats




More information about the mesa-commit mailing list