From 9d0ad591f93b26fd89a629b1c13ae1cf2441d48d Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Thu, 4 Feb 2021 10:46:56 +0100 Subject: [PATCH] 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 Part-of: --- src/gallium/drivers/zink/zink_resource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c index 490ab36c84f..6bc8a3d5b5f 100644 --- a/src/gallium/drivers/zink/zink_resource.c +++ b/src/gallium/drivers/zink/zink_resource.c @@ -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;