mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 23:00:11 +01:00
zink: set dedicated allocation when needed
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11958>
This commit is contained in:
parent
a8727ec856
commit
785b4728cf
1 changed files with 12 additions and 0 deletions
|
|
@ -658,6 +658,18 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
|
|||
mai.allocationSize = reqs.size = align(reqs.size, screen->info.props.limits.nonCoherentAtomSize);
|
||||
}
|
||||
|
||||
VkMemoryDedicatedAllocateInfo ded_alloc_info = {
|
||||
.sType = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO,
|
||||
.pNext = mai.pNext,
|
||||
.image = obj->image,
|
||||
.buffer = VK_NULL_HANDLE,
|
||||
};
|
||||
|
||||
if (screen->info.have_KHR_dedicated_allocation && need_dedicated) {
|
||||
ded_alloc_info.pNext = mai.pNext;
|
||||
mai.pNext = &ded_alloc_info;
|
||||
}
|
||||
|
||||
VkExportMemoryAllocateInfo emai = {0};
|
||||
if (templ->bind & PIPE_BIND_SHARED && shared) {
|
||||
emai.sType = VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue