diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f31125309..df25815da8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,6 +92,9 @@ if (CMAKE_SYSTEM_NAME MATCHES "Windows|Linux|BSD") option(BUILD_APIDUMP "Build api_dump layer" ON) option(BUILD_MONITOR "Build monitor layer" ON) option(BUILD_SCREENSHOT "Build screenshot layer" ON) + if(NOT WIN32) + option(BUILD_CPUTIMING "Build CPUTiming layer" ON) + endif() option(BUILD_LAYERMGR "Build Vulkan Configurator" ON) set(SDK_VERSION "" CACHE STRING "Vulkan SDK version") @@ -102,6 +105,7 @@ elseif(ANDROID) # - libVkLayer_screenshot.so option(BUILD_APIDUMP "Build api_dump layer" ON) option(BUILD_SCREENSHOT "Build screenshot layer" ON) + option(BUILD_CPUTIMING "Build CPUTiming layer" ON) set(BUILD_MONITOR OFF) set(BUILD_LAYERMGR OFF) @@ -121,7 +125,7 @@ if(BUILD_TESTS) add_subdirectory(tests) endif() -if(BUILD_APIDUMP OR BUILD_MONITOR OR BUILD_SCREENSHOT) +if(BUILD_APIDUMP OR BUILD_MONITOR OR BUILD_SCREENSHOT OR BUILD_CPUTIMING) message(STATUS "INFO: Building Vulkan Layers") add_subdirectory(layersvt) endif() diff --git a/layersvt/CMakeLists.txt b/layersvt/CMakeLists.txt index 43d24d685b..393baef525 100644 --- a/layersvt/CMakeLists.txt +++ b/layersvt/CMakeLists.txt @@ -7,6 +7,7 @@ if(WIN32) add_compile_definitions(NOMINMAX WIN32_LEAN_AND_MEAN) elseif(ANDROID) add_compile_definitions(VK_USE_PLATFORM_ANDROID_KHR) + elseif(APPLE) if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") add_compile_definitions(VK_USE_PLATFORM_MACOS_MVK) @@ -18,6 +19,7 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Linux|BSD|DragonFly|GNU") option(BUILD_WSI_XCB_SUPPORT "Build XCB WSI support" ON) option(BUILD_WSI_WAYLAND_SUPPORT "Build WAYLAND WSI support" ON) + find_package(PkgConfig REQUIRED) if (BUILD_WSI_XCB_SUPPORT) @@ -116,11 +118,46 @@ if(BUILD_SCREENSHOT) ) endif() +if(BUILD_CPUTIMING) + add_library(VkLayer_CPUTiming MODULE) + set_target_properties(VkLayer_CPUTiming PROPERTIES FOLDER "layers/cputiming") + target_sources(VkLayer_CPUTiming PRIVATE + cputiming_handwritten_dispatch.cpp + generated/cputiming_dispatch.h + generated/cputiming_implementation.h + cputiming_handwritten_functions.h + cputiming.h + cputiming.cpp + perfetto/perfetto.cc + perfetto/perfetto_helpers.cpp + ../scripts/generators/cputiming_generator.py + vk_layer_table.cpp + vk_layer_table.h + json/VkLayer_CPUTiming.json.in + ) + + if(CMAKE_SYSTEM_NAME MATCHES "Linux|BSD|DragonFly|GNU") + if (BUILD_WSI_XCB_SUPPORT) + target_compile_definitions(VkLayer_CPUTiming PRIVATE VK_USE_PLATFORM_XLIB_KHR) + endif() + + if (BUILD_WSI_WAYLAND_SUPPORT) + target_compile_definitions(VkLayer_CPUTiming PRIVATE VK_USE_PLATFORM_WAYLAND_KHR) + endif() + endif() + + target_compile_definitions(VkLayer_CPUTiming PRIVATE VK_ENABLE_BETA_EXTENSIONS) + + if (VT_CODEGEN) + add_dependencies(VkLayer_CPUTiming vt_codegen_as_needed) + endif() +endif() + if (BUILD_TESTS AND NOT RUN_ON_GITHUB) add_subdirectory(test) endif() -list(APPEND TOOL_LAYERS "VkLayer_api_dump" "VkLayer_screenshot" "VkLayer_monitor") +list(APPEND TOOL_LAYERS "VkLayer_api_dump" "VkLayer_screenshot" "VkLayer_monitor" "VkLayer_CPUTiming") foreach(layer ${TOOL_LAYERS}) if (NOT TARGET "${layer}") continue() @@ -129,7 +166,7 @@ foreach(layer ${TOOL_LAYERS}) target_link_Libraries(${layer} PRIVATE Vulkan::Headers Vulkan::UtilityHeaders Vulkan::LayerSettings) if (ANDROID) - target_link_Libraries(${layer} PRIVATE log android) + target_link_Libraries(${layer} PRIVATE log android atomic) endif() target_include_directories(${layer} PRIVATE .) diff --git a/layersvt/cputiming.cpp b/layersvt/cputiming.cpp new file mode 100644 index 0000000000..f6a07b503a --- /dev/null +++ b/layersvt/cputiming.cpp @@ -0,0 +1,35 @@ +/* Copyright (c) 2015-2023 The Khronos Group Inc. + * Copyright (c) 2015-2023 Valve Corporation + * Copyright (c) 2015-2023 LunarG, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "cputiming.h" + +CpuTiming& CpuTiming::Get() { + static CpuTiming instance; + return instance; +} + +void CpuTiming::SetVkInstance(VkPhysicalDevice phys_dev, VkInstance instance) { + std::lock_guard lock(map_mutex_); + vk_instance_map_[phys_dev] = instance; +} + +VkInstance CpuTiming::GetVkInstance(VkPhysicalDevice phys_dev) { + std::lock_guard lock(map_mutex_); + auto it = vk_instance_map_.find(phys_dev); + if (it != vk_instance_map_.end()) return it->second; + return VK_NULL_HANDLE; +} diff --git a/layersvt/cputiming.h b/layersvt/cputiming.h new file mode 100644 index 0000000000..7c9ee27f59 --- /dev/null +++ b/layersvt/cputiming.h @@ -0,0 +1,34 @@ +/* Copyright (c) 2015-2023 The Khronos Group Inc. + * Copyright (c) 2015-2023 Valve Corporation + * Copyright (c) 2015-2023 LunarG, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include + +class CpuTiming { + public: + static CpuTiming& Get(); + + void SetVkInstance(VkPhysicalDevice phys_dev, VkInstance instance); + VkInstance GetVkInstance(VkPhysicalDevice phys_dev); + + private: + std::mutex map_mutex_; + std::unordered_map vk_instance_map_; +}; diff --git a/layersvt/cputiming_handwritten_dispatch.cpp b/layersvt/cputiming_handwritten_dispatch.cpp new file mode 100644 index 0000000000..b5d214071b --- /dev/null +++ b/layersvt/cputiming_handwritten_dispatch.cpp @@ -0,0 +1,51 @@ +/* Copyright (c) 2015-2023 The Khronos Group Inc. + * Copyright (c) 2015-2023 Valve Corporation + * Copyright (c) 2015-2023 LunarG, Inc. + * Copyright (C) 2015-2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Implementation file for specifically implemented functions + +#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) + +#include "generated/cputiming_dispatch.h" +#include "vk_layer_table.h" + +extern "C" { + +EXPORT_FUNCTION VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(VkInstance instance, const char* pName) { + Timer timer(CPUTimingCategory::VkInstance, "vkGetInstanceProcAddr"); + PFN_vkVoidFunction instance_func = cputiming_known_instance_functions(instance, pName); + if (instance_func) return instance_func; + PFN_vkVoidFunction device_func = cputiming_known_device_functions(NULL, pName); + // Make sure that device functions queried through GIPA works + if (device_func) return device_func; + + // Haven't created an instance yet, exit now since there is no instance_dispatch_table + if (instance_dispatch_table(instance)->GetInstanceProcAddr == NULL) return nullptr; + return instance_dispatch_table(instance)->GetInstanceProcAddr(instance, pName); +} + +EXPORT_FUNCTION VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(VkDevice device, const char* pName) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceProcAddr"); + PFN_vkVoidFunction device_func = cputiming_known_device_functions(device, pName); + if (device_func) return device_func; + + // Haven't created a device yet, exit now since there is no device_dispatch_table + if (device_dispatch_table(device)->GetDeviceProcAddr == NULL) return nullptr; + return device_dispatch_table(device)->GetDeviceProcAddr(device, pName); +} +} diff --git a/layersvt/cputiming_handwritten_functions.h b/layersvt/cputiming_handwritten_functions.h new file mode 100644 index 0000000000..afc1eb9217 --- /dev/null +++ b/layersvt/cputiming_handwritten_functions.h @@ -0,0 +1,132 @@ +/* Copyright (c) 2015-2023 The Khronos Group Inc. + * Copyright (c) 2015-2023 Valve Corporation + * Copyright (c) 2015-2023 LunarG, Inc. + * Copyright (C) 2015-2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +// Implementation file for specifically implemented functions + +#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) + +#include "generated/cputiming_implementation.h" +#include "timer.h" +#include "cputiming.h" +#include "perfetto/perfetto_helpers.h" +#include "vk_layer_table.h" + +#if defined(__GNUC__) && __GNUC__ >= 4 +#define EXPORT_FUNCTION __attribute__((visibility("default"))) +#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) +#define EXPORT_FUNCTION __attribute__((visibility("default"))) +#else +#define EXPORT_FUNCTION +#endif + +#include + +static std::once_flag g_perfetto_init_flag; + +extern "C" { + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkInstance* pInstance) { + std::call_once(g_perfetto_init_flag, []() { InitializePerfetto(); }); + Timer timer(CPUTimingCategory::Other, "vkCreateInstance"); + + + + // Get the function pointer + VkLayerInstanceCreateInfo* chain_info = get_chain_info(pCreateInfo, VK_LAYER_LINK_INFO); + assert(chain_info->u.pLayerInfo != 0); + PFN_vkGetInstanceProcAddr fpGetInstanceProcAddr = chain_info->u.pLayerInfo->pfnNextGetInstanceProcAddr; + assert(fpGetInstanceProcAddr != 0); + PFN_vkCreateInstance fpCreateInstance = (PFN_vkCreateInstance)fpGetInstanceProcAddr(NULL, "vkCreateInstance"); + if (fpCreateInstance == NULL) { + return VK_ERROR_INITIALIZATION_FAILED; + } + + // Call the function and create the dispatch table + chain_info->u.pLayerInfo = chain_info->u.pLayerInfo->pNext; + VkResult result = fpCreateInstance(pCreateInfo, pAllocator, pInstance); + if (result == VK_SUCCESS) { + initInstanceTable(*pInstance, fpGetInstanceProcAddr); + } + + return result; +} +} + +VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDevice* pDevice) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkCreateDevice"); + + // Get the function pointer + VkLayerDeviceCreateInfo* chain_info = get_chain_info(pCreateInfo, VK_LAYER_LINK_INFO); + assert(chain_info->u.pLayerInfo != 0); + PFN_vkGetInstanceProcAddr fpGetInstanceProcAddr = chain_info->u.pLayerInfo->pfnNextGetInstanceProcAddr; + PFN_vkGetDeviceProcAddr fpGetDeviceProcAddr = chain_info->u.pLayerInfo->pfnNextGetDeviceProcAddr; + VkInstance vk_instance = CpuTiming::Get().GetVkInstance(physicalDevice); + PFN_vkCreateDevice fpCreateDevice = (PFN_vkCreateDevice)fpGetInstanceProcAddr(vk_instance, "vkCreateDevice"); + if (fpCreateDevice == NULL) { + return VK_ERROR_INITIALIZATION_FAILED; + } + + // Call the function and create the dispatch table + chain_info->u.pLayerInfo = chain_info->u.pLayerInfo->pNext; + VkResult result = fpCreateDevice(physicalDevice, pCreateInfo, pAllocator, pDevice); + if (result == VK_SUCCESS) { + initDeviceTable(*pDevice, fpGetDeviceProcAddr); + } + + return result; +} + +extern "C" { + +EXPORT_FUNCTION VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionProperties(const char* pLayerName, + uint32_t* pPropertyCount, + VkExtensionProperties* pProperties) { + Timer timer(CPUTimingCategory::Other, "vkEnumerateInstanceExtensionProperties"); + return util_GetExtensionProperties(0, NULL, pPropertyCount, pProperties); +} + +EXPORT_FUNCTION VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceLayerProperties(uint32_t* pPropertyCount, + VkLayerProperties* pProperties) { + Timer timer(CPUTimingCategory::Other, "vkEnumerateInstanceLayerProperties"); + static const VkLayerProperties layerProperties[] = {{ + "CPUTiming", + VK_MAKE_VERSION(1, 4, VK_HEADER_VERSION), // specVersion + VK_MAKE_VERSION(0, 2, 0), // implementationVersion + "layer: CPUTiming", + }}; + + return util_GetLayerProperties(ARRAY_SIZE(layerProperties), layerProperties, pPropertyCount, pProperties); +} + +EXPORT_FUNCTION VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, + uint32_t* pPropertyCount, + VkLayerProperties* pProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkEnumerateDeviceLayerProperties"); + static const VkLayerProperties layerProperties[] = {{ + "CPUTiming", + VK_MAKE_VERSION(1, 4, VK_HEADER_VERSION), + VK_MAKE_VERSION(0, 2, 0), + "layer: CPUTiming", + }}; + + return util_GetLayerProperties(ARRAY_SIZE(layerProperties), layerProperties, pPropertyCount, pProperties); +} +} diff --git a/layersvt/generated/cputiming_dispatch.h b/layersvt/generated/cputiming_dispatch.h new file mode 100644 index 0000000000..feb06f3f7c --- /dev/null +++ b/layersvt/generated/cputiming_dispatch.h @@ -0,0 +1,5200 @@ + +/* Copyright (c) 2015-2026 Valve Corporation + * Copyright (c) 2015-2026 LunarG, Inc. + * Copyright (c) 2015-2017, 2019, 2021 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/* + * This file is generated from the Khronos Vulkan XML API Registry. + */ + +#include "cputiming_handwritten_functions.h" + +#include "timer.h" + +#include "cputiming.h" + +// Autogen instance functions + +VKAPI_ATTR void VKAPI_CALL vkDestroyInstance(VkInstance instance, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkInstance, "vkDestroyInstance"); + auto dispatch_key = get_dispatch_key(instance); + instance_dispatch_table(instance)->DestroyInstance(instance, pAllocator); + destroy_instance_dispatch_table(dispatch_key); +} +VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices) { + Timer timer(CPUTimingCategory::VkInstance, "vkEnumeratePhysicalDevices"); + VkResult result = instance_dispatch_table(instance)->EnumeratePhysicalDevices(instance, pPhysicalDeviceCount, pPhysicalDevices); + + if ((result == VK_SUCCESS || result == VK_INCOMPLETE) && pPhysicalDeviceCount != nullptr && pPhysicalDevices != nullptr) { + for (uint32_t i = 0; i < *pPhysicalDeviceCount; i++) { + CpuTiming::Get().SetVkInstance(pPhysicalDevices[i], instance); + } + } + return result; +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceFeatures"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceFeatures(physicalDevice, pFeatures); +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceFormatProperties"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceFormatProperties(physicalDevice, format, pFormatProperties); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceImageFormatProperties"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceProperties"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceProperties(physicalDevice, pProperties); +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties* pQueueFamilyProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceQueueFamilyProperties"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceMemoryProperties"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceMemoryProperties(physicalDevice, pMemoryProperties); +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceSparseImageFormatProperties"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceSparseImageFormatProperties(physicalDevice, format, type, samples, usage, tiling, pPropertyCount, pProperties); +} +VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceGroups(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) { + Timer timer(CPUTimingCategory::VkInstance, "vkEnumeratePhysicalDeviceGroups"); + VkResult result = instance_dispatch_table(instance)->EnumeratePhysicalDeviceGroups(instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceFeatures2"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceFeatures2(physicalDevice, pFeatures); +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceProperties2"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceProperties2(physicalDevice, pProperties); +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceFormatProperties2"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceFormatProperties2(physicalDevice, format, pFormatProperties); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceImageFormatProperties2"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceImageFormatProperties2(physicalDevice, pImageFormatInfo, pImageFormatProperties); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties2(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceQueueFamilyProperties2"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceQueueFamilyProperties2(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceMemoryProperties2"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceMemoryProperties2(physicalDevice, pMemoryProperties); +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceSparseImageFormatProperties2"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceSparseImageFormatProperties2(physicalDevice, pFormatInfo, pPropertyCount, pProperties); +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalBufferProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceExternalBufferProperties"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceExternalBufferProperties(physicalDevice, pExternalBufferInfo, pExternalBufferProperties); +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalFenceProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceExternalFenceProperties"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceExternalFenceProperties(physicalDevice, pExternalFenceInfo, pExternalFenceProperties); +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalSemaphoreProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceExternalSemaphoreProperties"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceExternalSemaphoreProperties(physicalDevice, pExternalSemaphoreInfo, pExternalSemaphoreProperties); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceToolProperties(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, VkPhysicalDeviceToolProperties* pToolProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceToolProperties"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceToolProperties(physicalDevice, pToolCount, pToolProperties); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkInstance, "vkDestroySurfaceKHR"); + instance_dispatch_table(instance)->DestroySurfaceKHR(instance, surface, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32* pSupported) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceSurfaceSupportKHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, surface, pSupported); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, surface, pSurfaceCapabilities); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceSurfaceFormatsKHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, pSurfaceFormatCount, pSurfaceFormats); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceSurfacePresentModesKHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, surface, pPresentModeCount, pPresentModes); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pRectCount, VkRect2D* pRects) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDevicePresentRectanglesKHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDevicePresentRectanglesKHR(physicalDevice, surface, pRectCount, pRects); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPropertiesKHR* pProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceDisplayPropertiesKHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceDisplayPropertiesKHR(physicalDevice, pPropertyCount, pProperties); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlanePropertiesKHR* pProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceDisplayPlanePropertiesKHR(physicalDevice, pPropertyCount, pProperties); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t* pDisplayCount, VkDisplayKHR* pDisplays) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetDisplayPlaneSupportedDisplaysKHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetDisplayPlaneSupportedDisplaysKHR(physicalDevice, planeIndex, pDisplayCount, pDisplays); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetDisplayModePropertiesKHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetDisplayModePropertiesKHR(physicalDevice, display, pPropertyCount, pProperties); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateDisplayModeKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, const VkDisplayModeCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkCreateDisplayModeKHR"); + VkResult result = instance_dispatch_table(physicalDevice)->CreateDisplayModeKHR(physicalDevice, display, pCreateInfo, pAllocator, pMode); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetDisplayPlaneCapabilitiesKHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetDisplayPlaneCapabilitiesKHR(physicalDevice, mode, planeIndex, pCapabilities); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateDisplayPlaneSurfaceKHR(VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + Timer timer(CPUTimingCategory::VkInstance, "vkCreateDisplayPlaneSurfaceKHR"); + VkResult result = instance_dispatch_table(instance)->CreateDisplayPlaneSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + return result; +} +#if defined(VK_USE_PLATFORM_XLIB_KHR) +VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + Timer timer(CPUTimingCategory::VkInstance, "vkCreateXlibSurfaceKHR"); + VkResult result = instance_dispatch_table(instance)->CreateXlibSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + return result; +} +VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceXlibPresentationSupportKHR"); + VkBool32 result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceXlibPresentationSupportKHR(physicalDevice, queueFamilyIndex, dpy, visualID); + return result; +} +#endif // VK_USE_PLATFORM_XLIB_KHR +#if defined(VK_USE_PLATFORM_XCB_KHR) +VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + Timer timer(CPUTimingCategory::VkInstance, "vkCreateXcbSurfaceKHR"); + VkResult result = instance_dispatch_table(instance)->CreateXcbSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + return result; +} +VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXcbPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceXcbPresentationSupportKHR"); + VkBool32 result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceXcbPresentationSupportKHR(physicalDevice, queueFamilyIndex, connection, visual_id); + return result; +} +#endif // VK_USE_PLATFORM_XCB_KHR +#if defined(VK_USE_PLATFORM_WAYLAND_KHR) +VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + Timer timer(CPUTimingCategory::VkInstance, "vkCreateWaylandSurfaceKHR"); + VkResult result = instance_dispatch_table(instance)->CreateWaylandSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + return result; +} +VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceWaylandPresentationSupportKHR"); + VkBool32 result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceWaylandPresentationSupportKHR(physicalDevice, queueFamilyIndex, display); + return result; +} +#endif // VK_USE_PLATFORM_WAYLAND_KHR +#if defined(VK_USE_PLATFORM_ANDROID_KHR) +VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + Timer timer(CPUTimingCategory::VkInstance, "vkCreateAndroidSurfaceKHR"); + VkResult result = instance_dispatch_table(instance)->CreateAndroidSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + return result; +} +#endif // VK_USE_PLATFORM_ANDROID_KHR +#if defined(VK_USE_PLATFORM_WIN32_KHR) +VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + Timer timer(CPUTimingCategory::VkInstance, "vkCreateWin32SurfaceKHR"); + VkResult result = instance_dispatch_table(instance)->CreateWin32SurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + return result; +} +VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceWin32PresentationSupportKHR"); + VkBool32 result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceWin32PresentationSupportKHR(physicalDevice, queueFamilyIndex); + return result; +} +#endif // VK_USE_PLATFORM_WIN32_KHR +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceVideoCapabilitiesKHR(VkPhysicalDevice physicalDevice, const VkVideoProfileInfoKHR* pVideoProfile, VkVideoCapabilitiesKHR* pCapabilities) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceVideoCapabilitiesKHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceVideoCapabilitiesKHR(physicalDevice, pVideoProfile, pCapabilities); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceVideoFormatPropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoFormatInfoKHR* pVideoFormatInfo, uint32_t* pVideoFormatPropertyCount, VkVideoFormatPropertiesKHR* pVideoFormatProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceVideoFormatPropertiesKHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceVideoFormatPropertiesKHR(physicalDevice, pVideoFormatInfo, pVideoFormatPropertyCount, pVideoFormatProperties); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceFeatures2KHR"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceFeatures2KHR(physicalDevice, pFeatures); +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceProperties2KHR"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceProperties2KHR(physicalDevice, pProperties); +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceFormatProperties2KHR(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceFormatProperties2KHR"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceFormatProperties2KHR(physicalDevice, format, pFormatProperties); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceImageFormatProperties2KHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceImageFormatProperties2KHR(physicalDevice, pImageFormatInfo, pImageFormatProperties); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceQueueFamilyProperties2KHR"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceQueueFamilyProperties2KHR(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMemoryProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceMemoryProperties2KHR"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceMemoryProperties2KHR(physicalDevice, pMemoryProperties); +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceSparseImageFormatProperties2KHR(physicalDevice, pFormatInfo, pPropertyCount, pProperties); +} +VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) { + Timer timer(CPUTimingCategory::VkInstance, "vkEnumeratePhysicalDeviceGroupsKHR"); + VkResult result = instance_dispatch_table(instance)->EnumeratePhysicalDeviceGroupsKHR(instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalBufferPropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceExternalBufferPropertiesKHR"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceExternalBufferPropertiesKHR(physicalDevice, pExternalBufferInfo, pExternalBufferProperties); +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceExternalSemaphorePropertiesKHR(physicalDevice, pExternalSemaphoreInfo, pExternalSemaphoreProperties); +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalFencePropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceExternalFencePropertiesKHR"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceExternalFencePropertiesKHR(physicalDevice, pExternalFenceInfo, pExternalFenceProperties); +} +VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, uint32_t* pCounterCount, VkPerformanceCounterKHR* pCounters, VkPerformanceCounterDescriptionKHR* pCounterDescriptions) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR"); + VkResult result = instance_dispatch_table(physicalDevice)->EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(physicalDevice, queueFamilyIndex, pCounterCount, pCounters, pCounterDescriptions); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(VkPhysicalDevice physicalDevice, const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, uint32_t* pNumPasses) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(physicalDevice, pPerformanceQueryCreateInfo, pNumPasses); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkSurfaceCapabilities2KHR* pSurfaceCapabilities) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceSurfaceCapabilities2KHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceSurfaceCapabilities2KHR(physicalDevice, pSurfaceInfo, pSurfaceCapabilities); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceSurfaceFormats2KHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceSurfaceFormats2KHR(physicalDevice, pSurfaceInfo, pSurfaceFormatCount, pSurfaceFormats); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceDisplayProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayProperties2KHR* pProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceDisplayProperties2KHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceDisplayProperties2KHR(physicalDevice, pPropertyCount, pProperties); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceDisplayPlaneProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlaneProperties2KHR* pProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceDisplayPlaneProperties2KHR(physicalDevice, pPropertyCount, pProperties); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayModeProperties2KHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModeProperties2KHR* pProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetDisplayModeProperties2KHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetDisplayModeProperties2KHR(physicalDevice, display, pPropertyCount, pProperties); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetDisplayPlaneCapabilities2KHR(VkPhysicalDevice physicalDevice, const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, VkDisplayPlaneCapabilities2KHR* pCapabilities) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetDisplayPlaneCapabilities2KHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetDisplayPlaneCapabilities2KHR(physicalDevice, pDisplayPlaneInfo, pCapabilities); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceFragmentShadingRatesKHR(VkPhysicalDevice physicalDevice, uint32_t* pFragmentShadingRateCount, VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceFragmentShadingRatesKHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceFragmentShadingRatesKHR(physicalDevice, pFragmentShadingRateCount, pFragmentShadingRates); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(physicalDevice, pQualityLevelInfo, pQualityLevelProperties); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixPropertiesKHR* pProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceCooperativeMatrixPropertiesKHR(physicalDevice, pPropertyCount, pProperties); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCalibrateableTimeDomainsKHR(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, VkTimeDomainKHR* pTimeDomains) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceCalibrateableTimeDomainsKHR"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceCalibrateableTimeDomainsKHR(physicalDevice, pTimeDomainCount, pTimeDomains); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback) { + Timer timer(CPUTimingCategory::VkInstance, "vkCreateDebugReportCallbackEXT"); + VkResult result = instance_dispatch_table(instance)->CreateDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, pCallback); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkInstance, "vkDestroyDebugReportCallbackEXT"); + instance_dispatch_table(instance)->DestroyDebugReportCallbackEXT(instance, callback, pAllocator); +} +VKAPI_ATTR void VKAPI_CALL vkDebugReportMessageEXT(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage) { + Timer timer(CPUTimingCategory::VkInstance, "vkDebugReportMessageEXT"); + instance_dispatch_table(instance)->DebugReportMessageEXT(instance, flags, objectType, object, location, messageCode, pLayerPrefix, pMessage); +} +#if defined(VK_USE_PLATFORM_GGP) +VKAPI_ATTR VkResult VKAPI_CALL vkCreateStreamDescriptorSurfaceGGP(VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + Timer timer(CPUTimingCategory::VkInstance, "vkCreateStreamDescriptorSurfaceGGP"); + VkResult result = instance_dispatch_table(instance)->CreateStreamDescriptorSurfaceGGP(instance, pCreateInfo, pAllocator, pSurface); + return result; +} +#endif // VK_USE_PLATFORM_GGP +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceExternalImageFormatPropertiesNV(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceExternalImageFormatPropertiesNV(physicalDevice, format, type, tiling, usage, flags, externalHandleType, pExternalImageFormatProperties); + return result; +} +#if defined(VK_USE_PLATFORM_VI_NN) +VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + Timer timer(CPUTimingCategory::VkInstance, "vkCreateViSurfaceNN"); + VkResult result = instance_dispatch_table(instance)->CreateViSurfaceNN(instance, pCreateInfo, pAllocator, pSurface); + return result; +} +#endif // VK_USE_PLATFORM_VI_NN +VKAPI_ATTR VkResult VKAPI_CALL vkReleaseDisplayEXT(VkPhysicalDevice physicalDevice, VkDisplayKHR display) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkReleaseDisplayEXT"); + VkResult result = instance_dispatch_table(physicalDevice)->ReleaseDisplayEXT(physicalDevice, display); + return result; +} +#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT) +VKAPI_ATTR VkResult VKAPI_CALL vkAcquireXlibDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkAcquireXlibDisplayEXT"); + VkResult result = instance_dispatch_table(physicalDevice)->AcquireXlibDisplayEXT(physicalDevice, dpy, display); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetRandROutputDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetRandROutputDisplayEXT"); + VkResult result = instance_dispatch_table(physicalDevice)->GetRandROutputDisplayEXT(physicalDevice, dpy, rrOutput, pDisplay); + return result; +} +#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilities2EXT(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilities2EXT* pSurfaceCapabilities) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceSurfaceCapabilities2EXT"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceSurfaceCapabilities2EXT(physicalDevice, surface, pSurfaceCapabilities); + return result; +} +#if defined(VK_USE_PLATFORM_IOS_MVK) +VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + Timer timer(CPUTimingCategory::VkInstance, "vkCreateIOSSurfaceMVK"); + VkResult result = instance_dispatch_table(instance)->CreateIOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); + return result; +} +#endif // VK_USE_PLATFORM_IOS_MVK +#if defined(VK_USE_PLATFORM_MACOS_MVK) +VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + Timer timer(CPUTimingCategory::VkInstance, "vkCreateMacOSSurfaceMVK"); + VkResult result = instance_dispatch_table(instance)->CreateMacOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); + return result; +} +#endif // VK_USE_PLATFORM_MACOS_MVK +VKAPI_ATTR VkResult VKAPI_CALL vkCreateDebugUtilsMessengerEXT(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugUtilsMessengerEXT* pMessenger) { + Timer timer(CPUTimingCategory::VkInstance, "vkCreateDebugUtilsMessengerEXT"); + VkResult result = instance_dispatch_table(instance)->CreateDebugUtilsMessengerEXT(instance, pCreateInfo, pAllocator, pMessenger); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT messenger, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkInstance, "vkDestroyDebugUtilsMessengerEXT"); + instance_dispatch_table(instance)->DestroyDebugUtilsMessengerEXT(instance, messenger, pAllocator); +} +VKAPI_ATTR void VKAPI_CALL vkSubmitDebugUtilsMessageEXT(VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageTypes, const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData) { + Timer timer(CPUTimingCategory::VkInstance, "vkSubmitDebugUtilsMessageEXT"); + instance_dispatch_table(instance)->SubmitDebugUtilsMessageEXT(instance, messageSeverity, messageTypes, pCallbackData); +} +VKAPI_ATTR VkDeviceSize VKAPI_CALL vkGetPhysicalDeviceDescriptorSizeEXT(VkPhysicalDevice physicalDevice, VkDescriptorType descriptorType) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceDescriptorSizeEXT"); + VkDeviceSize result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceDescriptorSizeEXT(physicalDevice, descriptorType); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, VkMultisamplePropertiesEXT* pMultisampleProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceMultisamplePropertiesEXT"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceMultisamplePropertiesEXT(physicalDevice, samples, pMultisampleProperties); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, VkTimeDomainKHR* pTimeDomains) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceCalibrateableTimeDomainsEXT(physicalDevice, pTimeDomainCount, pTimeDomains); + return result; +} +#if defined(VK_USE_PLATFORM_FUCHSIA) +VKAPI_ATTR VkResult VKAPI_CALL vkCreateImagePipeSurfaceFUCHSIA(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + Timer timer(CPUTimingCategory::VkInstance, "vkCreateImagePipeSurfaceFUCHSIA"); + VkResult result = instance_dispatch_table(instance)->CreateImagePipeSurfaceFUCHSIA(instance, pCreateInfo, pAllocator, pSurface); + return result; +} +#endif // VK_USE_PLATFORM_FUCHSIA +#if defined(VK_USE_PLATFORM_METAL_EXT) +VKAPI_ATTR VkResult VKAPI_CALL vkCreateMetalSurfaceEXT(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + Timer timer(CPUTimingCategory::VkInstance, "vkCreateMetalSurfaceEXT"); + VkResult result = instance_dispatch_table(instance)->CreateMetalSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); + return result; +} +#endif // VK_USE_PLATFORM_METAL_EXT +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceToolPropertiesEXT(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, VkPhysicalDeviceToolProperties* pToolProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceToolPropertiesEXT"); + + static const VkPhysicalDeviceToolPropertiesEXT cputiming_layer_tool_props = { + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT, + nullptr, + "CPUTiming", + "1", + VK_TOOL_PURPOSE_PROFILING_BIT_EXT | VK_TOOL_PURPOSE_TRACING_BIT_EXT, + "The CPUTiming utility layer measures the timing of API calls.", + "CPUTiming"}; + + auto original_pToolProperties = pToolProperties; + if (pToolProperties != nullptr) { + *pToolProperties = cputiming_layer_tool_props; + pToolProperties = ((*pToolCount > 1) ? &pToolProperties[1] : nullptr); + (*pToolCount)--; + } + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceToolPropertiesEXT(physicalDevice, pToolCount, pToolProperties); + if (original_pToolProperties != nullptr) { + pToolProperties = original_pToolProperties; + } + + (*pToolCount)++; + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixPropertiesNV* pProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceCooperativeMatrixPropertiesNV(physicalDevice, pPropertyCount, pProperties); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(VkPhysicalDevice physicalDevice, uint32_t* pCombinationCount, VkFramebufferMixedSamplesCombinationNV* pCombinations) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(physicalDevice, pCombinationCount, pCombinations); + return result; +} +#if defined(VK_USE_PLATFORM_WIN32_KHR) +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModes2EXT(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceSurfacePresentModes2EXT"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceSurfacePresentModes2EXT(physicalDevice, pSurfaceInfo, pPresentModeCount, pPresentModes); + return result; +} +#endif // VK_USE_PLATFORM_WIN32_KHR +VKAPI_ATTR VkResult VKAPI_CALL vkCreateHeadlessSurfaceEXT(VkInstance instance, const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + Timer timer(CPUTimingCategory::VkInstance, "vkCreateHeadlessSurfaceEXT"); + VkResult result = instance_dispatch_table(instance)->CreateHeadlessSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkAcquireDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, VkDisplayKHR display) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkAcquireDrmDisplayEXT"); + VkResult result = instance_dispatch_table(physicalDevice)->AcquireDrmDisplayEXT(physicalDevice, drmFd, display); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, uint32_t connectorId, VkDisplayKHR* display) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetDrmDisplayEXT"); + VkResult result = instance_dispatch_table(physicalDevice)->GetDrmDisplayEXT(physicalDevice, drmFd, connectorId, display); + return result; +} +#if defined(VK_USE_PLATFORM_WIN32_KHR) +VKAPI_ATTR VkResult VKAPI_CALL vkAcquireWinrtDisplayNV(VkPhysicalDevice physicalDevice, VkDisplayKHR display) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkAcquireWinrtDisplayNV"); + VkResult result = instance_dispatch_table(physicalDevice)->AcquireWinrtDisplayNV(physicalDevice, display); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetWinrtDisplayNV(VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR* pDisplay) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetWinrtDisplayNV"); + VkResult result = instance_dispatch_table(physicalDevice)->GetWinrtDisplayNV(physicalDevice, deviceRelativeId, pDisplay); + return result; +} +#endif // VK_USE_PLATFORM_WIN32_KHR +#if defined(VK_USE_PLATFORM_DIRECTFB_EXT) +VKAPI_ATTR VkResult VKAPI_CALL vkCreateDirectFBSurfaceEXT(VkInstance instance, const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + Timer timer(CPUTimingCategory::VkInstance, "vkCreateDirectFBSurfaceEXT"); + VkResult result = instance_dispatch_table(instance)->CreateDirectFBSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); + return result; +} +VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceDirectFBPresentationSupportEXT(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, IDirectFB* dfb) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceDirectFBPresentationSupportEXT"); + VkBool32 result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceDirectFBPresentationSupportEXT(physicalDevice, queueFamilyIndex, dfb); + return result; +} +#endif // VK_USE_PLATFORM_DIRECTFB_EXT +#if defined(VK_USE_PLATFORM_SCREEN_QNX) +VKAPI_ATTR VkResult VKAPI_CALL vkCreateScreenSurfaceQNX(VkInstance instance, const VkScreenSurfaceCreateInfoQNX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + Timer timer(CPUTimingCategory::VkInstance, "vkCreateScreenSurfaceQNX"); + VkResult result = instance_dispatch_table(instance)->CreateScreenSurfaceQNX(instance, pCreateInfo, pAllocator, pSurface); + return result; +} +VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceScreenPresentationSupportQNX(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct _screen_window* window) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceScreenPresentationSupportQNX"); + VkBool32 result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceScreenPresentationSupportQNX(physicalDevice, queueFamilyIndex, window); + return result; +} +#endif // VK_USE_PLATFORM_SCREEN_QNX +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceExternalTensorPropertiesARM(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalTensorInfoARM* pExternalTensorInfo, VkExternalTensorPropertiesARM* pExternalTensorProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceExternalTensorPropertiesARM"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceExternalTensorPropertiesARM(physicalDevice, pExternalTensorInfo, pExternalTensorProperties); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceOpticalFlowImageFormatsNV(VkPhysicalDevice physicalDevice, const VkOpticalFlowImageFormatInfoNV* pOpticalFlowImageFormatInfo, uint32_t* pFormatCount, VkOpticalFlowImageFormatPropertiesNV* pImageFormatProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceOpticalFlowImageFormatsNV"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceOpticalFlowImageFormatsNV(physicalDevice, pOpticalFlowImageFormatInfo, pFormatCount, pImageFormatProperties); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCooperativeVectorPropertiesNV(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeVectorPropertiesNV* pProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceCooperativeVectorPropertiesNV"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceCooperativeVectorPropertiesNV(physicalDevice, pPropertyCount, pProperties); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, uint32_t* pQueueFamilyDataGraphPropertyCount, VkQueueFamilyDataGraphPropertiesARM* pQueueFamilyDataGraphProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceQueueFamilyDataGraphPropertiesARM(physicalDevice, queueFamilyIndex, pQueueFamilyDataGraphPropertyCount, pQueueFamilyDataGraphProperties); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM* pQueueFamilyDataGraphProcessingEngineInfo, VkQueueFamilyDataGraphProcessingEnginePropertiesARM* pQueueFamilyDataGraphProcessingEngineProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM"); + instance_dispatch_table(physicalDevice)->GetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM(physicalDevice, pQueueFamilyDataGraphProcessingEngineInfo, pQueueFamilyDataGraphProcessingEngineProperties); +} +#if defined(VK_USE_PLATFORM_OHOS) +VKAPI_ATTR VkResult VKAPI_CALL vkCreateSurfaceOHOS(VkInstance instance, const VkSurfaceCreateInfoOHOS* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + Timer timer(CPUTimingCategory::VkInstance, "vkCreateSurfaceOHOS"); + VkResult result = instance_dispatch_table(instance)->CreateSurfaceOHOS(instance, pCreateInfo, pAllocator, pSurface); + return result; +} +#endif // VK_USE_PLATFORM_OHOS +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixFlexibleDimensionsPropertiesNV* pProperties) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV"); + VkResult result = instance_dispatch_table(physicalDevice)->GetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV(physicalDevice, pPropertyCount, pProperties); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, uint32_t* pCounterCount, VkPerformanceCounterARM* pCounters, VkPerformanceCounterDescriptionARM* pCounterDescriptions) { + Timer timer(CPUTimingCategory::VkPhysicalDevice, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM"); + VkResult result = instance_dispatch_table(physicalDevice)->EnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM(physicalDevice, queueFamilyIndex, pCounterCount, pCounters, pCounterDescriptions); + return result; +} + +// Autogen device functions + +VKAPI_ATTR void VKAPI_CALL vkDestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyDevice"); + device_dispatch_table(device)->DestroyDevice(device, pAllocator); + destroy_device_dispatch_table(get_dispatch_key(device)); +} +VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceQueue"); + device_dispatch_table(device)->GetDeviceQueue(device, queueFamilyIndex, queueIndex, pQueue); +} +VKAPI_ATTR VkResult VKAPI_CALL vkQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence) { + Timer timer(CPUTimingCategory::VkQueue, "vkQueueSubmit"); + VkResult result = device_dispatch_table(queue)->QueueSubmit(queue, submitCount, pSubmits, fence); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkQueueWaitIdle(VkQueue queue) { + Timer timer(CPUTimingCategory::VkQueue, "vkQueueWaitIdle"); + VkResult result = device_dispatch_table(queue)->QueueWaitIdle(queue); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkDeviceWaitIdle(VkDevice device) { + Timer timer(CPUTimingCategory::VkDevice, "vkDeviceWaitIdle"); + VkResult result = device_dispatch_table(device)->DeviceWaitIdle(device); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkAllocateMemory(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory) { + Timer timer(CPUTimingCategory::VkDevice, "vkAllocateMemory"); + VkResult result = device_dispatch_table(device)->AllocateMemory(device, pAllocateInfo, pAllocator, pMemory); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkFreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkFreeMemory"); + device_dispatch_table(device)->FreeMemory(device, memory, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData) { + Timer timer(CPUTimingCategory::VkDevice, "vkMapMemory"); + VkResult result = device_dispatch_table(device)->MapMemory(device, memory, offset, size, flags, ppData); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkUnmapMemory(VkDevice device, VkDeviceMemory memory) { + Timer timer(CPUTimingCategory::VkDevice, "vkUnmapMemory"); + device_dispatch_table(device)->UnmapMemory(device, memory); +} +VKAPI_ATTR VkResult VKAPI_CALL vkFlushMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges) { + Timer timer(CPUTimingCategory::VkDevice, "vkFlushMappedMemoryRanges"); + VkResult result = device_dispatch_table(device)->FlushMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkInvalidateMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges) { + Timer timer(CPUTimingCategory::VkDevice, "vkInvalidateMappedMemoryRanges"); + VkResult result = device_dispatch_table(device)->InvalidateMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceMemoryCommitment"); + device_dispatch_table(device)->GetDeviceMemoryCommitment(device, memory, pCommittedMemoryInBytes); +} +VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset) { + Timer timer(CPUTimingCategory::VkDevice, "vkBindBufferMemory"); + VkResult result = device_dispatch_table(device)->BindBufferMemory(device, buffer, memory, memoryOffset); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset) { + Timer timer(CPUTimingCategory::VkDevice, "vkBindImageMemory"); + VkResult result = device_dispatch_table(device)->BindImageMemory(device, image, memory, memoryOffset); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetBufferMemoryRequirements"); + device_dispatch_table(device)->GetBufferMemoryRequirements(device, buffer, pMemoryRequirements); +} +VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetImageMemoryRequirements"); + device_dispatch_table(device)->GetImageMemoryRequirements(device, image, pMemoryRequirements); +} +VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetImageSparseMemoryRequirements"); + device_dispatch_table(device)->GetImageSparseMemoryRequirements(device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements); +} +VKAPI_ATTR VkResult VKAPI_CALL vkQueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence) { + Timer timer(CPUTimingCategory::VkQueue, "vkQueueBindSparse"); + VkResult result = device_dispatch_table(queue)->QueueBindSparse(queue, bindInfoCount, pBindInfo, fence); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateFence(VkDevice device, const VkFenceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateFence"); + VkResult result = device_dispatch_table(device)->CreateFence(device, pCreateInfo, pAllocator, pFence); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyFence"); + device_dispatch_table(device)->DestroyFence(device, fence, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkResetFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences) { + Timer timer(CPUTimingCategory::VkDevice, "vkResetFences"); + VkResult result = device_dispatch_table(device)->ResetFences(device, fenceCount, pFences); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceStatus(VkDevice device, VkFence fence) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetFenceStatus"); + VkResult result = device_dispatch_table(device)->GetFenceStatus(device, fence); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout) { + Timer timer(CPUTimingCategory::VkDevice, "vkWaitForFences"); + VkResult result = device_dispatch_table(device)->WaitForFences(device, fenceCount, pFences, waitAll, timeout); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateSemaphore"); + VkResult result = device_dispatch_table(device)->CreateSemaphore(device, pCreateInfo, pAllocator, pSemaphore); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroySemaphore"); + device_dispatch_table(device)->DestroySemaphore(device, semaphore, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateQueryPool"); + VkResult result = device_dispatch_table(device)->CreateQueryPool(device, pCreateInfo, pAllocator, pQueryPool); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyQueryPool"); + device_dispatch_table(device)->DestroyQueryPool(device, queryPool, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetQueryPoolResults"); + VkResult result = device_dispatch_table(device)->GetQueryPoolResults(device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateBuffer"); + VkResult result = device_dispatch_table(device)->CreateBuffer(device, pCreateInfo, pAllocator, pBuffer); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyBuffer"); + device_dispatch_table(device)->DestroyBuffer(device, buffer, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateImage"); + VkResult result = device_dispatch_table(device)->CreateImage(device, pCreateInfo, pAllocator, pImage); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyImage"); + device_dispatch_table(device)->DestroyImage(device, image, pAllocator); +} +VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetImageSubresourceLayout"); + device_dispatch_table(device)->GetImageSubresourceLayout(device, image, pSubresource, pLayout); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImageView* pView) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateImageView"); + VkResult result = device_dispatch_table(device)->CreateImageView(device, pCreateInfo, pAllocator, pView); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyImageView"); + device_dispatch_table(device)->DestroyImageView(device, imageView, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateCommandPool"); + VkResult result = device_dispatch_table(device)->CreateCommandPool(device, pCreateInfo, pAllocator, pCommandPool); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyCommandPool"); + device_dispatch_table(device)->DestroyCommandPool(device, commandPool, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags) { + Timer timer(CPUTimingCategory::VkDevice, "vkResetCommandPool"); + VkResult result = device_dispatch_table(device)->ResetCommandPool(device, commandPool, flags); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers) { + Timer timer(CPUTimingCategory::VkDevice, "vkAllocateCommandBuffers"); + VkResult result = device_dispatch_table(device)->AllocateCommandBuffers(device, pAllocateInfo, pCommandBuffers); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers) { + Timer timer(CPUTimingCategory::VkDevice, "vkFreeCommandBuffers"); + device_dispatch_table(device)->FreeCommandBuffers(device, commandPool, commandBufferCount, pCommandBuffers); +} +VKAPI_ATTR VkResult VKAPI_CALL vkBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkBeginCommandBuffer"); + VkResult result = device_dispatch_table(commandBuffer)->BeginCommandBuffer(commandBuffer, pBeginInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkEndCommandBuffer(VkCommandBuffer commandBuffer) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkEndCommandBuffer"); + VkResult result = device_dispatch_table(commandBuffer)->EndCommandBuffer(commandBuffer); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkResetCommandBuffer"); + VkResult result = device_dispatch_table(commandBuffer)->ResetCommandBuffer(commandBuffer, flags); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyBuffer"); + device_dispatch_table(commandBuffer)->CmdCopyBuffer(commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions); +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyImage"); + device_dispatch_table(commandBuffer)->CmdCopyImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyBufferToImage"); + device_dispatch_table(commandBuffer)->CmdCopyBufferToImage(commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions); +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyImageToBuffer"); + device_dispatch_table(commandBuffer)->CmdCopyImageToBuffer(commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions); +} +VKAPI_ATTR void VKAPI_CALL vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdUpdateBuffer"); + device_dispatch_table(commandBuffer)->CmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, dataSize, pData); +} +VKAPI_ATTR void VKAPI_CALL vkCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdFillBuffer"); + device_dispatch_table(commandBuffer)->CmdFillBuffer(commandBuffer, dstBuffer, dstOffset, size, data); +} +VKAPI_ATTR void VKAPI_CALL vkCmdPipelineBarrier(VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdPipelineBarrier"); + device_dispatch_table(commandBuffer)->CmdPipelineBarrier(commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBeginQuery"); + device_dispatch_table(commandBuffer)->CmdBeginQuery(commandBuffer, queryPool, query, flags); +} +VKAPI_ATTR void VKAPI_CALL vkCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdEndQuery"); + device_dispatch_table(commandBuffer)->CmdEndQuery(commandBuffer, queryPool, query); +} +VKAPI_ATTR void VKAPI_CALL vkCmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdResetQueryPool"); + device_dispatch_table(commandBuffer)->CmdResetQueryPool(commandBuffer, queryPool, firstQuery, queryCount); +} +VKAPI_ATTR void VKAPI_CALL vkCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdWriteTimestamp"); + device_dispatch_table(commandBuffer)->CmdWriteTimestamp(commandBuffer, pipelineStage, queryPool, query); +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyQueryPoolResults"); + device_dispatch_table(commandBuffer)->CmdCopyQueryPoolResults(commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags); +} +VKAPI_ATTR void VKAPI_CALL vkCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdExecuteCommands"); + device_dispatch_table(commandBuffer)->CmdExecuteCommands(commandBuffer, commandBufferCount, pCommandBuffers); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateEvent(VkDevice device, const VkEventCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkEvent* pEvent) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateEvent"); + VkResult result = device_dispatch_table(device)->CreateEvent(device, pCreateInfo, pAllocator, pEvent); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyEvent"); + device_dispatch_table(device)->DestroyEvent(device, event, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetEventStatus(VkDevice device, VkEvent event) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetEventStatus"); + VkResult result = device_dispatch_table(device)->GetEventStatus(device, event); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkSetEvent(VkDevice device, VkEvent event) { + Timer timer(CPUTimingCategory::VkDevice, "vkSetEvent"); + VkResult result = device_dispatch_table(device)->SetEvent(device, event); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkResetEvent(VkDevice device, VkEvent event) { + Timer timer(CPUTimingCategory::VkDevice, "vkResetEvent"); + VkResult result = device_dispatch_table(device)->ResetEvent(device, event); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateBufferView(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferView* pView) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateBufferView"); + VkResult result = device_dispatch_table(device)->CreateBufferView(device, pCreateInfo, pAllocator, pView); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyBufferView"); + device_dispatch_table(device)->DestroyBufferView(device, bufferView, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateShaderModule"); + VkResult result = device_dispatch_table(device)->CreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyShaderModule"); + device_dispatch_table(device)->DestroyShaderModule(device, shaderModule, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreatePipelineCache"); + VkResult result = device_dispatch_table(device)->CreatePipelineCache(device, pCreateInfo, pAllocator, pPipelineCache); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyPipelineCache"); + device_dispatch_table(device)->DestroyPipelineCache(device, pipelineCache, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetPipelineCacheData"); + VkResult result = device_dispatch_table(device)->GetPipelineCacheData(device, pipelineCache, pDataSize, pData); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkMergePipelineCaches(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches) { + Timer timer(CPUTimingCategory::VkDevice, "vkMergePipelineCaches"); + VkResult result = device_dispatch_table(device)->MergePipelineCaches(device, dstCache, srcCacheCount, pSrcCaches); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateComputePipelines"); + VkResult result = device_dispatch_table(device)->CreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyPipeline"); + device_dispatch_table(device)->DestroyPipeline(device, pipeline, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreatePipelineLayout"); + VkResult result = device_dispatch_table(device)->CreatePipelineLayout(device, pCreateInfo, pAllocator, pPipelineLayout); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyPipelineLayout"); + device_dispatch_table(device)->DestroyPipelineLayout(device, pipelineLayout, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateSampler(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSampler* pSampler) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateSampler"); + VkResult result = device_dispatch_table(device)->CreateSampler(device, pCreateInfo, pAllocator, pSampler); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroySampler"); + device_dispatch_table(device)->DestroySampler(device, sampler, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateDescriptorSetLayout"); + VkResult result = device_dispatch_table(device)->CreateDescriptorSetLayout(device, pCreateInfo, pAllocator, pSetLayout); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyDescriptorSetLayout"); + device_dispatch_table(device)->DestroyDescriptorSetLayout(device, descriptorSetLayout, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateDescriptorPool"); + VkResult result = device_dispatch_table(device)->CreateDescriptorPool(device, pCreateInfo, pAllocator, pDescriptorPool); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyDescriptorPool"); + device_dispatch_table(device)->DestroyDescriptorPool(device, descriptorPool, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags) { + Timer timer(CPUTimingCategory::VkDevice, "vkResetDescriptorPool"); + VkResult result = device_dispatch_table(device)->ResetDescriptorPool(device, descriptorPool, flags); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, VkDescriptorSet* pDescriptorSets) { + Timer timer(CPUTimingCategory::VkDevice, "vkAllocateDescriptorSets"); + VkResult result = device_dispatch_table(device)->AllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets) { + Timer timer(CPUTimingCategory::VkDevice, "vkFreeDescriptorSets"); + VkResult result = device_dispatch_table(device)->FreeDescriptorSets(device, descriptorPool, descriptorSetCount, pDescriptorSets); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies) { + Timer timer(CPUTimingCategory::VkDevice, "vkUpdateDescriptorSets"); + device_dispatch_table(device)->UpdateDescriptorSets(device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBindPipeline"); + device_dispatch_table(commandBuffer)->CmdBindPipeline(commandBuffer, pipelineBindPoint, pipeline); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBindDescriptorSets"); + device_dispatch_table(commandBuffer)->CmdBindDescriptorSets(commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets); +} +VKAPI_ATTR void VKAPI_CALL vkCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdClearColorImage"); + device_dispatch_table(commandBuffer)->CmdClearColorImage(commandBuffer, image, imageLayout, pColor, rangeCount, pRanges); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDispatch"); + device_dispatch_table(commandBuffer)->CmdDispatch(commandBuffer, groupCountX, groupCountY, groupCountZ); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDispatchIndirect"); + device_dispatch_table(commandBuffer)->CmdDispatchIndirect(commandBuffer, buffer, offset); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetEvent"); + device_dispatch_table(commandBuffer)->CmdSetEvent(commandBuffer, event, stageMask); +} +VKAPI_ATTR void VKAPI_CALL vkCmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdResetEvent"); + device_dispatch_table(commandBuffer)->CmdResetEvent(commandBuffer, event, stageMask); +} +VKAPI_ATTR void VKAPI_CALL vkCmdWaitEvents(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdWaitEvents"); + device_dispatch_table(commandBuffer)->CmdWaitEvents(commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); +} +VKAPI_ATTR void VKAPI_CALL vkCmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdPushConstants"); + device_dispatch_table(commandBuffer)->CmdPushConstants(commandBuffer, layout, stageFlags, offset, size, pValues); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateGraphicsPipelines"); + VkResult result = device_dispatch_table(device)->CreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateFramebuffer"); + VkResult result = device_dispatch_table(device)->CreateFramebuffer(device, pCreateInfo, pAllocator, pFramebuffer); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyFramebuffer"); + device_dispatch_table(device)->DestroyFramebuffer(device, framebuffer, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateRenderPass"); + VkResult result = device_dispatch_table(device)->CreateRenderPass(device, pCreateInfo, pAllocator, pRenderPass); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyRenderPass"); + device_dispatch_table(device)->DestroyRenderPass(device, renderPass, pAllocator); +} +VKAPI_ATTR void VKAPI_CALL vkGetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetRenderAreaGranularity"); + device_dispatch_table(device)->GetRenderAreaGranularity(device, renderPass, pGranularity); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetViewport"); + device_dispatch_table(commandBuffer)->CmdSetViewport(commandBuffer, firstViewport, viewportCount, pViewports); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetScissor"); + device_dispatch_table(commandBuffer)->CmdSetScissor(commandBuffer, firstScissor, scissorCount, pScissors); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetLineWidth"); + device_dispatch_table(commandBuffer)->CmdSetLineWidth(commandBuffer, lineWidth); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDepthBias"); + device_dispatch_table(commandBuffer)->CmdSetDepthBias(commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4]) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetBlendConstants"); + device_dispatch_table(commandBuffer)->CmdSetBlendConstants(commandBuffer, blendConstants); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDepthBounds"); + device_dispatch_table(commandBuffer)->CmdSetDepthBounds(commandBuffer, minDepthBounds, maxDepthBounds); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetStencilCompareMask"); + device_dispatch_table(commandBuffer)->CmdSetStencilCompareMask(commandBuffer, faceMask, compareMask); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetStencilWriteMask"); + device_dispatch_table(commandBuffer)->CmdSetStencilWriteMask(commandBuffer, faceMask, writeMask); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetStencilReference"); + device_dispatch_table(commandBuffer)->CmdSetStencilReference(commandBuffer, faceMask, reference); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBindIndexBuffer"); + device_dispatch_table(commandBuffer)->CmdBindIndexBuffer(commandBuffer, buffer, offset, indexType); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBindVertexBuffers"); + device_dispatch_table(commandBuffer)->CmdBindVertexBuffers(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDraw"); + device_dispatch_table(commandBuffer)->CmdDraw(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDrawIndexed"); + device_dispatch_table(commandBuffer)->CmdDrawIndexed(commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDrawIndirect"); + device_dispatch_table(commandBuffer)->CmdDrawIndirect(commandBuffer, buffer, offset, drawCount, stride); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDrawIndexedIndirect"); + device_dispatch_table(commandBuffer)->CmdDrawIndexedIndirect(commandBuffer, buffer, offset, drawCount, stride); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBlitImage"); + device_dispatch_table(commandBuffer)->CmdBlitImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter); +} +VKAPI_ATTR void VKAPI_CALL vkCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdClearDepthStencilImage"); + device_dispatch_table(commandBuffer)->CmdClearDepthStencilImage(commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges); +} +VKAPI_ATTR void VKAPI_CALL vkCmdClearAttachments(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdClearAttachments"); + device_dispatch_table(commandBuffer)->CmdClearAttachments(commandBuffer, attachmentCount, pAttachments, rectCount, pRects); +} +VKAPI_ATTR void VKAPI_CALL vkCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdResolveImage"); + device_dispatch_table(commandBuffer)->CmdResolveImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBeginRenderPass"); + device_dispatch_table(commandBuffer)->CmdBeginRenderPass(commandBuffer, pRenderPassBegin, contents); +} +VKAPI_ATTR void VKAPI_CALL vkCmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdNextSubpass"); + device_dispatch_table(commandBuffer)->CmdNextSubpass(commandBuffer, contents); +} +VKAPI_ATTR void VKAPI_CALL vkCmdEndRenderPass(VkCommandBuffer commandBuffer) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdEndRenderPass"); + device_dispatch_table(commandBuffer)->CmdEndRenderPass(commandBuffer); +} +VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos) { + Timer timer(CPUTimingCategory::VkDevice, "vkBindBufferMemory2"); + VkResult result = device_dispatch_table(device)->BindBufferMemory2(device, bindInfoCount, pBindInfos); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos) { + Timer timer(CPUTimingCategory::VkDevice, "vkBindImageMemory2"); + VkResult result = device_dispatch_table(device)->BindImageMemory2(device, bindInfoCount, pBindInfos); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkGetDeviceGroupPeerMemoryFeatures(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceGroupPeerMemoryFeatures"); + device_dispatch_table(device)->GetDeviceGroupPeerMemoryFeatures(device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDeviceMask(VkCommandBuffer commandBuffer, uint32_t deviceMask) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDeviceMask"); + device_dispatch_table(commandBuffer)->CmdSetDeviceMask(commandBuffer, deviceMask); +} +VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements2(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetImageMemoryRequirements2"); + device_dispatch_table(device)->GetImageMemoryRequirements2(device, pInfo, pMemoryRequirements); +} +VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements2(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetBufferMemoryRequirements2"); + device_dispatch_table(device)->GetBufferMemoryRequirements2(device, pInfo, pMemoryRequirements); +} +VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements2(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetImageSparseMemoryRequirements2"); + device_dispatch_table(device)->GetImageSparseMemoryRequirements2(device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); +} +VKAPI_ATTR void VKAPI_CALL vkTrimCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags) { + Timer timer(CPUTimingCategory::VkDevice, "vkTrimCommandPool"); + device_dispatch_table(device)->TrimCommandPool(device, commandPool, flags); +} +VKAPI_ATTR void VKAPI_CALL vkGetDeviceQueue2(VkDevice device, const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceQueue2"); + device_dispatch_table(device)->GetDeviceQueue2(device, pQueueInfo, pQueue); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDispatchBase(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDispatchBase"); + device_dispatch_table(commandBuffer)->CmdDispatchBase(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorUpdateTemplate(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateDescriptorUpdateTemplate"); + VkResult result = device_dispatch_table(device)->CreateDescriptorUpdateTemplate(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorUpdateTemplate(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyDescriptorUpdateTemplate"); + device_dispatch_table(device)->DestroyDescriptorUpdateTemplate(device, descriptorUpdateTemplate, pAllocator); +} +VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplate(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData) { + Timer timer(CPUTimingCategory::VkDevice, "vkUpdateDescriptorSetWithTemplate"); + device_dispatch_table(device)->UpdateDescriptorSetWithTemplate(device, descriptorSet, descriptorUpdateTemplate, pData); +} +VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutSupport(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDescriptorSetLayoutSupport"); + device_dispatch_table(device)->GetDescriptorSetLayoutSupport(device, pCreateInfo, pSupport); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateSamplerYcbcrConversion(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateSamplerYcbcrConversion"); + VkResult result = device_dispatch_table(device)->CreateSamplerYcbcrConversion(device, pCreateInfo, pAllocator, pYcbcrConversion); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroySamplerYcbcrConversion(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroySamplerYcbcrConversion"); + device_dispatch_table(device)->DestroySamplerYcbcrConversion(device, ycbcrConversion, pAllocator); +} +VKAPI_ATTR void VKAPI_CALL vkResetQueryPool(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) { + Timer timer(CPUTimingCategory::VkDevice, "vkResetQueryPool"); + device_dispatch_table(device)->ResetQueryPool(device, queryPool, firstQuery, queryCount); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreCounterValue(VkDevice device, VkSemaphore semaphore, uint64_t* pValue) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetSemaphoreCounterValue"); + VkResult result = device_dispatch_table(device)->GetSemaphoreCounterValue(device, semaphore, pValue); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkWaitSemaphores(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout) { + Timer timer(CPUTimingCategory::VkDevice, "vkWaitSemaphores"); + VkResult result = device_dispatch_table(device)->WaitSemaphores(device, pWaitInfo, timeout); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkSignalSemaphore(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkSignalSemaphore"); + VkResult result = device_dispatch_table(device)->SignalSemaphore(device, pSignalInfo); + return result; +} +VKAPI_ATTR VkDeviceAddress VKAPI_CALL vkGetBufferDeviceAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetBufferDeviceAddress"); + VkDeviceAddress result = device_dispatch_table(device)->GetBufferDeviceAddress(device, pInfo); + return result; +} +VKAPI_ATTR uint64_t VKAPI_CALL vkGetBufferOpaqueCaptureAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetBufferOpaqueCaptureAddress"); + uint64_t result = device_dispatch_table(device)->GetBufferOpaqueCaptureAddress(device, pInfo); + return result; +} +VKAPI_ATTR uint64_t VKAPI_CALL vkGetDeviceMemoryOpaqueCaptureAddress(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceMemoryOpaqueCaptureAddress"); + uint64_t result = device_dispatch_table(device)->GetDeviceMemoryOpaqueCaptureAddress(device, pInfo); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDrawIndirectCount"); + device_dispatch_table(commandBuffer)->CmdDrawIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDrawIndexedIndirectCount"); + device_dispatch_table(commandBuffer)->CmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass2(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateRenderPass2"); + VkResult result = device_dispatch_table(device)->CreateRenderPass2(device, pCreateInfo, pAllocator, pRenderPass); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdBeginRenderPass2(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBeginRenderPass2"); + device_dispatch_table(commandBuffer)->CmdBeginRenderPass2(commandBuffer, pRenderPassBegin, pSubpassBeginInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdNextSubpass2(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdNextSubpass2"); + device_dispatch_table(commandBuffer)->CmdNextSubpass2(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdEndRenderPass2(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdEndRenderPass2"); + device_dispatch_table(commandBuffer)->CmdEndRenderPass2(commandBuffer, pSubpassEndInfo); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreatePrivateDataSlot(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreatePrivateDataSlot"); + VkResult result = device_dispatch_table(device)->CreatePrivateDataSlot(device, pCreateInfo, pAllocator, pPrivateDataSlot); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyPrivateDataSlot(VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyPrivateDataSlot"); + device_dispatch_table(device)->DestroyPrivateDataSlot(device, privateDataSlot, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkSetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t data) { + Timer timer(CPUTimingCategory::VkDevice, "vkSetPrivateData"); + VkResult result = device_dispatch_table(device)->SetPrivateData(device, objectType, objectHandle, privateDataSlot, data); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkGetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t* pData) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetPrivateData"); + device_dispatch_table(device)->GetPrivateData(device, objectType, objectHandle, privateDataSlot, pData); +} +VKAPI_ATTR void VKAPI_CALL vkCmdPipelineBarrier2(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdPipelineBarrier2"); + device_dispatch_table(commandBuffer)->CmdPipelineBarrier2(commandBuffer, pDependencyInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdWriteTimestamp2(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, uint32_t query) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdWriteTimestamp2"); + device_dispatch_table(commandBuffer)->CmdWriteTimestamp2(commandBuffer, stage, queryPool, query); +} +VKAPI_ATTR VkResult VKAPI_CALL vkQueueSubmit2(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence) { + Timer timer(CPUTimingCategory::VkQueue, "vkQueueSubmit2"); + VkResult result = device_dispatch_table(queue)->QueueSubmit2(queue, submitCount, pSubmits, fence); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyBuffer2(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyBuffer2"); + device_dispatch_table(commandBuffer)->CmdCopyBuffer2(commandBuffer, pCopyBufferInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyImage2(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyImage2"); + device_dispatch_table(commandBuffer)->CmdCopyImage2(commandBuffer, pCopyImageInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyBufferToImage2(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyBufferToImage2"); + device_dispatch_table(commandBuffer)->CmdCopyBufferToImage2(commandBuffer, pCopyBufferToImageInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyImageToBuffer2"); + device_dispatch_table(commandBuffer)->CmdCopyImageToBuffer2(commandBuffer, pCopyImageToBufferInfo); +} +VKAPI_ATTR void VKAPI_CALL vkGetDeviceBufferMemoryRequirements(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceBufferMemoryRequirements"); + device_dispatch_table(device)->GetDeviceBufferMemoryRequirements(device, pInfo, pMemoryRequirements); +} +VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceImageMemoryRequirements"); + device_dispatch_table(device)->GetDeviceImageMemoryRequirements(device, pInfo, pMemoryRequirements); +} +VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageSparseMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceImageSparseMemoryRequirements"); + device_dispatch_table(device)->GetDeviceImageSparseMemoryRequirements(device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetEvent2(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetEvent2"); + device_dispatch_table(commandBuffer)->CmdSetEvent2(commandBuffer, event, pDependencyInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdResetEvent2(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdResetEvent2"); + device_dispatch_table(commandBuffer)->CmdResetEvent2(commandBuffer, event, stageMask); +} +VKAPI_ATTR void VKAPI_CALL vkCmdWaitEvents2(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, const VkDependencyInfo* pDependencyInfos) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdWaitEvents2"); + device_dispatch_table(commandBuffer)->CmdWaitEvents2(commandBuffer, eventCount, pEvents, pDependencyInfos); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBlitImage2(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBlitImage2"); + device_dispatch_table(commandBuffer)->CmdBlitImage2(commandBuffer, pBlitImageInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdResolveImage2(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdResolveImage2"); + device_dispatch_table(commandBuffer)->CmdResolveImage2(commandBuffer, pResolveImageInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBeginRendering"); + device_dispatch_table(commandBuffer)->CmdBeginRendering(commandBuffer, pRenderingInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdEndRendering(VkCommandBuffer commandBuffer) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdEndRendering"); + device_dispatch_table(commandBuffer)->CmdEndRendering(commandBuffer); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetCullMode(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetCullMode"); + device_dispatch_table(commandBuffer)->CmdSetCullMode(commandBuffer, cullMode); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetFrontFace(VkCommandBuffer commandBuffer, VkFrontFace frontFace) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetFrontFace"); + device_dispatch_table(commandBuffer)->CmdSetFrontFace(commandBuffer, frontFace); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetPrimitiveTopology(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetPrimitiveTopology"); + device_dispatch_table(commandBuffer)->CmdSetPrimitiveTopology(commandBuffer, primitiveTopology); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportWithCount(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetViewportWithCount"); + device_dispatch_table(commandBuffer)->CmdSetViewportWithCount(commandBuffer, viewportCount, pViewports); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetScissorWithCount(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetScissorWithCount"); + device_dispatch_table(commandBuffer)->CmdSetScissorWithCount(commandBuffer, scissorCount, pScissors); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBindVertexBuffers2(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, const VkDeviceSize* pStrides) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBindVertexBuffers2"); + device_dispatch_table(commandBuffer)->CmdBindVertexBuffers2(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, pStrides); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDepthTestEnable"); + device_dispatch_table(commandBuffer)->CmdSetDepthTestEnable(commandBuffer, depthTestEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthWriteEnable(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDepthWriteEnable"); + device_dispatch_table(commandBuffer)->CmdSetDepthWriteEnable(commandBuffer, depthWriteEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthCompareOp(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDepthCompareOp"); + device_dispatch_table(commandBuffer)->CmdSetDepthCompareOp(commandBuffer, depthCompareOp); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBoundsTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDepthBoundsTestEnable"); + device_dispatch_table(commandBuffer)->CmdSetDepthBoundsTestEnable(commandBuffer, depthBoundsTestEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilTestEnable(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetStencilTestEnable"); + device_dispatch_table(commandBuffer)->CmdSetStencilTestEnable(commandBuffer, stencilTestEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilOp(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetStencilOp"); + device_dispatch_table(commandBuffer)->CmdSetStencilOp(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetRasterizerDiscardEnable(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetRasterizerDiscardEnable"); + device_dispatch_table(commandBuffer)->CmdSetRasterizerDiscardEnable(commandBuffer, rasterizerDiscardEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBiasEnable(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDepthBiasEnable"); + device_dispatch_table(commandBuffer)->CmdSetDepthBiasEnable(commandBuffer, depthBiasEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetPrimitiveRestartEnable(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetPrimitiveRestartEnable"); + device_dispatch_table(commandBuffer)->CmdSetPrimitiveRestartEnable(commandBuffer, primitiveRestartEnable); +} +VKAPI_ATTR VkResult VKAPI_CALL vkMapMemory2(VkDevice device, const VkMemoryMapInfo* pMemoryMapInfo, void** ppData) { + Timer timer(CPUTimingCategory::VkDevice, "vkMapMemory2"); + VkResult result = device_dispatch_table(device)->MapMemory2(device, pMemoryMapInfo, ppData); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkUnmapMemory2(VkDevice device, const VkMemoryUnmapInfo* pMemoryUnmapInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkUnmapMemory2"); + VkResult result = device_dispatch_table(device)->UnmapMemory2(device, pMemoryUnmapInfo); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageSubresourceLayout(VkDevice device, const VkDeviceImageSubresourceInfo* pInfo, VkSubresourceLayout2* pLayout) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceImageSubresourceLayout"); + device_dispatch_table(device)->GetDeviceImageSubresourceLayout(device, pInfo, pLayout); +} +VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout2(VkDevice device, VkImage image, const VkImageSubresource2* pSubresource, VkSubresourceLayout2* pLayout) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetImageSubresourceLayout2"); + device_dispatch_table(device)->GetImageSubresourceLayout2(device, image, pSubresource, pLayout); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCopyMemoryToImage(VkDevice device, const VkCopyMemoryToImageInfo* pCopyMemoryToImageInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkCopyMemoryToImage"); + VkResult result = device_dispatch_table(device)->CopyMemoryToImage(device, pCopyMemoryToImageInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCopyImageToMemory(VkDevice device, const VkCopyImageToMemoryInfo* pCopyImageToMemoryInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkCopyImageToMemory"); + VkResult result = device_dispatch_table(device)->CopyImageToMemory(device, pCopyImageToMemoryInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCopyImageToImage(VkDevice device, const VkCopyImageToImageInfo* pCopyImageToImageInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkCopyImageToImage"); + VkResult result = device_dispatch_table(device)->CopyImageToImage(device, pCopyImageToImageInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkTransitionImageLayout(VkDevice device, uint32_t transitionCount, const VkHostImageLayoutTransitionInfo* pTransitions) { + Timer timer(CPUTimingCategory::VkDevice, "vkTransitionImageLayout"); + VkResult result = device_dispatch_table(device)->TransitionImageLayout(device, transitionCount, pTransitions); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSet(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdPushDescriptorSet"); + device_dispatch_table(commandBuffer)->CmdPushDescriptorSet(commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, pDescriptorWrites); +} +VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplate(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void* pData) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdPushDescriptorSetWithTemplate"); + device_dispatch_table(commandBuffer)->CmdPushDescriptorSetWithTemplate(commandBuffer, descriptorUpdateTemplate, layout, set, pData); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorSets2(VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfo* pBindDescriptorSetsInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBindDescriptorSets2"); + device_dispatch_table(commandBuffer)->CmdBindDescriptorSets2(commandBuffer, pBindDescriptorSetsInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdPushConstants2(VkCommandBuffer commandBuffer, const VkPushConstantsInfo* pPushConstantsInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdPushConstants2"); + device_dispatch_table(commandBuffer)->CmdPushConstants2(commandBuffer, pPushConstantsInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSet2(VkCommandBuffer commandBuffer, const VkPushDescriptorSetInfo* pPushDescriptorSetInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdPushDescriptorSet2"); + device_dispatch_table(commandBuffer)->CmdPushDescriptorSet2(commandBuffer, pPushDescriptorSetInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplate2(VkCommandBuffer commandBuffer, const VkPushDescriptorSetWithTemplateInfo* pPushDescriptorSetWithTemplateInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdPushDescriptorSetWithTemplate2"); + device_dispatch_table(commandBuffer)->CmdPushDescriptorSetWithTemplate2(commandBuffer, pPushDescriptorSetWithTemplateInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetLineStipple(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetLineStipple"); + device_dispatch_table(commandBuffer)->CmdSetLineStipple(commandBuffer, lineStippleFactor, lineStipplePattern); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBindIndexBuffer2(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkDeviceSize size, VkIndexType indexType) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBindIndexBuffer2"); + device_dispatch_table(commandBuffer)->CmdBindIndexBuffer2(commandBuffer, buffer, offset, size, indexType); +} +VKAPI_ATTR void VKAPI_CALL vkGetRenderingAreaGranularity(VkDevice device, const VkRenderingAreaInfo* pRenderingAreaInfo, VkExtent2D* pGranularity) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetRenderingAreaGranularity"); + device_dispatch_table(device)->GetRenderingAreaGranularity(device, pRenderingAreaInfo, pGranularity); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetRenderingAttachmentLocations(VkCommandBuffer commandBuffer, const VkRenderingAttachmentLocationInfo* pLocationInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetRenderingAttachmentLocations"); + device_dispatch_table(commandBuffer)->CmdSetRenderingAttachmentLocations(commandBuffer, pLocationInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetRenderingInputAttachmentIndices(VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfo* pInputAttachmentIndexInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetRenderingInputAttachmentIndices"); + device_dispatch_table(commandBuffer)->CmdSetRenderingInputAttachmentIndices(commandBuffer, pInputAttachmentIndexInfo); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateSwapchainKHR"); + VkResult result = device_dispatch_table(device)->CreateSwapchainKHR(device, pCreateInfo, pAllocator, pSwapchain); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroySwapchainKHR"); + device_dispatch_table(device)->DestroySwapchainKHR(device, swapchain, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, VkImage* pSwapchainImages) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetSwapchainImagesKHR"); + VkResult result = device_dispatch_table(device)->GetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t* pImageIndex) { + Timer timer(CPUTimingCategory::VkDevice, "vkAcquireNextImageKHR"); + VkResult result = device_dispatch_table(device)->AcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, pImageIndex); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR* pPresentInfo) { + Timer timer(CPUTimingCategory::VkQueue, "vkQueuePresentKHR"); + VkResult result = device_dispatch_table(queue)->QueuePresentKHR(queue, pPresentInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupPresentCapabilitiesKHR(VkDevice device, VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceGroupPresentCapabilitiesKHR"); + VkResult result = device_dispatch_table(device)->GetDeviceGroupPresentCapabilitiesKHR(device, pDeviceGroupPresentCapabilities); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR* pModes) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceGroupSurfacePresentModesKHR"); + VkResult result = device_dispatch_table(device)->GetDeviceGroupSurfacePresentModesKHR(device, surface, pModes); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkAcquireNextImage2KHR(VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex) { + Timer timer(CPUTimingCategory::VkDevice, "vkAcquireNextImage2KHR"); + VkResult result = device_dispatch_table(device)->AcquireNextImage2KHR(device, pAcquireInfo, pImageIndex); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateSharedSwapchainsKHR(VkDevice device, uint32_t swapchainCount, const VkSwapchainCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateSharedSwapchainsKHR"); + VkResult result = device_dispatch_table(device)->CreateSharedSwapchainsKHR(device, swapchainCount, pCreateInfos, pAllocator, pSwapchains); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateVideoSessionKHR(VkDevice device, const VkVideoSessionCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkVideoSessionKHR* pVideoSession) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateVideoSessionKHR"); + VkResult result = device_dispatch_table(device)->CreateVideoSessionKHR(device, pCreateInfo, pAllocator, pVideoSession); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyVideoSessionKHR(VkDevice device, VkVideoSessionKHR videoSession, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyVideoSessionKHR"); + device_dispatch_table(device)->DestroyVideoSessionKHR(device, videoSession, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetVideoSessionMemoryRequirementsKHR(VkDevice device, VkVideoSessionKHR videoSession, uint32_t* pMemoryRequirementsCount, VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetVideoSessionMemoryRequirementsKHR"); + VkResult result = device_dispatch_table(device)->GetVideoSessionMemoryRequirementsKHR(device, videoSession, pMemoryRequirementsCount, pMemoryRequirements); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkBindVideoSessionMemoryKHR(VkDevice device, VkVideoSessionKHR videoSession, uint32_t bindSessionMemoryInfoCount, const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos) { + Timer timer(CPUTimingCategory::VkDevice, "vkBindVideoSessionMemoryKHR"); + VkResult result = device_dispatch_table(device)->BindVideoSessionMemoryKHR(device, videoSession, bindSessionMemoryInfoCount, pBindSessionMemoryInfos); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateVideoSessionParametersKHR(VkDevice device, const VkVideoSessionParametersCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkVideoSessionParametersKHR* pVideoSessionParameters) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateVideoSessionParametersKHR"); + VkResult result = device_dispatch_table(device)->CreateVideoSessionParametersKHR(device, pCreateInfo, pAllocator, pVideoSessionParameters); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkUpdateVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkUpdateVideoSessionParametersKHR"); + VkResult result = device_dispatch_table(device)->UpdateVideoSessionParametersKHR(device, videoSessionParameters, pUpdateInfo); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyVideoSessionParametersKHR"); + device_dispatch_table(device)->DestroyVideoSessionParametersKHR(device, videoSessionParameters, pAllocator); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBeginVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoBeginCodingInfoKHR* pBeginInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBeginVideoCodingKHR"); + device_dispatch_table(commandBuffer)->CmdBeginVideoCodingKHR(commandBuffer, pBeginInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdEndVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoEndCodingInfoKHR* pEndCodingInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdEndVideoCodingKHR"); + device_dispatch_table(commandBuffer)->CmdEndVideoCodingKHR(commandBuffer, pEndCodingInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdControlVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoCodingControlInfoKHR* pCodingControlInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdControlVideoCodingKHR"); + device_dispatch_table(commandBuffer)->CmdControlVideoCodingKHR(commandBuffer, pCodingControlInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDecodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR* pDecodeInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDecodeVideoKHR"); + device_dispatch_table(commandBuffer)->CmdDecodeVideoKHR(commandBuffer, pDecodeInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBeginRenderingKHR(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBeginRenderingKHR"); + device_dispatch_table(commandBuffer)->CmdBeginRenderingKHR(commandBuffer, pRenderingInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdEndRenderingKHR(VkCommandBuffer commandBuffer) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdEndRenderingKHR"); + device_dispatch_table(commandBuffer)->CmdEndRenderingKHR(commandBuffer); +} +VKAPI_ATTR void VKAPI_CALL vkGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceGroupPeerMemoryFeaturesKHR"); + device_dispatch_table(device)->GetDeviceGroupPeerMemoryFeaturesKHR(device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, uint32_t deviceMask) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDeviceMaskKHR"); + device_dispatch_table(commandBuffer)->CmdSetDeviceMaskKHR(commandBuffer, deviceMask); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDispatchBaseKHR"); + device_dispatch_table(commandBuffer)->CmdDispatchBaseKHR(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); +} +VKAPI_ATTR void VKAPI_CALL vkTrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags) { + Timer timer(CPUTimingCategory::VkDevice, "vkTrimCommandPoolKHR"); + device_dispatch_table(device)->TrimCommandPoolKHR(device, commandPool, flags); +} +#if defined(VK_USE_PLATFORM_WIN32_KHR) +VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleKHR(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetMemoryWin32HandleKHR"); + VkResult result = device_dispatch_table(device)->GetMemoryWin32HandleKHR(device, pGetWin32HandleInfo, pHandle); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetMemoryWin32HandlePropertiesKHR"); + VkResult result = device_dispatch_table(device)->GetMemoryWin32HandlePropertiesKHR(device, handleType, handle, pMemoryWin32HandleProperties); + return result; +} +#endif // VK_USE_PLATFORM_WIN32_KHR +VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryFdKHR(VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetMemoryFdKHR"); + VkResult result = device_dispatch_table(device)->GetMemoryFdKHR(device, pGetFdInfo, pFd); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryFdPropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, VkMemoryFdPropertiesKHR* pMemoryFdProperties) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetMemoryFdPropertiesKHR"); + VkResult result = device_dispatch_table(device)->GetMemoryFdPropertiesKHR(device, handleType, fd, pMemoryFdProperties); + return result; +} +#if defined(VK_USE_PLATFORM_WIN32_KHR) +VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreWin32HandleKHR(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkImportSemaphoreWin32HandleKHR"); + VkResult result = device_dispatch_table(device)->ImportSemaphoreWin32HandleKHR(device, pImportSemaphoreWin32HandleInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetSemaphoreWin32HandleKHR"); + VkResult result = device_dispatch_table(device)->GetSemaphoreWin32HandleKHR(device, pGetWin32HandleInfo, pHandle); + return result; +} +#endif // VK_USE_PLATFORM_WIN32_KHR +VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreFdKHR(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkImportSemaphoreFdKHR"); + VkResult result = device_dispatch_table(device)->ImportSemaphoreFdKHR(device, pImportSemaphoreFdInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreFdKHR(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetSemaphoreFdKHR"); + VkResult result = device_dispatch_table(device)->GetSemaphoreFdKHR(device, pGetFdInfo, pFd); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdPushDescriptorSetKHR"); + device_dispatch_table(commandBuffer)->CmdPushDescriptorSetKHR(commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, pDescriptorWrites); +} +VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void* pData) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdPushDescriptorSetWithTemplateKHR"); + device_dispatch_table(commandBuffer)->CmdPushDescriptorSetWithTemplateKHR(commandBuffer, descriptorUpdateTemplate, layout, set, pData); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateDescriptorUpdateTemplateKHR(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateDescriptorUpdateTemplateKHR"); + VkResult result = device_dispatch_table(device)->CreateDescriptorUpdateTemplateKHR(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyDescriptorUpdateTemplateKHR"); + device_dispatch_table(device)->DestroyDescriptorUpdateTemplateKHR(device, descriptorUpdateTemplate, pAllocator); +} +VKAPI_ATTR void VKAPI_CALL vkUpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData) { + Timer timer(CPUTimingCategory::VkDevice, "vkUpdateDescriptorSetWithTemplateKHR"); + device_dispatch_table(device)->UpdateDescriptorSetWithTemplateKHR(device, descriptorSet, descriptorUpdateTemplate, pData); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateRenderPass2KHR(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateRenderPass2KHR"); + VkResult result = device_dispatch_table(device)->CreateRenderPass2KHR(device, pCreateInfo, pAllocator, pRenderPass); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBeginRenderPass2KHR"); + device_dispatch_table(commandBuffer)->CmdBeginRenderPass2KHR(commandBuffer, pRenderPassBegin, pSubpassBeginInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdNextSubpass2KHR(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdNextSubpass2KHR"); + device_dispatch_table(commandBuffer)->CmdNextSubpass2KHR(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdEndRenderPass2KHR"); + device_dispatch_table(commandBuffer)->CmdEndRenderPass2KHR(commandBuffer, pSubpassEndInfo); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainStatusKHR(VkDevice device, VkSwapchainKHR swapchain) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetSwapchainStatusKHR"); + VkResult result = device_dispatch_table(device)->GetSwapchainStatusKHR(device, swapchain); + return result; +} +#if defined(VK_USE_PLATFORM_WIN32_KHR) +VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceWin32HandleKHR(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkImportFenceWin32HandleKHR"); + VkResult result = device_dispatch_table(device)->ImportFenceWin32HandleKHR(device, pImportFenceWin32HandleInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetFenceWin32HandleKHR"); + VkResult result = device_dispatch_table(device)->GetFenceWin32HandleKHR(device, pGetWin32HandleInfo, pHandle); + return result; +} +#endif // VK_USE_PLATFORM_WIN32_KHR +VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceFdKHR(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkImportFenceFdKHR"); + VkResult result = device_dispatch_table(device)->ImportFenceFdKHR(device, pImportFenceFdInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceFdKHR(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetFenceFdKHR"); + VkResult result = device_dispatch_table(device)->GetFenceFdKHR(device, pGetFdInfo, pFd); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkAcquireProfilingLockKHR(VkDevice device, const VkAcquireProfilingLockInfoKHR* pInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkAcquireProfilingLockKHR"); + VkResult result = device_dispatch_table(device)->AcquireProfilingLockKHR(device, pInfo); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkReleaseProfilingLockKHR(VkDevice device) { + Timer timer(CPUTimingCategory::VkDevice, "vkReleaseProfilingLockKHR"); + device_dispatch_table(device)->ReleaseProfilingLockKHR(device); +} +VKAPI_ATTR void VKAPI_CALL vkGetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetImageMemoryRequirements2KHR"); + device_dispatch_table(device)->GetImageMemoryRequirements2KHR(device, pInfo, pMemoryRequirements); +} +VKAPI_ATTR void VKAPI_CALL vkGetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetBufferMemoryRequirements2KHR"); + device_dispatch_table(device)->GetBufferMemoryRequirements2KHR(device, pInfo, pMemoryRequirements); +} +VKAPI_ATTR void VKAPI_CALL vkGetImageSparseMemoryRequirements2KHR(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetImageSparseMemoryRequirements2KHR"); + device_dispatch_table(device)->GetImageSparseMemoryRequirements2KHR(device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateSamplerYcbcrConversionKHR(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateSamplerYcbcrConversionKHR"); + VkResult result = device_dispatch_table(device)->CreateSamplerYcbcrConversionKHR(device, pCreateInfo, pAllocator, pYcbcrConversion); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroySamplerYcbcrConversionKHR(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroySamplerYcbcrConversionKHR"); + device_dispatch_table(device)->DestroySamplerYcbcrConversionKHR(device, ycbcrConversion, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos) { + Timer timer(CPUTimingCategory::VkDevice, "vkBindBufferMemory2KHR"); + VkResult result = device_dispatch_table(device)->BindBufferMemory2KHR(device, bindInfoCount, pBindInfos); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos) { + Timer timer(CPUTimingCategory::VkDevice, "vkBindImageMemory2KHR"); + VkResult result = device_dispatch_table(device)->BindImageMemory2KHR(device, bindInfoCount, pBindInfos); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutSupportKHR(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDescriptorSetLayoutSupportKHR"); + device_dispatch_table(device)->GetDescriptorSetLayoutSupportKHR(device, pCreateInfo, pSupport); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDrawIndirectCountKHR"); + device_dispatch_table(commandBuffer)->CmdDrawIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDrawIndexedIndirectCountKHR"); + device_dispatch_table(commandBuffer)->CmdDrawIndexedIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreCounterValueKHR(VkDevice device, VkSemaphore semaphore, uint64_t* pValue) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetSemaphoreCounterValueKHR"); + VkResult result = device_dispatch_table(device)->GetSemaphoreCounterValueKHR(device, semaphore, pValue); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkWaitSemaphoresKHR(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout) { + Timer timer(CPUTimingCategory::VkDevice, "vkWaitSemaphoresKHR"); + VkResult result = device_dispatch_table(device)->WaitSemaphoresKHR(device, pWaitInfo, timeout); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkSignalSemaphoreKHR(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkSignalSemaphoreKHR"); + VkResult result = device_dispatch_table(device)->SignalSemaphoreKHR(device, pSignalInfo); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetFragmentShadingRateKHR(VkCommandBuffer commandBuffer, const VkExtent2D* pFragmentSize, const VkFragmentShadingRateCombinerOpKHR combinerOps[2]) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetFragmentShadingRateKHR"); + device_dispatch_table(commandBuffer)->CmdSetFragmentShadingRateKHR(commandBuffer, pFragmentSize, combinerOps); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetRenderingAttachmentLocationsKHR(VkCommandBuffer commandBuffer, const VkRenderingAttachmentLocationInfo* pLocationInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetRenderingAttachmentLocationsKHR"); + device_dispatch_table(commandBuffer)->CmdSetRenderingAttachmentLocationsKHR(commandBuffer, pLocationInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetRenderingInputAttachmentIndicesKHR(VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfo* pInputAttachmentIndexInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetRenderingInputAttachmentIndicesKHR"); + device_dispatch_table(commandBuffer)->CmdSetRenderingInputAttachmentIndicesKHR(commandBuffer, pInputAttachmentIndexInfo); +} +VKAPI_ATTR VkResult VKAPI_CALL vkWaitForPresentKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t presentId, uint64_t timeout) { + Timer timer(CPUTimingCategory::VkDevice, "vkWaitForPresentKHR"); + VkResult result = device_dispatch_table(device)->WaitForPresentKHR(device, swapchain, presentId, timeout); + return result; +} +VKAPI_ATTR VkDeviceAddress VKAPI_CALL vkGetBufferDeviceAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetBufferDeviceAddressKHR"); + VkDeviceAddress result = device_dispatch_table(device)->GetBufferDeviceAddressKHR(device, pInfo); + return result; +} +VKAPI_ATTR uint64_t VKAPI_CALL vkGetBufferOpaqueCaptureAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetBufferOpaqueCaptureAddressKHR"); + uint64_t result = device_dispatch_table(device)->GetBufferOpaqueCaptureAddressKHR(device, pInfo); + return result; +} +VKAPI_ATTR uint64_t VKAPI_CALL vkGetDeviceMemoryOpaqueCaptureAddressKHR(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceMemoryOpaqueCaptureAddressKHR"); + uint64_t result = device_dispatch_table(device)->GetDeviceMemoryOpaqueCaptureAddressKHR(device, pInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateDeferredOperationKHR(VkDevice device, const VkAllocationCallbacks* pAllocator, VkDeferredOperationKHR* pDeferredOperation) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateDeferredOperationKHR"); + VkResult result = device_dispatch_table(device)->CreateDeferredOperationKHR(device, pAllocator, pDeferredOperation); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyDeferredOperationKHR(VkDevice device, VkDeferredOperationKHR operation, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyDeferredOperationKHR"); + device_dispatch_table(device)->DestroyDeferredOperationKHR(device, operation, pAllocator); +} +VKAPI_ATTR uint32_t VKAPI_CALL vkGetDeferredOperationMaxConcurrencyKHR(VkDevice device, VkDeferredOperationKHR operation) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeferredOperationMaxConcurrencyKHR"); + uint32_t result = device_dispatch_table(device)->GetDeferredOperationMaxConcurrencyKHR(device, operation); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetDeferredOperationResultKHR(VkDevice device, VkDeferredOperationKHR operation) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeferredOperationResultKHR"); + VkResult result = device_dispatch_table(device)->GetDeferredOperationResultKHR(device, operation); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkDeferredOperationJoinKHR(VkDevice device, VkDeferredOperationKHR operation) { + Timer timer(CPUTimingCategory::VkDevice, "vkDeferredOperationJoinKHR"); + VkResult result = device_dispatch_table(device)->DeferredOperationJoinKHR(device, operation); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineExecutablePropertiesKHR(VkDevice device, const VkPipelineInfoKHR* pPipelineInfo, uint32_t* pExecutableCount, VkPipelineExecutablePropertiesKHR* pProperties) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetPipelineExecutablePropertiesKHR"); + VkResult result = device_dispatch_table(device)->GetPipelineExecutablePropertiesKHR(device, pPipelineInfo, pExecutableCount, pProperties); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineExecutableStatisticsKHR(VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pStatisticCount, VkPipelineExecutableStatisticKHR* pStatistics) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetPipelineExecutableStatisticsKHR"); + VkResult result = device_dispatch_table(device)->GetPipelineExecutableStatisticsKHR(device, pExecutableInfo, pStatisticCount, pStatistics); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineExecutableInternalRepresentationsKHR(VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pInternalRepresentationCount, VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetPipelineExecutableInternalRepresentationsKHR"); + VkResult result = device_dispatch_table(device)->GetPipelineExecutableInternalRepresentationsKHR(device, pExecutableInfo, pInternalRepresentationCount, pInternalRepresentations); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkMapMemory2KHR(VkDevice device, const VkMemoryMapInfo* pMemoryMapInfo, void** ppData) { + Timer timer(CPUTimingCategory::VkDevice, "vkMapMemory2KHR"); + VkResult result = device_dispatch_table(device)->MapMemory2KHR(device, pMemoryMapInfo, ppData); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkUnmapMemory2KHR(VkDevice device, const VkMemoryUnmapInfo* pMemoryUnmapInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkUnmapMemory2KHR"); + VkResult result = device_dispatch_table(device)->UnmapMemory2KHR(device, pMemoryUnmapInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetEncodedVideoSessionParametersKHR(VkDevice device, const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo, VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, size_t* pDataSize, void* pData) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetEncodedVideoSessionParametersKHR"); + VkResult result = device_dispatch_table(device)->GetEncodedVideoSessionParametersKHR(device, pVideoSessionParametersInfo, pFeedbackInfo, pDataSize, pData); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdEncodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdEncodeVideoKHR"); + device_dispatch_table(commandBuffer)->CmdEncodeVideoKHR(commandBuffer, pEncodeInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetEvent2KHR"); + device_dispatch_table(commandBuffer)->CmdSetEvent2KHR(commandBuffer, event, pDependencyInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdResetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdResetEvent2KHR"); + device_dispatch_table(commandBuffer)->CmdResetEvent2KHR(commandBuffer, event, stageMask); +} +VKAPI_ATTR void VKAPI_CALL vkCmdWaitEvents2KHR(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, const VkDependencyInfo* pDependencyInfos) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdWaitEvents2KHR"); + device_dispatch_table(commandBuffer)->CmdWaitEvents2KHR(commandBuffer, eventCount, pEvents, pDependencyInfos); +} +VKAPI_ATTR void VKAPI_CALL vkCmdPipelineBarrier2KHR(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdPipelineBarrier2KHR"); + device_dispatch_table(commandBuffer)->CmdPipelineBarrier2KHR(commandBuffer, pDependencyInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdWriteTimestamp2KHR(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, uint32_t query) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdWriteTimestamp2KHR"); + device_dispatch_table(commandBuffer)->CmdWriteTimestamp2KHR(commandBuffer, stage, queryPool, query); +} +VKAPI_ATTR VkResult VKAPI_CALL vkQueueSubmit2KHR(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence) { + Timer timer(CPUTimingCategory::VkQueue, "vkQueueSubmit2KHR"); + VkResult result = device_dispatch_table(queue)->QueueSubmit2KHR(queue, submitCount, pSubmits, fence); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyBuffer2KHR"); + device_dispatch_table(commandBuffer)->CmdCopyBuffer2KHR(commandBuffer, pCopyBufferInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyImage2KHR"); + device_dispatch_table(commandBuffer)->CmdCopyImage2KHR(commandBuffer, pCopyImageInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyBufferToImage2KHR"); + device_dispatch_table(commandBuffer)->CmdCopyBufferToImage2KHR(commandBuffer, pCopyBufferToImageInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyImageToBuffer2KHR"); + device_dispatch_table(commandBuffer)->CmdCopyImageToBuffer2KHR(commandBuffer, pCopyImageToBufferInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBlitImage2KHR(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBlitImage2KHR"); + device_dispatch_table(commandBuffer)->CmdBlitImage2KHR(commandBuffer, pBlitImageInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdResolveImage2KHR(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdResolveImage2KHR"); + device_dispatch_table(commandBuffer)->CmdResolveImage2KHR(commandBuffer, pResolveImageInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdTraceRaysIndirect2KHR"); + device_dispatch_table(commandBuffer)->CmdTraceRaysIndirect2KHR(commandBuffer, indirectDeviceAddress); +} +VKAPI_ATTR void VKAPI_CALL vkGetDeviceBufferMemoryRequirementsKHR(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceBufferMemoryRequirementsKHR"); + device_dispatch_table(device)->GetDeviceBufferMemoryRequirementsKHR(device, pInfo, pMemoryRequirements); +} +VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceImageMemoryRequirementsKHR"); + device_dispatch_table(device)->GetDeviceImageMemoryRequirementsKHR(device, pInfo, pMemoryRequirements); +} +VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageSparseMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceImageSparseMemoryRequirementsKHR"); + device_dispatch_table(device)->GetDeviceImageSparseMemoryRequirementsKHR(device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBindIndexBuffer2KHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkDeviceSize size, VkIndexType indexType) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBindIndexBuffer2KHR"); + device_dispatch_table(commandBuffer)->CmdBindIndexBuffer2KHR(commandBuffer, buffer, offset, size, indexType); +} +VKAPI_ATTR void VKAPI_CALL vkGetRenderingAreaGranularityKHR(VkDevice device, const VkRenderingAreaInfo* pRenderingAreaInfo, VkExtent2D* pGranularity) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetRenderingAreaGranularityKHR"); + device_dispatch_table(device)->GetRenderingAreaGranularityKHR(device, pRenderingAreaInfo, pGranularity); +} +VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageSubresourceLayoutKHR(VkDevice device, const VkDeviceImageSubresourceInfo* pInfo, VkSubresourceLayout2* pLayout) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceImageSubresourceLayoutKHR"); + device_dispatch_table(device)->GetDeviceImageSubresourceLayoutKHR(device, pInfo, pLayout); +} +VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout2KHR(VkDevice device, VkImage image, const VkImageSubresource2* pSubresource, VkSubresourceLayout2* pLayout) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetImageSubresourceLayout2KHR"); + device_dispatch_table(device)->GetImageSubresourceLayout2KHR(device, image, pSubresource, pLayout); +} +VKAPI_ATTR VkResult VKAPI_CALL vkWaitForPresent2KHR(VkDevice device, VkSwapchainKHR swapchain, const VkPresentWait2InfoKHR* pPresentWait2Info) { + Timer timer(CPUTimingCategory::VkDevice, "vkWaitForPresent2KHR"); + VkResult result = device_dispatch_table(device)->WaitForPresent2KHR(device, swapchain, pPresentWait2Info); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreatePipelineBinariesKHR(VkDevice device, const VkPipelineBinaryCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineBinaryHandlesInfoKHR* pBinaries) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreatePipelineBinariesKHR"); + VkResult result = device_dispatch_table(device)->CreatePipelineBinariesKHR(device, pCreateInfo, pAllocator, pBinaries); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyPipelineBinaryKHR(VkDevice device, VkPipelineBinaryKHR pipelineBinary, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyPipelineBinaryKHR"); + device_dispatch_table(device)->DestroyPipelineBinaryKHR(device, pipelineBinary, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineKeyKHR(VkDevice device, const VkPipelineCreateInfoKHR* pPipelineCreateInfo, VkPipelineBinaryKeyKHR* pPipelineKey) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetPipelineKeyKHR"); + VkResult result = device_dispatch_table(device)->GetPipelineKeyKHR(device, pPipelineCreateInfo, pPipelineKey); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineBinaryDataKHR(VkDevice device, const VkPipelineBinaryDataInfoKHR* pInfo, VkPipelineBinaryKeyKHR* pPipelineBinaryKey, size_t* pPipelineBinaryDataSize, void* pPipelineBinaryData) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetPipelineBinaryDataKHR"); + VkResult result = device_dispatch_table(device)->GetPipelineBinaryDataKHR(device, pInfo, pPipelineBinaryKey, pPipelineBinaryDataSize, pPipelineBinaryData); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkReleaseCapturedPipelineDataKHR(VkDevice device, const VkReleaseCapturedPipelineDataInfoKHR* pInfo, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkReleaseCapturedPipelineDataKHR"); + VkResult result = device_dispatch_table(device)->ReleaseCapturedPipelineDataKHR(device, pInfo, pAllocator); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkReleaseSwapchainImagesKHR(VkDevice device, const VkReleaseSwapchainImagesInfoKHR* pReleaseInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkReleaseSwapchainImagesKHR"); + VkResult result = device_dispatch_table(device)->ReleaseSwapchainImagesKHR(device, pReleaseInfo); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetLineStippleKHR(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetLineStippleKHR"); + device_dispatch_table(commandBuffer)->CmdSetLineStippleKHR(commandBuffer, lineStippleFactor, lineStipplePattern); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetCalibratedTimestampsKHR(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetCalibratedTimestampsKHR"); + VkResult result = device_dispatch_table(device)->GetCalibratedTimestampsKHR(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorSets2KHR(VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfo* pBindDescriptorSetsInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBindDescriptorSets2KHR"); + device_dispatch_table(commandBuffer)->CmdBindDescriptorSets2KHR(commandBuffer, pBindDescriptorSetsInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdPushConstants2KHR(VkCommandBuffer commandBuffer, const VkPushConstantsInfo* pPushConstantsInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdPushConstants2KHR"); + device_dispatch_table(commandBuffer)->CmdPushConstants2KHR(commandBuffer, pPushConstantsInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSet2KHR(VkCommandBuffer commandBuffer, const VkPushDescriptorSetInfo* pPushDescriptorSetInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdPushDescriptorSet2KHR"); + device_dispatch_table(commandBuffer)->CmdPushDescriptorSet2KHR(commandBuffer, pPushDescriptorSetInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplate2KHR(VkCommandBuffer commandBuffer, const VkPushDescriptorSetWithTemplateInfo* pPushDescriptorSetWithTemplateInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdPushDescriptorSetWithTemplate2KHR"); + device_dispatch_table(commandBuffer)->CmdPushDescriptorSetWithTemplate2KHR(commandBuffer, pPushDescriptorSetWithTemplateInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDescriptorBufferOffsets2EXT(VkCommandBuffer commandBuffer, const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDescriptorBufferOffsets2EXT"); + device_dispatch_table(commandBuffer)->CmdSetDescriptorBufferOffsets2EXT(commandBuffer, pSetDescriptorBufferOffsetsInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorBufferEmbeddedSamplers2EXT(VkCommandBuffer commandBuffer, const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBindDescriptorBufferEmbeddedSamplers2EXT"); + device_dispatch_table(commandBuffer)->CmdBindDescriptorBufferEmbeddedSamplers2EXT(commandBuffer, pBindDescriptorBufferEmbeddedSamplersInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyMemoryIndirectKHR(VkCommandBuffer commandBuffer, const VkCopyMemoryIndirectInfoKHR* pCopyMemoryIndirectInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyMemoryIndirectKHR"); + device_dispatch_table(commandBuffer)->CmdCopyMemoryIndirectKHR(commandBuffer, pCopyMemoryIndirectInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyMemoryToImageIndirectKHR(VkCommandBuffer commandBuffer, const VkCopyMemoryToImageIndirectInfoKHR* pCopyMemoryToImageIndirectInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyMemoryToImageIndirectKHR"); + device_dispatch_table(commandBuffer)->CmdCopyMemoryToImageIndirectKHR(commandBuffer, pCopyMemoryToImageIndirectInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdEndRendering2KHR(VkCommandBuffer commandBuffer, const VkRenderingEndInfoKHR* pRenderingEndInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdEndRendering2KHR"); + device_dispatch_table(commandBuffer)->CmdEndRendering2KHR(commandBuffer, pRenderingEndInfo); +} +VKAPI_ATTR VkResult VKAPI_CALL vkDebugMarkerSetObjectTagEXT(VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkDebugMarkerSetObjectTagEXT"); + VkResult result = device_dispatch_table(device)->DebugMarkerSetObjectTagEXT(device, pTagInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkDebugMarkerSetObjectNameEXT(VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkDebugMarkerSetObjectNameEXT"); + VkResult result = device_dispatch_table(device)->DebugMarkerSetObjectNameEXT(device, pNameInfo); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDebugMarkerBeginEXT"); + device_dispatch_table(commandBuffer)->CmdDebugMarkerBeginEXT(commandBuffer, pMarkerInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerEndEXT(VkCommandBuffer commandBuffer) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDebugMarkerEndEXT"); + device_dispatch_table(commandBuffer)->CmdDebugMarkerEndEXT(commandBuffer); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDebugMarkerInsertEXT"); + device_dispatch_table(commandBuffer)->CmdDebugMarkerInsertEXT(commandBuffer, pMarkerInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBindTransformFeedbackBuffersEXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBindTransformFeedbackBuffersEXT"); + device_dispatch_table(commandBuffer)->CmdBindTransformFeedbackBuffersEXT(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBeginTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBeginTransformFeedbackEXT"); + device_dispatch_table(commandBuffer)->CmdBeginTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets); +} +VKAPI_ATTR void VKAPI_CALL vkCmdEndTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdEndTransformFeedbackEXT"); + device_dispatch_table(commandBuffer)->CmdEndTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, pCounterBufferOffsets); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBeginQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, uint32_t index) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBeginQueryIndexedEXT"); + device_dispatch_table(commandBuffer)->CmdBeginQueryIndexedEXT(commandBuffer, queryPool, query, flags, index); +} +VKAPI_ATTR void VKAPI_CALL vkCmdEndQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdEndQueryIndexedEXT"); + device_dispatch_table(commandBuffer)->CmdEndQueryIndexedEXT(commandBuffer, queryPool, query, index); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectByteCountEXT(VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDrawIndirectByteCountEXT"); + device_dispatch_table(commandBuffer)->CmdDrawIndirectByteCountEXT(commandBuffer, instanceCount, firstInstance, counterBuffer, counterBufferOffset, counterOffset, vertexStride); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateCuModuleNVX(VkDevice device, const VkCuModuleCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCuModuleNVX* pModule) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateCuModuleNVX"); + VkResult result = device_dispatch_table(device)->CreateCuModuleNVX(device, pCreateInfo, pAllocator, pModule); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateCuFunctionNVX(VkDevice device, const VkCuFunctionCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCuFunctionNVX* pFunction) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateCuFunctionNVX"); + VkResult result = device_dispatch_table(device)->CreateCuFunctionNVX(device, pCreateInfo, pAllocator, pFunction); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyCuModuleNVX(VkDevice device, VkCuModuleNVX module, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyCuModuleNVX"); + device_dispatch_table(device)->DestroyCuModuleNVX(device, module, pAllocator); +} +VKAPI_ATTR void VKAPI_CALL vkDestroyCuFunctionNVX(VkDevice device, VkCuFunctionNVX function, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyCuFunctionNVX"); + device_dispatch_table(device)->DestroyCuFunctionNVX(device, function, pAllocator); +} +VKAPI_ATTR void VKAPI_CALL vkCmdCuLaunchKernelNVX(VkCommandBuffer commandBuffer, const VkCuLaunchInfoNVX* pLaunchInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCuLaunchKernelNVX"); + device_dispatch_table(commandBuffer)->CmdCuLaunchKernelNVX(commandBuffer, pLaunchInfo); +} +VKAPI_ATTR uint32_t VKAPI_CALL vkGetImageViewHandleNVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetImageViewHandleNVX"); + uint32_t result = device_dispatch_table(device)->GetImageViewHandleNVX(device, pInfo); + return result; +} +VKAPI_ATTR uint64_t VKAPI_CALL vkGetImageViewHandle64NVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetImageViewHandle64NVX"); + uint64_t result = device_dispatch_table(device)->GetImageViewHandle64NVX(device, pInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetImageViewAddressNVX(VkDevice device, VkImageView imageView, VkImageViewAddressPropertiesNVX* pProperties) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetImageViewAddressNVX"); + VkResult result = device_dispatch_table(device)->GetImageViewAddressNVX(device, imageView, pProperties); + return result; +} +VKAPI_ATTR uint64_t VKAPI_CALL vkGetDeviceCombinedImageSamplerIndexNVX(VkDevice device, uint64_t imageViewIndex, uint64_t samplerIndex) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceCombinedImageSamplerIndexNVX"); + uint64_t result = device_dispatch_table(device)->GetDeviceCombinedImageSamplerIndexNVX(device, imageViewIndex, samplerIndex); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDrawIndirectCountAMD"); + device_dispatch_table(commandBuffer)->CmdDrawIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDrawIndexedIndirectCountAMD"); + device_dispatch_table(commandBuffer)->CmdDrawIndexedIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetShaderInfoAMD(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetShaderInfoAMD"); + VkResult result = device_dispatch_table(device)->GetShaderInfoAMD(device, pipeline, shaderStage, infoType, pInfoSize, pInfo); + return result; +} +#if defined(VK_USE_PLATFORM_WIN32_KHR) +VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetMemoryWin32HandleNV"); + VkResult result = device_dispatch_table(device)->GetMemoryWin32HandleNV(device, memory, handleType, pHandle); + return result; +} +#endif // VK_USE_PLATFORM_WIN32_KHR +VKAPI_ATTR void VKAPI_CALL vkCmdBeginConditionalRenderingEXT(VkCommandBuffer commandBuffer, const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBeginConditionalRenderingEXT"); + device_dispatch_table(commandBuffer)->CmdBeginConditionalRenderingEXT(commandBuffer, pConditionalRenderingBegin); +} +VKAPI_ATTR void VKAPI_CALL vkCmdEndConditionalRenderingEXT(VkCommandBuffer commandBuffer) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdEndConditionalRenderingEXT"); + device_dispatch_table(commandBuffer)->CmdEndConditionalRenderingEXT(commandBuffer); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportWScalingNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportWScalingNV* pViewportWScalings) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetViewportWScalingNV"); + device_dispatch_table(commandBuffer)->CmdSetViewportWScalingNV(commandBuffer, firstViewport, viewportCount, pViewportWScalings); +} +VKAPI_ATTR VkResult VKAPI_CALL vkDisplayPowerControlEXT(VkDevice device, VkDisplayKHR display, const VkDisplayPowerInfoEXT* pDisplayPowerInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkDisplayPowerControlEXT"); + VkResult result = device_dispatch_table(device)->DisplayPowerControlEXT(device, display, pDisplayPowerInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkRegisterDeviceEventEXT(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence) { + Timer timer(CPUTimingCategory::VkDevice, "vkRegisterDeviceEventEXT"); + VkResult result = device_dispatch_table(device)->RegisterDeviceEventEXT(device, pDeviceEventInfo, pAllocator, pFence); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkRegisterDisplayEventEXT(VkDevice device, VkDisplayKHR display, const VkDisplayEventInfoEXT* pDisplayEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence) { + Timer timer(CPUTimingCategory::VkDevice, "vkRegisterDisplayEventEXT"); + VkResult result = device_dispatch_table(device)->RegisterDisplayEventEXT(device, display, pDisplayEventInfo, pAllocator, pFence); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainCounterEXT(VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetSwapchainCounterEXT"); + VkResult result = device_dispatch_table(device)->GetSwapchainCounterEXT(device, swapchain, counter, pCounterValue); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetRefreshCycleDurationGOOGLE(VkDevice device, VkSwapchainKHR swapchain, VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetRefreshCycleDurationGOOGLE"); + VkResult result = device_dispatch_table(device)->GetRefreshCycleDurationGOOGLE(device, swapchain, pDisplayTimingProperties); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPastPresentationTimingGOOGLE(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pPresentationTimingCount, VkPastPresentationTimingGOOGLE* pPresentationTimings) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetPastPresentationTimingGOOGLE"); + VkResult result = device_dispatch_table(device)->GetPastPresentationTimingGOOGLE(device, swapchain, pPresentationTimingCount, pPresentationTimings); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDiscardRectangleEXT"); + device_dispatch_table(commandBuffer)->CmdSetDiscardRectangleEXT(commandBuffer, firstDiscardRectangle, discardRectangleCount, pDiscardRectangles); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDiscardRectangleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 discardRectangleEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDiscardRectangleEnableEXT"); + device_dispatch_table(commandBuffer)->CmdSetDiscardRectangleEnableEXT(commandBuffer, discardRectangleEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDiscardRectangleModeEXT(VkCommandBuffer commandBuffer, VkDiscardRectangleModeEXT discardRectangleMode) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDiscardRectangleModeEXT"); + device_dispatch_table(commandBuffer)->CmdSetDiscardRectangleModeEXT(commandBuffer, discardRectangleMode); +} +VKAPI_ATTR void VKAPI_CALL vkSetHdrMetadataEXT(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, const VkHdrMetadataEXT* pMetadata) { + Timer timer(CPUTimingCategory::VkDevice, "vkSetHdrMetadataEXT"); + device_dispatch_table(device)->SetHdrMetadataEXT(device, swapchainCount, pSwapchains, pMetadata); +} +VKAPI_ATTR VkResult VKAPI_CALL vkSetDebugUtilsObjectNameEXT(VkDevice device, const VkDebugUtilsObjectNameInfoEXT* pNameInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkSetDebugUtilsObjectNameEXT"); + VkResult result = device_dispatch_table(device)->SetDebugUtilsObjectNameEXT(device, pNameInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkSetDebugUtilsObjectTagEXT(VkDevice device, const VkDebugUtilsObjectTagInfoEXT* pTagInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkSetDebugUtilsObjectTagEXT"); + VkResult result = device_dispatch_table(device)->SetDebugUtilsObjectTagEXT(device, pTagInfo); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkQueueBeginDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo) { + Timer timer(CPUTimingCategory::VkQueue, "vkQueueBeginDebugUtilsLabelEXT"); + device_dispatch_table(queue)->QueueBeginDebugUtilsLabelEXT(queue, pLabelInfo); +} +VKAPI_ATTR void VKAPI_CALL vkQueueEndDebugUtilsLabelEXT(VkQueue queue) { + Timer timer(CPUTimingCategory::VkQueue, "vkQueueEndDebugUtilsLabelEXT"); + device_dispatch_table(queue)->QueueEndDebugUtilsLabelEXT(queue); +} +VKAPI_ATTR void VKAPI_CALL vkQueueInsertDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo) { + Timer timer(CPUTimingCategory::VkQueue, "vkQueueInsertDebugUtilsLabelEXT"); + device_dispatch_table(queue)->QueueInsertDebugUtilsLabelEXT(queue, pLabelInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBeginDebugUtilsLabelEXT"); + device_dispatch_table(commandBuffer)->CmdBeginDebugUtilsLabelEXT(commandBuffer, pLabelInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdEndDebugUtilsLabelEXT"); + device_dispatch_table(commandBuffer)->CmdEndDebugUtilsLabelEXT(commandBuffer); +} +VKAPI_ATTR void VKAPI_CALL vkCmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdInsertDebugUtilsLabelEXT"); + device_dispatch_table(commandBuffer)->CmdInsertDebugUtilsLabelEXT(commandBuffer, pLabelInfo); +} +#if defined(VK_USE_PLATFORM_ANDROID_KHR) +VKAPI_ATTR VkResult VKAPI_CALL vkGetAndroidHardwareBufferPropertiesANDROID(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetAndroidHardwareBufferPropertiesANDROID"); + VkResult result = device_dispatch_table(device)->GetAndroidHardwareBufferPropertiesANDROID(device, buffer, pProperties); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryAndroidHardwareBufferANDROID(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetMemoryAndroidHardwareBufferANDROID"); + VkResult result = device_dispatch_table(device)->GetMemoryAndroidHardwareBufferANDROID(device, pInfo, pBuffer); + return result; +} +#endif // VK_USE_PLATFORM_ANDROID_KHR +#if defined(VK_ENABLE_BETA_EXTENSIONS) +VKAPI_ATTR VkResult VKAPI_CALL vkCreateExecutionGraphPipelinesAMDX(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateExecutionGraphPipelinesAMDX"); + VkResult result = device_dispatch_table(device)->CreateExecutionGraphPipelinesAMDX(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetExecutionGraphPipelineScratchSizeAMDX(VkDevice device, VkPipeline executionGraph, VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetExecutionGraphPipelineScratchSizeAMDX"); + VkResult result = device_dispatch_table(device)->GetExecutionGraphPipelineScratchSizeAMDX(device, executionGraph, pSizeInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetExecutionGraphPipelineNodeIndexAMDX(VkDevice device, VkPipeline executionGraph, const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo, uint32_t* pNodeIndex) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetExecutionGraphPipelineNodeIndexAMDX"); + VkResult result = device_dispatch_table(device)->GetExecutionGraphPipelineNodeIndexAMDX(device, executionGraph, pNodeInfo, pNodeIndex); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdInitializeGraphScratchMemoryAMDX(VkCommandBuffer commandBuffer, VkPipeline executionGraph, VkDeviceAddress scratch, VkDeviceSize scratchSize) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdInitializeGraphScratchMemoryAMDX"); + device_dispatch_table(commandBuffer)->CmdInitializeGraphScratchMemoryAMDX(commandBuffer, executionGraph, scratch, scratchSize); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDispatchGraphAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX* pCountInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDispatchGraphAMDX"); + device_dispatch_table(commandBuffer)->CmdDispatchGraphAMDX(commandBuffer, scratch, scratchSize, pCountInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDispatchGraphIndirectAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX* pCountInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDispatchGraphIndirectAMDX"); + device_dispatch_table(commandBuffer)->CmdDispatchGraphIndirectAMDX(commandBuffer, scratch, scratchSize, pCountInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDispatchGraphIndirectCountAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, VkDeviceAddress countInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDispatchGraphIndirectCountAMDX"); + device_dispatch_table(commandBuffer)->CmdDispatchGraphIndirectCountAMDX(commandBuffer, scratch, scratchSize, countInfo); +} +#endif // VK_ENABLE_BETA_EXTENSIONS +VKAPI_ATTR VkResult VKAPI_CALL vkWriteSamplerDescriptorsEXT(VkDevice device, uint32_t samplerCount, const VkSamplerCreateInfo* pSamplers, const VkHostAddressRangeEXT* pDescriptors) { + Timer timer(CPUTimingCategory::VkDevice, "vkWriteSamplerDescriptorsEXT"); + VkResult result = device_dispatch_table(device)->WriteSamplerDescriptorsEXT(device, samplerCount, pSamplers, pDescriptors); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkWriteResourceDescriptorsEXT(VkDevice device, uint32_t resourceCount, const VkResourceDescriptorInfoEXT* pResources, const VkHostAddressRangeEXT* pDescriptors) { + Timer timer(CPUTimingCategory::VkDevice, "vkWriteResourceDescriptorsEXT"); + VkResult result = device_dispatch_table(device)->WriteResourceDescriptorsEXT(device, resourceCount, pResources, pDescriptors); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdBindSamplerHeapEXT(VkCommandBuffer commandBuffer, const VkBindHeapInfoEXT* pBindInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBindSamplerHeapEXT"); + device_dispatch_table(commandBuffer)->CmdBindSamplerHeapEXT(commandBuffer, pBindInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBindResourceHeapEXT(VkCommandBuffer commandBuffer, const VkBindHeapInfoEXT* pBindInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBindResourceHeapEXT"); + device_dispatch_table(commandBuffer)->CmdBindResourceHeapEXT(commandBuffer, pBindInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdPushDataEXT(VkCommandBuffer commandBuffer, const VkPushDataInfoEXT* pPushDataInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdPushDataEXT"); + device_dispatch_table(commandBuffer)->CmdPushDataEXT(commandBuffer, pPushDataInfo); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetImageOpaqueCaptureDataEXT(VkDevice device, uint32_t imageCount, const VkImage* pImages, VkHostAddressRangeEXT* pDatas) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetImageOpaqueCaptureDataEXT"); + VkResult result = device_dispatch_table(device)->GetImageOpaqueCaptureDataEXT(device, imageCount, pImages, pDatas); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkRegisterCustomBorderColorEXT(VkDevice device, const VkSamplerCustomBorderColorCreateInfoEXT* pBorderColor, VkBool32 requestIndex, uint32_t* pIndex) { + Timer timer(CPUTimingCategory::VkDevice, "vkRegisterCustomBorderColorEXT"); + VkResult result = device_dispatch_table(device)->RegisterCustomBorderColorEXT(device, pBorderColor, requestIndex, pIndex); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkUnregisterCustomBorderColorEXT(VkDevice device, uint32_t index) { + Timer timer(CPUTimingCategory::VkDevice, "vkUnregisterCustomBorderColorEXT"); + device_dispatch_table(device)->UnregisterCustomBorderColorEXT(device, index); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetTensorOpaqueCaptureDataARM(VkDevice device, uint32_t tensorCount, const VkTensorARM* pTensors, VkHostAddressRangeEXT* pDatas) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetTensorOpaqueCaptureDataARM"); + VkResult result = device_dispatch_table(device)->GetTensorOpaqueCaptureDataARM(device, tensorCount, pTensors, pDatas); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetSampleLocationsEXT"); + device_dispatch_table(commandBuffer)->CmdSetSampleLocationsEXT(commandBuffer, pSampleLocationsInfo); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetImageDrmFormatModifierPropertiesEXT(VkDevice device, VkImage image, VkImageDrmFormatModifierPropertiesEXT* pProperties) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetImageDrmFormatModifierPropertiesEXT"); + VkResult result = device_dispatch_table(device)->GetImageDrmFormatModifierPropertiesEXT(device, image, pProperties); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateValidationCacheEXT(VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkValidationCacheEXT* pValidationCache) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateValidationCacheEXT"); + VkResult result = device_dispatch_table(device)->CreateValidationCacheEXT(device, pCreateInfo, pAllocator, pValidationCache); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyValidationCacheEXT(VkDevice device, VkValidationCacheEXT validationCache, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyValidationCacheEXT"); + device_dispatch_table(device)->DestroyValidationCacheEXT(device, validationCache, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkMergeValidationCachesEXT(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, const VkValidationCacheEXT* pSrcCaches) { + Timer timer(CPUTimingCategory::VkDevice, "vkMergeValidationCachesEXT"); + VkResult result = device_dispatch_table(device)->MergeValidationCachesEXT(device, dstCache, srcCacheCount, pSrcCaches); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetValidationCacheDataEXT(VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, void* pData) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetValidationCacheDataEXT"); + VkResult result = device_dispatch_table(device)->GetValidationCacheDataEXT(device, validationCache, pDataSize, pData); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdBindShadingRateImageNV(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBindShadingRateImageNV"); + device_dispatch_table(commandBuffer)->CmdBindShadingRateImageNV(commandBuffer, imageView, imageLayout); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportShadingRatePaletteNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkShadingRatePaletteNV* pShadingRatePalettes) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetViewportShadingRatePaletteNV"); + device_dispatch_table(commandBuffer)->CmdSetViewportShadingRatePaletteNV(commandBuffer, firstViewport, viewportCount, pShadingRatePalettes); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetCoarseSampleOrderNV(VkCommandBuffer commandBuffer, VkCoarseSampleOrderTypeNV sampleOrderType, uint32_t customSampleOrderCount, const VkCoarseSampleOrderCustomNV* pCustomSampleOrders) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetCoarseSampleOrderNV"); + device_dispatch_table(commandBuffer)->CmdSetCoarseSampleOrderNV(commandBuffer, sampleOrderType, customSampleOrderCount, pCustomSampleOrders); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateAccelerationStructureNV(VkDevice device, const VkAccelerationStructureCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkAccelerationStructureNV* pAccelerationStructure) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateAccelerationStructureNV"); + VkResult result = device_dispatch_table(device)->CreateAccelerationStructureNV(device, pCreateInfo, pAllocator, pAccelerationStructure); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyAccelerationStructureNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyAccelerationStructureNV"); + device_dispatch_table(device)->DestroyAccelerationStructureNV(device, accelerationStructure, pAllocator); +} +VKAPI_ATTR void VKAPI_CALL vkGetAccelerationStructureMemoryRequirementsNV(VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetAccelerationStructureMemoryRequirementsNV"); + device_dispatch_table(device)->GetAccelerationStructureMemoryRequirementsNV(device, pInfo, pMemoryRequirements); +} +VKAPI_ATTR VkResult VKAPI_CALL vkBindAccelerationStructureMemoryNV(VkDevice device, uint32_t bindInfoCount, const VkBindAccelerationStructureMemoryInfoNV* pBindInfos) { + Timer timer(CPUTimingCategory::VkDevice, "vkBindAccelerationStructureMemoryNV"); + VkResult result = device_dispatch_table(device)->BindAccelerationStructureMemoryNV(device, bindInfoCount, pBindInfos); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdBuildAccelerationStructureNV(VkCommandBuffer commandBuffer, const VkAccelerationStructureInfoNV* pInfo, VkBuffer instanceData, VkDeviceSize instanceOffset, VkBool32 update, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkBuffer scratch, VkDeviceSize scratchOffset) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBuildAccelerationStructureNV"); + device_dispatch_table(commandBuffer)->CmdBuildAccelerationStructureNV(commandBuffer, pInfo, instanceData, instanceOffset, update, dst, src, scratch, scratchOffset); +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyAccelerationStructureNV(VkCommandBuffer commandBuffer, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkCopyAccelerationStructureModeKHR mode) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyAccelerationStructureNV"); + device_dispatch_table(commandBuffer)->CmdCopyAccelerationStructureNV(commandBuffer, dst, src, mode); +} +VKAPI_ATTR void VKAPI_CALL vkCmdTraceRaysNV(VkCommandBuffer commandBuffer, VkBuffer raygenShaderBindingTableBuffer, VkDeviceSize raygenShaderBindingOffset, VkBuffer missShaderBindingTableBuffer, VkDeviceSize missShaderBindingOffset, VkDeviceSize missShaderBindingStride, VkBuffer hitShaderBindingTableBuffer, VkDeviceSize hitShaderBindingOffset, VkDeviceSize hitShaderBindingStride, VkBuffer callableShaderBindingTableBuffer, VkDeviceSize callableShaderBindingOffset, VkDeviceSize callableShaderBindingStride, uint32_t width, uint32_t height, uint32_t depth) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdTraceRaysNV"); + device_dispatch_table(commandBuffer)->CmdTraceRaysNV(commandBuffer, raygenShaderBindingTableBuffer, raygenShaderBindingOffset, missShaderBindingTableBuffer, missShaderBindingOffset, missShaderBindingStride, hitShaderBindingTableBuffer, hitShaderBindingOffset, hitShaderBindingStride, callableShaderBindingTableBuffer, callableShaderBindingOffset, callableShaderBindingStride, width, height, depth); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoNV* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateRayTracingPipelinesNV"); + VkResult result = device_dispatch_table(device)->CreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetRayTracingShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetRayTracingShaderGroupHandlesKHR"); + VkResult result = device_dispatch_table(device)->GetRayTracingShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, dataSize, pData); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetRayTracingShaderGroupHandlesNV(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetRayTracingShaderGroupHandlesNV"); + VkResult result = device_dispatch_table(device)->GetRayTracingShaderGroupHandlesNV(device, pipeline, firstGroup, groupCount, dataSize, pData); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetAccelerationStructureHandleNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, size_t dataSize, void* pData) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetAccelerationStructureHandleNV"); + VkResult result = device_dispatch_table(device)->GetAccelerationStructureHandleNV(device, accelerationStructure, dataSize, pData); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdWriteAccelerationStructuresPropertiesNV(VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, const VkAccelerationStructureNV* pAccelerationStructures, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdWriteAccelerationStructuresPropertiesNV"); + device_dispatch_table(commandBuffer)->CmdWriteAccelerationStructuresPropertiesNV(commandBuffer, accelerationStructureCount, pAccelerationStructures, queryType, queryPool, firstQuery); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCompileDeferredNV(VkDevice device, VkPipeline pipeline, uint32_t shader) { + Timer timer(CPUTimingCategory::VkDevice, "vkCompileDeferredNV"); + VkResult result = device_dispatch_table(device)->CompileDeferredNV(device, pipeline, shader); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryHostPointerPropertiesEXT(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetMemoryHostPointerPropertiesEXT"); + VkResult result = device_dispatch_table(device)->GetMemoryHostPointerPropertiesEXT(device, handleType, pHostPointer, pMemoryHostPointerProperties); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdWriteBufferMarkerAMD(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdWriteBufferMarkerAMD"); + device_dispatch_table(commandBuffer)->CmdWriteBufferMarkerAMD(commandBuffer, pipelineStage, dstBuffer, dstOffset, marker); +} +VKAPI_ATTR void VKAPI_CALL vkCmdWriteBufferMarker2AMD(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdWriteBufferMarker2AMD"); + device_dispatch_table(commandBuffer)->CmdWriteBufferMarker2AMD(commandBuffer, stage, dstBuffer, dstOffset, marker); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetCalibratedTimestampsEXT(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetCalibratedTimestampsEXT"); + VkResult result = device_dispatch_table(device)->GetCalibratedTimestampsEXT(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDrawMeshTasksNV"); + device_dispatch_table(commandBuffer)->CmdDrawMeshTasksNV(commandBuffer, taskCount, firstTask); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDrawMeshTasksIndirectNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDrawMeshTasksIndirectNV"); + device_dispatch_table(commandBuffer)->CmdDrawMeshTasksIndirectNV(commandBuffer, buffer, offset, drawCount, stride); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDrawMeshTasksIndirectCountNV"); + device_dispatch_table(commandBuffer)->CmdDrawMeshTasksIndirectCountNV(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetExclusiveScissorEnableNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VkBool32* pExclusiveScissorEnables) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetExclusiveScissorEnableNV"); + device_dispatch_table(commandBuffer)->CmdSetExclusiveScissorEnableNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, pExclusiveScissorEnables); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetExclusiveScissorNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VkRect2D* pExclusiveScissors) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetExclusiveScissorNV"); + device_dispatch_table(commandBuffer)->CmdSetExclusiveScissorNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, pExclusiveScissors); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetCheckpointNV(VkCommandBuffer commandBuffer, const void* pCheckpointMarker) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetCheckpointNV"); + device_dispatch_table(commandBuffer)->CmdSetCheckpointNV(commandBuffer, pCheckpointMarker); +} +VKAPI_ATTR void VKAPI_CALL vkGetQueueCheckpointDataNV(VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointDataNV* pCheckpointData) { + Timer timer(CPUTimingCategory::VkQueue, "vkGetQueueCheckpointDataNV"); + device_dispatch_table(queue)->GetQueueCheckpointDataNV(queue, pCheckpointDataCount, pCheckpointData); +} +VKAPI_ATTR void VKAPI_CALL vkGetQueueCheckpointData2NV(VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointData2NV* pCheckpointData) { + Timer timer(CPUTimingCategory::VkQueue, "vkGetQueueCheckpointData2NV"); + device_dispatch_table(queue)->GetQueueCheckpointData2NV(queue, pCheckpointDataCount, pCheckpointData); +} +VKAPI_ATTR VkResult VKAPI_CALL vkSetSwapchainPresentTimingQueueSizeEXT(VkDevice device, VkSwapchainKHR swapchain, uint32_t size) { + Timer timer(CPUTimingCategory::VkDevice, "vkSetSwapchainPresentTimingQueueSizeEXT"); + VkResult result = device_dispatch_table(device)->SetSwapchainPresentTimingQueueSizeEXT(device, swapchain, size); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainTimingPropertiesEXT(VkDevice device, VkSwapchainKHR swapchain, VkSwapchainTimingPropertiesEXT* pSwapchainTimingProperties, uint64_t* pSwapchainTimingPropertiesCounter) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetSwapchainTimingPropertiesEXT"); + VkResult result = device_dispatch_table(device)->GetSwapchainTimingPropertiesEXT(device, swapchain, pSwapchainTimingProperties, pSwapchainTimingPropertiesCounter); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainTimeDomainPropertiesEXT(VkDevice device, VkSwapchainKHR swapchain, VkSwapchainTimeDomainPropertiesEXT* pSwapchainTimeDomainProperties, uint64_t* pTimeDomainsCounter) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetSwapchainTimeDomainPropertiesEXT"); + VkResult result = device_dispatch_table(device)->GetSwapchainTimeDomainPropertiesEXT(device, swapchain, pSwapchainTimeDomainProperties, pTimeDomainsCounter); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPastPresentationTimingEXT(VkDevice device, const VkPastPresentationTimingInfoEXT* pPastPresentationTimingInfo, VkPastPresentationTimingPropertiesEXT* pPastPresentationTimingProperties) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetPastPresentationTimingEXT"); + VkResult result = device_dispatch_table(device)->GetPastPresentationTimingEXT(device, pPastPresentationTimingInfo, pPastPresentationTimingProperties); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkInitializePerformanceApiINTEL(VkDevice device, const VkInitializePerformanceApiInfoINTEL* pInitializeInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkInitializePerformanceApiINTEL"); + VkResult result = device_dispatch_table(device)->InitializePerformanceApiINTEL(device, pInitializeInfo); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkUninitializePerformanceApiINTEL(VkDevice device) { + Timer timer(CPUTimingCategory::VkDevice, "vkUninitializePerformanceApiINTEL"); + device_dispatch_table(device)->UninitializePerformanceApiINTEL(device); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCmdSetPerformanceMarkerINTEL(VkCommandBuffer commandBuffer, const VkPerformanceMarkerInfoINTEL* pMarkerInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetPerformanceMarkerINTEL"); + VkResult result = device_dispatch_table(commandBuffer)->CmdSetPerformanceMarkerINTEL(commandBuffer, pMarkerInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCmdSetPerformanceStreamMarkerINTEL(VkCommandBuffer commandBuffer, const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetPerformanceStreamMarkerINTEL"); + VkResult result = device_dispatch_table(commandBuffer)->CmdSetPerformanceStreamMarkerINTEL(commandBuffer, pMarkerInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCmdSetPerformanceOverrideINTEL(VkCommandBuffer commandBuffer, const VkPerformanceOverrideInfoINTEL* pOverrideInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetPerformanceOverrideINTEL"); + VkResult result = device_dispatch_table(commandBuffer)->CmdSetPerformanceOverrideINTEL(commandBuffer, pOverrideInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkAcquirePerformanceConfigurationINTEL(VkDevice device, const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, VkPerformanceConfigurationINTEL* pConfiguration) { + Timer timer(CPUTimingCategory::VkDevice, "vkAcquirePerformanceConfigurationINTEL"); + VkResult result = device_dispatch_table(device)->AcquirePerformanceConfigurationINTEL(device, pAcquireInfo, pConfiguration); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkReleasePerformanceConfigurationINTEL(VkDevice device, VkPerformanceConfigurationINTEL configuration) { + Timer timer(CPUTimingCategory::VkDevice, "vkReleasePerformanceConfigurationINTEL"); + VkResult result = device_dispatch_table(device)->ReleasePerformanceConfigurationINTEL(device, configuration); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkQueueSetPerformanceConfigurationINTEL(VkQueue queue, VkPerformanceConfigurationINTEL configuration) { + Timer timer(CPUTimingCategory::VkQueue, "vkQueueSetPerformanceConfigurationINTEL"); + VkResult result = device_dispatch_table(queue)->QueueSetPerformanceConfigurationINTEL(queue, configuration); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPerformanceParameterINTEL(VkDevice device, VkPerformanceParameterTypeINTEL parameter, VkPerformanceValueINTEL* pValue) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetPerformanceParameterINTEL"); + VkResult result = device_dispatch_table(device)->GetPerformanceParameterINTEL(device, parameter, pValue); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkSetLocalDimmingAMD(VkDevice device, VkSwapchainKHR swapChain, VkBool32 localDimmingEnable) { + Timer timer(CPUTimingCategory::VkDevice, "vkSetLocalDimmingAMD"); + device_dispatch_table(device)->SetLocalDimmingAMD(device, swapChain, localDimmingEnable); +} +VKAPI_ATTR VkDeviceAddress VKAPI_CALL vkGetBufferDeviceAddressEXT(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetBufferDeviceAddressEXT"); + VkDeviceAddress result = device_dispatch_table(device)->GetBufferDeviceAddressEXT(device, pInfo); + return result; +} +#if defined(VK_USE_PLATFORM_WIN32_KHR) +VKAPI_ATTR VkResult VKAPI_CALL vkAcquireFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain) { + Timer timer(CPUTimingCategory::VkDevice, "vkAcquireFullScreenExclusiveModeEXT"); + VkResult result = device_dispatch_table(device)->AcquireFullScreenExclusiveModeEXT(device, swapchain); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkReleaseFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain) { + Timer timer(CPUTimingCategory::VkDevice, "vkReleaseFullScreenExclusiveModeEXT"); + VkResult result = device_dispatch_table(device)->ReleaseFullScreenExclusiveModeEXT(device, swapchain); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModes2EXT(VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceGroupSurfacePresentModes2EXT"); + VkResult result = device_dispatch_table(device)->GetDeviceGroupSurfacePresentModes2EXT(device, pSurfaceInfo, pModes); + return result; +} +#endif // VK_USE_PLATFORM_WIN32_KHR +VKAPI_ATTR void VKAPI_CALL vkCmdSetLineStippleEXT(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetLineStippleEXT"); + device_dispatch_table(commandBuffer)->CmdSetLineStippleEXT(commandBuffer, lineStippleFactor, lineStipplePattern); +} +VKAPI_ATTR void VKAPI_CALL vkResetQueryPoolEXT(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) { + Timer timer(CPUTimingCategory::VkDevice, "vkResetQueryPoolEXT"); + device_dispatch_table(device)->ResetQueryPoolEXT(device, queryPool, firstQuery, queryCount); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetCullModeEXT(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetCullModeEXT"); + device_dispatch_table(commandBuffer)->CmdSetCullModeEXT(commandBuffer, cullMode); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetFrontFaceEXT(VkCommandBuffer commandBuffer, VkFrontFace frontFace) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetFrontFaceEXT"); + device_dispatch_table(commandBuffer)->CmdSetFrontFaceEXT(commandBuffer, frontFace); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetPrimitiveTopologyEXT(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetPrimitiveTopologyEXT"); + device_dispatch_table(commandBuffer)->CmdSetPrimitiveTopologyEXT(commandBuffer, primitiveTopology); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportWithCountEXT(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetViewportWithCountEXT"); + device_dispatch_table(commandBuffer)->CmdSetViewportWithCountEXT(commandBuffer, viewportCount, pViewports); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetScissorWithCountEXT(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetScissorWithCountEXT"); + device_dispatch_table(commandBuffer)->CmdSetScissorWithCountEXT(commandBuffer, scissorCount, pScissors); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBindVertexBuffers2EXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, const VkDeviceSize* pStrides) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBindVertexBuffers2EXT"); + device_dispatch_table(commandBuffer)->CmdBindVertexBuffers2EXT(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, pStrides); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDepthTestEnableEXT"); + device_dispatch_table(commandBuffer)->CmdSetDepthTestEnableEXT(commandBuffer, depthTestEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthWriteEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDepthWriteEnableEXT"); + device_dispatch_table(commandBuffer)->CmdSetDepthWriteEnableEXT(commandBuffer, depthWriteEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthCompareOpEXT(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDepthCompareOpEXT"); + device_dispatch_table(commandBuffer)->CmdSetDepthCompareOpEXT(commandBuffer, depthCompareOp); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBoundsTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDepthBoundsTestEnableEXT"); + device_dispatch_table(commandBuffer)->CmdSetDepthBoundsTestEnableEXT(commandBuffer, depthBoundsTestEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetStencilTestEnableEXT"); + device_dispatch_table(commandBuffer)->CmdSetStencilTestEnableEXT(commandBuffer, stencilTestEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilOpEXT(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetStencilOpEXT"); + device_dispatch_table(commandBuffer)->CmdSetStencilOpEXT(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCopyMemoryToImageEXT(VkDevice device, const VkCopyMemoryToImageInfo* pCopyMemoryToImageInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkCopyMemoryToImageEXT"); + VkResult result = device_dispatch_table(device)->CopyMemoryToImageEXT(device, pCopyMemoryToImageInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCopyImageToMemoryEXT(VkDevice device, const VkCopyImageToMemoryInfo* pCopyImageToMemoryInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkCopyImageToMemoryEXT"); + VkResult result = device_dispatch_table(device)->CopyImageToMemoryEXT(device, pCopyImageToMemoryInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCopyImageToImageEXT(VkDevice device, const VkCopyImageToImageInfo* pCopyImageToImageInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkCopyImageToImageEXT"); + VkResult result = device_dispatch_table(device)->CopyImageToImageEXT(device, pCopyImageToImageInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkTransitionImageLayoutEXT(VkDevice device, uint32_t transitionCount, const VkHostImageLayoutTransitionInfo* pTransitions) { + Timer timer(CPUTimingCategory::VkDevice, "vkTransitionImageLayoutEXT"); + VkResult result = device_dispatch_table(device)->TransitionImageLayoutEXT(device, transitionCount, pTransitions); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout2EXT(VkDevice device, VkImage image, const VkImageSubresource2* pSubresource, VkSubresourceLayout2* pLayout) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetImageSubresourceLayout2EXT"); + device_dispatch_table(device)->GetImageSubresourceLayout2EXT(device, image, pSubresource, pLayout); +} +VKAPI_ATTR VkResult VKAPI_CALL vkReleaseSwapchainImagesEXT(VkDevice device, const VkReleaseSwapchainImagesInfoKHR* pReleaseInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkReleaseSwapchainImagesEXT"); + VkResult result = device_dispatch_table(device)->ReleaseSwapchainImagesEXT(device, pReleaseInfo); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkGetGeneratedCommandsMemoryRequirementsNV(VkDevice device, const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2* pMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetGeneratedCommandsMemoryRequirementsNV"); + device_dispatch_table(device)->GetGeneratedCommandsMemoryRequirementsNV(device, pInfo, pMemoryRequirements); +} +VKAPI_ATTR void VKAPI_CALL vkCmdPreprocessGeneratedCommandsNV(VkCommandBuffer commandBuffer, const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdPreprocessGeneratedCommandsNV"); + device_dispatch_table(commandBuffer)->CmdPreprocessGeneratedCommandsNV(commandBuffer, pGeneratedCommandsInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdExecuteGeneratedCommandsNV(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdExecuteGeneratedCommandsNV"); + device_dispatch_table(commandBuffer)->CmdExecuteGeneratedCommandsNV(commandBuffer, isPreprocessed, pGeneratedCommandsInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBindPipelineShaderGroupNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline, uint32_t groupIndex) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBindPipelineShaderGroupNV"); + device_dispatch_table(commandBuffer)->CmdBindPipelineShaderGroupNV(commandBuffer, pipelineBindPoint, pipeline, groupIndex); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateIndirectCommandsLayoutNV(VkDevice device, const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutNV* pIndirectCommandsLayout) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateIndirectCommandsLayoutNV"); + VkResult result = device_dispatch_table(device)->CreateIndirectCommandsLayoutNV(device, pCreateInfo, pAllocator, pIndirectCommandsLayout); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyIndirectCommandsLayoutNV(VkDevice device, VkIndirectCommandsLayoutNV indirectCommandsLayout, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyIndirectCommandsLayoutNV"); + device_dispatch_table(device)->DestroyIndirectCommandsLayoutNV(device, indirectCommandsLayout, pAllocator); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBias2EXT(VkCommandBuffer commandBuffer, const VkDepthBiasInfoEXT* pDepthBiasInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDepthBias2EXT"); + device_dispatch_table(commandBuffer)->CmdSetDepthBias2EXT(commandBuffer, pDepthBiasInfo); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreatePrivateDataSlotEXT(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreatePrivateDataSlotEXT"); + VkResult result = device_dispatch_table(device)->CreatePrivateDataSlotEXT(device, pCreateInfo, pAllocator, pPrivateDataSlot); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyPrivateDataSlotEXT(VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyPrivateDataSlotEXT"); + device_dispatch_table(device)->DestroyPrivateDataSlotEXT(device, privateDataSlot, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkSetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t data) { + Timer timer(CPUTimingCategory::VkDevice, "vkSetPrivateDataEXT"); + VkResult result = device_dispatch_table(device)->SetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, data); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkGetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t* pData) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetPrivateDataEXT"); + device_dispatch_table(device)->GetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, pData); +} +#if defined(VK_ENABLE_BETA_EXTENSIONS) +VKAPI_ATTR VkResult VKAPI_CALL vkCreateCudaModuleNV(VkDevice device, const VkCudaModuleCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCudaModuleNV* pModule) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateCudaModuleNV"); + VkResult result = device_dispatch_table(device)->CreateCudaModuleNV(device, pCreateInfo, pAllocator, pModule); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetCudaModuleCacheNV(VkDevice device, VkCudaModuleNV module, size_t* pCacheSize, void* pCacheData) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetCudaModuleCacheNV"); + VkResult result = device_dispatch_table(device)->GetCudaModuleCacheNV(device, module, pCacheSize, pCacheData); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateCudaFunctionNV(VkDevice device, const VkCudaFunctionCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCudaFunctionNV* pFunction) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateCudaFunctionNV"); + VkResult result = device_dispatch_table(device)->CreateCudaFunctionNV(device, pCreateInfo, pAllocator, pFunction); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyCudaModuleNV(VkDevice device, VkCudaModuleNV module, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyCudaModuleNV"); + device_dispatch_table(device)->DestroyCudaModuleNV(device, module, pAllocator); +} +VKAPI_ATTR void VKAPI_CALL vkDestroyCudaFunctionNV(VkDevice device, VkCudaFunctionNV function, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyCudaFunctionNV"); + device_dispatch_table(device)->DestroyCudaFunctionNV(device, function, pAllocator); +} +VKAPI_ATTR void VKAPI_CALL vkCmdCudaLaunchKernelNV(VkCommandBuffer commandBuffer, const VkCudaLaunchInfoNV* pLaunchInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCudaLaunchKernelNV"); + device_dispatch_table(commandBuffer)->CmdCudaLaunchKernelNV(commandBuffer, pLaunchInfo); +} +#endif // VK_ENABLE_BETA_EXTENSIONS +VKAPI_ATTR void VKAPI_CALL vkCmdDispatchTileQCOM(VkCommandBuffer commandBuffer, const VkDispatchTileInfoQCOM* pDispatchTileInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDispatchTileQCOM"); + device_dispatch_table(commandBuffer)->CmdDispatchTileQCOM(commandBuffer, pDispatchTileInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBeginPerTileExecutionQCOM(VkCommandBuffer commandBuffer, const VkPerTileBeginInfoQCOM* pPerTileBeginInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBeginPerTileExecutionQCOM"); + device_dispatch_table(commandBuffer)->CmdBeginPerTileExecutionQCOM(commandBuffer, pPerTileBeginInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdEndPerTileExecutionQCOM(VkCommandBuffer commandBuffer, const VkPerTileEndInfoQCOM* pPerTileEndInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdEndPerTileExecutionQCOM"); + device_dispatch_table(commandBuffer)->CmdEndPerTileExecutionQCOM(commandBuffer, pPerTileEndInfo); +} +#if defined(VK_USE_PLATFORM_METAL_EXT) +VKAPI_ATTR void VKAPI_CALL vkExportMetalObjectsEXT(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkExportMetalObjectsEXT"); + device_dispatch_table(device)->ExportMetalObjectsEXT(device, pMetalObjectsInfo); +} +#endif // VK_USE_PLATFORM_METAL_EXT +VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutSizeEXT(VkDevice device, VkDescriptorSetLayout layout, VkDeviceSize* pLayoutSizeInBytes) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDescriptorSetLayoutSizeEXT"); + device_dispatch_table(device)->GetDescriptorSetLayoutSizeEXT(device, layout, pLayoutSizeInBytes); +} +VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutBindingOffsetEXT(VkDevice device, VkDescriptorSetLayout layout, uint32_t binding, VkDeviceSize* pOffset) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDescriptorSetLayoutBindingOffsetEXT"); + device_dispatch_table(device)->GetDescriptorSetLayoutBindingOffsetEXT(device, layout, binding, pOffset); +} +VKAPI_ATTR void VKAPI_CALL vkGetDescriptorEXT(VkDevice device, const VkDescriptorGetInfoEXT* pDescriptorInfo, size_t dataSize, void* pDescriptor) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDescriptorEXT"); + device_dispatch_table(device)->GetDescriptorEXT(device, pDescriptorInfo, dataSize, pDescriptor); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorBuffersEXT(VkCommandBuffer commandBuffer, uint32_t bufferCount, const VkDescriptorBufferBindingInfoEXT* pBindingInfos) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBindDescriptorBuffersEXT"); + device_dispatch_table(commandBuffer)->CmdBindDescriptorBuffersEXT(commandBuffer, bufferCount, pBindingInfos); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDescriptorBufferOffsetsEXT(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, const uint32_t* pBufferIndices, const VkDeviceSize* pOffsets) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDescriptorBufferOffsetsEXT"); + device_dispatch_table(commandBuffer)->CmdSetDescriptorBufferOffsetsEXT(commandBuffer, pipelineBindPoint, layout, firstSet, setCount, pBufferIndices, pOffsets); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorBufferEmbeddedSamplersEXT(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBindDescriptorBufferEmbeddedSamplersEXT"); + device_dispatch_table(commandBuffer)->CmdBindDescriptorBufferEmbeddedSamplersEXT(commandBuffer, pipelineBindPoint, layout, set); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetBufferOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkBufferCaptureDescriptorDataInfoEXT* pInfo, void* pData) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetBufferOpaqueCaptureDescriptorDataEXT"); + VkResult result = device_dispatch_table(device)->GetBufferOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetImageOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkImageCaptureDescriptorDataInfoEXT* pInfo, void* pData) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetImageOpaqueCaptureDescriptorDataEXT"); + VkResult result = device_dispatch_table(device)->GetImageOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetImageViewOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkImageViewCaptureDescriptorDataInfoEXT* pInfo, void* pData) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetImageViewOpaqueCaptureDescriptorDataEXT"); + VkResult result = device_dispatch_table(device)->GetImageViewOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetSamplerOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkSamplerCaptureDescriptorDataInfoEXT* pInfo, void* pData) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetSamplerOpaqueCaptureDescriptorDataEXT"); + VkResult result = device_dispatch_table(device)->GetSamplerOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfo, void* pData) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT"); + VkResult result = device_dispatch_table(device)->GetAccelerationStructureOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetFragmentShadingRateEnumNV(VkCommandBuffer commandBuffer, VkFragmentShadingRateNV shadingRate, const VkFragmentShadingRateCombinerOpKHR combinerOps[2]) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetFragmentShadingRateEnumNV"); + device_dispatch_table(commandBuffer)->CmdSetFragmentShadingRateEnumNV(commandBuffer, shadingRate, combinerOps); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceFaultInfoEXT(VkDevice device, VkDeviceFaultCountsEXT* pFaultCounts, VkDeviceFaultInfoEXT* pFaultInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceFaultInfoEXT"); + VkResult result = device_dispatch_table(device)->GetDeviceFaultInfoEXT(device, pFaultCounts, pFaultInfo); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetVertexInputEXT(VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, uint32_t vertexAttributeDescriptionCount, const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetVertexInputEXT"); + device_dispatch_table(commandBuffer)->CmdSetVertexInputEXT(commandBuffer, vertexBindingDescriptionCount, pVertexBindingDescriptions, vertexAttributeDescriptionCount, pVertexAttributeDescriptions); +} +#if defined(VK_USE_PLATFORM_FUCHSIA) +VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryZirconHandleFUCHSIA(VkDevice device, const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetMemoryZirconHandleFUCHSIA"); + VkResult result = device_dispatch_table(device)->GetMemoryZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryZirconHandlePropertiesFUCHSIA(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetMemoryZirconHandlePropertiesFUCHSIA"); + VkResult result = device_dispatch_table(device)->GetMemoryZirconHandlePropertiesFUCHSIA(device, handleType, zirconHandle, pMemoryZirconHandleProperties); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreZirconHandleFUCHSIA(VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkImportSemaphoreZirconHandleFUCHSIA"); + VkResult result = device_dispatch_table(device)->ImportSemaphoreZirconHandleFUCHSIA(device, pImportSemaphoreZirconHandleInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreZirconHandleFUCHSIA(VkDevice device, const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetSemaphoreZirconHandleFUCHSIA"); + VkResult result = device_dispatch_table(device)->GetSemaphoreZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateBufferCollectionFUCHSIA(VkDevice device, const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferCollectionFUCHSIA* pCollection) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateBufferCollectionFUCHSIA"); + VkResult result = device_dispatch_table(device)->CreateBufferCollectionFUCHSIA(device, pCreateInfo, pAllocator, pCollection); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkSetBufferCollectionImageConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkSetBufferCollectionImageConstraintsFUCHSIA"); + VkResult result = device_dispatch_table(device)->SetBufferCollectionImageConstraintsFUCHSIA(device, collection, pImageConstraintsInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkSetBufferCollectionBufferConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkSetBufferCollectionBufferConstraintsFUCHSIA"); + VkResult result = device_dispatch_table(device)->SetBufferCollectionBufferConstraintsFUCHSIA(device, collection, pBufferConstraintsInfo); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyBufferCollectionFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyBufferCollectionFUCHSIA"); + device_dispatch_table(device)->DestroyBufferCollectionFUCHSIA(device, collection, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetBufferCollectionPropertiesFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, VkBufferCollectionPropertiesFUCHSIA* pProperties) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetBufferCollectionPropertiesFUCHSIA"); + VkResult result = device_dispatch_table(device)->GetBufferCollectionPropertiesFUCHSIA(device, collection, pProperties); + return result; +} +#endif // VK_USE_PLATFORM_FUCHSIA +VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(VkDevice device, VkRenderPass renderpass, VkExtent2D* pMaxWorkgroupSize) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI"); + VkResult result = device_dispatch_table(device)->GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(device, renderpass, pMaxWorkgroupSize); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdSubpassShadingHUAWEI(VkCommandBuffer commandBuffer) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSubpassShadingHUAWEI"); + device_dispatch_table(commandBuffer)->CmdSubpassShadingHUAWEI(commandBuffer); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBindInvocationMaskHUAWEI(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBindInvocationMaskHUAWEI"); + device_dispatch_table(commandBuffer)->CmdBindInvocationMaskHUAWEI(commandBuffer, imageView, imageLayout); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryRemoteAddressNV(VkDevice device, const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo, VkRemoteAddressNV* pAddress) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetMemoryRemoteAddressNV"); + VkResult result = device_dispatch_table(device)->GetMemoryRemoteAddressNV(device, pMemoryGetRemoteAddressInfo, pAddress); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelinePropertiesEXT(VkDevice device, const VkPipelineInfoEXT* pPipelineInfo, VkBaseOutStructure* pPipelineProperties) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetPipelinePropertiesEXT"); + VkResult result = device_dispatch_table(device)->GetPipelinePropertiesEXT(device, pPipelineInfo, pPipelineProperties); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetPatchControlPointsEXT(VkCommandBuffer commandBuffer, uint32_t patchControlPoints) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetPatchControlPointsEXT"); + device_dispatch_table(commandBuffer)->CmdSetPatchControlPointsEXT(commandBuffer, patchControlPoints); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetRasterizerDiscardEnableEXT(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetRasterizerDiscardEnableEXT"); + device_dispatch_table(commandBuffer)->CmdSetRasterizerDiscardEnableEXT(commandBuffer, rasterizerDiscardEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBiasEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDepthBiasEnableEXT"); + device_dispatch_table(commandBuffer)->CmdSetDepthBiasEnableEXT(commandBuffer, depthBiasEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetLogicOpEXT(VkCommandBuffer commandBuffer, VkLogicOp logicOp) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetLogicOpEXT"); + device_dispatch_table(commandBuffer)->CmdSetLogicOpEXT(commandBuffer, logicOp); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetPrimitiveRestartEnableEXT(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetPrimitiveRestartEnableEXT"); + device_dispatch_table(commandBuffer)->CmdSetPrimitiveRestartEnableEXT(commandBuffer, primitiveRestartEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetColorWriteEnableEXT(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkBool32* pColorWriteEnables) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetColorWriteEnableEXT"); + device_dispatch_table(commandBuffer)->CmdSetColorWriteEnableEXT(commandBuffer, attachmentCount, pColorWriteEnables); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDrawMultiEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawInfoEXT* pVertexInfo, uint32_t instanceCount, uint32_t firstInstance, uint32_t stride) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDrawMultiEXT"); + device_dispatch_table(commandBuffer)->CmdDrawMultiEXT(commandBuffer, drawCount, pVertexInfo, instanceCount, firstInstance, stride); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDrawMultiIndexedEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawIndexedInfoEXT* pIndexInfo, uint32_t instanceCount, uint32_t firstInstance, uint32_t stride, const int32_t* pVertexOffset) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDrawMultiIndexedEXT"); + device_dispatch_table(commandBuffer)->CmdDrawMultiIndexedEXT(commandBuffer, drawCount, pIndexInfo, instanceCount, firstInstance, stride, pVertexOffset); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateMicromapEXT(VkDevice device, const VkMicromapCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkMicromapEXT* pMicromap) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateMicromapEXT"); + VkResult result = device_dispatch_table(device)->CreateMicromapEXT(device, pCreateInfo, pAllocator, pMicromap); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyMicromapEXT(VkDevice device, VkMicromapEXT micromap, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyMicromapEXT"); + device_dispatch_table(device)->DestroyMicromapEXT(device, micromap, pAllocator); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBuildMicromapsEXT(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBuildMicromapsEXT"); + device_dispatch_table(commandBuffer)->CmdBuildMicromapsEXT(commandBuffer, infoCount, pInfos); +} +VKAPI_ATTR VkResult VKAPI_CALL vkBuildMicromapsEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos) { + Timer timer(CPUTimingCategory::VkDevice, "vkBuildMicromapsEXT"); + VkResult result = device_dispatch_table(device)->BuildMicromapsEXT(device, deferredOperation, infoCount, pInfos); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCopyMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapInfoEXT* pInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkCopyMicromapEXT"); + VkResult result = device_dispatch_table(device)->CopyMicromapEXT(device, deferredOperation, pInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCopyMicromapToMemoryEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapToMemoryInfoEXT* pInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkCopyMicromapToMemoryEXT"); + VkResult result = device_dispatch_table(device)->CopyMicromapToMemoryEXT(device, deferredOperation, pInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCopyMemoryToMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToMicromapInfoEXT* pInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkCopyMemoryToMicromapEXT"); + VkResult result = device_dispatch_table(device)->CopyMemoryToMicromapEXT(device, deferredOperation, pInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkWriteMicromapsPropertiesEXT(VkDevice device, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, VkQueryType queryType, size_t dataSize, void* pData, size_t stride) { + Timer timer(CPUTimingCategory::VkDevice, "vkWriteMicromapsPropertiesEXT"); + VkResult result = device_dispatch_table(device)->WriteMicromapsPropertiesEXT(device, micromapCount, pMicromaps, queryType, dataSize, pData, stride); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT* pInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyMicromapEXT"); + device_dispatch_table(commandBuffer)->CmdCopyMicromapEXT(commandBuffer, pInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyMicromapToMemoryEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT* pInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyMicromapToMemoryEXT"); + device_dispatch_table(commandBuffer)->CmdCopyMicromapToMemoryEXT(commandBuffer, pInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyMemoryToMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT* pInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyMemoryToMicromapEXT"); + device_dispatch_table(commandBuffer)->CmdCopyMemoryToMicromapEXT(commandBuffer, pInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdWriteMicromapsPropertiesEXT(VkCommandBuffer commandBuffer, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdWriteMicromapsPropertiesEXT"); + device_dispatch_table(commandBuffer)->CmdWriteMicromapsPropertiesEXT(commandBuffer, micromapCount, pMicromaps, queryType, queryPool, firstQuery); +} +VKAPI_ATTR void VKAPI_CALL vkGetDeviceMicromapCompatibilityEXT(VkDevice device, const VkMicromapVersionInfoEXT* pVersionInfo, VkAccelerationStructureCompatibilityKHR* pCompatibility) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceMicromapCompatibilityEXT"); + device_dispatch_table(device)->GetDeviceMicromapCompatibilityEXT(device, pVersionInfo, pCompatibility); +} +VKAPI_ATTR void VKAPI_CALL vkGetMicromapBuildSizesEXT(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, const VkMicromapBuildInfoEXT* pBuildInfo, VkMicromapBuildSizesInfoEXT* pSizeInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetMicromapBuildSizesEXT"); + device_dispatch_table(device)->GetMicromapBuildSizesEXT(device, buildType, pBuildInfo, pSizeInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDrawClusterHUAWEI(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDrawClusterHUAWEI"); + device_dispatch_table(commandBuffer)->CmdDrawClusterHUAWEI(commandBuffer, groupCountX, groupCountY, groupCountZ); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDrawClusterIndirectHUAWEI(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDrawClusterIndirectHUAWEI"); + device_dispatch_table(commandBuffer)->CmdDrawClusterIndirectHUAWEI(commandBuffer, buffer, offset); +} +VKAPI_ATTR void VKAPI_CALL vkSetDeviceMemoryPriorityEXT(VkDevice device, VkDeviceMemory memory, float priority) { + Timer timer(CPUTimingCategory::VkDevice, "vkSetDeviceMemoryPriorityEXT"); + device_dispatch_table(device)->SetDeviceMemoryPriorityEXT(device, memory, priority); +} +VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetLayoutHostMappingInfoVALVE(VkDevice device, const VkDescriptorSetBindingReferenceVALVE* pBindingReference, VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDescriptorSetLayoutHostMappingInfoVALVE"); + device_dispatch_table(device)->GetDescriptorSetLayoutHostMappingInfoVALVE(device, pBindingReference, pHostMapping); +} +VKAPI_ATTR void VKAPI_CALL vkGetDescriptorSetHostMappingVALVE(VkDevice device, VkDescriptorSet descriptorSet, void** ppData) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDescriptorSetHostMappingVALVE"); + device_dispatch_table(device)->GetDescriptorSetHostMappingVALVE(device, descriptorSet, ppData); +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyMemoryIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, uint32_t copyCount, uint32_t stride) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyMemoryIndirectNV"); + device_dispatch_table(commandBuffer)->CmdCopyMemoryIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride); +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyMemoryToImageIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, uint32_t copyCount, uint32_t stride, VkImage dstImage, VkImageLayout dstImageLayout, const VkImageSubresourceLayers* pImageSubresources) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyMemoryToImageIndirectNV"); + device_dispatch_table(commandBuffer)->CmdCopyMemoryToImageIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride, dstImage, dstImageLayout, pImageSubresources); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDecompressMemoryNV(VkCommandBuffer commandBuffer, uint32_t decompressRegionCount, const VkDecompressMemoryRegionNV* pDecompressMemoryRegions) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDecompressMemoryNV"); + device_dispatch_table(commandBuffer)->CmdDecompressMemoryNV(commandBuffer, decompressRegionCount, pDecompressMemoryRegions); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDecompressMemoryIndirectCountNV(VkCommandBuffer commandBuffer, VkDeviceAddress indirectCommandsAddress, VkDeviceAddress indirectCommandsCountAddress, uint32_t stride) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDecompressMemoryIndirectCountNV"); + device_dispatch_table(commandBuffer)->CmdDecompressMemoryIndirectCountNV(commandBuffer, indirectCommandsAddress, indirectCommandsCountAddress, stride); +} +VKAPI_ATTR void VKAPI_CALL vkGetPipelineIndirectMemoryRequirementsNV(VkDevice device, const VkComputePipelineCreateInfo* pCreateInfo, VkMemoryRequirements2* pMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetPipelineIndirectMemoryRequirementsNV"); + device_dispatch_table(device)->GetPipelineIndirectMemoryRequirementsNV(device, pCreateInfo, pMemoryRequirements); +} +VKAPI_ATTR void VKAPI_CALL vkCmdUpdatePipelineIndirectBufferNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdUpdatePipelineIndirectBufferNV"); + device_dispatch_table(commandBuffer)->CmdUpdatePipelineIndirectBufferNV(commandBuffer, pipelineBindPoint, pipeline); +} +VKAPI_ATTR VkDeviceAddress VKAPI_CALL vkGetPipelineIndirectDeviceAddressNV(VkDevice device, const VkPipelineIndirectDeviceAddressInfoNV* pInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetPipelineIndirectDeviceAddressNV"); + VkDeviceAddress result = device_dispatch_table(device)->GetPipelineIndirectDeviceAddressNV(device, pInfo); + return result; +} +#if defined(VK_USE_PLATFORM_OHOS) +VKAPI_ATTR VkResult VKAPI_CALL vkGetNativeBufferPropertiesOHOS(VkDevice device, const struct OH_NativeBuffer* buffer, VkNativeBufferPropertiesOHOS* pProperties) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetNativeBufferPropertiesOHOS"); + VkResult result = device_dispatch_table(device)->GetNativeBufferPropertiesOHOS(device, buffer, pProperties); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryNativeBufferOHOS(VkDevice device, const VkMemoryGetNativeBufferInfoOHOS* pInfo, struct OH_NativeBuffer** pBuffer) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetMemoryNativeBufferOHOS"); + VkResult result = device_dispatch_table(device)->GetMemoryNativeBufferOHOS(device, pInfo, pBuffer); + return result; +} +#endif // VK_USE_PLATFORM_OHOS +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthClampEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClampEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDepthClampEnableEXT"); + device_dispatch_table(commandBuffer)->CmdSetDepthClampEnableEXT(commandBuffer, depthClampEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetPolygonModeEXT(VkCommandBuffer commandBuffer, VkPolygonMode polygonMode) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetPolygonModeEXT"); + device_dispatch_table(commandBuffer)->CmdSetPolygonModeEXT(commandBuffer, polygonMode); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetRasterizationSamplesEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits rasterizationSamples) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetRasterizationSamplesEXT"); + device_dispatch_table(commandBuffer)->CmdSetRasterizationSamplesEXT(commandBuffer, rasterizationSamples); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetSampleMaskEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits samples, const VkSampleMask* pSampleMask) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetSampleMaskEXT"); + device_dispatch_table(commandBuffer)->CmdSetSampleMaskEXT(commandBuffer, samples, pSampleMask); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetAlphaToCoverageEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToCoverageEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetAlphaToCoverageEnableEXT"); + device_dispatch_table(commandBuffer)->CmdSetAlphaToCoverageEnableEXT(commandBuffer, alphaToCoverageEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetAlphaToOneEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToOneEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetAlphaToOneEnableEXT"); + device_dispatch_table(commandBuffer)->CmdSetAlphaToOneEnableEXT(commandBuffer, alphaToOneEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetLogicOpEnableEXT(VkCommandBuffer commandBuffer, VkBool32 logicOpEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetLogicOpEnableEXT"); + device_dispatch_table(commandBuffer)->CmdSetLogicOpEnableEXT(commandBuffer, logicOpEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetColorBlendEnableEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkBool32* pColorBlendEnables) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetColorBlendEnableEXT"); + device_dispatch_table(commandBuffer)->CmdSetColorBlendEnableEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendEnables); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetColorBlendEquationEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorBlendEquationEXT* pColorBlendEquations) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetColorBlendEquationEXT"); + device_dispatch_table(commandBuffer)->CmdSetColorBlendEquationEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendEquations); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetColorWriteMaskEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorComponentFlags* pColorWriteMasks) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetColorWriteMaskEXT"); + device_dispatch_table(commandBuffer)->CmdSetColorWriteMaskEXT(commandBuffer, firstAttachment, attachmentCount, pColorWriteMasks); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetTessellationDomainOriginEXT(VkCommandBuffer commandBuffer, VkTessellationDomainOrigin domainOrigin) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetTessellationDomainOriginEXT"); + device_dispatch_table(commandBuffer)->CmdSetTessellationDomainOriginEXT(commandBuffer, domainOrigin); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetRasterizationStreamEXT(VkCommandBuffer commandBuffer, uint32_t rasterizationStream) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetRasterizationStreamEXT"); + device_dispatch_table(commandBuffer)->CmdSetRasterizationStreamEXT(commandBuffer, rasterizationStream); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetConservativeRasterizationModeEXT(VkCommandBuffer commandBuffer, VkConservativeRasterizationModeEXT conservativeRasterizationMode) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetConservativeRasterizationModeEXT"); + device_dispatch_table(commandBuffer)->CmdSetConservativeRasterizationModeEXT(commandBuffer, conservativeRasterizationMode); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetExtraPrimitiveOverestimationSizeEXT(VkCommandBuffer commandBuffer, float extraPrimitiveOverestimationSize) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetExtraPrimitiveOverestimationSizeEXT"); + device_dispatch_table(commandBuffer)->CmdSetExtraPrimitiveOverestimationSizeEXT(commandBuffer, extraPrimitiveOverestimationSize); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthClipEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClipEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDepthClipEnableEXT"); + device_dispatch_table(commandBuffer)->CmdSetDepthClipEnableEXT(commandBuffer, depthClipEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetSampleLocationsEnableEXT(VkCommandBuffer commandBuffer, VkBool32 sampleLocationsEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetSampleLocationsEnableEXT"); + device_dispatch_table(commandBuffer)->CmdSetSampleLocationsEnableEXT(commandBuffer, sampleLocationsEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetColorBlendAdvancedEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorBlendAdvancedEXT* pColorBlendAdvanced) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetColorBlendAdvancedEXT"); + device_dispatch_table(commandBuffer)->CmdSetColorBlendAdvancedEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendAdvanced); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetProvokingVertexModeEXT(VkCommandBuffer commandBuffer, VkProvokingVertexModeEXT provokingVertexMode) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetProvokingVertexModeEXT"); + device_dispatch_table(commandBuffer)->CmdSetProvokingVertexModeEXT(commandBuffer, provokingVertexMode); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetLineRasterizationModeEXT(VkCommandBuffer commandBuffer, VkLineRasterizationModeEXT lineRasterizationMode) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetLineRasterizationModeEXT"); + device_dispatch_table(commandBuffer)->CmdSetLineRasterizationModeEXT(commandBuffer, lineRasterizationMode); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetLineStippleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stippledLineEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetLineStippleEnableEXT"); + device_dispatch_table(commandBuffer)->CmdSetLineStippleEnableEXT(commandBuffer, stippledLineEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthClipNegativeOneToOneEXT(VkCommandBuffer commandBuffer, VkBool32 negativeOneToOne) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDepthClipNegativeOneToOneEXT"); + device_dispatch_table(commandBuffer)->CmdSetDepthClipNegativeOneToOneEXT(commandBuffer, negativeOneToOne); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportWScalingEnableNV(VkCommandBuffer commandBuffer, VkBool32 viewportWScalingEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetViewportWScalingEnableNV"); + device_dispatch_table(commandBuffer)->CmdSetViewportWScalingEnableNV(commandBuffer, viewportWScalingEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportSwizzleNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportSwizzleNV* pViewportSwizzles) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetViewportSwizzleNV"); + device_dispatch_table(commandBuffer)->CmdSetViewportSwizzleNV(commandBuffer, firstViewport, viewportCount, pViewportSwizzles); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetCoverageToColorEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageToColorEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetCoverageToColorEnableNV"); + device_dispatch_table(commandBuffer)->CmdSetCoverageToColorEnableNV(commandBuffer, coverageToColorEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetCoverageToColorLocationNV(VkCommandBuffer commandBuffer, uint32_t coverageToColorLocation) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetCoverageToColorLocationNV"); + device_dispatch_table(commandBuffer)->CmdSetCoverageToColorLocationNV(commandBuffer, coverageToColorLocation); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetCoverageModulationModeNV(VkCommandBuffer commandBuffer, VkCoverageModulationModeNV coverageModulationMode) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetCoverageModulationModeNV"); + device_dispatch_table(commandBuffer)->CmdSetCoverageModulationModeNV(commandBuffer, coverageModulationMode); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetCoverageModulationTableEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageModulationTableEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetCoverageModulationTableEnableNV"); + device_dispatch_table(commandBuffer)->CmdSetCoverageModulationTableEnableNV(commandBuffer, coverageModulationTableEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetCoverageModulationTableNV(VkCommandBuffer commandBuffer, uint32_t coverageModulationTableCount, const float* pCoverageModulationTable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetCoverageModulationTableNV"); + device_dispatch_table(commandBuffer)->CmdSetCoverageModulationTableNV(commandBuffer, coverageModulationTableCount, pCoverageModulationTable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetShadingRateImageEnableNV(VkCommandBuffer commandBuffer, VkBool32 shadingRateImageEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetShadingRateImageEnableNV"); + device_dispatch_table(commandBuffer)->CmdSetShadingRateImageEnableNV(commandBuffer, shadingRateImageEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetRepresentativeFragmentTestEnableNV(VkCommandBuffer commandBuffer, VkBool32 representativeFragmentTestEnable) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetRepresentativeFragmentTestEnableNV"); + device_dispatch_table(commandBuffer)->CmdSetRepresentativeFragmentTestEnableNV(commandBuffer, representativeFragmentTestEnable); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetCoverageReductionModeNV(VkCommandBuffer commandBuffer, VkCoverageReductionModeNV coverageReductionMode) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetCoverageReductionModeNV"); + device_dispatch_table(commandBuffer)->CmdSetCoverageReductionModeNV(commandBuffer, coverageReductionMode); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateTensorARM(VkDevice device, const VkTensorCreateInfoARM* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkTensorARM* pTensor) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateTensorARM"); + VkResult result = device_dispatch_table(device)->CreateTensorARM(device, pCreateInfo, pAllocator, pTensor); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyTensorARM(VkDevice device, VkTensorARM tensor, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyTensorARM"); + device_dispatch_table(device)->DestroyTensorARM(device, tensor, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateTensorViewARM(VkDevice device, const VkTensorViewCreateInfoARM* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkTensorViewARM* pView) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateTensorViewARM"); + VkResult result = device_dispatch_table(device)->CreateTensorViewARM(device, pCreateInfo, pAllocator, pView); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyTensorViewARM(VkDevice device, VkTensorViewARM tensorView, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyTensorViewARM"); + device_dispatch_table(device)->DestroyTensorViewARM(device, tensorView, pAllocator); +} +VKAPI_ATTR void VKAPI_CALL vkGetTensorMemoryRequirementsARM(VkDevice device, const VkTensorMemoryRequirementsInfoARM* pInfo, VkMemoryRequirements2* pMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetTensorMemoryRequirementsARM"); + device_dispatch_table(device)->GetTensorMemoryRequirementsARM(device, pInfo, pMemoryRequirements); +} +VKAPI_ATTR VkResult VKAPI_CALL vkBindTensorMemoryARM(VkDevice device, uint32_t bindInfoCount, const VkBindTensorMemoryInfoARM* pBindInfos) { + Timer timer(CPUTimingCategory::VkDevice, "vkBindTensorMemoryARM"); + VkResult result = device_dispatch_table(device)->BindTensorMemoryARM(device, bindInfoCount, pBindInfos); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkGetDeviceTensorMemoryRequirementsARM(VkDevice device, const VkDeviceTensorMemoryRequirementsARM* pInfo, VkMemoryRequirements2* pMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceTensorMemoryRequirementsARM"); + device_dispatch_table(device)->GetDeviceTensorMemoryRequirementsARM(device, pInfo, pMemoryRequirements); +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyTensorARM(VkCommandBuffer commandBuffer, const VkCopyTensorInfoARM* pCopyTensorInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyTensorARM"); + device_dispatch_table(commandBuffer)->CmdCopyTensorARM(commandBuffer, pCopyTensorInfo); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetTensorOpaqueCaptureDescriptorDataARM(VkDevice device, const VkTensorCaptureDescriptorDataInfoARM* pInfo, void* pData) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetTensorOpaqueCaptureDescriptorDataARM"); + VkResult result = device_dispatch_table(device)->GetTensorOpaqueCaptureDescriptorDataARM(device, pInfo, pData); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetTensorViewOpaqueCaptureDescriptorDataARM(VkDevice device, const VkTensorViewCaptureDescriptorDataInfoARM* pInfo, void* pData) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetTensorViewOpaqueCaptureDescriptorDataARM"); + VkResult result = device_dispatch_table(device)->GetTensorViewOpaqueCaptureDescriptorDataARM(device, pInfo, pData); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkGetShaderModuleIdentifierEXT(VkDevice device, VkShaderModule shaderModule, VkShaderModuleIdentifierEXT* pIdentifier) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetShaderModuleIdentifierEXT"); + device_dispatch_table(device)->GetShaderModuleIdentifierEXT(device, shaderModule, pIdentifier); +} +VKAPI_ATTR void VKAPI_CALL vkGetShaderModuleCreateInfoIdentifierEXT(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, VkShaderModuleIdentifierEXT* pIdentifier) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetShaderModuleCreateInfoIdentifierEXT"); + device_dispatch_table(device)->GetShaderModuleCreateInfoIdentifierEXT(device, pCreateInfo, pIdentifier); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateOpticalFlowSessionNV(VkDevice device, const VkOpticalFlowSessionCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkOpticalFlowSessionNV* pSession) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateOpticalFlowSessionNV"); + VkResult result = device_dispatch_table(device)->CreateOpticalFlowSessionNV(device, pCreateInfo, pAllocator, pSession); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyOpticalFlowSessionNV(VkDevice device, VkOpticalFlowSessionNV session, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyOpticalFlowSessionNV"); + device_dispatch_table(device)->DestroyOpticalFlowSessionNV(device, session, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkBindOpticalFlowSessionImageNV(VkDevice device, VkOpticalFlowSessionNV session, VkOpticalFlowSessionBindingPointNV bindingPoint, VkImageView view, VkImageLayout layout) { + Timer timer(CPUTimingCategory::VkDevice, "vkBindOpticalFlowSessionImageNV"); + VkResult result = device_dispatch_table(device)->BindOpticalFlowSessionImageNV(device, session, bindingPoint, view, layout); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdOpticalFlowExecuteNV(VkCommandBuffer commandBuffer, VkOpticalFlowSessionNV session, const VkOpticalFlowExecuteInfoNV* pExecuteInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdOpticalFlowExecuteNV"); + device_dispatch_table(commandBuffer)->CmdOpticalFlowExecuteNV(commandBuffer, session, pExecuteInfo); +} +VKAPI_ATTR void VKAPI_CALL vkAntiLagUpdateAMD(VkDevice device, const VkAntiLagDataAMD* pData) { + Timer timer(CPUTimingCategory::VkDevice, "vkAntiLagUpdateAMD"); + device_dispatch_table(device)->AntiLagUpdateAMD(device, pData); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateShadersEXT(VkDevice device, uint32_t createInfoCount, const VkShaderCreateInfoEXT* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkShaderEXT* pShaders) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateShadersEXT"); + VkResult result = device_dispatch_table(device)->CreateShadersEXT(device, createInfoCount, pCreateInfos, pAllocator, pShaders); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyShaderEXT(VkDevice device, VkShaderEXT shader, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyShaderEXT"); + device_dispatch_table(device)->DestroyShaderEXT(device, shader, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetShaderBinaryDataEXT(VkDevice device, VkShaderEXT shader, size_t* pDataSize, void* pData) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetShaderBinaryDataEXT"); + VkResult result = device_dispatch_table(device)->GetShaderBinaryDataEXT(device, shader, pDataSize, pData); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdBindShadersEXT(VkCommandBuffer commandBuffer, uint32_t stageCount, const VkShaderStageFlagBits* pStages, const VkShaderEXT* pShaders) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBindShadersEXT"); + device_dispatch_table(commandBuffer)->CmdBindShadersEXT(commandBuffer, stageCount, pStages, pShaders); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthClampRangeEXT(VkCommandBuffer commandBuffer, VkDepthClampModeEXT depthClampMode, const VkDepthClampRangeEXT* pDepthClampRange) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetDepthClampRangeEXT"); + device_dispatch_table(commandBuffer)->CmdSetDepthClampRangeEXT(commandBuffer, depthClampMode, pDepthClampRange); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetFramebufferTilePropertiesQCOM(VkDevice device, VkFramebuffer framebuffer, uint32_t* pPropertiesCount, VkTilePropertiesQCOM* pProperties) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetFramebufferTilePropertiesQCOM"); + VkResult result = device_dispatch_table(device)->GetFramebufferTilePropertiesQCOM(device, framebuffer, pPropertiesCount, pProperties); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetDynamicRenderingTilePropertiesQCOM(VkDevice device, const VkRenderingInfo* pRenderingInfo, VkTilePropertiesQCOM* pProperties) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDynamicRenderingTilePropertiesQCOM"); + VkResult result = device_dispatch_table(device)->GetDynamicRenderingTilePropertiesQCOM(device, pRenderingInfo, pProperties); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkConvertCooperativeVectorMatrixNV(VkDevice device, const VkConvertCooperativeVectorMatrixInfoNV* pInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkConvertCooperativeVectorMatrixNV"); + VkResult result = device_dispatch_table(device)->ConvertCooperativeVectorMatrixNV(device, pInfo); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdConvertCooperativeVectorMatrixNV(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkConvertCooperativeVectorMatrixInfoNV* pInfos) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdConvertCooperativeVectorMatrixNV"); + device_dispatch_table(commandBuffer)->CmdConvertCooperativeVectorMatrixNV(commandBuffer, infoCount, pInfos); +} +VKAPI_ATTR VkResult VKAPI_CALL vkSetLatencySleepModeNV(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepModeInfoNV* pSleepModeInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkSetLatencySleepModeNV"); + VkResult result = device_dispatch_table(device)->SetLatencySleepModeNV(device, swapchain, pSleepModeInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkLatencySleepNV(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepInfoNV* pSleepInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkLatencySleepNV"); + VkResult result = device_dispatch_table(device)->LatencySleepNV(device, swapchain, pSleepInfo); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkSetLatencyMarkerNV(VkDevice device, VkSwapchainKHR swapchain, const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkSetLatencyMarkerNV"); + device_dispatch_table(device)->SetLatencyMarkerNV(device, swapchain, pLatencyMarkerInfo); +} +VKAPI_ATTR void VKAPI_CALL vkGetLatencyTimingsNV(VkDevice device, VkSwapchainKHR swapchain, VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetLatencyTimingsNV"); + device_dispatch_table(device)->GetLatencyTimingsNV(device, swapchain, pLatencyMarkerInfo); +} +VKAPI_ATTR void VKAPI_CALL vkQueueNotifyOutOfBandNV(VkQueue queue, const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo) { + Timer timer(CPUTimingCategory::VkQueue, "vkQueueNotifyOutOfBandNV"); + device_dispatch_table(queue)->QueueNotifyOutOfBandNV(queue, pQueueTypeInfo); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateDataGraphPipelinesARM(VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkDataGraphPipelineCreateInfoARM* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateDataGraphPipelinesARM"); + VkResult result = device_dispatch_table(device)->CreateDataGraphPipelinesARM(device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateDataGraphPipelineSessionARM(VkDevice device, const VkDataGraphPipelineSessionCreateInfoARM* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDataGraphPipelineSessionARM* pSession) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateDataGraphPipelineSessionARM"); + VkResult result = device_dispatch_table(device)->CreateDataGraphPipelineSessionARM(device, pCreateInfo, pAllocator, pSession); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetDataGraphPipelineSessionBindPointRequirementsARM(VkDevice device, const VkDataGraphPipelineSessionBindPointRequirementsInfoARM* pInfo, uint32_t* pBindPointRequirementCount, VkDataGraphPipelineSessionBindPointRequirementARM* pBindPointRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDataGraphPipelineSessionBindPointRequirementsARM"); + VkResult result = device_dispatch_table(device)->GetDataGraphPipelineSessionBindPointRequirementsARM(device, pInfo, pBindPointRequirementCount, pBindPointRequirements); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkGetDataGraphPipelineSessionMemoryRequirementsARM(VkDevice device, const VkDataGraphPipelineSessionMemoryRequirementsInfoARM* pInfo, VkMemoryRequirements2* pMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDataGraphPipelineSessionMemoryRequirementsARM"); + device_dispatch_table(device)->GetDataGraphPipelineSessionMemoryRequirementsARM(device, pInfo, pMemoryRequirements); +} +VKAPI_ATTR VkResult VKAPI_CALL vkBindDataGraphPipelineSessionMemoryARM(VkDevice device, uint32_t bindInfoCount, const VkBindDataGraphPipelineSessionMemoryInfoARM* pBindInfos) { + Timer timer(CPUTimingCategory::VkDevice, "vkBindDataGraphPipelineSessionMemoryARM"); + VkResult result = device_dispatch_table(device)->BindDataGraphPipelineSessionMemoryARM(device, bindInfoCount, pBindInfos); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyDataGraphPipelineSessionARM(VkDevice device, VkDataGraphPipelineSessionARM session, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyDataGraphPipelineSessionARM"); + device_dispatch_table(device)->DestroyDataGraphPipelineSessionARM(device, session, pAllocator); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDispatchDataGraphARM(VkCommandBuffer commandBuffer, VkDataGraphPipelineSessionARM session, const VkDataGraphPipelineDispatchInfoARM* pInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDispatchDataGraphARM"); + device_dispatch_table(commandBuffer)->CmdDispatchDataGraphARM(commandBuffer, session, pInfo); +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetDataGraphPipelineAvailablePropertiesARM(VkDevice device, const VkDataGraphPipelineInfoARM* pPipelineInfo, uint32_t* pPropertiesCount, VkDataGraphPipelinePropertyARM* pProperties) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDataGraphPipelineAvailablePropertiesARM"); + VkResult result = device_dispatch_table(device)->GetDataGraphPipelineAvailablePropertiesARM(device, pPipelineInfo, pPropertiesCount, pProperties); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetDataGraphPipelinePropertiesARM(VkDevice device, const VkDataGraphPipelineInfoARM* pPipelineInfo, uint32_t propertiesCount, VkDataGraphPipelinePropertyQueryResultARM* pProperties) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDataGraphPipelinePropertiesARM"); + VkResult result = device_dispatch_table(device)->GetDataGraphPipelinePropertiesARM(device, pPipelineInfo, propertiesCount, pProperties); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetAttachmentFeedbackLoopEnableEXT(VkCommandBuffer commandBuffer, VkImageAspectFlags aspectMask) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetAttachmentFeedbackLoopEnableEXT"); + device_dispatch_table(commandBuffer)->CmdSetAttachmentFeedbackLoopEnableEXT(commandBuffer, aspectMask); +} +#if defined(VK_USE_PLATFORM_SCREEN_QNX) +VKAPI_ATTR VkResult VKAPI_CALL vkGetScreenBufferPropertiesQNX(VkDevice device, const struct _screen_buffer* buffer, VkScreenBufferPropertiesQNX* pProperties) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetScreenBufferPropertiesQNX"); + VkResult result = device_dispatch_table(device)->GetScreenBufferPropertiesQNX(device, buffer, pProperties); + return result; +} +#endif // VK_USE_PLATFORM_SCREEN_QNX +VKAPI_ATTR void VKAPI_CALL vkCmdBindTileMemoryQCOM(VkCommandBuffer commandBuffer, const VkTileMemoryBindInfoQCOM* pTileMemoryBindInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBindTileMemoryQCOM"); + device_dispatch_table(commandBuffer)->CmdBindTileMemoryQCOM(commandBuffer, pTileMemoryBindInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDecompressMemoryEXT(VkCommandBuffer commandBuffer, const VkDecompressMemoryInfoEXT* pDecompressMemoryInfoEXT) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDecompressMemoryEXT"); + device_dispatch_table(commandBuffer)->CmdDecompressMemoryEXT(commandBuffer, pDecompressMemoryInfoEXT); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDecompressMemoryIndirectCountEXT(VkCommandBuffer commandBuffer, VkMemoryDecompressionMethodFlagsEXT decompressionMethod, VkDeviceAddress indirectCommandsAddress, VkDeviceAddress indirectCommandsCountAddress, uint32_t maxDecompressionCount, uint32_t stride) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDecompressMemoryIndirectCountEXT"); + device_dispatch_table(commandBuffer)->CmdDecompressMemoryIndirectCountEXT(commandBuffer, decompressionMethod, indirectCommandsAddress, indirectCommandsCountAddress, maxDecompressionCount, stride); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateExternalComputeQueueNV(VkDevice device, const VkExternalComputeQueueCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkExternalComputeQueueNV* pExternalQueue) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateExternalComputeQueueNV"); + VkResult result = device_dispatch_table(device)->CreateExternalComputeQueueNV(device, pCreateInfo, pAllocator, pExternalQueue); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyExternalComputeQueueNV(VkDevice device, VkExternalComputeQueueNV externalQueue, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyExternalComputeQueueNV"); + device_dispatch_table(device)->DestroyExternalComputeQueueNV(device, externalQueue, pAllocator); +} +VKAPI_ATTR void VKAPI_CALL vkGetExternalComputeQueueDataNV(VkExternalComputeQueueNV externalQueue, VkExternalComputeQueueDataParamsNV* params, void* pData) { + Timer timer(CPUTimingCategory::Other, "vkGetExternalComputeQueueDataNV"); + device_dispatch_table(externalQueue)->GetExternalComputeQueueDataNV(externalQueue, params, pData); +} +VKAPI_ATTR void VKAPI_CALL vkGetClusterAccelerationStructureBuildSizesNV(VkDevice device, const VkClusterAccelerationStructureInputInfoNV* pInfo, VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetClusterAccelerationStructureBuildSizesNV"); + device_dispatch_table(device)->GetClusterAccelerationStructureBuildSizesNV(device, pInfo, pSizeInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBuildClusterAccelerationStructureIndirectNV(VkCommandBuffer commandBuffer, const VkClusterAccelerationStructureCommandsInfoNV* pCommandInfos) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBuildClusterAccelerationStructureIndirectNV"); + device_dispatch_table(commandBuffer)->CmdBuildClusterAccelerationStructureIndirectNV(commandBuffer, pCommandInfos); +} +VKAPI_ATTR void VKAPI_CALL vkGetPartitionedAccelerationStructuresBuildSizesNV(VkDevice device, const VkPartitionedAccelerationStructureInstancesInputNV* pInfo, VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetPartitionedAccelerationStructuresBuildSizesNV"); + device_dispatch_table(device)->GetPartitionedAccelerationStructuresBuildSizesNV(device, pInfo, pSizeInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBuildPartitionedAccelerationStructuresNV(VkCommandBuffer commandBuffer, const VkBuildPartitionedAccelerationStructureInfoNV* pBuildInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBuildPartitionedAccelerationStructuresNV"); + device_dispatch_table(commandBuffer)->CmdBuildPartitionedAccelerationStructuresNV(commandBuffer, pBuildInfo); +} +VKAPI_ATTR void VKAPI_CALL vkGetGeneratedCommandsMemoryRequirementsEXT(VkDevice device, const VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfo, VkMemoryRequirements2* pMemoryRequirements) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetGeneratedCommandsMemoryRequirementsEXT"); + device_dispatch_table(device)->GetGeneratedCommandsMemoryRequirementsEXT(device, pInfo, pMemoryRequirements); +} +VKAPI_ATTR void VKAPI_CALL vkCmdPreprocessGeneratedCommandsEXT(VkCommandBuffer commandBuffer, const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, VkCommandBuffer stateCommandBuffer) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdPreprocessGeneratedCommandsEXT"); + device_dispatch_table(commandBuffer)->CmdPreprocessGeneratedCommandsEXT(commandBuffer, pGeneratedCommandsInfo, stateCommandBuffer); +} +VKAPI_ATTR void VKAPI_CALL vkCmdExecuteGeneratedCommandsEXT(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdExecuteGeneratedCommandsEXT"); + device_dispatch_table(commandBuffer)->CmdExecuteGeneratedCommandsEXT(commandBuffer, isPreprocessed, pGeneratedCommandsInfo); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateIndirectCommandsLayoutEXT(VkDevice device, const VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutEXT* pIndirectCommandsLayout) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateIndirectCommandsLayoutEXT"); + VkResult result = device_dispatch_table(device)->CreateIndirectCommandsLayoutEXT(device, pCreateInfo, pAllocator, pIndirectCommandsLayout); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyIndirectCommandsLayoutEXT(VkDevice device, VkIndirectCommandsLayoutEXT indirectCommandsLayout, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyIndirectCommandsLayoutEXT"); + device_dispatch_table(device)->DestroyIndirectCommandsLayoutEXT(device, indirectCommandsLayout, pAllocator); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateIndirectExecutionSetEXT(VkDevice device, const VkIndirectExecutionSetCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectExecutionSetEXT* pIndirectExecutionSet) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateIndirectExecutionSetEXT"); + VkResult result = device_dispatch_table(device)->CreateIndirectExecutionSetEXT(device, pCreateInfo, pAllocator, pIndirectExecutionSet); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyIndirectExecutionSetEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyIndirectExecutionSetEXT"); + device_dispatch_table(device)->DestroyIndirectExecutionSetEXT(device, indirectExecutionSet, pAllocator); +} +VKAPI_ATTR void VKAPI_CALL vkUpdateIndirectExecutionSetPipelineEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, uint32_t executionSetWriteCount, const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites) { + Timer timer(CPUTimingCategory::VkDevice, "vkUpdateIndirectExecutionSetPipelineEXT"); + device_dispatch_table(device)->UpdateIndirectExecutionSetPipelineEXT(device, indirectExecutionSet, executionSetWriteCount, pExecutionSetWrites); +} +VKAPI_ATTR void VKAPI_CALL vkUpdateIndirectExecutionSetShaderEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, uint32_t executionSetWriteCount, const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites) { + Timer timer(CPUTimingCategory::VkDevice, "vkUpdateIndirectExecutionSetShaderEXT"); + device_dispatch_table(device)->UpdateIndirectExecutionSetShaderEXT(device, indirectExecutionSet, executionSetWriteCount, pExecutionSetWrites); +} +#if defined(VK_USE_PLATFORM_METAL_EXT) +VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryMetalHandleEXT(VkDevice device, const VkMemoryGetMetalHandleInfoEXT* pGetMetalHandleInfo, void** pHandle) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetMemoryMetalHandleEXT"); + VkResult result = device_dispatch_table(device)->GetMemoryMetalHandleEXT(device, pGetMetalHandleInfo, pHandle); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryMetalHandlePropertiesEXT(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void* pHandle, VkMemoryMetalHandlePropertiesEXT* pMemoryMetalHandleProperties) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetMemoryMetalHandlePropertiesEXT"); + VkResult result = device_dispatch_table(device)->GetMemoryMetalHandlePropertiesEXT(device, handleType, pHandle, pMemoryMetalHandleProperties); + return result; +} +#endif // VK_USE_PLATFORM_METAL_EXT +VKAPI_ATTR void VKAPI_CALL vkCmdEndRendering2EXT(VkCommandBuffer commandBuffer, const VkRenderingEndInfoKHR* pRenderingEndInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdEndRendering2EXT"); + device_dispatch_table(commandBuffer)->CmdEndRendering2EXT(commandBuffer, pRenderingEndInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBeginCustomResolveEXT(VkCommandBuffer commandBuffer, const VkBeginCustomResolveInfoEXT* pBeginCustomResolveInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBeginCustomResolveEXT"); + device_dispatch_table(commandBuffer)->CmdBeginCustomResolveEXT(commandBuffer, pBeginCustomResolveInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetComputeOccupancyPriorityNV(VkCommandBuffer commandBuffer, const VkComputeOccupancyPriorityParametersNV* pParameters) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetComputeOccupancyPriorityNV"); + device_dispatch_table(commandBuffer)->CmdSetComputeOccupancyPriorityNV(commandBuffer, pParameters); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateAccelerationStructureKHR(VkDevice device, const VkAccelerationStructureCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkAccelerationStructureKHR* pAccelerationStructure) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateAccelerationStructureKHR"); + VkResult result = device_dispatch_table(device)->CreateAccelerationStructureKHR(device, pCreateInfo, pAllocator, pAccelerationStructure); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkDestroyAccelerationStructureKHR(VkDevice device, VkAccelerationStructureKHR accelerationStructure, const VkAllocationCallbacks* pAllocator) { + Timer timer(CPUTimingCategory::VkDevice, "vkDestroyAccelerationStructureKHR"); + device_dispatch_table(device)->DestroyAccelerationStructureKHR(device, accelerationStructure, pAllocator); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBuildAccelerationStructuresKHR(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBuildAccelerationStructuresKHR"); + device_dispatch_table(commandBuffer)->CmdBuildAccelerationStructuresKHR(commandBuffer, infoCount, pInfos, ppBuildRangeInfos); +} +VKAPI_ATTR void VKAPI_CALL vkCmdBuildAccelerationStructuresIndirectKHR(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkDeviceAddress* pIndirectDeviceAddresses, const uint32_t* pIndirectStrides, const uint32_t* const* ppMaxPrimitiveCounts) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdBuildAccelerationStructuresIndirectKHR"); + device_dispatch_table(commandBuffer)->CmdBuildAccelerationStructuresIndirectKHR(commandBuffer, infoCount, pInfos, pIndirectDeviceAddresses, pIndirectStrides, ppMaxPrimitiveCounts); +} +VKAPI_ATTR VkResult VKAPI_CALL vkBuildAccelerationStructuresKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos) { + Timer timer(CPUTimingCategory::VkDevice, "vkBuildAccelerationStructuresKHR"); + VkResult result = device_dispatch_table(device)->BuildAccelerationStructuresKHR(device, deferredOperation, infoCount, pInfos, ppBuildRangeInfos); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCopyAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyAccelerationStructureInfoKHR* pInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkCopyAccelerationStructureKHR"); + VkResult result = device_dispatch_table(device)->CopyAccelerationStructureKHR(device, deferredOperation, pInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCopyAccelerationStructureToMemoryKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkCopyAccelerationStructureToMemoryKHR"); + VkResult result = device_dispatch_table(device)->CopyAccelerationStructureToMemoryKHR(device, deferredOperation, pInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkCopyMemoryToAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkCopyMemoryToAccelerationStructureKHR"); + VkResult result = device_dispatch_table(device)->CopyMemoryToAccelerationStructureKHR(device, deferredOperation, pInfo); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkWriteAccelerationStructuresPropertiesKHR(VkDevice device, uint32_t accelerationStructureCount, const VkAccelerationStructureKHR* pAccelerationStructures, VkQueryType queryType, size_t dataSize, void* pData, size_t stride) { + Timer timer(CPUTimingCategory::VkDevice, "vkWriteAccelerationStructuresPropertiesKHR"); + VkResult result = device_dispatch_table(device)->WriteAccelerationStructuresPropertiesKHR(device, accelerationStructureCount, pAccelerationStructures, queryType, dataSize, pData, stride); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyAccelerationStructureKHR(VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureInfoKHR* pInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyAccelerationStructureKHR"); + device_dispatch_table(commandBuffer)->CmdCopyAccelerationStructureKHR(commandBuffer, pInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyAccelerationStructureToMemoryKHR(VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyAccelerationStructureToMemoryKHR"); + device_dispatch_table(commandBuffer)->CmdCopyAccelerationStructureToMemoryKHR(commandBuffer, pInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdCopyMemoryToAccelerationStructureKHR(VkCommandBuffer commandBuffer, const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdCopyMemoryToAccelerationStructureKHR"); + device_dispatch_table(commandBuffer)->CmdCopyMemoryToAccelerationStructureKHR(commandBuffer, pInfo); +} +VKAPI_ATTR VkDeviceAddress VKAPI_CALL vkGetAccelerationStructureDeviceAddressKHR(VkDevice device, const VkAccelerationStructureDeviceAddressInfoKHR* pInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetAccelerationStructureDeviceAddressKHR"); + VkDeviceAddress result = device_dispatch_table(device)->GetAccelerationStructureDeviceAddressKHR(device, pInfo); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdWriteAccelerationStructuresPropertiesKHR(VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, const VkAccelerationStructureKHR* pAccelerationStructures, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdWriteAccelerationStructuresPropertiesKHR"); + device_dispatch_table(commandBuffer)->CmdWriteAccelerationStructuresPropertiesKHR(commandBuffer, accelerationStructureCount, pAccelerationStructures, queryType, queryPool, firstQuery); +} +VKAPI_ATTR void VKAPI_CALL vkGetDeviceAccelerationStructureCompatibilityKHR(VkDevice device, const VkAccelerationStructureVersionInfoKHR* pVersionInfo, VkAccelerationStructureCompatibilityKHR* pCompatibility) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetDeviceAccelerationStructureCompatibilityKHR"); + device_dispatch_table(device)->GetDeviceAccelerationStructureCompatibilityKHR(device, pVersionInfo, pCompatibility); +} +VKAPI_ATTR void VKAPI_CALL vkGetAccelerationStructureBuildSizesKHR(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo, const uint32_t* pMaxPrimitiveCounts, VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetAccelerationStructureBuildSizesKHR"); + device_dispatch_table(device)->GetAccelerationStructureBuildSizesKHR(device, buildType, pBuildInfo, pMaxPrimitiveCounts, pSizeInfo); +} +VKAPI_ATTR void VKAPI_CALL vkCmdTraceRaysKHR(VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, uint32_t width, uint32_t height, uint32_t depth) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdTraceRaysKHR"); + device_dispatch_table(commandBuffer)->CmdTraceRaysKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, pHitShaderBindingTable, pCallableShaderBindingTable, width, height, depth); +} +VKAPI_ATTR VkResult VKAPI_CALL vkCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { + Timer timer(CPUTimingCategory::VkDevice, "vkCreateRayTracingPipelinesKHR"); + VkResult result = device_dispatch_table(device)->CreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); + return result; +} +VKAPI_ATTR VkResult VKAPI_CALL vkGetRayTracingCaptureReplayShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR"); + VkResult result = device_dispatch_table(device)->GetRayTracingCaptureReplayShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, dataSize, pData); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, VkDeviceAddress indirectDeviceAddress) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdTraceRaysIndirectKHR"); + device_dispatch_table(commandBuffer)->CmdTraceRaysIndirectKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, pHitShaderBindingTable, pCallableShaderBindingTable, indirectDeviceAddress); +} +VKAPI_ATTR VkDeviceSize VKAPI_CALL vkGetRayTracingShaderGroupStackSizeKHR(VkDevice device, VkPipeline pipeline, uint32_t group, VkShaderGroupShaderKHR groupShader) { + Timer timer(CPUTimingCategory::VkDevice, "vkGetRayTracingShaderGroupStackSizeKHR"); + VkDeviceSize result = device_dispatch_table(device)->GetRayTracingShaderGroupStackSizeKHR(device, pipeline, group, groupShader); + return result; +} +VKAPI_ATTR void VKAPI_CALL vkCmdSetRayTracingPipelineStackSizeKHR(VkCommandBuffer commandBuffer, uint32_t pipelineStackSize) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdSetRayTracingPipelineStackSizeKHR"); + device_dispatch_table(commandBuffer)->CmdSetRayTracingPipelineStackSizeKHR(commandBuffer, pipelineStackSize); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDrawMeshTasksEXT(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDrawMeshTasksEXT"); + device_dispatch_table(commandBuffer)->CmdDrawMeshTasksEXT(commandBuffer, groupCountX, groupCountY, groupCountZ); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDrawMeshTasksIndirectEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDrawMeshTasksIndirectEXT"); + device_dispatch_table(commandBuffer)->CmdDrawMeshTasksIndirectEXT(commandBuffer, buffer, offset, drawCount, stride); +} +VKAPI_ATTR void VKAPI_CALL vkCmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) { + Timer timer(CPUTimingCategory::VkCommandBuffer, "vkCmdDrawMeshTasksIndirectCountEXT"); + device_dispatch_table(commandBuffer)->CmdDrawMeshTasksIndirectCountEXT(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); +} +VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL cputiming_known_instance_functions(VkInstance instance, const char* pName) { + if (strcmp(pName, "vkCreateInstance") == 0) + return reinterpret_cast(vkCreateInstance); + if (strcmp(pName, "vkDestroyInstance") == 0) + return reinterpret_cast(vkDestroyInstance); + if (strcmp(pName, "vkEnumeratePhysicalDevices") == 0) + return reinterpret_cast(vkEnumeratePhysicalDevices); + if (strcmp(pName, "vkGetPhysicalDeviceFeatures") == 0) + return reinterpret_cast(vkGetPhysicalDeviceFeatures); + if (strcmp(pName, "vkGetPhysicalDeviceFormatProperties") == 0) + return reinterpret_cast(vkGetPhysicalDeviceFormatProperties); + if (strcmp(pName, "vkGetPhysicalDeviceImageFormatProperties") == 0) + return reinterpret_cast(vkGetPhysicalDeviceImageFormatProperties); + if (strcmp(pName, "vkGetPhysicalDeviceProperties") == 0) + return reinterpret_cast(vkGetPhysicalDeviceProperties); + if (strcmp(pName, "vkGetPhysicalDeviceQueueFamilyProperties") == 0) + return reinterpret_cast(vkGetPhysicalDeviceQueueFamilyProperties); + if (strcmp(pName, "vkGetPhysicalDeviceMemoryProperties") == 0) + return reinterpret_cast(vkGetPhysicalDeviceMemoryProperties); + if (strcmp(pName, "vkGetInstanceProcAddr") == 0) + return reinterpret_cast(vkGetInstanceProcAddr); + if (strcmp(pName, "vkCreateDevice") == 0) + return reinterpret_cast(vkCreateDevice); + if (strcmp(pName, "vkEnumerateInstanceExtensionProperties") == 0) + return reinterpret_cast(vkEnumerateInstanceExtensionProperties); + if (strcmp(pName, "vkEnumerateInstanceLayerProperties") == 0) + return reinterpret_cast(vkEnumerateInstanceLayerProperties); + if (strcmp(pName, "vkEnumerateDeviceLayerProperties") == 0) + return reinterpret_cast(vkEnumerateDeviceLayerProperties); + if (strcmp(pName, "vkGetPhysicalDeviceSparseImageFormatProperties") == 0) + return reinterpret_cast(vkGetPhysicalDeviceSparseImageFormatProperties); + if (strcmp(pName, "vkEnumeratePhysicalDeviceGroups") == 0) + return reinterpret_cast(vkEnumeratePhysicalDeviceGroups); + if (strcmp(pName, "vkGetPhysicalDeviceFeatures2") == 0) + return reinterpret_cast(vkGetPhysicalDeviceFeatures2); + if (strcmp(pName, "vkGetPhysicalDeviceProperties2") == 0) + return reinterpret_cast(vkGetPhysicalDeviceProperties2); + if (strcmp(pName, "vkGetPhysicalDeviceFormatProperties2") == 0) + return reinterpret_cast(vkGetPhysicalDeviceFormatProperties2); + if (strcmp(pName, "vkGetPhysicalDeviceImageFormatProperties2") == 0) + return reinterpret_cast(vkGetPhysicalDeviceImageFormatProperties2); + if (strcmp(pName, "vkGetPhysicalDeviceQueueFamilyProperties2") == 0) + return reinterpret_cast(vkGetPhysicalDeviceQueueFamilyProperties2); + if (strcmp(pName, "vkGetPhysicalDeviceMemoryProperties2") == 0) + return reinterpret_cast(vkGetPhysicalDeviceMemoryProperties2); + if (strcmp(pName, "vkGetPhysicalDeviceSparseImageFormatProperties2") == 0) + return reinterpret_cast(vkGetPhysicalDeviceSparseImageFormatProperties2); + if (strcmp(pName, "vkGetPhysicalDeviceExternalBufferProperties") == 0) + return reinterpret_cast(vkGetPhysicalDeviceExternalBufferProperties); + if (strcmp(pName, "vkGetPhysicalDeviceExternalFenceProperties") == 0) + return reinterpret_cast(vkGetPhysicalDeviceExternalFenceProperties); + if (strcmp(pName, "vkGetPhysicalDeviceExternalSemaphoreProperties") == 0) + return reinterpret_cast(vkGetPhysicalDeviceExternalSemaphoreProperties); + if (strcmp(pName, "vkGetPhysicalDeviceToolProperties") == 0) + return reinterpret_cast(vkGetPhysicalDeviceToolProperties); + if (strcmp(pName, "vkDestroySurfaceKHR") == 0) + return reinterpret_cast(vkDestroySurfaceKHR); + if (strcmp(pName, "vkGetPhysicalDeviceSurfaceSupportKHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceSurfaceSupportKHR); + if (strcmp(pName, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceSurfaceCapabilitiesKHR); + if (strcmp(pName, "vkGetPhysicalDeviceSurfaceFormatsKHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceSurfaceFormatsKHR); + if (strcmp(pName, "vkGetPhysicalDeviceSurfacePresentModesKHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceSurfacePresentModesKHR); + if (strcmp(pName, "vkGetPhysicalDevicePresentRectanglesKHR") == 0) + return reinterpret_cast(vkGetPhysicalDevicePresentRectanglesKHR); + if (strcmp(pName, "vkGetPhysicalDeviceDisplayPropertiesKHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceDisplayPropertiesKHR); + if (strcmp(pName, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceDisplayPlanePropertiesKHR); + if (strcmp(pName, "vkGetDisplayPlaneSupportedDisplaysKHR") == 0) + return reinterpret_cast(vkGetDisplayPlaneSupportedDisplaysKHR); + if (strcmp(pName, "vkGetDisplayModePropertiesKHR") == 0) + return reinterpret_cast(vkGetDisplayModePropertiesKHR); + if (strcmp(pName, "vkCreateDisplayModeKHR") == 0) + return reinterpret_cast(vkCreateDisplayModeKHR); + if (strcmp(pName, "vkGetDisplayPlaneCapabilitiesKHR") == 0) + return reinterpret_cast(vkGetDisplayPlaneCapabilitiesKHR); + if (strcmp(pName, "vkCreateDisplayPlaneSurfaceKHR") == 0) + return reinterpret_cast(vkCreateDisplayPlaneSurfaceKHR); +#if defined(VK_USE_PLATFORM_XLIB_KHR) + if (strcmp(pName, "vkCreateXlibSurfaceKHR") == 0) + return reinterpret_cast(vkCreateXlibSurfaceKHR); + if (strcmp(pName, "vkGetPhysicalDeviceXlibPresentationSupportKHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceXlibPresentationSupportKHR); +#endif // VK_USE_PLATFORM_XLIB_KHR +#if defined(VK_USE_PLATFORM_XCB_KHR) + if (strcmp(pName, "vkCreateXcbSurfaceKHR") == 0) + return reinterpret_cast(vkCreateXcbSurfaceKHR); + if (strcmp(pName, "vkGetPhysicalDeviceXcbPresentationSupportKHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceXcbPresentationSupportKHR); +#endif // VK_USE_PLATFORM_XCB_KHR +#if defined(VK_USE_PLATFORM_WAYLAND_KHR) + if (strcmp(pName, "vkCreateWaylandSurfaceKHR") == 0) + return reinterpret_cast(vkCreateWaylandSurfaceKHR); + if (strcmp(pName, "vkGetPhysicalDeviceWaylandPresentationSupportKHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceWaylandPresentationSupportKHR); +#endif // VK_USE_PLATFORM_WAYLAND_KHR +#if defined(VK_USE_PLATFORM_ANDROID_KHR) + if (strcmp(pName, "vkCreateAndroidSurfaceKHR") == 0) + return reinterpret_cast(vkCreateAndroidSurfaceKHR); +#endif // VK_USE_PLATFORM_ANDROID_KHR +#if defined(VK_USE_PLATFORM_WIN32_KHR) + if (strcmp(pName, "vkCreateWin32SurfaceKHR") == 0) + return reinterpret_cast(vkCreateWin32SurfaceKHR); + if (strcmp(pName, "vkGetPhysicalDeviceWin32PresentationSupportKHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceWin32PresentationSupportKHR); +#endif // VK_USE_PLATFORM_WIN32_KHR + if (strcmp(pName, "vkGetPhysicalDeviceVideoCapabilitiesKHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceVideoCapabilitiesKHR); + if (strcmp(pName, "vkGetPhysicalDeviceVideoFormatPropertiesKHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceVideoFormatPropertiesKHR); + if (strcmp(pName, "vkGetPhysicalDeviceFeatures2KHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceFeatures2KHR); + if (strcmp(pName, "vkGetPhysicalDeviceProperties2KHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceProperties2KHR); + if (strcmp(pName, "vkGetPhysicalDeviceFormatProperties2KHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceFormatProperties2KHR); + if (strcmp(pName, "vkGetPhysicalDeviceImageFormatProperties2KHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceImageFormatProperties2KHR); + if (strcmp(pName, "vkGetPhysicalDeviceQueueFamilyProperties2KHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceQueueFamilyProperties2KHR); + if (strcmp(pName, "vkGetPhysicalDeviceMemoryProperties2KHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceMemoryProperties2KHR); + if (strcmp(pName, "vkGetPhysicalDeviceSparseImageFormatProperties2KHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceSparseImageFormatProperties2KHR); + if (strcmp(pName, "vkEnumeratePhysicalDeviceGroupsKHR") == 0) + return reinterpret_cast(vkEnumeratePhysicalDeviceGroupsKHR); + if (strcmp(pName, "vkGetPhysicalDeviceExternalBufferPropertiesKHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceExternalBufferPropertiesKHR); + if (strcmp(pName, "vkGetPhysicalDeviceExternalSemaphorePropertiesKHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceExternalSemaphorePropertiesKHR); + if (strcmp(pName, "vkGetPhysicalDeviceExternalFencePropertiesKHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceExternalFencePropertiesKHR); + if (strcmp(pName, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR") == 0) + return reinterpret_cast(vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR); + if (strcmp(pName, "vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR); + if (strcmp(pName, "vkGetPhysicalDeviceSurfaceCapabilities2KHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceSurfaceCapabilities2KHR); + if (strcmp(pName, "vkGetPhysicalDeviceSurfaceFormats2KHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceSurfaceFormats2KHR); + if (strcmp(pName, "vkGetPhysicalDeviceDisplayProperties2KHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceDisplayProperties2KHR); + if (strcmp(pName, "vkGetPhysicalDeviceDisplayPlaneProperties2KHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceDisplayPlaneProperties2KHR); + if (strcmp(pName, "vkGetDisplayModeProperties2KHR") == 0) + return reinterpret_cast(vkGetDisplayModeProperties2KHR); + if (strcmp(pName, "vkGetDisplayPlaneCapabilities2KHR") == 0) + return reinterpret_cast(vkGetDisplayPlaneCapabilities2KHR); + if (strcmp(pName, "vkGetPhysicalDeviceFragmentShadingRatesKHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceFragmentShadingRatesKHR); + if (strcmp(pName, "vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR); + if (strcmp(pName, "vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR); + if (strcmp(pName, "vkGetPhysicalDeviceCalibrateableTimeDomainsKHR") == 0) + return reinterpret_cast(vkGetPhysicalDeviceCalibrateableTimeDomainsKHR); + if (strcmp(pName, "vkCreateDebugReportCallbackEXT") == 0) + return reinterpret_cast(vkCreateDebugReportCallbackEXT); + if (strcmp(pName, "vkDestroyDebugReportCallbackEXT") == 0) + return reinterpret_cast(vkDestroyDebugReportCallbackEXT); + if (strcmp(pName, "vkDebugReportMessageEXT") == 0) + return reinterpret_cast(vkDebugReportMessageEXT); +#if defined(VK_USE_PLATFORM_GGP) + if (strcmp(pName, "vkCreateStreamDescriptorSurfaceGGP") == 0) + return reinterpret_cast(vkCreateStreamDescriptorSurfaceGGP); +#endif // VK_USE_PLATFORM_GGP + if (strcmp(pName, "vkGetPhysicalDeviceExternalImageFormatPropertiesNV") == 0) + return reinterpret_cast(vkGetPhysicalDeviceExternalImageFormatPropertiesNV); +#if defined(VK_USE_PLATFORM_VI_NN) + if (strcmp(pName, "vkCreateViSurfaceNN") == 0) + return reinterpret_cast(vkCreateViSurfaceNN); +#endif // VK_USE_PLATFORM_VI_NN + if (strcmp(pName, "vkReleaseDisplayEXT") == 0) + return reinterpret_cast(vkReleaseDisplayEXT); +#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT) + if (strcmp(pName, "vkAcquireXlibDisplayEXT") == 0) + return reinterpret_cast(vkAcquireXlibDisplayEXT); + if (strcmp(pName, "vkGetRandROutputDisplayEXT") == 0) + return reinterpret_cast(vkGetRandROutputDisplayEXT); +#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT + if (strcmp(pName, "vkGetPhysicalDeviceSurfaceCapabilities2EXT") == 0) + return reinterpret_cast(vkGetPhysicalDeviceSurfaceCapabilities2EXT); +#if defined(VK_USE_PLATFORM_IOS_MVK) + if (strcmp(pName, "vkCreateIOSSurfaceMVK") == 0) + return reinterpret_cast(vkCreateIOSSurfaceMVK); +#endif // VK_USE_PLATFORM_IOS_MVK +#if defined(VK_USE_PLATFORM_MACOS_MVK) + if (strcmp(pName, "vkCreateMacOSSurfaceMVK") == 0) + return reinterpret_cast(vkCreateMacOSSurfaceMVK); +#endif // VK_USE_PLATFORM_MACOS_MVK + if (strcmp(pName, "vkSetDebugUtilsObjectNameEXT") == 0) + return reinterpret_cast(vkSetDebugUtilsObjectNameEXT); + if (strcmp(pName, "vkSetDebugUtilsObjectTagEXT") == 0) + return reinterpret_cast(vkSetDebugUtilsObjectTagEXT); + if (strcmp(pName, "vkQueueBeginDebugUtilsLabelEXT") == 0) + return reinterpret_cast(vkQueueBeginDebugUtilsLabelEXT); + if (strcmp(pName, "vkQueueEndDebugUtilsLabelEXT") == 0) + return reinterpret_cast(vkQueueEndDebugUtilsLabelEXT); + if (strcmp(pName, "vkQueueInsertDebugUtilsLabelEXT") == 0) + return reinterpret_cast(vkQueueInsertDebugUtilsLabelEXT); + if (strcmp(pName, "vkCmdBeginDebugUtilsLabelEXT") == 0) + return reinterpret_cast(vkCmdBeginDebugUtilsLabelEXT); + if (strcmp(pName, "vkCmdEndDebugUtilsLabelEXT") == 0) + return reinterpret_cast(vkCmdEndDebugUtilsLabelEXT); + if (strcmp(pName, "vkCmdInsertDebugUtilsLabelEXT") == 0) + return reinterpret_cast(vkCmdInsertDebugUtilsLabelEXT); + if (strcmp(pName, "vkCreateDebugUtilsMessengerEXT") == 0) + return reinterpret_cast(vkCreateDebugUtilsMessengerEXT); + if (strcmp(pName, "vkDestroyDebugUtilsMessengerEXT") == 0) + return reinterpret_cast(vkDestroyDebugUtilsMessengerEXT); + if (strcmp(pName, "vkSubmitDebugUtilsMessageEXT") == 0) + return reinterpret_cast(vkSubmitDebugUtilsMessageEXT); + if (strcmp(pName, "vkGetPhysicalDeviceDescriptorSizeEXT") == 0) + return reinterpret_cast(vkGetPhysicalDeviceDescriptorSizeEXT); + if (strcmp(pName, "vkGetPhysicalDeviceMultisamplePropertiesEXT") == 0) + return reinterpret_cast(vkGetPhysicalDeviceMultisamplePropertiesEXT); + if (strcmp(pName, "vkGetPhysicalDeviceCalibrateableTimeDomainsEXT") == 0) + return reinterpret_cast(vkGetPhysicalDeviceCalibrateableTimeDomainsEXT); +#if defined(VK_USE_PLATFORM_FUCHSIA) + if (strcmp(pName, "vkCreateImagePipeSurfaceFUCHSIA") == 0) + return reinterpret_cast(vkCreateImagePipeSurfaceFUCHSIA); +#endif // VK_USE_PLATFORM_FUCHSIA +#if defined(VK_USE_PLATFORM_METAL_EXT) + if (strcmp(pName, "vkCreateMetalSurfaceEXT") == 0) + return reinterpret_cast(vkCreateMetalSurfaceEXT); +#endif // VK_USE_PLATFORM_METAL_EXT + if (strcmp(pName, "vkGetPhysicalDeviceToolPropertiesEXT") == 0) + return reinterpret_cast(vkGetPhysicalDeviceToolPropertiesEXT); + if (strcmp(pName, "vkGetPhysicalDeviceCooperativeMatrixPropertiesNV") == 0) + return reinterpret_cast(vkGetPhysicalDeviceCooperativeMatrixPropertiesNV); + if (strcmp(pName, "vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV") == 0) + return reinterpret_cast(vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV); +#if defined(VK_USE_PLATFORM_WIN32_KHR) + if (strcmp(pName, "vkGetPhysicalDeviceSurfacePresentModes2EXT") == 0) + return reinterpret_cast(vkGetPhysicalDeviceSurfacePresentModes2EXT); +#endif // VK_USE_PLATFORM_WIN32_KHR + if (strcmp(pName, "vkCreateHeadlessSurfaceEXT") == 0) + return reinterpret_cast(vkCreateHeadlessSurfaceEXT); + if (strcmp(pName, "vkAcquireDrmDisplayEXT") == 0) + return reinterpret_cast(vkAcquireDrmDisplayEXT); + if (strcmp(pName, "vkGetDrmDisplayEXT") == 0) + return reinterpret_cast(vkGetDrmDisplayEXT); +#if defined(VK_USE_PLATFORM_WIN32_KHR) + if (strcmp(pName, "vkAcquireWinrtDisplayNV") == 0) + return reinterpret_cast(vkAcquireWinrtDisplayNV); + if (strcmp(pName, "vkGetWinrtDisplayNV") == 0) + return reinterpret_cast(vkGetWinrtDisplayNV); +#endif // VK_USE_PLATFORM_WIN32_KHR +#if defined(VK_USE_PLATFORM_DIRECTFB_EXT) + if (strcmp(pName, "vkCreateDirectFBSurfaceEXT") == 0) + return reinterpret_cast(vkCreateDirectFBSurfaceEXT); + if (strcmp(pName, "vkGetPhysicalDeviceDirectFBPresentationSupportEXT") == 0) + return reinterpret_cast(vkGetPhysicalDeviceDirectFBPresentationSupportEXT); +#endif // VK_USE_PLATFORM_DIRECTFB_EXT +#if defined(VK_USE_PLATFORM_SCREEN_QNX) + if (strcmp(pName, "vkCreateScreenSurfaceQNX") == 0) + return reinterpret_cast(vkCreateScreenSurfaceQNX); + if (strcmp(pName, "vkGetPhysicalDeviceScreenPresentationSupportQNX") == 0) + return reinterpret_cast(vkGetPhysicalDeviceScreenPresentationSupportQNX); +#endif // VK_USE_PLATFORM_SCREEN_QNX + if (strcmp(pName, "vkGetPhysicalDeviceExternalTensorPropertiesARM") == 0) + return reinterpret_cast(vkGetPhysicalDeviceExternalTensorPropertiesARM); + if (strcmp(pName, "vkGetPhysicalDeviceOpticalFlowImageFormatsNV") == 0) + return reinterpret_cast(vkGetPhysicalDeviceOpticalFlowImageFormatsNV); + if (strcmp(pName, "vkGetPhysicalDeviceCooperativeVectorPropertiesNV") == 0) + return reinterpret_cast(vkGetPhysicalDeviceCooperativeVectorPropertiesNV); + if (strcmp(pName, "vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM") == 0) + return reinterpret_cast(vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM); + if (strcmp(pName, "vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM") == 0) + return reinterpret_cast(vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM); +#if defined(VK_USE_PLATFORM_OHOS) + if (strcmp(pName, "vkCreateSurfaceOHOS") == 0) + return reinterpret_cast(vkCreateSurfaceOHOS); +#endif // VK_USE_PLATFORM_OHOS + if (strcmp(pName, "vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV") == 0) + return reinterpret_cast(vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV); + if (strcmp(pName, "vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM") == 0) + return reinterpret_cast(vkEnumeratePhysicalDeviceQueueFamilyPerformanceCountersByRegionARM); + + return nullptr; +} +VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL cputiming_known_device_functions(VkDevice device, const char* pName) { + if (strcmp(pName, "vkGetDeviceProcAddr") == 0 && (!device || device_dispatch_table(device)->GetDeviceProcAddr)) + return reinterpret_cast(vkGetDeviceProcAddr); + if (strcmp(pName, "vkDestroyDevice") == 0 && (!device || device_dispatch_table(device)->DestroyDevice)) + return reinterpret_cast(vkDestroyDevice); + if (strcmp(pName, "vkGetDeviceQueue") == 0 && (!device || device_dispatch_table(device)->GetDeviceQueue)) + return reinterpret_cast(vkGetDeviceQueue); + if (strcmp(pName, "vkQueueSubmit") == 0 && (!device || device_dispatch_table(device)->QueueSubmit)) + return reinterpret_cast(vkQueueSubmit); + if (strcmp(pName, "vkQueueWaitIdle") == 0 && (!device || device_dispatch_table(device)->QueueWaitIdle)) + return reinterpret_cast(vkQueueWaitIdle); + if (strcmp(pName, "vkDeviceWaitIdle") == 0 && (!device || device_dispatch_table(device)->DeviceWaitIdle)) + return reinterpret_cast(vkDeviceWaitIdle); + if (strcmp(pName, "vkAllocateMemory") == 0 && (!device || device_dispatch_table(device)->AllocateMemory)) + return reinterpret_cast(vkAllocateMemory); + if (strcmp(pName, "vkFreeMemory") == 0 && (!device || device_dispatch_table(device)->FreeMemory)) + return reinterpret_cast(vkFreeMemory); + if (strcmp(pName, "vkMapMemory") == 0 && (!device || device_dispatch_table(device)->MapMemory)) + return reinterpret_cast(vkMapMemory); + if (strcmp(pName, "vkUnmapMemory") == 0 && (!device || device_dispatch_table(device)->UnmapMemory)) + return reinterpret_cast(vkUnmapMemory); + if (strcmp(pName, "vkFlushMappedMemoryRanges") == 0 && (!device || device_dispatch_table(device)->FlushMappedMemoryRanges)) + return reinterpret_cast(vkFlushMappedMemoryRanges); + if (strcmp(pName, "vkInvalidateMappedMemoryRanges") == 0 && (!device || device_dispatch_table(device)->InvalidateMappedMemoryRanges)) + return reinterpret_cast(vkInvalidateMappedMemoryRanges); + if (strcmp(pName, "vkGetDeviceMemoryCommitment") == 0 && (!device || device_dispatch_table(device)->GetDeviceMemoryCommitment)) + return reinterpret_cast(vkGetDeviceMemoryCommitment); + if (strcmp(pName, "vkBindBufferMemory") == 0 && (!device || device_dispatch_table(device)->BindBufferMemory)) + return reinterpret_cast(vkBindBufferMemory); + if (strcmp(pName, "vkBindImageMemory") == 0 && (!device || device_dispatch_table(device)->BindImageMemory)) + return reinterpret_cast(vkBindImageMemory); + if (strcmp(pName, "vkGetBufferMemoryRequirements") == 0 && (!device || device_dispatch_table(device)->GetBufferMemoryRequirements)) + return reinterpret_cast(vkGetBufferMemoryRequirements); + if (strcmp(pName, "vkGetImageMemoryRequirements") == 0 && (!device || device_dispatch_table(device)->GetImageMemoryRequirements)) + return reinterpret_cast(vkGetImageMemoryRequirements); + if (strcmp(pName, "vkGetImageSparseMemoryRequirements") == 0 && (!device || device_dispatch_table(device)->GetImageSparseMemoryRequirements)) + return reinterpret_cast(vkGetImageSparseMemoryRequirements); + if (strcmp(pName, "vkQueueBindSparse") == 0 && (!device || device_dispatch_table(device)->QueueBindSparse)) + return reinterpret_cast(vkQueueBindSparse); + if (strcmp(pName, "vkCreateFence") == 0 && (!device || device_dispatch_table(device)->CreateFence)) + return reinterpret_cast(vkCreateFence); + if (strcmp(pName, "vkDestroyFence") == 0 && (!device || device_dispatch_table(device)->DestroyFence)) + return reinterpret_cast(vkDestroyFence); + if (strcmp(pName, "vkResetFences") == 0 && (!device || device_dispatch_table(device)->ResetFences)) + return reinterpret_cast(vkResetFences); + if (strcmp(pName, "vkGetFenceStatus") == 0 && (!device || device_dispatch_table(device)->GetFenceStatus)) + return reinterpret_cast(vkGetFenceStatus); + if (strcmp(pName, "vkWaitForFences") == 0 && (!device || device_dispatch_table(device)->WaitForFences)) + return reinterpret_cast(vkWaitForFences); + if (strcmp(pName, "vkCreateSemaphore") == 0 && (!device || device_dispatch_table(device)->CreateSemaphore)) + return reinterpret_cast(vkCreateSemaphore); + if (strcmp(pName, "vkDestroySemaphore") == 0 && (!device || device_dispatch_table(device)->DestroySemaphore)) + return reinterpret_cast(vkDestroySemaphore); + if (strcmp(pName, "vkCreateQueryPool") == 0 && (!device || device_dispatch_table(device)->CreateQueryPool)) + return reinterpret_cast(vkCreateQueryPool); + if (strcmp(pName, "vkDestroyQueryPool") == 0 && (!device || device_dispatch_table(device)->DestroyQueryPool)) + return reinterpret_cast(vkDestroyQueryPool); + if (strcmp(pName, "vkGetQueryPoolResults") == 0 && (!device || device_dispatch_table(device)->GetQueryPoolResults)) + return reinterpret_cast(vkGetQueryPoolResults); + if (strcmp(pName, "vkCreateBuffer") == 0 && (!device || device_dispatch_table(device)->CreateBuffer)) + return reinterpret_cast(vkCreateBuffer); + if (strcmp(pName, "vkDestroyBuffer") == 0 && (!device || device_dispatch_table(device)->DestroyBuffer)) + return reinterpret_cast(vkDestroyBuffer); + if (strcmp(pName, "vkCreateImage") == 0 && (!device || device_dispatch_table(device)->CreateImage)) + return reinterpret_cast(vkCreateImage); + if (strcmp(pName, "vkDestroyImage") == 0 && (!device || device_dispatch_table(device)->DestroyImage)) + return reinterpret_cast(vkDestroyImage); + if (strcmp(pName, "vkGetImageSubresourceLayout") == 0 && (!device || device_dispatch_table(device)->GetImageSubresourceLayout)) + return reinterpret_cast(vkGetImageSubresourceLayout); + if (strcmp(pName, "vkCreateImageView") == 0 && (!device || device_dispatch_table(device)->CreateImageView)) + return reinterpret_cast(vkCreateImageView); + if (strcmp(pName, "vkDestroyImageView") == 0 && (!device || device_dispatch_table(device)->DestroyImageView)) + return reinterpret_cast(vkDestroyImageView); + if (strcmp(pName, "vkCreateCommandPool") == 0 && (!device || device_dispatch_table(device)->CreateCommandPool)) + return reinterpret_cast(vkCreateCommandPool); + if (strcmp(pName, "vkDestroyCommandPool") == 0 && (!device || device_dispatch_table(device)->DestroyCommandPool)) + return reinterpret_cast(vkDestroyCommandPool); + if (strcmp(pName, "vkResetCommandPool") == 0 && (!device || device_dispatch_table(device)->ResetCommandPool)) + return reinterpret_cast(vkResetCommandPool); + if (strcmp(pName, "vkAllocateCommandBuffers") == 0 && (!device || device_dispatch_table(device)->AllocateCommandBuffers)) + return reinterpret_cast(vkAllocateCommandBuffers); + if (strcmp(pName, "vkFreeCommandBuffers") == 0 && (!device || device_dispatch_table(device)->FreeCommandBuffers)) + return reinterpret_cast(vkFreeCommandBuffers); + if (strcmp(pName, "vkBeginCommandBuffer") == 0 && (!device || device_dispatch_table(device)->BeginCommandBuffer)) + return reinterpret_cast(vkBeginCommandBuffer); + if (strcmp(pName, "vkEndCommandBuffer") == 0 && (!device || device_dispatch_table(device)->EndCommandBuffer)) + return reinterpret_cast(vkEndCommandBuffer); + if (strcmp(pName, "vkResetCommandBuffer") == 0 && (!device || device_dispatch_table(device)->ResetCommandBuffer)) + return reinterpret_cast(vkResetCommandBuffer); + if (strcmp(pName, "vkCmdCopyBuffer") == 0 && (!device || device_dispatch_table(device)->CmdCopyBuffer)) + return reinterpret_cast(vkCmdCopyBuffer); + if (strcmp(pName, "vkCmdCopyImage") == 0 && (!device || device_dispatch_table(device)->CmdCopyImage)) + return reinterpret_cast(vkCmdCopyImage); + if (strcmp(pName, "vkCmdCopyBufferToImage") == 0 && (!device || device_dispatch_table(device)->CmdCopyBufferToImage)) + return reinterpret_cast(vkCmdCopyBufferToImage); + if (strcmp(pName, "vkCmdCopyImageToBuffer") == 0 && (!device || device_dispatch_table(device)->CmdCopyImageToBuffer)) + return reinterpret_cast(vkCmdCopyImageToBuffer); + if (strcmp(pName, "vkCmdUpdateBuffer") == 0 && (!device || device_dispatch_table(device)->CmdUpdateBuffer)) + return reinterpret_cast(vkCmdUpdateBuffer); + if (strcmp(pName, "vkCmdFillBuffer") == 0 && (!device || device_dispatch_table(device)->CmdFillBuffer)) + return reinterpret_cast(vkCmdFillBuffer); + if (strcmp(pName, "vkCmdPipelineBarrier") == 0 && (!device || device_dispatch_table(device)->CmdPipelineBarrier)) + return reinterpret_cast(vkCmdPipelineBarrier); + if (strcmp(pName, "vkCmdBeginQuery") == 0 && (!device || device_dispatch_table(device)->CmdBeginQuery)) + return reinterpret_cast(vkCmdBeginQuery); + if (strcmp(pName, "vkCmdEndQuery") == 0 && (!device || device_dispatch_table(device)->CmdEndQuery)) + return reinterpret_cast(vkCmdEndQuery); + if (strcmp(pName, "vkCmdResetQueryPool") == 0 && (!device || device_dispatch_table(device)->CmdResetQueryPool)) + return reinterpret_cast(vkCmdResetQueryPool); + if (strcmp(pName, "vkCmdWriteTimestamp") == 0 && (!device || device_dispatch_table(device)->CmdWriteTimestamp)) + return reinterpret_cast(vkCmdWriteTimestamp); + if (strcmp(pName, "vkCmdCopyQueryPoolResults") == 0 && (!device || device_dispatch_table(device)->CmdCopyQueryPoolResults)) + return reinterpret_cast(vkCmdCopyQueryPoolResults); + if (strcmp(pName, "vkCmdExecuteCommands") == 0 && (!device || device_dispatch_table(device)->CmdExecuteCommands)) + return reinterpret_cast(vkCmdExecuteCommands); + if (strcmp(pName, "vkCreateEvent") == 0 && (!device || device_dispatch_table(device)->CreateEvent)) + return reinterpret_cast(vkCreateEvent); + if (strcmp(pName, "vkDestroyEvent") == 0 && (!device || device_dispatch_table(device)->DestroyEvent)) + return reinterpret_cast(vkDestroyEvent); + if (strcmp(pName, "vkGetEventStatus") == 0 && (!device || device_dispatch_table(device)->GetEventStatus)) + return reinterpret_cast(vkGetEventStatus); + if (strcmp(pName, "vkSetEvent") == 0 && (!device || device_dispatch_table(device)->SetEvent)) + return reinterpret_cast(vkSetEvent); + if (strcmp(pName, "vkResetEvent") == 0 && (!device || device_dispatch_table(device)->ResetEvent)) + return reinterpret_cast(vkResetEvent); + if (strcmp(pName, "vkCreateBufferView") == 0 && (!device || device_dispatch_table(device)->CreateBufferView)) + return reinterpret_cast(vkCreateBufferView); + if (strcmp(pName, "vkDestroyBufferView") == 0 && (!device || device_dispatch_table(device)->DestroyBufferView)) + return reinterpret_cast(vkDestroyBufferView); + if (strcmp(pName, "vkCreateShaderModule") == 0 && (!device || device_dispatch_table(device)->CreateShaderModule)) + return reinterpret_cast(vkCreateShaderModule); + if (strcmp(pName, "vkDestroyShaderModule") == 0 && (!device || device_dispatch_table(device)->DestroyShaderModule)) + return reinterpret_cast(vkDestroyShaderModule); + if (strcmp(pName, "vkCreatePipelineCache") == 0 && (!device || device_dispatch_table(device)->CreatePipelineCache)) + return reinterpret_cast(vkCreatePipelineCache); + if (strcmp(pName, "vkDestroyPipelineCache") == 0 && (!device || device_dispatch_table(device)->DestroyPipelineCache)) + return reinterpret_cast(vkDestroyPipelineCache); + if (strcmp(pName, "vkGetPipelineCacheData") == 0 && (!device || device_dispatch_table(device)->GetPipelineCacheData)) + return reinterpret_cast(vkGetPipelineCacheData); + if (strcmp(pName, "vkMergePipelineCaches") == 0 && (!device || device_dispatch_table(device)->MergePipelineCaches)) + return reinterpret_cast(vkMergePipelineCaches); + if (strcmp(pName, "vkCreateComputePipelines") == 0 && (!device || device_dispatch_table(device)->CreateComputePipelines)) + return reinterpret_cast(vkCreateComputePipelines); + if (strcmp(pName, "vkDestroyPipeline") == 0 && (!device || device_dispatch_table(device)->DestroyPipeline)) + return reinterpret_cast(vkDestroyPipeline); + if (strcmp(pName, "vkCreatePipelineLayout") == 0 && (!device || device_dispatch_table(device)->CreatePipelineLayout)) + return reinterpret_cast(vkCreatePipelineLayout); + if (strcmp(pName, "vkDestroyPipelineLayout") == 0 && (!device || device_dispatch_table(device)->DestroyPipelineLayout)) + return reinterpret_cast(vkDestroyPipelineLayout); + if (strcmp(pName, "vkCreateSampler") == 0 && (!device || device_dispatch_table(device)->CreateSampler)) + return reinterpret_cast(vkCreateSampler); + if (strcmp(pName, "vkDestroySampler") == 0 && (!device || device_dispatch_table(device)->DestroySampler)) + return reinterpret_cast(vkDestroySampler); + if (strcmp(pName, "vkCreateDescriptorSetLayout") == 0 && (!device || device_dispatch_table(device)->CreateDescriptorSetLayout)) + return reinterpret_cast(vkCreateDescriptorSetLayout); + if (strcmp(pName, "vkDestroyDescriptorSetLayout") == 0 && (!device || device_dispatch_table(device)->DestroyDescriptorSetLayout)) + return reinterpret_cast(vkDestroyDescriptorSetLayout); + if (strcmp(pName, "vkCreateDescriptorPool") == 0 && (!device || device_dispatch_table(device)->CreateDescriptorPool)) + return reinterpret_cast(vkCreateDescriptorPool); + if (strcmp(pName, "vkDestroyDescriptorPool") == 0 && (!device || device_dispatch_table(device)->DestroyDescriptorPool)) + return reinterpret_cast(vkDestroyDescriptorPool); + if (strcmp(pName, "vkResetDescriptorPool") == 0 && (!device || device_dispatch_table(device)->ResetDescriptorPool)) + return reinterpret_cast(vkResetDescriptorPool); + if (strcmp(pName, "vkAllocateDescriptorSets") == 0 && (!device || device_dispatch_table(device)->AllocateDescriptorSets)) + return reinterpret_cast(vkAllocateDescriptorSets); + if (strcmp(pName, "vkFreeDescriptorSets") == 0 && (!device || device_dispatch_table(device)->FreeDescriptorSets)) + return reinterpret_cast(vkFreeDescriptorSets); + if (strcmp(pName, "vkUpdateDescriptorSets") == 0 && (!device || device_dispatch_table(device)->UpdateDescriptorSets)) + return reinterpret_cast(vkUpdateDescriptorSets); + if (strcmp(pName, "vkCmdBindPipeline") == 0 && (!device || device_dispatch_table(device)->CmdBindPipeline)) + return reinterpret_cast(vkCmdBindPipeline); + if (strcmp(pName, "vkCmdBindDescriptorSets") == 0 && (!device || device_dispatch_table(device)->CmdBindDescriptorSets)) + return reinterpret_cast(vkCmdBindDescriptorSets); + if (strcmp(pName, "vkCmdClearColorImage") == 0 && (!device || device_dispatch_table(device)->CmdClearColorImage)) + return reinterpret_cast(vkCmdClearColorImage); + if (strcmp(pName, "vkCmdDispatch") == 0 && (!device || device_dispatch_table(device)->CmdDispatch)) + return reinterpret_cast(vkCmdDispatch); + if (strcmp(pName, "vkCmdDispatchIndirect") == 0 && (!device || device_dispatch_table(device)->CmdDispatchIndirect)) + return reinterpret_cast(vkCmdDispatchIndirect); + if (strcmp(pName, "vkCmdSetEvent") == 0 && (!device || device_dispatch_table(device)->CmdSetEvent)) + return reinterpret_cast(vkCmdSetEvent); + if (strcmp(pName, "vkCmdResetEvent") == 0 && (!device || device_dispatch_table(device)->CmdResetEvent)) + return reinterpret_cast(vkCmdResetEvent); + if (strcmp(pName, "vkCmdWaitEvents") == 0 && (!device || device_dispatch_table(device)->CmdWaitEvents)) + return reinterpret_cast(vkCmdWaitEvents); + if (strcmp(pName, "vkCmdPushConstants") == 0 && (!device || device_dispatch_table(device)->CmdPushConstants)) + return reinterpret_cast(vkCmdPushConstants); + if (strcmp(pName, "vkCreateGraphicsPipelines") == 0 && (!device || device_dispatch_table(device)->CreateGraphicsPipelines)) + return reinterpret_cast(vkCreateGraphicsPipelines); + if (strcmp(pName, "vkCreateFramebuffer") == 0 && (!device || device_dispatch_table(device)->CreateFramebuffer)) + return reinterpret_cast(vkCreateFramebuffer); + if (strcmp(pName, "vkDestroyFramebuffer") == 0 && (!device || device_dispatch_table(device)->DestroyFramebuffer)) + return reinterpret_cast(vkDestroyFramebuffer); + if (strcmp(pName, "vkCreateRenderPass") == 0 && (!device || device_dispatch_table(device)->CreateRenderPass)) + return reinterpret_cast(vkCreateRenderPass); + if (strcmp(pName, "vkDestroyRenderPass") == 0 && (!device || device_dispatch_table(device)->DestroyRenderPass)) + return reinterpret_cast(vkDestroyRenderPass); + if (strcmp(pName, "vkGetRenderAreaGranularity") == 0 && (!device || device_dispatch_table(device)->GetRenderAreaGranularity)) + return reinterpret_cast(vkGetRenderAreaGranularity); + if (strcmp(pName, "vkCmdSetViewport") == 0 && (!device || device_dispatch_table(device)->CmdSetViewport)) + return reinterpret_cast(vkCmdSetViewport); + if (strcmp(pName, "vkCmdSetScissor") == 0 && (!device || device_dispatch_table(device)->CmdSetScissor)) + return reinterpret_cast(vkCmdSetScissor); + if (strcmp(pName, "vkCmdSetLineWidth") == 0 && (!device || device_dispatch_table(device)->CmdSetLineWidth)) + return reinterpret_cast(vkCmdSetLineWidth); + if (strcmp(pName, "vkCmdSetDepthBias") == 0 && (!device || device_dispatch_table(device)->CmdSetDepthBias)) + return reinterpret_cast(vkCmdSetDepthBias); + if (strcmp(pName, "vkCmdSetBlendConstants") == 0 && (!device || device_dispatch_table(device)->CmdSetBlendConstants)) + return reinterpret_cast(vkCmdSetBlendConstants); + if (strcmp(pName, "vkCmdSetDepthBounds") == 0 && (!device || device_dispatch_table(device)->CmdSetDepthBounds)) + return reinterpret_cast(vkCmdSetDepthBounds); + if (strcmp(pName, "vkCmdSetStencilCompareMask") == 0 && (!device || device_dispatch_table(device)->CmdSetStencilCompareMask)) + return reinterpret_cast(vkCmdSetStencilCompareMask); + if (strcmp(pName, "vkCmdSetStencilWriteMask") == 0 && (!device || device_dispatch_table(device)->CmdSetStencilWriteMask)) + return reinterpret_cast(vkCmdSetStencilWriteMask); + if (strcmp(pName, "vkCmdSetStencilReference") == 0 && (!device || device_dispatch_table(device)->CmdSetStencilReference)) + return reinterpret_cast(vkCmdSetStencilReference); + if (strcmp(pName, "vkCmdBindIndexBuffer") == 0 && (!device || device_dispatch_table(device)->CmdBindIndexBuffer)) + return reinterpret_cast(vkCmdBindIndexBuffer); + if (strcmp(pName, "vkCmdBindVertexBuffers") == 0 && (!device || device_dispatch_table(device)->CmdBindVertexBuffers)) + return reinterpret_cast(vkCmdBindVertexBuffers); + if (strcmp(pName, "vkCmdDraw") == 0 && (!device || device_dispatch_table(device)->CmdDraw)) + return reinterpret_cast(vkCmdDraw); + if (strcmp(pName, "vkCmdDrawIndexed") == 0 && (!device || device_dispatch_table(device)->CmdDrawIndexed)) + return reinterpret_cast(vkCmdDrawIndexed); + if (strcmp(pName, "vkCmdDrawIndirect") == 0 && (!device || device_dispatch_table(device)->CmdDrawIndirect)) + return reinterpret_cast(vkCmdDrawIndirect); + if (strcmp(pName, "vkCmdDrawIndexedIndirect") == 0 && (!device || device_dispatch_table(device)->CmdDrawIndexedIndirect)) + return reinterpret_cast(vkCmdDrawIndexedIndirect); + if (strcmp(pName, "vkCmdBlitImage") == 0 && (!device || device_dispatch_table(device)->CmdBlitImage)) + return reinterpret_cast(vkCmdBlitImage); + if (strcmp(pName, "vkCmdClearDepthStencilImage") == 0 && (!device || device_dispatch_table(device)->CmdClearDepthStencilImage)) + return reinterpret_cast(vkCmdClearDepthStencilImage); + if (strcmp(pName, "vkCmdClearAttachments") == 0 && (!device || device_dispatch_table(device)->CmdClearAttachments)) + return reinterpret_cast(vkCmdClearAttachments); + if (strcmp(pName, "vkCmdResolveImage") == 0 && (!device || device_dispatch_table(device)->CmdResolveImage)) + return reinterpret_cast(vkCmdResolveImage); + if (strcmp(pName, "vkCmdBeginRenderPass") == 0 && (!device || device_dispatch_table(device)->CmdBeginRenderPass)) + return reinterpret_cast(vkCmdBeginRenderPass); + if (strcmp(pName, "vkCmdNextSubpass") == 0 && (!device || device_dispatch_table(device)->CmdNextSubpass)) + return reinterpret_cast(vkCmdNextSubpass); + if (strcmp(pName, "vkCmdEndRenderPass") == 0 && (!device || device_dispatch_table(device)->CmdEndRenderPass)) + return reinterpret_cast(vkCmdEndRenderPass); + if (strcmp(pName, "vkBindBufferMemory2") == 0 && (!device || device_dispatch_table(device)->BindBufferMemory2)) + return reinterpret_cast(vkBindBufferMemory2); + if (strcmp(pName, "vkBindImageMemory2") == 0 && (!device || device_dispatch_table(device)->BindImageMemory2)) + return reinterpret_cast(vkBindImageMemory2); + if (strcmp(pName, "vkGetDeviceGroupPeerMemoryFeatures") == 0 && (!device || device_dispatch_table(device)->GetDeviceGroupPeerMemoryFeatures)) + return reinterpret_cast(vkGetDeviceGroupPeerMemoryFeatures); + if (strcmp(pName, "vkCmdSetDeviceMask") == 0 && (!device || device_dispatch_table(device)->CmdSetDeviceMask)) + return reinterpret_cast(vkCmdSetDeviceMask); + if (strcmp(pName, "vkGetImageMemoryRequirements2") == 0 && (!device || device_dispatch_table(device)->GetImageMemoryRequirements2)) + return reinterpret_cast(vkGetImageMemoryRequirements2); + if (strcmp(pName, "vkGetBufferMemoryRequirements2") == 0 && (!device || device_dispatch_table(device)->GetBufferMemoryRequirements2)) + return reinterpret_cast(vkGetBufferMemoryRequirements2); + if (strcmp(pName, "vkGetImageSparseMemoryRequirements2") == 0 && (!device || device_dispatch_table(device)->GetImageSparseMemoryRequirements2)) + return reinterpret_cast(vkGetImageSparseMemoryRequirements2); + if (strcmp(pName, "vkTrimCommandPool") == 0 && (!device || device_dispatch_table(device)->TrimCommandPool)) + return reinterpret_cast(vkTrimCommandPool); + if (strcmp(pName, "vkGetDeviceQueue2") == 0 && (!device || device_dispatch_table(device)->GetDeviceQueue2)) + return reinterpret_cast(vkGetDeviceQueue2); + if (strcmp(pName, "vkCmdDispatchBase") == 0 && (!device || device_dispatch_table(device)->CmdDispatchBase)) + return reinterpret_cast(vkCmdDispatchBase); + if (strcmp(pName, "vkCreateDescriptorUpdateTemplate") == 0 && (!device || device_dispatch_table(device)->CreateDescriptorUpdateTemplate)) + return reinterpret_cast(vkCreateDescriptorUpdateTemplate); + if (strcmp(pName, "vkDestroyDescriptorUpdateTemplate") == 0 && (!device || device_dispatch_table(device)->DestroyDescriptorUpdateTemplate)) + return reinterpret_cast(vkDestroyDescriptorUpdateTemplate); + if (strcmp(pName, "vkUpdateDescriptorSetWithTemplate") == 0 && (!device || device_dispatch_table(device)->UpdateDescriptorSetWithTemplate)) + return reinterpret_cast(vkUpdateDescriptorSetWithTemplate); + if (strcmp(pName, "vkGetDescriptorSetLayoutSupport") == 0 && (!device || device_dispatch_table(device)->GetDescriptorSetLayoutSupport)) + return reinterpret_cast(vkGetDescriptorSetLayoutSupport); + if (strcmp(pName, "vkCreateSamplerYcbcrConversion") == 0 && (!device || device_dispatch_table(device)->CreateSamplerYcbcrConversion)) + return reinterpret_cast(vkCreateSamplerYcbcrConversion); + if (strcmp(pName, "vkDestroySamplerYcbcrConversion") == 0 && (!device || device_dispatch_table(device)->DestroySamplerYcbcrConversion)) + return reinterpret_cast(vkDestroySamplerYcbcrConversion); + if (strcmp(pName, "vkResetQueryPool") == 0 && (!device || device_dispatch_table(device)->ResetQueryPool)) + return reinterpret_cast(vkResetQueryPool); + if (strcmp(pName, "vkGetSemaphoreCounterValue") == 0 && (!device || device_dispatch_table(device)->GetSemaphoreCounterValue)) + return reinterpret_cast(vkGetSemaphoreCounterValue); + if (strcmp(pName, "vkWaitSemaphores") == 0 && (!device || device_dispatch_table(device)->WaitSemaphores)) + return reinterpret_cast(vkWaitSemaphores); + if (strcmp(pName, "vkSignalSemaphore") == 0 && (!device || device_dispatch_table(device)->SignalSemaphore)) + return reinterpret_cast(vkSignalSemaphore); + if (strcmp(pName, "vkGetBufferDeviceAddress") == 0 && (!device || device_dispatch_table(device)->GetBufferDeviceAddress)) + return reinterpret_cast(vkGetBufferDeviceAddress); + if (strcmp(pName, "vkGetBufferOpaqueCaptureAddress") == 0 && (!device || device_dispatch_table(device)->GetBufferOpaqueCaptureAddress)) + return reinterpret_cast(vkGetBufferOpaqueCaptureAddress); + if (strcmp(pName, "vkGetDeviceMemoryOpaqueCaptureAddress") == 0 && (!device || device_dispatch_table(device)->GetDeviceMemoryOpaqueCaptureAddress)) + return reinterpret_cast(vkGetDeviceMemoryOpaqueCaptureAddress); + if (strcmp(pName, "vkCmdDrawIndirectCount") == 0 && (!device || device_dispatch_table(device)->CmdDrawIndirectCount)) + return reinterpret_cast(vkCmdDrawIndirectCount); + if (strcmp(pName, "vkCmdDrawIndexedIndirectCount") == 0 && (!device || device_dispatch_table(device)->CmdDrawIndexedIndirectCount)) + return reinterpret_cast(vkCmdDrawIndexedIndirectCount); + if (strcmp(pName, "vkCreateRenderPass2") == 0 && (!device || device_dispatch_table(device)->CreateRenderPass2)) + return reinterpret_cast(vkCreateRenderPass2); + if (strcmp(pName, "vkCmdBeginRenderPass2") == 0 && (!device || device_dispatch_table(device)->CmdBeginRenderPass2)) + return reinterpret_cast(vkCmdBeginRenderPass2); + if (strcmp(pName, "vkCmdNextSubpass2") == 0 && (!device || device_dispatch_table(device)->CmdNextSubpass2)) + return reinterpret_cast(vkCmdNextSubpass2); + if (strcmp(pName, "vkCmdEndRenderPass2") == 0 && (!device || device_dispatch_table(device)->CmdEndRenderPass2)) + return reinterpret_cast(vkCmdEndRenderPass2); + if (strcmp(pName, "vkCreatePrivateDataSlot") == 0 && (!device || device_dispatch_table(device)->CreatePrivateDataSlot)) + return reinterpret_cast(vkCreatePrivateDataSlot); + if (strcmp(pName, "vkDestroyPrivateDataSlot") == 0 && (!device || device_dispatch_table(device)->DestroyPrivateDataSlot)) + return reinterpret_cast(vkDestroyPrivateDataSlot); + if (strcmp(pName, "vkSetPrivateData") == 0 && (!device || device_dispatch_table(device)->SetPrivateData)) + return reinterpret_cast(vkSetPrivateData); + if (strcmp(pName, "vkGetPrivateData") == 0 && (!device || device_dispatch_table(device)->GetPrivateData)) + return reinterpret_cast(vkGetPrivateData); + if (strcmp(pName, "vkCmdPipelineBarrier2") == 0 && (!device || device_dispatch_table(device)->CmdPipelineBarrier2)) + return reinterpret_cast(vkCmdPipelineBarrier2); + if (strcmp(pName, "vkCmdWriteTimestamp2") == 0 && (!device || device_dispatch_table(device)->CmdWriteTimestamp2)) + return reinterpret_cast(vkCmdWriteTimestamp2); + if (strcmp(pName, "vkQueueSubmit2") == 0 && (!device || device_dispatch_table(device)->QueueSubmit2)) + return reinterpret_cast(vkQueueSubmit2); + if (strcmp(pName, "vkCmdCopyBuffer2") == 0 && (!device || device_dispatch_table(device)->CmdCopyBuffer2)) + return reinterpret_cast(vkCmdCopyBuffer2); + if (strcmp(pName, "vkCmdCopyImage2") == 0 && (!device || device_dispatch_table(device)->CmdCopyImage2)) + return reinterpret_cast(vkCmdCopyImage2); + if (strcmp(pName, "vkCmdCopyBufferToImage2") == 0 && (!device || device_dispatch_table(device)->CmdCopyBufferToImage2)) + return reinterpret_cast(vkCmdCopyBufferToImage2); + if (strcmp(pName, "vkCmdCopyImageToBuffer2") == 0 && (!device || device_dispatch_table(device)->CmdCopyImageToBuffer2)) + return reinterpret_cast(vkCmdCopyImageToBuffer2); + if (strcmp(pName, "vkGetDeviceBufferMemoryRequirements") == 0 && (!device || device_dispatch_table(device)->GetDeviceBufferMemoryRequirements)) + return reinterpret_cast(vkGetDeviceBufferMemoryRequirements); + if (strcmp(pName, "vkGetDeviceImageMemoryRequirements") == 0 && (!device || device_dispatch_table(device)->GetDeviceImageMemoryRequirements)) + return reinterpret_cast(vkGetDeviceImageMemoryRequirements); + if (strcmp(pName, "vkGetDeviceImageSparseMemoryRequirements") == 0 && (!device || device_dispatch_table(device)->GetDeviceImageSparseMemoryRequirements)) + return reinterpret_cast(vkGetDeviceImageSparseMemoryRequirements); + if (strcmp(pName, "vkCmdSetEvent2") == 0 && (!device || device_dispatch_table(device)->CmdSetEvent2)) + return reinterpret_cast(vkCmdSetEvent2); + if (strcmp(pName, "vkCmdResetEvent2") == 0 && (!device || device_dispatch_table(device)->CmdResetEvent2)) + return reinterpret_cast(vkCmdResetEvent2); + if (strcmp(pName, "vkCmdWaitEvents2") == 0 && (!device || device_dispatch_table(device)->CmdWaitEvents2)) + return reinterpret_cast(vkCmdWaitEvents2); + if (strcmp(pName, "vkCmdBlitImage2") == 0 && (!device || device_dispatch_table(device)->CmdBlitImage2)) + return reinterpret_cast(vkCmdBlitImage2); + if (strcmp(pName, "vkCmdResolveImage2") == 0 && (!device || device_dispatch_table(device)->CmdResolveImage2)) + return reinterpret_cast(vkCmdResolveImage2); + if (strcmp(pName, "vkCmdBeginRendering") == 0 && (!device || device_dispatch_table(device)->CmdBeginRendering)) + return reinterpret_cast(vkCmdBeginRendering); + if (strcmp(pName, "vkCmdEndRendering") == 0 && (!device || device_dispatch_table(device)->CmdEndRendering)) + return reinterpret_cast(vkCmdEndRendering); + if (strcmp(pName, "vkCmdSetCullMode") == 0 && (!device || device_dispatch_table(device)->CmdSetCullMode)) + return reinterpret_cast(vkCmdSetCullMode); + if (strcmp(pName, "vkCmdSetFrontFace") == 0 && (!device || device_dispatch_table(device)->CmdSetFrontFace)) + return reinterpret_cast(vkCmdSetFrontFace); + if (strcmp(pName, "vkCmdSetPrimitiveTopology") == 0 && (!device || device_dispatch_table(device)->CmdSetPrimitiveTopology)) + return reinterpret_cast(vkCmdSetPrimitiveTopology); + if (strcmp(pName, "vkCmdSetViewportWithCount") == 0 && (!device || device_dispatch_table(device)->CmdSetViewportWithCount)) + return reinterpret_cast(vkCmdSetViewportWithCount); + if (strcmp(pName, "vkCmdSetScissorWithCount") == 0 && (!device || device_dispatch_table(device)->CmdSetScissorWithCount)) + return reinterpret_cast(vkCmdSetScissorWithCount); + if (strcmp(pName, "vkCmdBindVertexBuffers2") == 0 && (!device || device_dispatch_table(device)->CmdBindVertexBuffers2)) + return reinterpret_cast(vkCmdBindVertexBuffers2); + if (strcmp(pName, "vkCmdSetDepthTestEnable") == 0 && (!device || device_dispatch_table(device)->CmdSetDepthTestEnable)) + return reinterpret_cast(vkCmdSetDepthTestEnable); + if (strcmp(pName, "vkCmdSetDepthWriteEnable") == 0 && (!device || device_dispatch_table(device)->CmdSetDepthWriteEnable)) + return reinterpret_cast(vkCmdSetDepthWriteEnable); + if (strcmp(pName, "vkCmdSetDepthCompareOp") == 0 && (!device || device_dispatch_table(device)->CmdSetDepthCompareOp)) + return reinterpret_cast(vkCmdSetDepthCompareOp); + if (strcmp(pName, "vkCmdSetDepthBoundsTestEnable") == 0 && (!device || device_dispatch_table(device)->CmdSetDepthBoundsTestEnable)) + return reinterpret_cast(vkCmdSetDepthBoundsTestEnable); + if (strcmp(pName, "vkCmdSetStencilTestEnable") == 0 && (!device || device_dispatch_table(device)->CmdSetStencilTestEnable)) + return reinterpret_cast(vkCmdSetStencilTestEnable); + if (strcmp(pName, "vkCmdSetStencilOp") == 0 && (!device || device_dispatch_table(device)->CmdSetStencilOp)) + return reinterpret_cast(vkCmdSetStencilOp); + if (strcmp(pName, "vkCmdSetRasterizerDiscardEnable") == 0 && (!device || device_dispatch_table(device)->CmdSetRasterizerDiscardEnable)) + return reinterpret_cast(vkCmdSetRasterizerDiscardEnable); + if (strcmp(pName, "vkCmdSetDepthBiasEnable") == 0 && (!device || device_dispatch_table(device)->CmdSetDepthBiasEnable)) + return reinterpret_cast(vkCmdSetDepthBiasEnable); + if (strcmp(pName, "vkCmdSetPrimitiveRestartEnable") == 0 && (!device || device_dispatch_table(device)->CmdSetPrimitiveRestartEnable)) + return reinterpret_cast(vkCmdSetPrimitiveRestartEnable); + if (strcmp(pName, "vkMapMemory2") == 0 && (!device || device_dispatch_table(device)->MapMemory2)) + return reinterpret_cast(vkMapMemory2); + if (strcmp(pName, "vkUnmapMemory2") == 0 && (!device || device_dispatch_table(device)->UnmapMemory2)) + return reinterpret_cast(vkUnmapMemory2); + if (strcmp(pName, "vkGetDeviceImageSubresourceLayout") == 0 && (!device || device_dispatch_table(device)->GetDeviceImageSubresourceLayout)) + return reinterpret_cast(vkGetDeviceImageSubresourceLayout); + if (strcmp(pName, "vkGetImageSubresourceLayout2") == 0 && (!device || device_dispatch_table(device)->GetImageSubresourceLayout2)) + return reinterpret_cast(vkGetImageSubresourceLayout2); + if (strcmp(pName, "vkCopyMemoryToImage") == 0 && (!device || device_dispatch_table(device)->CopyMemoryToImage)) + return reinterpret_cast(vkCopyMemoryToImage); + if (strcmp(pName, "vkCopyImageToMemory") == 0 && (!device || device_dispatch_table(device)->CopyImageToMemory)) + return reinterpret_cast(vkCopyImageToMemory); + if (strcmp(pName, "vkCopyImageToImage") == 0 && (!device || device_dispatch_table(device)->CopyImageToImage)) + return reinterpret_cast(vkCopyImageToImage); + if (strcmp(pName, "vkTransitionImageLayout") == 0 && (!device || device_dispatch_table(device)->TransitionImageLayout)) + return reinterpret_cast(vkTransitionImageLayout); + if (strcmp(pName, "vkCmdPushDescriptorSet") == 0 && (!device || device_dispatch_table(device)->CmdPushDescriptorSet)) + return reinterpret_cast(vkCmdPushDescriptorSet); + if (strcmp(pName, "vkCmdPushDescriptorSetWithTemplate") == 0 && (!device || device_dispatch_table(device)->CmdPushDescriptorSetWithTemplate)) + return reinterpret_cast(vkCmdPushDescriptorSetWithTemplate); + if (strcmp(pName, "vkCmdBindDescriptorSets2") == 0 && (!device || device_dispatch_table(device)->CmdBindDescriptorSets2)) + return reinterpret_cast(vkCmdBindDescriptorSets2); + if (strcmp(pName, "vkCmdPushConstants2") == 0 && (!device || device_dispatch_table(device)->CmdPushConstants2)) + return reinterpret_cast(vkCmdPushConstants2); + if (strcmp(pName, "vkCmdPushDescriptorSet2") == 0 && (!device || device_dispatch_table(device)->CmdPushDescriptorSet2)) + return reinterpret_cast(vkCmdPushDescriptorSet2); + if (strcmp(pName, "vkCmdPushDescriptorSetWithTemplate2") == 0 && (!device || device_dispatch_table(device)->CmdPushDescriptorSetWithTemplate2)) + return reinterpret_cast(vkCmdPushDescriptorSetWithTemplate2); + if (strcmp(pName, "vkCmdSetLineStipple") == 0 && (!device || device_dispatch_table(device)->CmdSetLineStipple)) + return reinterpret_cast(vkCmdSetLineStipple); + if (strcmp(pName, "vkCmdBindIndexBuffer2") == 0 && (!device || device_dispatch_table(device)->CmdBindIndexBuffer2)) + return reinterpret_cast(vkCmdBindIndexBuffer2); + if (strcmp(pName, "vkGetRenderingAreaGranularity") == 0 && (!device || device_dispatch_table(device)->GetRenderingAreaGranularity)) + return reinterpret_cast(vkGetRenderingAreaGranularity); + if (strcmp(pName, "vkCmdSetRenderingAttachmentLocations") == 0 && (!device || device_dispatch_table(device)->CmdSetRenderingAttachmentLocations)) + return reinterpret_cast(vkCmdSetRenderingAttachmentLocations); + if (strcmp(pName, "vkCmdSetRenderingInputAttachmentIndices") == 0 && (!device || device_dispatch_table(device)->CmdSetRenderingInputAttachmentIndices)) + return reinterpret_cast(vkCmdSetRenderingInputAttachmentIndices); + if (strcmp(pName, "vkCreateSwapchainKHR") == 0 && (!device || device_dispatch_table(device)->CreateSwapchainKHR)) + return reinterpret_cast(vkCreateSwapchainKHR); + if (strcmp(pName, "vkDestroySwapchainKHR") == 0 && (!device || device_dispatch_table(device)->DestroySwapchainKHR)) + return reinterpret_cast(vkDestroySwapchainKHR); + if (strcmp(pName, "vkGetSwapchainImagesKHR") == 0 && (!device || device_dispatch_table(device)->GetSwapchainImagesKHR)) + return reinterpret_cast(vkGetSwapchainImagesKHR); + if (strcmp(pName, "vkAcquireNextImageKHR") == 0 && (!device || device_dispatch_table(device)->AcquireNextImageKHR)) + return reinterpret_cast(vkAcquireNextImageKHR); + if (strcmp(pName, "vkQueuePresentKHR") == 0 && (!device || device_dispatch_table(device)->QueuePresentKHR)) + return reinterpret_cast(vkQueuePresentKHR); + if (strcmp(pName, "vkGetDeviceGroupPresentCapabilitiesKHR") == 0 && (!device || device_dispatch_table(device)->GetDeviceGroupPresentCapabilitiesKHR)) + return reinterpret_cast(vkGetDeviceGroupPresentCapabilitiesKHR); + if (strcmp(pName, "vkGetDeviceGroupSurfacePresentModesKHR") == 0 && (!device || device_dispatch_table(device)->GetDeviceGroupSurfacePresentModesKHR)) + return reinterpret_cast(vkGetDeviceGroupSurfacePresentModesKHR); + if (strcmp(pName, "vkAcquireNextImage2KHR") == 0 && (!device || device_dispatch_table(device)->AcquireNextImage2KHR)) + return reinterpret_cast(vkAcquireNextImage2KHR); + if (strcmp(pName, "vkCreateSharedSwapchainsKHR") == 0 && (!device || device_dispatch_table(device)->CreateSharedSwapchainsKHR)) + return reinterpret_cast(vkCreateSharedSwapchainsKHR); + if (strcmp(pName, "vkCreateVideoSessionKHR") == 0 && (!device || device_dispatch_table(device)->CreateVideoSessionKHR)) + return reinterpret_cast(vkCreateVideoSessionKHR); + if (strcmp(pName, "vkDestroyVideoSessionKHR") == 0 && (!device || device_dispatch_table(device)->DestroyVideoSessionKHR)) + return reinterpret_cast(vkDestroyVideoSessionKHR); + if (strcmp(pName, "vkGetVideoSessionMemoryRequirementsKHR") == 0 && (!device || device_dispatch_table(device)->GetVideoSessionMemoryRequirementsKHR)) + return reinterpret_cast(vkGetVideoSessionMemoryRequirementsKHR); + if (strcmp(pName, "vkBindVideoSessionMemoryKHR") == 0 && (!device || device_dispatch_table(device)->BindVideoSessionMemoryKHR)) + return reinterpret_cast(vkBindVideoSessionMemoryKHR); + if (strcmp(pName, "vkCreateVideoSessionParametersKHR") == 0 && (!device || device_dispatch_table(device)->CreateVideoSessionParametersKHR)) + return reinterpret_cast(vkCreateVideoSessionParametersKHR); + if (strcmp(pName, "vkUpdateVideoSessionParametersKHR") == 0 && (!device || device_dispatch_table(device)->UpdateVideoSessionParametersKHR)) + return reinterpret_cast(vkUpdateVideoSessionParametersKHR); + if (strcmp(pName, "vkDestroyVideoSessionParametersKHR") == 0 && (!device || device_dispatch_table(device)->DestroyVideoSessionParametersKHR)) + return reinterpret_cast(vkDestroyVideoSessionParametersKHR); + if (strcmp(pName, "vkCmdBeginVideoCodingKHR") == 0 && (!device || device_dispatch_table(device)->CmdBeginVideoCodingKHR)) + return reinterpret_cast(vkCmdBeginVideoCodingKHR); + if (strcmp(pName, "vkCmdEndVideoCodingKHR") == 0 && (!device || device_dispatch_table(device)->CmdEndVideoCodingKHR)) + return reinterpret_cast(vkCmdEndVideoCodingKHR); + if (strcmp(pName, "vkCmdControlVideoCodingKHR") == 0 && (!device || device_dispatch_table(device)->CmdControlVideoCodingKHR)) + return reinterpret_cast(vkCmdControlVideoCodingKHR); + if (strcmp(pName, "vkCmdDecodeVideoKHR") == 0 && (!device || device_dispatch_table(device)->CmdDecodeVideoKHR)) + return reinterpret_cast(vkCmdDecodeVideoKHR); + if (strcmp(pName, "vkCmdBeginRenderingKHR") == 0 && (!device || device_dispatch_table(device)->CmdBeginRenderingKHR)) + return reinterpret_cast(vkCmdBeginRenderingKHR); + if (strcmp(pName, "vkCmdEndRenderingKHR") == 0 && (!device || device_dispatch_table(device)->CmdEndRenderingKHR)) + return reinterpret_cast(vkCmdEndRenderingKHR); + if (strcmp(pName, "vkGetDeviceGroupPeerMemoryFeaturesKHR") == 0 && (!device || device_dispatch_table(device)->GetDeviceGroupPeerMemoryFeaturesKHR)) + return reinterpret_cast(vkGetDeviceGroupPeerMemoryFeaturesKHR); + if (strcmp(pName, "vkCmdSetDeviceMaskKHR") == 0 && (!device || device_dispatch_table(device)->CmdSetDeviceMaskKHR)) + return reinterpret_cast(vkCmdSetDeviceMaskKHR); + if (strcmp(pName, "vkCmdDispatchBaseKHR") == 0 && (!device || device_dispatch_table(device)->CmdDispatchBaseKHR)) + return reinterpret_cast(vkCmdDispatchBaseKHR); + if (strcmp(pName, "vkTrimCommandPoolKHR") == 0 && (!device || device_dispatch_table(device)->TrimCommandPoolKHR)) + return reinterpret_cast(vkTrimCommandPoolKHR); +#if defined(VK_USE_PLATFORM_WIN32_KHR) + if (strcmp(pName, "vkGetMemoryWin32HandleKHR") == 0 && (!device || device_dispatch_table(device)->GetMemoryWin32HandleKHR)) + return reinterpret_cast(vkGetMemoryWin32HandleKHR); + if (strcmp(pName, "vkGetMemoryWin32HandlePropertiesKHR") == 0 && (!device || device_dispatch_table(device)->GetMemoryWin32HandlePropertiesKHR)) + return reinterpret_cast(vkGetMemoryWin32HandlePropertiesKHR); +#endif // VK_USE_PLATFORM_WIN32_KHR + if (strcmp(pName, "vkGetMemoryFdKHR") == 0 && (!device || device_dispatch_table(device)->GetMemoryFdKHR)) + return reinterpret_cast(vkGetMemoryFdKHR); + if (strcmp(pName, "vkGetMemoryFdPropertiesKHR") == 0 && (!device || device_dispatch_table(device)->GetMemoryFdPropertiesKHR)) + return reinterpret_cast(vkGetMemoryFdPropertiesKHR); +#if defined(VK_USE_PLATFORM_WIN32_KHR) + if (strcmp(pName, "vkImportSemaphoreWin32HandleKHR") == 0 && (!device || device_dispatch_table(device)->ImportSemaphoreWin32HandleKHR)) + return reinterpret_cast(vkImportSemaphoreWin32HandleKHR); + if (strcmp(pName, "vkGetSemaphoreWin32HandleKHR") == 0 && (!device || device_dispatch_table(device)->GetSemaphoreWin32HandleKHR)) + return reinterpret_cast(vkGetSemaphoreWin32HandleKHR); +#endif // VK_USE_PLATFORM_WIN32_KHR + if (strcmp(pName, "vkImportSemaphoreFdKHR") == 0 && (!device || device_dispatch_table(device)->ImportSemaphoreFdKHR)) + return reinterpret_cast(vkImportSemaphoreFdKHR); + if (strcmp(pName, "vkGetSemaphoreFdKHR") == 0 && (!device || device_dispatch_table(device)->GetSemaphoreFdKHR)) + return reinterpret_cast(vkGetSemaphoreFdKHR); + if (strcmp(pName, "vkCmdPushDescriptorSetKHR") == 0 && (!device || device_dispatch_table(device)->CmdPushDescriptorSetKHR)) + return reinterpret_cast(vkCmdPushDescriptorSetKHR); + if (strcmp(pName, "vkCmdPushDescriptorSetWithTemplateKHR") == 0 && (!device || device_dispatch_table(device)->CmdPushDescriptorSetWithTemplateKHR)) + return reinterpret_cast(vkCmdPushDescriptorSetWithTemplateKHR); + if (strcmp(pName, "vkCreateDescriptorUpdateTemplateKHR") == 0 && (!device || device_dispatch_table(device)->CreateDescriptorUpdateTemplateKHR)) + return reinterpret_cast(vkCreateDescriptorUpdateTemplateKHR); + if (strcmp(pName, "vkDestroyDescriptorUpdateTemplateKHR") == 0 && (!device || device_dispatch_table(device)->DestroyDescriptorUpdateTemplateKHR)) + return reinterpret_cast(vkDestroyDescriptorUpdateTemplateKHR); + if (strcmp(pName, "vkUpdateDescriptorSetWithTemplateKHR") == 0 && (!device || device_dispatch_table(device)->UpdateDescriptorSetWithTemplateKHR)) + return reinterpret_cast(vkUpdateDescriptorSetWithTemplateKHR); + if (strcmp(pName, "vkCreateRenderPass2KHR") == 0 && (!device || device_dispatch_table(device)->CreateRenderPass2KHR)) + return reinterpret_cast(vkCreateRenderPass2KHR); + if (strcmp(pName, "vkCmdBeginRenderPass2KHR") == 0 && (!device || device_dispatch_table(device)->CmdBeginRenderPass2KHR)) + return reinterpret_cast(vkCmdBeginRenderPass2KHR); + if (strcmp(pName, "vkCmdNextSubpass2KHR") == 0 && (!device || device_dispatch_table(device)->CmdNextSubpass2KHR)) + return reinterpret_cast(vkCmdNextSubpass2KHR); + if (strcmp(pName, "vkCmdEndRenderPass2KHR") == 0 && (!device || device_dispatch_table(device)->CmdEndRenderPass2KHR)) + return reinterpret_cast(vkCmdEndRenderPass2KHR); + if (strcmp(pName, "vkGetSwapchainStatusKHR") == 0 && (!device || device_dispatch_table(device)->GetSwapchainStatusKHR)) + return reinterpret_cast(vkGetSwapchainStatusKHR); +#if defined(VK_USE_PLATFORM_WIN32_KHR) + if (strcmp(pName, "vkImportFenceWin32HandleKHR") == 0 && (!device || device_dispatch_table(device)->ImportFenceWin32HandleKHR)) + return reinterpret_cast(vkImportFenceWin32HandleKHR); + if (strcmp(pName, "vkGetFenceWin32HandleKHR") == 0 && (!device || device_dispatch_table(device)->GetFenceWin32HandleKHR)) + return reinterpret_cast(vkGetFenceWin32HandleKHR); +#endif // VK_USE_PLATFORM_WIN32_KHR + if (strcmp(pName, "vkImportFenceFdKHR") == 0 && (!device || device_dispatch_table(device)->ImportFenceFdKHR)) + return reinterpret_cast(vkImportFenceFdKHR); + if (strcmp(pName, "vkGetFenceFdKHR") == 0 && (!device || device_dispatch_table(device)->GetFenceFdKHR)) + return reinterpret_cast(vkGetFenceFdKHR); + if (strcmp(pName, "vkAcquireProfilingLockKHR") == 0 && (!device || device_dispatch_table(device)->AcquireProfilingLockKHR)) + return reinterpret_cast(vkAcquireProfilingLockKHR); + if (strcmp(pName, "vkReleaseProfilingLockKHR") == 0 && (!device || device_dispatch_table(device)->ReleaseProfilingLockKHR)) + return reinterpret_cast(vkReleaseProfilingLockKHR); + if (strcmp(pName, "vkGetImageMemoryRequirements2KHR") == 0 && (!device || device_dispatch_table(device)->GetImageMemoryRequirements2KHR)) + return reinterpret_cast(vkGetImageMemoryRequirements2KHR); + if (strcmp(pName, "vkGetBufferMemoryRequirements2KHR") == 0 && (!device || device_dispatch_table(device)->GetBufferMemoryRequirements2KHR)) + return reinterpret_cast(vkGetBufferMemoryRequirements2KHR); + if (strcmp(pName, "vkGetImageSparseMemoryRequirements2KHR") == 0 && (!device || device_dispatch_table(device)->GetImageSparseMemoryRequirements2KHR)) + return reinterpret_cast(vkGetImageSparseMemoryRequirements2KHR); + if (strcmp(pName, "vkCreateSamplerYcbcrConversionKHR") == 0 && (!device || device_dispatch_table(device)->CreateSamplerYcbcrConversionKHR)) + return reinterpret_cast(vkCreateSamplerYcbcrConversionKHR); + if (strcmp(pName, "vkDestroySamplerYcbcrConversionKHR") == 0 && (!device || device_dispatch_table(device)->DestroySamplerYcbcrConversionKHR)) + return reinterpret_cast(vkDestroySamplerYcbcrConversionKHR); + if (strcmp(pName, "vkBindBufferMemory2KHR") == 0 && (!device || device_dispatch_table(device)->BindBufferMemory2KHR)) + return reinterpret_cast(vkBindBufferMemory2KHR); + if (strcmp(pName, "vkBindImageMemory2KHR") == 0 && (!device || device_dispatch_table(device)->BindImageMemory2KHR)) + return reinterpret_cast(vkBindImageMemory2KHR); + if (strcmp(pName, "vkGetDescriptorSetLayoutSupportKHR") == 0 && (!device || device_dispatch_table(device)->GetDescriptorSetLayoutSupportKHR)) + return reinterpret_cast(vkGetDescriptorSetLayoutSupportKHR); + if (strcmp(pName, "vkCmdDrawIndirectCountKHR") == 0 && (!device || device_dispatch_table(device)->CmdDrawIndirectCountKHR)) + return reinterpret_cast(vkCmdDrawIndirectCountKHR); + if (strcmp(pName, "vkCmdDrawIndexedIndirectCountKHR") == 0 && (!device || device_dispatch_table(device)->CmdDrawIndexedIndirectCountKHR)) + return reinterpret_cast(vkCmdDrawIndexedIndirectCountKHR); + if (strcmp(pName, "vkGetSemaphoreCounterValueKHR") == 0 && (!device || device_dispatch_table(device)->GetSemaphoreCounterValueKHR)) + return reinterpret_cast(vkGetSemaphoreCounterValueKHR); + if (strcmp(pName, "vkWaitSemaphoresKHR") == 0 && (!device || device_dispatch_table(device)->WaitSemaphoresKHR)) + return reinterpret_cast(vkWaitSemaphoresKHR); + if (strcmp(pName, "vkSignalSemaphoreKHR") == 0 && (!device || device_dispatch_table(device)->SignalSemaphoreKHR)) + return reinterpret_cast(vkSignalSemaphoreKHR); + if (strcmp(pName, "vkCmdSetFragmentShadingRateKHR") == 0 && (!device || device_dispatch_table(device)->CmdSetFragmentShadingRateKHR)) + return reinterpret_cast(vkCmdSetFragmentShadingRateKHR); + if (strcmp(pName, "vkCmdSetRenderingAttachmentLocationsKHR") == 0 && (!device || device_dispatch_table(device)->CmdSetRenderingAttachmentLocationsKHR)) + return reinterpret_cast(vkCmdSetRenderingAttachmentLocationsKHR); + if (strcmp(pName, "vkCmdSetRenderingInputAttachmentIndicesKHR") == 0 && (!device || device_dispatch_table(device)->CmdSetRenderingInputAttachmentIndicesKHR)) + return reinterpret_cast(vkCmdSetRenderingInputAttachmentIndicesKHR); + if (strcmp(pName, "vkWaitForPresentKHR") == 0 && (!device || device_dispatch_table(device)->WaitForPresentKHR)) + return reinterpret_cast(vkWaitForPresentKHR); + if (strcmp(pName, "vkGetBufferDeviceAddressKHR") == 0 && (!device || device_dispatch_table(device)->GetBufferDeviceAddressKHR)) + return reinterpret_cast(vkGetBufferDeviceAddressKHR); + if (strcmp(pName, "vkGetBufferOpaqueCaptureAddressKHR") == 0 && (!device || device_dispatch_table(device)->GetBufferOpaqueCaptureAddressKHR)) + return reinterpret_cast(vkGetBufferOpaqueCaptureAddressKHR); + if (strcmp(pName, "vkGetDeviceMemoryOpaqueCaptureAddressKHR") == 0 && (!device || device_dispatch_table(device)->GetDeviceMemoryOpaqueCaptureAddressKHR)) + return reinterpret_cast(vkGetDeviceMemoryOpaqueCaptureAddressKHR); + if (strcmp(pName, "vkCreateDeferredOperationKHR") == 0 && (!device || device_dispatch_table(device)->CreateDeferredOperationKHR)) + return reinterpret_cast(vkCreateDeferredOperationKHR); + if (strcmp(pName, "vkDestroyDeferredOperationKHR") == 0 && (!device || device_dispatch_table(device)->DestroyDeferredOperationKHR)) + return reinterpret_cast(vkDestroyDeferredOperationKHR); + if (strcmp(pName, "vkGetDeferredOperationMaxConcurrencyKHR") == 0 && (!device || device_dispatch_table(device)->GetDeferredOperationMaxConcurrencyKHR)) + return reinterpret_cast(vkGetDeferredOperationMaxConcurrencyKHR); + if (strcmp(pName, "vkGetDeferredOperationResultKHR") == 0 && (!device || device_dispatch_table(device)->GetDeferredOperationResultKHR)) + return reinterpret_cast(vkGetDeferredOperationResultKHR); + if (strcmp(pName, "vkDeferredOperationJoinKHR") == 0 && (!device || device_dispatch_table(device)->DeferredOperationJoinKHR)) + return reinterpret_cast(vkDeferredOperationJoinKHR); + if (strcmp(pName, "vkGetPipelineExecutablePropertiesKHR") == 0 && (!device || device_dispatch_table(device)->GetPipelineExecutablePropertiesKHR)) + return reinterpret_cast(vkGetPipelineExecutablePropertiesKHR); + if (strcmp(pName, "vkGetPipelineExecutableStatisticsKHR") == 0 && (!device || device_dispatch_table(device)->GetPipelineExecutableStatisticsKHR)) + return reinterpret_cast(vkGetPipelineExecutableStatisticsKHR); + if (strcmp(pName, "vkGetPipelineExecutableInternalRepresentationsKHR") == 0 && (!device || device_dispatch_table(device)->GetPipelineExecutableInternalRepresentationsKHR)) + return reinterpret_cast(vkGetPipelineExecutableInternalRepresentationsKHR); + if (strcmp(pName, "vkMapMemory2KHR") == 0 && (!device || device_dispatch_table(device)->MapMemory2KHR)) + return reinterpret_cast(vkMapMemory2KHR); + if (strcmp(pName, "vkUnmapMemory2KHR") == 0 && (!device || device_dispatch_table(device)->UnmapMemory2KHR)) + return reinterpret_cast(vkUnmapMemory2KHR); + if (strcmp(pName, "vkGetEncodedVideoSessionParametersKHR") == 0 && (!device || device_dispatch_table(device)->GetEncodedVideoSessionParametersKHR)) + return reinterpret_cast(vkGetEncodedVideoSessionParametersKHR); + if (strcmp(pName, "vkCmdEncodeVideoKHR") == 0 && (!device || device_dispatch_table(device)->CmdEncodeVideoKHR)) + return reinterpret_cast(vkCmdEncodeVideoKHR); + if (strcmp(pName, "vkCmdSetEvent2KHR") == 0 && (!device || device_dispatch_table(device)->CmdSetEvent2KHR)) + return reinterpret_cast(vkCmdSetEvent2KHR); + if (strcmp(pName, "vkCmdResetEvent2KHR") == 0 && (!device || device_dispatch_table(device)->CmdResetEvent2KHR)) + return reinterpret_cast(vkCmdResetEvent2KHR); + if (strcmp(pName, "vkCmdWaitEvents2KHR") == 0 && (!device || device_dispatch_table(device)->CmdWaitEvents2KHR)) + return reinterpret_cast(vkCmdWaitEvents2KHR); + if (strcmp(pName, "vkCmdPipelineBarrier2KHR") == 0 && (!device || device_dispatch_table(device)->CmdPipelineBarrier2KHR)) + return reinterpret_cast(vkCmdPipelineBarrier2KHR); + if (strcmp(pName, "vkCmdWriteTimestamp2KHR") == 0 && (!device || device_dispatch_table(device)->CmdWriteTimestamp2KHR)) + return reinterpret_cast(vkCmdWriteTimestamp2KHR); + if (strcmp(pName, "vkQueueSubmit2KHR") == 0 && (!device || device_dispatch_table(device)->QueueSubmit2KHR)) + return reinterpret_cast(vkQueueSubmit2KHR); + if (strcmp(pName, "vkCmdCopyBuffer2KHR") == 0 && (!device || device_dispatch_table(device)->CmdCopyBuffer2KHR)) + return reinterpret_cast(vkCmdCopyBuffer2KHR); + if (strcmp(pName, "vkCmdCopyImage2KHR") == 0 && (!device || device_dispatch_table(device)->CmdCopyImage2KHR)) + return reinterpret_cast(vkCmdCopyImage2KHR); + if (strcmp(pName, "vkCmdCopyBufferToImage2KHR") == 0 && (!device || device_dispatch_table(device)->CmdCopyBufferToImage2KHR)) + return reinterpret_cast(vkCmdCopyBufferToImage2KHR); + if (strcmp(pName, "vkCmdCopyImageToBuffer2KHR") == 0 && (!device || device_dispatch_table(device)->CmdCopyImageToBuffer2KHR)) + return reinterpret_cast(vkCmdCopyImageToBuffer2KHR); + if (strcmp(pName, "vkCmdBlitImage2KHR") == 0 && (!device || device_dispatch_table(device)->CmdBlitImage2KHR)) + return reinterpret_cast(vkCmdBlitImage2KHR); + if (strcmp(pName, "vkCmdResolveImage2KHR") == 0 && (!device || device_dispatch_table(device)->CmdResolveImage2KHR)) + return reinterpret_cast(vkCmdResolveImage2KHR); + if (strcmp(pName, "vkCmdTraceRaysIndirect2KHR") == 0 && (!device || device_dispatch_table(device)->CmdTraceRaysIndirect2KHR)) + return reinterpret_cast(vkCmdTraceRaysIndirect2KHR); + if (strcmp(pName, "vkGetDeviceBufferMemoryRequirementsKHR") == 0 && (!device || device_dispatch_table(device)->GetDeviceBufferMemoryRequirementsKHR)) + return reinterpret_cast(vkGetDeviceBufferMemoryRequirementsKHR); + if (strcmp(pName, "vkGetDeviceImageMemoryRequirementsKHR") == 0 && (!device || device_dispatch_table(device)->GetDeviceImageMemoryRequirementsKHR)) + return reinterpret_cast(vkGetDeviceImageMemoryRequirementsKHR); + if (strcmp(pName, "vkGetDeviceImageSparseMemoryRequirementsKHR") == 0 && (!device || device_dispatch_table(device)->GetDeviceImageSparseMemoryRequirementsKHR)) + return reinterpret_cast(vkGetDeviceImageSparseMemoryRequirementsKHR); + if (strcmp(pName, "vkCmdBindIndexBuffer2KHR") == 0 && (!device || device_dispatch_table(device)->CmdBindIndexBuffer2KHR)) + return reinterpret_cast(vkCmdBindIndexBuffer2KHR); + if (strcmp(pName, "vkGetRenderingAreaGranularityKHR") == 0 && (!device || device_dispatch_table(device)->GetRenderingAreaGranularityKHR)) + return reinterpret_cast(vkGetRenderingAreaGranularityKHR); + if (strcmp(pName, "vkGetDeviceImageSubresourceLayoutKHR") == 0 && (!device || device_dispatch_table(device)->GetDeviceImageSubresourceLayoutKHR)) + return reinterpret_cast(vkGetDeviceImageSubresourceLayoutKHR); + if (strcmp(pName, "vkGetImageSubresourceLayout2KHR") == 0 && (!device || device_dispatch_table(device)->GetImageSubresourceLayout2KHR)) + return reinterpret_cast(vkGetImageSubresourceLayout2KHR); + if (strcmp(pName, "vkWaitForPresent2KHR") == 0 && (!device || device_dispatch_table(device)->WaitForPresent2KHR)) + return reinterpret_cast(vkWaitForPresent2KHR); + if (strcmp(pName, "vkCreatePipelineBinariesKHR") == 0 && (!device || device_dispatch_table(device)->CreatePipelineBinariesKHR)) + return reinterpret_cast(vkCreatePipelineBinariesKHR); + if (strcmp(pName, "vkDestroyPipelineBinaryKHR") == 0 && (!device || device_dispatch_table(device)->DestroyPipelineBinaryKHR)) + return reinterpret_cast(vkDestroyPipelineBinaryKHR); + if (strcmp(pName, "vkGetPipelineKeyKHR") == 0 && (!device || device_dispatch_table(device)->GetPipelineKeyKHR)) + return reinterpret_cast(vkGetPipelineKeyKHR); + if (strcmp(pName, "vkGetPipelineBinaryDataKHR") == 0 && (!device || device_dispatch_table(device)->GetPipelineBinaryDataKHR)) + return reinterpret_cast(vkGetPipelineBinaryDataKHR); + if (strcmp(pName, "vkReleaseCapturedPipelineDataKHR") == 0 && (!device || device_dispatch_table(device)->ReleaseCapturedPipelineDataKHR)) + return reinterpret_cast(vkReleaseCapturedPipelineDataKHR); + if (strcmp(pName, "vkReleaseSwapchainImagesKHR") == 0 && (!device || device_dispatch_table(device)->ReleaseSwapchainImagesKHR)) + return reinterpret_cast(vkReleaseSwapchainImagesKHR); + if (strcmp(pName, "vkCmdSetLineStippleKHR") == 0 && (!device || device_dispatch_table(device)->CmdSetLineStippleKHR)) + return reinterpret_cast(vkCmdSetLineStippleKHR); + if (strcmp(pName, "vkGetCalibratedTimestampsKHR") == 0 && (!device || device_dispatch_table(device)->GetCalibratedTimestampsKHR)) + return reinterpret_cast(vkGetCalibratedTimestampsKHR); + if (strcmp(pName, "vkCmdBindDescriptorSets2KHR") == 0 && (!device || device_dispatch_table(device)->CmdBindDescriptorSets2KHR)) + return reinterpret_cast(vkCmdBindDescriptorSets2KHR); + if (strcmp(pName, "vkCmdPushConstants2KHR") == 0 && (!device || device_dispatch_table(device)->CmdPushConstants2KHR)) + return reinterpret_cast(vkCmdPushConstants2KHR); + if (strcmp(pName, "vkCmdPushDescriptorSet2KHR") == 0 && (!device || device_dispatch_table(device)->CmdPushDescriptorSet2KHR)) + return reinterpret_cast(vkCmdPushDescriptorSet2KHR); + if (strcmp(pName, "vkCmdPushDescriptorSetWithTemplate2KHR") == 0 && (!device || device_dispatch_table(device)->CmdPushDescriptorSetWithTemplate2KHR)) + return reinterpret_cast(vkCmdPushDescriptorSetWithTemplate2KHR); + if (strcmp(pName, "vkCmdSetDescriptorBufferOffsets2EXT") == 0 && (!device || device_dispatch_table(device)->CmdSetDescriptorBufferOffsets2EXT)) + return reinterpret_cast(vkCmdSetDescriptorBufferOffsets2EXT); + if (strcmp(pName, "vkCmdBindDescriptorBufferEmbeddedSamplers2EXT") == 0 && (!device || device_dispatch_table(device)->CmdBindDescriptorBufferEmbeddedSamplers2EXT)) + return reinterpret_cast(vkCmdBindDescriptorBufferEmbeddedSamplers2EXT); + if (strcmp(pName, "vkCmdCopyMemoryIndirectKHR") == 0 && (!device || device_dispatch_table(device)->CmdCopyMemoryIndirectKHR)) + return reinterpret_cast(vkCmdCopyMemoryIndirectKHR); + if (strcmp(pName, "vkCmdCopyMemoryToImageIndirectKHR") == 0 && (!device || device_dispatch_table(device)->CmdCopyMemoryToImageIndirectKHR)) + return reinterpret_cast(vkCmdCopyMemoryToImageIndirectKHR); + if (strcmp(pName, "vkCmdEndRendering2KHR") == 0 && (!device || device_dispatch_table(device)->CmdEndRendering2KHR)) + return reinterpret_cast(vkCmdEndRendering2KHR); + if (strcmp(pName, "vkDebugMarkerSetObjectTagEXT") == 0 && (!device || device_dispatch_table(device)->DebugMarkerSetObjectTagEXT)) + return reinterpret_cast(vkDebugMarkerSetObjectTagEXT); + if (strcmp(pName, "vkDebugMarkerSetObjectNameEXT") == 0 && (!device || device_dispatch_table(device)->DebugMarkerSetObjectNameEXT)) + return reinterpret_cast(vkDebugMarkerSetObjectNameEXT); + if (strcmp(pName, "vkCmdDebugMarkerBeginEXT") == 0 && (!device || device_dispatch_table(device)->CmdDebugMarkerBeginEXT)) + return reinterpret_cast(vkCmdDebugMarkerBeginEXT); + if (strcmp(pName, "vkCmdDebugMarkerEndEXT") == 0 && (!device || device_dispatch_table(device)->CmdDebugMarkerEndEXT)) + return reinterpret_cast(vkCmdDebugMarkerEndEXT); + if (strcmp(pName, "vkCmdDebugMarkerInsertEXT") == 0 && (!device || device_dispatch_table(device)->CmdDebugMarkerInsertEXT)) + return reinterpret_cast(vkCmdDebugMarkerInsertEXT); + if (strcmp(pName, "vkCmdBindTransformFeedbackBuffersEXT") == 0 && (!device || device_dispatch_table(device)->CmdBindTransformFeedbackBuffersEXT)) + return reinterpret_cast(vkCmdBindTransformFeedbackBuffersEXT); + if (strcmp(pName, "vkCmdBeginTransformFeedbackEXT") == 0 && (!device || device_dispatch_table(device)->CmdBeginTransformFeedbackEXT)) + return reinterpret_cast(vkCmdBeginTransformFeedbackEXT); + if (strcmp(pName, "vkCmdEndTransformFeedbackEXT") == 0 && (!device || device_dispatch_table(device)->CmdEndTransformFeedbackEXT)) + return reinterpret_cast(vkCmdEndTransformFeedbackEXT); + if (strcmp(pName, "vkCmdBeginQueryIndexedEXT") == 0 && (!device || device_dispatch_table(device)->CmdBeginQueryIndexedEXT)) + return reinterpret_cast(vkCmdBeginQueryIndexedEXT); + if (strcmp(pName, "vkCmdEndQueryIndexedEXT") == 0 && (!device || device_dispatch_table(device)->CmdEndQueryIndexedEXT)) + return reinterpret_cast(vkCmdEndQueryIndexedEXT); + if (strcmp(pName, "vkCmdDrawIndirectByteCountEXT") == 0 && (!device || device_dispatch_table(device)->CmdDrawIndirectByteCountEXT)) + return reinterpret_cast(vkCmdDrawIndirectByteCountEXT); + if (strcmp(pName, "vkCreateCuModuleNVX") == 0 && (!device || device_dispatch_table(device)->CreateCuModuleNVX)) + return reinterpret_cast(vkCreateCuModuleNVX); + if (strcmp(pName, "vkCreateCuFunctionNVX") == 0 && (!device || device_dispatch_table(device)->CreateCuFunctionNVX)) + return reinterpret_cast(vkCreateCuFunctionNVX); + if (strcmp(pName, "vkDestroyCuModuleNVX") == 0 && (!device || device_dispatch_table(device)->DestroyCuModuleNVX)) + return reinterpret_cast(vkDestroyCuModuleNVX); + if (strcmp(pName, "vkDestroyCuFunctionNVX") == 0 && (!device || device_dispatch_table(device)->DestroyCuFunctionNVX)) + return reinterpret_cast(vkDestroyCuFunctionNVX); + if (strcmp(pName, "vkCmdCuLaunchKernelNVX") == 0 && (!device || device_dispatch_table(device)->CmdCuLaunchKernelNVX)) + return reinterpret_cast(vkCmdCuLaunchKernelNVX); + if (strcmp(pName, "vkGetImageViewHandleNVX") == 0 && (!device || device_dispatch_table(device)->GetImageViewHandleNVX)) + return reinterpret_cast(vkGetImageViewHandleNVX); + if (strcmp(pName, "vkGetImageViewHandle64NVX") == 0 && (!device || device_dispatch_table(device)->GetImageViewHandle64NVX)) + return reinterpret_cast(vkGetImageViewHandle64NVX); + if (strcmp(pName, "vkGetImageViewAddressNVX") == 0 && (!device || device_dispatch_table(device)->GetImageViewAddressNVX)) + return reinterpret_cast(vkGetImageViewAddressNVX); + if (strcmp(pName, "vkGetDeviceCombinedImageSamplerIndexNVX") == 0 && (!device || device_dispatch_table(device)->GetDeviceCombinedImageSamplerIndexNVX)) + return reinterpret_cast(vkGetDeviceCombinedImageSamplerIndexNVX); + if (strcmp(pName, "vkCmdDrawIndirectCountAMD") == 0 && (!device || device_dispatch_table(device)->CmdDrawIndirectCountAMD)) + return reinterpret_cast(vkCmdDrawIndirectCountAMD); + if (strcmp(pName, "vkCmdDrawIndexedIndirectCountAMD") == 0 && (!device || device_dispatch_table(device)->CmdDrawIndexedIndirectCountAMD)) + return reinterpret_cast(vkCmdDrawIndexedIndirectCountAMD); + if (strcmp(pName, "vkGetShaderInfoAMD") == 0 && (!device || device_dispatch_table(device)->GetShaderInfoAMD)) + return reinterpret_cast(vkGetShaderInfoAMD); +#if defined(VK_USE_PLATFORM_WIN32_KHR) + if (strcmp(pName, "vkGetMemoryWin32HandleNV") == 0 && (!device || device_dispatch_table(device)->GetMemoryWin32HandleNV)) + return reinterpret_cast(vkGetMemoryWin32HandleNV); +#endif // VK_USE_PLATFORM_WIN32_KHR + if (strcmp(pName, "vkCmdBeginConditionalRenderingEXT") == 0 && (!device || device_dispatch_table(device)->CmdBeginConditionalRenderingEXT)) + return reinterpret_cast(vkCmdBeginConditionalRenderingEXT); + if (strcmp(pName, "vkCmdEndConditionalRenderingEXT") == 0 && (!device || device_dispatch_table(device)->CmdEndConditionalRenderingEXT)) + return reinterpret_cast(vkCmdEndConditionalRenderingEXT); + if (strcmp(pName, "vkCmdSetViewportWScalingNV") == 0 && (!device || device_dispatch_table(device)->CmdSetViewportWScalingNV)) + return reinterpret_cast(vkCmdSetViewportWScalingNV); + if (strcmp(pName, "vkDisplayPowerControlEXT") == 0 && (!device || device_dispatch_table(device)->DisplayPowerControlEXT)) + return reinterpret_cast(vkDisplayPowerControlEXT); + if (strcmp(pName, "vkRegisterDeviceEventEXT") == 0 && (!device || device_dispatch_table(device)->RegisterDeviceEventEXT)) + return reinterpret_cast(vkRegisterDeviceEventEXT); + if (strcmp(pName, "vkRegisterDisplayEventEXT") == 0 && (!device || device_dispatch_table(device)->RegisterDisplayEventEXT)) + return reinterpret_cast(vkRegisterDisplayEventEXT); + if (strcmp(pName, "vkGetSwapchainCounterEXT") == 0 && (!device || device_dispatch_table(device)->GetSwapchainCounterEXT)) + return reinterpret_cast(vkGetSwapchainCounterEXT); + if (strcmp(pName, "vkGetRefreshCycleDurationGOOGLE") == 0 && (!device || device_dispatch_table(device)->GetRefreshCycleDurationGOOGLE)) + return reinterpret_cast(vkGetRefreshCycleDurationGOOGLE); + if (strcmp(pName, "vkGetPastPresentationTimingGOOGLE") == 0 && (!device || device_dispatch_table(device)->GetPastPresentationTimingGOOGLE)) + return reinterpret_cast(vkGetPastPresentationTimingGOOGLE); + if (strcmp(pName, "vkCmdSetDiscardRectangleEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetDiscardRectangleEXT)) + return reinterpret_cast(vkCmdSetDiscardRectangleEXT); + if (strcmp(pName, "vkCmdSetDiscardRectangleEnableEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetDiscardRectangleEnableEXT)) + return reinterpret_cast(vkCmdSetDiscardRectangleEnableEXT); + if (strcmp(pName, "vkCmdSetDiscardRectangleModeEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetDiscardRectangleModeEXT)) + return reinterpret_cast(vkCmdSetDiscardRectangleModeEXT); + if (strcmp(pName, "vkSetHdrMetadataEXT") == 0 && (!device || device_dispatch_table(device)->SetHdrMetadataEXT)) + return reinterpret_cast(vkSetHdrMetadataEXT); + if (strcmp(pName, "vkSetDebugUtilsObjectNameEXT") == 0 && (!device || device_dispatch_table(device)->SetDebugUtilsObjectNameEXT)) + return reinterpret_cast(vkSetDebugUtilsObjectNameEXT); + if (strcmp(pName, "vkSetDebugUtilsObjectTagEXT") == 0 && (!device || device_dispatch_table(device)->SetDebugUtilsObjectTagEXT)) + return reinterpret_cast(vkSetDebugUtilsObjectTagEXT); + if (strcmp(pName, "vkQueueBeginDebugUtilsLabelEXT") == 0 && (!device || device_dispatch_table(device)->QueueBeginDebugUtilsLabelEXT)) + return reinterpret_cast(vkQueueBeginDebugUtilsLabelEXT); + if (strcmp(pName, "vkQueueEndDebugUtilsLabelEXT") == 0 && (!device || device_dispatch_table(device)->QueueEndDebugUtilsLabelEXT)) + return reinterpret_cast(vkQueueEndDebugUtilsLabelEXT); + if (strcmp(pName, "vkQueueInsertDebugUtilsLabelEXT") == 0 && (!device || device_dispatch_table(device)->QueueInsertDebugUtilsLabelEXT)) + return reinterpret_cast(vkQueueInsertDebugUtilsLabelEXT); + if (strcmp(pName, "vkCmdBeginDebugUtilsLabelEXT") == 0 && (!device || device_dispatch_table(device)->CmdBeginDebugUtilsLabelEXT)) + return reinterpret_cast(vkCmdBeginDebugUtilsLabelEXT); + if (strcmp(pName, "vkCmdEndDebugUtilsLabelEXT") == 0 && (!device || device_dispatch_table(device)->CmdEndDebugUtilsLabelEXT)) + return reinterpret_cast(vkCmdEndDebugUtilsLabelEXT); + if (strcmp(pName, "vkCmdInsertDebugUtilsLabelEXT") == 0 && (!device || device_dispatch_table(device)->CmdInsertDebugUtilsLabelEXT)) + return reinterpret_cast(vkCmdInsertDebugUtilsLabelEXT); +#if defined(VK_USE_PLATFORM_ANDROID_KHR) + if (strcmp(pName, "vkGetAndroidHardwareBufferPropertiesANDROID") == 0 && (!device || device_dispatch_table(device)->GetAndroidHardwareBufferPropertiesANDROID)) + return reinterpret_cast(vkGetAndroidHardwareBufferPropertiesANDROID); + if (strcmp(pName, "vkGetMemoryAndroidHardwareBufferANDROID") == 0 && (!device || device_dispatch_table(device)->GetMemoryAndroidHardwareBufferANDROID)) + return reinterpret_cast(vkGetMemoryAndroidHardwareBufferANDROID); +#endif // VK_USE_PLATFORM_ANDROID_KHR +#if defined(VK_ENABLE_BETA_EXTENSIONS) + if (strcmp(pName, "vkCreateExecutionGraphPipelinesAMDX") == 0 && (!device || device_dispatch_table(device)->CreateExecutionGraphPipelinesAMDX)) + return reinterpret_cast(vkCreateExecutionGraphPipelinesAMDX); + if (strcmp(pName, "vkGetExecutionGraphPipelineScratchSizeAMDX") == 0 && (!device || device_dispatch_table(device)->GetExecutionGraphPipelineScratchSizeAMDX)) + return reinterpret_cast(vkGetExecutionGraphPipelineScratchSizeAMDX); + if (strcmp(pName, "vkGetExecutionGraphPipelineNodeIndexAMDX") == 0 && (!device || device_dispatch_table(device)->GetExecutionGraphPipelineNodeIndexAMDX)) + return reinterpret_cast(vkGetExecutionGraphPipelineNodeIndexAMDX); + if (strcmp(pName, "vkCmdInitializeGraphScratchMemoryAMDX") == 0 && (!device || device_dispatch_table(device)->CmdInitializeGraphScratchMemoryAMDX)) + return reinterpret_cast(vkCmdInitializeGraphScratchMemoryAMDX); + if (strcmp(pName, "vkCmdDispatchGraphAMDX") == 0 && (!device || device_dispatch_table(device)->CmdDispatchGraphAMDX)) + return reinterpret_cast(vkCmdDispatchGraphAMDX); + if (strcmp(pName, "vkCmdDispatchGraphIndirectAMDX") == 0 && (!device || device_dispatch_table(device)->CmdDispatchGraphIndirectAMDX)) + return reinterpret_cast(vkCmdDispatchGraphIndirectAMDX); + if (strcmp(pName, "vkCmdDispatchGraphIndirectCountAMDX") == 0 && (!device || device_dispatch_table(device)->CmdDispatchGraphIndirectCountAMDX)) + return reinterpret_cast(vkCmdDispatchGraphIndirectCountAMDX); +#endif // VK_ENABLE_BETA_EXTENSIONS + if (strcmp(pName, "vkWriteSamplerDescriptorsEXT") == 0 && (!device || device_dispatch_table(device)->WriteSamplerDescriptorsEXT)) + return reinterpret_cast(vkWriteSamplerDescriptorsEXT); + if (strcmp(pName, "vkWriteResourceDescriptorsEXT") == 0 && (!device || device_dispatch_table(device)->WriteResourceDescriptorsEXT)) + return reinterpret_cast(vkWriteResourceDescriptorsEXT); + if (strcmp(pName, "vkCmdBindSamplerHeapEXT") == 0 && (!device || device_dispatch_table(device)->CmdBindSamplerHeapEXT)) + return reinterpret_cast(vkCmdBindSamplerHeapEXT); + if (strcmp(pName, "vkCmdBindResourceHeapEXT") == 0 && (!device || device_dispatch_table(device)->CmdBindResourceHeapEXT)) + return reinterpret_cast(vkCmdBindResourceHeapEXT); + if (strcmp(pName, "vkCmdPushDataEXT") == 0 && (!device || device_dispatch_table(device)->CmdPushDataEXT)) + return reinterpret_cast(vkCmdPushDataEXT); + if (strcmp(pName, "vkGetImageOpaqueCaptureDataEXT") == 0 && (!device || device_dispatch_table(device)->GetImageOpaqueCaptureDataEXT)) + return reinterpret_cast(vkGetImageOpaqueCaptureDataEXT); + if (strcmp(pName, "vkRegisterCustomBorderColorEXT") == 0 && (!device || device_dispatch_table(device)->RegisterCustomBorderColorEXT)) + return reinterpret_cast(vkRegisterCustomBorderColorEXT); + if (strcmp(pName, "vkUnregisterCustomBorderColorEXT") == 0 && (!device || device_dispatch_table(device)->UnregisterCustomBorderColorEXT)) + return reinterpret_cast(vkUnregisterCustomBorderColorEXT); + if (strcmp(pName, "vkGetTensorOpaqueCaptureDataARM") == 0 && (!device || device_dispatch_table(device)->GetTensorOpaqueCaptureDataARM)) + return reinterpret_cast(vkGetTensorOpaqueCaptureDataARM); + if (strcmp(pName, "vkCmdSetSampleLocationsEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetSampleLocationsEXT)) + return reinterpret_cast(vkCmdSetSampleLocationsEXT); + if (strcmp(pName, "vkGetImageDrmFormatModifierPropertiesEXT") == 0 && (!device || device_dispatch_table(device)->GetImageDrmFormatModifierPropertiesEXT)) + return reinterpret_cast(vkGetImageDrmFormatModifierPropertiesEXT); + if (strcmp(pName, "vkCreateValidationCacheEXT") == 0 && (!device || device_dispatch_table(device)->CreateValidationCacheEXT)) + return reinterpret_cast(vkCreateValidationCacheEXT); + if (strcmp(pName, "vkDestroyValidationCacheEXT") == 0 && (!device || device_dispatch_table(device)->DestroyValidationCacheEXT)) + return reinterpret_cast(vkDestroyValidationCacheEXT); + if (strcmp(pName, "vkMergeValidationCachesEXT") == 0 && (!device || device_dispatch_table(device)->MergeValidationCachesEXT)) + return reinterpret_cast(vkMergeValidationCachesEXT); + if (strcmp(pName, "vkGetValidationCacheDataEXT") == 0 && (!device || device_dispatch_table(device)->GetValidationCacheDataEXT)) + return reinterpret_cast(vkGetValidationCacheDataEXT); + if (strcmp(pName, "vkCmdBindShadingRateImageNV") == 0 && (!device || device_dispatch_table(device)->CmdBindShadingRateImageNV)) + return reinterpret_cast(vkCmdBindShadingRateImageNV); + if (strcmp(pName, "vkCmdSetViewportShadingRatePaletteNV") == 0 && (!device || device_dispatch_table(device)->CmdSetViewportShadingRatePaletteNV)) + return reinterpret_cast(vkCmdSetViewportShadingRatePaletteNV); + if (strcmp(pName, "vkCmdSetCoarseSampleOrderNV") == 0 && (!device || device_dispatch_table(device)->CmdSetCoarseSampleOrderNV)) + return reinterpret_cast(vkCmdSetCoarseSampleOrderNV); + if (strcmp(pName, "vkCreateAccelerationStructureNV") == 0 && (!device || device_dispatch_table(device)->CreateAccelerationStructureNV)) + return reinterpret_cast(vkCreateAccelerationStructureNV); + if (strcmp(pName, "vkDestroyAccelerationStructureNV") == 0 && (!device || device_dispatch_table(device)->DestroyAccelerationStructureNV)) + return reinterpret_cast(vkDestroyAccelerationStructureNV); + if (strcmp(pName, "vkGetAccelerationStructureMemoryRequirementsNV") == 0 && (!device || device_dispatch_table(device)->GetAccelerationStructureMemoryRequirementsNV)) + return reinterpret_cast(vkGetAccelerationStructureMemoryRequirementsNV); + if (strcmp(pName, "vkBindAccelerationStructureMemoryNV") == 0 && (!device || device_dispatch_table(device)->BindAccelerationStructureMemoryNV)) + return reinterpret_cast(vkBindAccelerationStructureMemoryNV); + if (strcmp(pName, "vkCmdBuildAccelerationStructureNV") == 0 && (!device || device_dispatch_table(device)->CmdBuildAccelerationStructureNV)) + return reinterpret_cast(vkCmdBuildAccelerationStructureNV); + if (strcmp(pName, "vkCmdCopyAccelerationStructureNV") == 0 && (!device || device_dispatch_table(device)->CmdCopyAccelerationStructureNV)) + return reinterpret_cast(vkCmdCopyAccelerationStructureNV); + if (strcmp(pName, "vkCmdTraceRaysNV") == 0 && (!device || device_dispatch_table(device)->CmdTraceRaysNV)) + return reinterpret_cast(vkCmdTraceRaysNV); + if (strcmp(pName, "vkCreateRayTracingPipelinesNV") == 0 && (!device || device_dispatch_table(device)->CreateRayTracingPipelinesNV)) + return reinterpret_cast(vkCreateRayTracingPipelinesNV); + if (strcmp(pName, "vkGetRayTracingShaderGroupHandlesKHR") == 0 && (!device || device_dispatch_table(device)->GetRayTracingShaderGroupHandlesKHR)) + return reinterpret_cast(vkGetRayTracingShaderGroupHandlesKHR); + if (strcmp(pName, "vkGetRayTracingShaderGroupHandlesNV") == 0 && (!device || device_dispatch_table(device)->GetRayTracingShaderGroupHandlesNV)) + return reinterpret_cast(vkGetRayTracingShaderGroupHandlesNV); + if (strcmp(pName, "vkGetAccelerationStructureHandleNV") == 0 && (!device || device_dispatch_table(device)->GetAccelerationStructureHandleNV)) + return reinterpret_cast(vkGetAccelerationStructureHandleNV); + if (strcmp(pName, "vkCmdWriteAccelerationStructuresPropertiesNV") == 0 && (!device || device_dispatch_table(device)->CmdWriteAccelerationStructuresPropertiesNV)) + return reinterpret_cast(vkCmdWriteAccelerationStructuresPropertiesNV); + if (strcmp(pName, "vkCompileDeferredNV") == 0 && (!device || device_dispatch_table(device)->CompileDeferredNV)) + return reinterpret_cast(vkCompileDeferredNV); + if (strcmp(pName, "vkGetMemoryHostPointerPropertiesEXT") == 0 && (!device || device_dispatch_table(device)->GetMemoryHostPointerPropertiesEXT)) + return reinterpret_cast(vkGetMemoryHostPointerPropertiesEXT); + if (strcmp(pName, "vkCmdWriteBufferMarkerAMD") == 0 && (!device || device_dispatch_table(device)->CmdWriteBufferMarkerAMD)) + return reinterpret_cast(vkCmdWriteBufferMarkerAMD); + if (strcmp(pName, "vkCmdWriteBufferMarker2AMD") == 0 && (!device || device_dispatch_table(device)->CmdWriteBufferMarker2AMD)) + return reinterpret_cast(vkCmdWriteBufferMarker2AMD); + if (strcmp(pName, "vkGetCalibratedTimestampsEXT") == 0 && (!device || device_dispatch_table(device)->GetCalibratedTimestampsEXT)) + return reinterpret_cast(vkGetCalibratedTimestampsEXT); + if (strcmp(pName, "vkCmdDrawMeshTasksNV") == 0 && (!device || device_dispatch_table(device)->CmdDrawMeshTasksNV)) + return reinterpret_cast(vkCmdDrawMeshTasksNV); + if (strcmp(pName, "vkCmdDrawMeshTasksIndirectNV") == 0 && (!device || device_dispatch_table(device)->CmdDrawMeshTasksIndirectNV)) + return reinterpret_cast(vkCmdDrawMeshTasksIndirectNV); + if (strcmp(pName, "vkCmdDrawMeshTasksIndirectCountNV") == 0 && (!device || device_dispatch_table(device)->CmdDrawMeshTasksIndirectCountNV)) + return reinterpret_cast(vkCmdDrawMeshTasksIndirectCountNV); + if (strcmp(pName, "vkCmdSetExclusiveScissorEnableNV") == 0 && (!device || device_dispatch_table(device)->CmdSetExclusiveScissorEnableNV)) + return reinterpret_cast(vkCmdSetExclusiveScissorEnableNV); + if (strcmp(pName, "vkCmdSetExclusiveScissorNV") == 0 && (!device || device_dispatch_table(device)->CmdSetExclusiveScissorNV)) + return reinterpret_cast(vkCmdSetExclusiveScissorNV); + if (strcmp(pName, "vkCmdSetCheckpointNV") == 0 && (!device || device_dispatch_table(device)->CmdSetCheckpointNV)) + return reinterpret_cast(vkCmdSetCheckpointNV); + if (strcmp(pName, "vkGetQueueCheckpointDataNV") == 0 && (!device || device_dispatch_table(device)->GetQueueCheckpointDataNV)) + return reinterpret_cast(vkGetQueueCheckpointDataNV); + if (strcmp(pName, "vkGetQueueCheckpointData2NV") == 0 && (!device || device_dispatch_table(device)->GetQueueCheckpointData2NV)) + return reinterpret_cast(vkGetQueueCheckpointData2NV); + if (strcmp(pName, "vkSetSwapchainPresentTimingQueueSizeEXT") == 0 && (!device || device_dispatch_table(device)->SetSwapchainPresentTimingQueueSizeEXT)) + return reinterpret_cast(vkSetSwapchainPresentTimingQueueSizeEXT); + if (strcmp(pName, "vkGetSwapchainTimingPropertiesEXT") == 0 && (!device || device_dispatch_table(device)->GetSwapchainTimingPropertiesEXT)) + return reinterpret_cast(vkGetSwapchainTimingPropertiesEXT); + if (strcmp(pName, "vkGetSwapchainTimeDomainPropertiesEXT") == 0 && (!device || device_dispatch_table(device)->GetSwapchainTimeDomainPropertiesEXT)) + return reinterpret_cast(vkGetSwapchainTimeDomainPropertiesEXT); + if (strcmp(pName, "vkGetPastPresentationTimingEXT") == 0 && (!device || device_dispatch_table(device)->GetPastPresentationTimingEXT)) + return reinterpret_cast(vkGetPastPresentationTimingEXT); + if (strcmp(pName, "vkInitializePerformanceApiINTEL") == 0 && (!device || device_dispatch_table(device)->InitializePerformanceApiINTEL)) + return reinterpret_cast(vkInitializePerformanceApiINTEL); + if (strcmp(pName, "vkUninitializePerformanceApiINTEL") == 0 && (!device || device_dispatch_table(device)->UninitializePerformanceApiINTEL)) + return reinterpret_cast(vkUninitializePerformanceApiINTEL); + if (strcmp(pName, "vkCmdSetPerformanceMarkerINTEL") == 0 && (!device || device_dispatch_table(device)->CmdSetPerformanceMarkerINTEL)) + return reinterpret_cast(vkCmdSetPerformanceMarkerINTEL); + if (strcmp(pName, "vkCmdSetPerformanceStreamMarkerINTEL") == 0 && (!device || device_dispatch_table(device)->CmdSetPerformanceStreamMarkerINTEL)) + return reinterpret_cast(vkCmdSetPerformanceStreamMarkerINTEL); + if (strcmp(pName, "vkCmdSetPerformanceOverrideINTEL") == 0 && (!device || device_dispatch_table(device)->CmdSetPerformanceOverrideINTEL)) + return reinterpret_cast(vkCmdSetPerformanceOverrideINTEL); + if (strcmp(pName, "vkAcquirePerformanceConfigurationINTEL") == 0 && (!device || device_dispatch_table(device)->AcquirePerformanceConfigurationINTEL)) + return reinterpret_cast(vkAcquirePerformanceConfigurationINTEL); + if (strcmp(pName, "vkReleasePerformanceConfigurationINTEL") == 0 && (!device || device_dispatch_table(device)->ReleasePerformanceConfigurationINTEL)) + return reinterpret_cast(vkReleasePerformanceConfigurationINTEL); + if (strcmp(pName, "vkQueueSetPerformanceConfigurationINTEL") == 0 && (!device || device_dispatch_table(device)->QueueSetPerformanceConfigurationINTEL)) + return reinterpret_cast(vkQueueSetPerformanceConfigurationINTEL); + if (strcmp(pName, "vkGetPerformanceParameterINTEL") == 0 && (!device || device_dispatch_table(device)->GetPerformanceParameterINTEL)) + return reinterpret_cast(vkGetPerformanceParameterINTEL); + if (strcmp(pName, "vkSetLocalDimmingAMD") == 0 && (!device || device_dispatch_table(device)->SetLocalDimmingAMD)) + return reinterpret_cast(vkSetLocalDimmingAMD); + if (strcmp(pName, "vkGetBufferDeviceAddressEXT") == 0 && (!device || device_dispatch_table(device)->GetBufferDeviceAddressEXT)) + return reinterpret_cast(vkGetBufferDeviceAddressEXT); +#if defined(VK_USE_PLATFORM_WIN32_KHR) + if (strcmp(pName, "vkAcquireFullScreenExclusiveModeEXT") == 0 && (!device || device_dispatch_table(device)->AcquireFullScreenExclusiveModeEXT)) + return reinterpret_cast(vkAcquireFullScreenExclusiveModeEXT); + if (strcmp(pName, "vkReleaseFullScreenExclusiveModeEXT") == 0 && (!device || device_dispatch_table(device)->ReleaseFullScreenExclusiveModeEXT)) + return reinterpret_cast(vkReleaseFullScreenExclusiveModeEXT); + if (strcmp(pName, "vkGetDeviceGroupSurfacePresentModes2EXT") == 0 && (!device || device_dispatch_table(device)->GetDeviceGroupSurfacePresentModes2EXT)) + return reinterpret_cast(vkGetDeviceGroupSurfacePresentModes2EXT); +#endif // VK_USE_PLATFORM_WIN32_KHR + if (strcmp(pName, "vkCmdSetLineStippleEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetLineStippleEXT)) + return reinterpret_cast(vkCmdSetLineStippleEXT); + if (strcmp(pName, "vkResetQueryPoolEXT") == 0 && (!device || device_dispatch_table(device)->ResetQueryPoolEXT)) + return reinterpret_cast(vkResetQueryPoolEXT); + if (strcmp(pName, "vkCmdSetCullModeEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetCullModeEXT)) + return reinterpret_cast(vkCmdSetCullModeEXT); + if (strcmp(pName, "vkCmdSetFrontFaceEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetFrontFaceEXT)) + return reinterpret_cast(vkCmdSetFrontFaceEXT); + if (strcmp(pName, "vkCmdSetPrimitiveTopologyEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetPrimitiveTopologyEXT)) + return reinterpret_cast(vkCmdSetPrimitiveTopologyEXT); + if (strcmp(pName, "vkCmdSetViewportWithCountEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetViewportWithCountEXT)) + return reinterpret_cast(vkCmdSetViewportWithCountEXT); + if (strcmp(pName, "vkCmdSetScissorWithCountEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetScissorWithCountEXT)) + return reinterpret_cast(vkCmdSetScissorWithCountEXT); + if (strcmp(pName, "vkCmdBindVertexBuffers2EXT") == 0 && (!device || device_dispatch_table(device)->CmdBindVertexBuffers2EXT)) + return reinterpret_cast(vkCmdBindVertexBuffers2EXT); + if (strcmp(pName, "vkCmdSetDepthTestEnableEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetDepthTestEnableEXT)) + return reinterpret_cast(vkCmdSetDepthTestEnableEXT); + if (strcmp(pName, "vkCmdSetDepthWriteEnableEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetDepthWriteEnableEXT)) + return reinterpret_cast(vkCmdSetDepthWriteEnableEXT); + if (strcmp(pName, "vkCmdSetDepthCompareOpEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetDepthCompareOpEXT)) + return reinterpret_cast(vkCmdSetDepthCompareOpEXT); + if (strcmp(pName, "vkCmdSetDepthBoundsTestEnableEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetDepthBoundsTestEnableEXT)) + return reinterpret_cast(vkCmdSetDepthBoundsTestEnableEXT); + if (strcmp(pName, "vkCmdSetStencilTestEnableEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetStencilTestEnableEXT)) + return reinterpret_cast(vkCmdSetStencilTestEnableEXT); + if (strcmp(pName, "vkCmdSetStencilOpEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetStencilOpEXT)) + return reinterpret_cast(vkCmdSetStencilOpEXT); + if (strcmp(pName, "vkCopyMemoryToImageEXT") == 0 && (!device || device_dispatch_table(device)->CopyMemoryToImageEXT)) + return reinterpret_cast(vkCopyMemoryToImageEXT); + if (strcmp(pName, "vkCopyImageToMemoryEXT") == 0 && (!device || device_dispatch_table(device)->CopyImageToMemoryEXT)) + return reinterpret_cast(vkCopyImageToMemoryEXT); + if (strcmp(pName, "vkCopyImageToImageEXT") == 0 && (!device || device_dispatch_table(device)->CopyImageToImageEXT)) + return reinterpret_cast(vkCopyImageToImageEXT); + if (strcmp(pName, "vkTransitionImageLayoutEXT") == 0 && (!device || device_dispatch_table(device)->TransitionImageLayoutEXT)) + return reinterpret_cast(vkTransitionImageLayoutEXT); + if (strcmp(pName, "vkGetImageSubresourceLayout2EXT") == 0 && (!device || device_dispatch_table(device)->GetImageSubresourceLayout2EXT)) + return reinterpret_cast(vkGetImageSubresourceLayout2EXT); + if (strcmp(pName, "vkReleaseSwapchainImagesEXT") == 0 && (!device || device_dispatch_table(device)->ReleaseSwapchainImagesEXT)) + return reinterpret_cast(vkReleaseSwapchainImagesEXT); + if (strcmp(pName, "vkGetGeneratedCommandsMemoryRequirementsNV") == 0 && (!device || device_dispatch_table(device)->GetGeneratedCommandsMemoryRequirementsNV)) + return reinterpret_cast(vkGetGeneratedCommandsMemoryRequirementsNV); + if (strcmp(pName, "vkCmdPreprocessGeneratedCommandsNV") == 0 && (!device || device_dispatch_table(device)->CmdPreprocessGeneratedCommandsNV)) + return reinterpret_cast(vkCmdPreprocessGeneratedCommandsNV); + if (strcmp(pName, "vkCmdExecuteGeneratedCommandsNV") == 0 && (!device || device_dispatch_table(device)->CmdExecuteGeneratedCommandsNV)) + return reinterpret_cast(vkCmdExecuteGeneratedCommandsNV); + if (strcmp(pName, "vkCmdBindPipelineShaderGroupNV") == 0 && (!device || device_dispatch_table(device)->CmdBindPipelineShaderGroupNV)) + return reinterpret_cast(vkCmdBindPipelineShaderGroupNV); + if (strcmp(pName, "vkCreateIndirectCommandsLayoutNV") == 0 && (!device || device_dispatch_table(device)->CreateIndirectCommandsLayoutNV)) + return reinterpret_cast(vkCreateIndirectCommandsLayoutNV); + if (strcmp(pName, "vkDestroyIndirectCommandsLayoutNV") == 0 && (!device || device_dispatch_table(device)->DestroyIndirectCommandsLayoutNV)) + return reinterpret_cast(vkDestroyIndirectCommandsLayoutNV); + if (strcmp(pName, "vkCmdSetDepthBias2EXT") == 0 && (!device || device_dispatch_table(device)->CmdSetDepthBias2EXT)) + return reinterpret_cast(vkCmdSetDepthBias2EXT); + if (strcmp(pName, "vkCreatePrivateDataSlotEXT") == 0 && (!device || device_dispatch_table(device)->CreatePrivateDataSlotEXT)) + return reinterpret_cast(vkCreatePrivateDataSlotEXT); + if (strcmp(pName, "vkDestroyPrivateDataSlotEXT") == 0 && (!device || device_dispatch_table(device)->DestroyPrivateDataSlotEXT)) + return reinterpret_cast(vkDestroyPrivateDataSlotEXT); + if (strcmp(pName, "vkSetPrivateDataEXT") == 0 && (!device || device_dispatch_table(device)->SetPrivateDataEXT)) + return reinterpret_cast(vkSetPrivateDataEXT); + if (strcmp(pName, "vkGetPrivateDataEXT") == 0 && (!device || device_dispatch_table(device)->GetPrivateDataEXT)) + return reinterpret_cast(vkGetPrivateDataEXT); +#if defined(VK_ENABLE_BETA_EXTENSIONS) + if (strcmp(pName, "vkCreateCudaModuleNV") == 0 && (!device || device_dispatch_table(device)->CreateCudaModuleNV)) + return reinterpret_cast(vkCreateCudaModuleNV); + if (strcmp(pName, "vkGetCudaModuleCacheNV") == 0 && (!device || device_dispatch_table(device)->GetCudaModuleCacheNV)) + return reinterpret_cast(vkGetCudaModuleCacheNV); + if (strcmp(pName, "vkCreateCudaFunctionNV") == 0 && (!device || device_dispatch_table(device)->CreateCudaFunctionNV)) + return reinterpret_cast(vkCreateCudaFunctionNV); + if (strcmp(pName, "vkDestroyCudaModuleNV") == 0 && (!device || device_dispatch_table(device)->DestroyCudaModuleNV)) + return reinterpret_cast(vkDestroyCudaModuleNV); + if (strcmp(pName, "vkDestroyCudaFunctionNV") == 0 && (!device || device_dispatch_table(device)->DestroyCudaFunctionNV)) + return reinterpret_cast(vkDestroyCudaFunctionNV); + if (strcmp(pName, "vkCmdCudaLaunchKernelNV") == 0 && (!device || device_dispatch_table(device)->CmdCudaLaunchKernelNV)) + return reinterpret_cast(vkCmdCudaLaunchKernelNV); +#endif // VK_ENABLE_BETA_EXTENSIONS + if (strcmp(pName, "vkCmdDispatchTileQCOM") == 0 && (!device || device_dispatch_table(device)->CmdDispatchTileQCOM)) + return reinterpret_cast(vkCmdDispatchTileQCOM); + if (strcmp(pName, "vkCmdBeginPerTileExecutionQCOM") == 0 && (!device || device_dispatch_table(device)->CmdBeginPerTileExecutionQCOM)) + return reinterpret_cast(vkCmdBeginPerTileExecutionQCOM); + if (strcmp(pName, "vkCmdEndPerTileExecutionQCOM") == 0 && (!device || device_dispatch_table(device)->CmdEndPerTileExecutionQCOM)) + return reinterpret_cast(vkCmdEndPerTileExecutionQCOM); +#if defined(VK_USE_PLATFORM_METAL_EXT) + if (strcmp(pName, "vkExportMetalObjectsEXT") == 0 && (!device || device_dispatch_table(device)->ExportMetalObjectsEXT)) + return reinterpret_cast(vkExportMetalObjectsEXT); +#endif // VK_USE_PLATFORM_METAL_EXT + if (strcmp(pName, "vkGetDescriptorSetLayoutSizeEXT") == 0 && (!device || device_dispatch_table(device)->GetDescriptorSetLayoutSizeEXT)) + return reinterpret_cast(vkGetDescriptorSetLayoutSizeEXT); + if (strcmp(pName, "vkGetDescriptorSetLayoutBindingOffsetEXT") == 0 && (!device || device_dispatch_table(device)->GetDescriptorSetLayoutBindingOffsetEXT)) + return reinterpret_cast(vkGetDescriptorSetLayoutBindingOffsetEXT); + if (strcmp(pName, "vkGetDescriptorEXT") == 0 && (!device || device_dispatch_table(device)->GetDescriptorEXT)) + return reinterpret_cast(vkGetDescriptorEXT); + if (strcmp(pName, "vkCmdBindDescriptorBuffersEXT") == 0 && (!device || device_dispatch_table(device)->CmdBindDescriptorBuffersEXT)) + return reinterpret_cast(vkCmdBindDescriptorBuffersEXT); + if (strcmp(pName, "vkCmdSetDescriptorBufferOffsetsEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetDescriptorBufferOffsetsEXT)) + return reinterpret_cast(vkCmdSetDescriptorBufferOffsetsEXT); + if (strcmp(pName, "vkCmdBindDescriptorBufferEmbeddedSamplersEXT") == 0 && (!device || device_dispatch_table(device)->CmdBindDescriptorBufferEmbeddedSamplersEXT)) + return reinterpret_cast(vkCmdBindDescriptorBufferEmbeddedSamplersEXT); + if (strcmp(pName, "vkGetBufferOpaqueCaptureDescriptorDataEXT") == 0 && (!device || device_dispatch_table(device)->GetBufferOpaqueCaptureDescriptorDataEXT)) + return reinterpret_cast(vkGetBufferOpaqueCaptureDescriptorDataEXT); + if (strcmp(pName, "vkGetImageOpaqueCaptureDescriptorDataEXT") == 0 && (!device || device_dispatch_table(device)->GetImageOpaqueCaptureDescriptorDataEXT)) + return reinterpret_cast(vkGetImageOpaqueCaptureDescriptorDataEXT); + if (strcmp(pName, "vkGetImageViewOpaqueCaptureDescriptorDataEXT") == 0 && (!device || device_dispatch_table(device)->GetImageViewOpaqueCaptureDescriptorDataEXT)) + return reinterpret_cast(vkGetImageViewOpaqueCaptureDescriptorDataEXT); + if (strcmp(pName, "vkGetSamplerOpaqueCaptureDescriptorDataEXT") == 0 && (!device || device_dispatch_table(device)->GetSamplerOpaqueCaptureDescriptorDataEXT)) + return reinterpret_cast(vkGetSamplerOpaqueCaptureDescriptorDataEXT); + if (strcmp(pName, "vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT") == 0 && (!device || device_dispatch_table(device)->GetAccelerationStructureOpaqueCaptureDescriptorDataEXT)) + return reinterpret_cast(vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT); + if (strcmp(pName, "vkCmdSetFragmentShadingRateEnumNV") == 0 && (!device || device_dispatch_table(device)->CmdSetFragmentShadingRateEnumNV)) + return reinterpret_cast(vkCmdSetFragmentShadingRateEnumNV); + if (strcmp(pName, "vkGetDeviceFaultInfoEXT") == 0 && (!device || device_dispatch_table(device)->GetDeviceFaultInfoEXT)) + return reinterpret_cast(vkGetDeviceFaultInfoEXT); + if (strcmp(pName, "vkCmdSetVertexInputEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetVertexInputEXT)) + return reinterpret_cast(vkCmdSetVertexInputEXT); +#if defined(VK_USE_PLATFORM_FUCHSIA) + if (strcmp(pName, "vkGetMemoryZirconHandleFUCHSIA") == 0 && (!device || device_dispatch_table(device)->GetMemoryZirconHandleFUCHSIA)) + return reinterpret_cast(vkGetMemoryZirconHandleFUCHSIA); + if (strcmp(pName, "vkGetMemoryZirconHandlePropertiesFUCHSIA") == 0 && (!device || device_dispatch_table(device)->GetMemoryZirconHandlePropertiesFUCHSIA)) + return reinterpret_cast(vkGetMemoryZirconHandlePropertiesFUCHSIA); + if (strcmp(pName, "vkImportSemaphoreZirconHandleFUCHSIA") == 0 && (!device || device_dispatch_table(device)->ImportSemaphoreZirconHandleFUCHSIA)) + return reinterpret_cast(vkImportSemaphoreZirconHandleFUCHSIA); + if (strcmp(pName, "vkGetSemaphoreZirconHandleFUCHSIA") == 0 && (!device || device_dispatch_table(device)->GetSemaphoreZirconHandleFUCHSIA)) + return reinterpret_cast(vkGetSemaphoreZirconHandleFUCHSIA); + if (strcmp(pName, "vkCreateBufferCollectionFUCHSIA") == 0 && (!device || device_dispatch_table(device)->CreateBufferCollectionFUCHSIA)) + return reinterpret_cast(vkCreateBufferCollectionFUCHSIA); + if (strcmp(pName, "vkSetBufferCollectionImageConstraintsFUCHSIA") == 0 && (!device || device_dispatch_table(device)->SetBufferCollectionImageConstraintsFUCHSIA)) + return reinterpret_cast(vkSetBufferCollectionImageConstraintsFUCHSIA); + if (strcmp(pName, "vkSetBufferCollectionBufferConstraintsFUCHSIA") == 0 && (!device || device_dispatch_table(device)->SetBufferCollectionBufferConstraintsFUCHSIA)) + return reinterpret_cast(vkSetBufferCollectionBufferConstraintsFUCHSIA); + if (strcmp(pName, "vkDestroyBufferCollectionFUCHSIA") == 0 && (!device || device_dispatch_table(device)->DestroyBufferCollectionFUCHSIA)) + return reinterpret_cast(vkDestroyBufferCollectionFUCHSIA); + if (strcmp(pName, "vkGetBufferCollectionPropertiesFUCHSIA") == 0 && (!device || device_dispatch_table(device)->GetBufferCollectionPropertiesFUCHSIA)) + return reinterpret_cast(vkGetBufferCollectionPropertiesFUCHSIA); +#endif // VK_USE_PLATFORM_FUCHSIA + if (strcmp(pName, "vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI") == 0 && (!device || device_dispatch_table(device)->GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI)) + return reinterpret_cast(vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI); + if (strcmp(pName, "vkCmdSubpassShadingHUAWEI") == 0 && (!device || device_dispatch_table(device)->CmdSubpassShadingHUAWEI)) + return reinterpret_cast(vkCmdSubpassShadingHUAWEI); + if (strcmp(pName, "vkCmdBindInvocationMaskHUAWEI") == 0 && (!device || device_dispatch_table(device)->CmdBindInvocationMaskHUAWEI)) + return reinterpret_cast(vkCmdBindInvocationMaskHUAWEI); + if (strcmp(pName, "vkGetMemoryRemoteAddressNV") == 0 && (!device || device_dispatch_table(device)->GetMemoryRemoteAddressNV)) + return reinterpret_cast(vkGetMemoryRemoteAddressNV); + if (strcmp(pName, "vkGetPipelinePropertiesEXT") == 0 && (!device || device_dispatch_table(device)->GetPipelinePropertiesEXT)) + return reinterpret_cast(vkGetPipelinePropertiesEXT); + if (strcmp(pName, "vkCmdSetPatchControlPointsEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetPatchControlPointsEXT)) + return reinterpret_cast(vkCmdSetPatchControlPointsEXT); + if (strcmp(pName, "vkCmdSetRasterizerDiscardEnableEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetRasterizerDiscardEnableEXT)) + return reinterpret_cast(vkCmdSetRasterizerDiscardEnableEXT); + if (strcmp(pName, "vkCmdSetDepthBiasEnableEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetDepthBiasEnableEXT)) + return reinterpret_cast(vkCmdSetDepthBiasEnableEXT); + if (strcmp(pName, "vkCmdSetLogicOpEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetLogicOpEXT)) + return reinterpret_cast(vkCmdSetLogicOpEXT); + if (strcmp(pName, "vkCmdSetPrimitiveRestartEnableEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetPrimitiveRestartEnableEXT)) + return reinterpret_cast(vkCmdSetPrimitiveRestartEnableEXT); + if (strcmp(pName, "vkCmdSetColorWriteEnableEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetColorWriteEnableEXT)) + return reinterpret_cast(vkCmdSetColorWriteEnableEXT); + if (strcmp(pName, "vkCmdDrawMultiEXT") == 0 && (!device || device_dispatch_table(device)->CmdDrawMultiEXT)) + return reinterpret_cast(vkCmdDrawMultiEXT); + if (strcmp(pName, "vkCmdDrawMultiIndexedEXT") == 0 && (!device || device_dispatch_table(device)->CmdDrawMultiIndexedEXT)) + return reinterpret_cast(vkCmdDrawMultiIndexedEXT); + if (strcmp(pName, "vkCreateMicromapEXT") == 0 && (!device || device_dispatch_table(device)->CreateMicromapEXT)) + return reinterpret_cast(vkCreateMicromapEXT); + if (strcmp(pName, "vkDestroyMicromapEXT") == 0 && (!device || device_dispatch_table(device)->DestroyMicromapEXT)) + return reinterpret_cast(vkDestroyMicromapEXT); + if (strcmp(pName, "vkCmdBuildMicromapsEXT") == 0 && (!device || device_dispatch_table(device)->CmdBuildMicromapsEXT)) + return reinterpret_cast(vkCmdBuildMicromapsEXT); + if (strcmp(pName, "vkBuildMicromapsEXT") == 0 && (!device || device_dispatch_table(device)->BuildMicromapsEXT)) + return reinterpret_cast(vkBuildMicromapsEXT); + if (strcmp(pName, "vkCopyMicromapEXT") == 0 && (!device || device_dispatch_table(device)->CopyMicromapEXT)) + return reinterpret_cast(vkCopyMicromapEXT); + if (strcmp(pName, "vkCopyMicromapToMemoryEXT") == 0 && (!device || device_dispatch_table(device)->CopyMicromapToMemoryEXT)) + return reinterpret_cast(vkCopyMicromapToMemoryEXT); + if (strcmp(pName, "vkCopyMemoryToMicromapEXT") == 0 && (!device || device_dispatch_table(device)->CopyMemoryToMicromapEXT)) + return reinterpret_cast(vkCopyMemoryToMicromapEXT); + if (strcmp(pName, "vkWriteMicromapsPropertiesEXT") == 0 && (!device || device_dispatch_table(device)->WriteMicromapsPropertiesEXT)) + return reinterpret_cast(vkWriteMicromapsPropertiesEXT); + if (strcmp(pName, "vkCmdCopyMicromapEXT") == 0 && (!device || device_dispatch_table(device)->CmdCopyMicromapEXT)) + return reinterpret_cast(vkCmdCopyMicromapEXT); + if (strcmp(pName, "vkCmdCopyMicromapToMemoryEXT") == 0 && (!device || device_dispatch_table(device)->CmdCopyMicromapToMemoryEXT)) + return reinterpret_cast(vkCmdCopyMicromapToMemoryEXT); + if (strcmp(pName, "vkCmdCopyMemoryToMicromapEXT") == 0 && (!device || device_dispatch_table(device)->CmdCopyMemoryToMicromapEXT)) + return reinterpret_cast(vkCmdCopyMemoryToMicromapEXT); + if (strcmp(pName, "vkCmdWriteMicromapsPropertiesEXT") == 0 && (!device || device_dispatch_table(device)->CmdWriteMicromapsPropertiesEXT)) + return reinterpret_cast(vkCmdWriteMicromapsPropertiesEXT); + if (strcmp(pName, "vkGetDeviceMicromapCompatibilityEXT") == 0 && (!device || device_dispatch_table(device)->GetDeviceMicromapCompatibilityEXT)) + return reinterpret_cast(vkGetDeviceMicromapCompatibilityEXT); + if (strcmp(pName, "vkGetMicromapBuildSizesEXT") == 0 && (!device || device_dispatch_table(device)->GetMicromapBuildSizesEXT)) + return reinterpret_cast(vkGetMicromapBuildSizesEXT); + if (strcmp(pName, "vkCmdDrawClusterHUAWEI") == 0 && (!device || device_dispatch_table(device)->CmdDrawClusterHUAWEI)) + return reinterpret_cast(vkCmdDrawClusterHUAWEI); + if (strcmp(pName, "vkCmdDrawClusterIndirectHUAWEI") == 0 && (!device || device_dispatch_table(device)->CmdDrawClusterIndirectHUAWEI)) + return reinterpret_cast(vkCmdDrawClusterIndirectHUAWEI); + if (strcmp(pName, "vkSetDeviceMemoryPriorityEXT") == 0 && (!device || device_dispatch_table(device)->SetDeviceMemoryPriorityEXT)) + return reinterpret_cast(vkSetDeviceMemoryPriorityEXT); + if (strcmp(pName, "vkGetDescriptorSetLayoutHostMappingInfoVALVE") == 0 && (!device || device_dispatch_table(device)->GetDescriptorSetLayoutHostMappingInfoVALVE)) + return reinterpret_cast(vkGetDescriptorSetLayoutHostMappingInfoVALVE); + if (strcmp(pName, "vkGetDescriptorSetHostMappingVALVE") == 0 && (!device || device_dispatch_table(device)->GetDescriptorSetHostMappingVALVE)) + return reinterpret_cast(vkGetDescriptorSetHostMappingVALVE); + if (strcmp(pName, "vkCmdCopyMemoryIndirectNV") == 0 && (!device || device_dispatch_table(device)->CmdCopyMemoryIndirectNV)) + return reinterpret_cast(vkCmdCopyMemoryIndirectNV); + if (strcmp(pName, "vkCmdCopyMemoryToImageIndirectNV") == 0 && (!device || device_dispatch_table(device)->CmdCopyMemoryToImageIndirectNV)) + return reinterpret_cast(vkCmdCopyMemoryToImageIndirectNV); + if (strcmp(pName, "vkCmdDecompressMemoryNV") == 0 && (!device || device_dispatch_table(device)->CmdDecompressMemoryNV)) + return reinterpret_cast(vkCmdDecompressMemoryNV); + if (strcmp(pName, "vkCmdDecompressMemoryIndirectCountNV") == 0 && (!device || device_dispatch_table(device)->CmdDecompressMemoryIndirectCountNV)) + return reinterpret_cast(vkCmdDecompressMemoryIndirectCountNV); + if (strcmp(pName, "vkGetPipelineIndirectMemoryRequirementsNV") == 0 && (!device || device_dispatch_table(device)->GetPipelineIndirectMemoryRequirementsNV)) + return reinterpret_cast(vkGetPipelineIndirectMemoryRequirementsNV); + if (strcmp(pName, "vkCmdUpdatePipelineIndirectBufferNV") == 0 && (!device || device_dispatch_table(device)->CmdUpdatePipelineIndirectBufferNV)) + return reinterpret_cast(vkCmdUpdatePipelineIndirectBufferNV); + if (strcmp(pName, "vkGetPipelineIndirectDeviceAddressNV") == 0 && (!device || device_dispatch_table(device)->GetPipelineIndirectDeviceAddressNV)) + return reinterpret_cast(vkGetPipelineIndirectDeviceAddressNV); +#if defined(VK_USE_PLATFORM_OHOS) + if (strcmp(pName, "vkGetNativeBufferPropertiesOHOS") == 0 && (!device || device_dispatch_table(device)->GetNativeBufferPropertiesOHOS)) + return reinterpret_cast(vkGetNativeBufferPropertiesOHOS); + if (strcmp(pName, "vkGetMemoryNativeBufferOHOS") == 0 && (!device || device_dispatch_table(device)->GetMemoryNativeBufferOHOS)) + return reinterpret_cast(vkGetMemoryNativeBufferOHOS); +#endif // VK_USE_PLATFORM_OHOS + if (strcmp(pName, "vkCmdSetDepthClampEnableEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetDepthClampEnableEXT)) + return reinterpret_cast(vkCmdSetDepthClampEnableEXT); + if (strcmp(pName, "vkCmdSetPolygonModeEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetPolygonModeEXT)) + return reinterpret_cast(vkCmdSetPolygonModeEXT); + if (strcmp(pName, "vkCmdSetRasterizationSamplesEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetRasterizationSamplesEXT)) + return reinterpret_cast(vkCmdSetRasterizationSamplesEXT); + if (strcmp(pName, "vkCmdSetSampleMaskEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetSampleMaskEXT)) + return reinterpret_cast(vkCmdSetSampleMaskEXT); + if (strcmp(pName, "vkCmdSetAlphaToCoverageEnableEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetAlphaToCoverageEnableEXT)) + return reinterpret_cast(vkCmdSetAlphaToCoverageEnableEXT); + if (strcmp(pName, "vkCmdSetAlphaToOneEnableEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetAlphaToOneEnableEXT)) + return reinterpret_cast(vkCmdSetAlphaToOneEnableEXT); + if (strcmp(pName, "vkCmdSetLogicOpEnableEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetLogicOpEnableEXT)) + return reinterpret_cast(vkCmdSetLogicOpEnableEXT); + if (strcmp(pName, "vkCmdSetColorBlendEnableEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetColorBlendEnableEXT)) + return reinterpret_cast(vkCmdSetColorBlendEnableEXT); + if (strcmp(pName, "vkCmdSetColorBlendEquationEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetColorBlendEquationEXT)) + return reinterpret_cast(vkCmdSetColorBlendEquationEXT); + if (strcmp(pName, "vkCmdSetColorWriteMaskEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetColorWriteMaskEXT)) + return reinterpret_cast(vkCmdSetColorWriteMaskEXT); + if (strcmp(pName, "vkCmdSetTessellationDomainOriginEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetTessellationDomainOriginEXT)) + return reinterpret_cast(vkCmdSetTessellationDomainOriginEXT); + if (strcmp(pName, "vkCmdSetRasterizationStreamEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetRasterizationStreamEXT)) + return reinterpret_cast(vkCmdSetRasterizationStreamEXT); + if (strcmp(pName, "vkCmdSetConservativeRasterizationModeEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetConservativeRasterizationModeEXT)) + return reinterpret_cast(vkCmdSetConservativeRasterizationModeEXT); + if (strcmp(pName, "vkCmdSetExtraPrimitiveOverestimationSizeEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetExtraPrimitiveOverestimationSizeEXT)) + return reinterpret_cast(vkCmdSetExtraPrimitiveOverestimationSizeEXT); + if (strcmp(pName, "vkCmdSetDepthClipEnableEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetDepthClipEnableEXT)) + return reinterpret_cast(vkCmdSetDepthClipEnableEXT); + if (strcmp(pName, "vkCmdSetSampleLocationsEnableEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetSampleLocationsEnableEXT)) + return reinterpret_cast(vkCmdSetSampleLocationsEnableEXT); + if (strcmp(pName, "vkCmdSetColorBlendAdvancedEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetColorBlendAdvancedEXT)) + return reinterpret_cast(vkCmdSetColorBlendAdvancedEXT); + if (strcmp(pName, "vkCmdSetProvokingVertexModeEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetProvokingVertexModeEXT)) + return reinterpret_cast(vkCmdSetProvokingVertexModeEXT); + if (strcmp(pName, "vkCmdSetLineRasterizationModeEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetLineRasterizationModeEXT)) + return reinterpret_cast(vkCmdSetLineRasterizationModeEXT); + if (strcmp(pName, "vkCmdSetLineStippleEnableEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetLineStippleEnableEXT)) + return reinterpret_cast(vkCmdSetLineStippleEnableEXT); + if (strcmp(pName, "vkCmdSetDepthClipNegativeOneToOneEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetDepthClipNegativeOneToOneEXT)) + return reinterpret_cast(vkCmdSetDepthClipNegativeOneToOneEXT); + if (strcmp(pName, "vkCmdSetViewportWScalingEnableNV") == 0 && (!device || device_dispatch_table(device)->CmdSetViewportWScalingEnableNV)) + return reinterpret_cast(vkCmdSetViewportWScalingEnableNV); + if (strcmp(pName, "vkCmdSetViewportSwizzleNV") == 0 && (!device || device_dispatch_table(device)->CmdSetViewportSwizzleNV)) + return reinterpret_cast(vkCmdSetViewportSwizzleNV); + if (strcmp(pName, "vkCmdSetCoverageToColorEnableNV") == 0 && (!device || device_dispatch_table(device)->CmdSetCoverageToColorEnableNV)) + return reinterpret_cast(vkCmdSetCoverageToColorEnableNV); + if (strcmp(pName, "vkCmdSetCoverageToColorLocationNV") == 0 && (!device || device_dispatch_table(device)->CmdSetCoverageToColorLocationNV)) + return reinterpret_cast(vkCmdSetCoverageToColorLocationNV); + if (strcmp(pName, "vkCmdSetCoverageModulationModeNV") == 0 && (!device || device_dispatch_table(device)->CmdSetCoverageModulationModeNV)) + return reinterpret_cast(vkCmdSetCoverageModulationModeNV); + if (strcmp(pName, "vkCmdSetCoverageModulationTableEnableNV") == 0 && (!device || device_dispatch_table(device)->CmdSetCoverageModulationTableEnableNV)) + return reinterpret_cast(vkCmdSetCoverageModulationTableEnableNV); + if (strcmp(pName, "vkCmdSetCoverageModulationTableNV") == 0 && (!device || device_dispatch_table(device)->CmdSetCoverageModulationTableNV)) + return reinterpret_cast(vkCmdSetCoverageModulationTableNV); + if (strcmp(pName, "vkCmdSetShadingRateImageEnableNV") == 0 && (!device || device_dispatch_table(device)->CmdSetShadingRateImageEnableNV)) + return reinterpret_cast(vkCmdSetShadingRateImageEnableNV); + if (strcmp(pName, "vkCmdSetRepresentativeFragmentTestEnableNV") == 0 && (!device || device_dispatch_table(device)->CmdSetRepresentativeFragmentTestEnableNV)) + return reinterpret_cast(vkCmdSetRepresentativeFragmentTestEnableNV); + if (strcmp(pName, "vkCmdSetCoverageReductionModeNV") == 0 && (!device || device_dispatch_table(device)->CmdSetCoverageReductionModeNV)) + return reinterpret_cast(vkCmdSetCoverageReductionModeNV); + if (strcmp(pName, "vkCreateTensorARM") == 0 && (!device || device_dispatch_table(device)->CreateTensorARM)) + return reinterpret_cast(vkCreateTensorARM); + if (strcmp(pName, "vkDestroyTensorARM") == 0 && (!device || device_dispatch_table(device)->DestroyTensorARM)) + return reinterpret_cast(vkDestroyTensorARM); + if (strcmp(pName, "vkCreateTensorViewARM") == 0 && (!device || device_dispatch_table(device)->CreateTensorViewARM)) + return reinterpret_cast(vkCreateTensorViewARM); + if (strcmp(pName, "vkDestroyTensorViewARM") == 0 && (!device || device_dispatch_table(device)->DestroyTensorViewARM)) + return reinterpret_cast(vkDestroyTensorViewARM); + if (strcmp(pName, "vkGetTensorMemoryRequirementsARM") == 0 && (!device || device_dispatch_table(device)->GetTensorMemoryRequirementsARM)) + return reinterpret_cast(vkGetTensorMemoryRequirementsARM); + if (strcmp(pName, "vkBindTensorMemoryARM") == 0 && (!device || device_dispatch_table(device)->BindTensorMemoryARM)) + return reinterpret_cast(vkBindTensorMemoryARM); + if (strcmp(pName, "vkGetDeviceTensorMemoryRequirementsARM") == 0 && (!device || device_dispatch_table(device)->GetDeviceTensorMemoryRequirementsARM)) + return reinterpret_cast(vkGetDeviceTensorMemoryRequirementsARM); + if (strcmp(pName, "vkCmdCopyTensorARM") == 0 && (!device || device_dispatch_table(device)->CmdCopyTensorARM)) + return reinterpret_cast(vkCmdCopyTensorARM); + if (strcmp(pName, "vkGetTensorOpaqueCaptureDescriptorDataARM") == 0 && (!device || device_dispatch_table(device)->GetTensorOpaqueCaptureDescriptorDataARM)) + return reinterpret_cast(vkGetTensorOpaqueCaptureDescriptorDataARM); + if (strcmp(pName, "vkGetTensorViewOpaqueCaptureDescriptorDataARM") == 0 && (!device || device_dispatch_table(device)->GetTensorViewOpaqueCaptureDescriptorDataARM)) + return reinterpret_cast(vkGetTensorViewOpaqueCaptureDescriptorDataARM); + if (strcmp(pName, "vkGetShaderModuleIdentifierEXT") == 0 && (!device || device_dispatch_table(device)->GetShaderModuleIdentifierEXT)) + return reinterpret_cast(vkGetShaderModuleIdentifierEXT); + if (strcmp(pName, "vkGetShaderModuleCreateInfoIdentifierEXT") == 0 && (!device || device_dispatch_table(device)->GetShaderModuleCreateInfoIdentifierEXT)) + return reinterpret_cast(vkGetShaderModuleCreateInfoIdentifierEXT); + if (strcmp(pName, "vkCreateOpticalFlowSessionNV") == 0 && (!device || device_dispatch_table(device)->CreateOpticalFlowSessionNV)) + return reinterpret_cast(vkCreateOpticalFlowSessionNV); + if (strcmp(pName, "vkDestroyOpticalFlowSessionNV") == 0 && (!device || device_dispatch_table(device)->DestroyOpticalFlowSessionNV)) + return reinterpret_cast(vkDestroyOpticalFlowSessionNV); + if (strcmp(pName, "vkBindOpticalFlowSessionImageNV") == 0 && (!device || device_dispatch_table(device)->BindOpticalFlowSessionImageNV)) + return reinterpret_cast(vkBindOpticalFlowSessionImageNV); + if (strcmp(pName, "vkCmdOpticalFlowExecuteNV") == 0 && (!device || device_dispatch_table(device)->CmdOpticalFlowExecuteNV)) + return reinterpret_cast(vkCmdOpticalFlowExecuteNV); + if (strcmp(pName, "vkAntiLagUpdateAMD") == 0 && (!device || device_dispatch_table(device)->AntiLagUpdateAMD)) + return reinterpret_cast(vkAntiLagUpdateAMD); + if (strcmp(pName, "vkCreateShadersEXT") == 0 && (!device || device_dispatch_table(device)->CreateShadersEXT)) + return reinterpret_cast(vkCreateShadersEXT); + if (strcmp(pName, "vkDestroyShaderEXT") == 0 && (!device || device_dispatch_table(device)->DestroyShaderEXT)) + return reinterpret_cast(vkDestroyShaderEXT); + if (strcmp(pName, "vkGetShaderBinaryDataEXT") == 0 && (!device || device_dispatch_table(device)->GetShaderBinaryDataEXT)) + return reinterpret_cast(vkGetShaderBinaryDataEXT); + if (strcmp(pName, "vkCmdBindShadersEXT") == 0 && (!device || device_dispatch_table(device)->CmdBindShadersEXT)) + return reinterpret_cast(vkCmdBindShadersEXT); + if (strcmp(pName, "vkCmdSetDepthClampRangeEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetDepthClampRangeEXT)) + return reinterpret_cast(vkCmdSetDepthClampRangeEXT); + if (strcmp(pName, "vkGetFramebufferTilePropertiesQCOM") == 0 && (!device || device_dispatch_table(device)->GetFramebufferTilePropertiesQCOM)) + return reinterpret_cast(vkGetFramebufferTilePropertiesQCOM); + if (strcmp(pName, "vkGetDynamicRenderingTilePropertiesQCOM") == 0 && (!device || device_dispatch_table(device)->GetDynamicRenderingTilePropertiesQCOM)) + return reinterpret_cast(vkGetDynamicRenderingTilePropertiesQCOM); + if (strcmp(pName, "vkConvertCooperativeVectorMatrixNV") == 0 && (!device || device_dispatch_table(device)->ConvertCooperativeVectorMatrixNV)) + return reinterpret_cast(vkConvertCooperativeVectorMatrixNV); + if (strcmp(pName, "vkCmdConvertCooperativeVectorMatrixNV") == 0 && (!device || device_dispatch_table(device)->CmdConvertCooperativeVectorMatrixNV)) + return reinterpret_cast(vkCmdConvertCooperativeVectorMatrixNV); + if (strcmp(pName, "vkSetLatencySleepModeNV") == 0 && (!device || device_dispatch_table(device)->SetLatencySleepModeNV)) + return reinterpret_cast(vkSetLatencySleepModeNV); + if (strcmp(pName, "vkLatencySleepNV") == 0 && (!device || device_dispatch_table(device)->LatencySleepNV)) + return reinterpret_cast(vkLatencySleepNV); + if (strcmp(pName, "vkSetLatencyMarkerNV") == 0 && (!device || device_dispatch_table(device)->SetLatencyMarkerNV)) + return reinterpret_cast(vkSetLatencyMarkerNV); + if (strcmp(pName, "vkGetLatencyTimingsNV") == 0 && (!device || device_dispatch_table(device)->GetLatencyTimingsNV)) + return reinterpret_cast(vkGetLatencyTimingsNV); + if (strcmp(pName, "vkQueueNotifyOutOfBandNV") == 0 && (!device || device_dispatch_table(device)->QueueNotifyOutOfBandNV)) + return reinterpret_cast(vkQueueNotifyOutOfBandNV); + if (strcmp(pName, "vkCreateDataGraphPipelinesARM") == 0 && (!device || device_dispatch_table(device)->CreateDataGraphPipelinesARM)) + return reinterpret_cast(vkCreateDataGraphPipelinesARM); + if (strcmp(pName, "vkCreateDataGraphPipelineSessionARM") == 0 && (!device || device_dispatch_table(device)->CreateDataGraphPipelineSessionARM)) + return reinterpret_cast(vkCreateDataGraphPipelineSessionARM); + if (strcmp(pName, "vkGetDataGraphPipelineSessionBindPointRequirementsARM") == 0 && (!device || device_dispatch_table(device)->GetDataGraphPipelineSessionBindPointRequirementsARM)) + return reinterpret_cast(vkGetDataGraphPipelineSessionBindPointRequirementsARM); + if (strcmp(pName, "vkGetDataGraphPipelineSessionMemoryRequirementsARM") == 0 && (!device || device_dispatch_table(device)->GetDataGraphPipelineSessionMemoryRequirementsARM)) + return reinterpret_cast(vkGetDataGraphPipelineSessionMemoryRequirementsARM); + if (strcmp(pName, "vkBindDataGraphPipelineSessionMemoryARM") == 0 && (!device || device_dispatch_table(device)->BindDataGraphPipelineSessionMemoryARM)) + return reinterpret_cast(vkBindDataGraphPipelineSessionMemoryARM); + if (strcmp(pName, "vkDestroyDataGraphPipelineSessionARM") == 0 && (!device || device_dispatch_table(device)->DestroyDataGraphPipelineSessionARM)) + return reinterpret_cast(vkDestroyDataGraphPipelineSessionARM); + if (strcmp(pName, "vkCmdDispatchDataGraphARM") == 0 && (!device || device_dispatch_table(device)->CmdDispatchDataGraphARM)) + return reinterpret_cast(vkCmdDispatchDataGraphARM); + if (strcmp(pName, "vkGetDataGraphPipelineAvailablePropertiesARM") == 0 && (!device || device_dispatch_table(device)->GetDataGraphPipelineAvailablePropertiesARM)) + return reinterpret_cast(vkGetDataGraphPipelineAvailablePropertiesARM); + if (strcmp(pName, "vkGetDataGraphPipelinePropertiesARM") == 0 && (!device || device_dispatch_table(device)->GetDataGraphPipelinePropertiesARM)) + return reinterpret_cast(vkGetDataGraphPipelinePropertiesARM); + if (strcmp(pName, "vkCmdSetAttachmentFeedbackLoopEnableEXT") == 0 && (!device || device_dispatch_table(device)->CmdSetAttachmentFeedbackLoopEnableEXT)) + return reinterpret_cast(vkCmdSetAttachmentFeedbackLoopEnableEXT); +#if defined(VK_USE_PLATFORM_SCREEN_QNX) + if (strcmp(pName, "vkGetScreenBufferPropertiesQNX") == 0 && (!device || device_dispatch_table(device)->GetScreenBufferPropertiesQNX)) + return reinterpret_cast(vkGetScreenBufferPropertiesQNX); +#endif // VK_USE_PLATFORM_SCREEN_QNX + if (strcmp(pName, "vkCmdBindTileMemoryQCOM") == 0 && (!device || device_dispatch_table(device)->CmdBindTileMemoryQCOM)) + return reinterpret_cast(vkCmdBindTileMemoryQCOM); + if (strcmp(pName, "vkCmdDecompressMemoryEXT") == 0 && (!device || device_dispatch_table(device)->CmdDecompressMemoryEXT)) + return reinterpret_cast(vkCmdDecompressMemoryEXT); + if (strcmp(pName, "vkCmdDecompressMemoryIndirectCountEXT") == 0 && (!device || device_dispatch_table(device)->CmdDecompressMemoryIndirectCountEXT)) + return reinterpret_cast(vkCmdDecompressMemoryIndirectCountEXT); + if (strcmp(pName, "vkCreateExternalComputeQueueNV") == 0 && (!device || device_dispatch_table(device)->CreateExternalComputeQueueNV)) + return reinterpret_cast(vkCreateExternalComputeQueueNV); + if (strcmp(pName, "vkDestroyExternalComputeQueueNV") == 0 && (!device || device_dispatch_table(device)->DestroyExternalComputeQueueNV)) + return reinterpret_cast(vkDestroyExternalComputeQueueNV); + if (strcmp(pName, "vkGetExternalComputeQueueDataNV") == 0 && (!device || device_dispatch_table(device)->GetExternalComputeQueueDataNV)) + return reinterpret_cast(vkGetExternalComputeQueueDataNV); + if (strcmp(pName, "vkGetClusterAccelerationStructureBuildSizesNV") == 0 && (!device || device_dispatch_table(device)->GetClusterAccelerationStructureBuildSizesNV)) + return reinterpret_cast(vkGetClusterAccelerationStructureBuildSizesNV); + if (strcmp(pName, "vkCmdBuildClusterAccelerationStructureIndirectNV") == 0 && (!device || device_dispatch_table(device)->CmdBuildClusterAccelerationStructureIndirectNV)) + return reinterpret_cast(vkCmdBuildClusterAccelerationStructureIndirectNV); + if (strcmp(pName, "vkGetPartitionedAccelerationStructuresBuildSizesNV") == 0 && (!device || device_dispatch_table(device)->GetPartitionedAccelerationStructuresBuildSizesNV)) + return reinterpret_cast(vkGetPartitionedAccelerationStructuresBuildSizesNV); + if (strcmp(pName, "vkCmdBuildPartitionedAccelerationStructuresNV") == 0 && (!device || device_dispatch_table(device)->CmdBuildPartitionedAccelerationStructuresNV)) + return reinterpret_cast(vkCmdBuildPartitionedAccelerationStructuresNV); + if (strcmp(pName, "vkGetGeneratedCommandsMemoryRequirementsEXT") == 0 && (!device || device_dispatch_table(device)->GetGeneratedCommandsMemoryRequirementsEXT)) + return reinterpret_cast(vkGetGeneratedCommandsMemoryRequirementsEXT); + if (strcmp(pName, "vkCmdPreprocessGeneratedCommandsEXT") == 0 && (!device || device_dispatch_table(device)->CmdPreprocessGeneratedCommandsEXT)) + return reinterpret_cast(vkCmdPreprocessGeneratedCommandsEXT); + if (strcmp(pName, "vkCmdExecuteGeneratedCommandsEXT") == 0 && (!device || device_dispatch_table(device)->CmdExecuteGeneratedCommandsEXT)) + return reinterpret_cast(vkCmdExecuteGeneratedCommandsEXT); + if (strcmp(pName, "vkCreateIndirectCommandsLayoutEXT") == 0 && (!device || device_dispatch_table(device)->CreateIndirectCommandsLayoutEXT)) + return reinterpret_cast(vkCreateIndirectCommandsLayoutEXT); + if (strcmp(pName, "vkDestroyIndirectCommandsLayoutEXT") == 0 && (!device || device_dispatch_table(device)->DestroyIndirectCommandsLayoutEXT)) + return reinterpret_cast(vkDestroyIndirectCommandsLayoutEXT); + if (strcmp(pName, "vkCreateIndirectExecutionSetEXT") == 0 && (!device || device_dispatch_table(device)->CreateIndirectExecutionSetEXT)) + return reinterpret_cast(vkCreateIndirectExecutionSetEXT); + if (strcmp(pName, "vkDestroyIndirectExecutionSetEXT") == 0 && (!device || device_dispatch_table(device)->DestroyIndirectExecutionSetEXT)) + return reinterpret_cast(vkDestroyIndirectExecutionSetEXT); + if (strcmp(pName, "vkUpdateIndirectExecutionSetPipelineEXT") == 0 && (!device || device_dispatch_table(device)->UpdateIndirectExecutionSetPipelineEXT)) + return reinterpret_cast(vkUpdateIndirectExecutionSetPipelineEXT); + if (strcmp(pName, "vkUpdateIndirectExecutionSetShaderEXT") == 0 && (!device || device_dispatch_table(device)->UpdateIndirectExecutionSetShaderEXT)) + return reinterpret_cast(vkUpdateIndirectExecutionSetShaderEXT); +#if defined(VK_USE_PLATFORM_METAL_EXT) + if (strcmp(pName, "vkGetMemoryMetalHandleEXT") == 0 && (!device || device_dispatch_table(device)->GetMemoryMetalHandleEXT)) + return reinterpret_cast(vkGetMemoryMetalHandleEXT); + if (strcmp(pName, "vkGetMemoryMetalHandlePropertiesEXT") == 0 && (!device || device_dispatch_table(device)->GetMemoryMetalHandlePropertiesEXT)) + return reinterpret_cast(vkGetMemoryMetalHandlePropertiesEXT); +#endif // VK_USE_PLATFORM_METAL_EXT + if (strcmp(pName, "vkCmdEndRendering2EXT") == 0 && (!device || device_dispatch_table(device)->CmdEndRendering2EXT)) + return reinterpret_cast(vkCmdEndRendering2EXT); + if (strcmp(pName, "vkCmdBeginCustomResolveEXT") == 0 && (!device || device_dispatch_table(device)->CmdBeginCustomResolveEXT)) + return reinterpret_cast(vkCmdBeginCustomResolveEXT); + if (strcmp(pName, "vkCmdSetComputeOccupancyPriorityNV") == 0 && (!device || device_dispatch_table(device)->CmdSetComputeOccupancyPriorityNV)) + return reinterpret_cast(vkCmdSetComputeOccupancyPriorityNV); + if (strcmp(pName, "vkCreateAccelerationStructureKHR") == 0 && (!device || device_dispatch_table(device)->CreateAccelerationStructureKHR)) + return reinterpret_cast(vkCreateAccelerationStructureKHR); + if (strcmp(pName, "vkDestroyAccelerationStructureKHR") == 0 && (!device || device_dispatch_table(device)->DestroyAccelerationStructureKHR)) + return reinterpret_cast(vkDestroyAccelerationStructureKHR); + if (strcmp(pName, "vkCmdBuildAccelerationStructuresKHR") == 0 && (!device || device_dispatch_table(device)->CmdBuildAccelerationStructuresKHR)) + return reinterpret_cast(vkCmdBuildAccelerationStructuresKHR); + if (strcmp(pName, "vkCmdBuildAccelerationStructuresIndirectKHR") == 0 && (!device || device_dispatch_table(device)->CmdBuildAccelerationStructuresIndirectKHR)) + return reinterpret_cast(vkCmdBuildAccelerationStructuresIndirectKHR); + if (strcmp(pName, "vkBuildAccelerationStructuresKHR") == 0 && (!device || device_dispatch_table(device)->BuildAccelerationStructuresKHR)) + return reinterpret_cast(vkBuildAccelerationStructuresKHR); + if (strcmp(pName, "vkCopyAccelerationStructureKHR") == 0 && (!device || device_dispatch_table(device)->CopyAccelerationStructureKHR)) + return reinterpret_cast(vkCopyAccelerationStructureKHR); + if (strcmp(pName, "vkCopyAccelerationStructureToMemoryKHR") == 0 && (!device || device_dispatch_table(device)->CopyAccelerationStructureToMemoryKHR)) + return reinterpret_cast(vkCopyAccelerationStructureToMemoryKHR); + if (strcmp(pName, "vkCopyMemoryToAccelerationStructureKHR") == 0 && (!device || device_dispatch_table(device)->CopyMemoryToAccelerationStructureKHR)) + return reinterpret_cast(vkCopyMemoryToAccelerationStructureKHR); + if (strcmp(pName, "vkWriteAccelerationStructuresPropertiesKHR") == 0 && (!device || device_dispatch_table(device)->WriteAccelerationStructuresPropertiesKHR)) + return reinterpret_cast(vkWriteAccelerationStructuresPropertiesKHR); + if (strcmp(pName, "vkCmdCopyAccelerationStructureKHR") == 0 && (!device || device_dispatch_table(device)->CmdCopyAccelerationStructureKHR)) + return reinterpret_cast(vkCmdCopyAccelerationStructureKHR); + if (strcmp(pName, "vkCmdCopyAccelerationStructureToMemoryKHR") == 0 && (!device || device_dispatch_table(device)->CmdCopyAccelerationStructureToMemoryKHR)) + return reinterpret_cast(vkCmdCopyAccelerationStructureToMemoryKHR); + if (strcmp(pName, "vkCmdCopyMemoryToAccelerationStructureKHR") == 0 && (!device || device_dispatch_table(device)->CmdCopyMemoryToAccelerationStructureKHR)) + return reinterpret_cast(vkCmdCopyMemoryToAccelerationStructureKHR); + if (strcmp(pName, "vkGetAccelerationStructureDeviceAddressKHR") == 0 && (!device || device_dispatch_table(device)->GetAccelerationStructureDeviceAddressKHR)) + return reinterpret_cast(vkGetAccelerationStructureDeviceAddressKHR); + if (strcmp(pName, "vkCmdWriteAccelerationStructuresPropertiesKHR") == 0 && (!device || device_dispatch_table(device)->CmdWriteAccelerationStructuresPropertiesKHR)) + return reinterpret_cast(vkCmdWriteAccelerationStructuresPropertiesKHR); + if (strcmp(pName, "vkGetDeviceAccelerationStructureCompatibilityKHR") == 0 && (!device || device_dispatch_table(device)->GetDeviceAccelerationStructureCompatibilityKHR)) + return reinterpret_cast(vkGetDeviceAccelerationStructureCompatibilityKHR); + if (strcmp(pName, "vkGetAccelerationStructureBuildSizesKHR") == 0 && (!device || device_dispatch_table(device)->GetAccelerationStructureBuildSizesKHR)) + return reinterpret_cast(vkGetAccelerationStructureBuildSizesKHR); + if (strcmp(pName, "vkCmdTraceRaysKHR") == 0 && (!device || device_dispatch_table(device)->CmdTraceRaysKHR)) + return reinterpret_cast(vkCmdTraceRaysKHR); + if (strcmp(pName, "vkCreateRayTracingPipelinesKHR") == 0 && (!device || device_dispatch_table(device)->CreateRayTracingPipelinesKHR)) + return reinterpret_cast(vkCreateRayTracingPipelinesKHR); + if (strcmp(pName, "vkGetRayTracingCaptureReplayShaderGroupHandlesKHR") == 0 && (!device || device_dispatch_table(device)->GetRayTracingCaptureReplayShaderGroupHandlesKHR)) + return reinterpret_cast(vkGetRayTracingCaptureReplayShaderGroupHandlesKHR); + if (strcmp(pName, "vkCmdTraceRaysIndirectKHR") == 0 && (!device || device_dispatch_table(device)->CmdTraceRaysIndirectKHR)) + return reinterpret_cast(vkCmdTraceRaysIndirectKHR); + if (strcmp(pName, "vkGetRayTracingShaderGroupStackSizeKHR") == 0 && (!device || device_dispatch_table(device)->GetRayTracingShaderGroupStackSizeKHR)) + return reinterpret_cast(vkGetRayTracingShaderGroupStackSizeKHR); + if (strcmp(pName, "vkCmdSetRayTracingPipelineStackSizeKHR") == 0 && (!device || device_dispatch_table(device)->CmdSetRayTracingPipelineStackSizeKHR)) + return reinterpret_cast(vkCmdSetRayTracingPipelineStackSizeKHR); + if (strcmp(pName, "vkCmdDrawMeshTasksEXT") == 0 && (!device || device_dispatch_table(device)->CmdDrawMeshTasksEXT)) + return reinterpret_cast(vkCmdDrawMeshTasksEXT); + if (strcmp(pName, "vkCmdDrawMeshTasksIndirectEXT") == 0 && (!device || device_dispatch_table(device)->CmdDrawMeshTasksIndirectEXT)) + return reinterpret_cast(vkCmdDrawMeshTasksIndirectEXT); + if (strcmp(pName, "vkCmdDrawMeshTasksIndirectCountEXT") == 0 && (!device || device_dispatch_table(device)->CmdDrawMeshTasksIndirectCountEXT)) + return reinterpret_cast(vkCmdDrawMeshTasksIndirectCountEXT); + + return nullptr; +} diff --git a/layersvt/generated/cputiming_implementation.h b/layersvt/generated/cputiming_implementation.h new file mode 100644 index 0000000000..ffea2c2f50 --- /dev/null +++ b/layersvt/generated/cputiming_implementation.h @@ -0,0 +1,26 @@ + +/* Copyright (c) 2015-2026 Valve Corporation + * Copyright (c) 2015-2026 LunarG, Inc. + * Copyright (c) 2015-2017, 2019, 2021 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/* + * This file is generated from the Khronos Vulkan XML API Registry. + */ + +#pragma once + +// Empty implementation for CPUTiming diff --git a/layersvt/json/VkLayer_CPUTiming.json.in b/layersvt/json/VkLayer_CPUTiming.json.in new file mode 100644 index 0000000000..caa24d0b84 --- /dev/null +++ b/layersvt/json/VkLayer_CPUTiming.json.in @@ -0,0 +1,28 @@ +{ + "file_format_version" : "1.2.0", + "layer": { + "name": "CPUTiming", + "type": "GLOBAL", + "library_path": "@JSON_LIBRARY_PATH@", + "api_version": "@JSON_VERSION@", + "implementation_version": "1", + "description": "CPUTiming layer", + "introduction": "The CPUTiming layer prints API calls.", + "platforms": [ "LINUX", "ANDROID" ], + "instance_extensions": [ + { + "name": "VK_EXT_layer_settings", + "spec_version": "2" + } + ], + "device_extensions": [ + { + "name": "VK_EXT_tooling_info", + "spec_version": "1", + "entrypoints": [ + "vkGetPhysicalDeviceToolPropertiesEXT" + ] + } + ] + } +} diff --git a/layersvt/perfetto/README.md b/layersvt/perfetto/README.md new file mode 100644 index 0000000000..6b7d81b7aa --- /dev/null +++ b/layersvt/perfetto/README.md @@ -0,0 +1,13 @@ +# Perfetto SDK + +The files `perfetto.cc` and `perfetto.h` in this directory are the **Amalgamated Perfetto SDK**. + +- **Version**: v53.0 +- **Source**: https://github.com/google/perfetto/archive/refs/tags/v53.0.zip +- **Files**: `sdk/perfetto.cc` and `sdk/perfetto.h` from the release archive. + +## Updating +To update the SDK: +1. Download the latest release zip from the [Perfetto GitHub Releases](https://github.com/google/perfetto/releases). +2. Extract `sdk/perfetto.cc` and `sdk/perfetto.h`. +3. Replace the files in this directory. diff --git a/layersvt/perfetto/perfetto.cc b/layersvt/perfetto/perfetto.cc new file mode 100644 index 0000000000..c122bae764 --- /dev/null +++ b/layersvt/perfetto/perfetto.cc @@ -0,0 +1,73089 @@ +// Copyright (C) 2019 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// This file is automatically generated by gen_amalgamated. Do not edit. + +// gen_amalgamated: predefined macros +#if !defined(PERFETTO_IMPLEMENTATION) +#define PERFETTO_IMPLEMENTATION +#endif +#include "perfetto.h" +// gen_amalgamated begin source: src/base/default_platform.cc +// gen_amalgamated begin header: include/perfetto/ext/base/platform.h +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_EXT_BASE_PLATFORM_H_ +#define INCLUDE_PERFETTO_EXT_BASE_PLATFORM_H_ + +namespace perfetto { +namespace base { +namespace platform { + +// Executed before entering a syscall (e.g. poll, read, write etc) which might +// block. +// This is overridden in Google internal builds for dealing with userspace +// scheduling. +void BeforeMaybeBlockingSyscall(); + +// Executed after entering a syscall (e.g. poll, read, write etc) which might +// block. +// This is overridden in Google internal builds for dealing with userspace +// scheduling. +void AfterMaybeBlockingSyscall(); + +} // namespace platform +} // namespace base +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_EXT_BASE_PLATFORM_H_ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// gen_amalgamated expanded: #include "perfetto/ext/base/platform.h" + +namespace perfetto { +namespace base { +namespace platform { + +// This is a no-op outside of Google3 where we have some custom logic to deal +// with the userspace scheduler. +void BeforeMaybeBlockingSyscall() {} + +// This is a no-op outside of Google3 where we have some custom logic to deal +// with the userspace scheduler. +void AfterMaybeBlockingSyscall() {} + +} // namespace platform +} // namespace base +} // namespace perfetto +// gen_amalgamated begin source: src/base/android_utils.cc +// gen_amalgamated begin header: include/perfetto/ext/base/android_utils.h +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_EXT_BASE_ANDROID_UTILS_H_ +#define INCLUDE_PERFETTO_EXT_BASE_ANDROID_UTILS_H_ + +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/base/build_config.h" + +namespace perfetto { +namespace base { + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) + +// Returns the value of the Android system property named `name`. If the +// property does not exist, returns an empty string (a non-existing property is +// the same as a property with an empty value for this API). +std::string GetAndroidProp(const char* name); + +#endif // PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) + +struct Utsname { + std::string sysname; + std::string version; + std::string machine; + std::string release; +}; + +struct SystemInfo { + std::optional timezone_off_mins; + std::optional utsname_info; + std::optional page_size; + std::optional num_cpus; + std::string android_build_fingerprint; + std::string android_device_manufacturer; + std::optional android_sdk_version; + std::string android_soc_model; + std::string android_guest_soc_model; + std::string android_hardware_revision; + std::string android_storage_model; + std::string android_ram_model; + std::string android_serial_console; +}; + +// Returns the device's utsname information. +Utsname GetUtsname(); + +// Returns the device's system information. +SystemInfo GetSystemInfo(); + +// Returns the perfetto machine name. The PERFETTO_MACHINE_NAME env variable +// has the highest precedence in setting the machine name. In Android systems, +// if the env variable isn't set then the traced.machine_name system property +// is used. If no value is externally set, then the OS system name +// (see `uname -s`) is used as the default machine name. +std::string GetPerfettoMachineName(); + +} // namespace base +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_EXT_BASE_ANDROID_UTILS_H_ +// gen_amalgamated begin header: include/perfetto/ext/base/string_utils.h +// gen_amalgamated begin header: include/perfetto/ext/base/string_view.h +// gen_amalgamated begin header: include/perfetto/ext/base/fnv_hash.h +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_EXT_BASE_FNV_HASH_H_ +#define INCLUDE_PERFETTO_EXT_BASE_FNV_HASH_H_ + +#include +#include +#include +#include +#include + +namespace perfetto::base { + +// A helper class which computes a 64-bit hash of the input data. +// The algorithm used is FNV-1a as it is fast and easy to implement and has +// relatively few collisions. +// WARNING: This hash function should not be used for any cryptographic purpose. +class FnvHasher { + public: + // Creates an empty hash object + constexpr FnvHasher() = default; + + // Hashes a numeric value. + template < + typename T, + typename std::enable_if::value, bool>::type = true> + void Update(T data) { + Update(reinterpret_cast(&data), sizeof(data)); + } + + constexpr void Update(char c) { return Update(&c, 1); } + + // Using the loop instead of "Update(str, strlen(str))" to avoid looping twice + constexpr void Update(const char* str) { + for (const auto* p = str; *p; ++p) + Update(*p); + } + + // Hashes a byte array. + constexpr void Update(const char* data, size_t size) { + for (size_t i = 0; i < size; i++) { + result_ ^= static_cast(data[i]); + // Note: Arithmetic overflow of unsigned integers is well defined in C++ + // standard unlike signed integers. + // https://stackoverflow.com/a/41280273 + result_ *= kFnv1a64Prime; + } + } + + // Allow hashing anything that has `data` and `size` and has the kHashable + // trait (e.g., base::StringView). + template > + constexpr void Update(const T& t) { + if constexpr (std::is_member_function_pointer_v) { + Update(t.data(), t.size()); + } else { + Update(t.data, t.size); + } + } + + constexpr void Update(std::string_view s) { Update(s.data(), s.size()); } + + constexpr uint64_t digest() const { return result_; } + + // Usage: + // uint64_t hashed_value = + // FnvHasher::Combine(33, false, "ABC", 458L, 3u, 'x'); + template + static constexpr uint64_t Combine(Ts&&... args) { + FnvHasher hasher; + hasher.UpdateAll(std::forward(args)...); + return hasher.digest(); + } + + // Creates a hasher with `args` already hashed. + // + // Usage: + // FnvHasher partial = FnvHasher::CreatePartial(33, false, "ABC", 458L); + template + static constexpr FnvHasher CreatePartial(Ts&&... args) { + FnvHasher hasher; + hasher.UpdateAll(std::forward(args)...); + return hasher; + } + + // `hasher.UpdateAll(33, false, "ABC")` is shorthand for: + // `hasher.Update(33); hasher.Update(false); hasher.Update("ABC");` + constexpr void UpdateAll() {} + + template + constexpr void UpdateAll(T&& arg, Ts&&... args) { + Update(arg); + UpdateAll(std::forward(args)...); + } + + private: + static constexpr uint64_t kFnv1a64OffsetBasis = 0xcbf29ce484222325; + static constexpr uint64_t kFnv1a64Prime = 0x100000001b3; + + uint64_t result_ = kFnv1a64OffsetBasis; +}; + +// base::FnvHash uses base::FnvHasher for integer values and falls back to +// std::hash for other types. This is needed as std::hash for integers is just +// the identity function and Perfetto uses open-addressing hash table, which are +// very sensitive to hash quality and are known to degrade in performance +// when using std::hash. +template +struct FnvHash { + // Version for ints, using base::FnvHasher. + template + auto operator()(const U& x) -> + typename std::enable_if::value, size_t>::type + const { + return FnvHasher::Combine(x); + } + + // Version for non-ints, falling back to std::hash. + template + auto operator()(const U& x) -> + typename std::enable_if::value, size_t>::type + const { + return std::hash()(x); + } +}; + +} // namespace perfetto::base + +#endif // INCLUDE_PERFETTO_EXT_BASE_FNV_HASH_H_ +/* + * Copyright (C) 2018 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_EXT_BASE_STRING_VIEW_H_ +#define INCLUDE_PERFETTO_EXT_BASE_STRING_VIEW_H_ + +#include + +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/base/build_config.h" +// gen_amalgamated expanded: #include "perfetto/base/logging.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/fnv_hash.h" + +namespace perfetto { +namespace base { + +// A string-like object that refers to a non-owned piece of memory. +// Strings are internally NOT null terminated. +class StringView { + public: + // Allow hashing with base::FnvHash. + static constexpr bool kHashable = true; + static constexpr size_t npos = static_cast(-1); + + StringView() : data_(nullptr), size_(0) {} + StringView(const StringView&) = default; + StringView& operator=(const StringView&) = default; + StringView(const char* data, size_t size) : data_(data), size_(size) { + PERFETTO_DCHECK(size == 0 || data != nullptr); + } + + // Allow implicit conversion from any class that has a |data| and |size| field + // and has the kConvertibleToStringView trait (e.g., protozero::ConstChars). + template > + StringView(const T& x) : StringView(x.data, x.size) { + PERFETTO_DCHECK(x.size == 0 || x.data != nullptr); + } + + // Creates a StringView from a null-terminated C string. + // Deliberately not "explicit". + StringView(const char* cstr) : data_(cstr), size_(strlen(cstr)) { + PERFETTO_DCHECK(cstr != nullptr); + } + + StringView(std::string_view str) : data_(str.data()), size_(str.size()) {} + + // This instead has to be explicit, as creating a StringView out of a + // std::string can be subtle. + explicit StringView(const std::string& str) + : data_(str.data()), size_(str.size()) {} + + bool empty() const { return size_ == 0; } + size_t size() const { return size_; } + const char* data() const { return data_; } + const char* begin() const { return data_; } + const char* end() const { return data_ + size_; } + + char at(size_t pos) const { + PERFETTO_DCHECK(pos < size_); + return data_[pos]; + } + + size_t find(char c, size_t start_pos = 0) const { + for (size_t i = start_pos; i < size_; ++i) { + if (data_[i] == c) + return i; + } + return npos; + } + + size_t find(const StringView& str, size_t start_pos = 0) const { + if (start_pos > size()) + return npos; + auto it = std::search(begin() + start_pos, end(), str.begin(), str.end()); + size_t pos = static_cast(it - begin()); + return pos + str.size() <= size() ? pos : npos; + } + + size_t find(const char* str, size_t start_pos = 0) const { + return find(StringView(str), start_pos); + } + + size_t rfind(char c) const { + for (size_t i = size_; i > 0; --i) { + if (data_[i - 1] == c) + return i - 1; + } + return npos; + } + + StringView substr(size_t pos, size_t count = npos) const { + if (pos >= size_) + return StringView("", 0); + size_t rcount = std::min(count, size_ - pos); + return StringView(data_ + pos, rcount); + } + + bool CaseInsensitiveEq(const StringView& other) const { + if (size() != other.size()) + return false; + if (size() == 0) + return true; +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + return _strnicmp(data(), other.data(), size()) == 0; +#else + return strncasecmp(data(), other.data(), size()) == 0; +#endif + } + + bool CaseInsensitiveOneOf(const std::vector& others) const { + for (const StringView& other : others) { + if (CaseInsensitiveEq(other)) { + return true; + } + } + return false; + } + + bool StartsWith(const StringView& other) const { + if (other.size() == 0) + return true; + if (size() == 0) + return false; + if (other.size() > size()) + return false; + return memcmp(data(), other.data(), other.size()) == 0; + } + + bool EndsWith(const StringView& other) const { + if (other.size() == 0) + return true; + if (size() == 0) + return false; + if (other.size() > size()) + return false; + size_t off = size() - other.size(); + return memcmp(data() + off, other.data(), other.size()) == 0; + } + + std::string ToStdString() const { + return size_ == 0 ? "" : std::string(data_, size_); + } + + uint64_t Hash() const { + base::FnvHasher hasher; + hasher.Update(data_, size_); + return hasher.digest(); + } + + private: + const char* data_ = nullptr; + size_t size_ = 0; +}; + +inline bool operator==(const StringView& x, const StringView& y) { + if (x.size() != y.size()) + return false; + if (x.size() == 0) + return true; + return memcmp(x.data(), y.data(), x.size()) == 0; +} + +inline bool operator!=(const StringView& x, const StringView& y) { + return !(x == y); +} + +inline bool operator<(const StringView& x, const StringView& y) { + auto size = std::min(x.size(), y.size()); + if (size == 0) + return x.size() < y.size(); + int result = memcmp(x.data(), y.data(), size); + return result < 0 || (result == 0 && x.size() < y.size()); +} + +inline bool operator>=(const StringView& x, const StringView& y) { + return !(x < y); +} + +inline bool operator>(const StringView& x, const StringView& y) { + return y < x; +} + +inline bool operator<=(const StringView& x, const StringView& y) { + return !(y < x); +} + +} // namespace base +} // namespace perfetto + +template <> +struct std::hash<::perfetto::base::StringView> { + size_t operator()(const ::perfetto::base::StringView& sv) const { + return static_cast(sv.Hash()); + } +}; + +#endif // INCLUDE_PERFETTO_EXT_BASE_STRING_VIEW_H_ +/* + * Copyright (C) 2018 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_EXT_BASE_STRING_UTILS_H_ +#define INCLUDE_PERFETTO_EXT_BASE_STRING_UTILS_H_ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/ext/base/string_view.h" + +namespace perfetto { +namespace base { + +inline char Lowercase(char c) { + return ('A' <= c && c <= 'Z') ? static_cast(c - ('A' - 'a')) : c; +} + +inline char Uppercase(char c) { + return ('a' <= c && c <= 'z') ? static_cast(c + ('A' - 'a')) : c; +} + +inline std::optional CStringToUInt32(const char* s, int base = 10) { + char* endptr = nullptr; + auto value = static_cast(strtoul(s, &endptr, base)); + return (*s && !*endptr) ? std::make_optional(value) : std::nullopt; +} + +inline std::optional CStringToInt32(const char* s, int base = 10) { + char* endptr = nullptr; + auto value = static_cast(strtol(s, &endptr, base)); + return (*s && !*endptr) ? std::make_optional(value) : std::nullopt; +} + +// Note: it saturates to 7fffffffffffffff if parsing a hex number >= 0x8000... +inline std::optional CStringToInt64(const char* s, int base = 10) { + char* endptr = nullptr; + auto value = static_cast(strtoll(s, &endptr, base)); + return (*s && !*endptr) ? std::make_optional(value) : std::nullopt; +} + +inline std::optional CStringToUInt64(const char* s, int base = 10) { + char* endptr = nullptr; + auto value = static_cast(strtoull(s, &endptr, base)); + return (*s && !*endptr) ? std::make_optional(value) : std::nullopt; +} + +double StrToD(const char* nptr, char** endptr); + +inline std::optional CStringToDouble(const char* s) { + char* endptr = nullptr; + double value = StrToD(s, &endptr); + std::optional result(std::nullopt); + if (*s != '\0' && *endptr == '\0') + result = value; + return result; +} + +inline std::optional StringToUInt32(const std::string& s, + int base = 10) { + return CStringToUInt32(s.c_str(), base); +} + +inline std::optional StringToInt32(const std::string& s, + int base = 10) { + return CStringToInt32(s.c_str(), base); +} + +inline std::optional StringToUInt64(const std::string& s, + int base = 10) { + return CStringToUInt64(s.c_str(), base); +} + +inline std::optional StringToInt64(const std::string& s, + int base = 10) { + return CStringToInt64(s.c_str(), base); +} + +inline std::optional StringToDouble(const std::string& s) { + return CStringToDouble(s.c_str()); +} + +template +inline std::optional StringViewToNumber(const base::StringView& sv, + int base = 10) { + // std::from_chars() does not regonize the leading '+' character and only + // recognizes '-' so remove the '+' if it exists to avoid errors and match + // the behavior of the other string conversion utilities above. + size_t start_offset = !sv.empty() && sv.at(0) == '+' ? 1 : 0; + T value; + auto result = + std::from_chars(sv.begin() + start_offset, sv.end(), value, base); + if (result.ec == std::errc() && result.ptr == sv.end()) { + return value; + } else { + return std::nullopt; + } +} + +inline std::optional StringViewToUInt32(const base::StringView& sv, + int base = 10) { + // std::from_chars() does not recognize the leading '-' character for + // unsigned conversions, but strtol does. To Mimic the behavior of strtol, + // attempt a signed converion if we see a leading '-', and then cast the + // result back to unsigned. + if (sv.size() > 0 && sv.at(0) == '-') { + return static_cast >( + StringViewToNumber(sv, base)); + } else { + return StringViewToNumber(sv, base); + } +} + +inline std::optional StringViewToInt32(const base::StringView& sv, + int base = 10) { + return StringViewToNumber(sv, base); +} + +inline std::optional StringViewToUInt64(const base::StringView& sv, + int base = 10) { + // std::from_chars() does not recognize the leading '-' character for + // unsigned conversions, but strtol does. To Mimic the behavior of strtol, + // attempt a signed converion if we see a leading '-', and then cast the + // result back to unsigned. + if (sv.size() > 0 && sv.at(0) == '-') { + return static_cast >( + StringViewToNumber(sv, base)); + } else { + return StringViewToNumber(sv, base); + } +} + +inline std::optional StringViewToInt64(const base::StringView& sv, + int base = 10) { + return StringViewToNumber(sv, base); +} + +// TODO: As of Clang 19.0 std::from_chars is unimplemented for type double +// despite being part of C++17 standard, and already being supported by GCC and +// MSVC. Enable this once we have double support in Clang. +// inline std::optional StringViewToDouble(const base::StringView& sv) { +// return StringViewToNumber(sv); +// } + +bool StartsWith(const std::string& str, const std::string& prefix); +bool EndsWith(const std::string& str, const std::string& suffix); +bool StartsWithAny(const std::string& str, + const std::vector& prefixes); +bool Contains(const std::string& haystack, const std::string& needle); +bool Contains(const std::string& haystack, char needle); +bool Contains(const std::vector& haystack, + const std::string& needle); +size_t Find(const StringView& needle, const StringView& haystack); +bool CaseInsensitiveEqual(const std::string& first, const std::string& second); +std::string Join(const std::vector& parts, + const std::string& delim); +std::vector SplitString(const std::string& text, + const std::string& delimiter); +std::string StripPrefix(const std::string& str, const std::string& prefix); +std::string StripSuffix(const std::string& str, const std::string& suffix); +std::string TrimWhitespace(const std::string& str); +std::string ToLower(const std::string& str); +std::string ToUpper(const std::string& str); +std::string StripChars(const std::string& str, + const std::string& chars, + char replacement); +std::string ToHex(const char* data, size_t size); +inline std::string ToHex(const std::string& s) { + return ToHex(s.c_str(), s.size()); +} +std::string IntToHexString(uint32_t number); +std::string Uint64ToHexString(uint64_t number); +std::string Uint64ToHexStringNoPrefix(uint64_t number); +std::string ReplaceAll(std::string str, + const std::string& to_replace, + const std::string& replacement); + +// Checks if all characters in the input string view `str` are ASCII. +// +// If so, the function returns true and `output` is not modified. +// If `str` contains non-ASCII characters, the function returns false, +// removes invalid UTF-8 characters from `str`, and stores the result in +// `output`. +bool CheckAsciiAndRemoveInvalidUTF8(base::StringView str, std::string& output); + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) +bool WideToUTF8(const std::wstring& source, std::string& output); +bool UTF8ToWide(const std::string& source, std::wstring& output); +#endif // PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + +// A BSD-style strlcpy without the return value. +// Copies at most |dst_size|-1 characters. Unlike strncpy, it always \0 +// terminates |dst|, as long as |dst_size| is not 0. +// Unlike strncpy and like strlcpy it does not zero-pad the rest of |dst|. +// Returns nothing. The BSD strlcpy returns the size of |src|, which might +// be > |dst_size|. Anecdotal experience suggests people assume the return value +// is the number of bytes written in |dst|. That assumption can lead to +// dangerous bugs. +// In order to avoid being subtly uncompliant with strlcpy AND avoid misuse, +// the choice here is to return nothing. +inline void StringCopy(char* dst, const char* src, size_t dst_size) { + for (size_t i = 0; i < dst_size; ++i) { + if ((dst[i] = src[i]) == '\0') { + return; // We hit and copied the null terminator. + } + } + + // We were left off at dst_size. We over copied 1 byte. Null terminate. + if (PERFETTO_LIKELY(dst_size > 0)) + dst[dst_size - 1] = 0; +} + +// Like snprintf() but returns the number of chars *actually* written (without +// counting the null terminator) NOT "the number of chars which would have been +// written to the final string if enough space had been available". +// This should be used in almost all cases when the caller uses the return value +// of snprintf(). If the return value is not used, there is no benefit in using +// this wrapper, as this just calls snprintf() and mangles the return value. +// It always null-terminates |dst| (even in case of errors), unless +// |dst_size| == 0. +// Examples: +// SprintfTrunc(x, 4, "123whatever"): returns 3 and writes "123\0". +// SprintfTrunc(x, 4, "123"): returns 3 and writes "123\0". +// SprintfTrunc(x, 3, "123"): returns 2 and writes "12\0". +// SprintfTrunc(x, 2, "123"): returns 1 and writes "1\0". +// SprintfTrunc(x, 1, "123"): returns 0 and writes "\0". +// SprintfTrunc(x, 0, "123"): returns 0 and writes nothing. +// NOTE: This means that the caller has no way to tell when truncation happens +// vs the edge case of *just* fitting in the buffer. +size_t SprintfTrunc(char* dst, size_t dst_size, const char* fmt, ...) + PERFETTO_PRINTF_FORMAT(3, 4); + +// Line number starts from 1 +struct LineWithOffset { + base::StringView line; + uint32_t line_offset; + uint32_t line_num; +}; + +// For given string and offset Pfinds a line with character for +// which offset points, what number is this line (starts from 1), and the offset +// inside this line. returns std::nullopt if the offset points to +// line break character or exceeds string length. +std::optional FindLineWithOffset(base::StringView str, + uint32_t offset); + +// A helper class to facilitate construction and usage of write-once stack +// strings. +// Example usage: +// StackString<32> x("format %d %s", 42, string_arg); +// TakeString(x.c_str() | x.string_view() | x.ToStdString()); +// Rather than char x[32] + sprintf. +// Advantages: +// - Avoids useless zero-fills caused by people doing `char buf[32] {}` (mainly +// by fearing unknown snprintf failure modes). +// - Makes the code more robust in case of snprintf truncations (len() and +// string_view() will return the truncated length, unlike snprintf). +template +class StackString { + public: + explicit PERFETTO_PRINTF_FORMAT(/* 1=this */ 2, 3) + StackString(const char* fmt, ...) { + buf_[0] = '\0'; + va_list args; + va_start(args, fmt); + int res = vsnprintf(buf_, sizeof(buf_), fmt, args); + va_end(args); + buf_[sizeof(buf_) - 1] = '\0'; + len_ = res < 0 ? 0 : std::min(static_cast(res), sizeof(buf_) - 1); + } + + StringView string_view() const { return StringView(buf_, len_); } + std::string ToStdString() const { return std::string(buf_, len_); } + const char* c_str() const { return buf_; } + size_t len() const { return len_; } + char* mutable_data() { return buf_; } + + private: + char buf_[N]; + size_t len_ = 0; // Does not include the \0. +}; + +} // namespace base +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_EXT_BASE_STRING_UTILS_H_ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// gen_amalgamated expanded: #include "perfetto/ext/base/android_utils.h" + +// gen_amalgamated expanded: #include "perfetto/base/build_config.h" + +#include + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) +#include +#endif + +// gen_amalgamated expanded: #include "perfetto/base/compiler.h" +// gen_amalgamated expanded: #include "perfetto/base/logging.h" +// gen_amalgamated expanded: #include "perfetto/base/time.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/string_utils.h" + +#if !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) && \ + !PERFETTO_BUILDFLAG(PERFETTO_OS_NACL) && \ + !PERFETTO_BUILDFLAG(PERFETTO_OS_WASM) +#include +#include +#endif + +namespace perfetto { +namespace base { + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) + +std::string GetAndroidProp(const char* name) { + std::string ret; +#if __ANDROID_API__ >= 26 + const prop_info* pi = __system_property_find(name); + if (!pi) { + return ret; + } + __system_property_read_callback( + pi, + [](void* dst_void, const char*, const char* value, uint32_t) { + std::string& dst = *static_cast(dst_void); + dst = value; + }, + &ret); +#else // __ANDROID_API__ < 26 + char value_buf[PROP_VALUE_MAX]; + int len = __system_property_get(name, value_buf); + if (len > 0 && static_cast(len) < sizeof(value_buf)) { + ret = std::string(value_buf, static_cast(len)); + } +#endif + return ret; +} + +#endif // PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) + +Utsname GetUtsname() { + Utsname utsname_info; +#if !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) && \ + !PERFETTO_BUILDFLAG(PERFETTO_OS_NACL) && \ + !PERFETTO_BUILDFLAG(PERFETTO_OS_WASM) + struct utsname uname_info; + if (uname(&uname_info) == 0) { + utsname_info.sysname = uname_info.sysname; + utsname_info.version = uname_info.version; + utsname_info.machine = uname_info.machine; + utsname_info.release = uname_info.release; + } else { + PERFETTO_ELOG("Unable to read Utsname information"); + } +#endif // !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + return utsname_info; +} + +SystemInfo GetSystemInfo() { + SystemInfo info; + + info.timezone_off_mins = GetTimezoneOffsetMins(); + +#if !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) && \ + !PERFETTO_BUILDFLAG(PERFETTO_OS_NACL) && \ + !PERFETTO_BUILDFLAG(PERFETTO_OS_WASM) + info.utsname_info = GetUtsname(); + info.page_size = static_cast(sysconf(_SC_PAGESIZE)); + info.num_cpus = static_cast(sysconf(_SC_NPROCESSORS_CONF)); +#endif // !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) +#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) + info.android_build_fingerprint = GetAndroidProp("ro.build.fingerprint"); + if (info.android_build_fingerprint.empty()) { + PERFETTO_ELOG("Unable to read ro.build.fingerprint"); + } + + info.android_device_manufacturer = GetAndroidProp("ro.product.manufacturer"); + if (info.android_device_manufacturer.empty()) { + PERFETTO_ELOG("Unable to read ro.product.manufacturer"); + } + + std::string sdk_str_value = GetAndroidProp("ro.build.version.sdk"); + info.android_sdk_version = StringToUInt64(sdk_str_value); + if (!info.android_sdk_version.has_value()) { + PERFETTO_ELOG("Unable to read ro.build.version.sdk"); + } + + info.android_soc_model = GetAndroidProp("ro.soc.model"); + if (info.android_soc_model.empty()) { + PERFETTO_ELOG("Unable to read ro.soc.model"); + } + + // guest_soc model is not always present + info.android_guest_soc_model = GetAndroidProp("ro.boot.guest_soc.model"); + + info.android_hardware_revision = GetAndroidProp("ro.boot.hardware.revision"); + if (info.android_hardware_revision.empty()) { + PERFETTO_ELOG("Unable to read ro.boot.hardware.revision"); + } + + info.android_storage_model = GetAndroidProp("ro.boot.hardware.ufs"); + if (info.android_storage_model.empty()) { + PERFETTO_ELOG("Unable to read ro.boot.hardware.ufs"); + } + + info.android_ram_model = GetAndroidProp("ro.boot.hardware.ddr"); + if (info.android_ram_model.empty()) { + PERFETTO_ELOG("Unable to read ro.boot.hardware.ddr"); + } + + info.android_serial_console = GetAndroidProp("init.svc.console"); + if (info.android_serial_console.empty()) { + PERFETTO_ELOG("Unable to read init.svc.console"); + } +#endif // PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) + + return info; +} + +std::string GetPerfettoMachineName() { + const char* env_name = getenv("PERFETTO_MACHINE_NAME"); + if (env_name) { + return env_name; + } +#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) + std::string name = base::GetAndroidProp("traced.machine_name"); + if (name.empty()) { + name = GetUtsname().sysname; + } + return name; +#else + return GetUtsname().sysname; +#endif +} + +} // namespace base +} // namespace perfetto +// gen_amalgamated begin source: src/base/base64.cc +// gen_amalgamated begin header: include/perfetto/ext/base/base64.h +// gen_amalgamated begin header: include/perfetto/ext/base/utils.h +// gen_amalgamated begin header: include/perfetto/ext/base/sys_types.h +/* + * Copyright (C) 2022 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_EXT_BASE_SYS_TYPES_H_ +#define INCLUDE_PERFETTO_EXT_BASE_SYS_TYPES_H_ + +// This headers deals with sys types commonly used in the codebase that are +// missing on Windows. + +#include // IWYU pragma: export +#include + +// gen_amalgamated expanded: #include "perfetto/base/build_config.h" + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + +#if !PERFETTO_BUILDFLAG(PERFETTO_COMPILER_GCC) +// MinGW has these. clang-cl and MSVC, which use just the Windows SDK, don't. +using uid_t = int; +using pid_t = int; +#endif // !GCC + +#if defined(_WIN64) +using ssize_t = int64_t; +#else +using ssize_t = long; +#endif // _WIN64 + +#endif // OS_WIN + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) +// From libcutils' android_filesystem_config.h +#ifndef AID_ROOT +#define AID_ROOT 0 +#endif +#ifndef AID_STATSD +#define AID_STATSD 1066 +#endif +#ifndef AID_SHELL +#define AID_SHELL 2000 +#endif +#endif + +namespace perfetto { +namespace base { + +// The machine ID used in the tracing core. +using MachineID = uint32_t; +// The default value reserved for the host trace. +constexpr MachineID kDefaultMachineID = 0; + +constexpr uid_t kInvalidUid = static_cast(-1); +constexpr pid_t kInvalidPid = static_cast(-1); + +} // namespace base +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_EXT_BASE_SYS_TYPES_H_ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_EXT_BASE_UTILS_H_ +#define INCLUDE_PERFETTO_EXT_BASE_UTILS_H_ + +#include +#include +#include +#include + +#include +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/base/build_config.h" +// gen_amalgamated expanded: #include "perfetto/base/compiler.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/sys_types.h" + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) +// Even if Windows has errno.h, the all syscall-restart behavior does not apply. +// Trying to handle EINTR can cause more harm than good if errno is left stale. +// Chromium does the same. +#define PERFETTO_EINTR(x) (x) +#else +#define PERFETTO_EINTR(x) \ + ([&] { \ + decltype(x) eintr_wrapper_result; \ + do { \ + eintr_wrapper_result = (x); \ + } while (eintr_wrapper_result == -1 && errno == EINTR); \ + return eintr_wrapper_result; \ + }()) +#endif + +namespace perfetto { +namespace base { + +namespace internal { +extern std::atomic g_cached_page_size; +uint32_t GetSysPageSizeSlowpath(); +} // namespace internal + +// Returns the system's page size. Use this when dealing with mmap, madvise and +// similar mm-related syscalls. +// This function might be called in hot paths. Avoid calling getpagesize() all +// the times, in many implementations getpagesize() calls sysconf() which is +// not cheap. +inline uint32_t GetSysPageSize() { + const uint32_t page_size = + internal::g_cached_page_size.load(std::memory_order_relaxed); + return page_size != 0 ? page_size : internal::GetSysPageSizeSlowpath(); +} + +template +constexpr size_t ArraySize(const T (&)[TSize]) { + return TSize; +} + +// Function object which invokes 'free' on its parameter, which must be +// a pointer. Can be used to store malloc-allocated pointers in std::unique_ptr: +// +// std::unique_ptr foo_ptr( +// static_cast(malloc(sizeof(int)))); +struct FreeDeleter { + inline void operator()(void* ptr) const { free(ptr); } +}; + +template +constexpr T AssumeLittleEndian(T value) { +#if !PERFETTO_IS_LITTLE_ENDIAN() + static_assert(false, "Unimplemented on big-endian archs"); +#endif + return value; +} + +// Round up |size| to a multiple of |alignment| (must be a power of two). +inline constexpr size_t AlignUp(size_t size, size_t alignment) { + return (size + alignment - 1) & ~(alignment - 1); +} + +// TODO(primiano): clean this up and move all existing usages to the constexpr +// version above. +template +constexpr size_t AlignUp(size_t size) { + static_assert((alignment & (alignment - 1)) == 0, "alignment must be a pow2"); + return AlignUp(size, alignment); +} + +inline bool IsAgain(int err) { + return err == EAGAIN || err == EWOULDBLOCK; +} + +// setenv(2)-equivalent. Deals with Windows vs Posix discrepancies. +void SetEnv(const std::string& key, const std::string& value); + +// unsetenv(2)-equivalent. Deals with Windows vs Posix discrepancies. +void UnsetEnv(const std::string& key); + +// Calls mallopt(M_PURGE, 0) on Android. Does nothing on other platforms. +// This forces the allocator to release freed memory. This is used to work +// around various Scudo inefficiencies. See b/170217718. +void MaybeReleaseAllocatorMemToOS(); + +// geteuid() on POSIX OSes, returns 0 on Windows (See comment in utils.cc). +uid_t GetCurrentUserId(); + +// Forks the process. +// Parent: prints the PID of the child, calls |parent_cb| and exits from the +// process with its return value. +// Child: redirects stdio onto /dev/null, chdirs into / and returns. +void Daemonize(std::function parent_cb); + +// Returns the path of the current executable, e.g. /foo/bar/exe. +std::string GetCurExecutablePath(); + +// Returns the directory where the current executable lives in, e.g. /foo/bar. +// This is independent of cwd(). +std::string GetCurExecutableDir(); + +// Memory returned by AlignedAlloc() must be freed via AlignedFree() not just +// free. It makes a difference on Windows where _aligned_malloc() and +// _aligned_free() must be paired. +// Prefer using the AlignedAllocTyped() below which takes care of the pairing. +void* AlignedAlloc(size_t alignment, size_t size); +void AlignedFree(void*); + +// Detects Sync-mode MTE (currently being tested in some Android builds). +// This is known to use extra memory for the stack history buffer. +bool IsSyncMemoryTaggingEnabled(); + +// A RAII version of the above, which takes care of pairing Aligned{Alloc,Free}. +template +struct AlignedDeleter { + inline void operator()(T* ptr) const { AlignedFree(ptr); } +}; + +// The remove_extent here and below is to allow defining unique_ptr. +// As per https://en.cppreference.com/w/cpp/memory/unique_ptr the Deleter takes +// always a T*, not a T[]*. +template +using AlignedUniquePtr = + std::unique_ptr::type>>; + +template +AlignedUniquePtr AlignedAllocTyped(size_t n_membs) { + using TU = typename std::remove_extent::type; + return AlignedUniquePtr( + static_cast(AlignedAlloc(alignof(TU), sizeof(TU) * n_membs))); +} + +// A RAII wrapper to invoke a function when leaving a function/scope. +template +class OnScopeExitWrapper { + public: + explicit OnScopeExitWrapper(Func f) : f_(std::move(f)), active_(true) {} + OnScopeExitWrapper(OnScopeExitWrapper&& other) noexcept + : f_(std::move(other.f_)), active_(other.active_) { + other.active_ = false; + } + ~OnScopeExitWrapper() { + if (active_) + f_(); + } + + private: + Func f_; + bool active_; +}; + +template +PERFETTO_WARN_UNUSED_RESULT OnScopeExitWrapper OnScopeExit(Func f) { + return OnScopeExitWrapper(std::move(f)); +} + +// Returns a xxd-style hex dump (hex + ascii chars) of the input data. +std::string HexDump(const void* data, size_t len, size_t bytes_per_line = 16); +inline std::string HexDump(const std::string& data, + size_t bytes_per_line = 16) { + return HexDump(data.data(), data.size(), bytes_per_line); +} + +} // namespace base +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_EXT_BASE_UTILS_H_ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_EXT_BASE_BASE64_H_ +#define INCLUDE_PERFETTO_EXT_BASE_BASE64_H_ + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/ext/base/string_view.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/utils.h" // For ssize_t. + +namespace perfetto { +namespace base { + +// Returns the length of the destination string (included '=' padding). +// Does NOT include the size of the string null terminator. +inline size_t Base64EncSize(size_t src_size) { + return (src_size + 2) / 3 * 4; +} + +// Returns the upper bound on the length of the destination buffer. +// The actual decoded length might be <= the number returned here. +inline size_t Base64DecSize(size_t src_size) { + return (src_size + 3) / 4 * 3; +} + +// Does NOT null-terminate |dst|. +ssize_t Base64Encode(const void* src, + size_t src_size, + char* dst, + size_t dst_size); + +std::string Base64Encode(const void* src, size_t src_size); + +inline std::string Base64Encode(StringView sv) { + return Base64Encode(sv.data(), sv.size()); +} + +// Returns -1 in case of failure. +ssize_t Base64Decode(const char* src, + size_t src_size, + uint8_t* dst, + size_t dst_size); + +std::optional Base64Decode(const char* src, size_t src_size); + +inline std::optional Base64Decode(StringView sv) { + return Base64Decode(sv.data(), sv.size()); +} + +} // namespace base +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_EXT_BASE_BASE64_H_ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// gen_amalgamated expanded: #include "perfetto/ext/base/base64.h" + +namespace perfetto { +namespace base { + +namespace { + +constexpr char kPadding = '='; + +constexpr char kEncTable[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +static_assert(sizeof(kEncTable) == (1u << 6) + sizeof('\0'), "Bad table size"); + +// Maps an ASCII character to its 6-bit value. It only contains translations +// from '+' to 'z'. Supports the standard (+/) and URL-safe (-_) alphabets. +constexpr uint8_t kX = 0xff; // Value used for invalid characters +constexpr uint8_t kDecTable[] = { + 62, kX, 62, kX, 63, 52, 53, 54, 55, 56, // 00 - 09 + 57, 58, 59, 60, 61, kX, kX, kX, 0, kX, // 10 - 19 + kX, kX, 0, 1, 2, 3, 4, 5, 6, 7, // 20 - 29 + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, // 30 - 39 + 18, 19, 20, 21, 22, 23, 24, 25, kX, kX, // 40 - 49 + kX, kX, 63, kX, 26, 27, 28, 29, 30, 31, // 50 - 59 + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, // 60 - 69 + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, // 70 - 79 +}; +constexpr char kMinDecChar = '+'; +constexpr char kMaxDecChar = 'z'; +static_assert(kMaxDecChar - kMinDecChar <= sizeof(kDecTable), "Bad table size"); + +inline uint8_t DecodeChar(char c) { + if (c < kMinDecChar || c > kMaxDecChar) + return kX; + return kDecTable[c - kMinDecChar]; +} + +} // namespace + +ssize_t Base64Encode(const void* src, + size_t src_size, + char* dst, + size_t dst_size) { + const size_t padded_dst_size = Base64EncSize(src_size); + if (dst_size < padded_dst_size) + return -1; // Not enough space in output. + + const uint8_t* rd = static_cast(src); + const uint8_t* const end = rd + src_size; + size_t wr_size = 0; + while (rd < end) { + uint8_t s[3]{}; + s[0] = *(rd++); + dst[wr_size++] = kEncTable[s[0] >> 2]; + + uint8_t carry0 = static_cast((s[0] & 0x03) << 4); + if (PERFETTO_LIKELY(rd < end)) { + s[1] = *(rd++); + dst[wr_size++] = kEncTable[carry0 | (s[1] >> 4)]; + } else { + dst[wr_size++] = kEncTable[carry0]; + dst[wr_size++] = kPadding; + dst[wr_size++] = kPadding; + break; + } + + uint8_t carry1 = static_cast((s[1] & 0x0f) << 2); + if (PERFETTO_LIKELY(rd < end)) { + s[2] = *(rd++); + dst[wr_size++] = kEncTable[carry1 | (s[2] >> 6)]; + } else { + dst[wr_size++] = kEncTable[carry1]; + dst[wr_size++] = kPadding; + break; + } + + dst[wr_size++] = kEncTable[s[2] & 0x3f]; + } + PERFETTO_DCHECK(wr_size == padded_dst_size); + return static_cast(padded_dst_size); +} + +std::string Base64Encode(const void* src, size_t src_size) { + std::string dst; + dst.resize(Base64EncSize(src_size)); + auto res = Base64Encode(src, src_size, &dst[0], dst.size()); + PERFETTO_CHECK(res == static_cast(dst.size())); + return dst; +} + +ssize_t Base64Decode(const char* src, + size_t src_size, + uint8_t* dst, + size_t dst_size) { + const size_t min_dst_size = Base64DecSize(src_size); + if (dst_size < min_dst_size) + return -1; + + const char* rd = src; + const char* const end = src + src_size; + size_t wr_size = 0; + + char s[4]{}; + while (rd < end) { + uint8_t d[4]; + for (uint32_t j = 0; j < 4; j++) { + // Padding is only feasible for the last 2 chars of each group of 4. + s[j] = rd < end ? *(rd++) : (j < 2 ? '\0' : kPadding); + d[j] = DecodeChar(s[j]); + if (d[j] == kX) + return -1; // Invalid input char. + } + dst[wr_size] = static_cast((d[0] << 2) | (d[1] >> 4)); + dst[wr_size + 1] = static_cast((d[1] << 4) | (d[2] >> 2)); + dst[wr_size + 2] = static_cast((d[2] << 6) | (d[3])); + wr_size += 3; + } + + PERFETTO_CHECK(wr_size <= dst_size); + wr_size -= (s[3] == kPadding ? 1 : 0) + (s[2] == kPadding ? 1 : 0); + return static_cast(wr_size); +} + +std::optional Base64Decode(const char* src, size_t src_size) { + std::string dst; + dst.resize(Base64DecSize(src_size)); + auto res = Base64Decode(src, src_size, reinterpret_cast(&dst[0]), + dst.size()); + if (res < 0) + return std::nullopt; // Decoding error. + + PERFETTO_CHECK(res <= static_cast(dst.size())); + dst.resize(static_cast(res)); + return std::make_optional(dst); +} + +} // namespace base +} // namespace perfetto +// gen_amalgamated begin source: src/base/crash_keys.cc +// gen_amalgamated begin header: include/perfetto/ext/base/crash_keys.h +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_EXT_BASE_CRASH_KEYS_H_ +#define INCLUDE_PERFETTO_EXT_BASE_CRASH_KEYS_H_ + +#include +#include + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/base/compiler.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/string_view.h" + +// Crash keys are very simple global variables with static-storage that +// are reported on crash time for managed crashes (CHECK/FATAL/Watchdog). +// - Translation units can define a CrashKey and register it at some point +// during initialization. +// - CrashKey instances must be long-lived. They should really be just global +// static variable in the anonymous namespace. +// Example: +// subsystem_1.cc +// CrashKey g_client_id("ipc_client_id"); +// ... +// OnIpcReceived(client_id) { +// g_client_id.Set(client_id); +// ... // Process the IPC +// g_client_id.Clear(); +// } +// Or equivalently: +// OnIpcReceived(client_id) { +// auto scoped_key = g_client_id.SetScoped(client_id); +// ... // Process the IPC +// } +// +// If a crash happens while processing the IPC, the crash report will +// have a line "ipc_client_id: 42". +// +// Thread safety considerations: +// CrashKeys can be registered and set/cleared from any thread. +// There is no compelling use-case to have full acquire/release consistency when +// setting a key. This means that if a thread crashes immediately after a +// crash key has been set on another thread, the value printed on the crash +// report could be incomplete. The code guarantees defined behavior and does +// not rely on null-terminated string (in the worst case 32 bytes of random +// garbage will be printed out). + +// The tests live in logging_unittest.cc. + +namespace perfetto { +namespace base { + +constexpr size_t kCrashKeyMaxStrSize = 32; + +// CrashKey instances must be long lived +class CrashKey { + public: + class ScopedClear { + public: + explicit ScopedClear(CrashKey* k) : key_(k) {} + ~ScopedClear() { + if (key_) + key_->Clear(); + } + ScopedClear(const ScopedClear&) = delete; + ScopedClear& operator=(const ScopedClear&) = delete; + ScopedClear& operator=(ScopedClear&&) = delete; + ScopedClear(ScopedClear&& other) noexcept : key_(other.key_) { + other.key_ = nullptr; + } + + private: + CrashKey* key_; + }; + + // constexpr so it can be used in the anon namespace without requiring a + // global constructor. + // |name| must be a long-lived string. + constexpr explicit CrashKey(const char* name) + : registered_{}, type_(Type::kUnset), name_(name), str_value_{} {} + CrashKey(const CrashKey&) = delete; + CrashKey& operator=(const CrashKey&) = delete; + CrashKey(CrashKey&&) = delete; + CrashKey& operator=(CrashKey&&) = delete; + + enum class Type : uint8_t { kUnset = 0, kInt, kStr }; + + void Clear() { + int_value_.store(0, std::memory_order_relaxed); + type_.store(Type::kUnset, std::memory_order_relaxed); + } + + void Set(int64_t value) { + int_value_.store(value, std::memory_order_relaxed); + type_.store(Type::kInt, std::memory_order_relaxed); + if (PERFETTO_UNLIKELY(!registered_.load(std::memory_order_relaxed))) + Register(); + } + + void Set(StringView sv) { + size_t len = std::min(sv.size(), sizeof(str_value_) - 1); + for (size_t i = 0; i < len; ++i) + str_value_[i].store(sv.data()[i], std::memory_order_relaxed); + str_value_[len].store('\0', std::memory_order_relaxed); + type_.store(Type::kStr, std::memory_order_relaxed); + if (PERFETTO_UNLIKELY(!registered_.load(std::memory_order_relaxed))) + Register(); + } + + ScopedClear SetScoped(int64_t value) PERFETTO_WARN_UNUSED_RESULT { + Set(value); + return ScopedClear(this); + } + + ScopedClear SetScoped(StringView sv) PERFETTO_WARN_UNUSED_RESULT { + Set(sv); + return ScopedClear(this); + } + + void Register(); + + int64_t int_value() const { + return int_value_.load(std::memory_order_relaxed); + } + size_t ToString(char* dst, size_t len); + + private: + std::atomic registered_; + std::atomic type_; + const char* const name_; + union { + std::atomic str_value_[kCrashKeyMaxStrSize]; + std::atomic int_value_; + }; +}; + +// Fills |dst| with a string containing one line for each crash key +// (excluding the unset ones). +// Returns number of chars written, without counting the NUL terminator. +// This is used in logging.cc when emitting the crash report abort message. +size_t SerializeCrashKeys(char* dst, size_t len); + +void UnregisterAllCrashKeysForTesting(); + +} // namespace base +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_EXT_BASE_CRASH_KEYS_H_ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// gen_amalgamated expanded: #include "perfetto/ext/base/crash_keys.h" + +#include + +#include +#include + +// gen_amalgamated expanded: #include "perfetto/ext/base/string_utils.h" + +namespace perfetto { +namespace base { + +namespace { + +constexpr size_t kMaxKeys = 32; + +std::atomic g_keys[kMaxKeys]{}; +std::atomic g_num_keys{}; +} // namespace + +void CrashKey::Register() { + // If doesn't matter if we fail below. If there are no slots left, don't + // keep trying re-registering on every Set(), the outcome won't change. + + // If two threads raced on the Register(), avoid registering the key twice. + if (registered_.exchange(true)) + return; + + uint32_t slot = g_num_keys.fetch_add(1); + if (slot >= kMaxKeys) { + PERFETTO_LOG("Too many crash keys registered"); + return; + } + g_keys[slot].store(this); +} + +// Returns the number of chars written, without counting the \0. +size_t CrashKey::ToString(char* dst, size_t len) { + if (len > 0) + *dst = '\0'; + switch (type_.load(std::memory_order_relaxed)) { + case Type::kUnset: + break; + case Type::kInt: + return SprintfTrunc(dst, len, "%s: %" PRId64 "\n", name_, + int_value_.load(std::memory_order_relaxed)); + case Type::kStr: + char buf[sizeof(str_value_)]; + for (size_t i = 0; i < sizeof(str_value_); i++) + buf[i] = str_value_[i].load(std::memory_order_relaxed); + + // Don't assume |str_value_| is properly null-terminated. + return SprintfTrunc(dst, len, "%s: %.*s\n", name_, int(sizeof(buf)), buf); + } + return 0; +} + +void UnregisterAllCrashKeysForTesting() { + g_num_keys.store(0); + for (auto& key : g_keys) + key.store(nullptr); +} + +size_t SerializeCrashKeys(char* dst, size_t len) { + size_t written = 0; + uint32_t num_keys = g_num_keys.load(); + if (len > 0) + *dst = '\0'; + for (uint32_t i = 0; i < num_keys && written < len; i++) { + CrashKey* key = g_keys[i].load(); + if (!key) + continue; // Can happen if we hit this between the add and the store. + written += key->ToString(dst + written, len - written); + } + PERFETTO_DCHECK(written <= len); + PERFETTO_DCHECK(len == 0 || dst[written] == '\0'); + return written; +} + +} // namespace base +} // namespace perfetto +// gen_amalgamated begin source: src/base/ctrl_c_handler.cc +// gen_amalgamated begin header: include/perfetto/ext/base/ctrl_c_handler.h +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_EXT_BASE_CTRL_C_HANDLER_H_ +#define INCLUDE_PERFETTO_EXT_BASE_CTRL_C_HANDLER_H_ + +namespace perfetto { +namespace base { + +// On Linux/Android/Mac: installs SIGINT + SIGTERM signal handlers. +// On Windows: installs a SetConsoleCtrlHandler() handler. +// The passed handler must be async safe. +using CtrlCHandlerFunction = void (*)(); +void InstallCtrlCHandler(CtrlCHandlerFunction); + +} // namespace base +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_EXT_BASE_CTRL_C_HANDLER_H_ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// gen_amalgamated expanded: #include "perfetto/ext/base/ctrl_c_handler.h" + +// gen_amalgamated expanded: #include "perfetto/base/build_config.h" +// gen_amalgamated expanded: #include "perfetto/base/compiler.h" +// gen_amalgamated expanded: #include "perfetto/base/logging.h" + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) +#include + +#include +#else +#include +#include +#endif + +namespace perfetto { +namespace base { + +namespace { +CtrlCHandlerFunction g_handler = nullptr; +} + +void InstallCtrlCHandler(CtrlCHandlerFunction handler) { + PERFETTO_CHECK(g_handler == nullptr); + g_handler = handler; + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + auto trampoline = [](DWORD type) -> int { + if (type == CTRL_C_EVENT) { + g_handler(); + return true; + } + return false; + }; + ::SetConsoleCtrlHandler(trampoline, true); +#elif PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \ + PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \ + PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) + // Setup signal handler. + struct sigaction sa{}; + +// Glibc headers for sa_sigaction trigger this. +#pragma GCC diagnostic push +#if defined(__clang__) +#pragma GCC diagnostic ignored "-Wdisabled-macro-expansion" +#endif + sa.sa_handler = [](int) { g_handler(); }; +#if !PERFETTO_BUILDFLAG(PERFETTO_OS_QNX) + sa.sa_flags = static_cast(SA_RESETHAND | SA_RESTART); +#else // POSIX-compliant + sa.sa_flags = static_cast(SA_RESETHAND); +#endif +#pragma GCC diagnostic pop + sigaction(SIGINT, &sa, nullptr); + sigaction(SIGTERM, &sa, nullptr); +#else + // Do nothing on NaCL and Fuchsia. + ignore_result(handler); +#endif +} + +} // namespace base +} // namespace perfetto +// gen_amalgamated begin source: src/base/event_fd.cc +// gen_amalgamated begin header: include/perfetto/ext/base/event_fd.h +// gen_amalgamated begin header: include/perfetto/ext/base/scoped_file.h +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_EXT_BASE_SCOPED_FILE_H_ +#define INCLUDE_PERFETTO_EXT_BASE_SCOPED_FILE_H_ + +// gen_amalgamated expanded: #include "perfetto/base/build_config.h" + +#include + +#if !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) +#include // For DIR* / opendir(). +#endif + +#include + +// gen_amalgamated expanded: #include "perfetto/base/export.h" +// gen_amalgamated expanded: #include "perfetto/base/logging.h" +// gen_amalgamated expanded: #include "perfetto/base/platform_handle.h" + +namespace perfetto { +namespace base { + +namespace internal { +// Used for the most common cases of ScopedResource where there is only one +// invalid value. +template +struct DefaultValidityChecker { + static bool IsValid(T t) { return t != InvalidValue; } +}; +} // namespace internal + +// RAII classes for auto-releasing fds and dirs. +// if T is a pointer type, InvalidValue must be nullptr. Doing otherwise +// causes weird unexpected behaviors (See https://godbolt.org/z/5nGMW4). +template > +class ScopedResource { + public: + using ValidityChecker = Checker; + static constexpr T kInvalid = InvalidValue; + + explicit ScopedResource(T t = InvalidValue) : t_(t) {} + ScopedResource(ScopedResource&& other) noexcept : t_(other.t_) { + other.t_ = InvalidValue; + } + ScopedResource& operator=(ScopedResource&& other) { + reset(other.t_); + other.t_ = InvalidValue; + return *this; + } + T get() const { return t_; } + T operator*() const { return t_; } + explicit operator bool() const { return Checker::IsValid(t_); } + void reset(T r = InvalidValue) { + if (Checker::IsValid(t_)) { + int res = CloseFunction(t_); + if (CheckClose) + PERFETTO_CHECK(res == 0); + } + t_ = r; + } + T release() { + T t = t_; + t_ = InvalidValue; + return t; + } + ~ScopedResource() { reset(InvalidValue); } + + private: + ScopedResource(const ScopedResource&) = delete; + ScopedResource& operator=(const ScopedResource&) = delete; + T t_; +}; + +// Declared in file_utils.h. Forward declared to avoid #include cycles. +int PERFETTO_EXPORT_COMPONENT CloseFile(int fd); + +// Use this for file resources obtained via open() and similar APIs. +using ScopedFile = ScopedResource; +using ScopedFstream = ScopedResource; + +// Use this for resources that are HANDLE on Windows. See comments in +// platform_handle.h +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) +using ScopedPlatformHandle = ScopedResource; +#else +// On non-windows systems we alias ScopedPlatformHandle to ScopedFile because +// they are really the same. This is to allow assignments between the two in +// Linux-specific code paths that predate ScopedPlatformHandle. +static_assert(std::is_same::value, ""); +using ScopedPlatformHandle = ScopedFile; + +// DIR* does not exist on Windows. +using ScopedDir = ScopedResource; +#endif + +} // namespace base +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_EXT_BASE_SCOPED_FILE_H_ +/* + * Copyright (C) 2018 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_EXT_BASE_EVENT_FD_H_ +#define INCLUDE_PERFETTO_EXT_BASE_EVENT_FD_H_ + +// gen_amalgamated expanded: #include "perfetto/base/build_config.h" +// gen_amalgamated expanded: #include "perfetto/base/platform_handle.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/scoped_file.h" + +namespace perfetto { +namespace base { + +// A waitable event that can be used with poll/select. +// This is really a wrapper around eventfd_create with a pipe-based fallback +// for other platforms where eventfd is not supported. +class EventFd { + public: + EventFd(); + ~EventFd(); + EventFd(EventFd&&) noexcept = default; + EventFd& operator=(EventFd&&) = default; + + // The non-blocking file descriptor that can be polled to wait for the event. + PlatformHandle fd() const { return event_handle_.get(); } + + // Can be called from any thread. + void Notify(); + + // Can be called from any thread. If more Notify() are queued a Clear() call + // can clear all of them (up to 16 per call). + void Clear(); + + private: + // The eventfd, when eventfd is supported, otherwise this is the read end of + // the pipe for fallback mode. + ScopedPlatformHandle event_handle_; + +// QNX is specified because it is a non-Linux UNIX platform but it +// still sets the PERFETTO_OS_LINUX flag to be as compatible as possible +// with the Linux build. +#if !PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) && \ + !PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) && \ + !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + // On Mac and other non-Linux UNIX platforms a pipe-based fallback is used. + // The write end of the wakeup pipe. + ScopedFile write_fd_; +#endif +}; + +} // namespace base +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_EXT_BASE_EVENT_FD_H_ +// gen_amalgamated begin header: include/perfetto/ext/base/pipe.h +/* + * Copyright (C) 2018 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_EXT_BASE_PIPE_H_ +#define INCLUDE_PERFETTO_EXT_BASE_PIPE_H_ + +// gen_amalgamated expanded: #include "perfetto/base/platform_handle.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/scoped_file.h" + +namespace perfetto { +namespace base { + +class Pipe { + public: + enum Flags { + kBothBlock = 0, +#if !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + kBothNonBlock, + kRdNonBlock, + kWrNonBlock, +#endif + }; + + static Pipe Create(Flags = kBothBlock); + + Pipe(); + Pipe(Pipe&&) noexcept; + Pipe& operator=(Pipe&&); + + ScopedPlatformHandle rd; + ScopedPlatformHandle wr; +}; + +} // namespace base +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_EXT_BASE_PIPE_H_ +/* + * Copyright (C) 2018 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// gen_amalgamated expanded: #include "perfetto/base/build_config.h" + +#include +#include + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) +#include + +#include +#elif PERFETTO_BUILDFLAG(PERFETTO_OS_QNX) +#include +#elif PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \ + PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) +#include +#include +#else // Mac, Fuchsia and other non-Linux UNIXes +#include +#endif + +// gen_amalgamated expanded: #include "perfetto/base/logging.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/event_fd.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/pipe.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/utils.h" + +namespace perfetto { +namespace base { + +EventFd::~EventFd() = default; + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) +EventFd::EventFd() { + event_handle_.reset( + CreateEventA(/*lpEventAttributes=*/nullptr, /*bManualReset=*/true, + /*bInitialState=*/false, /*bInitialState=*/nullptr)); +} + +void EventFd::Notify() { + if (!SetEvent(event_handle_.get())) // 0: fail, !0: success, unlike UNIX. + PERFETTO_DFATAL("EventFd::Notify()"); +} + +void EventFd::Clear() { + if (!ResetEvent(event_handle_.get())) // 0: fail, !0: success, unlike UNIX. + PERFETTO_DFATAL("EventFd::Clear()"); +} + +#elif PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX_BUT_NOT_QNX) || \ + PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) + +EventFd::EventFd() { + event_handle_.reset(eventfd(/*initval=*/0, EFD_CLOEXEC | EFD_NONBLOCK)); + PERFETTO_CHECK(event_handle_); +} + +void EventFd::Notify() { + const uint64_t value = 1; + ssize_t ret = write(event_handle_.get(), &value, sizeof(value)); + if (ret <= 0 && errno != EAGAIN) + PERFETTO_DFATAL("EventFd::Notify()"); +} + +void EventFd::Clear() { + uint64_t value; + ssize_t ret = + PERFETTO_EINTR(read(event_handle_.get(), &value, sizeof(value))); + if (ret <= 0 && errno != EAGAIN) + PERFETTO_DFATAL("EventFd::Clear()"); +} + +#else + +EventFd::EventFd() { + // Make the pipe non-blocking so that we never block the waking thread (either + // the main thread or another one) when scheduling a wake-up. + Pipe pipe = Pipe::Create(Pipe::kBothNonBlock); + event_handle_ = ScopedPlatformHandle(std::move(pipe.rd).release()); + write_fd_ = std::move(pipe.wr); +} + +void EventFd::Notify() { + const uint64_t value = 1; + ssize_t ret = write(write_fd_.get(), &value, sizeof(uint8_t)); + if (ret <= 0 && errno != EAGAIN) + PERFETTO_DFATAL("EventFd::Notify()"); +} + +void EventFd::Clear() { + // Drain the byte(s) written to the wake-up pipe. We can potentially read + // more than one byte if several wake-ups have been scheduled. + char buffer[16]; + ssize_t ret = + PERFETTO_EINTR(read(event_handle_.get(), &buffer[0], sizeof(buffer))); + if (ret <= 0 && errno != EAGAIN) + PERFETTO_DFATAL("EventFd::Clear()"); +} +#endif + +} // namespace base +} // namespace perfetto +// gen_amalgamated begin source: src/base/file_utils.cc +// gen_amalgamated begin header: include/perfetto/ext/base/file_utils.h +// gen_amalgamated begin header: include/perfetto/base/status.h +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_BASE_STATUS_H_ +#define INCLUDE_PERFETTO_BASE_STATUS_H_ + +#include +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/base/compiler.h" +// gen_amalgamated expanded: #include "perfetto/base/export.h" +// gen_amalgamated expanded: #include "perfetto/base/logging.h" + +namespace perfetto { +namespace base { + +// Represents either the success or the failure message of a function. +// This can used as the return type of functions which would usually return an +// bool for success or int for errno but also wants to add some string context +// (ususally for logging). +// +// Similar to absl::Status, an optional "payload" can also be included with more +// context about the error. This allows passing additional metadata about the +// error (e.g. location of errors, potential mitigations etc). +class PERFETTO_EXPORT_COMPONENT Status { + public: + Status() : ok_(true) {} + explicit Status(std::string msg) : ok_(false), message_(std::move(msg)) { + PERFETTO_CHECK(!message_.empty()); + } + + // Copy operations. + Status(const Status&) = default; + Status& operator=(const Status&) = default; + + // Move operations. The moved-from state is valid but unspecified. + Status(Status&&) noexcept = default; + Status& operator=(Status&&) = default; + + bool ok() const { return ok_; } + + // When ok() is false this returns the error message. Returns the empty string + // otherwise. + const std::string& message() const { return message_; } + const char* c_message() const { return message_.c_str(); } + + ////////////////////////////////////////////////////////////////////////////// + // Payload Management APIs + ////////////////////////////////////////////////////////////////////////////// + + // Payloads can be attached to error statuses to provide additional context. + // + // Payloads are (key, value) pairs, where the key is a string acting as a + // unique "type URL" and the value is an opaque string. The "type URL" should + // be unique, follow the format of a URL and, ideally, documentation on how to + // interpret its associated data should be available. + // + // To attach a payload to a status object, call `Status::SetPayload()`. + // Similarly, to extract the payload from a status, call + // `Status::GetPayload()`. + // + // Note: the payload APIs are only meaningful to call when the status is an + // error. Otherwise, all methods are noops. + + // Gets the payload for the given |type_url| if one exists. + // + // Will always return std::nullopt if |ok()|. + std::optional GetPayload(std::string_view type_url) const; + + // Sets the payload for the given key. The key should + // + // Will always do nothing if |ok()|. + void SetPayload(std::string_view type_url, std::string value); + + // Erases the payload for the given string and returns true if the payload + // existed and was erased. + // + // Will always do nothing if |ok()|. + bool ErasePayload(std::string_view type_url); + + private: + struct Payload { + std::string type_url; + std::string payload; + }; + + bool ok_ = false; + std::string message_; + std::vector payloads_; +}; + +// Returns a status object which represents the Ok status. +inline Status OkStatus() { + return Status(); +} + +Status ErrStatus(const char* format, ...) PERFETTO_PRINTF_FORMAT(1, 2); + +} // namespace base +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_BASE_STATUS_H_ +/* + * Copyright (C) 2018 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_EXT_BASE_FILE_UTILS_H_ +#define INCLUDE_PERFETTO_EXT_BASE_FILE_UTILS_H_ + +#include // For mode_t & O_RDONLY/RDWR. Exists also on Windows. +#include + +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/base/build_config.h" +// gen_amalgamated expanded: #include "perfetto/base/export.h" +// gen_amalgamated expanded: #include "perfetto/base/status.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/scoped_file.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/utils.h" + +namespace perfetto { +namespace base { + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) +using FileOpenMode = int; +inline constexpr char kDevNull[] = "NUL"; +inline constexpr char kFopenReadFlag[] = "r"; +#else +using FileOpenMode = mode_t; +inline constexpr char kDevNull[] = "/dev/null"; +inline constexpr char kFopenReadFlag[] = "re"; +#endif + +constexpr FileOpenMode kFileModeInvalid = static_cast(-1); + +bool ReadPlatformHandle(PlatformHandle, std::string* out); +bool ReadFileDescriptor(int fd, std::string* out); +bool ReadFileStream(FILE* f, std::string* out); +bool ReadFile(const std::string& path, std::string* out); + +// A wrapper around read(2). It deals with Linux vs Windows includes. It also +// deals with handling EINTR. Has the same semantics of UNIX's read(2). +ssize_t Read(int fd, void* dst, size_t dst_size); + +// Call write until all data is written or an error is detected. +// +// man 2 write: +// If a write() is interrupted by a signal handler before any bytes are +// written, then the call fails with the error EINTR; if it is +// interrupted after at least one byte has been written, the call +// succeeds, and returns the number of bytes written. +ssize_t WriteAll(int fd, const void* buf, size_t count); + +// Copies all data from |fd_in| to |fd_out|. Saves the offset of |fd_in|, +// rewinds it to the beginning, copies the content, and restores the offset. +// |fd_in| can't be a pipe, socket of FIFO. +base::Status CopyFileContents(int fd_in, int fd_out); + +ssize_t WriteAllHandle(PlatformHandle, const void* buf, size_t count); + +ScopedFile OpenFile(const std::string& path, + int flags, + FileOpenMode = kFileModeInvalid); +ScopedFstream OpenFstream(const std::string& path, const std::string& mode); + +// This is an alias for close(). It's to avoid leaking windows.h in headers. +// Exported because ScopedFile is used in the /include/ext API by Chromium +// component builds. +int PERFETTO_EXPORT_COMPONENT CloseFile(int fd); + +bool FlushFile(int fd); + +// Returns true if mkdir succeeds, false if it fails (see errno in that case). +bool Mkdir(const std::string& path); + +// Calls rmdir() on UNIX, _rmdir() on Windows. +bool Rmdir(const std::string& path); + +// Wrapper around access(path, F_OK). +bool FileExists(const std::string& path); + +// Gets the extension for a filename. If the file has two extensions, returns +// only the last one (foo.pb.gz => .gz). Returns empty string if there is no +// extension. +std::string GetFileExtension(const std::string& filename); + +// Puts the path to all files under |dir_path| in |output|, recursively walking +// subdirectories. File paths are relative to |dir_path|. Only files are +// included, not directories. Path separator is always '/', even on windows (not +// '\'). +base::Status ListFilesRecursive(const std::string& dir_path, + std::vector& output); + +// Sets |path|'s owner group to |group_name| and permission mode bits to +// |mode_bits|. +base::Status SetFilePermissions(const std::string& path, + const std::string& group_name, + const std::string& mode_bits); + +// Returns the size of the file located at |path|, or nullopt in case of error. +std::optional GetFileSize(const std::string& path); + +// Returns the size of the open file |fd|, or nullopt in case of error. +std::optional GetFileSize(PlatformHandle fd); + +} // namespace base +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_EXT_BASE_FILE_UTILS_H_ +/* + * Copyright (C) 2018 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// gen_amalgamated expanded: #include "perfetto/ext/base/file_utils.h" + +#include +#include + +#include +#include +#include +#include +#include + +// gen_amalgamated expanded: #include "perfetto/base/build_config.h" +// gen_amalgamated expanded: #include "perfetto/base/compiler.h" +// gen_amalgamated expanded: #include "perfetto/base/logging.h" +// gen_amalgamated expanded: #include "perfetto/base/platform_handle.h" +// gen_amalgamated expanded: #include "perfetto/base/status.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/platform.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/scoped_file.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/string_utils.h" +// gen_amalgamated expanded: #include "perfetto/ext/base/utils.h" + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) +#include + +#include +#include +#include +#else +#include +#include +#endif + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \ + PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \ + PERFETTO_BUILDFLAG(PERFETTO_OS_FREEBSD) || \ + PERFETTO_BUILDFLAG(PERFETTO_OS_APPLE) +#define PERFETTO_SET_FILE_PERMISSIONS +#include +#include +#include +#include +#include +#endif + +namespace perfetto { +namespace base { +namespace { +constexpr size_t kBufSize = 2048; + +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) +// Wrap FindClose to: (1) make the return unix-style; (2) deal with stdcall. +int CloseFindHandle(HANDLE h) { + return FindClose(h) ? 0 : -1; +} + +std::optional ToUtf16(const std::string& str) { + int len = MultiByteToWideChar(CP_UTF8, 0, str.data(), + static_cast(str.size()), nullptr, 0); + if (len < 0) { + return std::nullopt; + } + std::vector tmp; + tmp.resize(static_cast::size_type>(len)); + len = + MultiByteToWideChar(CP_UTF8, 0, str.data(), static_cast(str.size()), + tmp.data(), static_cast(tmp.size())); + if (len < 0) { + return std::nullopt; + } + PERFETTO_CHECK(static_cast::size_type>(len) == + tmp.size()); + return std::wstring(tmp.data(), tmp.size()); +} + +#endif + +} // namespace + +ssize_t Read(int fd, void* dst, size_t dst_size) { + ssize_t ret; + platform::BeforeMaybeBlockingSyscall(); +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + ret = _read(fd, dst, static_cast(dst_size)); +#else + ret = PERFETTO_EINTR(read(fd, dst, dst_size)); +#endif + platform::AfterMaybeBlockingSyscall(); + return ret; +} + +bool ReadFileDescriptor(int fd, std::string* out) { + // Do not override existing data in string. + size_t i = out->size(); + + struct stat buf{}; + if (fstat(fd, &buf) != -1) { + if (buf.st_size > 0) + out->resize(i + static_cast(buf.st_size)); + } + + ssize_t bytes_read; + for (;;) { + if (out->size() < i + kBufSize) + out->resize(out->size() + kBufSize); + + bytes_read = Read(fd, &((*out)[i]), kBufSize); + if (bytes_read > 0) { + i += static_cast(bytes_read); + } else { + out->resize(i); + return bytes_read == 0; + } + } +} + +bool ReadPlatformHandle(PlatformHandle h, std::string* out) { +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + // Do not override existing data in string. + size_t i = out->size(); + + for (;;) { + if (out->size() < i + kBufSize) + out->resize(out->size() + kBufSize); + DWORD bytes_read = 0; + auto res = ::ReadFile(h, &((*out)[i]), kBufSize, &bytes_read, nullptr); + if (res && bytes_read > 0) { + i += static_cast(bytes_read); + } else { + out->resize(i); + const bool is_eof = res && bytes_read == 0; + auto err = res ? 0 : GetLastError(); + // The "Broken pipe" error on Windows is slightly different than Unix: + // On Unix: a "broken pipe" error can happen only on the writer side. On + // the reader there is no broken pipe, just a EOF. + // On windows: the reader also sees a broken pipe error. + // Here we normalize on the Unix behavior, treating broken pipe as EOF. + return is_eof || err == ERROR_BROKEN_PIPE; + } + } +#else + return ReadFileDescriptor(h, out); +#endif +} + +bool ReadFileStream(FILE* f, std::string* out) { + return ReadFileDescriptor(fileno(f), out); +} + +bool ReadFile(const std::string& path, std::string* out) { + base::ScopedFile fd = base::OpenFile(path, O_RDONLY); + if (!fd) + return false; + + return ReadFileDescriptor(*fd, out); +} + +ssize_t WriteAll(int fd, const void* buf, size_t count) { + size_t written = 0; + while (written < count) { + // write() on windows takes an unsigned int size. + uint32_t bytes_left = static_cast( + std::min(count - written, static_cast(UINT32_MAX))); + platform::BeforeMaybeBlockingSyscall(); + ssize_t wr = PERFETTO_EINTR( + write(fd, static_cast(buf) + written, bytes_left)); + platform::AfterMaybeBlockingSyscall(); + if (wr == 0) + break; + if (wr < 0) + return wr; + written += static_cast(wr); + } + return static_cast(written); +} + +base::Status CopyFileContents(int fd_in, int fd_out) { + off_t original_offset = lseek(fd_in, 0, SEEK_CUR); + if (original_offset == -1) { + return base::ErrStatus( + "Can't get offset in 'fd_in', lseek error: %s (errno: %d)", + strerror(errno), errno); + } + + if (lseek(fd_in, 0, SEEK_SET) == -1) { + return base::ErrStatus( + "Can't change the offset in 'fd_in', lseek error: %s (errno: %d)", + strerror(errno), errno); + } + + auto restore_offset_on_exit = OnScopeExit([fd_in, original_offset] { + // 'lseek' should never fail here, but if it fails, we crash, to prevent + // possible data loss/overwrite in the 'fd_in'. + PERFETTO_CHECK(lseek(fd_in, original_offset, SEEK_SET) >= 0); + }); + + // Use bigger buffer when copy files. + constexpr size_t kCopyFileBufSize = 32 * 1024; // 32KB. + static_assert(kCopyFileBufSize > kBufSize); + // Don't allocate that much memory on stack. + std::vector buffer(kCopyFileBufSize); + for (;;) { + ssize_t bytes_read = Read(fd_in, buffer.data(), buffer.size()); + if (bytes_read == 0) + break; + if (bytes_read < 0) { + return base::ErrStatus("Read failed: %s (errno: %d)", strerror(errno), + errno); + } + ssize_t written = + WriteAll(fd_out, buffer.data(), static_cast(bytes_read)); + if (written != bytes_read) { + return base::ErrStatus("Write failed: %s (errno: %d)", strerror(errno), + errno); + } + } + return base::OkStatus(); +} + +ssize_t WriteAllHandle(PlatformHandle h, const void* buf, size_t count) { +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + DWORD wsize = 0; + if (::WriteFile(h, buf, static_cast(count), &wsize, nullptr)) { + return wsize; + } else { + return -1; + } +#else + return WriteAll(h, buf, count); +#endif +} + +bool FlushFile(int fd) { + PERFETTO_DCHECK(fd != 0); +#if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \ + PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) + return !PERFETTO_EINTR(fdatasync(fd)); +#elif PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + return !PERFETTO_EINTR(_commit(fd)); +#else + return !PERFETTO_EINTR(fsync(fd)); +#endif +} + +bool Mkdir(const std::string& path) { +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + return _mkdir(path.c_str()) == 0; +#else + return mkdir(path.c_str(), 0755) == 0; +#endif +} + +bool Rmdir(const std::string& path) { +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + return _rmdir(path.c_str()) == 0; +#else + return rmdir(path.c_str()) == 0; +#endif +} + +int CloseFile(int fd) { + return close(fd); +} + +ScopedFile OpenFile(const std::string& path, int flags, FileOpenMode mode) { + // If a new file might be created, ensure that the permissions for the new + // file are explicitly specified. + PERFETTO_CHECK((flags & O_CREAT) == 0 || mode != kFileModeInvalid); +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + // Always use O_BINARY on Windows, to avoid silly EOL translations. + ScopedFile fd(_open(path.c_str(), flags | O_BINARY, mode)); +#else + // Always open a ScopedFile with O_CLOEXEC so we can safely fork and exec. + ScopedFile fd(open(path.c_str(), flags | O_CLOEXEC, mode)); +#endif + return fd; +} + +ScopedFstream OpenFstream(const std::string& path, const std::string& mode) { + ScopedFstream file; + // On Windows fopen interprets filename using the ANSI or OEM codepage but + // sqlite3_value_text returns a UTF-8 string. To make sure we interpret the + // filename correctly we use _wfopen and a UTF-16 string on windows. + // + // On Windows fopen also open files in the text mode by default, but we want + // to open them in the binary mode, to avoid silly EOL translations (and to be + // consistent with base::OpenFile). So we check the mode first and append 'b' + // mode only when it makes sense. +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + std::string s_mode(mode); + // Windows supports non-standard mode extension that sets encoding in text + // mode. If you need to open a FILE* in text mode, use the fopen API directly. + bool is_text_mode = Contains(s_mode, "ccs=") || Contains(s_mode, "t"); + PERFETTO_CHECK(!is_text_mode); + bool is_binary_mode = Contains(s_mode, 'b'); + if (!is_binary_mode) + s_mode += 'b'; + + auto w_path = ToUtf16(path); + auto w_mode = ToUtf16(s_mode); + if (w_path && w_mode) { + file.reset(_wfopen(w_path->c_str(), w_mode->c_str())); + } +#else + file.reset(fopen(path.c_str(), mode.c_str())); +#endif + return file; +} + +bool FileExists(const std::string& path) { +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + return _access(path.c_str(), 0) == 0; +#else + return access(path.c_str(), F_OK) == 0; +#endif +} + +// Declared in base/platform_handle.h. +int ClosePlatformHandle(PlatformHandle handle) { +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + // Make the return value UNIX-style. + return CloseHandle(handle) ? 0 : -1; +#else + return close(handle); +#endif +} + +base::Status ListFilesRecursive(const std::string& dir_path, + std::vector& output) { + std::string root_dir_path = dir_path; + if (root_dir_path.back() == '\\') { + root_dir_path.back() = '/'; + } else if (root_dir_path.back() != '/') { + root_dir_path.push_back('/'); + } + + // dir_queue contains full paths to the directories. The paths include the + // root_dir_path at the beginning and the trailing slash at the end. + std::deque dir_queue; + dir_queue.push_back(root_dir_path); + + while (!dir_queue.empty()) { + const std::string cur_dir = std::move(dir_queue.front()); + dir_queue.pop_front(); +#if PERFETTO_BUILDFLAG(PERFETTO_OS_NACL) + return base::ErrStatus("ListFilesRecursive not supported yet"); +#elif PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + std::string glob_path = cur_dir + "*"; + // + 1 because we also have to count the NULL terminator. + if (glob_path.length() + 1 > MAX_PATH) + return base::ErrStatus("Directory path %s is too long", dir_path.c_str()); + WIN32_FIND_DATAA ffd; + + base::ScopedResource + hFind(FindFirstFileA(glob_path.c_str(), &ffd)); + if (!hFind) { + // For empty directories, there should be at least one entry '.'. + // If FindFirstFileA returns INVALID_HANDLE_VALUE, this means directory + // couldn't be accessed. + return base::ErrStatus("Failed to open directory %s", cur_dir.c_str()); + } + do { + if (strcmp(ffd.cFileName, ".") == 0 || strcmp(ffd.cFileName, "..") == 0) + continue; + if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + std::string subdir_path = cur_dir + ffd.cFileName + '/'; + dir_queue.push_back(subdir_path); + } else { + const std::string full_path = cur_dir + ffd.cFileName; + PERFETTO_CHECK(full_path.length() > root_dir_path.length()); + output.push_back(full_path.substr(root_dir_path.length())); + } + } while (FindNextFileA(*hFind, &ffd)); +#else + ScopedDir dir = ScopedDir(opendir(cur_dir.c_str())); + if (!dir) { + return base::ErrStatus("Failed to open directory %s", cur_dir.c_str()); + } + for (auto* dirent = readdir(dir.get()); dirent != nullptr; + dirent = readdir(dir.get())) { + if (strcmp(dirent->d_name, ".") == 0 || + strcmp(dirent->d_name, "..") == 0) { + continue; + } + struct stat dirstat; + std::string full_path = cur_dir + dirent->d_name; + PERFETTO_CHECK(stat(full_path.c_str(), &dirstat) == 0); + if (S_ISDIR(dirstat.st_mode)) { + dir_queue.push_back(full_path + '/'); + } else if (S_ISREG(dirstat.st_mode)) { + PERFETTO_CHECK(full_path.length() > root_dir_path.length()); + output.push_back(full_path.substr(root_dir_path.length())); + } + } +#endif + } + return base::OkStatus(); +} + +std::string GetFileExtension(const std::string& filename) { + auto ext_idx = filename.rfind('.'); + if (ext_idx == std::string::npos) + return std::string(); + return filename.substr(ext_idx); +} + +base::Status SetFilePermissions(const std::string& file_path, + const std::string& group_name_or_id, + const std::string& mode_bits) { +#ifdef PERFETTO_SET_FILE_PERMISSIONS + PERFETTO_CHECK(!file_path.empty()); + PERFETTO_CHECK(!group_name_or_id.empty()); + + // Default |group_id| to -1 for not changing the group ownership. + gid_t group_id = static_cast(-1); + auto maybe_group_id = base::StringToUInt32(group_name_or_id); + if (maybe_group_id) { // A numerical group ID. + group_id = *maybe_group_id; + } else { // A group name. + struct group* file_group = nullptr; + // Query the group ID of |group|. + do { + file_group = getgrnam(group_name_or_id.c_str()); + } while (file_group == nullptr && errno == EINTR); + if (file_group == nullptr) { + return base::ErrStatus("Failed to get group information of %s ", + group_name_or_id.c_str()); + } + group_id = file_group->gr_gid; + } + + if (PERFETTO_EINTR(chown(file_path.c_str(), geteuid(), group_id))) { + return base::ErrStatus("Failed to chown %s ", file_path.c_str()); + } + + // |mode| accepts values like "0660" as "rw-rw----" mode bits. + auto mode_value = base::StringToInt32(mode_bits, 8); + if (!(mode_bits.size() == 4 && mode_value.has_value())) { + return base::ErrStatus( + "The chmod mode bits must be a 4-digit octal number, e.g. 0660"); + } + if (PERFETTO_EINTR( + chmod(file_path.c_str(), static_cast(mode_value.value())))) { + return base::ErrStatus("Failed to chmod %s", file_path.c_str()); + } + return base::OkStatus(); +#else + base::ignore_result(file_path); + base::ignore_result(group_name_or_id); + base::ignore_result(mode_bits); + return base::ErrStatus( + "Setting file permissions is not supported on this platform"); +#endif +} + +std::optional GetFileSize(const std::string& file_path) { +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + // This does not use base::OpenFile to avoid getting an exclusive lock. + base::ScopedPlatformHandle fd( + CreateFileA(file_path.c_str(), FILE_READ_ATTRIBUTES, FILE_SHARE_READ, + nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr)); +#else + base::ScopedFile fd(base::OpenFile(file_path, O_RDONLY | O_CLOEXEC)); +#endif + if (!fd) { + return std::nullopt; + } + return GetFileSize(*fd); +} + +std::optional GetFileSize(PlatformHandle fd) { +#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) + LARGE_INTEGER file_size; + file_size.QuadPart = 0; + if (!GetFileSizeEx(fd, &file_size)) { + return std::nullopt; + } + static_assert(sizeof(decltype(file_size.QuadPart)) <= sizeof(uint64_t)); + return static_cast(file_size.QuadPart); +#else + struct stat buf{}; + if (fstat(fd, &buf) == -1) { + return std::nullopt; + } + static_assert(sizeof(decltype(buf.st_size)) <= sizeof(uint64_t)); + return static_cast(buf.st_size); +#endif +} + +} // namespace base +} // namespace perfetto +// gen_amalgamated begin source: src/base/getopt_compat.cc +// gen_amalgamated begin header: include/perfetto/ext/base/getopt_compat.h +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INCLUDE_PERFETTO_EXT_BASE_GETOPT_COMPAT_H_ +#define INCLUDE_PERFETTO_EXT_BASE_GETOPT_COMPAT_H_ + +#include // For std::nullptr_t + +// No translation units other than base/getopt.h and getopt_compat_unittest.cc +// should directly include this file. Use base/getopt.h instead. + +namespace perfetto { +namespace base { +namespace getopt_compat { + +// A tiny getopt() replacement for Windows, which doesn't have . +// This implementation is based on the subset of features that we use in the +// Perfetto codebase. It doesn't even try to deal with the full surface of GNU's +// getopt(). +// Limitations: +// - getopt_long_only() is not supported. +// - optional_argument is not supported. That is extremely subtle and caused us +// problems in the past with GNU's getopt. +// - It does not reorder non-option arguments. It behaves like MacOS getopt, or +// GNU's when POSIXLY_CORRECT=1. +// - Doesn't expose optopt or opterr. +// - option.flag and longindex are not supported and must be nullptr. + +enum { + no_argument = 0, + required_argument = 1, +}; + +struct option { + const char* name; + int has_arg; + std::nullptr_t flag; // Only nullptr is supported. + int val; +}; + +extern char* optarg; +extern int optind; +extern int optopt; +extern int opterr; + +int getopt_long(int argc, + char** argv, + const char* shortopts, + const option* longopts, + std::nullptr_t /*longindex is not supported*/); + +int getopt(int argc, char** argv, const char* shortopts); + +} // namespace getopt_compat +} // namespace base +} // namespace perfetto + +#endif // INCLUDE_PERFETTO_EXT_BASE_GETOPT_COMPAT_H_ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// gen_amalgamated expanded: #include "perfetto/ext/base/getopt_compat.h" + +#include +#include +#include + +#include + +// gen_amalgamated expanded: #include "perfetto/base/logging.h" + +namespace perfetto { +namespace base { +namespace getopt_compat { + +char* optarg = nullptr; +int optind = 0; +int optopt = 0; +int opterr = 1; + +namespace { + +char* nextchar = nullptr; + +const option* LookupLongOpt(const std::vector