nvk: Advertise KHR_dedicated_allocation

We're not requiring or even requesting anything to be dedicated yet but
we may as well put in the plumbing.  This gets more tests running.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
Faith Ekstrand
2023-01-30 20:11:50 -06:00
committed by Marge Bot
parent fedff04fbd
commit fae4f1884c
3 changed files with 16 additions and 2 deletions

View File

@@ -50,8 +50,14 @@ nvk_GetBufferMemoryRequirements2(VkDevice _device,
.memoryTypeBits = BITFIELD_MASK(device->pdev->mem_type_cnt),
};
vk_foreach_struct(ext, pMemoryRequirements->pNext) {
vk_foreach_struct_const(ext, pMemoryRequirements->pNext) {
switch (ext->sType) {
case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS: {
VkMemoryDedicatedRequirements *dedicated = (void *)ext;
dedicated->prefersDedicatedAllocation = false;
dedicated->requiresDedicatedAllocation = false;
break;
}
default:
nvk_debug_ignored_stype(ext->sType);
break;