From d364faa322beec4c6285f250c8fc1a61a8d837a5 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 2 Apr 2021 17:31:13 -0400 Subject: [PATCH] zink: set VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT on zs rts Reviewed-by: Erik Faye-Lund Part-of: --- 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;