Mesa (main): zink: set VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT on zs rts

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 9 17:40:57 UTC 2021


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Fri Apr  2 17:31:13 2021 -0400

zink: set VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT on zs rts

Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11189>

---

 src/gallium/drivers/zink/zink_resource.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c
index 9bb38273dbf..8e5b04ad9ef 100644
--- a/src/gallium/drivers/zink/zink_resource.c
+++ b/src/gallium/drivers/zink/zink_resource.c
@@ -353,6 +353,11 @@ create_ici(struct zink_screen *screen, const struct pipe_resource *templ, unsign
       unreachable("Unknown target");
    }
 
+   if (screen->info.have_EXT_sample_locations &&
+       bind & PIPE_BIND_DEPTH_STENCIL &&
+       util_format_has_depth(util_format_description(templ->format)))
+      ici.flags |= VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT;
+
    ici.format = zink_get_format(screen, templ->format);
    ici.extent.width = templ->width0;
    ici.extent.height = templ->height0;



More information about the mesa-commit mailing list