nvk_image_plane_add_req(&image->planes[plane], &size_B, &align_B);
}
+ assert(image->vk.external_handle_types == 0 || image->plane_count == 1);
+ bool needs_dedicated =
+ image->vk.external_handle_types != 0 &&
+ image->planes[0].nil.pte_kind != 0;
+
if (image->stencil_copy_temp.nil.size_B > 0)
nvk_image_plane_add_req(&image->stencil_copy_temp, &size_B, &align_B);
switch (ext->sType) {
case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS: {
VkMemoryDedicatedRequirements *dedicated = (void *)ext;
- dedicated->prefersDedicatedAllocation = false;
- dedicated->requiresDedicatedAllocation = false;
+ dedicated->prefersDedicatedAllocation = needs_dedicated;
+ dedicated->requiresDedicatedAllocation = needs_dedicated;
break;
}
default: