zink: set VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT on zs rts

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11189>
This commit is contained in:
Mike Blumenkrantz 2021-04-02 17:31:13 -04:00 committed by Marge Bot
parent 652db34f8a
commit d364faa322
1 changed files with 5 additions and 0 deletions

View File

@ -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;