Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/Vulkan-Loader.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Giessen <charles@lunarg.com>2022-03-21 21:07:39 +0300
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>2022-03-21 23:05:38 +0300
commit2f89241d4d445d3dfff5686408e94406e23d65df (patch)
tree45ee27d690cd1cc67a67736817d9ba0e3f98487e
parentd24fa72f1463c978da04d399468b10001fbc59a7 (diff)
Log when core GetToolingProperties is NULL.
The core entrypoint for vkGetPhysicalDeviceToolingProperties didn't log if the function in the terminator was NULL. This makes it easier for implementations to know when they aren't exporting the symbol.
-rw-r--r--loader/terminator.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/loader/terminator.c b/loader/terminator.c
index 310c8e9ce..5b890f725 100644
--- a/loader/terminator.c
+++ b/loader/terminator.c
@@ -626,16 +626,22 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_GetPhysicalDeviceToolProperties(VkPhys
struct loader_physical_device_term *phys_dev_term = (struct loader_physical_device_term *)physicalDevice;
struct loader_icd_term *icd_term = phys_dev_term->this_icd_term;
- VkPhysicalDeviceProperties properties;
- if (icd_term->dispatch.GetPhysicalDeviceProperties) {
- icd_term->dispatch.GetPhysicalDeviceProperties(phys_dev_term->phys_dev, &properties);
+ if (NULL == icd_term->dispatch.GetPhysicalDeviceToolProperties) {
+ loader_log(icd_term->this_instance, VULKAN_LOADER_ERROR_BIT, 0,
+ "terminator_GetPhysicalDeviceToolProperties: The ICD's vkGetPhysicalDeviceToolProperties was NULL yet "
+ "the physical device supports Vulkan API Version 1.3.");
+ } else {
+ VkPhysicalDeviceProperties properties;
+ if (icd_term->dispatch.GetPhysicalDeviceProperties) {
+ icd_term->dispatch.GetPhysicalDeviceProperties(phys_dev_term->phys_dev, &properties);
- if (VK_API_VERSION_MINOR(properties.apiVersion) >= 3 && icd_term->dispatch.GetPhysicalDeviceToolProperties) {
- return icd_term->dispatch.GetPhysicalDeviceToolProperties(phys_dev_term->phys_dev, pToolCount, pToolProperties);
+ if (VK_API_VERSION_MINOR(properties.apiVersion) >= 3) {
+ return icd_term->dispatch.GetPhysicalDeviceToolProperties(phys_dev_term->phys_dev, pToolCount, pToolProperties);
+ }
}
}
- // In the case the driver didn't support the extension, make sure that the first layer doesn't find the count uninitialized
+ // In the case the driver didn't support 1.3, make sure that the first layer doesn't find the count uninitialized
*pToolCount = 0;
return VK_SUCCESS;
}