diff options
| author | Charles Giessen <charles@lunarg.com> | 2025-06-20 17:02:09 -0500 |
|---|---|---|
| committer | Charles Giessen <46324611+charles-lunarg@users.noreply.github.com> | 2025-06-30 11:21:10 -0500 |
| commit | 778f40980928dec4f38f4f9b5360a09ac32df95e (patch) | |
| tree | c06d6199cb0567bda5b2ceb8476143c725b48253 | |
| parent | b2167f5c414658d28439da60a78b0086de402e68 (diff) | |
| download | usermoji-778f40980928dec4f38f4f9b5360a09ac32df95e.tar.xz | |
mock_icd: Add VkPhysicalDeviceLayeredApiPropertiesListKHR to output
| -rw-r--r-- | icd/generated/function_definitions.h | 15 | ||||
| -rw-r--r-- | scripts/mock_icd_generator.py | 15 |
2 files changed, 30 insertions, 0 deletions
diff --git a/icd/generated/function_definitions.h b/icd/generated/function_definitions.h index 7144831c..518e15c2 100644 --- a/icd/generated/function_definitions.h +++ b/icd/generated/function_definitions.h @@ -4074,6 +4074,21 @@ static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties2KHR( std::strncpy(driver_properties->driverInfo, "Branch: --unknown-- Tag Info: --unknown--", VK_MAX_DRIVER_INFO_SIZE); #endif } + + auto *layered_properties = lvl_find_mod_in_chain<VkPhysicalDeviceLayeredApiPropertiesListKHR>(pProperties->pNext); + if (layered_properties) { + layered_properties->layeredApiCount = 1; + if (layered_properties->pLayeredApis) { + layered_properties->pLayeredApis[0] = VkPhysicalDeviceLayeredApiPropertiesKHR{ + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_KHR, + nullptr, + 0xba5eba11, + 0xf005ba11, + VK_PHYSICAL_DEVICE_LAYERED_API_VULKAN_KHR + }; + std::strncpy(layered_properties->pLayeredApis[0].deviceName, "Fake Driver", VK_MAX_PHYSICAL_DEVICE_NAME_SIZE); + } + } } static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFormatProperties2KHR( diff --git a/scripts/mock_icd_generator.py b/scripts/mock_icd_generator.py index 64716f5e..641a5b9d 100644 --- a/scripts/mock_icd_generator.py +++ b/scripts/mock_icd_generator.py @@ -721,6 +721,21 @@ CUSTOM_C_INTERCEPTS = { std::strncpy(driver_properties->driverInfo, "Branch: --unknown-- Tag Info: --unknown--", VK_MAX_DRIVER_INFO_SIZE); #endif } + + auto *layered_properties = lvl_find_mod_in_chain<VkPhysicalDeviceLayeredApiPropertiesListKHR>(pProperties->pNext); + if (layered_properties) { + layered_properties->layeredApiCount = 1; + if (layered_properties->pLayeredApis) { + layered_properties->pLayeredApis[0] = VkPhysicalDeviceLayeredApiPropertiesKHR{ + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_KHR, + nullptr, + 0xba5eba11, + 0xf005ba11, + VK_PHYSICAL_DEVICE_LAYERED_API_VULKAN_KHR + }; + std::strncpy(layered_properties->pLayeredApis[0].deviceName, "Fake Driver", VK_MAX_PHYSICAL_DEVICE_NAME_SIZE); + } + } ''', 'vkGetPhysicalDeviceExternalSemaphoreProperties':''' // Hard code support for all handle types and features |
