Mesa (master): zink: use cached memory for staging resources
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 23 03:42:08 UTC 2021
Module: Mesa
Branch: master
Commit: e34dc0840bf318cdd6524bcb8671ae4b849e4039
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e34dc0840bf318cdd6524bcb8671ae4b849e4039
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Mon Apr 19 18:28:13 2021 -0400
zink: use cached memory for staging resources
I think at one point before staging resource flagging was less reliable
this method made sense, but now it's worse
Fixes: 6ff6d01c377 ("zink: don't use cached mem for staging resources")
Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10363>
---
src/gallium/drivers/zink/zink_resource.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c
index efd7a6e5df8..b1906ec2815 100644
--- a/src/gallium/drivers/zink/zink_resource.c
+++ b/src/gallium/drivers/zink/zink_resource.c
@@ -454,7 +454,7 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
if (templ->flags & PIPE_RESOURCE_FLAG_MAP_COHERENT || templ->usage == PIPE_USAGE_DYNAMIC)
flags |= VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
else if (!(flags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) &&
- templ->usage != PIPE_USAGE_STAGING)
+ templ->usage == PIPE_USAGE_STAGING)
flags |= VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
VkMemoryAllocateInfo mai = {};
More information about the mesa-commit
mailing list