zink: limit host-visible bind-flags

The only type that should really require to be host-visible is the
display-target, and that's just because of our silly flush_frontbuffer
implementation.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8858>
This commit is contained in:
Erik Faye-Lund
2021-02-04 10:46:56 +01:00
committed by Marge Bot
parent 9fc179c774
commit 9d0ad591f9
+2 -1
View File
@@ -285,7 +285,8 @@ resource_create(struct pipe_screen *pscreen,
res->aspect = aspect_from_format(templ->format);
vkGetImageMemoryRequirements(screen->dev, res->image, &reqs);
if (templ->usage == PIPE_USAGE_STAGING || (screen->winsys && (templ->bind & (PIPE_BIND_SCANOUT|PIPE_BIND_DISPLAY_TARGET|PIPE_BIND_SHARED))))
if (templ->usage == PIPE_USAGE_STAGING ||
(screen->winsys && (templ->bind & PIPE_BIND_DISPLAY_TARGET)))
flags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
else
flags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;