mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
vulkan/properties: handle LayeredApiPropertiesListKHR
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29968>
This commit is contained in:
parent
384392d729
commit
53f196b8e0
1 changed files with 15 additions and 0 deletions
|
|
@ -67,6 +67,7 @@ RENAMED_PROPERTIES = {
|
|||
|
||||
SPECIALIZED_PROPERTY_STRUCTS = [
|
||||
"HostImageCopyPropertiesEXT",
|
||||
"LayeredApiPropertiesListKHR",
|
||||
]
|
||||
|
||||
# Properties not extending VkPhysicalDeviceProperties2 in the XML,
|
||||
|
|
@ -222,6 +223,20 @@ vk_common_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice,
|
|||
break;
|
||||
}
|
||||
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_LIST_KHR: {
|
||||
VkPhysicalDeviceLayeredApiPropertiesListKHR *properties = (void *)ext;
|
||||
if (properties->pLayeredApis) {
|
||||
uint32_t written_api_count = MIN2(properties->layeredApiCount,
|
||||
pdevice->properties.layeredApiCount);
|
||||
memcpy(properties->pLayeredApis, pdevice->properties.pLayeredApis,
|
||||
sizeof(VkPhysicalDeviceLayeredApiPropertiesKHR) * written_api_count);
|
||||
properties->layeredApiCount = written_api_count;
|
||||
} else {
|
||||
properties->layeredApiCount = pdevice->properties.layeredApiCount;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue