loader: Add GetToolinInfo trampoline/terminator
authorCharles Giessen <charles@lunarg.com>
Fri, 10 Sep 2021 23:06:21 +0000 (17:06 -0600)
committerMike Schuchardt <mikes@lunarg.com>
Tue, 25 Jan 2022 18:54:13 +0000 (10:54 -0800)
loader/terminator.c
loader/trampoline.c
loader/vulkan-1.def

index 4f6d8fc06cda579f8cfa1ffa28d1e5e9106f04a7..69cad212ee1a3ddee706e0ed4218a720c0531f1a 100644 (file)
@@ -618,3 +618,19 @@ VKAPI_ATTR void VKAPI_CALL terminator_GetPhysicalDeviceExternalFenceProperties(
         }
     }
 }
+
+// 1.3 Core terminators
+
+VKAPI_ATTR VkResult VKAPI_CALL terminator_GetPhysicalDeviceToolProperties(VkPhysicalDevice physicalDevice, uint32_t *pToolCount,
+                                                                          VkPhysicalDeviceToolProperties *pToolProperties) {
+    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;
+
+    if (icd_term->dispatch.GetPhysicalDeviceToolProperties) {
+        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
+    *pToolCount = 0;
+    return VK_SUCCESS;
+}
index c9d7b94acea968413e6131bbe765707d28dd160b..382efe26c016c8faa3cd03e554dbeb78e7dfd200 100644 (file)
@@ -3232,3 +3232,13 @@ LOADER_EXPORT VKAPI_ATTR void VKAPI_CALL vkResetQueryPool(VkDevice device, VkQue
     }
     disp->ResetQueryPool(device, queryPool, firstQuery, queryCount);
 }
+
+// ---- Vulkan core 1.3 trampolines
+
+VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceToolProperties(VkPhysicalDevice physicalDevice, uint32_t *pToolCount,
+                                                                 VkPhysicalDeviceToolProperties *pToolProperties) {
+    VkPhysicalDevice unwrapped_phys_dev = loader_unwrap_physical_device(physicalDevice);
+    const VkLayerInstanceDispatchTable *disp = loader_get_instance_layer_dispatch(physicalDevice);
+
+    return disp->GetPhysicalDeviceToolProperties(unwrapped_phys_dev, pToolCount, pToolProperties);
+}
index 6a88b550731fae0cf744faa0c0181212ef91999a..2b22b0b4392dc67b27c33fb07d2b1b02f4b2df17 100644 (file)
@@ -237,3 +237,5 @@ EXPORTS
    vkGetBufferOpaqueCaptureAddress
    vkGetDeviceMemoryOpaqueCaptureAddress
    vkResetQueryPool
+
+   vkGetPhysicalDeviceToolProperties
\ No newline at end of file