mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
zink: force host-visible allocations for MAP_COHERENT resources
this fixes persistent maps for systems without any BAR
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27707>
(cherry picked from commit ccbf9b0ea7)
This commit is contained in:
parent
0738409dc7
commit
7426889729
2 changed files with 5 additions and 1 deletions
|
|
@ -2104,7 +2104,7 @@
|
|||
"description": "zink: force host-visible allocations for MAP_COHERENT resources",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -1181,6 +1181,10 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
|
|||
mai.pNext = NULL;
|
||||
mai.allocationSize = reqs.size;
|
||||
enum zink_heap heap = zink_heap_from_domain_flags(flags, aflags);
|
||||
if (templ->flags & PIPE_RESOURCE_FLAG_MAP_COHERENT) {
|
||||
if (!(vk_domain_from_heap(heap) & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT))
|
||||
heap = zink_heap_from_domain_flags(flags & ~VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, aflags);
|
||||
}
|
||||
|
||||
VkMemoryDedicatedAllocateInfo ded_alloc_info = {
|
||||
.sType = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue