mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 20:08:06 +02:00
zink: add COHERENT requirement for CACHED memory
zink doesn't handle non-coherent cached memory correctly, so ensure
that scenario is never hit
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23728>
(cherry picked from commit 7a169254c5)
This commit is contained in:
parent
c08692ab6b
commit
4dcacfff6a
3 changed files with 4 additions and 4 deletions
|
|
@ -220,7 +220,7 @@
|
|||
"description": "zink: add COHERENT requirement for CACHED memory",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ vk_domain_from_heap(enum zink_heap heap)
|
|||
domains = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
|
||||
break;
|
||||
case ZINK_HEAP_HOST_VISIBLE_CACHED:
|
||||
domains = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
|
||||
domains = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -707,7 +707,7 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
|
|||
|
||||
VKSCR(GetBufferMemoryRequirements)(screen->dev, obj->buffer, &reqs);
|
||||
if (templ->usage == PIPE_USAGE_STAGING)
|
||||
flags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
|
||||
flags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
|
||||
else if (templ->usage == PIPE_USAGE_STREAM)
|
||||
flags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
|
||||
else if (templ->usage == PIPE_USAGE_IMMUTABLE)
|
||||
|
|
@ -995,7 +995,7 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
|
|||
flags |= VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
|
||||
else if (!(flags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) &&
|
||||
templ->usage == PIPE_USAGE_STAGING)
|
||||
flags |= VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
|
||||
flags |= VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
|
||||
|
||||
if (templ->bind & ZINK_BIND_TRANSIENT)
|
||||
flags |= VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue