summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2021-04-19 18:28:13 -0400
committerMarge Bot <eric+marge@anholt.net>2021-04-23 03:31:34 +0000
commite34dc0840bf318cdd6524bcb8671ae4b849e4039 (patch)
tree6d77460a1f39f783ff0ca2010c4f274bc326d8a4
parent67d22bd8e0b764c69f60e361a3a1425750823ff3 (diff)
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@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10363>
-rw-r--r--src/gallium/drivers/zink/zink_resource.c2
1 files changed, 1 insertions, 1 deletions
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 = {};