diff --git a/layer.cpp b/layer.cpp index 3863862..751c371 100644 --- a/layer.cpp +++ b/layer.cpp @@ -1,6 +1,6 @@ #include "vulkan/vulkan.h" #include "vulkan/vk_layer.h" -#include "vulkan/vk_layer_dispatch_table.h" +#include "vulkan/utility/vk_dispatch_table.h" #include #include @@ -11,8 +11,8 @@ #undef VK_LAYER_EXPORT #define VK_LAYER_EXPORT extern "C" -static std::map gInstanceDispatch; -static std::map gDeviceDispatch; +static std::map gInstanceDispatch; +static std::map gDeviceDispatch; static constexpr char kEnvVariable[] = "VULKAN_DEVICE_INDEX"; @@ -23,19 +23,19 @@ inline void* GetKey(DispatchableType object) } template -inline VkLayerInstanceDispatchTable& GetInstanceDispatch(DispatchableType object) +inline VkuInstanceDispatchTable& GetInstanceDispatch(DispatchableType object) { return gInstanceDispatch[GetKey(object)]; } template -inline VkLayerDispatchTable& GetDeviceDispatch(DispatchableType object) +inline VkuDeviceDispatchTable& GetDeviceDispatch(DispatchableType object) { return gDeviceDispatch[GetKey(object)]; } static VkResult ChooseDevice(VkInstance instance, - const VkLayerInstanceDispatchTable& dispatch, + const VkuInstanceDispatchTable& dispatch, const char* const env, VkPhysicalDevice& outDevice) { @@ -84,7 +84,7 @@ DeviceChooserLayer_EnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices) { - const VkLayerInstanceDispatchTable& dispatch = GetInstanceDispatch(instance); + const VkuInstanceDispatchTable& dispatch = GetInstanceDispatch(instance); const char* const env = getenv(kEnvVariable); if (!env) @@ -121,7 +121,7 @@ DeviceChooserLayer_EnumeratePhysicalDeviceGroupsKHR(VkInstance uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupPropertiesKHR* pPhysicalDeviceGroups) { - const VkLayerInstanceDispatchTable& dispatch = GetInstanceDispatch(instance); + const VkuInstanceDispatchTable& dispatch = GetInstanceDispatch(instance); const char* const env = getenv(kEnvVariable); if (!env) @@ -198,7 +198,7 @@ DeviceChooserLayer_CreateInstance(const VkInstanceCreateInfo* pCreateInfo, #define GET(func) \ dispatchTable.func = (PFN_vk##func)gpa(*pInstance, "vk" #func); - VkLayerInstanceDispatchTable dispatchTable; + VkuInstanceDispatchTable dispatchTable; dispatchTable.GetInstanceProcAddr = gpa; GET(EnumerateDeviceExtensionProperties); GET(DestroyInstance); @@ -259,7 +259,7 @@ DeviceChooserLayer_CreateDevice(VkPhysicalDevice physicalDevice, #define GET(func) \ dispatchTable.func = (PFN_vk##func)gdpa(*pDevice, "vk" #func); - VkLayerDispatchTable dispatchTable; + VkuDeviceDispatchTable dispatchTable; dispatchTable.GetDeviceProcAddr = gdpa; GET(DestroyDevice); diff --git a/meson.build b/meson.build index 40e8f05..705cabe 100644 --- a/meson.build +++ b/meson.build @@ -13,8 +13,8 @@ endif if not cpp.has_header('vulkan/vk_layer.h') error('Vulkan development files not present (vulkan/vk_layer.h)') endif -if not cpp.has_header('vulkan/vk_layer_dispatch_table.h') - error('Vulkan development files not present (vulkan/vk_layer_dispatch_table.h)') +if not cpp.has_header('vulkan/utility/vk_dispatch_table.h') + error('vulkan/utility/vk_dispatch_table.h') endif libdir = get_option('libdir') diff --git a/vkdevicechooser.json b/vkdevicechooser.json index efa18fb..e23cd07 100644 --- a/vkdevicechooser.json +++ b/vkdevicechooser.json @@ -4,7 +4,7 @@ "name": "VK_LAYER_AEJS_DeviceChooserLayer", "type": "GLOBAL", "library_path": "libvkdevicechooser.so", - "api_version": "1.2.131", + "api_version": "1.3", "implementation_version": "1", "description": "Device chooser layer", "functions": {