From cdb1f8f848be18239a40ca57846d934d97325817 Mon Sep 17 00:00:00 2001 From: Jeremy Gebben Date: Tue, 19 Nov 2024 16:39:31 -0700 Subject: [PATCH] scripts: Split up chasssis.{h,cpp} Move the giant blocks of 'manual' code to files under layers/chassis DispatchObject and ValidationObject are a big mix of manual and generated code. The class definition headers #include a file defining generated methods. chassis.h is now a manual file that only defines some shared data structures and the manual defined functions needed by the generated code. --- BUILD.gn | 16 +- docs/generated_code.md | 6 +- layers/CMakeLists.txt | 7 +- .../best_practices_validation.h | 2 +- layers/best_practices/bp_instance_device.cpp | 2 +- layers/chassis/chassis.h | 89 + layers/chassis/chassis_manual.cpp | 1073 + layers/chassis/dispatch_object.h | 262 + ..._manual.cpp => dispatch_object_manual.cpp} | 943 +- layers/chassis/validation_object.h | 416 + layers/containers/custom_containers.h | 45 - layers/containers/subresource_adapter.cpp | 2 +- layers/core_checks/cc_android.cpp | 1 + layers/core_checks/cc_buffer.cpp | 1 - layers/core_checks/cc_cmd_buffer.cpp | 1 - layers/core_checks/cc_cmd_buffer_dynamic.cpp | 2 +- layers/core_checks/cc_copy_blit_resolve.cpp | 2 +- layers/core_checks/cc_device.cpp | 2 +- .../cc_device_generated_commands.cpp | 4 +- layers/core_checks/cc_device_memory.cpp | 3 +- layers/core_checks/cc_drawdispatch.cpp | 1 - layers/core_checks/cc_external_object.cpp | 1 - layers/core_checks/cc_image.cpp | 2 +- layers/core_checks/cc_image_layout.cpp | 1 - layers/core_checks/cc_pipeline.cpp | 2 +- layers/core_checks/cc_pipeline_compute.cpp | 1 - layers/core_checks/cc_pipeline_graphics.cpp | 2 +- .../core_checks/cc_pipeline_ray_tracing.cpp | 1 - layers/core_checks/cc_query.cpp | 1 - layers/core_checks/cc_queue.cpp | 1 - layers/core_checks/cc_ray_tracing.cpp | 1 - layers/core_checks/cc_render_pass.cpp | 1 - layers/core_checks/cc_submit.cpp | 2 +- layers/core_checks/cc_synchronization.cpp | 1 - layers/core_checks/cc_video.cpp | 2 +- layers/core_checks/cc_wsi.cpp | 2 +- layers/core_checks/cc_ycbcr.cpp | 7 +- layers/error_message/logging.cpp | 2 - layers/error_message/logging.h | 13 +- layers/gpu/core/gpuav_setup.cpp | 3 +- layers/gpu/debug_printf/debug_printf.cpp | 4 +- .../gpuav_shader_instrumentor.cpp | 3 +- .../gpuav_shader_instrumentor.h | 1 - layers/gpu/resources/gpuav_resources.cpp | 2 +- layers/gpu/resources/gpuav_subclasses.cpp | 2 +- layers/layer_options.cpp | 11 +- layers/layer_options.h | 2 + .../object_lifetime_validation.h | 2 + .../object_tracker/object_tracker_utils.cpp | 15 +- layers/state_tracker/buffer_state.cpp | 2 +- layers/state_tracker/device_state.cpp | 2 +- layers/state_tracker/image_state.cpp | 1 + layers/state_tracker/ray_tracing_state.h | 2 +- layers/state_tracker/state_tracker.cpp | 35 +- layers/state_tracker/state_tracker.h | 4 +- layers/state_tracker/video_session_state.cpp | 2 +- layers/stateless/sl_cmd_buffer_dynamic.cpp | 2 +- layers/stateless/sl_external_object.cpp | 4 +- layers/stateless/sl_instance_device.cpp | 13 +- layers/stateless/sl_pipeline.cpp | 2 +- layers/stateless/sl_utils.cpp | 2 - layers/stateless/stateless_validation.h | 2 +- .../thread_safety_validation.cpp | 5 +- .../thread_tracker/thread_safety_validation.h | 1 + layers/utils/ray_tracing_utils.cpp | 2 +- layers/vulkan/generated/best_practices.cpp | 1 - layers/vulkan/generated/chassis.cpp | 19481 +++++++--------- layers/vulkan/generated/chassis.h | 4815 ---- layers/vulkan/generated/dispatch_functions.h | 4301 ++++ layers/vulkan/generated/dispatch_object.cpp | 8782 +++++++ .../generated/dispatch_object_methods.h | 1213 + ..._dispatch_helper.h => dispatch_vector.cpp} | 1822 +- layers/vulkan/generated/dispatch_vector.h | 1763 ++ .../generated/layer_chassis_dispatch.cpp | 9732 -------- .../vulkan/generated/layer_chassis_dispatch.h | 1284 - layers/vulkan/generated/object_tracker.cpp | 16 +- .../generated/stateless_validation_helper.cpp | 4 +- layers/vulkan/generated/thread_safety.cpp | 1 - layers/vulkan/generated/validation_object.cpp | 136 + .../generated/validation_object_methods.h | 6955 ++++++ scripts/generate_source.py | 29 +- .../generators/best_practices_generator.py | 1 - ...erator.py => dispatch_object_generator.py} | 192 +- .../generators/dispatch_vector_generator.py | 231 + scripts/generators/layer_chassis_generator.py | 2235 +- .../generators/object_tracker_generator.py | 3 +- .../stateless_validation_helper_generator.py | 4 +- scripts/generators/thread_safety_generator.py | 1 - tests/layers/device_profile_api.cpp | 26 + 89 files changed, 34938 insertions(+), 31139 deletions(-) create mode 100644 layers/chassis/chassis.h create mode 100644 layers/chassis/chassis_manual.cpp create mode 100644 layers/chassis/dispatch_object.h rename layers/chassis/{layer_chassis_dispatch_manual.cpp => dispatch_object_manual.cpp} (59%) create mode 100644 layers/chassis/validation_object.h delete mode 100644 layers/vulkan/generated/chassis.h create mode 100644 layers/vulkan/generated/dispatch_functions.h create mode 100644 layers/vulkan/generated/dispatch_object.cpp create mode 100644 layers/vulkan/generated/dispatch_object_methods.h rename layers/vulkan/generated/{chassis_dispatch_helper.h => dispatch_vector.cpp} (54%) create mode 100644 layers/vulkan/generated/dispatch_vector.h delete mode 100644 layers/vulkan/generated/layer_chassis_dispatch.cpp delete mode 100644 layers/vulkan/generated/layer_chassis_dispatch.h create mode 100644 layers/vulkan/generated/validation_object.cpp create mode 100644 layers/vulkan/generated/validation_object_methods.h rename scripts/generators/{layer_chassis_dispatch_generator.py => dispatch_object_generator.py} (78%) create mode 100644 scripts/generators/dispatch_vector_generator.py diff --git a/BUILD.gn b/BUILD.gn index 71ee8a1e18e..79d436af3de 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -91,9 +91,13 @@ vvl_sources = [ "layers/best_practices/bp_synchronization.cpp", "layers/best_practices/bp_video.cpp", "layers/best_practices/bp_wsi.cpp", + "layers/chassis/chassis.h", "layers/chassis/chassis_handle_data.h", + "layers/chassis/chassis_manual.cpp", "layers/chassis/chassis_modification_state.h", - "layers/chassis/layer_chassis_dispatch_manual.cpp", + "layers/chassis/dispatch_object.h", + "layers/chassis/dispatch_object_manual.cpp", + "layers/chassis/validation_object.h", "layers/containers/custom_containers.h", "layers/containers/qfo_transfer.h", "layers/containers/range_vector.h", @@ -347,8 +351,6 @@ vvl_sources = [ "layers/vulkan/generated/best_practices.cpp", "layers/vulkan/generated/best_practices.h", "layers/vulkan/generated/chassis.cpp", - "layers/vulkan/generated/chassis.h", - "layers/vulkan/generated/chassis_dispatch_helper.h", "layers/vulkan/generated/cmd_validation_copy_buffer_to_image_comp.cpp", "layers/vulkan/generated/cmd_validation_copy_buffer_to_image_comp.h", "layers/vulkan/generated/cmd_validation_dispatch_comp.cpp", @@ -360,6 +362,10 @@ vvl_sources = [ "layers/vulkan/generated/command_validation.cpp", "layers/vulkan/generated/device_features.cpp", "layers/vulkan/generated/device_features.h", + "layers/vulkan/generated/dispatch_object.cpp", + "layers/vulkan/generated/dispatch_object_methods.h", + "layers/vulkan/generated/dispatch_vector.cpp", + "layers/vulkan/generated/dispatch_vector.h", "layers/vulkan/generated/dynamic_state_helper.cpp", "layers/vulkan/generated/dynamic_state_helper.h", "layers/vulkan/generated/enum_flag_bits.h", @@ -381,8 +387,6 @@ vvl_sources = [ "layers/vulkan/generated/instrumentation_ray_query_comp.h", "layers/vulkan/generated/instrumentation_post_process_descriptor_index_comp.cpp", "layers/vulkan/generated/instrumentation_post_process_descriptor_index_comp.h", - "layers/vulkan/generated/layer_chassis_dispatch.cpp", - "layers/vulkan/generated/layer_chassis_dispatch.h", "layers/vulkan/generated/object_tracker.cpp", "layers/vulkan/generated/object_tracker.h", "layers/vulkan/generated/pnext_chain_extraction.cpp", @@ -403,6 +407,8 @@ vvl_sources = [ "layers/vulkan/generated/valid_enum_values.cpp", "layers/vulkan/generated/valid_enum_values.h", "layers/vulkan/generated/valid_flag_values.cpp", + "layers/vulkan/generated/validation_object.cpp", + "layers/vulkan/generated/validation_object_methods.h", "layers/vulkan/generated/vk_api_version.h", "layers/vulkan/generated/vk_api_version.h", "layers/vulkan/generated/vk_dispatch_table_helper.cpp", diff --git a/docs/generated_code.md b/docs/generated_code.md index 92709970f25..90a192b427b 100644 --- a/docs/generated_code.md +++ b/docs/generated_code.md @@ -49,8 +49,8 @@ NOTE: `VVL_CODEGEN` is `OFF` by default to allow users to build `VVL` via `add_s If only dealing with a single file, run `scripts/generate_source.py` with `--target` ```bash -# Example - only generates chassis.h -scripts/generate_source.py external/Vulkan-Headers/registry/ external/SPIRV-Headers/include/spirv/unified1/ --target chassis.h +# Example - only generates chassis.cpp +scripts/generate_source.py external/Vulkan-Headers/registry/ external/SPIRV-Headers/include/spirv/unified1/ --target chassis.cpp ``` # Adding and Editing code generation @@ -177,4 +177,4 @@ The `VulkanObject` makes use of the [Python 3.7 Dataclasses](https://docs.python If a developer needs something new, it can be added in the `VulkanObject` class. This provides 2 large advantages 1. Code to create a container around the XML is properly reused between scripts -2. Only one file (`base_generator.py`) use to understand the inner working of the `registry`. A developer can just view the `vulkan_object.py` file to see what it can grab in the single pass \ No newline at end of file +2. Only one file (`base_generator.py`) use to understand the inner working of the `registry`. A developer can just view the `vulkan_object.py` file to see what it can grab in the single pass diff --git a/layers/CMakeLists.txt b/layers/CMakeLists.txt index 17c30d5f4b0..628cb473efc 100644 --- a/layers/CMakeLists.txt +++ b/layers/CMakeLists.txt @@ -142,7 +142,8 @@ target_sources(vvl PRIVATE best_practices/bp_wsi.cpp best_practices/best_practices_validation.h chassis/chassis_modification_state.h - chassis/layer_chassis_dispatch_manual.cpp + chassis/chassis_manual.cpp + chassis/dispatch_object_manual.cpp containers/qfo_transfer.h containers/range_vector.h containers/subresource_adapter.cpp @@ -202,7 +203,9 @@ target_sources(vvl PRIVATE ${API_TYPE}/generated/dynamic_state_helper.cpp ${API_TYPE}/generated/dynamic_state_helper.h ${API_TYPE}/generated/enum_flag_bits.h - ${API_TYPE}/generated/layer_chassis_dispatch.cpp + ${API_TYPE}/generated/dispatch_vector.cpp + ${API_TYPE}/generated/dispatch_object.cpp + ${API_TYPE}/generated/validation_object.cpp ${API_TYPE}/generated/object_tracker.cpp ${API_TYPE}/generated/object_tracker.h ${API_TYPE}/generated/spirv_grammar_helper.cpp diff --git a/layers/best_practices/best_practices_validation.h b/layers/best_practices/best_practices_validation.h index c434079e4fc..95700a1fe6b 100644 --- a/layers/best_practices/best_practices_validation.h +++ b/layers/best_practices/best_practices_validation.h @@ -19,7 +19,7 @@ #pragma once -#include "generated/chassis.h" +#include "chassis/validation_object.h" #include "state_tracker/state_tracker.h" #include "state_tracker/cmd_buffer_state.h" #include diff --git a/layers/best_practices/bp_instance_device.cpp b/layers/best_practices/bp_instance_device.cpp index e40ac7b180a..fd88806e9ff 100644 --- a/layers/best_practices/bp_instance_device.cpp +++ b/layers/best_practices/bp_instance_device.cpp @@ -18,7 +18,7 @@ */ #include "best_practices/best_practices_validation.h" -#include "generated/layer_chassis_dispatch.h" +#include "generated/dispatch_functions.h" #include "best_practices/bp_state.h" #include "state_tracker/queue_state.h" diff --git a/layers/chassis/chassis.h b/layers/chassis/chassis.h new file mode 100644 index 00000000000..1da689505e4 --- /dev/null +++ b/layers/chassis/chassis.h @@ -0,0 +1,89 @@ +/*************************************************************************** + * + * Copyright (c) 2015-2024 The Khronos Group Inc. + * Copyright (c) 2015-2024 Valve Corporation + * Copyright (c) 2015-2024 LunarG, Inc. + * Copyright (c) 2015-2024 Google Inc. + * Copyright (c) 2023-2024 RasterGrid Kft. + * + * 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 + +namespace vulkan_layer_chassis { +typedef enum ApiFunctionType { kFuncTypeInst = 0, kFuncTypePdev = 1, kFuncTypeDev = 2 } ApiFunctionType; +typedef struct { + ApiFunctionType function_type; + void* funcptr; +} function_data; + +// Manually written functions referenced from generated code in chassis.cpp + +VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetDeviceProcAddr(VkDevice device, const char* funcName); +VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetInstanceProcAddr(VkInstance instance, const char* funcName); +VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetPhysicalDeviceProcAddr(VkInstance instance, const char* funcName); + +VKAPI_ATTR VkResult VKAPI_CALL EnumerateInstanceLayerProperties(uint32_t* pCount, VkLayerProperties* pProperties); +VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, + VkLayerProperties* pProperties); + +VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkInstance* pInstance); +VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice gpu, const VkDeviceCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDevice* pDevice); +VKAPI_ATTR void VKAPI_CALL DestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkGraphicsPipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); +VKAPI_ATTR VkResult VKAPI_CALL CreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkComputePipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); +VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoNV* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); +VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); +VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout); +VKAPI_ATTR VkResult VKAPI_CALL CreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule); +VKAPI_ATTR VkResult VKAPI_CALL CreateShadersEXT(VkDevice device, uint32_t createInfoCount, + const VkShaderCreateInfoEXT* pCreateInfos, const VkAllocationCallbacks* pAllocator, + VkShaderEXT* pShaders); +VKAPI_ATTR VkResult VKAPI_CALL AllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, + VkDescriptorSet* pDescriptorSets); +VKAPI_ATTR VkResult VKAPI_CALL CreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer); +VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInfoKHR* pPresentInfo); +VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo); +VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceToolPropertiesEXT(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, + VkPhysicalDeviceToolPropertiesEXT* pToolProperties); +VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceToolProperties(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, + VkPhysicalDeviceToolProperties* pToolProperties); +VKAPI_ATTR VkResult VKAPI_CALL CreateValidationCacheEXT(VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkValidationCacheEXT* pValidationCache); +VKAPI_ATTR void VKAPI_CALL DestroyValidationCacheEXT(VkDevice device, VkValidationCacheEXT validationCache, + const VkAllocationCallbacks* pAllocator); +VKAPI_ATTR VkResult VKAPI_CALL MergeValidationCachesEXT(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, + const VkValidationCacheEXT* pSrcCaches); +VKAPI_ATTR VkResult VKAPI_CALL GetValidationCacheDataEXT(VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, + void* pData); +VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount, + VkPhysicalDevice* pPhysicalDevices); +} // namespace vulkan_layer_chassis diff --git a/layers/chassis/chassis_manual.cpp b/layers/chassis/chassis_manual.cpp new file mode 100644 index 00000000000..103129db44d --- /dev/null +++ b/layers/chassis/chassis_manual.cpp @@ -0,0 +1,1073 @@ +/*************************************************************************** + * + * Copyright (c) 2015-2024 The Khronos Group Inc. + * Copyright (c) 2015-2024 Valve Corporation + * Copyright (c) 2015-2024 LunarG, Inc. + * Copyright (c) 2015-2024 Google Inc. + * Copyright (c) 2023-2024 RasterGrid Kft. + * + * 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 "chassis.h" + +#include +#include +#include + +#include "chassis/dispatch_object.h" +#include "chassis/validation_object.h" +#include "layer_options.h" +#include "state_tracker/descriptor_sets.h" +#include "chassis/chassis_modification_state.h" +#include "core_checks/core_validation.h" +#include "profiling/profiling.h" + +namespace vulkan_layer_chassis { + +// Check enabled instance extensions against supported instance extension whitelist +static void InstanceExtensionWhitelist(DispatchObject* layer_data, const VkInstanceCreateInfo* pCreateInfo, VkInstance instance) { + for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) { + // Check for recognized instance extensions + vvl::Extension extension = GetExtension(pCreateInfo->ppEnabledExtensionNames[i]); + if (!IsInstanceExtension(extension)) { + Location loc(vvl::Func::vkCreateInstance); + layer_data->LogWarning(kVUIDUndefined, layer_data->instance, + loc.dot(vvl::Field::pCreateInfo).dot(vvl::Field::ppEnabledExtensionNames, i), + "%s is not supported by this layer. Using this extension may adversely affect validation " + "results and/or produce undefined behavior.", + pCreateInfo->ppEnabledExtensionNames[i]); + } + } +} + +// Check enabled device extensions against supported device extension whitelist +static void DeviceExtensionWhitelist(DispatchObject* layer_data, const VkDeviceCreateInfo* pCreateInfo, VkDevice device) { + for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) { + // Check for recognized device extensions + vvl::Extension extension = GetExtension(pCreateInfo->ppEnabledExtensionNames[i]); + if (!IsDeviceExtension(extension)) { + Location loc(vvl::Func::vkCreateDevice); + layer_data->LogWarning(kVUIDUndefined, layer_data->device, + loc.dot(vvl::Field::pCreateInfo).dot(vvl::Field::ppEnabledExtensionNames, i), + "%s is not supported by this layer. Using this extension may adversely affect validation " + "results and/or produce undefined behavior.", + pCreateInfo->ppEnabledExtensionNames[i]); + } + } +} + +void OutputLayerStatusInfo(DispatchObject* context) { + std::string list_of_enables; + std::string list_of_disables; + for (uint32_t i = 0; i < kMaxEnableFlags; i++) { + if (context->enabled[i]) { + if (list_of_enables.size()) list_of_enables.append(", "); + list_of_enables.append(GetEnableFlagNameHelper()[i]); + } + } + if (list_of_enables.empty()) { + list_of_enables.append("None"); + } + for (uint32_t i = 0; i < kMaxDisableFlags; i++) { + if (context->disabled[i]) { + if (list_of_disables.size()) list_of_disables.append(", "); + list_of_disables.append(GetDisableFlagNameHelper()[i]); + } + } + if (list_of_disables.empty()) { + list_of_disables.append("None"); + } + + Location loc(vvl::Func::vkCreateInstance); + // Output layer status information message + // TODO - We should just dump all settings to a file (see https://github.com/KhronosGroup/Vulkan-Utility-Libraries/issues/188) + context->LogInfo("WARNING-CreateInstance-status-message", context->instance, loc, + "Khronos Validation Layer Active:\n Current Enables: %s.\n Current Disables: %s.\n", + list_of_enables.c_str(), list_of_disables.c_str()); + + // Create warning message if user is running debug layers. +#ifndef NDEBUG + context->LogPerformanceWarning("WARNING-CreateInstance-debug-warning", context->instance, loc, + "Using debug builds of the validation layers *will* adversely affect performance."); +#endif + if (!context->global_settings.fine_grained_locking) { + context->LogPerformanceWarning( + "WARNING-CreateInstance-locking-warning", context->instance, loc, + "Fine-grained locking is disabled, this will adversely affect performance of multithreaded applications."); + } +} +const vvl::unordered_map& GetNameToFuncPtrMap(); + +VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetDeviceProcAddr(VkDevice device, const char* funcName) { + auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + if (!ApiParentExtensionEnabled(funcName, &layer_data->device_extensions)) { + return nullptr; + } + const auto& item = GetNameToFuncPtrMap().find(funcName); + if (item != GetNameToFuncPtrMap().end()) { + if (item->second.function_type != kFuncTypeDev) { + Location loc(vvl::Func::vkGetDeviceProcAddr); + // Was discussed in https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/6583 + // This has "valid" behavior to return null, but still worth warning users for this unqiue function + layer_data->LogWarning("WARNING-vkGetDeviceProcAddr-device", device, loc.dot(vvl::Field::pName), + "is trying to grab %s which is an instance level function", funcName); + return nullptr; + } else { + return reinterpret_cast(item->second.funcptr); + } + } + auto& table = layer_data->device_dispatch_table; + if (!table.GetDeviceProcAddr) return nullptr; + return table.GetDeviceProcAddr(device, funcName); +} + +VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetInstanceProcAddr(VkInstance instance, const char* funcName) { + const auto& item = GetNameToFuncPtrMap().find(funcName); + if (item != GetNameToFuncPtrMap().end()) { + return reinterpret_cast(item->second.funcptr); + } + auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto& table = layer_data->instance_dispatch_table; + if (!table.GetInstanceProcAddr) return nullptr; + return table.GetInstanceProcAddr(instance, funcName); +} + +VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetPhysicalDeviceProcAddr(VkInstance instance, const char* funcName) { + const auto& item = GetNameToFuncPtrMap().find(funcName); + if (item != GetNameToFuncPtrMap().end()) { + if (item->second.function_type != kFuncTypePdev) { + return nullptr; + } else { + return reinterpret_cast(item->second.funcptr); + } + } + auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto& table = layer_data->instance_dispatch_table; + if (!table.GetPhysicalDeviceProcAddr) return nullptr; + return table.GetPhysicalDeviceProcAddr(instance, funcName); +} + +// This is here as some applications will call exit() which results in all our static allocations (like std::map) having their +// destructor called and destroyed from under us. It is not possible to detect as sometimes (when using things like robin hood) the +// size()/empty() will give false positive that memory is there there. We add this global hook that will go through and remove all +// the function calls such that things can safely run in the case the applicaiton still wants to make Vulkan calls in their atexit() +// handler +void ApplicationAtExit() { + // On a "normal" application, this function is called after vkDestroyInstance and layer_data_map is empty + // + // If there are multiple devices we still want to delete them all as exit() is a global scope call + for (auto object : layer_data_map) { + object.second->ReleaseAllValidationObjects(); + } +} + +VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkInstance* pInstance) { + atexit(ApplicationAtExit); + + VVL_ZoneScoped; + VkLayerInstanceCreateInfo* chain_info = GetChainInfo(pCreateInfo, VK_LAYER_LINK_INFO); + + assert(chain_info->u.pLayerInfo); + PFN_vkGetInstanceProcAddr fpGetInstanceProcAddr = chain_info->u.pLayerInfo->pfnNextGetInstanceProcAddr; + PFN_vkCreateInstance fpCreateInstance = (PFN_vkCreateInstance)fpGetInstanceProcAddr(nullptr, "vkCreateInstance"); + if (fpCreateInstance == nullptr) return VK_ERROR_INITIALIZATION_FAILED; + chain_info->u.pLayerInfo = chain_info->u.pLayerInfo->pNext; + + auto instance_dispatch = std::make_unique(pCreateInfo); + + // Init dispatch array and call registration functions + bool skip = false; + ErrorObject error_obj(vvl::Func::vkCreateInstance, VulkanTypedHandle()); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateInstance(pCreateInfo, pAllocator, pInstance, error_obj); + if (skip) { + return VK_ERROR_VALIDATION_FAILED_EXT; + } + } + + RecordObject record_obj(vvl::Func::vkCreateInstance); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateInstance(pCreateInfo, pAllocator, pInstance, record_obj); + } + + VkResult result = fpCreateInstance(pCreateInfo, pAllocator, pInstance); + if (result != VK_SUCCESS) { + return result; + } + record_obj.result = result; + instance_dispatch->instance = *pInstance; + for (auto* vo : instance_dispatch->object_dispatch) { + vo->CopyDispatchState(); + } + + layer_init_instance_dispatch_table(*pInstance, &instance_dispatch->instance_dispatch_table, fpGetInstanceProcAddr); + + // We need to call this to properly check which device extensions have been promoted when validating query functions + // that take as input a physical device, which can be called before a logical device has been created. + instance_dispatch->device_extensions.InitFromDeviceCreateInfo(&instance_dispatch->instance_extensions, + instance_dispatch->api_version); + + OutputLayerStatusInfo(instance_dispatch.get()); + + layer_data_map[GetDispatchKey(*pInstance)] = instance_dispatch.get(); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateInstance(pCreateInfo, pAllocator, pInstance, record_obj); + } + + InstanceExtensionWhitelist(instance_dispatch.get(), pCreateInfo, *pInstance); + DeactivateInstanceDebugCallbacks(instance_dispatch->debug_report); + layer_data_map[GetDispatchKey(*pInstance)] = instance_dispatch.release(); + return result; +} + +VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocationCallbacks* pAllocator) { + VVL_TracyCZone(tracy_zone_precall, true); + dispatch_key key = GetDispatchKey(instance); + auto instance_dispatch = GetLayerDataPtr(key, layer_data_map); + ActivateInstanceDebugCallbacks(instance_dispatch->debug_report); + ErrorObject error_obj(vvl::Func::vkDestroyInstance, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); + + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + vo->PreCallValidateDestroyInstance(instance, pAllocator, error_obj); + } + + RecordObject record_obj(vvl::Func::vkDestroyInstance); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyInstance(instance, pAllocator, record_obj); + } + + // Before instance is destroyed, allow aborted objects to clean up + for (auto* vo : instance_dispatch->aborted_object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyInstance(instance, pAllocator, record_obj); + } + + VVL_TracyCZoneEnd(tracy_zone_precall); + VVL_TracyCZone(tracy_zone_dispatch, true); + instance_dispatch->instance_dispatch_table.DestroyInstance(instance, pAllocator); + VVL_TracyCZoneEnd(tracy_zone_dispatch); + + VVL_TracyCZone(tracy_zone_postcall, true); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyInstance(instance, pAllocator, record_obj); + } + + DeactivateInstanceDebugCallbacks(instance_dispatch->debug_report); + layer_data_map.erase(key); + delete instance_dispatch; + + VVL_TracyCZoneEnd(tracy_zone_postcall); + +#if TRACY_MANUAL_LIFETIME + tracy::ShutdownProfiler(); +#endif +} + +VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice gpu, const VkDeviceCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDevice* pDevice) { + VkLayerDeviceCreateInfo* chain_info = GetChainInfo(pCreateInfo, VK_LAYER_LINK_INFO); + + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(gpu), layer_data_map); + + PFN_vkGetInstanceProcAddr fpGetInstanceProcAddr = chain_info->u.pLayerInfo->pfnNextGetInstanceProcAddr; + PFN_vkGetDeviceProcAddr fpGetDeviceProcAddr = chain_info->u.pLayerInfo->pfnNextGetDeviceProcAddr; + PFN_vkCreateDevice fpCreateDevice = (PFN_vkCreateDevice)fpGetInstanceProcAddr(instance_dispatch->instance, "vkCreateDevice"); + if (fpCreateDevice == nullptr) { + return VK_ERROR_INITIALIZATION_FAILED; + } + chain_info->u.pLayerInfo = chain_info->u.pLayerInfo->pNext; + + // use a unique pointer to make sure we destroy this object on error + auto device_dispatch = std::make_unique(instance_dispatch, gpu, pCreateInfo); + + // This is odd but we need to set the current device_extensions in all of the + // instance validation objects so that they are available for validating CreateDevice + for (auto* vo: instance_dispatch->object_dispatch) { + vo->device_extensions = device_dispatch->device_extensions; + } + + // Make copy to modify as some ValidationObjects will want to add extensions/features on + vku::safe_VkDeviceCreateInfo modified_create_info(pCreateInfo); + + bool skip = false; + ErrorObject error_obj(vvl::Func::vkCreateDevice, VulkanTypedHandle(gpu, kVulkanObjectTypePhysicalDevice)); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateDevice(gpu, pCreateInfo, pAllocator, pDevice, error_obj); + if (skip) { + return VK_ERROR_VALIDATION_FAILED_EXT; + } + } + + RecordObject record_obj(vvl::Func::vkCreateDevice); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateDevice(gpu, pCreateInfo, pAllocator, pDevice, record_obj, &modified_create_info); + } + + VkResult result = fpCreateDevice(gpu, reinterpret_cast(&modified_create_info), pAllocator, pDevice); + if (result != VK_SUCCESS) { + return result; + } + record_obj.result = result; + device_dispatch->device = *pDevice; + // Save local info in device object + device_dispatch->api_version = device_dispatch->device_extensions.InitFromDeviceCreateInfo( + &instance_dispatch->instance_extensions, instance_dispatch->api_version, + reinterpret_cast(&modified_create_info)); + layer_init_device_dispatch_table(*pDevice, &device_dispatch->device_dispatch_table, fpGetDeviceProcAddr); + + instance_dispatch->debug_report->device_created++; + + for (auto* vo : device_dispatch->object_dispatch) { + vo->CopyDispatchState(); + } + // NOTE: many PostCallRecords expect to be able to look up the device dispatch object so we need to populate the map here. + layer_data_map[GetDispatchKey(*pDevice)] = device_dispatch.get(); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + // Send down modified create info as we want to mark enabled features that we sent down on behalf of the app + vo->PostCallRecordCreateDevice(gpu, reinterpret_cast(&modified_create_info), pAllocator, pDevice, + record_obj); + } + + DeviceExtensionWhitelist(device_dispatch.get(), pCreateInfo, *pDevice); + + device_dispatch.release(); + return result; +} + +// NOTE: Do _not_ skip the dispatch call when destroying a device. Whether or not there was a validation error, +// the loader will destroy the device, and know nothing about future references to this device making it +// impossible for the caller to use this device handle further. IOW, this is our _only_ chance to (potentially) +// dispatch the driver's DestroyDevice function. +VKAPI_ATTR void VKAPI_CALL DestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator) { + dispatch_key key = GetDispatchKey(device); + auto device_dispatch = GetLayerDataPtr(key, layer_data_map); + ErrorObject error_obj(vvl::Func::vkDestroyDevice, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); + for (const auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + vo->PreCallValidateDestroyDevice(device, pAllocator, error_obj); + } + + RecordObject record_obj(vvl::Func::vkDestroyDevice); + for (auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyDevice(device, pAllocator, record_obj); + } + + // Before device is destroyed, allow aborted objects to clean up + for (auto* vo : device_dispatch->aborted_object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyDevice(device, pAllocator, record_obj); + } + + device_dispatch->DestroyDevice(device, pAllocator); + + for (auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyDevice(device, pAllocator, record_obj); + } + + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(device_dispatch->physical_device), layer_data_map); + instance_dispatch->debug_report->device_created--; + + layer_data_map.erase(key); + delete device_dispatch; +} + +// Special-case APIs for which core_validation needs custom parameter lists and/or modifies parameters + +VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkGraphicsPipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { + VVL_ZoneScoped; + + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + bool skip = false; + ErrorObject error_obj(vvl::Func::vkCreateGraphicsPipelines, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); + + PipelineStates pipeline_states[LayerObjectTypeMaxEnum]; + chassis::CreateGraphicsPipelines chassis_state(pCreateInfos); + + { + VVL_ZoneScopedN("PreCallValidate"); + for (const auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, + pPipelines, error_obj, pipeline_states[vo->container_type], + chassis_state); + if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + } + } + + RecordObject record_obj(vvl::Func::vkCreateGraphicsPipelines); + { + VVL_ZoneScopedN("PreCallRecord"); + for (auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, + record_obj, pipeline_states[vo->container_type], chassis_state); + } + } + + VkResult result; + { + VVL_ZoneScopedN("Dispatch"); + result = device_dispatch->CreateGraphicsPipelines(device, pipelineCache, createInfoCount, chassis_state.pCreateInfos, + pAllocator, pPipelines); + } + record_obj.result = result; + + { + VVL_ZoneScopedN("PostCallRecord"); + for (auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, + record_obj, pipeline_states[vo->container_type], chassis_state); + } + } + return result; +} + +// This API saves some core_validation pipeline state state on the stack for performance purposes +VKAPI_ATTR VkResult VKAPI_CALL CreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkComputePipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { + VVL_ZoneScoped; + + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + bool skip = false; + ErrorObject error_obj(vvl::Func::vkCreateComputePipelines, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); + + PipelineStates pipeline_states[LayerObjectTypeMaxEnum]; + chassis::CreateComputePipelines chassis_state(pCreateInfos); + + { + VVL_ZoneScopedN("PreCallValidate"); + for (const auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, + pPipelines, error_obj, pipeline_states[vo->container_type], + chassis_state); + if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + } + } + + RecordObject record_obj(vvl::Func::vkCreateComputePipelines); + { + VVL_ZoneScopedN("PreCallRecord"); + for (auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, + record_obj, pipeline_states[vo->container_type], chassis_state); + } + } + + VkResult result; + { + VVL_ZoneScopedN("Dispatch"); + result = device_dispatch->CreateComputePipelines(device, pipelineCache, createInfoCount, chassis_state.pCreateInfos, + pAllocator, pPipelines); + } + record_obj.result = result; + + { + VVL_ZoneScopedN("PostCallRecord"); + for (auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, + record_obj, pipeline_states[vo->container_type], chassis_state); + } + } + return result; +} + +VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoNV* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + bool skip = false; + ErrorObject error_obj(vvl::Func::vkCreateRayTracingPipelinesNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); + + PipelineStates pipeline_states[LayerObjectTypeMaxEnum]; + chassis::CreateRayTracingPipelinesNV chassis_state(pCreateInfos); + + for (const auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, + pPipelines, error_obj, pipeline_states[vo->container_type], + chassis_state); + if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + } + + RecordObject record_obj(vvl::Func::vkCreateRayTracingPipelinesNV); + for (auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, + record_obj, pipeline_states[vo->container_type], chassis_state); + } + + VkResult result = device_dispatch->CreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, + chassis_state.pCreateInfos, pAllocator, pPipelines); + record_obj.result = result; + + for (auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, + record_obj, pipeline_states[vo->container_type], chassis_state); + } + return result; +} + +VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { + VVL_ZoneScoped; + + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + bool skip = false; + ErrorObject error_obj(vvl::Func::vkCreateRayTracingPipelinesKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); + + PipelineStates pipeline_states[LayerObjectTypeMaxEnum]; + auto chassis_state = std::make_shared(pCreateInfos); + + { + VVL_ZoneScopedN("PreCallValidate"); + for (const auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, + pCreateInfos, pAllocator, pPipelines, error_obj, + pipeline_states[vo->container_type], *chassis_state); + if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + } + } + + RecordObject record_obj(vvl::Func::vkCreateRayTracingPipelinesKHR); + { + VVL_ZoneScopedN("PreCallRecord"); + for (auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, + pAllocator, pPipelines, record_obj, pipeline_states[vo->container_type], + *chassis_state); + } + } + + VkResult result; + { + VVL_ZoneScopedN("Dispatch"); + result = device_dispatch->CreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, + chassis_state->pCreateInfos, pAllocator, pPipelines); + } + record_obj.result = result; + + { + VVL_ZoneScopedN("PostCallRecord"); + for (auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, + pAllocator, pPipelines, record_obj, pipeline_states[vo->container_type], + chassis_state); + } + } + return result; +} + +// This API needs the ability to modify a down-chain parameter +VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout) { + VVL_ZoneScoped; + + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + bool skip = false; + ErrorObject error_obj(vvl::Func::vkCreatePipelineLayout, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); + + { + VVL_ZoneScopedN("PreCallValidate"); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreatePipelineLayout]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreatePipelineLayout(device, pCreateInfo, pAllocator, pPipelineLayout, error_obj); + if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + } + } + + chassis::CreatePipelineLayout chassis_state{}; + chassis_state.modified_create_info = *pCreateInfo; + + RecordObject record_obj(vvl::Func::vkCreatePipelineLayout); + { + VVL_ZoneScopedN("PreCallRecord"); + for (auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreatePipelineLayout(device, pCreateInfo, pAllocator, pPipelineLayout, record_obj, chassis_state); + } + } + + VkResult result; + { + VVL_ZoneScopedN("Dispatch"); + result = device_dispatch->CreatePipelineLayout(device, &chassis_state.modified_create_info, pAllocator, pPipelineLayout); + } + record_obj.result = result; + + { + VVL_ZoneScopedN("PostCallRecord"); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreatePipelineLayout]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreatePipelineLayout(device, pCreateInfo, pAllocator, pPipelineLayout, record_obj); + } + } + return result; +} + +// This API needs some local stack data for performance reasons and also may modify a parameter +VKAPI_ATTR VkResult VKAPI_CALL CreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule) { + VVL_ZoneScoped; + + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + bool skip = false; + ErrorObject error_obj(vvl::Func::vkCreateShaderModule, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); + + { + VVL_ZoneScopedN("PreCallValidate"); + for (const auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule, error_obj); + if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + } + } + + chassis::CreateShaderModule chassis_state{}; + + RecordObject record_obj(vvl::Func::vkCreateShaderModule); + { + VVL_ZoneScopedN("PreCallRecord"); + for (auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule, record_obj, chassis_state); + } + } + + // Special extra check if SPIR-V itself fails runtime validation in PreCallRecord + if (chassis_state.skip) return VK_ERROR_VALIDATION_FAILED_EXT; + VkResult result; + { + VVL_ZoneScopedN("Dispatch"); + result = device_dispatch->CreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule); + } + record_obj.result = result; + { + VVL_ZoneScopedN("PostCallRecord"); + for (auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule, record_obj, chassis_state); + } + } + return result; +} + +VKAPI_ATTR VkResult VKAPI_CALL CreateShadersEXT(VkDevice device, uint32_t createInfoCount, + const VkShaderCreateInfoEXT* pCreateInfos, const VkAllocationCallbacks* pAllocator, + VkShaderEXT* pShaders) { + VVL_ZoneScoped; + + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + bool skip = false; + ErrorObject error_obj(vvl::Func::vkCreateShadersEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); + + chassis::ShaderObject chassis_state(createInfoCount, pCreateInfos); + + { + VVL_ZoneScopedN("PreCallValidate"); + for (const auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateShadersEXT(device, createInfoCount, pCreateInfos, pAllocator, pShaders, error_obj); + if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + } + } + + RecordObject record_obj(vvl::Func::vkCreateShadersEXT); + { + VVL_ZoneScopedN("PreCallRecord"); + for (auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateShadersEXT(device, createInfoCount, pCreateInfos, pAllocator, pShaders, record_obj, + chassis_state); + } + } + + // Special extra check if SPIR-V itself fails runtime validation in PreCallRecord + if (chassis_state.skip) return VK_ERROR_VALIDATION_FAILED_EXT; + + VkResult result; + { + VVL_ZoneScopedN("Dispatch"); + result = device_dispatch->CreateShadersEXT(device, createInfoCount, chassis_state.pCreateInfos, pAllocator, pShaders); + } + record_obj.result = result; + + { + VVL_ZoneScopedN("PostCallRecord"); + for (auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateShadersEXT(device, createInfoCount, pCreateInfos, pAllocator, pShaders, record_obj, + chassis_state); + } + } + return result; +} + +VKAPI_ATTR VkResult VKAPI_CALL AllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, + VkDescriptorSet* pDescriptorSets) { + VVL_ZoneScoped; + + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + bool skip = false; + ErrorObject error_obj(vvl::Func::vkAllocateDescriptorSets, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); + + vvl::AllocateDescriptorSetsData ads_state[LayerObjectTypeMaxEnum]; + + { + VVL_ZoneScopedN("PreCallValidate"); + for (const auto* vo : device_dispatch->object_dispatch) { + ads_state[vo->container_type].Init(pAllocateInfo->descriptorSetCount); + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateAllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets, error_obj, + ads_state[vo->container_type]); + if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + } + } + + RecordObject record_obj(vvl::Func::vkAllocateDescriptorSets); + { + VVL_ZoneScopedN("PreCallRecord"); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordAllocateDescriptorSets]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordAllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets, record_obj); + } + } + + VkResult result; + { + VVL_ZoneScopedN("Dispatch"); + result = device_dispatch->AllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets); + } + record_obj.result = result; + + { + VVL_ZoneScopedN("PostCallRecord"); + for (auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordAllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets, record_obj, + ads_state[vo->container_type]); + } + } + return result; +} + +// This API needs the ability to modify a down-chain parameter +VKAPI_ATTR VkResult VKAPI_CALL CreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer) { + VVL_ZoneScoped; + + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + bool skip = false; + ErrorObject error_obj(vvl::Func::vkCreateBuffer, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); + + { + VVL_ZoneScopedN("PreCallValidate"); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateBuffer]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateBuffer(device, pCreateInfo, pAllocator, pBuffer, error_obj); + if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + } + } + + chassis::CreateBuffer chassis_state{}; + chassis_state.modified_create_info = *pCreateInfo; + + RecordObject record_obj(vvl::Func::vkCreateBuffer); + { + VVL_ZoneScopedN("PreCallRecord"); + for (auto* vo : device_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateBuffer(device, pCreateInfo, pAllocator, pBuffer, record_obj, chassis_state); + } + } + + VkResult result; + { + VVL_ZoneScopedN("Dispatch"); + result = device_dispatch->CreateBuffer(device, &chassis_state.modified_create_info, pAllocator, pBuffer); + } + record_obj.result = result; + + { + VVL_ZoneScopedN("PostCallRecord"); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateBuffer]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateBuffer(device, pCreateInfo, pAllocator, pBuffer, record_obj); + } + } + return result; +} + +// This API needs to ensure that per-swapchain VkResult results are available +VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInfoKHR* pPresentInfo) { + VVL_ZoneScoped; + + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + bool skip = false; + ErrorObject error_obj(vvl::Func::vkQueuePresentKHR, VulkanTypedHandle(queue, kVulkanObjectTypeQueue)); + { + VVL_ZoneScopedN("PreCallValidate"); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateQueuePresentKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateQueuePresentKHR(queue, pPresentInfo, error_obj); + if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + } + } + RecordObject record_obj(vvl::Func::vkQueuePresentKHR); + { + VVL_ZoneScopedN("PreCallRecord"); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordQueuePresentKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordQueuePresentKHR(queue, pPresentInfo, record_obj); + } + } + + // Track per-swapchain results when there is more than one swapchain and VkPresentInfoKHR::pResults is null + small_vector present_results; + VkPresentInfoKHR modified_present_info; + if (pPresentInfo && pPresentInfo->swapchainCount > 1 && pPresentInfo->pResults == nullptr) { + present_results.resize(pPresentInfo->swapchainCount); + modified_present_info = *pPresentInfo; + modified_present_info.pResults = present_results.data(); + pPresentInfo = &modified_present_info; + } + + VkResult result; + { + VVL_ZoneScopedN("Dispatch"); + result = device_dispatch->QueuePresentKHR(queue, pPresentInfo); + } + VVL_TracyCFrameMark; + record_obj.result = result; + { + VVL_ZoneScopedN("PostCallRecord"); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordQueuePresentKHR]) { + auto lock = vo->WriteLock(); + + if (result == VK_ERROR_DEVICE_LOST) { + vo->is_device_lost = true; + } + vo->PostCallRecordQueuePresentKHR(queue, pPresentInfo, record_obj); + } + } + return result; +} + +VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo) { + VVL_ZoneScoped; + + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + bool skip = false; + chassis::HandleData handle_data; + + ErrorObject error_obj(vvl::Func::vkBeginCommandBuffer, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer), + &handle_data); + handle_data.command_buffer.is_secondary = device_dispatch->IsSecondary(commandBuffer); + { + VVL_ZoneScopedN("PreCallValidate"); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateBeginCommandBuffer]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateBeginCommandBuffer(commandBuffer, pBeginInfo, error_obj); + if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + } + } + + RecordObject record_obj(vvl::Func::vkBeginCommandBuffer, &handle_data); + { + VVL_ZoneScopedN("PreCallRecord"); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordBeginCommandBuffer]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordBeginCommandBuffer(commandBuffer, pBeginInfo, record_obj); + } + } + + VkResult result; + { + VVL_ZoneScopedN("Dispatch"); + result = device_dispatch->BeginCommandBuffer(commandBuffer, pBeginInfo); + } + record_obj.result = result; + + { + VVL_ZoneScopedN("PostCallRecord"); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordBeginCommandBuffer]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordBeginCommandBuffer(commandBuffer, pBeginInfo, record_obj); + } + } + return result; +} + +// Handle tooling queries manually as this is a request for layer information +static const VkPhysicalDeviceToolPropertiesEXT khronos_layer_tool_props = { + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT, + nullptr, + "Khronos Validation Layer", + STRINGIFY(VK_HEADER_VERSION), + VK_TOOL_PURPOSE_VALIDATION_BIT_EXT | VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT | VK_TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT | + VK_TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT, + "Khronos Validation Layer", + OBJECT_LAYER_NAME}; + +VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceToolPropertiesEXT(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, + VkPhysicalDeviceToolPropertiesEXT* pToolProperties) { + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + bool skip = false; + ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceToolPropertiesEXT, + VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); + + auto original_pToolProperties = pToolProperties; + + if (pToolProperties != nullptr && *pToolCount > 0) { + *pToolProperties = khronos_layer_tool_props; + pToolProperties = ((*pToolCount > 1) ? &pToolProperties[1] : nullptr); + (*pToolCount)--; + } + + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceToolPropertiesEXT(physicalDevice, pToolCount, pToolProperties, error_obj); + if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + } + + RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceToolPropertiesEXT); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceToolPropertiesEXT(physicalDevice, pToolCount, pToolProperties, record_obj); + } + + VkResult result = instance_dispatch->GetPhysicalDeviceToolPropertiesEXT(physicalDevice, pToolCount, pToolProperties); + record_obj.result = result; + + if (original_pToolProperties != nullptr) { + pToolProperties = original_pToolProperties; + } + assert(*pToolCount != std::numeric_limits::max()); + (*pToolCount)++; + + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceToolPropertiesEXT(physicalDevice, pToolCount, pToolProperties, record_obj); + } + return result; +} + +VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceToolProperties(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, + VkPhysicalDeviceToolProperties* pToolProperties) { + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + bool skip = false; + ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceToolProperties, + VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); + + auto original_pToolProperties = pToolProperties; + + if (pToolProperties != nullptr && *pToolCount > 0) { + *pToolProperties = khronos_layer_tool_props; + pToolProperties = ((*pToolCount > 1) ? &pToolProperties[1] : nullptr); + (*pToolCount)--; + } + + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceToolProperties(physicalDevice, pToolCount, pToolProperties, error_obj); + if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; + } + + RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceToolProperties); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceToolProperties(physicalDevice, pToolCount, pToolProperties, record_obj); + } + + VkResult result = instance_dispatch->GetPhysicalDeviceToolProperties(physicalDevice, pToolCount, pToolProperties); + record_obj.result = result; + + if (original_pToolProperties != nullptr) { + pToolProperties = original_pToolProperties; + } + assert(*pToolCount != std::numeric_limits::max()); + (*pToolCount)++; + + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceToolProperties(physicalDevice, pToolCount, pToolProperties, record_obj); + } + return result; +} + +// ValidationCache APIs do not dispatch + +VKAPI_ATTR VkResult VKAPI_CALL CreateValidationCacheEXT(VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkValidationCacheEXT* pValidationCache) { + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + if (auto core_checks = static_cast(device_dispatch->GetValidationObject(LayerObjectTypeCoreValidation))) { + auto lock = core_checks->WriteLock(); + return core_checks->CoreLayerCreateValidationCacheEXT(device, pCreateInfo, pAllocator, pValidationCache); + } + return VK_SUCCESS; +} + +VKAPI_ATTR void VKAPI_CALL DestroyValidationCacheEXT(VkDevice device, VkValidationCacheEXT validationCache, + const VkAllocationCallbacks* pAllocator) { + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + if (auto core_checks = static_cast(device_dispatch->GetValidationObject(LayerObjectTypeCoreValidation))) { + auto lock = core_checks->WriteLock(); + core_checks->CoreLayerDestroyValidationCacheEXT(device, validationCache, pAllocator); + } +} + +VKAPI_ATTR VkResult VKAPI_CALL MergeValidationCachesEXT(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, + const VkValidationCacheEXT* pSrcCaches) { + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + if (auto core_checks = static_cast(device_dispatch->GetValidationObject(LayerObjectTypeCoreValidation))) { + auto lock = core_checks->WriteLock(); + return core_checks->CoreLayerMergeValidationCachesEXT(device, dstCache, srcCacheCount, pSrcCaches); + } + return VK_SUCCESS; +} + +VKAPI_ATTR VkResult VKAPI_CALL GetValidationCacheDataEXT(VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, + void* pData) { + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + if (auto core_checks = static_cast(device_dispatch->GetValidationObject(LayerObjectTypeCoreValidation))) { + auto lock = core_checks->WriteLock(); + return core_checks->CoreLayerGetValidationCacheDataEXT(device, validationCache, pDataSize, pData); + } + return VK_SUCCESS; +} +} // namespace vulkan_layer_chassis diff --git a/layers/chassis/dispatch_object.h b/layers/chassis/dispatch_object.h new file mode 100644 index 00000000000..48dbf15e900 --- /dev/null +++ b/layers/chassis/dispatch_object.h @@ -0,0 +1,262 @@ +/*************************************************************************** + * + * Copyright (c) 2015-2024 The Khronos Group Inc. + * Copyright (c) 2015-2024 Valve Corporation + * Copyright (c) 2015-2024 LunarG, Inc. + * Copyright (c) 2015-2024 Google Inc. + * Copyright (c) 2023-2024 RasterGrid Kft. + * + * 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 +#include + +#include "containers/custom_containers.h" +#include "error_message/logging.h" +#include "utils/vk_layer_utils.h" +#include "layer_options.h" +#include "gpu/core/gpuav_settings.h" +#include "sync/sync_settings.h" +#include "generated/dispatch_vector.h" +#include "generated/vk_api_version.h" +#include "generated/vk_extension_helper.h" +#include "generated/vk_layer_dispatch_table.h" + +class ValidationObject; + +// Layer object type identifiers +enum LayerObjectTypeId { + LayerObjectTypeThreading, // Instance or device threading layer object + LayerObjectTypeParameterValidation, // Instance or device parameter validation layer object + LayerObjectTypeObjectTracker, // Instance or device object tracker layer object + LayerObjectTypeCoreValidation, // Instance or device core validation layer object + LayerObjectTypeBestPractices, // Instance or device best practices layer object + LayerObjectTypeGpuAssisted, // Instance or device gpu assisted validation layer object + LayerObjectTypeSyncValidation, // Instance or device synchronization validation layer object + LayerObjectTypeMaxEnum, // Max enum count +}; + +// To avoid re-hashing unique ids on each use, we precompute the hash and store the +// hash's LSBs in the high 24 bits. +struct HashedUint64 { + static const int HASHED_UINT64_SHIFT = 40; + size_t operator()(const uint64_t& t) const { return t >> HASHED_UINT64_SHIFT; } + + static uint64_t hash(uint64_t id) { + uint64_t h = (uint64_t)vvl::hash()(id); + id |= h << HASHED_UINT64_SHIFT; + return id; + } +}; + +class DispatchObject; + +extern small_unordered_map layer_data_map; + +struct TemplateState { + VkDescriptorUpdateTemplate desc_update_template; + vku::safe_VkDescriptorUpdateTemplateCreateInfo create_info; + bool destroyed; + + TemplateState(VkDescriptorUpdateTemplate update_template, vku::safe_VkDescriptorUpdateTemplateCreateInfo* pCreateInfo) + : desc_update_template(update_template), create_info(*pCreateInfo), destroyed(false) {} +}; + +// For the given data key, look up the layer_data instance from given layer_data_map +template +DATA_T* GetLayerDataPtr(void* data_key, small_unordered_map& ldm) { + /* TODO: We probably should lock here, or have caller lock */ + return ldm[data_key]; +} + +class DispatchObject { + public: + DispatchObject(const VkInstanceCreateInfo* pCreateInfo); + DispatchObject(DispatchObject* instance_interceptor, VkPhysicalDevice gpu, const VkDeviceCreateInfo* pCreateInfo); + + ~DispatchObject(); + + // This class is used to represent both VkInstance and VkDevice state. + // However, the instance state owns resources that the device state must not destroy. + const bool is_instance; + + APIVersion api_version; + DebugReport* debug_report = nullptr; + VkInstance instance = VK_NULL_HANDLE; + VkPhysicalDevice physical_device = VK_NULL_HANDLE; + VkDevice device = VK_NULL_HANDLE; + + VkLayerInstanceDispatchTable instance_dispatch_table; + VkLayerDispatchTable device_dispatch_table; + + InstanceExtensions instance_extensions; + DeviceExtensions device_extensions = {}; + GlobalSettings global_settings = {}; + GpuAVSettings gpuav_settings = {}; + SyncValSettings syncval_settings = {}; + + CHECK_DISABLED disabled = {}; + CHECK_ENABLED enabled = {}; + + mutable std::vector> intercept_vectors; + mutable std::vector object_dispatch; + mutable std::vector aborted_object_dispatch; + + // Handle Wrapping Data + // Reverse map display handles + vvl::concurrent_unordered_map display_id_reverse_mapping; + // Wrapping Descriptor Template Update structures requires access to the template createinfo structs + vvl::unordered_map> desc_template_createinfo_map; + struct SubpassesUsageStates { + vvl::unordered_set subpasses_using_color_attachment; + vvl::unordered_set subpasses_using_depthstencil_attachment; + }; + // Uses unwrapped handles + vvl::unordered_map renderpasses_states; + // Map of wrapped swapchain handles to arrays of wrapped swapchain image IDs + // Each swapchain has an immutable list of wrapped swapchain image IDs -- always return these IDs if they exist + vvl::unordered_map> swapchain_wrapped_image_handle_map; + // Map of wrapped descriptor pools to set of wrapped descriptor sets allocated from each pool + vvl::unordered_map> pool_descriptor_sets_map; + + vvl::concurrent_unordered_map>, 0> deferred_operation_post_completion; + vvl::concurrent_unordered_map&)>>, 0> + deferred_operation_post_check; + vvl::concurrent_unordered_map, 0> deferred_operation_pipelines; + + // State we track in order to populate HandleData for things such as ignored pointers + vvl::unordered_map secondary_cb_map{}; + mutable std::shared_mutex secondary_cb_map_mutex; + + void InitInstanceValidationObjects(); + void InitDeviceValidationObjects(DispatchObject* instance_dispatch); + void InitObjectDispatchVectors(); + void ReleaseDeviceValidationObject(LayerObjectTypeId type_id) const; + void ReleaseAllValidationObjects() const; + + ValidationObject* GetValidationObject(LayerObjectTypeId object_type) const; + + // Unwrap a handle. + template + HandleType Unwrap(HandleType wrapped_handle) { + if (wrapped_handle == (HandleType)VK_NULL_HANDLE) return wrapped_handle; + auto iter = unique_id_mapping.find(CastToUint64(wrapped_handle)); + if (iter == unique_id_mapping.end()) return (HandleType)0; + return (HandleType)iter->second; + } + + // Wrap a newly created handle with a new unique ID, and return the new ID. + template + HandleType WrapNew(HandleType new_created_handle) { + if (new_created_handle == (HandleType)VK_NULL_HANDLE) return new_created_handle; + auto unique_id = global_unique_id++; + unique_id = HashedUint64::hash(unique_id); + assert(unique_id != 0); // can't be 0, otherwise unwrap will apply special rule for VK_NULL_HANDLE + unique_id_mapping.insert_or_assign(unique_id, CastToUint64(new_created_handle)); + return (HandleType)unique_id; + } + + // VkDisplayKHR objects are statically created in the driver at VkCreateInstance. + // They live with the PhyiscalDevice and apps never created/destroy them. + // Apps needs will query for them and the first time we see it we wrap it + VkDisplayKHR MaybeWrapDisplay(VkDisplayKHR handle) { + // See if this display is already known + auto it = display_id_reverse_mapping.find(handle); + if (it != display_id_reverse_mapping.end()) return (VkDisplayKHR)it->second; + + // First time see this VkDisplayKHR, so wrap + const uint64_t unique_id = (uint64_t)WrapNew(handle); + display_id_reverse_mapping.insert_or_assign(handle, unique_id); + return (VkDisplayKHR)unique_id; + } + + bool IsSecondary(VkCommandBuffer cb) const; + + // Debug Logging Helpers + bool DECORATE_PRINTF(5, 6) + LogError(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { + va_list argptr; + va_start(argptr, format); + const bool result = debug_report->LogMsg(kErrorBit, objlist, loc, vuid_text, format, argptr); + va_end(argptr); + return result; + } + + // Currently works like LogWarning, but allows developer to better categorize the warning + bool DECORATE_PRINTF(5, 6) LogUndefinedValue(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, + const char* format, ...) const { + va_list argptr; + va_start(argptr, format); + const bool result = debug_report->LogMsg(kWarningBit, objlist, loc, vuid_text, format, argptr); + va_end(argptr); + return result; + } + + bool DECORATE_PRINTF(5, 6) + LogWarning(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { + va_list argptr; + va_start(argptr, format); + const bool result = debug_report->LogMsg(kWarningBit, objlist, loc, vuid_text, format, argptr); + va_end(argptr); + return result; + } + + bool DECORATE_PRINTF(5, 6) LogPerformanceWarning(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, + const char* format, ...) const { + va_list argptr; + va_start(argptr, format); + const bool result = debug_report->LogMsg(kPerformanceWarningBit, objlist, loc, vuid_text, format, argptr); + va_end(argptr); + return result; + } + + bool DECORATE_PRINTF(5, 6) + LogInfo(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { + va_list argptr; + va_start(argptr, format); + const bool result = debug_report->LogMsg(kInformationBit, objlist, loc, vuid_text, format, argptr); + va_end(argptr); + return result; + } + + bool DECORATE_PRINTF(5, 6) + LogVerbose(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { + va_list argptr; + va_start(argptr, format); + const bool result = debug_report->LogMsg(kVerboseBit, objlist, loc, vuid_text, format, argptr); + va_end(argptr); + return result; + } + + void LogInternalError(std::string_view failure_location, const LogObjectList& obj_list, const Location& loc, + std::string_view entrypoint, VkResult err) const { + const std::string_view err_string = string_VkResult(err); + std::string vuid = "INTERNAL-ERROR-"; + vuid += entrypoint; + LogError(vuid, obj_list, loc, "at %s: %s() was called in the Validation Layer state tracking and failed with result = %s.", + failure_location.data(), entrypoint.data(), err_string.data()); + } + + void UnwrapPnextChainHandles(const void* pNext); + + static std::atomic global_unique_id; + static vvl::concurrent_unordered_map unique_id_mapping; + static bool wrap_handles; + +#include "generated/dispatch_object_methods.h" +}; diff --git a/layers/chassis/layer_chassis_dispatch_manual.cpp b/layers/chassis/dispatch_object_manual.cpp similarity index 59% rename from layers/chassis/layer_chassis_dispatch_manual.cpp rename to layers/chassis/dispatch_object_manual.cpp index 3d311c71074..85d8aee283f 100644 --- a/layers/chassis/layer_chassis_dispatch_manual.cpp +++ b/layers/chassis/dispatch_object_manual.cpp @@ -17,12 +17,149 @@ * limitations under the License. ****************************************************************************/ -#include "generated/chassis.h" -#include "generated/layer_chassis_dispatch.h" +#include "chassis/dispatch_object.h" #include #include "state_tracker/pipeline_state.h" +#define OBJECT_LAYER_DESCRIPTION "khronos_validation" + std::shared_mutex dispatch_lock; +small_unordered_map layer_data_map; + +// Global unique object identifier. +// Map uniqueID to actual object handle. Accesses to the map itself are +// internally synchronized. + +DispatchObject::DispatchObject(const VkInstanceCreateInfo *pCreateInfo) : is_instance(true) { + uint32_t specified_version = (pCreateInfo->pApplicationInfo ? pCreateInfo->pApplicationInfo->apiVersion : VK_API_VERSION_1_0); + api_version = VK_MAKE_API_VERSION(VK_API_VERSION_VARIANT(specified_version), VK_API_VERSION_MAJOR(specified_version), + VK_API_VERSION_MINOR(specified_version), 0); + + instance_extensions.InitFromInstanceCreateInfo(specified_version, pCreateInfo); + + debug_report = new DebugReport{}; + debug_report->instance_pnext_chain = vku::SafePnextCopy(pCreateInfo->pNext); + ActivateInstanceDebugCallbacks(debug_report); + + ConfigAndEnvSettings config_and_env_settings_data{ + OBJECT_LAYER_DESCRIPTION, pCreateInfo, enabled, disabled, debug_report, + &global_settings, &gpuav_settings, &syncval_settings}; + ProcessConfigAndEnvSettings(&config_and_env_settings_data); + + if (disabled[handle_wrapping]) { + wrap_handles = false; + } + + // create all enabled validation, which is API specific + InitInstanceValidationObjects(); + + for (auto* vo : object_dispatch) { + vo->dispatch_ = this; + vo->CopyDispatchState(); + } +} + +DispatchObject::DispatchObject(DispatchObject *instance_dispatch, VkPhysicalDevice gpu, const VkDeviceCreateInfo *pCreateInfo) + : is_instance(false) { + // Get physical device limits for device + VkPhysicalDeviceProperties device_properties = {}; + instance_dispatch->instance_dispatch_table.GetPhysicalDeviceProperties(gpu, &device_properties); + + // Setup the validation tables based on the application API version from the instance and the capabilities of the device driver + auto effective_api_version = std::min(APIVersion(device_properties.apiVersion), instance_dispatch->api_version); + + api_version = effective_api_version; + debug_report = instance_dispatch->debug_report; + instance = instance_dispatch->instance; + physical_device = gpu; + + instance_dispatch_table = instance_dispatch->instance_dispatch_table; + instance_extensions = instance_dispatch->instance_extensions; + device_extensions.InitFromDeviceCreateInfo(&instance_extensions, effective_api_version, pCreateInfo); + + global_settings = instance_dispatch->global_settings; + gpuav_settings = instance_dispatch->gpuav_settings; + syncval_settings = instance_dispatch->syncval_settings; + disabled = instance_dispatch->disabled; + enabled = instance_dispatch->enabled; + + InitDeviceValidationObjects(instance_dispatch); + InitObjectDispatchVectors(); + for (auto *vo : object_dispatch) { + vo->dispatch_ = this; + vo->CopyDispatchState(); + } +} + +DispatchObject::~DispatchObject() { + for (auto item = object_dispatch.begin(); item != object_dispatch.end(); item++) { + delete *item; + } + for (auto item = aborted_object_dispatch.begin(); item != aborted_object_dispatch.end(); item++) { + delete *item; + } + + if (is_instance) { + vku::FreePnextChain(debug_report->instance_pnext_chain); + delete debug_report; + } +} + +void DispatchObject::DestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator) { + device_dispatch_table.DestroyDevice(device, pAllocator); +} + +ValidationObject* DispatchObject::GetValidationObject(LayerObjectTypeId object_type) const { + for (auto validation_object : object_dispatch) { + if (validation_object->container_type == object_type) { + return validation_object; + } + } + return nullptr; +} + +// Takes the validation type and removes it from the chassis so it will not be called anymore +// Designed for things like GPU-AV to remove itself while keeping everything else alive +void DispatchObject::ReleaseDeviceValidationObject(LayerObjectTypeId type_id) const { + for (auto object_it = object_dispatch.begin(); object_it != object_dispatch.end(); object_it++) { + if ((*object_it)->container_type == type_id) { + ValidationObject* object = *object_it; + + object_dispatch.erase(object_it); + + for (auto intercept_vector_it = intercept_vectors.begin(); intercept_vector_it != intercept_vectors.end(); + intercept_vector_it++) { + for (auto intercept_object_it = intercept_vector_it->begin(); intercept_object_it != intercept_vector_it->end(); + intercept_object_it++) { + if (object == *intercept_object_it) { + intercept_vector_it->erase(intercept_object_it); + break; + } + } + } + + // We can't destroy the object itself now as it might be unsafe (things are still being used) + // If the rare case happens we need to release, we will cleanup later when we normally would have cleaned this up + aborted_object_dispatch.push_back(object); + break; + } + } +} + +// Incase we need to teardown things early, we want to do it safely, so we will keep the entrypoints into layer, but just remove all +// the internal chassis hooks so that any call becomes a no-op (but still dispatches into the driver) +void DispatchObject::ReleaseAllValidationObjects() const { + // Some chassis loops use the intercept_vectors instead of looking up the object + for (auto& intercept_vector : intercept_vectors) { + intercept_vector.clear(); + } + + for (auto object_it = object_dispatch.begin(); object_it != object_dispatch.end(); object_it++) { + ValidationObject* object = *object_it; + aborted_object_dispatch.push_back(object); + } + object_dispatch.clear(); +} #ifdef VK_USE_PLATFORM_METAL_EXT // The vkExportMetalObjects extension returns data from the driver -- we've created a copy of the pNext chain, so @@ -84,17 +221,16 @@ void CopyExportMetalObjects(const void *src_chain, const void *dst_chain) { } } -void DispatchExportMetalObjectsEXT(VkDevice device, VkExportMetalObjectsInfoEXT *pMetalObjectsInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.ExportMetalObjectsEXT(device, pMetalObjectsInfo); +void DispatchObject::ExportMetalObjectsEXT(VkDevice device, VkExportMetalObjectsInfoEXT *pMetalObjectsInfo) { + if (!wrap_handles) return device_dispatch_table.ExportMetalObjectsEXT(device, pMetalObjectsInfo); vku::safe_VkExportMetalObjectsInfoEXT local_pMetalObjectsInfo; { if (pMetalObjectsInfo) { local_pMetalObjectsInfo.initialize(pMetalObjectsInfo); - UnwrapPnextChainHandles(layer_data, local_pMetalObjectsInfo.pNext); + UnwrapPnextChainHandles(local_pMetalObjectsInfo.pNext); } } - layer_data->device_dispatch_table.ExportMetalObjectsEXT(device, (VkExportMetalObjectsInfoEXT *)&local_pMetalObjectsInfo); + device_dispatch_table.ExportMetalObjectsEXT(device, (VkExportMetalObjectsInfoEXT *)&local_pMetalObjectsInfo); if (pMetalObjectsInfo) { CopyExportMetalObjects(local_pMetalObjectsInfo.pNext, pMetalObjectsInfo->pNext); } @@ -117,13 +253,12 @@ void CopyCreatePipelineFeedbackData(const void *src_chain, const void *dst_chain } } -VkResult DispatchCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, - const VkGraphicsPipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, - VkPipeline *pPipelines) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); +VkResult DispatchObject::CreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkGraphicsPipelineCreateInfo *pCreateInfos, + const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) { if (!wrap_handles) - return layer_data->device_dispatch_table.CreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, - pAllocator, pPipelines); + return device_dispatch_table.CreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, + pPipelines); vku::safe_VkGraphicsPipelineCreateInfo *local_pCreateInfos = nullptr; if (pCreateInfos) { local_pCreateInfos = new vku::safe_VkGraphicsPipelineCreateInfo[createInfoCount]; @@ -132,9 +267,8 @@ VkResult DispatchCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipeli bool uses_color_attachment = false; bool uses_depthstencil_attachment = false; { - const auto subpasses_uses_it = - layer_data->renderpasses_states.find(layer_data->Unwrap(pCreateInfos[idx0].renderPass)); - if (subpasses_uses_it != layer_data->renderpasses_states.end()) { + const auto subpasses_uses_it = renderpasses_states.find(Unwrap(pCreateInfos[idx0].renderPass)); + if (subpasses_uses_it != renderpasses_states.end()) { const auto &subpasses_uses = subpasses_uses_it->second; if (subpasses_uses.subpasses_using_color_attachment.count(pCreateInfos[idx0].subpass)) uses_color_attachment = true; @@ -155,27 +289,27 @@ VkResult DispatchCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipeli local_pCreateInfos[idx0].initialize(&pCreateInfos[idx0], uses_color_attachment, uses_depthstencil_attachment); if (pCreateInfos[idx0].basePipelineHandle) { - local_pCreateInfos[idx0].basePipelineHandle = layer_data->Unwrap(pCreateInfos[idx0].basePipelineHandle); + local_pCreateInfos[idx0].basePipelineHandle = Unwrap(pCreateInfos[idx0].basePipelineHandle); } if (pCreateInfos[idx0].layout) { - local_pCreateInfos[idx0].layout = layer_data->Unwrap(pCreateInfos[idx0].layout); + local_pCreateInfos[idx0].layout = Unwrap(pCreateInfos[idx0].layout); } if (pCreateInfos[idx0].pStages) { for (uint32_t idx1 = 0; idx1 < pCreateInfos[idx0].stageCount; ++idx1) { if (pCreateInfos[idx0].pStages[idx1].module) { - local_pCreateInfos[idx0].pStages[idx1].module = layer_data->Unwrap(pCreateInfos[idx0].pStages[idx1].module); + local_pCreateInfos[idx0].pStages[idx1].module = Unwrap(pCreateInfos[idx0].pStages[idx1].module); } } } if (pCreateInfos[idx0].renderPass) { - local_pCreateInfos[idx0].renderPass = layer_data->Unwrap(pCreateInfos[idx0].renderPass); + local_pCreateInfos[idx0].renderPass = Unwrap(pCreateInfos[idx0].renderPass); } auto *link_info = vku::FindStructInPNextChain(local_pCreateInfos[idx0].pNext); if (link_info) { auto *unwrapped_libs = const_cast(link_info->pLibraries); for (uint32_t idx1 = 0; idx1 < link_info->libraryCount; ++idx1) { - unwrapped_libs[idx1] = layer_data->Unwrap(link_info->pLibraries[idx1]); + unwrapped_libs[idx1] = Unwrap(link_info->pLibraries[idx1]); } } @@ -187,14 +321,13 @@ VkResult DispatchCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipeli auto unwrapped_stage = const_cast(&device_generated_commands->pGroups[idx1].pStages[idx2]); if (device_generated_commands->pGroups[idx1].pStages[idx2].module) { - unwrapped_stage->module = - layer_data->Unwrap(device_generated_commands->pGroups[idx1].pStages[idx2].module); + unwrapped_stage->module = Unwrap(device_generated_commands->pGroups[idx1].pStages[idx2].module); } } } auto unwrapped_pipelines = const_cast(device_generated_commands->pPipelines); for (uint32_t idx1 = 0; idx1 < device_generated_commands->pipelineCount; ++idx1) { - unwrapped_pipelines[idx1] = layer_data->Unwrap(device_generated_commands->pPipelines[idx1]); + unwrapped_pipelines[idx1] = Unwrap(device_generated_commands->pPipelines[idx1]); } } @@ -202,17 +335,17 @@ VkResult DispatchCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipeli if (binary_info) { auto *unwrapped_binaries = const_cast(binary_info->pPipelineBinaries); for (uint32_t idx1 = 0; idx1 < binary_info->binaryCount; ++idx1) { - unwrapped_binaries[idx1] = layer_data->Unwrap(binary_info->pPipelineBinaries[idx1]); + unwrapped_binaries[idx1] = Unwrap(binary_info->pPipelineBinaries[idx1]); } } } } if (pipelineCache) { - pipelineCache = layer_data->Unwrap(pipelineCache); + pipelineCache = Unwrap(pipelineCache); } - VkResult result = layer_data->device_dispatch_table.CreateGraphicsPipelines(device, pipelineCache, createInfoCount, - local_pCreateInfos->ptr(), pAllocator, pPipelines); + VkResult result = device_dispatch_table.CreateGraphicsPipelines(device, pipelineCache, createInfoCount, + local_pCreateInfos->ptr(), pAllocator, pPipelines); for (uint32_t i = 0; i < createInfoCount; ++i) { if (pCreateInfos[i].pNext != VK_NULL_HANDLE) { CopyCreatePipelineFeedbackData(local_pCreateInfos[i].pNext, pCreateInfos[i].pNext); @@ -223,7 +356,7 @@ VkResult DispatchCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipeli { for (uint32_t i = 0; i < createInfoCount; ++i) { if (pPipelines[i] != VK_NULL_HANDLE) { - pPipelines[i] = layer_data->WrapNew(pPipelines[i]); + pPipelines[i] = WrapNew(pPipelines[i]); } } } @@ -281,48 +414,44 @@ void UpdateCreateRenderPassState(DispatchObject *layer_data, const VkRenderPassC } } -VkResult DispatchCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo *pCreateInfo, - const VkAllocationCallbacks *pAllocator, VkRenderPass *pRenderPass) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - VkResult result = layer_data->device_dispatch_table.CreateRenderPass(device, pCreateInfo, pAllocator, pRenderPass); +VkResult DispatchObject::CreateRenderPass(VkDevice device, const VkRenderPassCreateInfo *pCreateInfo, + const VkAllocationCallbacks *pAllocator, VkRenderPass *pRenderPass) { + VkResult result = device_dispatch_table.CreateRenderPass(device, pCreateInfo, pAllocator, pRenderPass); if (!wrap_handles) return result; if (VK_SUCCESS == result) { WriteLockGuard lock(dispatch_lock); - UpdateCreateRenderPassState(layer_data, pCreateInfo, *pRenderPass); - *pRenderPass = layer_data->WrapNew(*pRenderPass); + UpdateCreateRenderPassState(this, pCreateInfo, *pRenderPass); + *pRenderPass = WrapNew(*pRenderPass); } return result; } -VkResult DispatchCreateRenderPass2KHR(VkDevice device, const VkRenderPassCreateInfo2 *pCreateInfo, - const VkAllocationCallbacks *pAllocator, VkRenderPass *pRenderPass) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - VkResult result = layer_data->device_dispatch_table.CreateRenderPass2KHR(device, pCreateInfo, pAllocator, pRenderPass); +VkResult DispatchObject::CreateRenderPass2KHR(VkDevice device, const VkRenderPassCreateInfo2 *pCreateInfo, + const VkAllocationCallbacks *pAllocator, VkRenderPass *pRenderPass) { + VkResult result = device_dispatch_table.CreateRenderPass2KHR(device, pCreateInfo, pAllocator, pRenderPass); if (!wrap_handles) return result; if (VK_SUCCESS == result) { WriteLockGuard lock(dispatch_lock); - UpdateCreateRenderPassState(layer_data, pCreateInfo, *pRenderPass); - *pRenderPass = layer_data->WrapNew(*pRenderPass); + UpdateCreateRenderPassState(this, pCreateInfo, *pRenderPass); + *pRenderPass = WrapNew(*pRenderPass); } return result; } -VkResult DispatchCreateRenderPass2(VkDevice device, const VkRenderPassCreateInfo2 *pCreateInfo, - const VkAllocationCallbacks *pAllocator, VkRenderPass *pRenderPass) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - VkResult result = layer_data->device_dispatch_table.CreateRenderPass2(device, pCreateInfo, pAllocator, pRenderPass); +VkResult DispatchObject::CreateRenderPass2(VkDevice device, const VkRenderPassCreateInfo2 *pCreateInfo, + const VkAllocationCallbacks *pAllocator, VkRenderPass *pRenderPass) { + VkResult result = device_dispatch_table.CreateRenderPass2(device, pCreateInfo, pAllocator, pRenderPass); if (!wrap_handles) return result; if (VK_SUCCESS == result) { WriteLockGuard lock(dispatch_lock); - UpdateCreateRenderPassState(layer_data, pCreateInfo, *pRenderPass); - *pRenderPass = layer_data->WrapNew(*pRenderPass); + UpdateCreateRenderPassState(this, pCreateInfo, *pRenderPass); + *pRenderPass = WrapNew(*pRenderPass); } return result; } -void DispatchDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks *pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyRenderPass(device, renderPass, pAllocator); +void DispatchObject::DestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks *pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyRenderPass(device, renderPass, pAllocator); uint64_t renderPass_id = CastToUint64(renderPass); auto iter = unique_id_mapping.pop(renderPass_id); @@ -332,29 +461,27 @@ void DispatchDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const V renderPass = (VkRenderPass)0; } - layer_data->device_dispatch_table.DestroyRenderPass(device, renderPass, pAllocator); + device_dispatch_table.DestroyRenderPass(device, renderPass, pAllocator); WriteLockGuard lock(dispatch_lock); - layer_data->renderpasses_states.erase(renderPass); + renderpasses_states.erase(renderPass); } -VkResult DispatchGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t *pSwapchainImageCount, - VkImage *pSwapchainImages) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); +VkResult DispatchObject::GetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t *pSwapchainImageCount, + VkImage *pSwapchainImages) { if (!wrap_handles) - return layer_data->device_dispatch_table.GetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages); + return device_dispatch_table.GetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages); VkSwapchainKHR wrapped_swapchain_handle = swapchain; if (VK_NULL_HANDLE != swapchain) { - swapchain = layer_data->Unwrap(swapchain); + swapchain = Unwrap(swapchain); } - VkResult result = - layer_data->device_dispatch_table.GetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages); + VkResult result = device_dispatch_table.GetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages); if ((VK_SUCCESS == result) || (VK_INCOMPLETE == result)) { if ((*pSwapchainImageCount > 0) && pSwapchainImages) { WriteLockGuard lock(dispatch_lock); - auto &wrapped_swapchain_image_handles = layer_data->swapchain_wrapped_image_handle_map[wrapped_swapchain_handle]; + auto &wrapped_swapchain_image_handles = swapchain_wrapped_image_handle_map[wrapped_swapchain_handle]; for (uint32_t i = static_cast(wrapped_swapchain_image_handles.size()); i < *pSwapchainImageCount; i++) { - wrapped_swapchain_image_handles.emplace_back(layer_data->WrapNew(pSwapchainImages[i])); + wrapped_swapchain_image_handles.emplace_back(WrapNew(pSwapchainImages[i])); } for (uint32_t i = 0; i < *pSwapchainImageCount; i++) { pSwapchainImages[i] = wrapped_swapchain_image_handles[i]; @@ -364,16 +491,15 @@ VkResult DispatchGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain return result; } -void DispatchDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks *pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroySwapchainKHR(device, swapchain, pAllocator); +void DispatchObject::DestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks *pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroySwapchainKHR(device, swapchain, pAllocator); WriteLockGuard lock(dispatch_lock); - auto &image_array = layer_data->swapchain_wrapped_image_handle_map[swapchain]; + auto &image_array = swapchain_wrapped_image_handle_map[swapchain]; for (auto &image_handle : image_array) { unique_id_mapping.erase(HandleToUint64(image_handle)); } - layer_data->swapchain_wrapped_image_handle_map.erase(swapchain); + swapchain_wrapped_image_handle_map.erase(swapchain); lock.unlock(); uint64_t swapchain_id = HandleToUint64(swapchain); @@ -385,30 +511,29 @@ void DispatchDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, cons swapchain = (VkSwapchainKHR)0; } - layer_data->device_dispatch_table.DestroySwapchainKHR(device, swapchain, pAllocator); + device_dispatch_table.DestroySwapchainKHR(device, swapchain, pAllocator); } -VkResult DispatchQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresentInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.QueuePresentKHR(queue, pPresentInfo); +VkResult DispatchObject::QueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresentInfo) { + if (!wrap_handles) return device_dispatch_table.QueuePresentKHR(queue, pPresentInfo); vku::safe_VkPresentInfoKHR *local_pPresentInfo = nullptr; { if (pPresentInfo) { local_pPresentInfo = new vku::safe_VkPresentInfoKHR(pPresentInfo); if (local_pPresentInfo->pWaitSemaphores) { for (uint32_t index1 = 0; index1 < local_pPresentInfo->waitSemaphoreCount; ++index1) { - local_pPresentInfo->pWaitSemaphores[index1] = layer_data->Unwrap(pPresentInfo->pWaitSemaphores[index1]); + local_pPresentInfo->pWaitSemaphores[index1] = Unwrap(pPresentInfo->pWaitSemaphores[index1]); } } if (local_pPresentInfo->pSwapchains) { for (uint32_t index1 = 0; index1 < local_pPresentInfo->swapchainCount; ++index1) { - local_pPresentInfo->pSwapchains[index1] = layer_data->Unwrap(pPresentInfo->pSwapchains[index1]); + local_pPresentInfo->pSwapchains[index1] = Unwrap(pPresentInfo->pSwapchains[index1]); } } - UnwrapPnextChainHandles(layer_data, local_pPresentInfo->pNext); + UnwrapPnextChainHandles(local_pPresentInfo->pNext); } } - VkResult result = layer_data->device_dispatch_table.QueuePresentKHR(queue, local_pPresentInfo->ptr()); + VkResult result = device_dispatch_table.QueuePresentKHR(queue, local_pPresentInfo->ptr()); // pResults is an output array embedded in a structure. The code generator neglects to copy back from the vku::safe *version, // so handle it as a special case here: @@ -421,16 +546,16 @@ VkResult DispatchQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresent return result; } -void DispatchDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks *pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyDescriptorPool(device, descriptorPool, pAllocator); +void DispatchObject::DestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, + const VkAllocationCallbacks *pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyDescriptorPool(device, descriptorPool, pAllocator); WriteLockGuard lock(dispatch_lock); // remove references to implicitly freed descriptor sets - for (auto descriptor_set : layer_data->pool_descriptor_sets_map[descriptorPool]) { + for (auto descriptor_set : pool_descriptor_sets_map[descriptorPool]) { unique_id_mapping.erase(CastToUint64(descriptor_set)); } - layer_data->pool_descriptor_sets_map.erase(descriptorPool); + pool_descriptor_sets_map.erase(descriptorPool); lock.unlock(); uint64_t descriptorPool_id = CastToUint64(descriptorPool); @@ -442,83 +567,79 @@ void DispatchDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorP descriptorPool = (VkDescriptorPool)0; } - layer_data->device_dispatch_table.DestroyDescriptorPool(device, descriptorPool, pAllocator); + device_dispatch_table.DestroyDescriptorPool(device, descriptorPool, pAllocator); } -VkResult DispatchResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.ResetDescriptorPool(device, descriptorPool, flags); +VkResult DispatchObject::ResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags) { + if (!wrap_handles) return device_dispatch_table.ResetDescriptorPool(device, descriptorPool, flags); VkDescriptorPool local_descriptor_pool = VK_NULL_HANDLE; - { local_descriptor_pool = layer_data->Unwrap(descriptorPool); } - VkResult result = layer_data->device_dispatch_table.ResetDescriptorPool(device, local_descriptor_pool, flags); + { local_descriptor_pool = Unwrap(descriptorPool); } + VkResult result = device_dispatch_table.ResetDescriptorPool(device, local_descriptor_pool, flags); if (VK_SUCCESS == result) { WriteLockGuard lock(dispatch_lock); // remove references to implicitly freed descriptor sets - for (auto descriptor_set : layer_data->pool_descriptor_sets_map[descriptorPool]) { + for (auto descriptor_set : pool_descriptor_sets_map[descriptorPool]) { unique_id_mapping.erase(CastToUint64(descriptor_set)); } - layer_data->pool_descriptor_sets_map[descriptorPool].clear(); + pool_descriptor_sets_map[descriptorPool].clear(); } return result; } -VkResult DispatchAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo *pAllocateInfo, - VkDescriptorSet *pDescriptorSets) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.AllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets); +VkResult DispatchObject::AllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo *pAllocateInfo, + VkDescriptorSet *pDescriptorSets) { + if (!wrap_handles) return device_dispatch_table.AllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets); vku::safe_VkDescriptorSetAllocateInfo *local_pAllocateInfo = nullptr; { if (pAllocateInfo) { local_pAllocateInfo = new vku::safe_VkDescriptorSetAllocateInfo(pAllocateInfo); if (pAllocateInfo->descriptorPool) { - local_pAllocateInfo->descriptorPool = layer_data->Unwrap(pAllocateInfo->descriptorPool); + local_pAllocateInfo->descriptorPool = Unwrap(pAllocateInfo->descriptorPool); } if (local_pAllocateInfo->pSetLayouts) { for (uint32_t index1 = 0; index1 < local_pAllocateInfo->descriptorSetCount; ++index1) { - local_pAllocateInfo->pSetLayouts[index1] = layer_data->Unwrap(local_pAllocateInfo->pSetLayouts[index1]); + local_pAllocateInfo->pSetLayouts[index1] = Unwrap(local_pAllocateInfo->pSetLayouts[index1]); } } } } - VkResult result = layer_data->device_dispatch_table.AllocateDescriptorSets( - device, (const VkDescriptorSetAllocateInfo *)local_pAllocateInfo, pDescriptorSets); + VkResult result = device_dispatch_table.AllocateDescriptorSets(device, (const VkDescriptorSetAllocateInfo *)local_pAllocateInfo, + pDescriptorSets); if (local_pAllocateInfo) { delete local_pAllocateInfo; } if (VK_SUCCESS == result) { WriteLockGuard lock(dispatch_lock); - auto &pool_descriptor_sets = layer_data->pool_descriptor_sets_map[pAllocateInfo->descriptorPool]; + auto &pool_descriptor_sets = pool_descriptor_sets_map[pAllocateInfo->descriptorPool]; for (uint32_t index0 = 0; index0 < pAllocateInfo->descriptorSetCount; index0++) { - pDescriptorSets[index0] = layer_data->WrapNew(pDescriptorSets[index0]); + pDescriptorSets[index0] = WrapNew(pDescriptorSets[index0]); pool_descriptor_sets.insert(pDescriptorSets[index0]); } } return result; } -VkResult DispatchFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, - const VkDescriptorSet *pDescriptorSets) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.FreeDescriptorSets(device, descriptorPool, descriptorSetCount, pDescriptorSets); +VkResult DispatchObject::FreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, + const VkDescriptorSet *pDescriptorSets) { + if (!wrap_handles) return device_dispatch_table.FreeDescriptorSets(device, descriptorPool, descriptorSetCount, pDescriptorSets); VkDescriptorSet *local_pDescriptorSets = nullptr; VkDescriptorPool local_descriptor_pool = VK_NULL_HANDLE; { - local_descriptor_pool = layer_data->Unwrap(descriptorPool); + local_descriptor_pool = Unwrap(descriptorPool); if (pDescriptorSets) { local_pDescriptorSets = new VkDescriptorSet[descriptorSetCount]; for (uint32_t index0 = 0; index0 < descriptorSetCount; ++index0) { - local_pDescriptorSets[index0] = layer_data->Unwrap(pDescriptorSets[index0]); + local_pDescriptorSets[index0] = Unwrap(pDescriptorSets[index0]); } } } - VkResult result = layer_data->device_dispatch_table.FreeDescriptorSets(device, local_descriptor_pool, descriptorSetCount, - (const VkDescriptorSet *)local_pDescriptorSets); + VkResult result = device_dispatch_table.FreeDescriptorSets(device, local_descriptor_pool, descriptorSetCount, + (const VkDescriptorSet *)local_pDescriptorSets); if (local_pDescriptorSets) delete[] local_pDescriptorSets; if ((VK_SUCCESS == result) && (pDescriptorSets)) { WriteLockGuard lock(dispatch_lock); - auto &pool_descriptor_sets = layer_data->pool_descriptor_sets_map[descriptorPool]; + auto &pool_descriptor_sets = pool_descriptor_sets_map[descriptorPool]; for (uint32_t index0 = 0; index0 < descriptorSetCount; index0++) { VkDescriptorSet handle = pDescriptorSets[index0]; pool_descriptor_sets.erase(handle); @@ -530,85 +651,79 @@ VkResult DispatchFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptor } // This is the core version of this routine. The extension version is below. -VkResult DispatchCreateDescriptorUpdateTemplate(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo *pCreateInfo, - const VkAllocationCallbacks *pAllocator, - VkDescriptorUpdateTemplate *pDescriptorUpdateTemplate) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); +VkResult DispatchObject::CreateDescriptorUpdateTemplate(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo *pCreateInfo, + const VkAllocationCallbacks *pAllocator, + VkDescriptorUpdateTemplate *pDescriptorUpdateTemplate) { if (!wrap_handles) - return layer_data->device_dispatch_table.CreateDescriptorUpdateTemplate(device, pCreateInfo, pAllocator, - pDescriptorUpdateTemplate); + return device_dispatch_table.CreateDescriptorUpdateTemplate(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate); vku::safe_VkDescriptorUpdateTemplateCreateInfo var_local_pCreateInfo; vku::safe_VkDescriptorUpdateTemplateCreateInfo *local_pCreateInfo = nullptr; if (pCreateInfo) { local_pCreateInfo = &var_local_pCreateInfo; local_pCreateInfo->initialize(pCreateInfo); if (pCreateInfo->templateType == VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET) { - local_pCreateInfo->descriptorSetLayout = layer_data->Unwrap(pCreateInfo->descriptorSetLayout); + local_pCreateInfo->descriptorSetLayout = Unwrap(pCreateInfo->descriptorSetLayout); } if (pCreateInfo->templateType == VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR) { - local_pCreateInfo->pipelineLayout = layer_data->Unwrap(pCreateInfo->pipelineLayout); + local_pCreateInfo->pipelineLayout = Unwrap(pCreateInfo->pipelineLayout); } } - VkResult result = layer_data->device_dispatch_table.CreateDescriptorUpdateTemplate(device, local_pCreateInfo->ptr(), pAllocator, - pDescriptorUpdateTemplate); + VkResult result = device_dispatch_table.CreateDescriptorUpdateTemplate(device, local_pCreateInfo->ptr(), pAllocator, + pDescriptorUpdateTemplate); if (VK_SUCCESS == result) { - *pDescriptorUpdateTemplate = layer_data->WrapNew(*pDescriptorUpdateTemplate); + *pDescriptorUpdateTemplate = WrapNew(*pDescriptorUpdateTemplate); // Shadow template createInfo for later updates if (local_pCreateInfo) { WriteLockGuard lock(dispatch_lock); std::unique_ptr template_state(new TemplateState(*pDescriptorUpdateTemplate, local_pCreateInfo)); - layer_data->desc_template_createinfo_map[(uint64_t)*pDescriptorUpdateTemplate] = std::move(template_state); + desc_template_createinfo_map[(uint64_t)*pDescriptorUpdateTemplate] = std::move(template_state); } } return result; } // This is the extension version of this routine. The core version is above. -VkResult DispatchCreateDescriptorUpdateTemplateKHR(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo *pCreateInfo, - const VkAllocationCallbacks *pAllocator, - VkDescriptorUpdateTemplate *pDescriptorUpdateTemplate) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); +VkResult DispatchObject::CreateDescriptorUpdateTemplateKHR(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo *pCreateInfo, + const VkAllocationCallbacks *pAllocator, + VkDescriptorUpdateTemplate *pDescriptorUpdateTemplate) { if (!wrap_handles) - return layer_data->device_dispatch_table.CreateDescriptorUpdateTemplateKHR(device, pCreateInfo, pAllocator, - pDescriptorUpdateTemplate); + return device_dispatch_table.CreateDescriptorUpdateTemplateKHR(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate); vku::safe_VkDescriptorUpdateTemplateCreateInfo var_local_pCreateInfo; vku::safe_VkDescriptorUpdateTemplateCreateInfo *local_pCreateInfo = nullptr; if (pCreateInfo) { local_pCreateInfo = &var_local_pCreateInfo; local_pCreateInfo->initialize(pCreateInfo); if (pCreateInfo->templateType == VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET) { - local_pCreateInfo->descriptorSetLayout = layer_data->Unwrap(pCreateInfo->descriptorSetLayout); + local_pCreateInfo->descriptorSetLayout = Unwrap(pCreateInfo->descriptorSetLayout); } if (pCreateInfo->templateType == VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR) { - local_pCreateInfo->pipelineLayout = layer_data->Unwrap(pCreateInfo->pipelineLayout); + local_pCreateInfo->pipelineLayout = Unwrap(pCreateInfo->pipelineLayout); } } - VkResult result = layer_data->device_dispatch_table.CreateDescriptorUpdateTemplateKHR(device, local_pCreateInfo->ptr(), - pAllocator, pDescriptorUpdateTemplate); + VkResult result = device_dispatch_table.CreateDescriptorUpdateTemplateKHR(device, local_pCreateInfo->ptr(), pAllocator, + pDescriptorUpdateTemplate); if (VK_SUCCESS == result) { - *pDescriptorUpdateTemplate = layer_data->WrapNew(*pDescriptorUpdateTemplate); + *pDescriptorUpdateTemplate = WrapNew(*pDescriptorUpdateTemplate); // Shadow template createInfo for later updates if (local_pCreateInfo) { WriteLockGuard lock(dispatch_lock); std::unique_ptr template_state(new TemplateState(*pDescriptorUpdateTemplate, local_pCreateInfo)); - layer_data->desc_template_createinfo_map[(uint64_t)*pDescriptorUpdateTemplate] = std::move(template_state); + desc_template_createinfo_map[(uint64_t)*pDescriptorUpdateTemplate] = std::move(template_state); } } return result; } // This is the core version of this routine. The extension version is below. -void DispatchDestroyDescriptorUpdateTemplate(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, - const VkAllocationCallbacks *pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.DestroyDescriptorUpdateTemplate(device, descriptorUpdateTemplate, pAllocator); +void DispatchObject::DestroyDescriptorUpdateTemplate(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, + const VkAllocationCallbacks *pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyDescriptorUpdateTemplate(device, descriptorUpdateTemplate, pAllocator); WriteLockGuard lock(dispatch_lock); uint64_t descriptor_update_template_id = CastToUint64(descriptorUpdateTemplate); - layer_data->desc_template_createinfo_map.erase(descriptor_update_template_id); + desc_template_createinfo_map.erase(descriptor_update_template_id); lock.unlock(); auto iter = unique_id_mapping.pop(descriptor_update_template_id); @@ -618,18 +733,17 @@ void DispatchDestroyDescriptorUpdateTemplate(VkDevice device, VkDescriptorUpdate descriptorUpdateTemplate = (VkDescriptorUpdateTemplate)0; } - layer_data->device_dispatch_table.DestroyDescriptorUpdateTemplate(device, descriptorUpdateTemplate, pAllocator); + device_dispatch_table.DestroyDescriptorUpdateTemplate(device, descriptorUpdateTemplate, pAllocator); } // This is the extension version of this routine. The core version is above. -void DispatchDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, - const VkAllocationCallbacks *pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); +void DispatchObject::DestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, + const VkAllocationCallbacks *pAllocator) { if (!wrap_handles) - return layer_data->device_dispatch_table.DestroyDescriptorUpdateTemplateKHR(device, descriptorUpdateTemplate, pAllocator); + return device_dispatch_table.DestroyDescriptorUpdateTemplateKHR(device, descriptorUpdateTemplate, pAllocator); WriteLockGuard lock(dispatch_lock); uint64_t descriptor_update_template_id = CastToUint64(descriptorUpdateTemplate); - layer_data->desc_template_createinfo_map.erase(descriptor_update_template_id); + desc_template_createinfo_map.erase(descriptor_update_template_id); lock.unlock(); auto iter = unique_id_mapping.pop(descriptor_update_template_id); @@ -639,7 +753,7 @@ void DispatchDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpd descriptorUpdateTemplate = (VkDescriptorUpdateTemplate)0; } - layer_data->device_dispatch_table.DestroyDescriptorUpdateTemplateKHR(device, descriptorUpdateTemplate, pAllocator); + device_dispatch_table.DestroyDescriptorUpdateTemplateKHR(device, descriptorUpdateTemplate, pAllocator); } void *BuildUnwrappedUpdateTemplateBuffer(DispatchObject *layer_data, uint64_t descriptorUpdateTemplate, const void *pData) { @@ -760,197 +874,173 @@ void *BuildUnwrappedUpdateTemplateBuffer(DispatchObject *layer_data, uint64_t de return (void *)unwrapped_data; } -void DispatchUpdateDescriptorSetWithTemplate(VkDevice device, VkDescriptorSet descriptorSet, - VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void *pData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); +void DispatchObject::UpdateDescriptorSetWithTemplate(VkDevice device, VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void *pData) { if (!wrap_handles) - return layer_data->device_dispatch_table.UpdateDescriptorSetWithTemplate(device, descriptorSet, descriptorUpdateTemplate, - pData); + return device_dispatch_table.UpdateDescriptorSetWithTemplate(device, descriptorSet, descriptorUpdateTemplate, pData); uint64_t template_handle = CastToUint64(descriptorUpdateTemplate); void *unwrapped_buffer = nullptr; { ReadLockGuard lock(dispatch_lock); - descriptorSet = layer_data->Unwrap(descriptorSet); - descriptorUpdateTemplate = (VkDescriptorUpdateTemplate)layer_data->Unwrap(descriptorUpdateTemplate); - unwrapped_buffer = BuildUnwrappedUpdateTemplateBuffer(layer_data, template_handle, pData); + descriptorSet = Unwrap(descriptorSet); + descriptorUpdateTemplate = (VkDescriptorUpdateTemplate)Unwrap(descriptorUpdateTemplate); + unwrapped_buffer = BuildUnwrappedUpdateTemplateBuffer(this, template_handle, pData); } - layer_data->device_dispatch_table.UpdateDescriptorSetWithTemplate(device, descriptorSet, descriptorUpdateTemplate, - unwrapped_buffer); + device_dispatch_table.UpdateDescriptorSetWithTemplate(device, descriptorSet, descriptorUpdateTemplate, unwrapped_buffer); free(unwrapped_buffer); } -void DispatchUpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, - VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void *pData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); +void DispatchObject::UpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void *pData) { if (!wrap_handles) - return layer_data->device_dispatch_table.UpdateDescriptorSetWithTemplateKHR(device, descriptorSet, descriptorUpdateTemplate, - pData); + return device_dispatch_table.UpdateDescriptorSetWithTemplateKHR(device, descriptorSet, descriptorUpdateTemplate, pData); uint64_t template_handle = CastToUint64(descriptorUpdateTemplate); void *unwrapped_buffer = nullptr; { ReadLockGuard lock(dispatch_lock); - descriptorSet = layer_data->Unwrap(descriptorSet); - descriptorUpdateTemplate = layer_data->Unwrap(descriptorUpdateTemplate); - unwrapped_buffer = BuildUnwrappedUpdateTemplateBuffer(layer_data, template_handle, pData); + descriptorSet = Unwrap(descriptorSet); + descriptorUpdateTemplate = Unwrap(descriptorUpdateTemplate); + unwrapped_buffer = BuildUnwrappedUpdateTemplateBuffer(this, template_handle, pData); } - layer_data->device_dispatch_table.UpdateDescriptorSetWithTemplateKHR(device, descriptorSet, descriptorUpdateTemplate, - unwrapped_buffer); + device_dispatch_table.UpdateDescriptorSetWithTemplateKHR(device, descriptorSet, descriptorUpdateTemplate, unwrapped_buffer); free(unwrapped_buffer); } -void DispatchCmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, - VkPipelineLayout layout, uint32_t set, const void *pData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); +void DispatchObject::CmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, + VkPipelineLayout layout, uint32_t set, const void *pData) { if (!wrap_handles) - return layer_data->device_dispatch_table.CmdPushDescriptorSetWithTemplateKHR(commandBuffer, descriptorUpdateTemplate, - layout, set, pData); + return device_dispatch_table.CmdPushDescriptorSetWithTemplateKHR(commandBuffer, descriptorUpdateTemplate, layout, set, + pData); uint64_t template_handle = CastToUint64(descriptorUpdateTemplate); void *unwrapped_buffer = nullptr; { ReadLockGuard lock(dispatch_lock); - descriptorUpdateTemplate = layer_data->Unwrap(descriptorUpdateTemplate); - layout = layer_data->Unwrap(layout); - unwrapped_buffer = BuildUnwrappedUpdateTemplateBuffer(layer_data, template_handle, pData); + descriptorUpdateTemplate = Unwrap(descriptorUpdateTemplate); + layout = Unwrap(layout); + unwrapped_buffer = BuildUnwrappedUpdateTemplateBuffer(this, template_handle, pData); } - layer_data->device_dispatch_table.CmdPushDescriptorSetWithTemplateKHR(commandBuffer, descriptorUpdateTemplate, layout, set, - unwrapped_buffer); + device_dispatch_table.CmdPushDescriptorSetWithTemplateKHR(commandBuffer, descriptorUpdateTemplate, layout, set, + unwrapped_buffer); free(unwrapped_buffer); } -void DispatchCmdPushDescriptorSetWithTemplate2KHR( +void DispatchObject::CmdPushDescriptorSetWithTemplate2KHR( VkCommandBuffer commandBuffer, const VkPushDescriptorSetWithTemplateInfoKHR *pPushDescriptorSetWithTemplateInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); if (!wrap_handles) - return layer_data->device_dispatch_table.CmdPushDescriptorSetWithTemplate2KHR(commandBuffer, - pPushDescriptorSetWithTemplateInfo); + return device_dispatch_table.CmdPushDescriptorSetWithTemplate2KHR(commandBuffer, pPushDescriptorSetWithTemplateInfo); uint64_t template_handle = CastToUint64(pPushDescriptorSetWithTemplateInfo->descriptorUpdateTemplate); void *unwrapped_buffer = nullptr; { ReadLockGuard lock(dispatch_lock); const_cast(pPushDescriptorSetWithTemplateInfo)->descriptorUpdateTemplate = - layer_data->Unwrap(pPushDescriptorSetWithTemplateInfo->descriptorUpdateTemplate); + Unwrap(pPushDescriptorSetWithTemplateInfo->descriptorUpdateTemplate); const_cast(pPushDescriptorSetWithTemplateInfo)->layout = - layer_data->Unwrap(pPushDescriptorSetWithTemplateInfo->layout); - unwrapped_buffer = - BuildUnwrappedUpdateTemplateBuffer(layer_data, template_handle, pPushDescriptorSetWithTemplateInfo->pData); + Unwrap(pPushDescriptorSetWithTemplateInfo->layout); + unwrapped_buffer = BuildUnwrappedUpdateTemplateBuffer(this, template_handle, pPushDescriptorSetWithTemplateInfo->pData); const_cast(pPushDescriptorSetWithTemplateInfo)->pData = unwrapped_buffer; } - layer_data->device_dispatch_table.CmdPushDescriptorSetWithTemplate2KHR(commandBuffer, pPushDescriptorSetWithTemplateInfo); + device_dispatch_table.CmdPushDescriptorSetWithTemplate2KHR(commandBuffer, pPushDescriptorSetWithTemplateInfo); free(unwrapped_buffer); } -VkResult DispatchGetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t *pPropertyCount, - VkDisplayPropertiesKHR *pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - VkResult result = - layer_data->instance_dispatch_table.GetPhysicalDeviceDisplayPropertiesKHR(physicalDevice, pPropertyCount, pProperties); +VkResult DispatchObject::GetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t *pPropertyCount, + VkDisplayPropertiesKHR *pProperties) { + VkResult result = instance_dispatch_table.GetPhysicalDeviceDisplayPropertiesKHR(physicalDevice, pPropertyCount, pProperties); if (!wrap_handles) return result; if ((result == VK_SUCCESS || result == VK_INCOMPLETE) && pProperties) { for (uint32_t idx0 = 0; idx0 < *pPropertyCount; ++idx0) { - pProperties[idx0].display = layer_data->MaybeWrapDisplay(pProperties[idx0].display); + pProperties[idx0].display = MaybeWrapDisplay(pProperties[idx0].display); } } return result; } -VkResult DispatchGetPhysicalDeviceDisplayProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t *pPropertyCount, - VkDisplayProperties2KHR *pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - VkResult result = - layer_data->instance_dispatch_table.GetPhysicalDeviceDisplayProperties2KHR(physicalDevice, pPropertyCount, pProperties); +VkResult DispatchObject::GetPhysicalDeviceDisplayProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t *pPropertyCount, + VkDisplayProperties2KHR *pProperties) { + VkResult result = instance_dispatch_table.GetPhysicalDeviceDisplayProperties2KHR(physicalDevice, pPropertyCount, pProperties); if (!wrap_handles) return result; if ((result == VK_SUCCESS || result == VK_INCOMPLETE) && pProperties) { for (uint32_t idx0 = 0; idx0 < *pPropertyCount; ++idx0) { - pProperties[idx0].displayProperties.display = layer_data->MaybeWrapDisplay(pProperties[idx0].displayProperties.display); + pProperties[idx0].displayProperties.display = MaybeWrapDisplay(pProperties[idx0].displayProperties.display); } } return result; } -VkResult DispatchGetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t *pPropertyCount, - VkDisplayPlanePropertiesKHR *pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); +VkResult DispatchObject::GetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t *pPropertyCount, + VkDisplayPlanePropertiesKHR *pProperties) { VkResult result = - layer_data->instance_dispatch_table.GetPhysicalDeviceDisplayPlanePropertiesKHR(physicalDevice, pPropertyCount, pProperties); + instance_dispatch_table.GetPhysicalDeviceDisplayPlanePropertiesKHR(physicalDevice, pPropertyCount, pProperties); if (!wrap_handles) return result; if ((result == VK_SUCCESS || result == VK_INCOMPLETE) && pProperties) { for (uint32_t idx0 = 0; idx0 < *pPropertyCount; ++idx0) { VkDisplayKHR &opt_display = pProperties[idx0].currentDisplay; - if (opt_display) opt_display = layer_data->MaybeWrapDisplay(opt_display); + if (opt_display) opt_display = MaybeWrapDisplay(opt_display); } } return result; } -VkResult DispatchGetPhysicalDeviceDisplayPlaneProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t *pPropertyCount, - VkDisplayPlaneProperties2KHR *pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - VkResult result = layer_data->instance_dispatch_table.GetPhysicalDeviceDisplayPlaneProperties2KHR(physicalDevice, - pPropertyCount, pProperties); +VkResult DispatchObject::GetPhysicalDeviceDisplayPlaneProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t *pPropertyCount, + VkDisplayPlaneProperties2KHR *pProperties) { + VkResult result = + instance_dispatch_table.GetPhysicalDeviceDisplayPlaneProperties2KHR(physicalDevice, pPropertyCount, pProperties); if (!wrap_handles) return result; if ((result == VK_SUCCESS || result == VK_INCOMPLETE) && pProperties) { for (uint32_t idx0 = 0; idx0 < *pPropertyCount; ++idx0) { VkDisplayKHR &opt_display = pProperties[idx0].displayPlaneProperties.currentDisplay; - if (opt_display) opt_display = layer_data->MaybeWrapDisplay(opt_display); + if (opt_display) opt_display = MaybeWrapDisplay(opt_display); } } return result; } -VkResult DispatchGetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t *pDisplayCount, - VkDisplayKHR *pDisplays) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - VkResult result = layer_data->instance_dispatch_table.GetDisplayPlaneSupportedDisplaysKHR(physicalDevice, planeIndex, - pDisplayCount, pDisplays); +VkResult DispatchObject::GetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, uint32_t planeIndex, + uint32_t *pDisplayCount, VkDisplayKHR *pDisplays) { + VkResult result = + instance_dispatch_table.GetDisplayPlaneSupportedDisplaysKHR(physicalDevice, planeIndex, pDisplayCount, pDisplays); if ((result == VK_SUCCESS || result == VK_INCOMPLETE) && pDisplays) { if (!wrap_handles) return result; for (uint32_t i = 0; i < *pDisplayCount; ++i) { - if (pDisplays[i]) pDisplays[i] = layer_data->MaybeWrapDisplay(pDisplays[i]); + if (pDisplays[i]) pDisplays[i] = MaybeWrapDisplay(pDisplays[i]); } } return result; } -VkResult DispatchGetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t *pPropertyCount, - VkDisplayModePropertiesKHR *pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); +VkResult DispatchObject::GetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, + uint32_t *pPropertyCount, VkDisplayModePropertiesKHR *pProperties) { if (!wrap_handles) - return layer_data->instance_dispatch_table.GetDisplayModePropertiesKHR(physicalDevice, display, pPropertyCount, - pProperties); - { display = layer_data->Unwrap(display); } + return instance_dispatch_table.GetDisplayModePropertiesKHR(physicalDevice, display, pPropertyCount, pProperties); + display = Unwrap(display); - VkResult result = - layer_data->instance_dispatch_table.GetDisplayModePropertiesKHR(physicalDevice, display, pPropertyCount, pProperties); + VkResult result = instance_dispatch_table.GetDisplayModePropertiesKHR(physicalDevice, display, pPropertyCount, pProperties); if ((result == VK_SUCCESS || result == VK_INCOMPLETE) && pProperties) { for (uint32_t idx0 = 0; idx0 < *pPropertyCount; ++idx0) { - pProperties[idx0].displayMode = layer_data->WrapNew(pProperties[idx0].displayMode); + pProperties[idx0].displayMode = WrapNew(pProperties[idx0].displayMode); } } return result; } -VkResult DispatchGetDisplayModeProperties2KHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t *pPropertyCount, - VkDisplayModeProperties2KHR *pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); +VkResult DispatchObject::GetDisplayModeProperties2KHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, + uint32_t *pPropertyCount, VkDisplayModeProperties2KHR *pProperties) { if (!wrap_handles) - return layer_data->instance_dispatch_table.GetDisplayModeProperties2KHR(physicalDevice, display, pPropertyCount, - pProperties); - { display = layer_data->Unwrap(display); } + return instance_dispatch_table.GetDisplayModeProperties2KHR(physicalDevice, display, pPropertyCount, pProperties); + display = Unwrap(display); - VkResult result = - layer_data->instance_dispatch_table.GetDisplayModeProperties2KHR(physicalDevice, display, pPropertyCount, pProperties); + VkResult result = instance_dispatch_table.GetDisplayModeProperties2KHR(physicalDevice, display, pPropertyCount, pProperties); if ((result == VK_SUCCESS || result == VK_INCOMPLETE) && pProperties) { for (uint32_t idx0 = 0; idx0 < *pPropertyCount; ++idx0) { - pProperties[idx0].displayModeProperties.displayMode = - layer_data->WrapNew(pProperties[idx0].displayModeProperties.displayMode); + pProperties[idx0].displayModeProperties.displayMode = WrapNew(pProperties[idx0].displayModeProperties.displayMode); } } return result; } -VkResult DispatchDebugMarkerSetObjectTagEXT(VkDevice device, const VkDebugMarkerObjectTagInfoEXT *pTagInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DebugMarkerSetObjectTagEXT(device, pTagInfo); +VkResult DispatchObject::DebugMarkerSetObjectTagEXT(VkDevice device, const VkDebugMarkerObjectTagInfoEXT *pTagInfo) { + if (!wrap_handles) return device_dispatch_table.DebugMarkerSetObjectTagEXT(device, pTagInfo); vku::safe_VkDebugMarkerObjectTagInfoEXT local_tag_info(pTagInfo); { auto it = unique_id_mapping.find(CastToUint64(local_tag_info.object)); @@ -958,14 +1048,13 @@ VkResult DispatchDebugMarkerSetObjectTagEXT(VkDevice device, const VkDebugMarker local_tag_info.object = it->second; } } - VkResult result = layer_data->device_dispatch_table.DebugMarkerSetObjectTagEXT( + VkResult result = device_dispatch_table.DebugMarkerSetObjectTagEXT( device, reinterpret_cast(&local_tag_info)); return result; } -VkResult DispatchDebugMarkerSetObjectNameEXT(VkDevice device, const VkDebugMarkerObjectNameInfoEXT *pNameInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DebugMarkerSetObjectNameEXT(device, pNameInfo); +VkResult DispatchObject::DebugMarkerSetObjectNameEXT(VkDevice device, const VkDebugMarkerObjectNameInfoEXT *pNameInfo) { + if (!wrap_handles) return device_dispatch_table.DebugMarkerSetObjectNameEXT(device, pNameInfo); vku::safe_VkDebugMarkerObjectNameInfoEXT local_name_info(pNameInfo); { auto it = unique_id_mapping.find(CastToUint64(local_name_info.object)); @@ -973,15 +1062,14 @@ VkResult DispatchDebugMarkerSetObjectNameEXT(VkDevice device, const VkDebugMarke local_name_info.object = it->second; } } - VkResult result = layer_data->device_dispatch_table.DebugMarkerSetObjectNameEXT( + VkResult result = device_dispatch_table.DebugMarkerSetObjectNameEXT( device, reinterpret_cast(&local_name_info)); return result; } // VK_EXT_debug_utils -VkResult DispatchSetDebugUtilsObjectTagEXT(VkDevice device, const VkDebugUtilsObjectTagInfoEXT *pTagInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.SetDebugUtilsObjectTagEXT(device, pTagInfo); +VkResult DispatchObject::SetDebugUtilsObjectTagEXT(VkDevice device, const VkDebugUtilsObjectTagInfoEXT *pTagInfo) { + if (!wrap_handles) return device_dispatch_table.SetDebugUtilsObjectTagEXT(device, pTagInfo); vku::safe_VkDebugUtilsObjectTagInfoEXT local_tag_info(pTagInfo); { auto it = unique_id_mapping.find(CastToUint64(local_tag_info.objectHandle)); @@ -989,14 +1077,13 @@ VkResult DispatchSetDebugUtilsObjectTagEXT(VkDevice device, const VkDebugUtilsOb local_tag_info.objectHandle = it->second; } } - VkResult result = layer_data->device_dispatch_table.SetDebugUtilsObjectTagEXT( + VkResult result = device_dispatch_table.SetDebugUtilsObjectTagEXT( device, reinterpret_cast(&local_tag_info)); return result; } -VkResult DispatchSetDebugUtilsObjectNameEXT(VkDevice device, const VkDebugUtilsObjectNameInfoEXT *pNameInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.SetDebugUtilsObjectNameEXT(device, pNameInfo); +VkResult DispatchObject::SetDebugUtilsObjectNameEXT(VkDevice device, const VkDebugUtilsObjectNameInfoEXT *pNameInfo) { + if (!wrap_handles) return device_dispatch_table.SetDebugUtilsObjectNameEXT(device, pNameInfo); vku::safe_VkDebugUtilsObjectNameInfoEXT local_name_info(pNameInfo); { auto it = unique_id_mapping.find(CastToUint64(local_name_info.objectHandle)); @@ -1004,68 +1091,72 @@ VkResult DispatchSetDebugUtilsObjectNameEXT(VkDevice device, const VkDebugUtilsO local_name_info.objectHandle = it->second; } } - VkResult result = layer_data->device_dispatch_table.SetDebugUtilsObjectNameEXT( + VkResult result = device_dispatch_table.SetDebugUtilsObjectNameEXT( device, reinterpret_cast(&local_name_info)); return result; } -VkResult DispatchGetPhysicalDeviceToolPropertiesEXT(VkPhysicalDevice physicalDevice, uint32_t *pToolCount, - VkPhysicalDeviceToolPropertiesEXT *pToolProperties) { +VkResult DispatchObject::GetPhysicalDeviceToolPropertiesEXT(VkPhysicalDevice physicalDevice, uint32_t *pToolCount, + VkPhysicalDeviceToolPropertiesEXT *pToolProperties) { VkResult result = VK_SUCCESS; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - if (layer_data->instance_dispatch_table.GetPhysicalDeviceToolPropertiesEXT == nullptr) { + if (instance_dispatch_table.GetPhysicalDeviceToolPropertiesEXT == nullptr) { // This layer is the terminator. Set pToolCount to zero. *pToolCount = 0; } else { - result = - layer_data->instance_dispatch_table.GetPhysicalDeviceToolPropertiesEXT(physicalDevice, pToolCount, pToolProperties); + result = instance_dispatch_table.GetPhysicalDeviceToolPropertiesEXT(physicalDevice, pToolCount, pToolProperties); } return result; } -VkResult DispatchGetPhysicalDeviceToolProperties(VkPhysicalDevice physicalDevice, uint32_t *pToolCount, - VkPhysicalDeviceToolProperties *pToolProperties) { +VkResult DispatchObject::GetPhysicalDeviceToolProperties(VkPhysicalDevice physicalDevice, uint32_t *pToolCount, + VkPhysicalDeviceToolProperties *pToolProperties) { VkResult result = VK_SUCCESS; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - if (layer_data->instance_dispatch_table.GetPhysicalDeviceToolProperties == nullptr) { + if (instance_dispatch_table.GetPhysicalDeviceToolProperties == nullptr) { // This layer is the terminator. Set pToolCount to zero. *pToolCount = 0; } else { - result = layer_data->instance_dispatch_table.GetPhysicalDeviceToolProperties(physicalDevice, pToolCount, pToolProperties); + result = instance_dispatch_table.GetPhysicalDeviceToolProperties(physicalDevice, pToolCount, pToolProperties); } return result; } -VkResult DispatchAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pAllocateInfo, - VkCommandBuffer *pCommandBuffers) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.AllocateCommandBuffers(device, pAllocateInfo, pCommandBuffers); +VkResult DispatchObject::AllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pAllocateInfo, + VkCommandBuffer *pCommandBuffers) { + if (!wrap_handles) return device_dispatch_table.AllocateCommandBuffers(device, pAllocateInfo, pCommandBuffers); vku::safe_VkCommandBufferAllocateInfo local_pAllocateInfo; if (pAllocateInfo) { local_pAllocateInfo.initialize(pAllocateInfo); if (pAllocateInfo->commandPool) { - local_pAllocateInfo.commandPool = layer_data->Unwrap(pAllocateInfo->commandPool); + local_pAllocateInfo.commandPool = Unwrap(pAllocateInfo->commandPool); } } - VkResult result = layer_data->device_dispatch_table.AllocateCommandBuffers( + VkResult result = device_dispatch_table.AllocateCommandBuffers( device, (const VkCommandBufferAllocateInfo *)&local_pAllocateInfo, pCommandBuffers); + if ((result == VK_SUCCESS) && pAllocateInfo && (pAllocateInfo->level == VK_COMMAND_BUFFER_LEVEL_SECONDARY)) { + auto lock = WriteLockGuard(secondary_cb_map_mutex); + for (uint32_t cb_index = 0; cb_index < pAllocateInfo->commandBufferCount; cb_index++) { + secondary_cb_map.emplace(pCommandBuffers[cb_index], pAllocateInfo->commandPool); + } + } return result; } -void DispatchFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, - const VkCommandBuffer *pCommandBuffers) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.FreeCommandBuffers(device, commandPool, commandBufferCount, pCommandBuffers); - commandPool = layer_data->Unwrap(commandPool); - layer_data->device_dispatch_table.FreeCommandBuffers(device, commandPool, commandBufferCount, pCommandBuffers); +void DispatchObject::FreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, + const VkCommandBuffer *pCommandBuffers) { + if (!wrap_handles) return device_dispatch_table.FreeCommandBuffers(device, commandPool, commandBufferCount, pCommandBuffers); + commandPool = Unwrap(commandPool); + device_dispatch_table.FreeCommandBuffers(device, commandPool, commandBufferCount, pCommandBuffers); + + auto lock = WriteLockGuard(secondary_cb_map_mutex); + for (uint32_t cb_index = 0; cb_index < commandBufferCount; cb_index++) { + secondary_cb_map.erase(pCommandBuffers[cb_index]); + } } -void DispatchDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks *pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyCommandPool(device, commandPool, pAllocator); +void DispatchObject::DestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks *pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyCommandPool(device, commandPool, pAllocator); uint64_t commandPool_id = CastToUint64(commandPool); auto iter = unique_id_mapping.pop(commandPool_id); if (iter != unique_id_mapping.end()) { @@ -1073,38 +1164,49 @@ void DispatchDestroyCommandPool(VkDevice device, VkCommandPool commandPool, cons } else { commandPool = (VkCommandPool)0; } - layer_data->device_dispatch_table.DestroyCommandPool(device, commandPool, pAllocator); + device_dispatch_table.DestroyCommandPool(device, commandPool, pAllocator); + + auto lock = WriteLockGuard(secondary_cb_map_mutex); + for (auto item = secondary_cb_map.begin(); item != secondary_cb_map.end();) { + if (item->second == commandPool) { + item = secondary_cb_map.erase(item); + } else { + ++item; + } + } +} + +bool DispatchObject::IsSecondary(VkCommandBuffer commandBuffer) const { + auto lock = ReadLockGuard(secondary_cb_map_mutex); + return secondary_cb_map.find(commandBuffer) != secondary_cb_map.end(); } -VkResult DispatchBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo *pBeginInfo, bool is_secondary) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles || !is_secondary) return layer_data->device_dispatch_table.BeginCommandBuffer(commandBuffer, pBeginInfo); +VkResult DispatchObject::BeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo *pBeginInfo) { + if (!wrap_handles || !IsSecondary(commandBuffer)) return device_dispatch_table.BeginCommandBuffer(commandBuffer, pBeginInfo); vku::safe_VkCommandBufferBeginInfo local_pBeginInfo; if (pBeginInfo) { local_pBeginInfo.initialize(pBeginInfo); if (local_pBeginInfo.pInheritanceInfo) { if (pBeginInfo->pInheritanceInfo->renderPass) { - local_pBeginInfo.pInheritanceInfo->renderPass = layer_data->Unwrap(pBeginInfo->pInheritanceInfo->renderPass); + local_pBeginInfo.pInheritanceInfo->renderPass = Unwrap(pBeginInfo->pInheritanceInfo->renderPass); } if (pBeginInfo->pInheritanceInfo->framebuffer) { - local_pBeginInfo.pInheritanceInfo->framebuffer = layer_data->Unwrap(pBeginInfo->pInheritanceInfo->framebuffer); + local_pBeginInfo.pInheritanceInfo->framebuffer = Unwrap(pBeginInfo->pInheritanceInfo->framebuffer); } } } - VkResult result = - layer_data->device_dispatch_table.BeginCommandBuffer(commandBuffer, (const VkCommandBufferBeginInfo *)&local_pBeginInfo); + VkResult result = device_dispatch_table.BeginCommandBuffer(commandBuffer, (const VkCommandBufferBeginInfo *)&local_pBeginInfo); return result; } -VkResult DispatchCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, - VkPipelineCache pipelineCache, uint32_t createInfoCount, - const VkRayTracingPipelineCreateInfoKHR *pCreateInfos, - const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); +VkResult DispatchObject::CreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoKHR *pCreateInfos, + const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) { vku::safe_VkRayTracingPipelineCreateInfoKHR *local_pCreateInfos = (vku::safe_VkRayTracingPipelineCreateInfoKHR *)(pCreateInfos); if (wrap_handles) { - deferredOperation = layer_data->Unwrap(deferredOperation); - pipelineCache = layer_data->Unwrap(pipelineCache); + deferredOperation = Unwrap(deferredOperation); + pipelineCache = Unwrap(pipelineCache); if (pCreateInfos) { local_pCreateInfos = new vku::safe_VkRayTracingPipelineCreateInfoKHR[createInfoCount]; for (uint32_t index0 = 0; index0 < createInfoCount; ++index0) { @@ -1112,8 +1214,7 @@ VkResult DispatchCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperati if (local_pCreateInfos[index0].pStages) { for (uint32_t index1 = 0; index1 < local_pCreateInfos[index0].stageCount; ++index1) { if (pCreateInfos[index0].pStages[index1].module) { - local_pCreateInfos[index0].pStages[index1].module = - layer_data->Unwrap(pCreateInfos[index0].pStages[index1].module); + local_pCreateInfos[index0].pStages[index1].module = Unwrap(pCreateInfos[index0].pStages[index1].module); } } } @@ -1121,22 +1222,22 @@ VkResult DispatchCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperati if (local_pCreateInfos[index0].pLibraryInfo->pLibraries) { for (uint32_t index2 = 0; index2 < local_pCreateInfos[index0].pLibraryInfo->libraryCount; ++index2) { local_pCreateInfos[index0].pLibraryInfo->pLibraries[index2] = - layer_data->Unwrap(local_pCreateInfos[index0].pLibraryInfo->pLibraries[index2]); + Unwrap(local_pCreateInfos[index0].pLibraryInfo->pLibraries[index2]); } } } if (pCreateInfos[index0].layout) { - local_pCreateInfos[index0].layout = layer_data->Unwrap(pCreateInfos[index0].layout); + local_pCreateInfos[index0].layout = Unwrap(pCreateInfos[index0].layout); } if (pCreateInfos[index0].basePipelineHandle) { - local_pCreateInfos[index0].basePipelineHandle = layer_data->Unwrap(pCreateInfos[index0].basePipelineHandle); + local_pCreateInfos[index0].basePipelineHandle = Unwrap(pCreateInfos[index0].basePipelineHandle); } auto *binary_info = vku::FindStructInPNextChain(local_pCreateInfos[index0].pNext); if (binary_info) { auto *unwrapped_binaries = const_cast(binary_info->pPipelineBinaries); for (uint32_t idx1 = 0; idx1 < binary_info->binaryCount; ++idx1) { - unwrapped_binaries[idx1] = layer_data->Unwrap(binary_info->pPipelineBinaries[idx1]); + unwrapped_binaries[idx1] = Unwrap(binary_info->pPipelineBinaries[idx1]); } } } @@ -1160,7 +1261,7 @@ VkResult DispatchCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperati returned_pipelines = unwrapped_pipelines->data(); } - VkResult result = layer_data->device_dispatch_table.CreateRayTracingPipelinesKHR( + VkResult result = device_dispatch_table.CreateRayTracingPipelinesKHR( device, deferredOperation, pipelineCache, createInfoCount, (const VkRayTracingPipelineCreateInfoKHR *)local_pCreateInfos, pAllocator, returned_pipelines); @@ -1174,7 +1275,7 @@ VkResult DispatchCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperati if (wrap_handles) { for (uint32_t i = 0; i < createInfoCount; i++) { if (pPipelines[i] != VK_NULL_HANDLE) { - pPipelines[i] = layer_data->WrapNew(pPipelines[i]); + pPipelines[i] = WrapNew(pPipelines[i]); } } @@ -1190,7 +1291,7 @@ VkResult DispatchCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperati const bool is_operation_deferred = (deferredOperation != VK_NULL_HANDLE) && (result == VK_OPERATION_DEFERRED_KHR); if (is_operation_deferred) { std::vector> post_completion_fns; - auto completion_find = layer_data->deferred_operation_post_completion.pop(deferredOperation); + auto completion_find = deferred_operation_post_completion.pop(deferredOperation); if (completion_find->first) { post_completion_fns = std::move(completion_find->second); } @@ -1201,21 +1302,21 @@ VkResult DispatchCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperati copied_wrapped_pipelines[i] = pPipelines[i]; } auto cleanup_fn = [local_pCreateInfos, captured_copied_wrapped_pipelines = std::move(copied_wrapped_pipelines), - deferredOperation, layer_data, unwrapped_pipelines]() { + deferredOperation, this, unwrapped_pipelines]() { (void)unwrapped_pipelines; if (local_pCreateInfos) { delete[] local_pCreateInfos; } - layer_data->deferred_operation_pipelines.insert(deferredOperation, std::move(captured_copied_wrapped_pipelines)); + deferred_operation_pipelines.insert(deferredOperation, std::move(captured_copied_wrapped_pipelines)); }; post_completion_fns.emplace_back(cleanup_fn); } else { - auto cleanup_fn = [deferredOperation, layer_data, unwrapped_pipelines]() { - layer_data->deferred_operation_pipelines.insert(deferredOperation, std::move(*unwrapped_pipelines)); + auto cleanup_fn = [deferredOperation, this, unwrapped_pipelines]() { + deferred_operation_pipelines.insert(deferredOperation, std::move(*unwrapped_pipelines)); }; post_completion_fns.emplace_back(cleanup_fn); } - layer_data->deferred_operation_post_completion.insert(deferredOperation, std::move(post_completion_fns)); + deferred_operation_post_completion.insert(deferredOperation, std::move(post_completion_fns)); } // If operation is deferred, local resources free is postponed @@ -1228,17 +1329,16 @@ VkResult DispatchCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperati return result; } -VkResult DispatchDeferredOperationJoinKHR(VkDevice device, VkDeferredOperationKHR operation) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); +VkResult DispatchObject::DeferredOperationJoinKHR(VkDevice device, VkDeferredOperationKHR operation) { if (wrap_handles) { - operation = layer_data->Unwrap(operation); + operation = Unwrap(operation); } - VkResult result = layer_data->device_dispatch_table.DeferredOperationJoinKHR(device, operation); + VkResult result = device_dispatch_table.DeferredOperationJoinKHR(device, operation); // If this thread completed the operation, free any retained memory. if (result == VK_SUCCESS) { - auto post_op_completion_fns = layer_data->deferred_operation_post_completion.pop(operation); - if (post_op_completion_fns != layer_data->deferred_operation_post_completion.end()) { + auto post_op_completion_fns = deferred_operation_post_completion.pop(operation); + if (post_op_completion_fns != deferred_operation_post_completion.end()) { for (auto &post_op_completion_fn : post_op_completion_fns->second) { post_op_completion_fn(); } @@ -1248,26 +1348,25 @@ VkResult DispatchDeferredOperationJoinKHR(VkDevice device, VkDeferredOperationKH return result; } -VkResult DispatchGetDeferredOperationResultKHR(VkDevice device, VkDeferredOperationKHR operation) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); +VkResult DispatchObject::GetDeferredOperationResultKHR(VkDevice device, VkDeferredOperationKHR operation) { if (wrap_handles) { - operation = layer_data->Unwrap(operation); + operation = Unwrap(operation); } - VkResult result = layer_data->device_dispatch_table.GetDeferredOperationResultKHR(device, operation); + VkResult result = device_dispatch_table.GetDeferredOperationResultKHR(device, operation); // Add created pipelines if successful if (result == VK_SUCCESS) { // Perfectly valid to never call vkDeferredOperationJoin before getting the result, // so we need to make sure functions associated to the current operation and // stored in deferred_operation_post_completion have been called - auto post_op_completion_fns = layer_data->deferred_operation_post_completion.pop(operation); - if (post_op_completion_fns != layer_data->deferred_operation_post_completion.end()) { + auto post_op_completion_fns = deferred_operation_post_completion.pop(operation); + if (post_op_completion_fns != deferred_operation_post_completion.end()) { for (auto &post_op__completion_fn : post_op_completion_fns->second) { post_op__completion_fn(); } } - auto post_check_fns = layer_data->deferred_operation_post_check.pop(operation); - auto pipelines_to_updates = layer_data->deferred_operation_pipelines.pop(operation); + auto post_check_fns = deferred_operation_post_check.pop(operation); + auto pipelines_to_updates = deferred_operation_pipelines.pop(operation); if (post_check_fns->first && pipelines_to_updates->first) { for (auto &post_check_fn : post_check_fns->second) { post_check_fn(pipelines_to_updates->second); @@ -1278,13 +1377,11 @@ VkResult DispatchGetDeferredOperationResultKHR(VkDevice device, VkDeferredOperat return result; } -void DispatchCmdBuildAccelerationStructuresKHR(VkCommandBuffer commandBuffer, uint32_t infoCount, - const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, - const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); +void DispatchObject::CmdBuildAccelerationStructuresKHR(VkCommandBuffer commandBuffer, uint32_t infoCount, + const VkAccelerationStructureBuildGeometryInfoKHR *pInfos, + const VkAccelerationStructureBuildRangeInfoKHR *const *ppBuildRangeInfos) { if (!wrap_handles) - return layer_data->device_dispatch_table.CmdBuildAccelerationStructuresKHR(commandBuffer, infoCount, pInfos, - ppBuildRangeInfos); + return device_dispatch_table.CmdBuildAccelerationStructuresKHR(commandBuffer, infoCount, pInfos, ppBuildRangeInfos); vku::safe_VkAccelerationStructureBuildGeometryInfoKHR* local_pInfos = nullptr; { if (pInfos) { @@ -1293,10 +1390,10 @@ void DispatchCmdBuildAccelerationStructuresKHR(VkCommandBuffer commandBuffer, ui local_pInfos[index0].initialize(&pInfos[index0], false, nullptr); if (pInfos[index0].srcAccelerationStructure) { - local_pInfos[index0].srcAccelerationStructure = layer_data->Unwrap(pInfos[index0].srcAccelerationStructure); + local_pInfos[index0].srcAccelerationStructure = Unwrap(pInfos[index0].srcAccelerationStructure); } if (pInfos[index0].dstAccelerationStructure) { - local_pInfos[index0].dstAccelerationStructure = layer_data->Unwrap(pInfos[index0].dstAccelerationStructure); + local_pInfos[index0].dstAccelerationStructure = Unwrap(pInfos[index0].dstAccelerationStructure); } for (uint32_t geometry_index = 0; geometry_index < local_pInfos[index0].geometryCount; ++geometry_index) { vku::safe_VkAccelerationStructureGeometryKHR& geometry_info = @@ -1304,45 +1401,45 @@ void DispatchCmdBuildAccelerationStructuresKHR(VkCommandBuffer commandBuffer, ui : *(local_pInfos[index0].ppGeometries[geometry_index]); if (geometry_info.geometryType == VK_GEOMETRY_TYPE_TRIANGLES_KHR) { - UnwrapPnextChainHandles(layer_data, geometry_info.geometry.triangles.pNext); + UnwrapPnextChainHandles(geometry_info.geometry.triangles.pNext); } } } } } - layer_data->device_dispatch_table.CmdBuildAccelerationStructuresKHR( - commandBuffer, infoCount, (const VkAccelerationStructureBuildGeometryInfoKHR*)local_pInfos, ppBuildRangeInfos); + device_dispatch_table.CmdBuildAccelerationStructuresKHR( + commandBuffer, infoCount, (const VkAccelerationStructureBuildGeometryInfoKHR *)local_pInfos, ppBuildRangeInfos); if (local_pInfos) { delete[] local_pInfos; } } -VkResult DispatchBuildAccelerationStructuresKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, - const VkAccelerationStructureBuildGeometryInfoKHR *pInfos, - const VkAccelerationStructureBuildRangeInfoKHR *const *ppBuildRangeInfos) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); +VkResult DispatchObject::BuildAccelerationStructuresKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + uint32_t infoCount, + const VkAccelerationStructureBuildGeometryInfoKHR *pInfos, + const VkAccelerationStructureBuildRangeInfoKHR *const *ppBuildRangeInfos) { if (!wrap_handles) - return layer_data->device_dispatch_table.BuildAccelerationStructuresKHR(device, deferredOperation, infoCount, pInfos, - ppBuildRangeInfos); + return device_dispatch_table.BuildAccelerationStructuresKHR(device, deferredOperation, infoCount, pInfos, + ppBuildRangeInfos); vku::safe_VkAccelerationStructureBuildGeometryInfoKHR *local_pInfos = nullptr; { - deferredOperation = layer_data->Unwrap(deferredOperation); + deferredOperation = Unwrap(deferredOperation); if (pInfos) { local_pInfos = new vku::safe_VkAccelerationStructureBuildGeometryInfoKHR[infoCount]; for (uint32_t index0 = 0; index0 < infoCount; ++index0) { local_pInfos[index0].initialize(&pInfos[index0], true, ppBuildRangeInfos[index0]); if (pInfos[index0].srcAccelerationStructure) { - local_pInfos[index0].srcAccelerationStructure = layer_data->Unwrap(pInfos[index0].srcAccelerationStructure); + local_pInfos[index0].srcAccelerationStructure = Unwrap(pInfos[index0].srcAccelerationStructure); } if (pInfos[index0].dstAccelerationStructure) { - local_pInfos[index0].dstAccelerationStructure = layer_data->Unwrap(pInfos[index0].dstAccelerationStructure); + local_pInfos[index0].dstAccelerationStructure = Unwrap(pInfos[index0].dstAccelerationStructure); } for (uint32_t geometry_index = 0; geometry_index < local_pInfos[index0].geometryCount; ++geometry_index) { vku::safe_VkAccelerationStructureGeometryKHR &geometry_info = local_pInfos[index0].pGeometries != nullptr ? local_pInfos[index0].pGeometries[geometry_index] : *(local_pInfos[index0].ppGeometries[geometry_index]); if (geometry_info.geometryType == VK_GEOMETRY_TYPE_TRIANGLES_KHR) { - UnwrapPnextChainHandles(layer_data, geometry_info.geometry.triangles.pNext); + UnwrapPnextChainHandles(geometry_info.geometry.triangles.pNext); } if (geometry_info.geometryType == VK_GEOMETRY_TYPE_INSTANCES_KHR) { if (geometry_info.geometry.instances.arrayOfPointers) { @@ -1354,7 +1451,7 @@ VkResult DispatchBuildAccelerationStructuresKHR(VkDevice device, VkDeferredOpera for (uint32_t instance_index = 0; instance_index < ppBuildRangeInfos[index0][geometry_index].primitiveCount; ++instance_index) { instances[instance_index]->accelerationStructureReference = - layer_data->Unwrap(instances[instance_index]->accelerationStructureReference); + Unwrap(instances[instance_index]->accelerationStructureReference); } } else { const uint8_t *byte_ptr = @@ -1365,7 +1462,7 @@ VkResult DispatchBuildAccelerationStructuresKHR(VkDevice device, VkDeferredOpera for (uint32_t instance_index = 0; instance_index < ppBuildRangeInfos[index0][geometry_index].primitiveCount; ++instance_index) { instances[instance_index].accelerationStructureReference = - layer_data->Unwrap(instances[instance_index].accelerationStructureReference); + Unwrap(instances[instance_index].accelerationStructureReference); } } } @@ -1373,7 +1470,7 @@ VkResult DispatchBuildAccelerationStructuresKHR(VkDevice device, VkDeferredOpera } } } - VkResult result = layer_data->device_dispatch_table.BuildAccelerationStructuresKHR( + VkResult result = device_dispatch_table.BuildAccelerationStructuresKHR( device, deferredOperation, infoCount, (const VkAccelerationStructureBuildGeometryInfoKHR *)local_pInfos, ppBuildRangeInfos); if (local_pInfos) { // Fix check for deferred ray tracing pipeline creation @@ -1381,7 +1478,7 @@ VkResult DispatchBuildAccelerationStructuresKHR(VkDevice device, VkDeferredOpera const bool is_operation_deferred = (deferredOperation != VK_NULL_HANDLE) && (result == VK_OPERATION_DEFERRED_KHR); if (is_operation_deferred) { std::vector> cleanup{[local_pInfos]() { delete[] local_pInfos; }}; - layer_data->deferred_operation_post_completion.insert(deferredOperation, cleanup); + deferred_operation_post_completion.insert(deferredOperation, cleanup); } else { delete[] local_pInfos; } @@ -1389,41 +1486,40 @@ VkResult DispatchBuildAccelerationStructuresKHR(VkDevice device, VkDeferredOpera return result; } -void DispatchGetAccelerationStructureBuildSizesKHR(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, - const VkAccelerationStructureBuildGeometryInfoKHR *pBuildInfo, - const uint32_t *pMaxPrimitiveCounts, - VkAccelerationStructureBuildSizesInfoKHR *pSizeInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); +void DispatchObject::GetAccelerationStructureBuildSizesKHR(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, + const VkAccelerationStructureBuildGeometryInfoKHR *pBuildInfo, + const uint32_t *pMaxPrimitiveCounts, + VkAccelerationStructureBuildSizesInfoKHR *pSizeInfo) { if (!wrap_handles) - return layer_data->device_dispatch_table.GetAccelerationStructureBuildSizesKHR(device, buildType, pBuildInfo, - pMaxPrimitiveCounts, pSizeInfo); + return device_dispatch_table.GetAccelerationStructureBuildSizesKHR(device, buildType, pBuildInfo, pMaxPrimitiveCounts, + pSizeInfo); vku::safe_VkAccelerationStructureBuildGeometryInfoKHR local_pBuildInfo; { if (pBuildInfo) { local_pBuildInfo.initialize(pBuildInfo, false, nullptr); if (pBuildInfo->srcAccelerationStructure) { - local_pBuildInfo.srcAccelerationStructure = layer_data->Unwrap(pBuildInfo->srcAccelerationStructure); + local_pBuildInfo.srcAccelerationStructure = Unwrap(pBuildInfo->srcAccelerationStructure); } if (pBuildInfo->dstAccelerationStructure) { - local_pBuildInfo.dstAccelerationStructure = layer_data->Unwrap(pBuildInfo->dstAccelerationStructure); + local_pBuildInfo.dstAccelerationStructure = Unwrap(pBuildInfo->dstAccelerationStructure); } for (uint32_t geometry_index = 0; geometry_index < local_pBuildInfo.geometryCount; ++geometry_index) { vku::safe_VkAccelerationStructureGeometryKHR &geometry_info = local_pBuildInfo.pGeometries != nullptr ? local_pBuildInfo.pGeometries[geometry_index] : *(local_pBuildInfo.ppGeometries[geometry_index]); if (geometry_info.geometryType == VK_GEOMETRY_TYPE_TRIANGLES_KHR) { - UnwrapPnextChainHandles(layer_data, geometry_info.geometry.triangles.pNext); + UnwrapPnextChainHandles(geometry_info.geometry.triangles.pNext); } } } } - layer_data->device_dispatch_table.GetAccelerationStructureBuildSizesKHR( + device_dispatch_table.GetAccelerationStructureBuildSizesKHR( device, buildType, (const VkAccelerationStructureBuildGeometryInfoKHR *)&local_pBuildInfo, pMaxPrimitiveCounts, pSizeInfo); } -void DispatchGetDescriptorEXT(VkDevice device, const VkDescriptorGetInfoEXT *pDescriptorInfo, size_t dataSize, void *pDescriptor) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetDescriptorEXT(device, pDescriptorInfo, dataSize, pDescriptor); +void DispatchObject::GetDescriptorEXT(VkDevice device, const VkDescriptorGetInfoEXT *pDescriptorInfo, size_t dataSize, + void *pDescriptor) { + if (!wrap_handles) return device_dispatch_table.GetDescriptorEXT(device, pDescriptorInfo, dataSize, pDescriptor); // When using a union of pointer we still need to unwrap the handles, but since it is a pointer, we can just use the pointer // from the incoming parameter instead of using safe structs as it is less complex doing it here vku::safe_VkDescriptorGetInfoEXT local_pDescriptorInfo; @@ -1443,15 +1539,15 @@ void DispatchGetDescriptorEXT(VkDevice device, const VkDescriptorGetInfoEXT *pDe case VK_DESCRIPTOR_TYPE_SAMPLER: { // if using null descriptors can be null if (pDescriptorInfo->data.pSampler) { - sampler = layer_data->Unwrap(*pDescriptorInfo->data.pSampler); + sampler = Unwrap(*pDescriptorInfo->data.pSampler); local_pDescriptorInfo.data.pSampler = &sampler; } break; } case VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER: { if (pDescriptorInfo->data.pCombinedImageSampler) { - image_info.sampler = layer_data->Unwrap(pDescriptorInfo->data.pCombinedImageSampler->sampler); - image_info.imageView = layer_data->Unwrap(pDescriptorInfo->data.pCombinedImageSampler->imageView); + image_info.sampler = Unwrap(pDescriptorInfo->data.pCombinedImageSampler->sampler); + image_info.imageView = Unwrap(pDescriptorInfo->data.pCombinedImageSampler->imageView); image_info.imageLayout = pDescriptorInfo->data.pCombinedImageSampler->imageLayout; local_pDescriptorInfo.data.pCombinedImageSampler = &image_info; } @@ -1459,8 +1555,8 @@ void DispatchGetDescriptorEXT(VkDevice device, const VkDescriptorGetInfoEXT *pDe } case VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE: { if (pDescriptorInfo->data.pSampledImage) { - image_info.sampler = layer_data->Unwrap(pDescriptorInfo->data.pSampledImage->sampler); - image_info.imageView = layer_data->Unwrap(pDescriptorInfo->data.pSampledImage->imageView); + image_info.sampler = Unwrap(pDescriptorInfo->data.pSampledImage->sampler); + image_info.imageView = Unwrap(pDescriptorInfo->data.pSampledImage->imageView); image_info.imageLayout = pDescriptorInfo->data.pSampledImage->imageLayout; local_pDescriptorInfo.data.pSampledImage = &image_info; } @@ -1468,8 +1564,8 @@ void DispatchGetDescriptorEXT(VkDevice device, const VkDescriptorGetInfoEXT *pDe } case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE: { if (pDescriptorInfo->data.pStorageImage) { - image_info.sampler = layer_data->Unwrap(pDescriptorInfo->data.pStorageImage->sampler); - image_info.imageView = layer_data->Unwrap(pDescriptorInfo->data.pStorageImage->imageView); + image_info.sampler = Unwrap(pDescriptorInfo->data.pStorageImage->sampler); + image_info.imageView = Unwrap(pDescriptorInfo->data.pStorageImage->imageView); image_info.imageLayout = pDescriptorInfo->data.pStorageImage->imageLayout; local_pDescriptorInfo.data.pStorageImage = &image_info; } @@ -1477,8 +1573,8 @@ void DispatchGetDescriptorEXT(VkDevice device, const VkDescriptorGetInfoEXT *pDe } case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT: { if (pDescriptorInfo->data.pInputAttachmentImage) { - image_info.sampler = layer_data->Unwrap(pDescriptorInfo->data.pInputAttachmentImage->sampler); - image_info.imageView = layer_data->Unwrap(pDescriptorInfo->data.pInputAttachmentImage->imageView); + image_info.sampler = Unwrap(pDescriptorInfo->data.pInputAttachmentImage->sampler); + image_info.imageView = Unwrap(pDescriptorInfo->data.pInputAttachmentImage->imageView); image_info.imageLayout = pDescriptorInfo->data.pInputAttachmentImage->imageLayout; local_pDescriptorInfo.data.pInputAttachmentImage = &image_info; } @@ -1516,39 +1612,37 @@ void DispatchGetDescriptorEXT(VkDevice device, const VkDescriptorGetInfoEXT *pDe break; } - layer_data->device_dispatch_table.GetDescriptorEXT(device, (const VkDescriptorGetInfoEXT *)&local_pDescriptorInfo, dataSize, - pDescriptor); + device_dispatch_table.GetDescriptorEXT(device, (const VkDescriptorGetInfoEXT *)&local_pDescriptorInfo, dataSize, pDescriptor); } -VkResult DispatchCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, - const VkComputePipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, - VkPipeline *pPipelines) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); +VkResult DispatchObject::CreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkComputePipelineCreateInfo *pCreateInfos, + const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) { if (!wrap_handles) - return layer_data->device_dispatch_table.CreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, - pAllocator, pPipelines); + return device_dispatch_table.CreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, + pPipelines); vku::safe_VkComputePipelineCreateInfo *local_pCreateInfos = nullptr; { - pipelineCache = layer_data->Unwrap(pipelineCache); + pipelineCache = Unwrap(pipelineCache); if (pCreateInfos) { local_pCreateInfos = new vku::safe_VkComputePipelineCreateInfo[createInfoCount]; for (uint32_t index0 = 0; index0 < createInfoCount; ++index0) { local_pCreateInfos[index0].initialize(&pCreateInfos[index0]); - UnwrapPnextChainHandles(layer_data, local_pCreateInfos[index0].pNext); + UnwrapPnextChainHandles(local_pCreateInfos[index0].pNext); if (pCreateInfos[index0].stage.module) { - local_pCreateInfos[index0].stage.module = layer_data->Unwrap(pCreateInfos[index0].stage.module); + local_pCreateInfos[index0].stage.module = Unwrap(pCreateInfos[index0].stage.module); } - UnwrapPnextChainHandles(layer_data, local_pCreateInfos[index0].stage.pNext); + UnwrapPnextChainHandles(local_pCreateInfos[index0].stage.pNext); if (pCreateInfos[index0].layout) { - local_pCreateInfos[index0].layout = layer_data->Unwrap(pCreateInfos[index0].layout); + local_pCreateInfos[index0].layout = Unwrap(pCreateInfos[index0].layout); } if (pCreateInfos[index0].basePipelineHandle) { - local_pCreateInfos[index0].basePipelineHandle = layer_data->Unwrap(pCreateInfos[index0].basePipelineHandle); + local_pCreateInfos[index0].basePipelineHandle = Unwrap(pCreateInfos[index0].basePipelineHandle); } } } } - VkResult result = layer_data->device_dispatch_table.CreateComputePipelines( + VkResult result = device_dispatch_table.CreateComputePipelines( device, pipelineCache, createInfoCount, (const VkComputePipelineCreateInfo *)local_pCreateInfos, pAllocator, pPipelines); for (uint32_t i = 0; i < createInfoCount; ++i) { if (pCreateInfos[i].pNext != VK_NULL_HANDLE) { @@ -1562,23 +1656,22 @@ VkResult DispatchCreateComputePipelines(VkDevice device, VkPipelineCache pipelin { for (uint32_t index0 = 0; index0 < createInfoCount; index0++) { if (pPipelines[index0] != VK_NULL_HANDLE) { - pPipelines[index0] = layer_data->WrapNew(pPipelines[index0]); + pPipelines[index0] = WrapNew(pPipelines[index0]); } } } return result; } -VkResult DispatchCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, - const VkRayTracingPipelineCreateInfoNV *pCreateInfos, - const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); +VkResult DispatchObject::CreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoNV *pCreateInfos, + const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) { if (!wrap_handles) - return layer_data->device_dispatch_table.CreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, - pAllocator, pPipelines); + return device_dispatch_table.CreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, + pPipelines); vku::safe_VkRayTracingPipelineCreateInfoNV *local_pCreateInfos = nullptr; { - pipelineCache = layer_data->Unwrap(pipelineCache); + pipelineCache = Unwrap(pipelineCache); if (pCreateInfos) { local_pCreateInfos = new vku::safe_VkRayTracingPipelineCreateInfoNV[createInfoCount]; for (uint32_t index0 = 0; index0 < createInfoCount; ++index0) { @@ -1586,29 +1679,28 @@ VkResult DispatchCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pi if (local_pCreateInfos[index0].pStages) { for (uint32_t index1 = 0; index1 < local_pCreateInfos[index0].stageCount; ++index1) { if (pCreateInfos[index0].pStages[index1].module) { - local_pCreateInfos[index0].pStages[index1].module = - layer_data->Unwrap(pCreateInfos[index0].pStages[index1].module); + local_pCreateInfos[index0].pStages[index1].module = Unwrap(pCreateInfos[index0].pStages[index1].module); } } } if (pCreateInfos[index0].layout) { - local_pCreateInfos[index0].layout = layer_data->Unwrap(pCreateInfos[index0].layout); + local_pCreateInfos[index0].layout = Unwrap(pCreateInfos[index0].layout); } if (pCreateInfos[index0].basePipelineHandle) { - local_pCreateInfos[index0].basePipelineHandle = layer_data->Unwrap(pCreateInfos[index0].basePipelineHandle); + local_pCreateInfos[index0].basePipelineHandle = Unwrap(pCreateInfos[index0].basePipelineHandle); } auto *binary_info = vku::FindStructInPNextChain(local_pCreateInfos[index0].pNext); if (binary_info) { auto *unwrapped_binaries = const_cast(binary_info->pPipelineBinaries); for (uint32_t idx1 = 0; idx1 < binary_info->binaryCount; ++idx1) { - unwrapped_binaries[idx1] = layer_data->Unwrap(binary_info->pPipelineBinaries[idx1]); + unwrapped_binaries[idx1] = Unwrap(binary_info->pPipelineBinaries[idx1]); } } } } } - VkResult result = layer_data->device_dispatch_table.CreateRayTracingPipelinesNV( + VkResult result = device_dispatch_table.CreateRayTracingPipelinesNV( device, pipelineCache, createInfoCount, (const VkRayTracingPipelineCreateInfoNV *)local_pCreateInfos, pAllocator, pPipelines); for (uint32_t i = 0; i < createInfoCount; ++i) { @@ -1623,27 +1715,25 @@ VkResult DispatchCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pi { for (uint32_t index0 = 0; index0 < createInfoCount; index0++) { if (pPipelines[index0] != VK_NULL_HANDLE) { - pPipelines[index0] = layer_data->WrapNew(pPipelines[index0]); + pPipelines[index0] = WrapNew(pPipelines[index0]); } } } return result; } -VkResult DispatchReleasePerformanceConfigurationINTEL(VkDevice device, VkPerformanceConfigurationINTEL configuration) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.ReleasePerformanceConfigurationINTEL(device, configuration); - { configuration = layer_data->Unwrap(configuration); } - VkResult result = layer_data->device_dispatch_table.ReleasePerformanceConfigurationINTEL(device, configuration); +VkResult DispatchObject::ReleasePerformanceConfigurationINTEL(VkDevice device, VkPerformanceConfigurationINTEL configuration) { + if (!wrap_handles) return device_dispatch_table.ReleasePerformanceConfigurationINTEL(device, configuration); + { configuration = Unwrap(configuration); } + VkResult result = device_dispatch_table.ReleasePerformanceConfigurationINTEL(device, configuration); return result; } -VkResult DispatchCreatePipelineBinariesKHR(VkDevice device, const VkPipelineBinaryCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkPipelineBinaryHandlesInfoKHR* pBinaries) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CreatePipelineBinariesKHR(device, pCreateInfo, pAllocator, pBinaries); +VkResult DispatchObject::CreatePipelineBinariesKHR(VkDevice device, const VkPipelineBinaryCreateInfoKHR *pCreateInfo, + const VkAllocationCallbacks *pAllocator, + VkPipelineBinaryHandlesInfoKHR *pBinaries) { + if (!wrap_handles) return device_dispatch_table.CreatePipelineBinariesKHR(device, pCreateInfo, pAllocator, pBinaries); vku::safe_VkPipelineBinaryCreateInfoKHR var_local_pCreateInfo; vku::safe_VkPipelineBinaryCreateInfoKHR* local_pCreateInfo = nullptr; const uint32_t array_size = pBinaries->pipelineBinaryCount; @@ -1653,21 +1743,21 @@ VkResult DispatchCreatePipelineBinariesKHR(VkDevice device, const VkPipelineBina local_pCreateInfo->initialize(pCreateInfo); if (pCreateInfo->pipeline) { - local_pCreateInfo->pipeline = layer_data->Unwrap(pCreateInfo->pipeline); + local_pCreateInfo->pipeline = Unwrap(pCreateInfo->pipeline); } if (local_pCreateInfo->pPipelineCreateInfo) { - UnwrapPnextChainHandles(layer_data, local_pCreateInfo->pPipelineCreateInfo->pNext); + UnwrapPnextChainHandles(local_pCreateInfo->pPipelineCreateInfo->pNext); } } } - VkResult result = layer_data->device_dispatch_table.CreatePipelineBinariesKHR( + VkResult result = device_dispatch_table.CreatePipelineBinariesKHR( device, (const VkPipelineBinaryCreateInfoKHR *)local_pCreateInfo, pAllocator, (VkPipelineBinaryHandlesInfoKHR *)pBinaries); if (pBinaries->pPipelineBinaries) { for (uint32_t index0 = 0; index0 < array_size; index0++) { if (pBinaries->pPipelineBinaries[index0] != VK_NULL_HANDLE) { - pBinaries->pPipelineBinaries[index0] = layer_data->WrapNew(pBinaries->pPipelineBinaries[index0]); + pBinaries->pPipelineBinaries[index0] = WrapNew(pBinaries->pPipelineBinaries[index0]); } } } @@ -1675,31 +1765,28 @@ VkResult DispatchCreatePipelineBinariesKHR(VkDevice device, const VkPipelineBina return result; } -VkResult DispatchGetPipelineKeyKHR(VkDevice device, const VkPipelineCreateInfoKHR *pPipelineCreateInfo, - VkPipelineBinaryKeyKHR *pPipelineKey) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetPipelineKeyKHR(device, pPipelineCreateInfo, pPipelineKey); +VkResult DispatchObject::GetPipelineKeyKHR(VkDevice device, const VkPipelineCreateInfoKHR *pPipelineCreateInfo, + VkPipelineBinaryKeyKHR *pPipelineKey) { + if (!wrap_handles) return device_dispatch_table.GetPipelineKeyKHR(device, pPipelineCreateInfo, pPipelineKey); vku::safe_VkPipelineCreateInfoKHR var_local_pPipelineCreateInfo; vku::safe_VkPipelineCreateInfoKHR *local_pPipelineCreateInfo = nullptr; { if (pPipelineCreateInfo) { local_pPipelineCreateInfo = &var_local_pPipelineCreateInfo; local_pPipelineCreateInfo->initialize(pPipelineCreateInfo); - UnwrapPnextChainHandles(layer_data, local_pPipelineCreateInfo->pNext); + UnwrapPnextChainHandles(local_pPipelineCreateInfo->pNext); } } - VkResult result = layer_data->device_dispatch_table.GetPipelineKeyKHR( - device, (const VkPipelineCreateInfoKHR *)local_pPipelineCreateInfo, pPipelineKey); + VkResult result = + device_dispatch_table.GetPipelineKeyKHR(device, (const VkPipelineCreateInfoKHR *)local_pPipelineCreateInfo, pPipelineKey); return result; } -VkResult DispatchCreateIndirectExecutionSetEXT(VkDevice device, const VkIndirectExecutionSetCreateInfoEXT *pCreateInfo, - const VkAllocationCallbacks *pAllocator, - VkIndirectExecutionSetEXT *pIndirectExecutionSet) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); +VkResult DispatchObject::CreateIndirectExecutionSetEXT(VkDevice device, const VkIndirectExecutionSetCreateInfoEXT *pCreateInfo, + const VkAllocationCallbacks *pAllocator, + VkIndirectExecutionSetEXT *pIndirectExecutionSet) { if (!wrap_handles) - return layer_data->device_dispatch_table.CreateIndirectExecutionSetEXT(device, pCreateInfo, pAllocator, - pIndirectExecutionSet); + return device_dispatch_table.CreateIndirectExecutionSetEXT(device, pCreateInfo, pAllocator, pIndirectExecutionSet); // When using a union of pointer we still need to unwrap the handles, but since it is a pointer, we can just use the pointer // from the incoming parameter instead of using safe structs as it is less complex doing it here @@ -1716,7 +1803,7 @@ VkResult DispatchCreateIndirectExecutionSetEXT(VkDevice device, const VkIndirect case VK_INDIRECT_EXECUTION_SET_INFO_TYPE_PIPELINES_EXT: if (pCreateInfo->info.pPipelineInfo) { pipeline_info.initialize(pCreateInfo->info.pPipelineInfo); - pipeline_info.initialPipeline = layer_data->Unwrap(pCreateInfo->info.pPipelineInfo->initialPipeline); + pipeline_info.initialPipeline = Unwrap(pCreateInfo->info.pPipelineInfo->initialPipeline); local_pCreateInfo.info.pPipelineInfo = pipeline_info.ptr(); } break; @@ -1728,12 +1815,10 @@ VkResult DispatchCreateIndirectExecutionSetEXT(VkDevice device, const VkIndirect const auto &set_layout = local_pCreateInfo.info.pShaderInfo->pSetLayoutInfos[index0]; if (set_layout.pSetLayouts) { for (uint32_t index1 = 0; index1 < set_layout.setLayoutCount; ++index1) { - shader_info.pSetLayoutInfos[index0].pSetLayouts[index1] = - layer_data->Unwrap(set_layout.pSetLayouts[index1]); + shader_info.pSetLayoutInfos[index0].pSetLayouts[index1] = Unwrap(set_layout.pSetLayouts[index1]); } } - shader_info.pInitialShaders[index0] = - layer_data->Unwrap(local_pCreateInfo.info.pShaderInfo->pInitialShaders[index0]); + shader_info.pInitialShaders[index0] = Unwrap(local_pCreateInfo.info.pShaderInfo->pInitialShaders[index0]); } local_pCreateInfo.info.pShaderInfo = shader_info.ptr(); @@ -1744,10 +1829,10 @@ VkResult DispatchCreateIndirectExecutionSetEXT(VkDevice device, const VkIndirect } } - VkResult result = layer_data->device_dispatch_table.CreateIndirectExecutionSetEXT( + VkResult result = device_dispatch_table.CreateIndirectExecutionSetEXT( device, (const VkIndirectExecutionSetCreateInfoEXT *)&local_pCreateInfo, pAllocator, pIndirectExecutionSet); if (VK_SUCCESS == result) { - *pIndirectExecutionSet = layer_data->WrapNew(*pIndirectExecutionSet); + *pIndirectExecutionSet = WrapNew(*pIndirectExecutionSet); } return result; } diff --git a/layers/chassis/validation_object.h b/layers/chassis/validation_object.h new file mode 100644 index 00000000000..5895c9e349d --- /dev/null +++ b/layers/chassis/validation_object.h @@ -0,0 +1,416 @@ +/*************************************************************************** + * + * Copyright (c) 2015-2024 The Khronos Group Inc. + * Copyright (c) 2015-2024 Valve Corporation + * Copyright (c) 2015-2024 LunarG, Inc. + * Copyright (c) 2015-2024 Google Inc. + * Copyright (c) 2023-2024 RasterGrid Kft. + * + * 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 +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include "utils/cast_utils.h" +#include "layer_options.h" +#include "containers/custom_containers.h" +#include "error_message/logging.h" +#include "error_message/error_location.h" +#include "error_message/record_object.h" +#include "error_message/log_message_type.h" +#include "utils/vk_layer_extension_utils.h" +#include "utils/vk_layer_utils.h" +#include "generated/vk_dispatch_table_helper.h" +#include "chassis/dispatch_object.h" +#include "generated/vk_extension_helper.h" +#include "gpu/core/gpuav_settings.h" +#include "sync/sync_settings.h" + +namespace chassis { +struct CreateGraphicsPipelines; +struct CreateComputePipelines; +struct CreateRayTracingPipelinesNV; +struct CreateRayTracingPipelinesKHR; +struct CreateShaderModule; +struct ShaderObject; +struct CreatePipelineLayout; +struct CreateBuffer; +} // namespace chassis + +namespace vvl { +struct AllocateDescriptorSetsData; +class Pipeline; +} // namespace vvl + +// Because of GPL, we currently create our Pipeline state objects before the PreCallValidate +// Each chassis layer will need to track its own state +using PipelineStates = std::vector>; + +// When testing for a valid value, allow a way to right away return how it might not be valid +enum class ValidValue { + Valid = 0, + NotFound, // example, trying to use a random int for an enum + NoExtension, // trying to use a proper value, but the extension is required +}; + +// Layer chassis validation object base class definition +class ValidationObject { + public: + APIVersion api_version; + DebugReport* debug_report = nullptr; + template + std::string FormatHandle(T&& h) const { + return debug_report->FormatHandle(std::forward(h)); + } + DispatchObject* dispatch_{}; + + InstanceExtensions instance_extensions; + DeviceExtensions device_extensions = {}; + GlobalSettings global_settings = {}; + GpuAVSettings gpuav_settings = {}; + SyncValSettings syncval_settings = {}; + + CHECK_DISABLED disabled = {}; + CHECK_ENABLED enabled = {}; + + VkInstance instance = VK_NULL_HANDLE; + VkPhysicalDevice physical_device = VK_NULL_HANDLE; + VkDevice device = VK_NULL_HANDLE; + bool is_device_lost = false; + + LayerObjectTypeId container_type; + + std::string layer_name = "CHASSIS"; + + ValidationObject() {} + virtual ~ValidationObject() {} + + void CopyDispatchState() { + api_version = dispatch_->api_version; + debug_report = dispatch_->debug_report; + + instance_extensions = dispatch_->instance_extensions; + device_extensions = dispatch_->device_extensions; + + global_settings = dispatch_->global_settings; + gpuav_settings = dispatch_->gpuav_settings; + syncval_settings = dispatch_->syncval_settings; + + enabled = dispatch_->enabled; + disabled = dispatch_->disabled; + + instance = dispatch_->instance; + physical_device = dispatch_->physical_device; + device = dispatch_->device; + } + + mutable std::shared_mutex validation_object_mutex; + virtual ReadLockGuard ReadLock() const { return ReadLockGuard(validation_object_mutex); } + virtual WriteLockGuard WriteLock() { return WriteLockGuard(validation_object_mutex); } + + // If the Record phase calls a function that blocks, we might need to release + // the lock that protects Record itself in order to avoid mutual waiting. + static thread_local WriteLockGuard* record_guard; + + // Should be used instead of WriteLock() if the Record phase wants to release + // its lock during the blocking operation. + struct BlockingOperationGuard { + WriteLockGuard lock; + ValidationObject* validation_object = nullptr; + + BlockingOperationGuard(ValidationObject* validation_object) : validation_object(validation_object) { + // This assert detects recursive calls. It is here mostly for documentation purposes + // because WriteLock() also triggers errors during recursion. + // Recursion is not allowed since record_guard is a thread-local variable and it can + // reference only one frame of the callstack. + assert(validation_object->record_guard == nullptr); + + lock = validation_object->WriteLock(); + + // Initialize record_guard only when Record is actually protected by the + // mutex. It's not the case when fine grained locking is enabled. + record_guard = lock.owns_lock() ? &lock : nullptr; + } + + ~BlockingOperationGuard() { validation_object->record_guard = nullptr; } + }; + + // The following Begin/End methods should be called during the Record phase + // around blocking operation that causes mutual waiting (deadlock). + void BeginBlockingOperation() { + if (record_guard) { + record_guard->unlock(); + } + } + void EndBlockingOperation() { + if (record_guard) { + record_guard->lock(); + } + } + + // Debug Logging Helpers + bool DECORATE_PRINTF(5, 6) + LogError(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { + va_list argptr; + va_start(argptr, format); + const bool result = debug_report->LogMsg(kErrorBit, objlist, loc, vuid_text, format, argptr); + va_end(argptr); + return result; + } + + // Currently works like LogWarning, but allows developer to better categorize the warning + bool DECORATE_PRINTF(5, 6) LogUndefinedValue(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, + const char* format, ...) const { + va_list argptr; + va_start(argptr, format); + const bool result = debug_report->LogMsg(kWarningBit, objlist, loc, vuid_text, format, argptr); + va_end(argptr); + return result; + } + + bool DECORATE_PRINTF(5, 6) + LogWarning(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { + va_list argptr; + va_start(argptr, format); + const bool result = debug_report->LogMsg(kWarningBit, objlist, loc, vuid_text, format, argptr); + va_end(argptr); + return result; + } + + bool DECORATE_PRINTF(5, 6) LogPerformanceWarning(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, + const char* format, ...) const { + va_list argptr; + va_start(argptr, format); + const bool result = debug_report->LogMsg(kPerformanceWarningBit, objlist, loc, vuid_text, format, argptr); + va_end(argptr); + return result; + } + + bool DECORATE_PRINTF(5, 6) + LogInfo(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { + va_list argptr; + va_start(argptr, format); + const bool result = debug_report->LogMsg(kInformationBit, objlist, loc, vuid_text, format, argptr); + va_end(argptr); + return result; + } + + bool DECORATE_PRINTF(5, 6) + LogVerbose(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { + va_list argptr; + va_start(argptr, format); + const bool result = debug_report->LogMsg(kVerboseBit, objlist, loc, vuid_text, format, argptr); + va_end(argptr); + return result; + } + + void LogInternalError(std::string_view failure_location, const LogObjectList& obj_list, const Location& loc, + std::string_view entrypoint, VkResult err) const { + const std::string_view err_string = string_VkResult(err); + std::string vuid = "INTERNAL-ERROR-"; + vuid += entrypoint; + LogError(vuid, obj_list, loc, "at %s: %s() was called in the Validation Layer state tracking and failed with result = %s.", + failure_location.data(), entrypoint.data(), err_string.data()); + } + + virtual void CoreLayerDestroyValidationCacheEXT(VkDevice device, VkValidationCacheEXT validationCache, + const VkAllocationCallbacks* pAllocator) {} + virtual VkResult CoreLayerMergeValidationCachesEXT(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, + const VkValidationCacheEXT* pSrcCaches) { + return VK_SUCCESS; + } + virtual VkResult CoreLayerGetValidationCacheDataEXT(VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, + void* pData) { + return VK_SUCCESS; + } + // Manually generated pre/post hooks + // Allow additional state parameter for CreateGraphicsPipelines + virtual bool PreCallValidateCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkGraphicsPipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const ErrorObject& error_obj, PipelineStates& pipeline_states, + chassis::CreateGraphicsPipelines& chassis_state) const { + return PreCallValidateCreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, + error_obj); + } + virtual void PreCallRecordCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkGraphicsPipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const RecordObject& record_obj, PipelineStates& pipeline_states, + chassis::CreateGraphicsPipelines& chassis_state) { + PreCallRecordCreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, + record_obj); + } + virtual void PostCallRecordCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkGraphicsPipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const RecordObject& record_obj, PipelineStates& pipeline_states, + chassis::CreateGraphicsPipelines& chassis_state) { + PostCallRecordCreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, + record_obj); + } + + // Allow additional state parameter for CreateComputePipelines + virtual bool PreCallValidateCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkComputePipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const ErrorObject& error_obj, PipelineStates& pipeline_states, + chassis::CreateComputePipelines& chassis_state) const { + return PreCallValidateCreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, + error_obj); + } + virtual void PreCallRecordCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkComputePipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const RecordObject& record_obj, PipelineStates& pipeline_states, + chassis::CreateComputePipelines& chassis_state) { + PreCallRecordCreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, + record_obj); + } + virtual void PostCallRecordCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkComputePipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const RecordObject& record_obj, PipelineStates& pipeline_states, + chassis::CreateComputePipelines& chassis_state) { + PostCallRecordCreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, + record_obj); + } + + // Allow additional state parameter for CreateRayTracingPipelinesNV + virtual bool PreCallValidateCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, + uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoNV* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const ErrorObject& error_obj, PipelineStates& pipeline_states, + chassis::CreateRayTracingPipelinesNV& chassis_state) const { + return PreCallValidateCreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, + pPipelines, error_obj); + } + virtual void PreCallRecordCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoNV* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const RecordObject& record_obj, PipelineStates& pipeline_states, + chassis::CreateRayTracingPipelinesNV& chassis_state) { + PreCallRecordCreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, + record_obj); + } + virtual void PostCallRecordCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoNV* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const RecordObject& record_obj, PipelineStates& pipeline_states, + chassis::CreateRayTracingPipelinesNV& chassis_state) { + PostCallRecordCreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, + record_obj); + } + + // Allow additional state parameter for CreateRayTracingPipelinesKHR + virtual bool PreCallValidateCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const ErrorObject& error_obj, PipelineStates& pipeline_states, + chassis::CreateRayTracingPipelinesKHR& chassis_state) const { + return PreCallValidateCreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, + pAllocator, pPipelines, error_obj); + } + virtual void PreCallRecordCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const RecordObject& record_obj, PipelineStates& pipeline_states, + chassis::CreateRayTracingPipelinesKHR& chassis_state) { + PreCallRecordCreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, + pAllocator, pPipelines, record_obj); + } + virtual void PostCallRecordCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const RecordObject& record_obj, PipelineStates& pipeline_states, + std::shared_ptr chassis_state) { + PostCallRecordCreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, + pAllocator, pPipelines, record_obj); + } + + // Allow modification of a down-chain parameter for CreatePipelineLayout + virtual void PreCallRecordCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout, + const RecordObject& record_obj, chassis::CreatePipelineLayout& chassis_state) { + PreCallRecordCreatePipelineLayout(device, pCreateInfo, pAllocator, pPipelineLayout, record_obj); + } + + // Enable the CreateShaderModule/CreateShaderEXT API to take an extra argument for state preservation and paramter modification + virtual void PreCallRecordCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule, + const RecordObject& record_obj, chassis::CreateShaderModule& chassis_state) { + PreCallRecordCreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule, record_obj); + } + virtual void PostCallRecordCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule, + const RecordObject& record_obj, chassis::CreateShaderModule& chassis_state) { + PostCallRecordCreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule, record_obj); + } + virtual void PreCallRecordCreateShadersEXT(VkDevice device, uint32_t createInfoCount, const VkShaderCreateInfoEXT* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkShaderEXT* pShaders, + const RecordObject& record_obj, chassis::ShaderObject& chassis_state) { + PreCallRecordCreateShadersEXT(device, createInfoCount, pCreateInfos, pAllocator, pShaders, record_obj); + } + virtual void PostCallRecordCreateShadersEXT(VkDevice device, uint32_t createInfoCount, + const VkShaderCreateInfoEXT* pCreateInfos, const VkAllocationCallbacks* pAllocator, + VkShaderEXT* pShaders, const RecordObject& record_obj, + chassis::ShaderObject& chassis_state) { + PostCallRecordCreateShadersEXT(device, createInfoCount, pCreateInfos, pAllocator, pShaders, record_obj); + } + + // Allow AllocateDescriptorSets to use some local stack storage for performance purposes + virtual bool PreCallValidateAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, + VkDescriptorSet* pDescriptorSets, const ErrorObject& error_obj, + vvl::AllocateDescriptorSetsData& ads_state) const { + return PreCallValidateAllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets, error_obj); + } + virtual void PostCallRecordAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, + VkDescriptorSet* pDescriptorSets, const RecordObject& record_obj, + vvl::AllocateDescriptorSetsData& ads_state) { + PostCallRecordAllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets, record_obj); + } + + // Allow modification of a down-chain parameter for CreateBuffer + virtual void PreCallRecordCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer, + const RecordObject& record_obj, chassis::CreateBuffer& chassis_state) { + PreCallRecordCreateBuffer(device, pCreateInfo, pAllocator, pBuffer, record_obj); + } + + // Modify a parameter to CreateDevice + virtual void PreCallRecordCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDevice* pDevice, + const RecordObject& record_obj, vku::safe_VkDeviceCreateInfo* modified_create_info) { + PreCallRecordCreateDevice(physicalDevice, pCreateInfo, pAllocator, pDevice, record_obj); + } + +#include "generated/validation_object_methods.h" +}; diff --git a/layers/containers/custom_containers.h b/layers/containers/custom_containers.h index 3cec8235d55..45edaac0c73 100644 --- a/layers/containers/custom_containers.h +++ b/layers/containers/custom_containers.h @@ -814,51 +814,6 @@ class small_unordered_map : public small_container class small_unordered_set : public small_container, value_type_helper_set, N> {}; -// For the given data key, look up the layer_data instance from given layer_data_map -template -DATA_T *GetLayerDataPtr(void *data_key, small_unordered_map &layer_data_map) { - /* TODO: We probably should lock here, or have caller lock */ - DATA_T *&got = layer_data_map[data_key]; - - if (got == nullptr) { - got = new DATA_T; - } - - return got; -} - -template -void FreeLayerDataPtr(void *data_key, small_unordered_map &layer_data_map) { - delete layer_data_map[data_key]; - layer_data_map.erase(data_key); -} - -// For the given data key, look up the layer_data instance from given layer_data_map -template -DATA_T *GetLayerDataPtr(void *data_key, std::unordered_map &layer_data_map) { - DATA_T *debug_data; - /* TODO: We probably should lock here, or have caller lock */ - auto got = layer_data_map.find(data_key); - - if (got == layer_data_map.end()) { - debug_data = new DATA_T; - layer_data_map[(void *)data_key] = debug_data; - } else { - debug_data = got->second; - } - - return debug_data; -} - -template -void FreeLayerDataPtr(void *data_key, std::unordered_map &layer_data_map) { - auto got = layer_data_map.find(data_key); - assert(got != layer_data_map.end()); - - delete got->second; - layer_data_map.erase(got); -} - namespace vvl { inline constexpr std::in_place_t in_place{}; diff --git a/layers/containers/subresource_adapter.cpp b/layers/containers/subresource_adapter.cpp index 5af442e2cf8..9acfcdbd37e 100644 --- a/layers/containers/subresource_adapter.cpp +++ b/layers/containers/subresource_adapter.cpp @@ -24,7 +24,7 @@ #include "subresource_adapter.h" #include #include "state_tracker/image_state.h" -#include "generated/layer_chassis_dispatch.h" +#include "generated/dispatch_functions.h" namespace subresource_adapter { Subresource::Subresource(const RangeEncoder& encoder, const VkImageSubresource& subres) diff --git a/layers/core_checks/cc_android.cpp b/layers/core_checks/cc_android.cpp index 8f2eef84819..3986cb32d70 100644 --- a/layers/core_checks/cc_android.cpp +++ b/layers/core_checks/cc_android.cpp @@ -22,6 +22,7 @@ #include "core_validation.h" #include "state_tracker/image_state.h" #include "state_tracker/sampler_state.h" +#include "generated/dispatch_functions.h" #if defined(VK_USE_PLATFORM_ANDROID_KHR) // Android-specific validation that uses types defined only on Android and only for NDK versions diff --git a/layers/core_checks/cc_buffer.cpp b/layers/core_checks/cc_buffer.cpp index 64be26a3447..b499ee627dc 100644 --- a/layers/core_checks/cc_buffer.cpp +++ b/layers/core_checks/cc_buffer.cpp @@ -21,7 +21,6 @@ #include #include "error_message/error_location.h" -#include "generated/chassis.h" #include "core_validation.h" #include "state_tracker/buffer_state.h" diff --git a/layers/core_checks/cc_cmd_buffer.cpp b/layers/core_checks/cc_cmd_buffer.cpp index 724d1a9fb4e..f0fc1ec4a92 100644 --- a/layers/core_checks/cc_cmd_buffer.cpp +++ b/layers/core_checks/cc_cmd_buffer.cpp @@ -22,7 +22,6 @@ #include #include -#include "generated/chassis.h" #include "state_tracker/image_state.h" #include "state_tracker/buffer_state.h" #include "state_tracker/render_pass_state.h" diff --git a/layers/core_checks/cc_cmd_buffer_dynamic.cpp b/layers/core_checks/cc_cmd_buffer_dynamic.cpp index d3ebfa8013c..6727c33ba59 100644 --- a/layers/core_checks/cc_cmd_buffer_dynamic.cpp +++ b/layers/core_checks/cc_cmd_buffer_dynamic.cpp @@ -18,10 +18,10 @@ */ #include -#include "generated/chassis.h" #include "core_validation.h" #include "drawdispatch/drawdispatch_vuids.h" #include "generated/vk_extension_helper.h" +#include "generated/dispatch_functions.h" #include "state_tracker/image_state.h" #include "state_tracker/render_pass_state.h" #include "state_tracker/shader_object_state.h" diff --git a/layers/core_checks/cc_copy_blit_resolve.cpp b/layers/core_checks/cc_copy_blit_resolve.cpp index 27b40056acb..da16aaf7b38 100644 --- a/layers/core_checks/cc_copy_blit_resolve.cpp +++ b/layers/core_checks/cc_copy_blit_resolve.cpp @@ -25,10 +25,10 @@ #include "cc_vuid_maps.h" #include "error_message/error_strings.h" #include -#include "generated/chassis.h" #include "state_tracker/image_state.h" #include "state_tracker/buffer_state.h" #include "state_tracker/device_state.h" +#include "generated/dispatch_functions.h" struct ImageRegionIntersection { VkImageSubresourceLayers subresource = {}; diff --git a/layers/core_checks/cc_device.cpp b/layers/core_checks/cc_device.cpp index 42e63e1f999..e322b2deb33 100644 --- a/layers/core_checks/cc_device.cpp +++ b/layers/core_checks/cc_device.cpp @@ -27,12 +27,12 @@ #endif #include -#include "generated/chassis.h" #include "core_validation.h" #include "state_tracker/image_state.h" #include "state_tracker/device_state.h" #include "state_tracker/render_pass_state.h" #include +#include "generated/dispatch_functions.h" bool CoreChecks::ValidateDeviceQueueFamily(uint32_t queue_family, const Location &loc, const char *vuid, bool optional = false) const { diff --git a/layers/core_checks/cc_device_generated_commands.cpp b/layers/core_checks/cc_device_generated_commands.cpp index 60691d6fc07..e27f751a877 100644 --- a/layers/core_checks/cc_device_generated_commands.cpp +++ b/layers/core_checks/cc_device_generated_commands.cpp @@ -18,9 +18,9 @@ #include #include #include -#include "generated/chassis.h" #include "core_validation.h" #include "error_message/error_strings.h" +#include "generated/dispatch_functions.h" #include "state_tracker/device_generated_commands_state.h" #include "state_tracker/pipeline_layout_state.h" #include "state_tracker/descriptor_sets.h" @@ -1087,4 +1087,4 @@ bool CoreChecks::PreCallValidateUpdateIndirectExecutionSetShaderEXT(VkDevice dev } return skip; -} \ No newline at end of file +} diff --git a/layers/core_checks/cc_device_memory.cpp b/layers/core_checks/cc_device_memory.cpp index bec05d4f1c5..08ad1e903a2 100644 --- a/layers/core_checks/cc_device_memory.cpp +++ b/layers/core_checks/cc_device_memory.cpp @@ -20,7 +20,6 @@ #include #include -#include "generated/chassis.h" #include "generated/pnext_chain_extraction.h" #include "core_validation.h" #include "cc_buffer_address.h" @@ -2492,4 +2491,4 @@ bool CoreChecks::ValidateMemoryIsBoundToBuffer(LogObjectList objlist, const vvl: skip |= VerifyBoundMemoryIsValid(buffer_state.MemState(), objlist, buffer_state.Handle(), buffer_loc, vuid); } return skip; -} \ No newline at end of file +} diff --git a/layers/core_checks/cc_drawdispatch.cpp b/layers/core_checks/cc_drawdispatch.cpp index 9d200f4cf00..d4a7dca13a0 100644 --- a/layers/core_checks/cc_drawdispatch.cpp +++ b/layers/core_checks/cc_drawdispatch.cpp @@ -17,7 +17,6 @@ * limitations under the License. */ -#include "generated/chassis.h" #include "drawdispatch/drawdispatch_vuids.h" #include "core_validation.h" #include "state_tracker/buffer_state.h" diff --git a/layers/core_checks/cc_external_object.cpp b/layers/core_checks/cc_external_object.cpp index 4bab61c6b48..407ea145c9e 100644 --- a/layers/core_checks/cc_external_object.cpp +++ b/layers/core_checks/cc_external_object.cpp @@ -18,7 +18,6 @@ */ #include -#include "generated/chassis.h" #include "core_validation.h" #include "state_tracker/image_state.h" #include "state_tracker/buffer_state.h" diff --git a/layers/core_checks/cc_image.cpp b/layers/core_checks/cc_image.cpp index c2b1278a31a..93216f98c63 100644 --- a/layers/core_checks/cc_image.cpp +++ b/layers/core_checks/cc_image.cpp @@ -24,8 +24,8 @@ #include "core_validation.h" #include "cc_vuid_maps.h" -#include "generated/chassis.h" #include "generated/pnext_chain_extraction.h" +#include "generated/dispatch_functions.h" #include "error_message/error_strings.h" #include "state_tracker/image_state.h" #include "state_tracker/sampler_state.h" diff --git a/layers/core_checks/cc_image_layout.cpp b/layers/core_checks/cc_image_layout.cpp index ec5471a8f4c..8ee941397ca 100644 --- a/layers/core_checks/cc_image_layout.cpp +++ b/layers/core_checks/cc_image_layout.cpp @@ -21,7 +21,6 @@ #include #include -#include "generated/chassis.h" #include "core_validation.h" #include "sync/sync_vuid_maps.h" #include "utils/image_layout_utils.h" diff --git a/layers/core_checks/cc_pipeline.cpp b/layers/core_checks/cc_pipeline.cpp index 60e411db829..be2aba3b555 100644 --- a/layers/core_checks/cc_pipeline.cpp +++ b/layers/core_checks/cc_pipeline.cpp @@ -22,11 +22,11 @@ #include #include -#include "generated/chassis.h" #include "core_validation.h" #include "state_tracker/device_state.h" #include "state_tracker/descriptor_sets.h" #include "state_tracker/render_pass_state.h" +#include "generated/dispatch_functions.h" bool CoreChecks::IsBeforeCtsVersion(uint32_t major, uint32_t minor, uint32_t subminor) const { // If VK_KHR_driver_properties is not enabled then conformance version will not be set diff --git a/layers/core_checks/cc_pipeline_compute.cpp b/layers/core_checks/cc_pipeline_compute.cpp index 3ab5caaf544..486b4faacd8 100644 --- a/layers/core_checks/cc_pipeline_compute.cpp +++ b/layers/core_checks/cc_pipeline_compute.cpp @@ -19,7 +19,6 @@ */ #include -#include "generated/chassis.h" #include "core_validation.h" #include "chassis/chassis_modification_state.h" diff --git a/layers/core_checks/cc_pipeline_graphics.cpp b/layers/core_checks/cc_pipeline_graphics.cpp index ca0ef677d52..d7724a54946 100644 --- a/layers/core_checks/cc_pipeline_graphics.cpp +++ b/layers/core_checks/cc_pipeline_graphics.cpp @@ -23,9 +23,9 @@ #include #include "utils/vk_struct_compare.h" -#include "generated/chassis.h" #include "core_validation.h" #include "generated/enum_flag_bits.h" +#include "generated/dispatch_functions.h" #include "drawdispatch/drawdispatch_vuids.h" #include "state_tracker/image_state.h" #include "state_tracker/buffer_state.h" diff --git a/layers/core_checks/cc_pipeline_ray_tracing.cpp b/layers/core_checks/cc_pipeline_ray_tracing.cpp index 226bde9b58e..d622f418d5d 100644 --- a/layers/core_checks/cc_pipeline_ray_tracing.cpp +++ b/layers/core_checks/cc_pipeline_ray_tracing.cpp @@ -19,7 +19,6 @@ */ #include -#include "generated/chassis.h" #include "core_validation.h" #include "chassis/chassis_modification_state.h" diff --git a/layers/core_checks/cc_query.cpp b/layers/core_checks/cc_query.cpp index c2e61371947..f3ac1316c15 100644 --- a/layers/core_checks/cc_query.cpp +++ b/layers/core_checks/cc_query.cpp @@ -21,7 +21,6 @@ #include #include -#include "generated/chassis.h" #include "core_validation.h" #include "generated/enum_flag_bits.h" #include "state_tracker/device_state.h" diff --git a/layers/core_checks/cc_queue.cpp b/layers/core_checks/cc_queue.cpp index efedb852018..094924461c1 100644 --- a/layers/core_checks/cc_queue.cpp +++ b/layers/core_checks/cc_queue.cpp @@ -21,7 +21,6 @@ #include #include -#include "generated/chassis.h" #include "cc_synchronization.h" #include "core_validation.h" #include "state_tracker/queue_state.h" diff --git a/layers/core_checks/cc_ray_tracing.cpp b/layers/core_checks/cc_ray_tracing.cpp index 882ca894b8f..64414d1c94a 100644 --- a/layers/core_checks/cc_ray_tracing.cpp +++ b/layers/core_checks/cc_ray_tracing.cpp @@ -22,7 +22,6 @@ #include #include -#include "generated/chassis.h" #include "core_validation.h" #include "cc_buffer_address.h" #include "utils/ray_tracing_utils.h" diff --git a/layers/core_checks/cc_render_pass.cpp b/layers/core_checks/cc_render_pass.cpp index 5769a76ccf4..75221e0079f 100644 --- a/layers/core_checks/cc_render_pass.cpp +++ b/layers/core_checks/cc_render_pass.cpp @@ -23,7 +23,6 @@ #include #include -#include "generated/chassis.h" #include "core_validation.h" #include "sync/sync_utils.h" #include "utils/convert_utils.h" diff --git a/layers/core_checks/cc_submit.cpp b/layers/core_checks/cc_submit.cpp index 845b7566aa2..08adeb4f543 100644 --- a/layers/core_checks/cc_submit.cpp +++ b/layers/core_checks/cc_submit.cpp @@ -18,7 +18,7 @@ #include "cc_submit.h" #include "state_tracker/queue_state.h" #include "sync/sync_vuid_maps.h" -#include "generated/chassis.h" // ValidationObject +#include "chassis/validation_object.h" static Location GetSignaledSemaphoreLocation(const Location& submit_loc, uint32_t index) { vvl::Field field = vvl::Field::Empty; diff --git a/layers/core_checks/cc_synchronization.cpp b/layers/core_checks/cc_synchronization.cpp index 20fad3d813c..345d8d08a96 100644 --- a/layers/core_checks/cc_synchronization.cpp +++ b/layers/core_checks/cc_synchronization.cpp @@ -23,7 +23,6 @@ #include #include -#include "generated/chassis.h" #include "core_checks/cc_synchronization.h" #include "core_checks/core_validation.h" #include "sync/sync_utils.h" diff --git a/layers/core_checks/cc_video.cpp b/layers/core_checks/cc_video.cpp index b28d969c061..83f5ae08f33 100644 --- a/layers/core_checks/cc_video.cpp +++ b/layers/core_checks/cc_video.cpp @@ -20,11 +20,11 @@ #include #include -#include "generated/chassis.h" #include "core_validation.h" #include "error_message/error_strings.h" #include "state_tracker/image_state.h" #include "state_tracker/buffer_state.h" +#include "generated/dispatch_functions.h" // Flags validation error if the associated call is made inside a video coding block. // The apiName routine should ONLY be called outside a video coding block. diff --git a/layers/core_checks/cc_wsi.cpp b/layers/core_checks/cc_wsi.cpp index f7a55189dae..f2332a7443a 100644 --- a/layers/core_checks/cc_wsi.cpp +++ b/layers/core_checks/cc_wsi.cpp @@ -23,7 +23,6 @@ #include #include -#include "generated/chassis.h" #include "cc_synchronization.h" #include "core_validation.h" #include "error_message/error_strings.h" @@ -32,6 +31,7 @@ #include "state_tracker/fence_state.h" #include "state_tracker/semaphore_state.h" #include "state_tracker/device_state.h" +#include "generated/dispatch_functions.h" static bool IsExtentInsideBounds(VkExtent2D extent, VkExtent2D min, VkExtent2D max) { if ((extent.width < min.width) || (extent.width > max.width) || (extent.height < min.height) || (extent.height > max.height)) { diff --git a/layers/core_checks/cc_ycbcr.cpp b/layers/core_checks/cc_ycbcr.cpp index 0c33603bf23..7506ab677bf 100644 --- a/layers/core_checks/cc_ycbcr.cpp +++ b/layers/core_checks/cc_ycbcr.cpp @@ -1,6 +1,6 @@ -/* Copyright (c) 2015-2023 The Khronos Group Inc. - * Copyright (c) 2015-2023 Valve Corporation - * Copyright (c) 2015-2023 LunarG, Inc. +/* Copyright (c) 2015-2024 The Khronos Group Inc. + * Copyright (c) 2015-2024 Valve Corporation + * Copyright (c) 2015-2024 LunarG, Inc. * Copyright (C) 2015-2023 Google Inc. * Modifications Copyright (C) 2020-2022 Advanced Micro Devices, Inc. All rights reserved. * Modifications Copyright (C) 2022 RasterGrid Kft. @@ -19,7 +19,6 @@ * */ -#include "generated/chassis.h" #include "core_validation.h" // There is a table in the Vulkan spec to list all formats that implicitly require YCbCr conversion, diff --git a/layers/error_message/logging.cpp b/layers/error_message/logging.cpp index f09ab90fe34..e1e8f8d3534 100644 --- a/layers/error_message/logging.cpp +++ b/layers/error_message/logging.cpp @@ -428,8 +428,6 @@ void DebugReport::EraseCmdDebugUtilsLabel(VkCommandBuffer command_buffer) { debug_utils_cmd_buffer_labels.erase(command_buffer); } -VKAPI_ATTR void LayerDebugUtilsDestroyInstance(DebugReport *debug_report) { delete debug_report; } - template static void LayerCreateCallback(DebugCallbackStatusFlags callback_status, DebugReport *debug_report, const TCreateInfo *create_info, TCallback *callback) { diff --git a/layers/error_message/logging.h b/layers/error_message/logging.h index 802acf4d05a..7d2090cd7ad 100644 --- a/layers/error_message/logging.h +++ b/layers/error_message/logging.h @@ -28,6 +28,7 @@ #include "containers/custom_containers.h" #include "generated/vk_object_types.h" +#include "error_message/log_message_type.h" #if defined __ANDROID__ #include @@ -176,6 +177,14 @@ struct MessageFormatSettings { std::string application_name; }; +#if defined(__clang__) +#define DECORATE_PRINTF(_fmt_argnum, _first_param_num) __attribute__((format(printf, _fmt_argnum, _first_param_num))) +#elif defined(__GNUC__) +#define DECORATE_PRINTF(_fmt_argnum, _first_param_num) __attribute__((format(gnu_printf, _fmt_argnum, _first_param_num))) +#else +#define DECORATE_PRINTF(_fmt_num, _first_param_num) +#endif + class DebugReport { public: std::vector debug_callback_list; @@ -242,8 +251,6 @@ class DebugReport { vvl::unordered_map debug_utils_object_name_map; }; -template DebugReport *GetLayerDataPtr(void *data_key, std::unordered_map &data_map); - VKAPI_ATTR VkResult LayerCreateMessengerCallback(DebugReport *debug_report, bool default_callback, const VkDebugUtilsMessengerCreateInfoEXT *create_info, VkDebugUtilsMessengerEXT *messenger); @@ -262,8 +269,6 @@ VKAPI_ATTR void ActivateInstanceDebugCallbacks(DebugReport *debug_report); VKAPI_ATTR void DeactivateInstanceDebugCallbacks(DebugReport *debug_report); -VKAPI_ATTR void LayerDebugUtilsDestroyInstance(DebugReport *debug_report); - VKAPI_ATTR VkBool32 VKAPI_CALL MessengerBreakCallback(VkDebugUtilsMessageSeverityFlagBitsEXT message_severity, VkDebugUtilsMessageTypeFlagsEXT message_type, const VkDebugUtilsMessengerCallbackDataEXT *callback_data, void *user_data); diff --git a/layers/gpu/core/gpuav_setup.cpp b/layers/gpu/core/gpuav_setup.cpp index 62e59627a6a..8b59334849f 100644 --- a/layers/gpu/core/gpuav_setup.cpp +++ b/layers/gpu/core/gpuav_setup.cpp @@ -24,10 +24,9 @@ #include "gpu/core/gpuav_constants.h" #include "gpu/core/gpuav.h" #include "gpu/resources/gpuav_subclasses.h" -#include "generated/layer_chassis_dispatch.h" +#include "chassis/dispatch_object.h" #include "gpu/shaders/gpuav_error_header.h" #include "gpu/shaders/gpuav_shaders_constants.h" -#include "generated/chassis.h" namespace gpuav { std::shared_ptr Validator::CreateBufferState(VkBuffer handle, const VkBufferCreateInfo *create_info) { diff --git a/layers/gpu/debug_printf/debug_printf.cpp b/layers/gpu/debug_printf/debug_printf.cpp index 3951556a589..d5745c4839e 100644 --- a/layers/gpu/debug_printf/debug_printf.cpp +++ b/layers/gpu/debug_printf/debug_printf.cpp @@ -17,7 +17,7 @@ #include #include "gpu/debug_printf/debug_printf.h" -#include "generated/layer_chassis_dispatch.h" +#include "chassis/dispatch_object.h" #include "gpu/shaders/gpuav_error_header.h" #include "gpu/shaders/gpuav_shaders_constants.h" #include "gpu/resources/gpuav_subclasses.h" @@ -412,4 +412,4 @@ bool UpdateInstrumentationDescSet(Validator &gpuav, CommandBuffer &cb_state, VkD } } // namespace debug_printf -} // namespace gpuav \ No newline at end of file +} // namespace gpuav diff --git a/layers/gpu/instrumentation/gpuav_shader_instrumentor.cpp b/layers/gpu/instrumentation/gpuav_shader_instrumentor.cpp index c0e2e76a86e..1235870d201 100644 --- a/layers/gpu/instrumentation/gpuav_shader_instrumentor.cpp +++ b/layers/gpu/instrumentation/gpuav_shader_instrumentor.cpp @@ -22,6 +22,7 @@ #include "error_message/error_location.h" #include "generated/vk_extension_helper.h" +#include "generated/dispatch_functions.h" #include "gpu/shaders/gpuav_shaders_constants.h" #include "gpu/spirv/module.h" #include "chassis/chassis_modification_state.h" @@ -656,7 +657,7 @@ void GpuShaderInstrumentor::PostCallRecordCreateRayTracingPipelinesKHR( UtilCopyCreatePipelineFeedbackData(pCreateInfos[i], chassis_state->modified_create_infos[i]); } - if (wrap_handles) { + if (dispatch_->wrap_handles) { deferredOperation = layer_data->Unwrap(deferredOperation); } diff --git a/layers/gpu/instrumentation/gpuav_shader_instrumentor.h b/layers/gpu/instrumentation/gpuav_shader_instrumentor.h index 89fc7eeac0b..3eb0562c833 100644 --- a/layers/gpu/instrumentation/gpuav_shader_instrumentor.h +++ b/layers/gpu/instrumentation/gpuav_shader_instrumentor.h @@ -18,7 +18,6 @@ #include "containers/custom_containers.h" #include "error_message/error_location.h" -#include "generated/chassis.h" #include "state_tracker/shader_instruction.h" #include "state_tracker/state_tracker.h" #include "gpu/spirv/interface.h" diff --git a/layers/gpu/resources/gpuav_resources.cpp b/layers/gpu/resources/gpuav_resources.cpp index a61212e20a1..6a3cb128a44 100644 --- a/layers/gpu/resources/gpuav_resources.cpp +++ b/layers/gpu/resources/gpuav_resources.cpp @@ -18,7 +18,7 @@ #include "gpu/resources/gpuav_resources.h" #include "gpu/core/gpuav.h" -#include "generated/layer_chassis_dispatch.h" +#include "generated/dispatch_functions.h" #include namespace gpuav { diff --git a/layers/gpu/resources/gpuav_subclasses.cpp b/layers/gpu/resources/gpuav_subclasses.cpp index 19753527778..bbaab325e65 100644 --- a/layers/gpu/resources/gpuav_subclasses.cpp +++ b/layers/gpu/resources/gpuav_subclasses.cpp @@ -592,7 +592,7 @@ void Queue::SubmitBarrier(const Location &loc, uint64_t seq) { // Record a global memory barrier to force availability of device memory operations to the host domain. VkCommandBufferBeginInfo barrier_cmd_buffer_begin_info = vku::InitStructHelper(); barrier_cmd_buffer_begin_info.flags |= VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT; - result = DispatchBeginCommandBuffer(barrier_command_buffer_, &barrier_cmd_buffer_begin_info, false); + result = DispatchBeginCommandBuffer(barrier_command_buffer_, &barrier_cmd_buffer_begin_info); if (result == VK_SUCCESS) { VkMemoryBarrier memory_barrier = vku::InitStructHelper(); memory_barrier.srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT; diff --git a/layers/layer_options.cpp b/layers/layer_options.cpp index 6129d58db6e..69d6aaa7ff7 100644 --- a/layers/layer_options.cpp +++ b/layers/layer_options.cpp @@ -17,16 +17,17 @@ */ #include "layer_options.h" +#include "chassis/validation_object.h" #include "error_message/log_message_type.h" +#include "error_message/logging.h" +#include "error_message/error_location.h" #include "generated/error_location_helper.h" #include "utils/hash_util.h" #include #include #include -#include "generated/chassis.h" #include "gpu/core/gpuav_settings.h" -#include "error_message/logging.h" #include "sync/sync_settings.h" #include "vk_layer_config.h" @@ -742,6 +743,12 @@ static const char *GetDefaultPrefix() { } #endif // !defined(BUILD_SELF_VVL) +// Global list of sType,size identifiers +std::vector> &GetCustomStypeInfo() { + static std::vector> custom_stype_info{}; + return custom_stype_info; +} + // Process enables and disables set though the vk_layer_settings.txt config file or through an environment variable void ProcessConfigAndEnvSettings(ConfigAndEnvSettings *settings_data) { // When compiling a build for self validation, ProcessConfigAndEnvSettings immediately returns, diff --git a/layers/layer_options.h b/layers/layer_options.h index a39d9ffccfe..563ffa9e5c3 100644 --- a/layers/layer_options.h +++ b/layers/layer_options.h @@ -114,3 +114,5 @@ const std::vector &GetEnableFlagNameHelper(); // Process validation features, flags and settings specified through extensions, a layer settings file, or environment variables void ProcessConfigAndEnvSettings(ConfigAndEnvSettings *settings_data); + +std::vector> &GetCustomStypeInfo(); diff --git a/layers/object_tracker/object_lifetime_validation.h b/layers/object_tracker/object_lifetime_validation.h index 4b0d4cb2e14..f8a1c8edb1c 100644 --- a/layers/object_tracker/object_lifetime_validation.h +++ b/layers/object_tracker/object_lifetime_validation.h @@ -16,6 +16,8 @@ * limitations under the License. */ +#include "chassis/validation_object.h" + extern uint64_t object_track_index; // Object Status -- used to track state of individual objects diff --git a/layers/object_tracker/object_tracker_utils.cpp b/layers/object_tracker/object_tracker_utils.cpp index 6003e979739..f3d5ee0bd2c 100644 --- a/layers/object_tracker/object_tracker_utils.cpp +++ b/layers/object_tracker/object_tracker_utils.cpp @@ -15,11 +15,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -#include "generated/chassis.h" - #include "object_lifetime_validation.h" -#include "generated/layer_chassis_dispatch.h" +#include "chassis/dispatch_object.h" uint64_t object_track_index = 0; @@ -59,7 +56,7 @@ bool ObjectLifetimes::CheckObjectValidity(uint64_t object_handle, VulkanObjectTy // Object not found, look for it in other device object maps const ObjectLifetimes *other_lifetimes = nullptr; for (const auto &other_device_data : layer_data_map) { - const auto lifetimes = other_device_data.second->GetValidationObject(); + const auto lifetimes = static_cast(other_device_data.second->GetValidationObject(LayerObjectTypeObjectTracker)); if (lifetimes && lifetimes != this && lifetimes->TracksObject(object_handle, object_type)) { other_lifetimes = lifetimes; @@ -470,7 +467,7 @@ bool ObjectLifetimes::PreCallValidateDestroyInstance(VkInstance instance, const // Throw errors if any device objects belonging to this instance have not been destroyed auto device_layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - auto obj_lifetimes_data = device_layer_data->GetValidationObject(); + auto obj_lifetimes_data = static_cast(device_layer_data->GetValidationObject(LayerObjectTypeObjectTracker)); skip |= obj_lifetimes_data->ReportUndestroyedDeviceObjects(device, error_obj.location); skip |= ValidateDestroyObject(device, kVulkanObjectTypeDevice, pAllocator, "VUID-vkDestroyInstance-instance-00630", @@ -528,7 +525,7 @@ bool ObjectLifetimes::PreCallValidateDestroyDevice(VkDevice device, const VkAllo void ObjectLifetimes::PreCallRecordDestroyDevice(VkDevice device, const VkAllocationCallbacks *pAllocator, const RecordObject &record_obj) { auto instance_data = GetLayerDataPtr(GetDispatchKey(physical_device), layer_data_map); - auto object_lifetimes = instance_data->GetValidationObject(); + auto object_lifetimes = static_cast(instance_data->GetValidationObject(LayerObjectTypeObjectTracker)); // If ObjectTracker was removed (in an early teardown) this might be null, could search in aborted_object_dispatch but if it is // there, no need to record anything else if (object_lifetimes) { @@ -737,7 +734,7 @@ void ObjectLifetimes::PostCallRecordCreateDevice(VkPhysicalDevice physicalDevice CreateObject(*pDevice, kVulkanObjectTypeDevice, pAllocator, record_obj.location); auto device_data = GetLayerDataPtr(GetDispatchKey(*pDevice), layer_data_map); - auto object_tracking = device_data->GetValidationObject(); + auto object_tracking = static_cast(device_data->GetValidationObject(LayerObjectTypeObjectTracker)); const auto *robustness2_features = vku::FindStructInPNextChain(pCreateInfo->pNext); object_tracking->null_descriptor_enabled = robustness2_features && robustness2_features->nullDescriptor; @@ -1362,7 +1359,7 @@ void ObjectLifetimes::PostCallRecordCreateRayTracingPipelinesKHR( }; auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (wrap_handles) { + if (dispatch_->wrap_handles) { deferredOperation = layer_data->Unwrap(deferredOperation); } std::vector &)>> cleanup_fn; diff --git a/layers/state_tracker/buffer_state.cpp b/layers/state_tracker/buffer_state.cpp index 62b4bfdbf84..d20a322b08f 100644 --- a/layers/state_tracker/buffer_state.cpp +++ b/layers/state_tracker/buffer_state.cpp @@ -18,7 +18,7 @@ * limitations under the License. */ #include "state_tracker/buffer_state.h" -#include "generated/layer_chassis_dispatch.h" +#include "generated/dispatch_functions.h" #include "state_tracker/state_tracker.h" static VkExternalMemoryHandleTypeFlags GetExternalHandleTypes(const VkBufferCreateInfo *create_info) { diff --git a/layers/state_tracker/device_state.cpp b/layers/state_tracker/device_state.cpp index 4a8ebda099e..f022166c8f0 100644 --- a/layers/state_tracker/device_state.cpp +++ b/layers/state_tracker/device_state.cpp @@ -16,7 +16,7 @@ */ #include "state_tracker/device_state.h" -#include "generated/layer_chassis_dispatch.h" +#include "generated/dispatch_functions.h" namespace vvl { diff --git a/layers/state_tracker/image_state.cpp b/layers/state_tracker/image_state.cpp index 9fa8f83a689..3fe07c159e4 100644 --- a/layers/state_tracker/image_state.cpp +++ b/layers/state_tracker/image_state.cpp @@ -21,6 +21,7 @@ #include "state_tracker/pipeline_state.h" #include "state_tracker/descriptor_sets.h" #include "state_tracker/shader_module.h" +#include "generated/dispatch_functions.h" static VkImageSubresourceRange MakeImageFullRange(const VkImageCreateInfo &create_info) { const auto format = create_info.format; diff --git a/layers/state_tracker/ray_tracing_state.h b/layers/state_tracker/ray_tracing_state.h index e1b1d141bee..c80c28d0fa6 100644 --- a/layers/state_tracker/ray_tracing_state.h +++ b/layers/state_tracker/ray_tracing_state.h @@ -19,7 +19,7 @@ #pragma once #include "state_tracker/device_memory_state.h" #include "state_tracker/buffer_state.h" -#include "generated/layer_chassis_dispatch.h" +#include "generated/dispatch_functions.h" namespace vvl { diff --git a/layers/state_tracker/state_tracker.cpp b/layers/state_tracker/state_tracker.cpp index 6ece638dfb2..632fd3acbbf 100644 --- a/layers/state_tracker/state_tracker.cpp +++ b/layers/state_tracker/state_tracker.cpp @@ -27,7 +27,6 @@ #include "containers/custom_containers.h" #include "utils/vk_layer_utils.h" -#include "generated/chassis.h" #include "state_tracker/state_tracker.h" #include "sync/sync_utils.h" #include "state_tracker/shader_stage_state.h" @@ -734,9 +733,9 @@ void ValidationStateTracker::PostCreateDevice(const VkDeviceCreateInfo *pCreateI { uint32_t n_props = 0; std::vector props; - instance_dispatch_table.EnumerateDeviceExtensionProperties(physical_device, NULL, &n_props, NULL); + DispatchEnumerateDeviceExtensionProperties(physical_device, NULL, &n_props, NULL); props.resize(n_props); - instance_dispatch_table.EnumerateDeviceExtensionProperties(physical_device, NULL, &n_props, props.data()); + DispatchEnumerateDeviceExtensionProperties(physical_device, NULL, &n_props, props.data()); vvl::unordered_set phys_dev_extensions; for (const auto &ext_prop : props) { @@ -790,7 +789,7 @@ void ValidationStateTracker::PostCreateDevice(const VkDeviceCreateInfo *pCreateI VkPhysicalDeviceSubgroupProperties subgroup_prop = vku::InitStructHelper(); VkPhysicalDeviceProtectedMemoryProperties protected_memory_prop = vku::InitStructHelper(&subgroup_prop); VkPhysicalDeviceProperties2 prop2 = vku::InitStructHelper(&protected_memory_prop); - instance_dispatch_table.GetPhysicalDeviceProperties2(physical_device, &prop2); + DispatchGetPhysicalDeviceProperties2(physical_device, &prop2); phys_dev_props_core11.subgroupSize = subgroup_prop.subgroupSize; phys_dev_props_core11.subgroupSupportedStages = subgroup_prop.supportedStages; @@ -1045,16 +1044,16 @@ void ValidationStateTracker::PostCreateDevice(const VkDeviceCreateInfo *pCreateI // Get the needed cooperative_matrix properties VkPhysicalDeviceCooperativeMatrixPropertiesNV cooperative_matrix_props = vku::InitStructHelper(); VkPhysicalDeviceProperties2 prop2 = vku::InitStructHelper(&cooperative_matrix_props); - instance_dispatch_table.GetPhysicalDeviceProperties2KHR(physical_device, &prop2); + DispatchGetPhysicalDeviceProperties2KHR(physical_device, &prop2); phys_dev_ext_props.cooperative_matrix_props = cooperative_matrix_props; uint32_t num_cooperative_matrix_properties_nv = 0; - instance_dispatch_table.GetPhysicalDeviceCooperativeMatrixPropertiesNV(physical_device, + DispatchGetPhysicalDeviceCooperativeMatrixPropertiesNV(physical_device, &num_cooperative_matrix_properties_nv, NULL); cooperative_matrix_properties_nv.resize(num_cooperative_matrix_properties_nv, vku::InitStruct()); - instance_dispatch_table.GetPhysicalDeviceCooperativeMatrixPropertiesNV( + DispatchGetPhysicalDeviceCooperativeMatrixPropertiesNV( physical_device, &num_cooperative_matrix_properties_nv, cooperative_matrix_properties_nv.data()); } @@ -1062,16 +1061,16 @@ void ValidationStateTracker::PostCreateDevice(const VkDeviceCreateInfo *pCreateI // Get the needed KHR cooperative_matrix properties VkPhysicalDeviceCooperativeMatrixPropertiesKHR cooperative_matrix_props_khr = vku::InitStructHelper(); VkPhysicalDeviceProperties2 prop2 = vku::InitStructHelper(&cooperative_matrix_props_khr); - instance_dispatch_table.GetPhysicalDeviceProperties2KHR(physical_device, &prop2); + DispatchGetPhysicalDeviceProperties2KHR(physical_device, &prop2); phys_dev_ext_props.cooperative_matrix_props_khr = cooperative_matrix_props_khr; uint32_t num_cooperative_matrix_properties_khr = 0; - instance_dispatch_table.GetPhysicalDeviceCooperativeMatrixPropertiesKHR(physical_device, + DispatchGetPhysicalDeviceCooperativeMatrixPropertiesKHR(physical_device, &num_cooperative_matrix_properties_khr, NULL); cooperative_matrix_properties_khr.resize(num_cooperative_matrix_properties_khr, vku::InitStruct()); - instance_dispatch_table.GetPhysicalDeviceCooperativeMatrixPropertiesKHR( + DispatchGetPhysicalDeviceCooperativeMatrixPropertiesKHR( physical_device, &num_cooperative_matrix_properties_khr, cooperative_matrix_properties_khr.data()); } @@ -1079,17 +1078,17 @@ void ValidationStateTracker::PostCreateDevice(const VkDeviceCreateInfo *pCreateI // Get the needed NV cooperative_matrix2 properties VkPhysicalDeviceCooperativeMatrix2PropertiesNV cooperative_matrix_props2_nv = vku::InitStructHelper(); VkPhysicalDeviceProperties2 prop2 = vku::InitStructHelper(&cooperative_matrix_props2_nv); - instance_dispatch_table.GetPhysicalDeviceProperties2KHR(physical_device, &prop2); + DispatchGetPhysicalDeviceProperties2KHR(physical_device, &prop2); phys_dev_ext_props.cooperative_matrix_props2_nv = cooperative_matrix_props2_nv; uint32_t num_cooperative_matrix_flexible_dimensions_properties = 0; - instance_dispatch_table.GetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( + DispatchGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( physical_device, &num_cooperative_matrix_flexible_dimensions_properties, NULL); cooperative_matrix_flexible_dimensions_properties.resize( num_cooperative_matrix_flexible_dimensions_properties, vku::InitStruct()); - instance_dispatch_table.GetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( + DispatchGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( physical_device, &num_cooperative_matrix_flexible_dimensions_properties, cooperative_matrix_flexible_dimensions_properties.data()); } @@ -1097,9 +1096,9 @@ void ValidationStateTracker::PostCreateDevice(const VkDeviceCreateInfo *pCreateI // Store queue family data if (pCreateInfo->pQueueCreateInfos != nullptr) { uint32_t num_queue_families = 0; - instance_dispatch_table.GetPhysicalDeviceQueueFamilyProperties(physical_device, &num_queue_families, nullptr); + DispatchGetPhysicalDeviceQueueFamilyProperties(physical_device, &num_queue_families, nullptr); std::vector queue_family_properties_list(num_queue_families); - instance_dispatch_table.GetPhysicalDeviceQueueFamilyProperties(physical_device, &num_queue_families, + DispatchGetPhysicalDeviceQueueFamilyProperties(physical_device, &num_queue_families, queue_family_properties_list.data()); for (uint32_t i = 0; i < pCreateInfo->queueCreateInfoCount; ++i) { @@ -1588,9 +1587,9 @@ void ValidationStateTracker::RecordGetDeviceQueueState(uint32_t queue_family_ind VkDeviceQueueCreateFlags flags, VkQueue queue) { if (Get(queue) == nullptr) { uint32_t num_queue_families = 0; - instance_dispatch_table.GetPhysicalDeviceQueueFamilyProperties(physical_device, &num_queue_families, nullptr); + DispatchGetPhysicalDeviceQueueFamilyProperties(physical_device, &num_queue_families, nullptr); std::vector queue_family_properties_list(num_queue_families); - instance_dispatch_table.GetPhysicalDeviceQueueFamilyProperties(physical_device, &num_queue_families, + DispatchGetPhysicalDeviceQueueFamilyProperties(physical_device, &num_queue_families, queue_family_properties_list.data()); Add(CreateQueue(queue, queue_family_index, queue_index, flags, queue_family_properties_list[queue_family_index])); @@ -2123,7 +2122,7 @@ void ValidationStateTracker::PostCallRecordCreateRayTracingPipelinesKHR( // `deferred_operation_post_check`. auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (wrap_handles) { + if (dispatch_->wrap_handles) { deferredOperation = layer_data->Unwrap(deferredOperation); } std::vector &)>> cleanup_fn; diff --git a/layers/state_tracker/state_tracker.h b/layers/state_tracker/state_tracker.h index a04aa17ccae..6840da97cd4 100644 --- a/layers/state_tracker/state_tracker.h +++ b/layers/state_tracker/state_tracker.h @@ -19,10 +19,10 @@ */ #pragma once -#include "generated/chassis.h" +#include "chassis/validation_object.h" #include "utils/hash_vk_types.h" #include "state_tracker/video_session_state.h" -#include "generated/layer_chassis_dispatch.h" +#include "chassis/dispatch_object.h" #include "generated/device_features.h" #include "error_message/logging.h" #include "containers/custom_containers.h" diff --git a/layers/state_tracker/video_session_state.cpp b/layers/state_tracker/video_session_state.cpp index fef8ccf15f4..a41796e5ac7 100644 --- a/layers/state_tracker/video_session_state.cpp +++ b/layers/state_tracker/video_session_state.cpp @@ -17,7 +17,7 @@ #include "state_tracker/video_session_state.h" #include "state_tracker/image_state.h" #include "state_tracker/state_tracker.h" -#include "generated/layer_chassis_dispatch.h" +#include "generated/dispatch_functions.h" #include diff --git a/layers/stateless/sl_cmd_buffer_dynamic.cpp b/layers/stateless/sl_cmd_buffer_dynamic.cpp index afa0029c156..05a45f49612 100644 --- a/layers/stateless/sl_cmd_buffer_dynamic.cpp +++ b/layers/stateless/sl_cmd_buffer_dynamic.cpp @@ -17,7 +17,7 @@ */ #include "stateless/stateless_validation.h" -#include "generated/layer_chassis_dispatch.h" +#include "generated/dispatch_functions.h" bool StatelessValidation::manual_PreCallValidateCmdSetViewportWithCount(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport *pViewports, diff --git a/layers/stateless/sl_external_object.cpp b/layers/stateless/sl_external_object.cpp index b6f81aebcb9..808816eee37 100644 --- a/layers/stateless/sl_external_object.cpp +++ b/layers/stateless/sl_external_object.cpp @@ -18,7 +18,7 @@ #include "stateless/stateless_validation.h" #include "generated/enum_flag_bits.h" -#include "generated/layer_chassis_dispatch.h" +#include "generated/dispatch_functions.h" bool StatelessValidation::manual_PreCallValidateGetMemoryFdKHR(VkDevice device, const VkMemoryGetFdInfoKHR *pGetFdInfo, int *pFd, const ErrorObject &error_obj) const { @@ -500,4 +500,4 @@ bool StatelessValidation::ValidateAllocateMemoryExternal(VkDevice device, const #endif // VK_USE_PLATFORM_METAL_EXT return skip; -} \ No newline at end of file +} diff --git a/layers/stateless/sl_instance_device.cpp b/layers/stateless/sl_instance_device.cpp index e63409a3e10..97d6ec7337c 100644 --- a/layers/stateless/sl_instance_device.cpp +++ b/layers/stateless/sl_instance_device.cpp @@ -17,7 +17,7 @@ */ #include "stateless/stateless_validation.h" -#include "generated/layer_chassis_dispatch.h" +#include "generated/dispatch_functions.h" // Traits objects to allow string_join to operate on collections of const char * template @@ -245,9 +245,9 @@ void StatelessValidation::CommonPostCallRecordEnumeratePhysicalDevice(const VkPh uint32_t ext_count = 0; vvl::unordered_set dev_exts_enumerated{}; std::vector ext_props{}; - instance_dispatch_table.EnumerateDeviceExtensionProperties(phys_device, nullptr, &ext_count, nullptr); + DispatchEnumerateDeviceExtensionProperties(phys_device, nullptr, &ext_count, nullptr); ext_props.resize(ext_count); - instance_dispatch_table.EnumerateDeviceExtensionProperties(phys_device, nullptr, &ext_count, ext_props.data()); + DispatchEnumerateDeviceExtensionProperties(phys_device, nullptr, &ext_count, ext_props.data()); for (uint32_t j = 0; j < ext_count; j++) { vvl::Extension extension = GetExtension(ext_props[j].extensionName); dev_exts_enumerated.insert(extension); @@ -303,10 +303,7 @@ void StatelessValidation::PostCallRecordCreateDevice(VkPhysicalDevice physicalDe const RecordObject &record_obj) { auto device_data = GetLayerDataPtr(GetDispatchKey(*pDevice), layer_data_map); if (record_obj.result != VK_SUCCESS) return; - auto stateless_validation = device_data->GetValidationObject(); - - // Parmeter validation also uses extension data - stateless_validation->device_extensions = this->device_extensions; + auto stateless_validation = static_cast(device_data->GetValidationObject(LayerObjectTypeParameterValidation)); VkPhysicalDeviceProperties device_properties = {}; // Need to get instance and do a getlayerdata call... @@ -1031,4 +1028,4 @@ bool StatelessValidation::manual_PreCallValidateGetPhysicalDeviceProperties2(VkP } } return skip; -} \ No newline at end of file +} diff --git a/layers/stateless/sl_pipeline.cpp b/layers/stateless/sl_pipeline.cpp index 75dbe552aa9..73b8a862fb0 100644 --- a/layers/stateless/sl_pipeline.cpp +++ b/layers/stateless/sl_pipeline.cpp @@ -19,7 +19,7 @@ #include "error_message/error_location.h" #include "stateless/stateless_validation.h" #include "generated/enum_flag_bits.h" -#include "generated/layer_chassis_dispatch.h" +#include "generated/dispatch_functions.h" #include "stateless/sl_vuid_maps.h" bool StatelessValidation::manual_PreCallValidateCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo *pCreateInfo, diff --git a/layers/stateless/sl_utils.cpp b/layers/stateless/sl_utils.cpp index 22f4dcdb320..759773eaf8f 100644 --- a/layers/stateless/sl_utils.cpp +++ b/layers/stateless/sl_utils.cpp @@ -18,8 +18,6 @@ #include "stateless/stateless_validation.h" -#include "generated/chassis.h" - bool StatelessValidation::CheckPromotedApiAgainstVulkanVersion(VkInstance instance, const Location &loc, const uint32_t promoted_version) const { bool skip = false; diff --git a/layers/stateless/stateless_validation.h b/layers/stateless/stateless_validation.h index d4096c9d6e1..d7fcd0e60fc 100644 --- a/layers/stateless/stateless_validation.h +++ b/layers/stateless/stateless_validation.h @@ -23,7 +23,7 @@ #include "generated/error_location_helper.h" #include "sync/sync_utils.h" #include "utils/vk_layer_utils.h" -#include "generated/chassis.h" +#include "chassis/validation_object.h" #include "generated/device_features.h" class StatelessValidation : public ValidationObject { diff --git a/layers/thread_tracker/thread_safety_validation.cpp b/layers/thread_tracker/thread_safety_validation.cpp index 6cd4e263784..99cd2d1f69d 100644 --- a/layers/thread_tracker/thread_safety_validation.cpp +++ b/layers/thread_tracker/thread_safety_validation.cpp @@ -15,8 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "generated/chassis.h" -#include "generated/layer_chassis_dispatch.h" // wrap_handles declaration +#include "generated/dispatch_functions.h" #include "thread_tracker/thread_safety_validation.h" ReadLockGuard ThreadSafety::ReadLock() const { return ReadLockGuard(validation_object_mutex, std::defer_lock); } @@ -720,7 +719,7 @@ void ThreadSafety::PostCallRecordCreateRayTracingPipelinesKHR(VkDevice device, V const bool is_operation_deferred = (deferredOperation != VK_NULL_HANDLE && record_obj.result == VK_OPERATION_DEFERRED_KHR); if (is_operation_deferred) { auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (wrap_handles) { + if (dispatch_->wrap_handles) { deferredOperation = layer_data->Unwrap(deferredOperation); } diff --git a/layers/thread_tracker/thread_safety_validation.h b/layers/thread_tracker/thread_safety_validation.h index b510160cd7c..c8cb9f5b442 100644 --- a/layers/thread_tracker/thread_safety_validation.h +++ b/layers/thread_tracker/thread_safety_validation.h @@ -23,6 +23,7 @@ #include #include #include +#include "chassis/validation_object.h" #include "utils/vk_layer_utils.h" VK_DEFINE_NON_DISPATCHABLE_HANDLE(DISTINCT_NONDISPATCHABLE_PHONY_HANDLE) diff --git a/layers/utils/ray_tracing_utils.cpp b/layers/utils/ray_tracing_utils.cpp index 56b7dca4a1b..fa4af1ba63c 100644 --- a/layers/utils/ray_tracing_utils.cpp +++ b/layers/utils/ray_tracing_utils.cpp @@ -16,7 +16,7 @@ #include "ray_tracing_utils.h" -#include "generated/layer_chassis_dispatch.h" +#include "generated/dispatch_functions.h" #include "containers/custom_containers.h" #include diff --git a/layers/vulkan/generated/best_practices.cpp b/layers/vulkan/generated/best_practices.cpp index 27e27e4ad78..08f547f98ee 100644 --- a/layers/vulkan/generated/best_practices.cpp +++ b/layers/vulkan/generated/best_practices.cpp @@ -22,7 +22,6 @@ // NOLINTBEGIN -#include "chassis.h" #include "best_practices/best_practices_validation.h" DeprecationData GetDeprecatedData(vvl::Extension extension_name) { diff --git a/layers/vulkan/generated/chassis.cpp b/layers/vulkan/generated/chassis.cpp index 813bbdb92bd..cd0972dabb7 100644 --- a/layers/vulkan/generated/chassis.cpp +++ b/layers/vulkan/generated/chassis.cpp @@ -24,1548 +24,105 @@ // NOLINTBEGIN +#include "chassis/chassis.h" #include #include #include -#include "chassis.h" +#include "chassis/dispatch_object.h" +#include "chassis/validation_object.h" #include "layer_options.h" -#include "layer_chassis_dispatch.h" #include "state_tracker/descriptor_sets.h" #include "chassis/chassis_modification_state.h" +#include "core_checks/core_validation.h" -#include "profiling/profiling.h" - -thread_local WriteLockGuard* ValidationObject::record_guard{}; - -small_unordered_map layer_data_map; - -// Global unique object identifier. -std::atomic global_unique_id(1ULL); -// Map uniqueID to actual object handle. Accesses to the map itself are -// internally synchronized. -vvl::concurrent_unordered_map unique_id_mapping; - -// State we track in order to populate HandleData for things such as ignored pointers -static vvl::unordered_map secondary_cb_map{}; -static std::shared_mutex secondary_cb_map_mutex; - -bool wrap_handles = true; - -#define OBJECT_LAYER_DESCRIPTION "khronos_validation" - -// Include layer validation object definitions -#include "thread_tracker/thread_safety_validation.h" -#include "stateless/stateless_validation.h" -#include "object_tracker/object_lifetime_validation.h" -#include "core_checks/core_validation.h" -#include "best_practices/best_practices_validation.h" -#include "gpu/core/gpuav.h" -#include "sync/sync_validation.h" - -// This header file must be included after the above validation object class definitions -#include "chassis_dispatch_helper.h" - -// Extension exposed by the validation layer -static constexpr std::array kInstanceExtensions = { - VkExtensionProperties{VK_EXT_DEBUG_REPORT_EXTENSION_NAME, VK_EXT_DEBUG_REPORT_SPEC_VERSION}, - VkExtensionProperties{VK_EXT_DEBUG_UTILS_EXTENSION_NAME, VK_EXT_DEBUG_UTILS_SPEC_VERSION}, - VkExtensionProperties{VK_EXT_VALIDATION_FEATURES_EXTENSION_NAME, VK_EXT_VALIDATION_FEATURES_SPEC_VERSION}, - VkExtensionProperties{VK_EXT_LAYER_SETTINGS_EXTENSION_NAME, VK_EXT_LAYER_SETTINGS_SPEC_VERSION}, -}; -static constexpr std::array kDeviceExtensions = { - VkExtensionProperties{VK_EXT_VALIDATION_CACHE_EXTENSION_NAME, VK_EXT_VALIDATION_CACHE_SPEC_VERSION}, - VkExtensionProperties{VK_EXT_DEBUG_MARKER_EXTENSION_NAME, VK_EXT_DEBUG_MARKER_SPEC_VERSION}, - VkExtensionProperties{VK_EXT_TOOLING_INFO_EXTENSION_NAME, VK_EXT_TOOLING_INFO_SPEC_VERSION}, -}; - -// Layer registration code -static std::vector CreateObjectDispatch(const CHECK_ENABLED& enables, const CHECK_DISABLED& disables) { - std::vector object_dispatch{}; - - // Add VOs to dispatch vector. Order here will be the validation dispatch order! - - if (!disables[thread_safety]) { - object_dispatch.emplace_back(new ThreadSafety(nullptr)); - } - if (!disables[stateless_checks]) { - object_dispatch.emplace_back(new StatelessValidation); - } - if (!disables[object_tracking]) { - object_dispatch.emplace_back(new ObjectLifetimes); - } - if (!disables[core_checks]) { - object_dispatch.emplace_back(new CoreChecks); - } - if (enables[best_practices]) { - object_dispatch.emplace_back(new BestPractices); - } - if (enables[gpu_validation] || enables[debug_printf_validation]) { - object_dispatch.emplace_back(new gpuav::Validator); - } - if (enables[sync_validation]) { - object_dispatch.emplace_back(new SyncValidator); - } - return object_dispatch; -} - -static void InitDeviceDispatchObject(DispatchObject* instance_interceptor, DispatchObject* device_interceptor) { - auto disables = instance_interceptor->disabled; - auto enables = instance_interceptor->enabled; - - // Note that this DEFINES THE ORDER IN WHICH THE LAYER VALIDATION OBJECTS ARE CALLED - - if (!disables[thread_safety]) { - device_interceptor->object_dispatch.emplace_back( - new ThreadSafety(instance_interceptor->GetValidationObject())); - } - if (!disables[stateless_checks]) { - device_interceptor->object_dispatch.emplace_back(new StatelessValidation); - } - if (!disables[object_tracking]) { - device_interceptor->object_dispatch.emplace_back(new ObjectLifetimes); - } - if (!disables[core_checks]) { - device_interceptor->object_dispatch.emplace_back(new CoreChecks); - } - if (enables[best_practices]) { - device_interceptor->object_dispatch.emplace_back(new BestPractices); - } - if (enables[gpu_validation] || enables[debug_printf_validation]) { - device_interceptor->object_dispatch.emplace_back(new gpuav::Validator); - } - if (enables[sync_validation]) { - device_interceptor->object_dispatch.emplace_back(new SyncValidator); - } -} - -void ValidationObject::DispatchGetPhysicalDeviceFeatures2Helper(VkPhysicalDevice physicalDevice, - VkPhysicalDeviceFeatures2* pFeatures) const { - if (api_version >= VK_API_VERSION_1_1) { - return DispatchGetPhysicalDeviceFeatures2(physicalDevice, pFeatures); - } else { - return DispatchGetPhysicalDeviceFeatures2KHR(physicalDevice, pFeatures); - } -} - -void ValidationObject::DispatchGetPhysicalDeviceProperties2Helper(VkPhysicalDevice physicalDevice, - VkPhysicalDeviceProperties2* pProperties) const { - if (api_version >= VK_API_VERSION_1_1) { - return DispatchGetPhysicalDeviceProperties2(physicalDevice, pProperties); - } else { - return DispatchGetPhysicalDeviceProperties2KHR(physicalDevice, pProperties); - } -} - -void ValidationObject::DispatchGetPhysicalDeviceFormatProperties2Helper(VkPhysicalDevice physicalDevice, VkFormat format, - VkFormatProperties2* pFormatProperties) const { - if (api_version >= VK_API_VERSION_1_1) { - return DispatchGetPhysicalDeviceFormatProperties2(physicalDevice, format, pFormatProperties); - } else { - return DispatchGetPhysicalDeviceFormatProperties2KHR(physicalDevice, format, pFormatProperties); - } -} - -VkResult ValidationObject::DispatchGetPhysicalDeviceImageFormatProperties2Helper( - VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, - VkImageFormatProperties2* pImageFormatProperties) const { - if (api_version >= VK_API_VERSION_1_1) { - return DispatchGetPhysicalDeviceImageFormatProperties2(physicalDevice, pImageFormatInfo, pImageFormatProperties); - } else { - return DispatchGetPhysicalDeviceImageFormatProperties2KHR(physicalDevice, pImageFormatInfo, pImageFormatProperties); - } -} - -void ValidationObject::DispatchGetPhysicalDeviceQueueFamilyProperties2Helper( - VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties) const { - if (api_version >= VK_API_VERSION_1_1) { - return DispatchGetPhysicalDeviceQueueFamilyProperties2(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); - } else { - return DispatchGetPhysicalDeviceQueueFamilyProperties2KHR(physicalDevice, pQueueFamilyPropertyCount, - pQueueFamilyProperties); - } -} - -void ValidationObject::DispatchGetPhysicalDeviceMemoryProperties2Helper( - VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties) const { - if (api_version >= VK_API_VERSION_1_1) { - return DispatchGetPhysicalDeviceMemoryProperties2(physicalDevice, pMemoryProperties); - } else { - return DispatchGetPhysicalDeviceMemoryProperties2KHR(physicalDevice, pMemoryProperties); - } -} - -void ValidationObject::DispatchGetPhysicalDeviceSparseImageFormatProperties2Helper( - VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, - VkSparseImageFormatProperties2* pProperties) const { - if (api_version >= VK_API_VERSION_1_1) { - return DispatchGetPhysicalDeviceSparseImageFormatProperties2(physicalDevice, pFormatInfo, pPropertyCount, pProperties); - } else { - return DispatchGetPhysicalDeviceSparseImageFormatProperties2KHR(physicalDevice, pFormatInfo, pPropertyCount, pProperties); - } -} - -void ValidationObject::DispatchGetPhysicalDeviceExternalSemaphorePropertiesHelper( - VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, - VkExternalSemaphoreProperties* pExternalSemaphoreProperties) const { - if (api_version >= VK_API_VERSION_1_1) { - return DispatchGetPhysicalDeviceExternalSemaphoreProperties(physicalDevice, pExternalSemaphoreInfo, - pExternalSemaphoreProperties); - } else { - return DispatchGetPhysicalDeviceExternalSemaphorePropertiesKHR(physicalDevice, pExternalSemaphoreInfo, - pExternalSemaphoreProperties); - } -} - -void ValidationObject::DispatchGetPhysicalDeviceExternalFencePropertiesHelper( - VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, - VkExternalFenceProperties* pExternalFenceProperties) const { - if (api_version >= VK_API_VERSION_1_1) { - return DispatchGetPhysicalDeviceExternalFenceProperties(physicalDevice, pExternalFenceInfo, pExternalFenceProperties); - } else { - return DispatchGetPhysicalDeviceExternalFencePropertiesKHR(physicalDevice, pExternalFenceInfo, pExternalFenceProperties); - } -} - -void ValidationObject::DispatchGetPhysicalDeviceExternalBufferPropertiesHelper( - VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, - VkExternalBufferProperties* pExternalBufferProperties) const { - if (api_version >= VK_API_VERSION_1_1) { - return DispatchGetPhysicalDeviceExternalBufferProperties(physicalDevice, pExternalBufferInfo, pExternalBufferProperties); - } else { - return DispatchGetPhysicalDeviceExternalBufferPropertiesKHR(physicalDevice, pExternalBufferInfo, pExternalBufferProperties); - } -} - -// Global list of sType,size identifiers -std::vector>& GetCustomStypeInfo() { - static std::vector> custom_stype_info{}; - return custom_stype_info; -} - -ValidationObject* DispatchObject::GetValidationObject(LayerObjectTypeId object_type) const { - for (auto validation_object : object_dispatch) { - if (validation_object->container_type == object_type) { - return validation_object; - } - } - return nullptr; -} - -template -ValidationObjectType* DispatchObject::GetValidationObject() const { - LayerObjectTypeId type_id; - if constexpr (std::is_same_v) { - type_id = LayerObjectTypeThreading; - } else if constexpr (std::is_same_v) { - type_id = LayerObjectTypeParameterValidation; - } else if constexpr (std::is_same_v) { - type_id = LayerObjectTypeObjectTracker; - } else if constexpr (std::is_same_v) { - type_id = LayerObjectTypeCoreValidation; - } else { - static_assert(vvl::dependent_false_v, "unsupported validation object type"); - } - return static_cast(GetValidationObject(type_id)); -} - -template ThreadSafety* DispatchObject::GetValidationObject() const; -template StatelessValidation* DispatchObject::GetValidationObject() const; -template ObjectLifetimes* DispatchObject::GetValidationObject() const; -template CoreChecks* DispatchObject::GetValidationObject() const; - -// Takes the validation type and removes it from the chassis so it will not be called anymore -// Designed for things like GPU-AV to remove itself while keeping everything else alive -void DispatchObject::ReleaseDeviceValidationObject(LayerObjectTypeId type_id) const { - for (auto object_it = object_dispatch.begin(); object_it != object_dispatch.end(); object_it++) { - if ((*object_it)->container_type == type_id) { - ValidationObject* object = *object_it; - - object_dispatch.erase(object_it); - - for (auto intercept_vector_it = intercept_vectors.begin(); intercept_vector_it != intercept_vectors.end(); - intercept_vector_it++) { - for (auto intercept_object_it = intercept_vector_it->begin(); intercept_object_it != intercept_vector_it->end(); - intercept_object_it++) { - if (object == *intercept_object_it) { - intercept_vector_it->erase(intercept_object_it); - break; - } - } - } - - // We can't destroy the object itself now as it might be unsafe (things are still being used) - // If the rare case happens we need to release, we will cleanup later when we normally would have cleaned this up - aborted_object_dispatch.push_back(object); - break; - } - } -} - -// Incase we need to teardown things early, we want to do it safely, so we will keep the entrypoints into layer, but just remove all -// the internal chassis hooks so that any call becomes a no-op (but still dispatches into the driver) -void DispatchObject::ReleaseAllValidationObjects() const { - // Some chassis loops use the intercept_vectors instead of looking up the object - for (auto& intercept_vector : intercept_vectors) { - intercept_vector.clear(); - } - - for (auto object_it = object_dispatch.begin(); object_it != object_dispatch.end(); object_it++) { - ValidationObject* object = *object_it; - aborted_object_dispatch.push_back(object); - } - object_dispatch.clear(); -} - -namespace vulkan_layer_chassis { - -static const VkLayerProperties global_layer = { - OBJECT_LAYER_NAME, - VK_LAYER_API_VERSION, - 1, - "LunarG validation Layer", -}; - -typedef enum ApiFunctionType { kFuncTypeInst = 0, kFuncTypePdev = 1, kFuncTypeDev = 2 } ApiFunctionType; - -typedef struct { - ApiFunctionType function_type; - void* funcptr; -} function_data; - -const vvl::unordered_map& GetNameToFuncPtrMap(); - -// Manually written functions - -// Check enabled instance extensions against supported instance extension whitelist -static void InstanceExtensionWhitelist(DispatchObject* layer_data, const VkInstanceCreateInfo* pCreateInfo, VkInstance instance) { - for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) { - // Check for recognized instance extensions - vvl::Extension extension = GetExtension(pCreateInfo->ppEnabledExtensionNames[i]); - if (!IsInstanceExtension(extension)) { - Location loc(vvl::Func::vkCreateInstance); - layer_data->LogWarning(kVUIDUndefined, layer_data->instance, - loc.dot(vvl::Field::pCreateInfo).dot(vvl::Field::ppEnabledExtensionNames, i), - "%s is not supported by this layer. Using this extension may adversely affect validation " - "results and/or produce undefined behavior.", - pCreateInfo->ppEnabledExtensionNames[i]); - } - } -} - -// Check enabled device extensions against supported device extension whitelist -static void DeviceExtensionWhitelist(DispatchObject* layer_data, const VkDeviceCreateInfo* pCreateInfo, VkDevice device) { - for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) { - // Check for recognized device extensions - vvl::Extension extension = GetExtension(pCreateInfo->ppEnabledExtensionNames[i]); - if (!IsDeviceExtension(extension)) { - Location loc(vvl::Func::vkCreateDevice); - layer_data->LogWarning(kVUIDUndefined, layer_data->device, - loc.dot(vvl::Field::pCreateInfo).dot(vvl::Field::ppEnabledExtensionNames, i), - "%s is not supported by this layer. Using this extension may adversely affect validation " - "results and/or produce undefined behavior.", - pCreateInfo->ppEnabledExtensionNames[i]); - } - } -} - -void OutputLayerStatusInfo(DispatchObject* context) { - std::string list_of_enables; - std::string list_of_disables; - for (uint32_t i = 0; i < kMaxEnableFlags; i++) { - if (context->enabled[i]) { - if (list_of_enables.size()) list_of_enables.append(", "); - list_of_enables.append(GetEnableFlagNameHelper()[i]); - } - } - if (list_of_enables.empty()) { - list_of_enables.append("None"); - } - for (uint32_t i = 0; i < kMaxDisableFlags; i++) { - if (context->disabled[i]) { - if (list_of_disables.size()) list_of_disables.append(", "); - list_of_disables.append(GetDisableFlagNameHelper()[i]); - } - } - if (list_of_disables.empty()) { - list_of_disables.append("None"); - } - - Location loc(vvl::Func::vkCreateInstance); - // Output layer status information message - // TODO - We should just dump all settings to a file (see https://github.com/KhronosGroup/Vulkan-Utility-Libraries/issues/188) - context->LogInfo("WARNING-CreateInstance-status-message", context->instance, loc, - "Khronos Validation Layer Active:\n Current Enables: %s.\n Current Disables: %s.\n", - list_of_enables.c_str(), list_of_disables.c_str()); - - // Create warning message if user is running debug layers. -#ifndef NDEBUG - context->LogPerformanceWarning("WARNING-CreateInstance-debug-warning", context->instance, loc, - "Using debug builds of the validation layers *will* adversely affect performance."); -#endif - if (!context->global_settings.fine_grained_locking) { - context->LogPerformanceWarning( - "WARNING-CreateInstance-locking-warning", context->instance, loc, - "Fine-grained locking is disabled, this will adversely affect performance of multithreaded applications."); - } -} - -// Non-code-generated chassis API functions - -VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetDeviceProcAddr(VkDevice device, const char* funcName) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!ApiParentExtensionEnabled(funcName, &layer_data->device_extensions)) { - return nullptr; - } - const auto& item = GetNameToFuncPtrMap().find(funcName); - if (item != GetNameToFuncPtrMap().end()) { - if (item->second.function_type != kFuncTypeDev) { - Location loc(vvl::Func::vkGetDeviceProcAddr); - // Was discussed in https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/6583 - // This has "valid" behavior to return null, but still worth warning users for this unqiue function - layer_data->LogWarning("WARNING-vkGetDeviceProcAddr-device", device, loc.dot(vvl::Field::pName), - "is trying to grab %s which is an instance level function", funcName); - return nullptr; - } else { - return reinterpret_cast(item->second.funcptr); - } - } - auto& table = layer_data->device_dispatch_table; - if (!table.GetDeviceProcAddr) return nullptr; - return table.GetDeviceProcAddr(device, funcName); -} - -VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetInstanceProcAddr(VkInstance instance, const char* funcName) { - const auto& item = GetNameToFuncPtrMap().find(funcName); - if (item != GetNameToFuncPtrMap().end()) { - return reinterpret_cast(item->second.funcptr); - } - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - auto& table = layer_data->instance_dispatch_table; - if (!table.GetInstanceProcAddr) return nullptr; - return table.GetInstanceProcAddr(instance, funcName); -} - -VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetPhysicalDeviceProcAddr(VkInstance instance, const char* funcName) { - const auto& item = GetNameToFuncPtrMap().find(funcName); - if (item != GetNameToFuncPtrMap().end()) { - if (item->second.function_type != kFuncTypePdev) { - return nullptr; - } else { - return reinterpret_cast(item->second.funcptr); - } - } - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - auto& table = layer_data->instance_dispatch_table; - if (!table.GetPhysicalDeviceProcAddr) return nullptr; - return table.GetPhysicalDeviceProcAddr(instance, funcName); -} - -VKAPI_ATTR VkResult VKAPI_CALL EnumerateInstanceLayerProperties(uint32_t* pCount, VkLayerProperties* pProperties) { - return util_GetLayerProperties(1, &global_layer, pCount, pProperties); -} - -VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, - VkLayerProperties* pProperties) { - return util_GetLayerProperties(1, &global_layer, pCount, pProperties); -} - -VKAPI_ATTR VkResult VKAPI_CALL EnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pCount, - VkExtensionProperties* pProperties) { - if (pLayerName && !strcmp(pLayerName, global_layer.layerName)) { - return util_GetExtensionProperties(static_cast(kInstanceExtensions.size()), kInstanceExtensions.data(), pCount, - pProperties); - } - - return VK_ERROR_LAYER_NOT_PRESENT; -} - -VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, - uint32_t* pCount, VkExtensionProperties* pProperties) { - if (pLayerName && !strcmp(pLayerName, global_layer.layerName)) { - return util_GetExtensionProperties(static_cast(kDeviceExtensions.size()), kDeviceExtensions.data(), pCount, - pProperties); - } - - assert(physicalDevice); - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - return layer_data->instance_dispatch_table.EnumerateDeviceExtensionProperties(physicalDevice, pLayerName, pCount, pProperties); -} - -// This is here as some applications will call exit() which results in all our static allocations (like std::map) having their -// destructor called and destroyed from under us. It is not possible to detect as sometimes (when using things like robin hood) the -// size()/empty() will give false positive that memory is there there. We add this global hook that will go through and remove all -// the function calls such that things can safely run in the case the applicaiton still wants to make Vulkan calls in their atexit() -// handler -void ApplicationAtExit() { - // On a "normal" application, this function is called after vkDestroyInstance and layer_data_map is empty - // - // If there are multiple devices we still want to delete them all as exit() is a global scope call - for (auto object : layer_data_map) { - object.second->ReleaseAllValidationObjects(); - } -} - -VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkInstance* pInstance) { - atexit(ApplicationAtExit); - - VVL_ZoneScoped; - VkLayerInstanceCreateInfo* chain_info = GetChainInfo(pCreateInfo, VK_LAYER_LINK_INFO); - - assert(chain_info->u.pLayerInfo); - PFN_vkGetInstanceProcAddr fpGetInstanceProcAddr = chain_info->u.pLayerInfo->pfnNextGetInstanceProcAddr; - PFN_vkCreateInstance fpCreateInstance = (PFN_vkCreateInstance)fpGetInstanceProcAddr(nullptr, "vkCreateInstance"); - if (fpCreateInstance == nullptr) return VK_ERROR_INITIALIZATION_FAILED; - chain_info->u.pLayerInfo = chain_info->u.pLayerInfo->pNext; - uint32_t specified_version = (pCreateInfo->pApplicationInfo ? pCreateInfo->pApplicationInfo->apiVersion : VK_API_VERSION_1_0); - APIVersion api_version = VK_MAKE_API_VERSION(VK_API_VERSION_VARIANT(specified_version), VK_API_VERSION_MAJOR(specified_version), - VK_API_VERSION_MINOR(specified_version), 0); - - auto debug_report = new DebugReport{}; - debug_report->instance_pnext_chain = vku::SafePnextCopy(pCreateInfo->pNext); - ActivateInstanceDebugCallbacks(debug_report); - - // Set up enable and disable features flags - CHECK_ENABLED local_enables{}; - CHECK_DISABLED local_disables{}; - GlobalSettings local_global_settings = {}; - GpuAVSettings local_gpuav_settings = {}; - SyncValSettings local_syncval_settings = {}; - ConfigAndEnvSettings config_and_env_settings_data{OBJECT_LAYER_DESCRIPTION, pCreateInfo, local_enables, local_disables, - debug_report, - // All settings for various internal layers - &local_global_settings, &local_gpuav_settings, &local_syncval_settings}; - ProcessConfigAndEnvSettings(&config_and_env_settings_data); - - // Create temporary dispatch vector for pre-calls until instance is created - std::vector local_object_dispatch = CreateObjectDispatch(local_enables, local_disables); - - // If handle wrapping is disabled via the ValidationFeatures extension, override build flag - if (local_disables[handle_wrapping]) { - wrap_handles = false; - } - - DispatchObject* framework = new DispatchObject(); - - framework->api_version = api_version; - framework->object_dispatch = local_object_dispatch; - framework->disabled = local_disables; - framework->enabled = local_enables; - framework->global_settings = local_global_settings; - framework->gpuav_settings = local_gpuav_settings; - framework->syncval_settings = local_syncval_settings; - framework->debug_report = debug_report; - framework->instance_extensions.InitFromInstanceCreateInfo(specified_version, pCreateInfo); - - // Initialize the validation objects - for (auto* intercept : local_object_dispatch) { - intercept->api_version = api_version; - intercept->debug_report = debug_report; - intercept->dispatch_ = framework; - } - - // Define logic to cleanup everything in case of an error - auto cleanup_allocations = [debug_report, framework, &local_object_dispatch]() { - DeactivateInstanceDebugCallbacks(debug_report); - vku::FreePnextChain(debug_report->instance_pnext_chain); - LayerDebugUtilsDestroyInstance(debug_report); - for (ValidationObject* object : local_object_dispatch) { - delete object; - } - delete framework; - }; - - // Init dispatch array and call registration functions - bool skip = false; - ErrorObject error_obj(vvl::Func::vkCreateInstance, VulkanTypedHandle()); - for (const ValidationObject* intercept : local_object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateInstance(pCreateInfo, pAllocator, pInstance, error_obj); - if (skip) { - cleanup_allocations(); - return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - - RecordObject record_obj(vvl::Func::vkCreateInstance); - for (ValidationObject* intercept : local_object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateInstance(pCreateInfo, pAllocator, pInstance, record_obj); - } - - VkResult result = fpCreateInstance(pCreateInfo, pAllocator, pInstance); - if (result != VK_SUCCESS) { - cleanup_allocations(); - return result; - } - record_obj.result = result; - framework->instance = *pInstance; - - layer_init_instance_dispatch_table(*pInstance, &framework->instance_dispatch_table, fpGetInstanceProcAddr); - - // We need to call this to properly check which device extensions have been promoted when validating query functions - // that take as input a physical device, which can be called before a logical device has been created. - framework->device_extensions.InitFromDeviceCreateInfo(&framework->instance_extensions, specified_version); - - layer_data_map[GetDispatchKey(*pInstance)] = framework; - OutputLayerStatusInfo(framework); - - for (auto* intercept : framework->object_dispatch) { - intercept->instance_dispatch_table = framework->instance_dispatch_table; - intercept->enabled = framework->enabled; - intercept->disabled = framework->disabled; - intercept->global_settings = framework->global_settings; - intercept->gpuav_settings = framework->gpuav_settings; - intercept->syncval_settings = framework->syncval_settings; - intercept->instance = *pInstance; - intercept->debug_report = debug_report; - intercept->api_version = api_version; - } - - for (ValidationObject* intercept : framework->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateInstance(pCreateInfo, pAllocator, pInstance, record_obj); - } - - InstanceExtensionWhitelist(framework, pCreateInfo, *pInstance); - DeactivateInstanceDebugCallbacks(debug_report); - return result; -} - -VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocationCallbacks* pAllocator) { - VVL_TracyCZone(tracy_zone_precall, true); - dispatch_key key = GetDispatchKey(instance); - auto layer_data = GetLayerDataPtr(key, layer_data_map); - ActivateInstanceDebugCallbacks(layer_data->debug_report); - ErrorObject error_obj(vvl::Func::vkDestroyInstance, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); - - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - intercept->PreCallValidateDestroyInstance(instance, pAllocator, error_obj); - } - - RecordObject record_obj(vvl::Func::vkDestroyInstance); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyInstance(instance, pAllocator, record_obj); - } - - // Before instance is destroyed, allow aborted objects to clean up - for (ValidationObject* intercept : layer_data->aborted_object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyInstance(instance, pAllocator, record_obj); - } - - VVL_TracyCZoneEnd(tracy_zone_precall); - VVL_TracyCZone(tracy_zone_dispatch, true); - layer_data->instance_dispatch_table.DestroyInstance(instance, pAllocator); - VVL_TracyCZoneEnd(tracy_zone_dispatch); - - VVL_TracyCZone(tracy_zone_postcall, true); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyInstance(instance, pAllocator, record_obj); - } - - DeactivateInstanceDebugCallbacks(layer_data->debug_report); - vku::FreePnextChain(layer_data->debug_report->instance_pnext_chain); - - LayerDebugUtilsDestroyInstance(layer_data->debug_report); - - for (auto item = layer_data->object_dispatch.begin(); item != layer_data->object_dispatch.end(); item++) { - delete *item; - } - for (auto item = layer_data->aborted_object_dispatch.begin(); item != layer_data->aborted_object_dispatch.end(); item++) { - delete *item; - } - - FreeLayerDataPtr(key, layer_data_map); - VVL_TracyCZoneEnd(tracy_zone_postcall); - -#if TRACY_MANUAL_LIFETIME - tracy::ShutdownProfiler(); -#endif -} - -VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice gpu, const VkDeviceCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkDevice* pDevice) { - VkLayerDeviceCreateInfo* chain_info = GetChainInfo(pCreateInfo, VK_LAYER_LINK_INFO); - - auto instance_interceptor = GetLayerDataPtr(GetDispatchKey(gpu), layer_data_map); - - PFN_vkGetInstanceProcAddr fpGetInstanceProcAddr = chain_info->u.pLayerInfo->pfnNextGetInstanceProcAddr; - PFN_vkGetDeviceProcAddr fpGetDeviceProcAddr = chain_info->u.pLayerInfo->pfnNextGetDeviceProcAddr; - PFN_vkCreateDevice fpCreateDevice = (PFN_vkCreateDevice)fpGetInstanceProcAddr(instance_interceptor->instance, "vkCreateDevice"); - if (fpCreateDevice == nullptr) { - return VK_ERROR_INITIALIZATION_FAILED; - } - chain_info->u.pLayerInfo = chain_info->u.pLayerInfo->pNext; - - // Get physical device limits for device - VkPhysicalDeviceProperties device_properties = {}; - instance_interceptor->instance_dispatch_table.GetPhysicalDeviceProperties(gpu, &device_properties); - - // Setup the validation tables based on the application API version from the instance and the capabilities of the device driver - auto effective_api_version = std::min(APIVersion(device_properties.apiVersion), instance_interceptor->api_version); - - DispatchObject* device_interceptor = new DispatchObject(); - - device_interceptor->device_extensions.InitFromDeviceCreateInfo(&instance_interceptor->instance_extensions, - effective_api_version, pCreateInfo); - device_interceptor->instance_dispatch_table = instance_interceptor->instance_dispatch_table; - device_interceptor->instance_extensions = instance_interceptor->instance_extensions; - device_interceptor->physical_device = gpu; - device_interceptor->instance = instance_interceptor->instance; - device_interceptor->debug_report = instance_interceptor->debug_report; - - // This is odd but we need to set the current device_extensions in all of the - // instance validation objects so that they are available for validating CreateDevice - for (auto* object : instance_interceptor->object_dispatch) { - object->device_extensions = device_interceptor->device_extensions; - } - - // Make copy to modify as some ValidationObjects will want to add extensions/features on - vku::safe_VkDeviceCreateInfo modified_create_info(pCreateInfo); - - bool skip = false; - ErrorObject error_obj(vvl::Func::vkCreateDevice, VulkanTypedHandle(gpu, kVulkanObjectTypePhysicalDevice)); - for (const ValidationObject* intercept : instance_interceptor->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateDevice(gpu, pCreateInfo, pAllocator, pDevice, error_obj); - if (skip) { - delete device_interceptor; - return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - - RecordObject record_obj(vvl::Func::vkCreateDevice); - for (ValidationObject* intercept : instance_interceptor->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateDevice(gpu, pCreateInfo, pAllocator, pDevice, record_obj, &modified_create_info); - } - - VkResult result = fpCreateDevice(gpu, reinterpret_cast(&modified_create_info), pAllocator, pDevice); - if (result != VK_SUCCESS) { - delete device_interceptor; - return result; - } - record_obj.result = result; - device_interceptor->device = *pDevice; - - // Save local info in device object - device_interceptor->api_version = device_interceptor->device_extensions.InitFromDeviceCreateInfo( - &instance_interceptor->instance_extensions, effective_api_version, - reinterpret_cast(&modified_create_info)); - - layer_init_device_dispatch_table(*pDevice, &device_interceptor->device_dispatch_table, fpGetDeviceProcAddr); - layer_data_map[GetDispatchKey(*pDevice)] = device_interceptor; - - instance_interceptor->debug_report->device_created++; - - InitDeviceDispatchObject(instance_interceptor, device_interceptor); - - // Initialize all of the objects with the appropriate data - for (auto* object : device_interceptor->object_dispatch) { - object->dispatch_ = device_interceptor; - object->device = device_interceptor->device; - object->physical_device = device_interceptor->physical_device; - object->instance = instance_interceptor->instance; - object->debug_report = instance_interceptor->debug_report; - object->device_dispatch_table = device_interceptor->device_dispatch_table; - object->api_version = device_interceptor->api_version; - object->disabled = instance_interceptor->disabled; - object->enabled = instance_interceptor->enabled; - object->global_settings = instance_interceptor->global_settings; - object->gpuav_settings = instance_interceptor->gpuav_settings; - object->syncval_settings = instance_interceptor->syncval_settings; - object->instance_dispatch_table = instance_interceptor->instance_dispatch_table; - object->instance_extensions = instance_interceptor->instance_extensions; - object->device_extensions = device_interceptor->device_extensions; - } - - for (ValidationObject* intercept : instance_interceptor->object_dispatch) { - auto lock = intercept->WriteLock(); - // Send down modified create info as we want to mark enabled features that we sent down on behalf of the app - intercept->PostCallRecordCreateDevice(gpu, reinterpret_cast(&modified_create_info), pAllocator, - pDevice, record_obj); - } - - device_interceptor->InitObjectDispatchVectors(); - - DeviceExtensionWhitelist(device_interceptor, pCreateInfo, *pDevice); - - return result; -} - -// NOTE: Do _not_ skip the dispatch call when destroying a device. Whether or not there was a validation error, -// the loader will destroy the device, and know nothing about future references to this device making it -// impossible for the caller to use this device handle further. IOW, this is our _only_ chance to (potentially) -// dispatch the driver's DestroyDevice function. -VKAPI_ATTR void VKAPI_CALL DestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator) { - dispatch_key key = GetDispatchKey(device); - auto layer_data = GetLayerDataPtr(key, layer_data_map); - ErrorObject error_obj(vvl::Func::vkDestroyDevice, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - intercept->PreCallValidateDestroyDevice(device, pAllocator, error_obj); - } - - RecordObject record_obj(vvl::Func::vkDestroyDevice); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyDevice(device, pAllocator, record_obj); - } - - // Before device is destroyed, allow aborted objects to clean up - for (ValidationObject* intercept : layer_data->aborted_object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyDevice(device, pAllocator, record_obj); - } - - layer_data->device_dispatch_table.DestroyDevice(device, pAllocator); - - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyDevice(device, pAllocator, record_obj); - } - - auto instance_interceptor = GetLayerDataPtr(GetDispatchKey(layer_data->physical_device), layer_data_map); - instance_interceptor->debug_report->device_created--; - - for (auto item = layer_data->object_dispatch.begin(); item != layer_data->object_dispatch.end(); item++) { - delete *item; - } - for (auto item = layer_data->aborted_object_dispatch.begin(); item != layer_data->aborted_object_dispatch.end(); item++) { - delete *item; - } - - FreeLayerDataPtr(key, layer_data_map); -} - -// Special-case APIs for which core_validation needs custom parameter lists and/or modifies parameters - -VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, - const VkGraphicsPipelineCreateInfo* pCreateInfos, - const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { - VVL_ZoneScoped; - - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkCreateGraphicsPipelines, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); - - PipelineStates pipeline_states[LayerObjectTypeMaxEnum]; - chassis::CreateGraphicsPipelines chassis_state(pCreateInfos); - - { - VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, - pAllocator, pPipelines, error_obj, - pipeline_states[intercept->container_type], chassis_state); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - - RecordObject record_obj(vvl::Func::vkCreateGraphicsPipelines); - { - VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, - pPipelines, record_obj, pipeline_states[intercept->container_type], - chassis_state); - } - } - - VkResult result; - { - VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateGraphicsPipelines(device, pipelineCache, createInfoCount, chassis_state.pCreateInfos, pAllocator, - pPipelines); - } - record_obj.result = result; - - { - VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, - pPipelines, record_obj, pipeline_states[intercept->container_type], - chassis_state); - } - } - return result; -} - -// This API saves some core_validation pipeline state state on the stack for performance purposes -VKAPI_ATTR VkResult VKAPI_CALL CreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, - const VkComputePipelineCreateInfo* pCreateInfos, - const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { - VVL_ZoneScoped; - - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkCreateComputePipelines, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); - - PipelineStates pipeline_states[LayerObjectTypeMaxEnum]; - chassis::CreateComputePipelines chassis_state(pCreateInfos); - - { - VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, - pAllocator, pPipelines, error_obj, - pipeline_states[intercept->container_type], chassis_state); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - - RecordObject record_obj(vvl::Func::vkCreateComputePipelines); - { - VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, - pPipelines, record_obj, pipeline_states[intercept->container_type], - chassis_state); - } - } - - VkResult result; - { - VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateComputePipelines(device, pipelineCache, createInfoCount, chassis_state.pCreateInfos, pAllocator, - pPipelines); - } - record_obj.result = result; - - { - VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, - pPipelines, record_obj, pipeline_states[intercept->container_type], - chassis_state); - } - } - return result; -} - -VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, - const VkRayTracingPipelineCreateInfoNV* pCreateInfos, - const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkCreateRayTracingPipelinesNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); - - PipelineStates pipeline_states[LayerObjectTypeMaxEnum]; - chassis::CreateRayTracingPipelinesNV chassis_state(pCreateInfos); - - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, - pAllocator, pPipelines, error_obj, - pipeline_states[intercept->container_type], chassis_state); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - - RecordObject record_obj(vvl::Func::vkCreateRayTracingPipelinesNV); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, - pPipelines, record_obj, pipeline_states[intercept->container_type], - chassis_state); - } - - VkResult result = DispatchCreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, chassis_state.pCreateInfos, - pAllocator, pPipelines); - record_obj.result = result; - - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, - pPipelines, record_obj, pipeline_states[intercept->container_type], - chassis_state); - } - return result; -} - -VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, - VkPipelineCache pipelineCache, uint32_t createInfoCount, - const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, - const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { - VVL_ZoneScoped; - - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkCreateRayTracingPipelinesKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); - - PipelineStates pipeline_states[LayerObjectTypeMaxEnum]; - auto chassis_state = std::make_shared(pCreateInfos); - - { - VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateRayTracingPipelinesKHR( - device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, error_obj, - pipeline_states[intercept->container_type], *chassis_state); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - - RecordObject record_obj(vvl::Func::vkCreateRayTracingPipelinesKHR); - { - VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, - pCreateInfos, pAllocator, pPipelines, record_obj, - pipeline_states[intercept->container_type], *chassis_state); - } - } - - VkResult result; - { - VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, - chassis_state->pCreateInfos, pAllocator, pPipelines); - } - record_obj.result = result; - - { - VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, - pCreateInfos, pAllocator, pPipelines, record_obj, - pipeline_states[intercept->container_type], chassis_state); - } - } - return result; -} - -// This API needs the ability to modify a down-chain parameter -VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout) { - VVL_ZoneScoped; - - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkCreatePipelineLayout, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); - - { - VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreatePipelineLayout]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreatePipelineLayout(device, pCreateInfo, pAllocator, pPipelineLayout, error_obj); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - - chassis::CreatePipelineLayout chassis_state{}; - chassis_state.modified_create_info = *pCreateInfo; - - RecordObject record_obj(vvl::Func::vkCreatePipelineLayout); - { - VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreatePipelineLayout(device, pCreateInfo, pAllocator, pPipelineLayout, record_obj, - chassis_state); - } - } - - VkResult result; - { - VVL_ZoneScopedN("Dispatch"); - result = DispatchCreatePipelineLayout(device, &chassis_state.modified_create_info, pAllocator, pPipelineLayout); - } - record_obj.result = result; - - { - VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreatePipelineLayout]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreatePipelineLayout(device, pCreateInfo, pAllocator, pPipelineLayout, record_obj); - } - } - return result; -} - -// This API needs some local stack data for performance reasons and also may modify a parameter -VKAPI_ATTR VkResult VKAPI_CALL CreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule) { - VVL_ZoneScoped; - - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkCreateShaderModule, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); - - { - VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule, error_obj); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - - chassis::CreateShaderModule chassis_state{}; - - RecordObject record_obj(vvl::Func::vkCreateShaderModule); - { - VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule, record_obj, chassis_state); - } - } - - // Special extra check if SPIR-V itself fails runtime validation in PreCallRecord - if (chassis_state.skip) return VK_ERROR_VALIDATION_FAILED_EXT; - VkResult result; - { - VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule); - } - record_obj.result = result; - { - VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule, record_obj, chassis_state); - } - } - return result; -} - -VKAPI_ATTR VkResult VKAPI_CALL CreateShadersEXT(VkDevice device, uint32_t createInfoCount, - const VkShaderCreateInfoEXT* pCreateInfos, const VkAllocationCallbacks* pAllocator, - VkShaderEXT* pShaders) { - VVL_ZoneScoped; - - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkCreateShadersEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); - - chassis::ShaderObject chassis_state(createInfoCount, pCreateInfos); - - { - VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateCreateShadersEXT(device, createInfoCount, pCreateInfos, pAllocator, pShaders, error_obj); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - - RecordObject record_obj(vvl::Func::vkCreateShadersEXT); - { - VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateShadersEXT(device, createInfoCount, pCreateInfos, pAllocator, pShaders, record_obj, - chassis_state); - } - } - - // Special extra check if SPIR-V itself fails runtime validation in PreCallRecord - if (chassis_state.skip) return VK_ERROR_VALIDATION_FAILED_EXT; - - VkResult result; - { - VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateShadersEXT(device, createInfoCount, chassis_state.pCreateInfos, pAllocator, pShaders); - } - record_obj.result = result; - - { - VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateShadersEXT(device, createInfoCount, pCreateInfos, pAllocator, pShaders, record_obj, - chassis_state); - } - } - return result; -} - -VKAPI_ATTR VkResult VKAPI_CALL AllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, - VkDescriptorSet* pDescriptorSets) { - VVL_ZoneScoped; - - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkAllocateDescriptorSets, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); - - vvl::AllocateDescriptorSetsData ads_state[LayerObjectTypeMaxEnum]; - - { - VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - ads_state[intercept->container_type].Init(pAllocateInfo->descriptorSetCount); - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateAllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets, error_obj, - ads_state[intercept->container_type]); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - - RecordObject record_obj(vvl::Func::vkAllocateDescriptorSets); - { - VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordAllocateDescriptorSets]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordAllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets, record_obj); - } - } - - VkResult result; - { - VVL_ZoneScopedN("Dispatch"); - result = DispatchAllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets); - } - record_obj.result = result; - - { - VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordAllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets, record_obj, - ads_state[intercept->container_type]); - } - } - return result; -} - -// This API needs the ability to modify a down-chain parameter -VKAPI_ATTR VkResult VKAPI_CALL CreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer) { - VVL_ZoneScoped; - - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkCreateBuffer, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); - - { - VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateBuffer]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateBuffer(device, pCreateInfo, pAllocator, pBuffer, error_obj); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - - chassis::CreateBuffer chassis_state{}; - chassis_state.modified_create_info = *pCreateInfo; - - RecordObject record_obj(vvl::Func::vkCreateBuffer); - { - VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateBuffer(device, pCreateInfo, pAllocator, pBuffer, record_obj, chassis_state); - } - } - - VkResult result; - { - VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateBuffer(device, &chassis_state.modified_create_info, pAllocator, pBuffer); - } - record_obj.result = result; - - { - VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateBuffer]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateBuffer(device, pCreateInfo, pAllocator, pBuffer, record_obj); - } - } - return result; -} - -// This API needs to ensure that per-swapchain VkResult results are available -VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInfoKHR* pPresentInfo) { - VVL_ZoneScoped; - - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkQueuePresentKHR, VulkanTypedHandle(queue, kVulkanObjectTypeQueue)); - { - VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateQueuePresentKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateQueuePresentKHR(queue, pPresentInfo, error_obj); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - RecordObject record_obj(vvl::Func::vkQueuePresentKHR); - { - VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordQueuePresentKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordQueuePresentKHR(queue, pPresentInfo, record_obj); - } - } - - // Track per-swapchain results when there is more than one swapchain and VkPresentInfoKHR::pResults is null - small_vector present_results; - VkPresentInfoKHR modified_present_info; - if (pPresentInfo && pPresentInfo->swapchainCount > 1 && pPresentInfo->pResults == nullptr) { - present_results.resize(pPresentInfo->swapchainCount); - modified_present_info = *pPresentInfo; - modified_present_info.pResults = present_results.data(); - pPresentInfo = &modified_present_info; - } - - VkResult result; - { - VVL_ZoneScopedN("Dispatch"); - result = DispatchQueuePresentKHR(queue, pPresentInfo); - } - VVL_TracyCFrameMark; - record_obj.result = result; - { - VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordQueuePresentKHR]) { - auto lock = intercept->WriteLock(); - - if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; - } - intercept->PostCallRecordQueuePresentKHR(queue, pPresentInfo, record_obj); - } - } - return result; -} - -VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo) { - VVL_ZoneScoped; - - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - bool skip = false; - chassis::HandleData handle_data; - { - auto lock = ReadLockGuard(secondary_cb_map_mutex); - handle_data.command_buffer.is_secondary = (secondary_cb_map.find(commandBuffer) != secondary_cb_map.end()); - } - - ErrorObject error_obj(vvl::Func::vkBeginCommandBuffer, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer), - &handle_data); - { - VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateBeginCommandBuffer]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateBeginCommandBuffer(commandBuffer, pBeginInfo, error_obj); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - - RecordObject record_obj(vvl::Func::vkBeginCommandBuffer, &handle_data); - { - VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordBeginCommandBuffer]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordBeginCommandBuffer(commandBuffer, pBeginInfo, record_obj); - } - } - - VkResult result; - { - VVL_ZoneScopedN("Dispatch"); - result = DispatchBeginCommandBuffer(commandBuffer, pBeginInfo, handle_data.command_buffer.is_secondary); - } - record_obj.result = result; - - { - VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordBeginCommandBuffer]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordBeginCommandBuffer(commandBuffer, pBeginInfo, record_obj); - } - } - return result; -} - -// Handle tooling queries manually as this is a request for layer information -static const VkPhysicalDeviceToolPropertiesEXT khronos_layer_tool_props = { - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT, - nullptr, - "Khronos Validation Layer", - STRINGIFY(VK_HEADER_VERSION), - VK_TOOL_PURPOSE_VALIDATION_BIT_EXT | VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT | VK_TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT | - VK_TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT, - "Khronos Validation Layer", - OBJECT_LAYER_NAME}; - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceToolPropertiesEXT(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, - VkPhysicalDeviceToolPropertiesEXT* pToolProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceToolPropertiesEXT, - VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); - - auto original_pToolProperties = pToolProperties; - - if (pToolProperties != nullptr && *pToolCount > 0) { - *pToolProperties = khronos_layer_tool_props; - pToolProperties = ((*pToolCount > 1) ? &pToolProperties[1] : nullptr); - (*pToolCount)--; - } - - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateGetPhysicalDeviceToolPropertiesEXT(physicalDevice, pToolCount, pToolProperties, error_obj); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - - RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceToolPropertiesEXT); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceToolPropertiesEXT(physicalDevice, pToolCount, pToolProperties, record_obj); - } - - VkResult result = DispatchGetPhysicalDeviceToolPropertiesEXT(physicalDevice, pToolCount, pToolProperties); - record_obj.result = result; +#include "profiling/profiling.h" - if (original_pToolProperties != nullptr) { - pToolProperties = original_pToolProperties; - } - assert(*pToolCount != std::numeric_limits::max()); - (*pToolCount)++; +// Extension exposed by the validation layer +static constexpr std::array kInstanceExtensions = { + VkExtensionProperties{VK_EXT_DEBUG_REPORT_EXTENSION_NAME, VK_EXT_DEBUG_REPORT_SPEC_VERSION}, + VkExtensionProperties{VK_EXT_DEBUG_UTILS_EXTENSION_NAME, VK_EXT_DEBUG_UTILS_SPEC_VERSION}, + VkExtensionProperties{VK_EXT_VALIDATION_FEATURES_EXTENSION_NAME, VK_EXT_VALIDATION_FEATURES_SPEC_VERSION}, + VkExtensionProperties{VK_EXT_LAYER_SETTINGS_EXTENSION_NAME, VK_EXT_LAYER_SETTINGS_SPEC_VERSION}, +}; +static constexpr std::array kDeviceExtensions = { + VkExtensionProperties{VK_EXT_VALIDATION_CACHE_EXTENSION_NAME, VK_EXT_VALIDATION_CACHE_SPEC_VERSION}, + VkExtensionProperties{VK_EXT_DEBUG_MARKER_EXTENSION_NAME, VK_EXT_DEBUG_MARKER_SPEC_VERSION}, + VkExtensionProperties{VK_EXT_TOOLING_INFO_EXTENSION_NAME, VK_EXT_TOOLING_INFO_SPEC_VERSION}, +}; +namespace vulkan_layer_chassis { +static const VkLayerProperties global_layer = { + OBJECT_LAYER_NAME, + VK_LAYER_API_VERSION, + 1, + "LunarG validation Layer", +}; - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceToolPropertiesEXT(physicalDevice, pToolCount, pToolProperties, record_obj); - } - return result; +// These functions reference generated data so they cannot be part of chassis_main.cpp +VKAPI_ATTR VkResult VKAPI_CALL EnumerateInstanceLayerProperties(uint32_t* pCount, VkLayerProperties* pProperties) { + return util_GetLayerProperties(1, &global_layer, pCount, pProperties); } -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceToolProperties(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, - VkPhysicalDeviceToolProperties* pToolProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceToolProperties, - VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); - - auto original_pToolProperties = pToolProperties; - - if (pToolProperties != nullptr && *pToolCount > 0) { - *pToolProperties = khronos_layer_tool_props; - pToolProperties = ((*pToolCount > 1) ? &pToolProperties[1] : nullptr); - (*pToolCount)--; - } - - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceToolProperties(physicalDevice, pToolCount, pToolProperties, error_obj); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - - RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceToolProperties); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceToolProperties(physicalDevice, pToolCount, pToolProperties, record_obj); - } - - VkResult result = DispatchGetPhysicalDeviceToolProperties(physicalDevice, pToolCount, pToolProperties); - record_obj.result = result; - - if (original_pToolProperties != nullptr) { - pToolProperties = original_pToolProperties; - } - assert(*pToolCount != std::numeric_limits::max()); - (*pToolCount)++; - - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceToolProperties(physicalDevice, pToolCount, pToolProperties, record_obj); - } - return result; +VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, + VkLayerProperties* pProperties) { + return util_GetLayerProperties(1, &global_layer, pCount, pProperties); } -// ValidationCache APIs do not dispatch - -VKAPI_ATTR VkResult VKAPI_CALL CreateValidationCacheEXT(VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkValidationCacheEXT* pValidationCache) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (auto core_checks = layer_data->GetValidationObject()) { - auto lock = core_checks->WriteLock(); - return core_checks->CoreLayerCreateValidationCacheEXT(device, pCreateInfo, pAllocator, pValidationCache); +VKAPI_ATTR VkResult VKAPI_CALL EnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pCount, + VkExtensionProperties* pProperties) { + if (pLayerName && !strcmp(pLayerName, global_layer.layerName)) { + return util_GetExtensionProperties(static_cast(kInstanceExtensions.size()), kInstanceExtensions.data(), pCount, + pProperties); } - return VK_SUCCESS; -} -VKAPI_ATTR void VKAPI_CALL DestroyValidationCacheEXT(VkDevice device, VkValidationCacheEXT validationCache, - const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (auto core_checks = layer_data->GetValidationObject()) { - auto lock = core_checks->WriteLock(); - core_checks->CoreLayerDestroyValidationCacheEXT(device, validationCache, pAllocator); - } + return VK_ERROR_LAYER_NOT_PRESENT; } -VKAPI_ATTR VkResult VKAPI_CALL MergeValidationCachesEXT(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, - const VkValidationCacheEXT* pSrcCaches) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (auto core_checks = layer_data->GetValidationObject()) { - auto lock = core_checks->WriteLock(); - return core_checks->CoreLayerMergeValidationCachesEXT(device, dstCache, srcCacheCount, pSrcCaches); +VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, + uint32_t* pCount, VkExtensionProperties* pProperties) { + if (pLayerName && !strcmp(pLayerName, global_layer.layerName)) { + return util_GetExtensionProperties(static_cast(kDeviceExtensions.size()), kDeviceExtensions.data(), pCount, + pProperties); } - return VK_SUCCESS; -} -VKAPI_ATTR VkResult VKAPI_CALL GetValidationCacheDataEXT(VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, - void* pData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (auto core_checks = layer_data->GetValidationObject()) { - auto lock = core_checks->WriteLock(); - return core_checks->CoreLayerGetValidationCacheDataEXT(device, validationCache, pDataSize, pData); - } - return VK_SUCCESS; + assert(physicalDevice); + auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return layer_data->instance_dispatch_table.EnumerateDeviceExtensionProperties(physicalDevice, pLayerName, pCount, pProperties); } VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkEnumeratePhysicalDevices, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateEnumeratePhysicalDevices(instance, pPhysicalDeviceCount, pPhysicalDevices, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateEnumeratePhysicalDevices(instance, pPhysicalDeviceCount, pPhysicalDevices, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkEnumeratePhysicalDevices); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordEnumeratePhysicalDevices(instance, pPhysicalDeviceCount, pPhysicalDevices, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordEnumeratePhysicalDevices(instance, pPhysicalDeviceCount, pPhysicalDevices, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchEnumeratePhysicalDevices(instance, pPhysicalDeviceCount, pPhysicalDevices); + result = instance_dispatch->EnumeratePhysicalDevices(instance, pPhysicalDeviceCount, pPhysicalDevices); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordEnumeratePhysicalDevices(instance, pPhysicalDeviceCount, pPhysicalDevices, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordEnumeratePhysicalDevices(instance, pPhysicalDeviceCount, pPhysicalDevices, record_obj); } } return result; @@ -1574,35 +131,35 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDevices(VkInstance instance, uin VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceFeatures, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceFeatures(physicalDevice, pFeatures, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceFeatures(physicalDevice, pFeatures, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceFeatures); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceFeatures(physicalDevice, pFeatures, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceFeatures(physicalDevice, pFeatures, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceFeatures(physicalDevice, pFeatures); + instance_dispatch->GetPhysicalDeviceFeatures(physicalDevice, pFeatures); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceFeatures(physicalDevice, pFeatures, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceFeatures(physicalDevice, pFeatures, record_obj); } } } @@ -1611,36 +168,35 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFormatProperties(VkPhysicalDevice ph VkFormatProperties* pFormatProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceFormatProperties, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateGetPhysicalDeviceFormatProperties(physicalDevice, format, pFormatProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceFormatProperties(physicalDevice, format, pFormatProperties, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceFormatProperties); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceFormatProperties(physicalDevice, format, pFormatProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceFormatProperties(physicalDevice, format, pFormatProperties, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceFormatProperties(physicalDevice, format, pFormatProperties); + instance_dispatch->GetPhysicalDeviceFormatProperties(physicalDevice, format, pFormatProperties); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceFormatProperties(physicalDevice, format, pFormatProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceFormatProperties(physicalDevice, format, pFormatProperties, record_obj); } } } @@ -1651,41 +207,41 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceImageFormatProperties(VkPhysical VkImageFormatProperties* pImageFormatProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceImageFormatProperties, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, - flags, pImageFormatProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, + pImageFormatProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceImageFormatProperties); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, - pImageFormatProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, + pImageFormatProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, - pImageFormatProperties); + result = instance_dispatch->GetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, + pImageFormatProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, - pImageFormatProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, + pImageFormatProperties, record_obj); } } return result; @@ -1694,35 +250,35 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceImageFormatProperties(VkPhysical VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceProperties, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceProperties(physicalDevice, pProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceProperties(physicalDevice, pProperties, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceProperties); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceProperties(physicalDevice, pProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceProperties(physicalDevice, pProperties, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceProperties(physicalDevice, pProperties); + instance_dispatch->GetPhysicalDeviceProperties(physicalDevice, pProperties); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceProperties(physicalDevice, pProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceProperties(physicalDevice, pProperties, record_obj); } } } @@ -1732,38 +288,39 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevi VkQueueFamilyProperties* pQueueFamilyProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceQueueFamilyProperties, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, - pQueueFamilyProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, + pQueueFamilyProperties, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceQueueFamilyProperties); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, - pQueueFamilyProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, + pQueueFamilyProperties, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); + instance_dispatch->GetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, + pQueueFamilyProperties); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, - pQueueFamilyProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, + pQueueFamilyProperties, record_obj); } } } @@ -1772,35 +329,35 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMemoryProperties(VkPhysicalDevice ph VkPhysicalDeviceMemoryProperties* pMemoryProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceMemoryProperties, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceMemoryProperties(physicalDevice, pMemoryProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceMemoryProperties(physicalDevice, pMemoryProperties, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceMemoryProperties); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceMemoryProperties(physicalDevice, pMemoryProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceMemoryProperties(physicalDevice, pMemoryProperties, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceMemoryProperties(physicalDevice, pMemoryProperties); + instance_dispatch->GetPhysicalDeviceMemoryProperties(physicalDevice, pMemoryProperties); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceMemoryProperties(physicalDevice, pMemoryProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceMemoryProperties(physicalDevice, pMemoryProperties, record_obj); } } } @@ -1808,34 +365,34 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMemoryProperties(VkPhysicalDevice ph VKAPI_ATTR void VKAPI_CALL GetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeviceQueue, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeviceQueue]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDeviceQueue(device, queueFamilyIndex, queueIndex, pQueue, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeviceQueue]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDeviceQueue(device, queueFamilyIndex, queueIndex, pQueue, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetDeviceQueue); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeviceQueue]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeviceQueue(device, queueFamilyIndex, queueIndex, pQueue, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeviceQueue]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeviceQueue(device, queueFamilyIndex, queueIndex, pQueue, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetDeviceQueue(device, queueFamilyIndex, queueIndex, pQueue); + device_dispatch->GetDeviceQueue(device, queueFamilyIndex, queueIndex, pQueue); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeviceQueue]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeviceQueue(device, queueFamilyIndex, queueIndex, pQueue, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeviceQueue]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeviceQueue(device, queueFamilyIndex, queueIndex, pQueue, record_obj); } } } @@ -1843,40 +400,40 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceQueue(VkDevice device, uint32_t queueFamilyI VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkQueueSubmit, VulkanTypedHandle(queue, kVulkanObjectTypeQueue)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateQueueSubmit]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateQueueSubmit(queue, submitCount, pSubmits, fence, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateQueueSubmit]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateQueueSubmit(queue, submitCount, pSubmits, fence, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkQueueSubmit); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordQueueSubmit]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordQueueSubmit(queue, submitCount, pSubmits, fence, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordQueueSubmit]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordQueueSubmit(queue, submitCount, pSubmits, fence, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchQueueSubmit(queue, submitCount, pSubmits, fence); + result = device_dispatch->QueueSubmit(queue, submitCount, pSubmits, fence); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordQueueSubmit]) { - auto lock = intercept->WriteLock(); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordQueueSubmit]) { + auto lock = vo->WriteLock(); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordQueueSubmit(queue, submitCount, pSubmits, fence, record_obj); + vo->PostCallRecordQueueSubmit(queue, submitCount, pSubmits, fence, record_obj); } } return result; @@ -1885,40 +442,40 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit(VkQueue queue, uint32_t submitCount, VKAPI_ATTR VkResult VKAPI_CALL QueueWaitIdle(VkQueue queue) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkQueueWaitIdle, VulkanTypedHandle(queue, kVulkanObjectTypeQueue)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateQueueWaitIdle]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateQueueWaitIdle(queue, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateQueueWaitIdle]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateQueueWaitIdle(queue, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkQueueWaitIdle); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordQueueWaitIdle]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordQueueWaitIdle(queue, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordQueueWaitIdle]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordQueueWaitIdle(queue, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchQueueWaitIdle(queue); + result = device_dispatch->QueueWaitIdle(queue); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordQueueWaitIdle]) { - auto lock = intercept->WriteLock(); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordQueueWaitIdle]) { + auto lock = vo->WriteLock(); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordQueueWaitIdle(queue, record_obj); + vo->PostCallRecordQueueWaitIdle(queue, record_obj); } } return result; @@ -1927,40 +484,40 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueWaitIdle(VkQueue queue) { VKAPI_ATTR VkResult VKAPI_CALL DeviceWaitIdle(VkDevice device) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDeviceWaitIdle, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDeviceWaitIdle]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDeviceWaitIdle(device, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDeviceWaitIdle]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDeviceWaitIdle(device, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkDeviceWaitIdle); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDeviceWaitIdle]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDeviceWaitIdle(device, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDeviceWaitIdle]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDeviceWaitIdle(device, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchDeviceWaitIdle(device); + result = device_dispatch->DeviceWaitIdle(device); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDeviceWaitIdle]) { - auto lock = intercept->WriteLock(); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDeviceWaitIdle]) { + auto lock = vo->WriteLock(); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordDeviceWaitIdle(device, record_obj); + vo->PostCallRecordDeviceWaitIdle(device, record_obj); } } return result; @@ -1970,36 +527,36 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateMemory(VkDevice device, const VkMemoryAll const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkAllocateMemory, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateAllocateMemory]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateAllocateMemory(device, pAllocateInfo, pAllocator, pMemory, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateAllocateMemory]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateAllocateMemory(device, pAllocateInfo, pAllocator, pMemory, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkAllocateMemory); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordAllocateMemory]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordAllocateMemory(device, pAllocateInfo, pAllocator, pMemory, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordAllocateMemory]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordAllocateMemory(device, pAllocateInfo, pAllocator, pMemory, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchAllocateMemory(device, pAllocateInfo, pAllocator, pMemory); + result = device_dispatch->AllocateMemory(device, pAllocateInfo, pAllocator, pMemory); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordAllocateMemory]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordAllocateMemory(device, pAllocateInfo, pAllocator, pMemory, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordAllocateMemory]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordAllocateMemory(device, pAllocateInfo, pAllocator, pMemory, record_obj); } } return result; @@ -2008,34 +565,34 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateMemory(VkDevice device, const VkMemoryAll VKAPI_ATTR void VKAPI_CALL FreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkFreeMemory, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateFreeMemory]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateFreeMemory(device, memory, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateFreeMemory]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateFreeMemory(device, memory, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkFreeMemory); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordFreeMemory]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordFreeMemory(device, memory, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordFreeMemory]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordFreeMemory(device, memory, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchFreeMemory(device, memory, pAllocator); + device_dispatch->FreeMemory(device, memory, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordFreeMemory]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordFreeMemory(device, memory, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordFreeMemory]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordFreeMemory(device, memory, pAllocator, record_obj); } } } @@ -2044,36 +601,36 @@ VKAPI_ATTR VkResult VKAPI_CALL MapMemory(VkDevice device, VkDeviceMemory memory, VkMemoryMapFlags flags, void** ppData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkMapMemory, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateMapMemory]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateMapMemory(device, memory, offset, size, flags, ppData, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateMapMemory]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateMapMemory(device, memory, offset, size, flags, ppData, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkMapMemory); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordMapMemory]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordMapMemory(device, memory, offset, size, flags, ppData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordMapMemory]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordMapMemory(device, memory, offset, size, flags, ppData, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchMapMemory(device, memory, offset, size, flags, ppData); + result = device_dispatch->MapMemory(device, memory, offset, size, flags, ppData); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordMapMemory]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordMapMemory(device, memory, offset, size, flags, ppData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordMapMemory]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordMapMemory(device, memory, offset, size, flags, ppData, record_obj); } } return result; @@ -2082,34 +639,34 @@ VKAPI_ATTR VkResult VKAPI_CALL MapMemory(VkDevice device, VkDeviceMemory memory, VKAPI_ATTR void VKAPI_CALL UnmapMemory(VkDevice device, VkDeviceMemory memory) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkUnmapMemory, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateUnmapMemory]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateUnmapMemory(device, memory, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateUnmapMemory]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateUnmapMemory(device, memory, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkUnmapMemory); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordUnmapMemory]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordUnmapMemory(device, memory, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordUnmapMemory]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordUnmapMemory(device, memory, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchUnmapMemory(device, memory); + device_dispatch->UnmapMemory(device, memory); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordUnmapMemory]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordUnmapMemory(device, memory, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordUnmapMemory]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordUnmapMemory(device, memory, record_obj); } } } @@ -2118,36 +675,36 @@ VKAPI_ATTR VkResult VKAPI_CALL FlushMappedMemoryRanges(VkDevice device, uint32_t const VkMappedMemoryRange* pMemoryRanges) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkFlushMappedMemoryRanges, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateFlushMappedMemoryRanges]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateFlushMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateFlushMappedMemoryRanges]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateFlushMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkFlushMappedMemoryRanges); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordFlushMappedMemoryRanges]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordFlushMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordFlushMappedMemoryRanges]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordFlushMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchFlushMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges); + result = device_dispatch->FlushMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordFlushMappedMemoryRanges]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordFlushMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordFlushMappedMemoryRanges]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordFlushMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges, record_obj); } } return result; @@ -2157,37 +714,36 @@ VKAPI_ATTR VkResult VKAPI_CALL InvalidateMappedMemoryRanges(VkDevice device, uin const VkMappedMemoryRange* pMemoryRanges) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkInvalidateMappedMemoryRanges, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateInvalidateMappedMemoryRanges]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateInvalidateMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateInvalidateMappedMemoryRanges]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateInvalidateMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkInvalidateMappedMemoryRanges); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordInvalidateMappedMemoryRanges]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordInvalidateMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordInvalidateMappedMemoryRanges]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordInvalidateMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchInvalidateMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges); + result = device_dispatch->InvalidateMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordInvalidateMappedMemoryRanges]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordInvalidateMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordInvalidateMappedMemoryRanges]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordInvalidateMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges, record_obj); } } return result; @@ -2197,35 +753,34 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceMemoryCommitment(VkDevice device, VkDeviceMe VkDeviceSize* pCommittedMemoryInBytes) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeviceMemoryCommitment, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeviceMemoryCommitment]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDeviceMemoryCommitment(device, memory, pCommittedMemoryInBytes, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeviceMemoryCommitment]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDeviceMemoryCommitment(device, memory, pCommittedMemoryInBytes, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetDeviceMemoryCommitment); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeviceMemoryCommitment]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeviceMemoryCommitment(device, memory, pCommittedMemoryInBytes, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeviceMemoryCommitment]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeviceMemoryCommitment(device, memory, pCommittedMemoryInBytes, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetDeviceMemoryCommitment(device, memory, pCommittedMemoryInBytes); + device_dispatch->GetDeviceMemoryCommitment(device, memory, pCommittedMemoryInBytes); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeviceMemoryCommitment]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeviceMemoryCommitment(device, memory, pCommittedMemoryInBytes, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeviceMemoryCommitment]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeviceMemoryCommitment(device, memory, pCommittedMemoryInBytes, record_obj); } } } @@ -2234,36 +789,36 @@ VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory(VkDevice device, VkBuffer buffer VkDeviceSize memoryOffset) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkBindBufferMemory, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateBindBufferMemory]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateBindBufferMemory(device, buffer, memory, memoryOffset, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateBindBufferMemory]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateBindBufferMemory(device, buffer, memory, memoryOffset, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkBindBufferMemory); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordBindBufferMemory]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordBindBufferMemory(device, buffer, memory, memoryOffset, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordBindBufferMemory]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordBindBufferMemory(device, buffer, memory, memoryOffset, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchBindBufferMemory(device, buffer, memory, memoryOffset); + result = device_dispatch->BindBufferMemory(device, buffer, memory, memoryOffset); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordBindBufferMemory]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordBindBufferMemory(device, buffer, memory, memoryOffset, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordBindBufferMemory]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordBindBufferMemory(device, buffer, memory, memoryOffset, record_obj); } } return result; @@ -2272,36 +827,36 @@ VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory(VkDevice device, VkBuffer buffer VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkBindImageMemory, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateBindImageMemory]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateBindImageMemory(device, image, memory, memoryOffset, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateBindImageMemory]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateBindImageMemory(device, image, memory, memoryOffset, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkBindImageMemory); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordBindImageMemory]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordBindImageMemory(device, image, memory, memoryOffset, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordBindImageMemory]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordBindImageMemory(device, image, memory, memoryOffset, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchBindImageMemory(device, image, memory, memoryOffset); + result = device_dispatch->BindImageMemory(device, image, memory, memoryOffset); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordBindImageMemory]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordBindImageMemory(device, image, memory, memoryOffset, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordBindImageMemory]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordBindImageMemory(device, image, memory, memoryOffset, record_obj); } } return result; @@ -2311,35 +866,34 @@ VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements(VkDevice device, VkBuffer VkMemoryRequirements* pMemoryRequirements) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetBufferMemoryRequirements, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetBufferMemoryRequirements]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetBufferMemoryRequirements(device, buffer, pMemoryRequirements, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetBufferMemoryRequirements]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetBufferMemoryRequirements(device, buffer, pMemoryRequirements, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetBufferMemoryRequirements); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetBufferMemoryRequirements]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetBufferMemoryRequirements(device, buffer, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetBufferMemoryRequirements]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetBufferMemoryRequirements(device, buffer, pMemoryRequirements, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetBufferMemoryRequirements(device, buffer, pMemoryRequirements); + device_dispatch->GetBufferMemoryRequirements(device, buffer, pMemoryRequirements); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetBufferMemoryRequirements]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetBufferMemoryRequirements(device, buffer, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetBufferMemoryRequirements]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetBufferMemoryRequirements(device, buffer, pMemoryRequirements, record_obj); } } } @@ -2347,35 +901,34 @@ VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements(VkDevice device, VkBuffer VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetImageMemoryRequirements, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetImageMemoryRequirements]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetImageMemoryRequirements(device, image, pMemoryRequirements, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetImageMemoryRequirements]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetImageMemoryRequirements(device, image, pMemoryRequirements, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetImageMemoryRequirements); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetImageMemoryRequirements]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetImageMemoryRequirements(device, image, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetImageMemoryRequirements]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetImageMemoryRequirements(device, image, pMemoryRequirements, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetImageMemoryRequirements(device, image, pMemoryRequirements); + device_dispatch->GetImageMemoryRequirements(device, image, pMemoryRequirements); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetImageMemoryRequirements]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetImageMemoryRequirements(device, image, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetImageMemoryRequirements]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetImageMemoryRequirements(device, image, pMemoryRequirements, record_obj); } } } @@ -2384,40 +937,37 @@ VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements(VkDevice device, VkI VkSparseImageMemoryRequirements* pSparseMemoryRequirements) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetImageSparseMemoryRequirements, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetImageSparseMemoryRequirements]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetImageSparseMemoryRequirements(device, image, pSparseMemoryRequirementCount, - pSparseMemoryRequirements, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetImageSparseMemoryRequirements]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetImageSparseMemoryRequirements(device, image, pSparseMemoryRequirementCount, + pSparseMemoryRequirements, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetImageSparseMemoryRequirements); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetImageSparseMemoryRequirements]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetImageSparseMemoryRequirements(device, image, pSparseMemoryRequirementCount, - pSparseMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetImageSparseMemoryRequirements]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetImageSparseMemoryRequirements(device, image, pSparseMemoryRequirementCount, + pSparseMemoryRequirements, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetImageSparseMemoryRequirements(device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements); + device_dispatch->GetImageSparseMemoryRequirements(device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetImageSparseMemoryRequirements]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetImageSparseMemoryRequirements(device, image, pSparseMemoryRequirementCount, - pSparseMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetImageSparseMemoryRequirements]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetImageSparseMemoryRequirements(device, image, pSparseMemoryRequirementCount, + pSparseMemoryRequirements, record_obj); } } } @@ -2429,39 +979,39 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceSparseImageFormatProperties(VkPhysic VkSparseImageFormatProperties* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceSparseImageFormatProperties, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceSparseImageFormatProperties( - physicalDevice, format, type, samples, usage, tiling, pPropertyCount, pProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceSparseImageFormatProperties(physicalDevice, format, type, samples, usage, + tiling, pPropertyCount, pProperties, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceSparseImageFormatProperties); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceSparseImageFormatProperties(physicalDevice, format, type, samples, usage, - tiling, pPropertyCount, pProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceSparseImageFormatProperties(physicalDevice, format, type, samples, usage, tiling, + pPropertyCount, pProperties, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceSparseImageFormatProperties(physicalDevice, format, type, samples, usage, tiling, pPropertyCount, - pProperties); + instance_dispatch->GetPhysicalDeviceSparseImageFormatProperties(physicalDevice, format, type, samples, usage, tiling, + pPropertyCount, pProperties); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceSparseImageFormatProperties(physicalDevice, format, type, samples, usage, - tiling, pPropertyCount, pProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceSparseImageFormatProperties(physicalDevice, format, type, samples, usage, tiling, + pPropertyCount, pProperties, record_obj); } } } @@ -2470,40 +1020,40 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueBindSparse(VkQueue queue, uint32_t bindInfoC VkFence fence) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkQueueBindSparse, VulkanTypedHandle(queue, kVulkanObjectTypeQueue)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateQueueBindSparse]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateQueueBindSparse(queue, bindInfoCount, pBindInfo, fence, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateQueueBindSparse]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateQueueBindSparse(queue, bindInfoCount, pBindInfo, fence, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkQueueBindSparse); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordQueueBindSparse]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordQueueBindSparse(queue, bindInfoCount, pBindInfo, fence, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordQueueBindSparse]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordQueueBindSparse(queue, bindInfoCount, pBindInfo, fence, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchQueueBindSparse(queue, bindInfoCount, pBindInfo, fence); + result = device_dispatch->QueueBindSparse(queue, bindInfoCount, pBindInfo, fence); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordQueueBindSparse]) { - auto lock = intercept->WriteLock(); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordQueueBindSparse]) { + auto lock = vo->WriteLock(); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordQueueBindSparse(queue, bindInfoCount, pBindInfo, fence, record_obj); + vo->PostCallRecordQueueBindSparse(queue, bindInfoCount, pBindInfo, fence, record_obj); } } return result; @@ -2513,36 +1063,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateFence(VkDevice device, const VkFenceCreateI const VkAllocationCallbacks* pAllocator, VkFence* pFence) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateFence, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateFence]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateFence(device, pCreateInfo, pAllocator, pFence, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateFence]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateFence(device, pCreateInfo, pAllocator, pFence, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateFence); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateFence]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateFence(device, pCreateInfo, pAllocator, pFence, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateFence]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateFence(device, pCreateInfo, pAllocator, pFence, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateFence(device, pCreateInfo, pAllocator, pFence); + result = device_dispatch->CreateFence(device, pCreateInfo, pAllocator, pFence); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateFence]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateFence(device, pCreateInfo, pAllocator, pFence, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateFence]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateFence(device, pCreateInfo, pAllocator, pFence, record_obj); } } return result; @@ -2551,34 +1101,34 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateFence(VkDevice device, const VkFenceCreateI VKAPI_ATTR void VKAPI_CALL DestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyFence, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyFence]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyFence(device, fence, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyFence]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyFence(device, fence, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyFence); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyFence]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyFence(device, fence, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyFence]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyFence(device, fence, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyFence(device, fence, pAllocator); + device_dispatch->DestroyFence(device, fence, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyFence]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyFence(device, fence, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyFence]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyFence(device, fence, pAllocator, record_obj); } } } @@ -2586,36 +1136,36 @@ VKAPI_ATTR void VKAPI_CALL DestroyFence(VkDevice device, VkFence fence, const Vk VKAPI_ATTR VkResult VKAPI_CALL ResetFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkResetFences, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateResetFences]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateResetFences(device, fenceCount, pFences, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateResetFences]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateResetFences(device, fenceCount, pFences, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkResetFences); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordResetFences]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordResetFences(device, fenceCount, pFences, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordResetFences]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordResetFences(device, fenceCount, pFences, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchResetFences(device, fenceCount, pFences); + result = device_dispatch->ResetFences(device, fenceCount, pFences); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordResetFences]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordResetFences(device, fenceCount, pFences, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordResetFences]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordResetFences(device, fenceCount, pFences, record_obj); } } return result; @@ -2624,40 +1174,40 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetFences(VkDevice device, uint32_t fenceCount, VKAPI_ATTR VkResult VKAPI_CALL GetFenceStatus(VkDevice device, VkFence fence) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetFenceStatus, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetFenceStatus]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetFenceStatus(device, fence, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetFenceStatus]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetFenceStatus(device, fence, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetFenceStatus); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetFenceStatus]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetFenceStatus(device, fence, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetFenceStatus]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetFenceStatus(device, fence, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetFenceStatus(device, fence); + result = device_dispatch->GetFenceStatus(device, fence); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetFenceStatus]) { - auto lock = intercept->WriteLock(); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetFenceStatus]) { + auto lock = vo->WriteLock(); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordGetFenceStatus(device, fence, record_obj); + vo->PostCallRecordGetFenceStatus(device, fence, record_obj); } } return result; @@ -2667,40 +1217,40 @@ VKAPI_ATTR VkResult VKAPI_CALL WaitForFences(VkDevice device, uint32_t fenceCoun uint64_t timeout) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkWaitForFences, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateWaitForFences]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateWaitForFences(device, fenceCount, pFences, waitAll, timeout, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateWaitForFences]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateWaitForFences(device, fenceCount, pFences, waitAll, timeout, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkWaitForFences); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordWaitForFences]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordWaitForFences(device, fenceCount, pFences, waitAll, timeout, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordWaitForFences]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordWaitForFences(device, fenceCount, pFences, waitAll, timeout, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchWaitForFences(device, fenceCount, pFences, waitAll, timeout); + result = device_dispatch->WaitForFences(device, fenceCount, pFences, waitAll, timeout); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordWaitForFences]) { - auto lock = intercept->WriteLock(); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordWaitForFences]) { + auto lock = vo->WriteLock(); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordWaitForFences(device, fenceCount, pFences, waitAll, timeout, record_obj); + vo->PostCallRecordWaitForFences(device, fenceCount, pFences, waitAll, timeout, record_obj); } } return result; @@ -2710,36 +1260,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSemaphore(VkDevice device, const VkSemaphor const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateSemaphore, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateSemaphore]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateSemaphore(device, pCreateInfo, pAllocator, pSemaphore, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateSemaphore]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateSemaphore(device, pCreateInfo, pAllocator, pSemaphore, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateSemaphore); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateSemaphore]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateSemaphore(device, pCreateInfo, pAllocator, pSemaphore, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateSemaphore]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateSemaphore(device, pCreateInfo, pAllocator, pSemaphore, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateSemaphore(device, pCreateInfo, pAllocator, pSemaphore); + result = device_dispatch->CreateSemaphore(device, pCreateInfo, pAllocator, pSemaphore); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateSemaphore]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateSemaphore(device, pCreateInfo, pAllocator, pSemaphore, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateSemaphore]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateSemaphore(device, pCreateInfo, pAllocator, pSemaphore, record_obj); } } return result; @@ -2748,34 +1298,34 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSemaphore(VkDevice device, const VkSemaphor VKAPI_ATTR void VKAPI_CALL DestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroySemaphore, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroySemaphore]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroySemaphore(device, semaphore, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroySemaphore]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroySemaphore(device, semaphore, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroySemaphore); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroySemaphore]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroySemaphore(device, semaphore, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroySemaphore]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroySemaphore(device, semaphore, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroySemaphore(device, semaphore, pAllocator); + device_dispatch->DestroySemaphore(device, semaphore, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroySemaphore]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroySemaphore(device, semaphore, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroySemaphore]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroySemaphore(device, semaphore, pAllocator, record_obj); } } } @@ -2784,36 +1334,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateEvent(VkDevice device, const VkEventCreateI const VkAllocationCallbacks* pAllocator, VkEvent* pEvent) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateEvent, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateEvent]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateEvent(device, pCreateInfo, pAllocator, pEvent, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateEvent]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateEvent(device, pCreateInfo, pAllocator, pEvent, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateEvent); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateEvent]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateEvent(device, pCreateInfo, pAllocator, pEvent, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateEvent]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateEvent(device, pCreateInfo, pAllocator, pEvent, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateEvent(device, pCreateInfo, pAllocator, pEvent); + result = device_dispatch->CreateEvent(device, pCreateInfo, pAllocator, pEvent); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateEvent]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateEvent(device, pCreateInfo, pAllocator, pEvent, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateEvent]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateEvent(device, pCreateInfo, pAllocator, pEvent, record_obj); } } return result; @@ -2822,34 +1372,34 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateEvent(VkDevice device, const VkEventCreateI VKAPI_ATTR void VKAPI_CALL DestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyEvent, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyEvent]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyEvent(device, event, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyEvent]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyEvent(device, event, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyEvent); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyEvent]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyEvent(device, event, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyEvent]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyEvent(device, event, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyEvent(device, event, pAllocator); + device_dispatch->DestroyEvent(device, event, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyEvent]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyEvent(device, event, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyEvent]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyEvent(device, event, pAllocator, record_obj); } } } @@ -2857,40 +1407,40 @@ VKAPI_ATTR void VKAPI_CALL DestroyEvent(VkDevice device, VkEvent event, const Vk VKAPI_ATTR VkResult VKAPI_CALL GetEventStatus(VkDevice device, VkEvent event) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetEventStatus, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetEventStatus]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetEventStatus(device, event, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetEventStatus]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetEventStatus(device, event, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetEventStatus); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetEventStatus]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetEventStatus(device, event, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetEventStatus]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetEventStatus(device, event, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetEventStatus(device, event); + result = device_dispatch->GetEventStatus(device, event); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetEventStatus]) { - auto lock = intercept->WriteLock(); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetEventStatus]) { + auto lock = vo->WriteLock(); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordGetEventStatus(device, event, record_obj); + vo->PostCallRecordGetEventStatus(device, event, record_obj); } } return result; @@ -2899,36 +1449,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetEventStatus(VkDevice device, VkEvent event) { VKAPI_ATTR VkResult VKAPI_CALL SetEvent(VkDevice device, VkEvent event) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkSetEvent, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateSetEvent]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateSetEvent(device, event, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateSetEvent]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateSetEvent(device, event, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkSetEvent); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordSetEvent]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordSetEvent(device, event, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordSetEvent]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordSetEvent(device, event, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchSetEvent(device, event); + result = device_dispatch->SetEvent(device, event); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordSetEvent]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordSetEvent(device, event, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordSetEvent]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordSetEvent(device, event, record_obj); } } return result; @@ -2937,36 +1487,36 @@ VKAPI_ATTR VkResult VKAPI_CALL SetEvent(VkDevice device, VkEvent event) { VKAPI_ATTR VkResult VKAPI_CALL ResetEvent(VkDevice device, VkEvent event) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkResetEvent, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateResetEvent]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateResetEvent(device, event, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateResetEvent]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateResetEvent(device, event, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkResetEvent); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordResetEvent]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordResetEvent(device, event, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordResetEvent]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordResetEvent(device, event, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchResetEvent(device, event); + result = device_dispatch->ResetEvent(device, event); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordResetEvent]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordResetEvent(device, event, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordResetEvent]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordResetEvent(device, event, record_obj); } } return result; @@ -2976,36 +1526,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateQueryPool(VkDevice device, const VkQueryPoo const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateQueryPool, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateQueryPool]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateQueryPool(device, pCreateInfo, pAllocator, pQueryPool, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateQueryPool]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateQueryPool(device, pCreateInfo, pAllocator, pQueryPool, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateQueryPool); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateQueryPool]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateQueryPool(device, pCreateInfo, pAllocator, pQueryPool, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateQueryPool]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateQueryPool(device, pCreateInfo, pAllocator, pQueryPool, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateQueryPool(device, pCreateInfo, pAllocator, pQueryPool); + result = device_dispatch->CreateQueryPool(device, pCreateInfo, pAllocator, pQueryPool); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateQueryPool]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateQueryPool(device, pCreateInfo, pAllocator, pQueryPool, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateQueryPool]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateQueryPool(device, pCreateInfo, pAllocator, pQueryPool, record_obj); } } return result; @@ -3014,34 +1564,34 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateQueryPool(VkDevice device, const VkQueryPoo VKAPI_ATTR void VKAPI_CALL DestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyQueryPool, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyQueryPool]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyQueryPool(device, queryPool, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyQueryPool]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyQueryPool(device, queryPool, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyQueryPool); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyQueryPool]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyQueryPool(device, queryPool, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyQueryPool]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyQueryPool(device, queryPool, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyQueryPool(device, queryPool, pAllocator); + device_dispatch->DestroyQueryPool(device, queryPool, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyQueryPool]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyQueryPool(device, queryPool, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyQueryPool]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyQueryPool(device, queryPool, pAllocator, record_obj); } } } @@ -3050,43 +1600,43 @@ VKAPI_ATTR VkResult VKAPI_CALL GetQueryPoolResults(VkDevice device, VkQueryPool size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetQueryPoolResults, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetQueryPoolResults]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetQueryPoolResults(device, queryPool, firstQuery, queryCount, dataSize, pData, - stride, flags, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetQueryPoolResults]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetQueryPoolResults(device, queryPool, firstQuery, queryCount, dataSize, pData, stride, + flags, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetQueryPoolResults); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetQueryPoolResults]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetQueryPoolResults(device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetQueryPoolResults]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetQueryPoolResults(device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetQueryPoolResults(device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags); + result = device_dispatch->GetQueryPoolResults(device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetQueryPoolResults]) { - auto lock = intercept->WriteLock(); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetQueryPoolResults]) { + auto lock = vo->WriteLock(); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordGetQueryPoolResults(device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags, - record_obj); + vo->PostCallRecordGetQueryPoolResults(device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags, + record_obj); } } return result; @@ -3095,34 +1645,34 @@ VKAPI_ATTR VkResult VKAPI_CALL GetQueryPoolResults(VkDevice device, VkQueryPool VKAPI_ATTR void VKAPI_CALL DestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyBuffer, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyBuffer]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyBuffer(device, buffer, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyBuffer]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyBuffer(device, buffer, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyBuffer); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyBuffer]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyBuffer(device, buffer, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyBuffer]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyBuffer(device, buffer, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyBuffer(device, buffer, pAllocator); + device_dispatch->DestroyBuffer(device, buffer, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyBuffer]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyBuffer(device, buffer, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyBuffer]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyBuffer(device, buffer, pAllocator, record_obj); } } } @@ -3131,36 +1681,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateBufferView(VkDevice device, const VkBufferV const VkAllocationCallbacks* pAllocator, VkBufferView* pView) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateBufferView, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateBufferView]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateBufferView(device, pCreateInfo, pAllocator, pView, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateBufferView]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateBufferView(device, pCreateInfo, pAllocator, pView, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateBufferView); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateBufferView]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateBufferView(device, pCreateInfo, pAllocator, pView, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateBufferView]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateBufferView(device, pCreateInfo, pAllocator, pView, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateBufferView(device, pCreateInfo, pAllocator, pView); + result = device_dispatch->CreateBufferView(device, pCreateInfo, pAllocator, pView); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateBufferView]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateBufferView(device, pCreateInfo, pAllocator, pView, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateBufferView]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateBufferView(device, pCreateInfo, pAllocator, pView, record_obj); } } return result; @@ -3169,34 +1719,34 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateBufferView(VkDevice device, const VkBufferV VKAPI_ATTR void VKAPI_CALL DestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyBufferView, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyBufferView]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyBufferView(device, bufferView, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyBufferView]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyBufferView(device, bufferView, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyBufferView); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyBufferView]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyBufferView(device, bufferView, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyBufferView]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyBufferView(device, bufferView, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyBufferView(device, bufferView, pAllocator); + device_dispatch->DestroyBufferView(device, bufferView, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyBufferView]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyBufferView(device, bufferView, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyBufferView]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyBufferView(device, bufferView, pAllocator, record_obj); } } } @@ -3205,36 +1755,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateImage(VkDevice device, const VkImageCreateI const VkAllocationCallbacks* pAllocator, VkImage* pImage) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateImage, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateImage]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateImage(device, pCreateInfo, pAllocator, pImage, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateImage]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateImage(device, pCreateInfo, pAllocator, pImage, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateImage); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateImage]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateImage(device, pCreateInfo, pAllocator, pImage, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateImage]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateImage(device, pCreateInfo, pAllocator, pImage, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateImage(device, pCreateInfo, pAllocator, pImage); + result = device_dispatch->CreateImage(device, pCreateInfo, pAllocator, pImage); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateImage]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateImage(device, pCreateInfo, pAllocator, pImage, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateImage]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateImage(device, pCreateInfo, pAllocator, pImage, record_obj); } } return result; @@ -3243,34 +1793,34 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateImage(VkDevice device, const VkImageCreateI VKAPI_ATTR void VKAPI_CALL DestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyImage, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyImage]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyImage(device, image, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyImage]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyImage(device, image, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyImage); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyImage]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyImage(device, image, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyImage]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyImage(device, image, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyImage(device, image, pAllocator); + device_dispatch->DestroyImage(device, image, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyImage]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyImage(device, image, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyImage]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyImage(device, image, pAllocator, record_obj); } } } @@ -3279,35 +1829,34 @@ VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout(VkDevice device, VkImage im VkSubresourceLayout* pLayout) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetImageSubresourceLayout, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetImageSubresourceLayout]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetImageSubresourceLayout(device, image, pSubresource, pLayout, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetImageSubresourceLayout]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetImageSubresourceLayout(device, image, pSubresource, pLayout, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetImageSubresourceLayout); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetImageSubresourceLayout]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetImageSubresourceLayout(device, image, pSubresource, pLayout, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetImageSubresourceLayout]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetImageSubresourceLayout(device, image, pSubresource, pLayout, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetImageSubresourceLayout(device, image, pSubresource, pLayout); + device_dispatch->GetImageSubresourceLayout(device, image, pSubresource, pLayout); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetImageSubresourceLayout]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetImageSubresourceLayout(device, image, pSubresource, pLayout, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetImageSubresourceLayout]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetImageSubresourceLayout(device, image, pSubresource, pLayout, record_obj); } } } @@ -3316,36 +1865,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateImageView(VkDevice device, const VkImageVie const VkAllocationCallbacks* pAllocator, VkImageView* pView) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateImageView, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateImageView]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateImageView(device, pCreateInfo, pAllocator, pView, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateImageView]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateImageView(device, pCreateInfo, pAllocator, pView, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateImageView); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateImageView]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateImageView(device, pCreateInfo, pAllocator, pView, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateImageView]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateImageView(device, pCreateInfo, pAllocator, pView, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateImageView(device, pCreateInfo, pAllocator, pView); + result = device_dispatch->CreateImageView(device, pCreateInfo, pAllocator, pView); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateImageView]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateImageView(device, pCreateInfo, pAllocator, pView, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateImageView]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateImageView(device, pCreateInfo, pAllocator, pView, record_obj); } } return result; @@ -3354,34 +1903,34 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateImageView(VkDevice device, const VkImageVie VKAPI_ATTR void VKAPI_CALL DestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyImageView, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyImageView]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyImageView(device, imageView, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyImageView]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyImageView(device, imageView, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyImageView); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyImageView]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyImageView(device, imageView, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyImageView]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyImageView(device, imageView, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyImageView(device, imageView, pAllocator); + device_dispatch->DestroyImageView(device, imageView, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyImageView]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyImageView(device, imageView, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyImageView]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyImageView(device, imageView, pAllocator, record_obj); } } } @@ -3390,34 +1939,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyShaderModule(VkDevice device, VkShaderModule s const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyShaderModule, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyShaderModule]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyShaderModule(device, shaderModule, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyShaderModule]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyShaderModule(device, shaderModule, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyShaderModule); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyShaderModule]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyShaderModule(device, shaderModule, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyShaderModule]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyShaderModule(device, shaderModule, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyShaderModule(device, shaderModule, pAllocator); + device_dispatch->DestroyShaderModule(device, shaderModule, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyShaderModule]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyShaderModule(device, shaderModule, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyShaderModule]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyShaderModule(device, shaderModule, pAllocator, record_obj); } } } @@ -3426,36 +1975,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineCache(VkDevice device, const VkPipe const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreatePipelineCache, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreatePipelineCache]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreatePipelineCache(device, pCreateInfo, pAllocator, pPipelineCache, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreatePipelineCache]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreatePipelineCache(device, pCreateInfo, pAllocator, pPipelineCache, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreatePipelineCache); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreatePipelineCache]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreatePipelineCache(device, pCreateInfo, pAllocator, pPipelineCache, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreatePipelineCache]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreatePipelineCache(device, pCreateInfo, pAllocator, pPipelineCache, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreatePipelineCache(device, pCreateInfo, pAllocator, pPipelineCache); + result = device_dispatch->CreatePipelineCache(device, pCreateInfo, pAllocator, pPipelineCache); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreatePipelineCache]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreatePipelineCache(device, pCreateInfo, pAllocator, pPipelineCache, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreatePipelineCache]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreatePipelineCache(device, pCreateInfo, pAllocator, pPipelineCache, record_obj); } } return result; @@ -3465,34 +2014,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyPipelineCache(VkDevice device, VkPipelineCache const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyPipelineCache, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyPipelineCache]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyPipelineCache(device, pipelineCache, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyPipelineCache]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyPipelineCache(device, pipelineCache, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyPipelineCache); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyPipelineCache]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyPipelineCache(device, pipelineCache, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyPipelineCache]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyPipelineCache(device, pipelineCache, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyPipelineCache(device, pipelineCache, pAllocator); + device_dispatch->DestroyPipelineCache(device, pipelineCache, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyPipelineCache]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyPipelineCache(device, pipelineCache, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyPipelineCache]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyPipelineCache(device, pipelineCache, pAllocator, record_obj); } } } @@ -3501,36 +2050,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPipelineCacheData(VkDevice device, VkPipelineC void* pData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPipelineCacheData, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetPipelineCacheData]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPipelineCacheData(device, pipelineCache, pDataSize, pData, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetPipelineCacheData]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPipelineCacheData(device, pipelineCache, pDataSize, pData, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPipelineCacheData); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetPipelineCacheData]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPipelineCacheData(device, pipelineCache, pDataSize, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetPipelineCacheData]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPipelineCacheData(device, pipelineCache, pDataSize, pData, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPipelineCacheData(device, pipelineCache, pDataSize, pData); + result = device_dispatch->GetPipelineCacheData(device, pipelineCache, pDataSize, pData); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetPipelineCacheData]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPipelineCacheData(device, pipelineCache, pDataSize, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetPipelineCacheData]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPipelineCacheData(device, pipelineCache, pDataSize, pData, record_obj); } } return result; @@ -3540,36 +2089,36 @@ VKAPI_ATTR VkResult VKAPI_CALL MergePipelineCaches(VkDevice device, VkPipelineCa const VkPipelineCache* pSrcCaches) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkMergePipelineCaches, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateMergePipelineCaches]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateMergePipelineCaches(device, dstCache, srcCacheCount, pSrcCaches, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateMergePipelineCaches]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateMergePipelineCaches(device, dstCache, srcCacheCount, pSrcCaches, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkMergePipelineCaches); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordMergePipelineCaches]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordMergePipelineCaches(device, dstCache, srcCacheCount, pSrcCaches, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordMergePipelineCaches]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordMergePipelineCaches(device, dstCache, srcCacheCount, pSrcCaches, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchMergePipelineCaches(device, dstCache, srcCacheCount, pSrcCaches); + result = device_dispatch->MergePipelineCaches(device, dstCache, srcCacheCount, pSrcCaches); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordMergePipelineCaches]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordMergePipelineCaches(device, dstCache, srcCacheCount, pSrcCaches, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordMergePipelineCaches]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordMergePipelineCaches(device, dstCache, srcCacheCount, pSrcCaches, record_obj); } } return result; @@ -3578,34 +2127,34 @@ VKAPI_ATTR VkResult VKAPI_CALL MergePipelineCaches(VkDevice device, VkPipelineCa VKAPI_ATTR void VKAPI_CALL DestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyPipeline, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyPipeline]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyPipeline(device, pipeline, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyPipeline]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyPipeline(device, pipeline, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyPipeline); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyPipeline]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyPipeline(device, pipeline, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyPipeline]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyPipeline(device, pipeline, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyPipeline(device, pipeline, pAllocator); + device_dispatch->DestroyPipeline(device, pipeline, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyPipeline]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyPipeline(device, pipeline, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyPipeline]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyPipeline(device, pipeline, pAllocator, record_obj); } } } @@ -3614,34 +2163,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyPipelineLayout(VkDevice device, VkPipelineLayo const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyPipelineLayout, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyPipelineLayout]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyPipelineLayout(device, pipelineLayout, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyPipelineLayout]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyPipelineLayout(device, pipelineLayout, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyPipelineLayout); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyPipelineLayout]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyPipelineLayout(device, pipelineLayout, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyPipelineLayout]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyPipelineLayout(device, pipelineLayout, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyPipelineLayout(device, pipelineLayout, pAllocator); + device_dispatch->DestroyPipelineLayout(device, pipelineLayout, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyPipelineLayout]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyPipelineLayout(device, pipelineLayout, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyPipelineLayout]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyPipelineLayout(device, pipelineLayout, pAllocator, record_obj); } } } @@ -3650,36 +2199,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSampler(VkDevice device, const VkSamplerCre const VkAllocationCallbacks* pAllocator, VkSampler* pSampler) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateSampler, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateSampler]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateSampler(device, pCreateInfo, pAllocator, pSampler, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateSampler]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateSampler(device, pCreateInfo, pAllocator, pSampler, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateSampler); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateSampler]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateSampler(device, pCreateInfo, pAllocator, pSampler, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateSampler]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateSampler(device, pCreateInfo, pAllocator, pSampler, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateSampler(device, pCreateInfo, pAllocator, pSampler); + result = device_dispatch->CreateSampler(device, pCreateInfo, pAllocator, pSampler); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateSampler]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateSampler(device, pCreateInfo, pAllocator, pSampler, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateSampler]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateSampler(device, pCreateInfo, pAllocator, pSampler, record_obj); } } return result; @@ -3688,34 +2237,34 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSampler(VkDevice device, const VkSamplerCre VKAPI_ATTR void VKAPI_CALL DestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroySampler, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroySampler]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroySampler(device, sampler, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroySampler]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroySampler(device, sampler, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroySampler); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroySampler]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroySampler(device, sampler, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroySampler]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroySampler(device, sampler, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroySampler(device, sampler, pAllocator); + device_dispatch->DestroySampler(device, sampler, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroySampler]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroySampler(device, sampler, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroySampler]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroySampler(device, sampler, pAllocator, record_obj); } } } @@ -3725,37 +2274,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayout* pSetLayout) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateDescriptorSetLayout, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCreateDescriptorSetLayout]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateDescriptorSetLayout(device, pCreateInfo, pAllocator, pSetLayout, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateDescriptorSetLayout]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateDescriptorSetLayout(device, pCreateInfo, pAllocator, pSetLayout, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateDescriptorSetLayout); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateDescriptorSetLayout]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateDescriptorSetLayout(device, pCreateInfo, pAllocator, pSetLayout, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateDescriptorSetLayout]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateDescriptorSetLayout(device, pCreateInfo, pAllocator, pSetLayout, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateDescriptorSetLayout(device, pCreateInfo, pAllocator, pSetLayout); + result = device_dispatch->CreateDescriptorSetLayout(device, pCreateInfo, pAllocator, pSetLayout); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateDescriptorSetLayout]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateDescriptorSetLayout(device, pCreateInfo, pAllocator, pSetLayout, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateDescriptorSetLayout]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateDescriptorSetLayout(device, pCreateInfo, pAllocator, pSetLayout, record_obj); } } return result; @@ -3765,35 +2313,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyDescriptorSetLayout(VkDevice device, VkDescrip const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyDescriptorSetLayout, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyDescriptorSetLayout]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyDescriptorSetLayout(device, descriptorSetLayout, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyDescriptorSetLayout]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyDescriptorSetLayout(device, descriptorSetLayout, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyDescriptorSetLayout); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyDescriptorSetLayout]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyDescriptorSetLayout(device, descriptorSetLayout, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyDescriptorSetLayout]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyDescriptorSetLayout(device, descriptorSetLayout, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyDescriptorSetLayout(device, descriptorSetLayout, pAllocator); + device_dispatch->DestroyDescriptorSetLayout(device, descriptorSetLayout, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyDescriptorSetLayout]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyDescriptorSetLayout(device, descriptorSetLayout, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyDescriptorSetLayout]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyDescriptorSetLayout(device, descriptorSetLayout, pAllocator, record_obj); } } } @@ -3802,36 +2349,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorPool(VkDevice device, const VkDes const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateDescriptorPool, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateDescriptorPool]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateDescriptorPool(device, pCreateInfo, pAllocator, pDescriptorPool, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateDescriptorPool]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateDescriptorPool(device, pCreateInfo, pAllocator, pDescriptorPool, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateDescriptorPool); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateDescriptorPool]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateDescriptorPool(device, pCreateInfo, pAllocator, pDescriptorPool, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateDescriptorPool]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateDescriptorPool(device, pCreateInfo, pAllocator, pDescriptorPool, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateDescriptorPool(device, pCreateInfo, pAllocator, pDescriptorPool); + result = device_dispatch->CreateDescriptorPool(device, pCreateInfo, pAllocator, pDescriptorPool); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateDescriptorPool]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateDescriptorPool(device, pCreateInfo, pAllocator, pDescriptorPool, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateDescriptorPool]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateDescriptorPool(device, pCreateInfo, pAllocator, pDescriptorPool, record_obj); } } return result; @@ -3841,34 +2388,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyDescriptorPool(VkDevice device, VkDescriptorPo const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyDescriptorPool, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyDescriptorPool]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyDescriptorPool(device, descriptorPool, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyDescriptorPool]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyDescriptorPool(device, descriptorPool, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyDescriptorPool); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyDescriptorPool]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyDescriptorPool(device, descriptorPool, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyDescriptorPool]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyDescriptorPool(device, descriptorPool, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyDescriptorPool(device, descriptorPool, pAllocator); + device_dispatch->DestroyDescriptorPool(device, descriptorPool, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyDescriptorPool]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyDescriptorPool(device, descriptorPool, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyDescriptorPool]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyDescriptorPool(device, descriptorPool, pAllocator, record_obj); } } } @@ -3877,36 +2424,36 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetDescriptorPool(VkDevice device, VkDescriptor VkDescriptorPoolResetFlags flags) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkResetDescriptorPool, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateResetDescriptorPool]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateResetDescriptorPool(device, descriptorPool, flags, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateResetDescriptorPool]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateResetDescriptorPool(device, descriptorPool, flags, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkResetDescriptorPool); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordResetDescriptorPool]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordResetDescriptorPool(device, descriptorPool, flags, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordResetDescriptorPool]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordResetDescriptorPool(device, descriptorPool, flags, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchResetDescriptorPool(device, descriptorPool, flags); + result = device_dispatch->ResetDescriptorPool(device, descriptorPool, flags); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordResetDescriptorPool]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordResetDescriptorPool(device, descriptorPool, flags, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordResetDescriptorPool]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordResetDescriptorPool(device, descriptorPool, flags, record_obj); } } return result; @@ -3916,37 +2463,36 @@ VKAPI_ATTR VkResult VKAPI_CALL FreeDescriptorSets(VkDevice device, VkDescriptorP const VkDescriptorSet* pDescriptorSets) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkFreeDescriptorSets, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateFreeDescriptorSets]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateFreeDescriptorSets(device, descriptorPool, descriptorSetCount, pDescriptorSets, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateFreeDescriptorSets]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateFreeDescriptorSets(device, descriptorPool, descriptorSetCount, pDescriptorSets, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkFreeDescriptorSets); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordFreeDescriptorSets]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordFreeDescriptorSets(device, descriptorPool, descriptorSetCount, pDescriptorSets, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordFreeDescriptorSets]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordFreeDescriptorSets(device, descriptorPool, descriptorSetCount, pDescriptorSets, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchFreeDescriptorSets(device, descriptorPool, descriptorSetCount, pDescriptorSets); + result = device_dispatch->FreeDescriptorSets(device, descriptorPool, descriptorSetCount, pDescriptorSets); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordFreeDescriptorSets]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordFreeDescriptorSets(device, descriptorPool, descriptorSetCount, pDescriptorSets, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordFreeDescriptorSets]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordFreeDescriptorSets(device, descriptorPool, descriptorSetCount, pDescriptorSets, record_obj); } } return result; @@ -3957,37 +2503,38 @@ VKAPI_ATTR void VKAPI_CALL UpdateDescriptorSets(VkDevice device, uint32_t descri const VkCopyDescriptorSet* pDescriptorCopies) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkUpdateDescriptorSets, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateUpdateDescriptorSets]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateUpdateDescriptorSets(device, descriptorWriteCount, pDescriptorWrites, - descriptorCopyCount, pDescriptorCopies, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateUpdateDescriptorSets]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateUpdateDescriptorSets(device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, + pDescriptorCopies, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkUpdateDescriptorSets); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordUpdateDescriptorSets]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordUpdateDescriptorSets(device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, - pDescriptorCopies, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordUpdateDescriptorSets]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordUpdateDescriptorSets(device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, + pDescriptorCopies, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchUpdateDescriptorSets(device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies); + device_dispatch->UpdateDescriptorSets(device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, + pDescriptorCopies); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordUpdateDescriptorSets]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordUpdateDescriptorSets(device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, - pDescriptorCopies, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordUpdateDescriptorSets]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordUpdateDescriptorSets(device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, + pDescriptorCopies, record_obj); } } } @@ -3996,36 +2543,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateFramebuffer(VkDevice device, const VkFrameb const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateFramebuffer, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateFramebuffer]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateFramebuffer(device, pCreateInfo, pAllocator, pFramebuffer, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateFramebuffer]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateFramebuffer(device, pCreateInfo, pAllocator, pFramebuffer, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateFramebuffer); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateFramebuffer]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateFramebuffer(device, pCreateInfo, pAllocator, pFramebuffer, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateFramebuffer]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateFramebuffer(device, pCreateInfo, pAllocator, pFramebuffer, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateFramebuffer(device, pCreateInfo, pAllocator, pFramebuffer); + result = device_dispatch->CreateFramebuffer(device, pCreateInfo, pAllocator, pFramebuffer); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateFramebuffer]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateFramebuffer(device, pCreateInfo, pAllocator, pFramebuffer, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateFramebuffer]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateFramebuffer(device, pCreateInfo, pAllocator, pFramebuffer, record_obj); } } return result; @@ -4034,34 +2581,34 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateFramebuffer(VkDevice device, const VkFrameb VKAPI_ATTR void VKAPI_CALL DestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyFramebuffer, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyFramebuffer]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyFramebuffer(device, framebuffer, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyFramebuffer]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyFramebuffer(device, framebuffer, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyFramebuffer); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyFramebuffer]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyFramebuffer(device, framebuffer, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyFramebuffer]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyFramebuffer(device, framebuffer, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyFramebuffer(device, framebuffer, pAllocator); + device_dispatch->DestroyFramebuffer(device, framebuffer, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyFramebuffer]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyFramebuffer(device, framebuffer, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyFramebuffer]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyFramebuffer(device, framebuffer, pAllocator, record_obj); } } } @@ -4070,36 +2617,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass(VkDevice device, const VkRenderP const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateRenderPass, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateRenderPass]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateRenderPass(device, pCreateInfo, pAllocator, pRenderPass, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateRenderPass]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateRenderPass(device, pCreateInfo, pAllocator, pRenderPass, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateRenderPass); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateRenderPass]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateRenderPass(device, pCreateInfo, pAllocator, pRenderPass, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateRenderPass]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateRenderPass(device, pCreateInfo, pAllocator, pRenderPass, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateRenderPass(device, pCreateInfo, pAllocator, pRenderPass); + result = device_dispatch->CreateRenderPass(device, pCreateInfo, pAllocator, pRenderPass); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateRenderPass]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateRenderPass(device, pCreateInfo, pAllocator, pRenderPass, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateRenderPass]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateRenderPass(device, pCreateInfo, pAllocator, pRenderPass, record_obj); } } return result; @@ -4108,34 +2655,34 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass(VkDevice device, const VkRenderP VKAPI_ATTR void VKAPI_CALL DestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyRenderPass, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyRenderPass]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyRenderPass(device, renderPass, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyRenderPass]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyRenderPass(device, renderPass, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyRenderPass); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyRenderPass]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyRenderPass(device, renderPass, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyRenderPass]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyRenderPass(device, renderPass, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyRenderPass(device, renderPass, pAllocator); + device_dispatch->DestroyRenderPass(device, renderPass, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyRenderPass]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyRenderPass(device, renderPass, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyRenderPass]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyRenderPass(device, renderPass, pAllocator, record_obj); } } } @@ -4143,35 +2690,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyRenderPass(VkDevice device, VkRenderPass rende VKAPI_ATTR void VKAPI_CALL GetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetRenderAreaGranularity, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetRenderAreaGranularity]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetRenderAreaGranularity(device, renderPass, pGranularity, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetRenderAreaGranularity]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetRenderAreaGranularity(device, renderPass, pGranularity, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetRenderAreaGranularity); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetRenderAreaGranularity]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetRenderAreaGranularity(device, renderPass, pGranularity, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetRenderAreaGranularity]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetRenderAreaGranularity(device, renderPass, pGranularity, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetRenderAreaGranularity(device, renderPass, pGranularity); + device_dispatch->GetRenderAreaGranularity(device, renderPass, pGranularity); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetRenderAreaGranularity]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetRenderAreaGranularity(device, renderPass, pGranularity, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetRenderAreaGranularity]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetRenderAreaGranularity(device, renderPass, pGranularity, record_obj); } } } @@ -4180,36 +2726,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateCommandPool(VkDevice device, const VkComman const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateCommandPool, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateCommandPool]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateCommandPool(device, pCreateInfo, pAllocator, pCommandPool, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateCommandPool]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateCommandPool(device, pCreateInfo, pAllocator, pCommandPool, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateCommandPool); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateCommandPool]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateCommandPool(device, pCreateInfo, pAllocator, pCommandPool, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateCommandPool]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateCommandPool(device, pCreateInfo, pAllocator, pCommandPool, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateCommandPool(device, pCreateInfo, pAllocator, pCommandPool); + result = device_dispatch->CreateCommandPool(device, pCreateInfo, pAllocator, pCommandPool); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateCommandPool]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateCommandPool(device, pCreateInfo, pAllocator, pCommandPool, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateCommandPool]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateCommandPool(device, pCreateInfo, pAllocator, pCommandPool, record_obj); } } return result; @@ -4218,45 +2764,34 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateCommandPool(VkDevice device, const VkComman VKAPI_ATTR void VKAPI_CALL DestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyCommandPool, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyCommandPool]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyCommandPool(device, commandPool, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyCommandPool]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyCommandPool(device, commandPool, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyCommandPool); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyCommandPool]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyCommandPool(device, commandPool, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyCommandPool]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyCommandPool(device, commandPool, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyCommandPool(device, commandPool, pAllocator); + device_dispatch->DestroyCommandPool(device, commandPool, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyCommandPool]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyCommandPool(device, commandPool, pAllocator, record_obj); - } - } - - { - auto lock = WriteLockGuard(secondary_cb_map_mutex); - for (auto item = secondary_cb_map.begin(); item != secondary_cb_map.end();) { - if (item->second == commandPool) { - item = secondary_cb_map.erase(item); - } else { - ++item; - } + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyCommandPool]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyCommandPool(device, commandPool, pAllocator, record_obj); } } } @@ -4264,36 +2799,36 @@ VKAPI_ATTR void VKAPI_CALL DestroyCommandPool(VkDevice device, VkCommandPool com VKAPI_ATTR VkResult VKAPI_CALL ResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkResetCommandPool, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateResetCommandPool]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateResetCommandPool(device, commandPool, flags, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateResetCommandPool]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateResetCommandPool(device, commandPool, flags, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkResetCommandPool); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordResetCommandPool]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordResetCommandPool(device, commandPool, flags, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordResetCommandPool]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordResetCommandPool(device, commandPool, flags, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchResetCommandPool(device, commandPool, flags); + result = device_dispatch->ResetCommandPool(device, commandPool, flags); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordResetCommandPool]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordResetCommandPool(device, commandPool, flags, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordResetCommandPool]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordResetCommandPool(device, commandPool, flags, record_obj); } } return result; @@ -4303,43 +2838,36 @@ VKAPI_ATTR VkResult VKAPI_CALL AllocateCommandBuffers(VkDevice device, const VkC VkCommandBuffer* pCommandBuffers) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkAllocateCommandBuffers, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateAllocateCommandBuffers]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateAllocateCommandBuffers(device, pAllocateInfo, pCommandBuffers, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateAllocateCommandBuffers]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateAllocateCommandBuffers(device, pAllocateInfo, pCommandBuffers, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkAllocateCommandBuffers); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordAllocateCommandBuffers]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordAllocateCommandBuffers(device, pAllocateInfo, pCommandBuffers, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordAllocateCommandBuffers]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordAllocateCommandBuffers(device, pAllocateInfo, pCommandBuffers, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchAllocateCommandBuffers(device, pAllocateInfo, pCommandBuffers); + result = device_dispatch->AllocateCommandBuffers(device, pAllocateInfo, pCommandBuffers); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordAllocateCommandBuffers]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordAllocateCommandBuffers(device, pAllocateInfo, pCommandBuffers, record_obj); - } - } - - if ((result == VK_SUCCESS) && pAllocateInfo && (pAllocateInfo->level == VK_COMMAND_BUFFER_LEVEL_SECONDARY)) { - auto lock = WriteLockGuard(secondary_cb_map_mutex); - for (uint32_t cb_index = 0; cb_index < pAllocateInfo->commandBufferCount; cb_index++) { - secondary_cb_map.emplace(pCommandBuffers[cb_index], pAllocateInfo->commandPool); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordAllocateCommandBuffers]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordAllocateCommandBuffers(device, pAllocateInfo, pCommandBuffers, record_obj); } } return result; @@ -4349,42 +2877,34 @@ VKAPI_ATTR void VKAPI_CALL FreeCommandBuffers(VkDevice device, VkCommandPool com const VkCommandBuffer* pCommandBuffers) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkFreeCommandBuffers, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateFreeCommandBuffers]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateFreeCommandBuffers(device, commandPool, commandBufferCount, pCommandBuffers, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateFreeCommandBuffers]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateFreeCommandBuffers(device, commandPool, commandBufferCount, pCommandBuffers, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkFreeCommandBuffers); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordFreeCommandBuffers]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordFreeCommandBuffers(device, commandPool, commandBufferCount, pCommandBuffers, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordFreeCommandBuffers]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordFreeCommandBuffers(device, commandPool, commandBufferCount, pCommandBuffers, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchFreeCommandBuffers(device, commandPool, commandBufferCount, pCommandBuffers); + device_dispatch->FreeCommandBuffers(device, commandPool, commandBufferCount, pCommandBuffers); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordFreeCommandBuffers]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordFreeCommandBuffers(device, commandPool, commandBufferCount, pCommandBuffers, record_obj); - } - } - - { - auto lock = WriteLockGuard(secondary_cb_map_mutex); - for (uint32_t cb_index = 0; cb_index < commandBufferCount; cb_index++) { - secondary_cb_map.erase(pCommandBuffers[cb_index]); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordFreeCommandBuffers]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordFreeCommandBuffers(device, commandPool, commandBufferCount, pCommandBuffers, record_obj); } } } @@ -4392,36 +2912,36 @@ VKAPI_ATTR void VKAPI_CALL FreeCommandBuffers(VkDevice device, VkCommandPool com VKAPI_ATTR VkResult VKAPI_CALL EndCommandBuffer(VkCommandBuffer commandBuffer) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkEndCommandBuffer, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateEndCommandBuffer]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateEndCommandBuffer(commandBuffer, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateEndCommandBuffer]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateEndCommandBuffer(commandBuffer, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkEndCommandBuffer); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordEndCommandBuffer]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordEndCommandBuffer(commandBuffer, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordEndCommandBuffer]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordEndCommandBuffer(commandBuffer, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchEndCommandBuffer(commandBuffer); + result = device_dispatch->EndCommandBuffer(commandBuffer); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordEndCommandBuffer]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordEndCommandBuffer(commandBuffer, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordEndCommandBuffer]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordEndCommandBuffer(commandBuffer, record_obj); } } return result; @@ -4430,36 +2950,36 @@ VKAPI_ATTR VkResult VKAPI_CALL EndCommandBuffer(VkCommandBuffer commandBuffer) { VKAPI_ATTR VkResult VKAPI_CALL ResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkResetCommandBuffer, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateResetCommandBuffer]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateResetCommandBuffer(commandBuffer, flags, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateResetCommandBuffer]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateResetCommandBuffer(commandBuffer, flags, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkResetCommandBuffer); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordResetCommandBuffer]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordResetCommandBuffer(commandBuffer, flags, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordResetCommandBuffer]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordResetCommandBuffer(commandBuffer, flags, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchResetCommandBuffer(commandBuffer, flags); + result = device_dispatch->ResetCommandBuffer(commandBuffer, flags); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordResetCommandBuffer]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordResetCommandBuffer(commandBuffer, flags, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordResetCommandBuffer]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordResetCommandBuffer(commandBuffer, flags, record_obj); } } return result; @@ -4469,34 +2989,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBindPipeline(VkCommandBuffer commandBuffer, VkPipe VkPipeline pipeline) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBindPipeline, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBindPipeline]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBindPipeline(commandBuffer, pipelineBindPoint, pipeline, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBindPipeline]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBindPipeline(commandBuffer, pipelineBindPoint, pipeline, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBindPipeline); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBindPipeline]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBindPipeline(commandBuffer, pipelineBindPoint, pipeline, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBindPipeline]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBindPipeline(commandBuffer, pipelineBindPoint, pipeline, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBindPipeline(commandBuffer, pipelineBindPoint, pipeline); + device_dispatch->CmdBindPipeline(commandBuffer, pipelineBindPoint, pipeline); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBindPipeline]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBindPipeline(commandBuffer, pipelineBindPoint, pipeline, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBindPipeline]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBindPipeline(commandBuffer, pipelineBindPoint, pipeline, record_obj); } } } @@ -4505,34 +3025,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewport(VkCommandBuffer commandBuffer, uint32_ const VkViewport* pViewports) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetViewport, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetViewport]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetViewport(commandBuffer, firstViewport, viewportCount, pViewports, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetViewport]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetViewport(commandBuffer, firstViewport, viewportCount, pViewports, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetViewport); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetViewport]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetViewport(commandBuffer, firstViewport, viewportCount, pViewports, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetViewport]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetViewport(commandBuffer, firstViewport, viewportCount, pViewports, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetViewport(commandBuffer, firstViewport, viewportCount, pViewports); + device_dispatch->CmdSetViewport(commandBuffer, firstViewport, viewportCount, pViewports); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetViewport]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetViewport(commandBuffer, firstViewport, viewportCount, pViewports, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetViewport]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetViewport(commandBuffer, firstViewport, viewportCount, pViewports, record_obj); } } } @@ -4541,34 +3061,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetScissor(VkCommandBuffer commandBuffer, uint32_t const VkRect2D* pScissors) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetScissor, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetScissor]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetScissor(commandBuffer, firstScissor, scissorCount, pScissors, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetScissor]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetScissor(commandBuffer, firstScissor, scissorCount, pScissors, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetScissor); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetScissor]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetScissor(commandBuffer, firstScissor, scissorCount, pScissors, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetScissor]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetScissor(commandBuffer, firstScissor, scissorCount, pScissors, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetScissor(commandBuffer, firstScissor, scissorCount, pScissors); + device_dispatch->CmdSetScissor(commandBuffer, firstScissor, scissorCount, pScissors); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetScissor]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetScissor(commandBuffer, firstScissor, scissorCount, pScissors, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetScissor]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetScissor(commandBuffer, firstScissor, scissorCount, pScissors, record_obj); } } } @@ -4576,34 +3096,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetScissor(VkCommandBuffer commandBuffer, uint32_t VKAPI_ATTR void VKAPI_CALL CmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetLineWidth, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetLineWidth]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetLineWidth(commandBuffer, lineWidth, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetLineWidth]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetLineWidth(commandBuffer, lineWidth, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetLineWidth); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetLineWidth]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetLineWidth(commandBuffer, lineWidth, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetLineWidth]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetLineWidth(commandBuffer, lineWidth, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetLineWidth(commandBuffer, lineWidth); + device_dispatch->CmdSetLineWidth(commandBuffer, lineWidth); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetLineWidth]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetLineWidth(commandBuffer, lineWidth, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetLineWidth]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetLineWidth(commandBuffer, lineWidth, record_obj); } } } @@ -4612,37 +3132,37 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBias(VkCommandBuffer commandBuffer, float float depthBiasSlopeFactor) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDepthBias, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthBias]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDepthBias(commandBuffer, depthBiasConstantFactor, depthBiasClamp, - depthBiasSlopeFactor, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthBias]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDepthBias(commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor, + error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDepthBias); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthBias]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDepthBias(commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthBias]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDepthBias(commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor, + record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDepthBias(commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor); + device_dispatch->CmdSetDepthBias(commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthBias]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDepthBias(commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthBias]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDepthBias(commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor, + record_obj); } } } @@ -4650,34 +3170,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBias(VkCommandBuffer commandBuffer, float VKAPI_ATTR void VKAPI_CALL CmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4]) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetBlendConstants, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetBlendConstants]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetBlendConstants(commandBuffer, blendConstants, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetBlendConstants]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetBlendConstants(commandBuffer, blendConstants, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetBlendConstants); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetBlendConstants]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetBlendConstants(commandBuffer, blendConstants, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetBlendConstants]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetBlendConstants(commandBuffer, blendConstants, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetBlendConstants(commandBuffer, blendConstants); + device_dispatch->CmdSetBlendConstants(commandBuffer, blendConstants); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetBlendConstants]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetBlendConstants(commandBuffer, blendConstants, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetBlendConstants]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetBlendConstants(commandBuffer, blendConstants, record_obj); } } } @@ -4685,34 +3205,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetBlendConstants(VkCommandBuffer commandBuffer, c VKAPI_ATTR void VKAPI_CALL CmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDepthBounds, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthBounds]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDepthBounds(commandBuffer, minDepthBounds, maxDepthBounds, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthBounds]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDepthBounds(commandBuffer, minDepthBounds, maxDepthBounds, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDepthBounds); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthBounds]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDepthBounds(commandBuffer, minDepthBounds, maxDepthBounds, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthBounds]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDepthBounds(commandBuffer, minDepthBounds, maxDepthBounds, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDepthBounds(commandBuffer, minDepthBounds, maxDepthBounds); + device_dispatch->CmdSetDepthBounds(commandBuffer, minDepthBounds, maxDepthBounds); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthBounds]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDepthBounds(commandBuffer, minDepthBounds, maxDepthBounds, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthBounds]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDepthBounds(commandBuffer, minDepthBounds, maxDepthBounds, record_obj); } } } @@ -4721,35 +3241,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilCompareMask(VkCommandBuffer commandBuffe uint32_t compareMask) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetStencilCompareMask, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetStencilCompareMask]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetStencilCompareMask(commandBuffer, faceMask, compareMask, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetStencilCompareMask]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetStencilCompareMask(commandBuffer, faceMask, compareMask, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetStencilCompareMask); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetStencilCompareMask]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetStencilCompareMask(commandBuffer, faceMask, compareMask, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetStencilCompareMask]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetStencilCompareMask(commandBuffer, faceMask, compareMask, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetStencilCompareMask(commandBuffer, faceMask, compareMask); + device_dispatch->CmdSetStencilCompareMask(commandBuffer, faceMask, compareMask); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetStencilCompareMask]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetStencilCompareMask(commandBuffer, faceMask, compareMask, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetStencilCompareMask]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetStencilCompareMask(commandBuffer, faceMask, compareMask, record_obj); } } } @@ -4757,34 +3276,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilCompareMask(VkCommandBuffer commandBuffe VKAPI_ATTR void VKAPI_CALL CmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetStencilWriteMask, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetStencilWriteMask]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetStencilWriteMask(commandBuffer, faceMask, writeMask, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetStencilWriteMask]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetStencilWriteMask(commandBuffer, faceMask, writeMask, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetStencilWriteMask); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetStencilWriteMask]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetStencilWriteMask(commandBuffer, faceMask, writeMask, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetStencilWriteMask]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetStencilWriteMask(commandBuffer, faceMask, writeMask, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetStencilWriteMask(commandBuffer, faceMask, writeMask); + device_dispatch->CmdSetStencilWriteMask(commandBuffer, faceMask, writeMask); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetStencilWriteMask]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetStencilWriteMask(commandBuffer, faceMask, writeMask, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetStencilWriteMask]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetStencilWriteMask(commandBuffer, faceMask, writeMask, record_obj); } } } @@ -4792,34 +3311,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VKAPI_ATTR void VKAPI_CALL CmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetStencilReference, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetStencilReference]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetStencilReference(commandBuffer, faceMask, reference, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetStencilReference]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetStencilReference(commandBuffer, faceMask, reference, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetStencilReference); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetStencilReference]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetStencilReference(commandBuffer, faceMask, reference, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetStencilReference]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetStencilReference(commandBuffer, faceMask, reference, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetStencilReference(commandBuffer, faceMask, reference); + device_dispatch->CmdSetStencilReference(commandBuffer, faceMask, reference); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetStencilReference]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetStencilReference(commandBuffer, faceMask, reference, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetStencilReference]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetStencilReference(commandBuffer, faceMask, reference, record_obj); } } } @@ -4830,39 +3349,38 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorSets(VkCommandBuffer commandBuffer, const uint32_t* pDynamicOffsets) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBindDescriptorSets, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBindDescriptorSets]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBindDescriptorSets(commandBuffer, pipelineBindPoint, layout, firstSet, - descriptorSetCount, pDescriptorSets, dynamicOffsetCount, - pDynamicOffsets, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBindDescriptorSets]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBindDescriptorSets(commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, + pDescriptorSets, dynamicOffsetCount, pDynamicOffsets, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBindDescriptorSets); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBindDescriptorSets]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBindDescriptorSets(commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, - pDescriptorSets, dynamicOffsetCount, pDynamicOffsets, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBindDescriptorSets]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBindDescriptorSets(commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, + pDescriptorSets, dynamicOffsetCount, pDynamicOffsets, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBindDescriptorSets(commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, pDescriptorSets, - dynamicOffsetCount, pDynamicOffsets); + device_dispatch->CmdBindDescriptorSets(commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, + pDescriptorSets, dynamicOffsetCount, pDynamicOffsets); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBindDescriptorSets]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBindDescriptorSets(commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, - pDescriptorSets, dynamicOffsetCount, pDynamicOffsets, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBindDescriptorSets]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBindDescriptorSets(commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, + pDescriptorSets, dynamicOffsetCount, pDynamicOffsets, record_obj); } } } @@ -4871,34 +3389,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkB VkIndexType indexType) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBindIndexBuffer, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBindIndexBuffer]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBindIndexBuffer(commandBuffer, buffer, offset, indexType, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBindIndexBuffer]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBindIndexBuffer(commandBuffer, buffer, offset, indexType, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBindIndexBuffer); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBindIndexBuffer]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBindIndexBuffer(commandBuffer, buffer, offset, indexType, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBindIndexBuffer]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBindIndexBuffer(commandBuffer, buffer, offset, indexType, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBindIndexBuffer(commandBuffer, buffer, offset, indexType); + device_dispatch->CmdBindIndexBuffer(commandBuffer, buffer, offset, indexType); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBindIndexBuffer]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBindIndexBuffer(commandBuffer, buffer, offset, indexType, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBindIndexBuffer]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBindIndexBuffer(commandBuffer, buffer, offset, indexType, record_obj); } } } @@ -4907,36 +3425,35 @@ VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers(VkCommandBuffer commandBuffer, u const VkBuffer* pBuffers, const VkDeviceSize* pOffsets) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBindVertexBuffers, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBindVertexBuffers]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBindVertexBuffers(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBindVertexBuffers]) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateCmdBindVertexBuffers(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBindVertexBuffers); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBindVertexBuffers]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBindVertexBuffers(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBindVertexBuffers]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBindVertexBuffers(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBindVertexBuffers(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets); + device_dispatch->CmdBindVertexBuffers(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBindVertexBuffers]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBindVertexBuffers(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBindVertexBuffers]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBindVertexBuffers(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, record_obj); } } } @@ -4945,35 +3462,34 @@ VKAPI_ATTR void VKAPI_CALL CmdDraw(VkCommandBuffer commandBuffer, uint32_t verte uint32_t firstVertex, uint32_t firstInstance) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDraw, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDraw]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateCmdDraw(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDraw]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDraw(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDraw); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDraw]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDraw(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDraw]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDraw(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDraw(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance); + device_dispatch->CmdDraw(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDraw]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDraw(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDraw]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDraw(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance, record_obj); } } } @@ -4982,37 +3498,37 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_ uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDrawIndexed, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDrawIndexed]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDrawIndexed(commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, - firstInstance, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDrawIndexed]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDrawIndexed(commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, + firstInstance, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDrawIndexed); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDrawIndexed]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDrawIndexed(commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, - firstInstance, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDrawIndexed]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDrawIndexed(commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance, + record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDrawIndexed(commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance); + device_dispatch->CmdDrawIndexed(commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDrawIndexed]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDrawIndexed(commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, - firstInstance, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDrawIndexed]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDrawIndexed(commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance, + record_obj); } } } @@ -5021,34 +3537,34 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuff uint32_t stride) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDrawIndirect, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDrawIndirect]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDrawIndirect(commandBuffer, buffer, offset, drawCount, stride, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDrawIndirect]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDrawIndirect(commandBuffer, buffer, offset, drawCount, stride, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDrawIndirect); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDrawIndirect]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDrawIndirect(commandBuffer, buffer, offset, drawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDrawIndirect]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDrawIndirect(commandBuffer, buffer, offset, drawCount, stride, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDrawIndirect(commandBuffer, buffer, offset, drawCount, stride); + device_dispatch->CmdDrawIndirect(commandBuffer, buffer, offset, drawCount, stride); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDrawIndirect]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDrawIndirect(commandBuffer, buffer, offset, drawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDrawIndirect]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDrawIndirect(commandBuffer, buffer, offset, drawCount, stride, record_obj); } } } @@ -5057,34 +3573,34 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, uint32_t drawCount, uint32_t stride) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDrawIndexedIndirect, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDrawIndexedIndirect]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDrawIndexedIndirect(commandBuffer, buffer, offset, drawCount, stride, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDrawIndexedIndirect]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDrawIndexedIndirect(commandBuffer, buffer, offset, drawCount, stride, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDrawIndexedIndirect); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDrawIndexedIndirect]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDrawIndexedIndirect(commandBuffer, buffer, offset, drawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDrawIndexedIndirect]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDrawIndexedIndirect(commandBuffer, buffer, offset, drawCount, stride, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDrawIndexedIndirect(commandBuffer, buffer, offset, drawCount, stride); + device_dispatch->CmdDrawIndexedIndirect(commandBuffer, buffer, offset, drawCount, stride); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDrawIndexedIndirect]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDrawIndexedIndirect(commandBuffer, buffer, offset, drawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDrawIndexedIndirect]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDrawIndexedIndirect(commandBuffer, buffer, offset, drawCount, stride, record_obj); } } } @@ -5093,34 +3609,34 @@ VKAPI_ATTR void VKAPI_CALL CmdDispatch(VkCommandBuffer commandBuffer, uint32_t g uint32_t groupCountZ) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDispatch, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDispatch]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDispatch(commandBuffer, groupCountX, groupCountY, groupCountZ, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDispatch]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDispatch(commandBuffer, groupCountX, groupCountY, groupCountZ, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDispatch); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDispatch]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDispatch(commandBuffer, groupCountX, groupCountY, groupCountZ, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDispatch]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDispatch(commandBuffer, groupCountX, groupCountY, groupCountZ, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDispatch(commandBuffer, groupCountX, groupCountY, groupCountZ); + device_dispatch->CmdDispatch(commandBuffer, groupCountX, groupCountY, groupCountZ); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDispatch]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDispatch(commandBuffer, groupCountX, groupCountY, groupCountZ, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDispatch]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDispatch(commandBuffer, groupCountX, groupCountY, groupCountZ, record_obj); } } } @@ -5128,34 +3644,34 @@ VKAPI_ATTR void VKAPI_CALL CmdDispatch(VkCommandBuffer commandBuffer, uint32_t g VKAPI_ATTR void VKAPI_CALL CmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDispatchIndirect, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDispatchIndirect]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDispatchIndirect(commandBuffer, buffer, offset, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDispatchIndirect]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDispatchIndirect(commandBuffer, buffer, offset, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDispatchIndirect); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDispatchIndirect]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDispatchIndirect(commandBuffer, buffer, offset, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDispatchIndirect]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDispatchIndirect(commandBuffer, buffer, offset, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDispatchIndirect(commandBuffer, buffer, offset); + device_dispatch->CmdDispatchIndirect(commandBuffer, buffer, offset); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDispatchIndirect]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDispatchIndirect(commandBuffer, buffer, offset, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDispatchIndirect]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDispatchIndirect(commandBuffer, buffer, offset, record_obj); } } } @@ -5164,34 +3680,34 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer uint32_t regionCount, const VkBufferCopy* pRegions) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCopyBuffer, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCopyBuffer]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCopyBuffer(commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCopyBuffer]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCopyBuffer(commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCopyBuffer); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCopyBuffer]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCopyBuffer(commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCopyBuffer]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCopyBuffer(commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCopyBuffer(commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions); + device_dispatch->CmdCopyBuffer(commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCopyBuffer]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCopyBuffer(commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCopyBuffer]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCopyBuffer(commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions, record_obj); } } } @@ -5201,37 +3717,37 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImage(VkCommandBuffer commandBuffer, VkImage s const VkImageCopy* pRegions) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCopyImage, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCopyImage]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCopyImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, - regionCount, pRegions, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCopyImage]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCopyImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, + pRegions, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCopyImage); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCopyImage]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCopyImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, - pRegions, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCopyImage]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCopyImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, + record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCopyImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); + device_dispatch->CmdCopyImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCopyImage]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCopyImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, - pRegions, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCopyImage]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCopyImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, + record_obj); } } } @@ -5241,37 +3757,38 @@ VKAPI_ATTR void VKAPI_CALL CmdBlitImage(VkCommandBuffer commandBuffer, VkImage s const VkImageBlit* pRegions, VkFilter filter) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBlitImage, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBlitImage]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBlitImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, - regionCount, pRegions, filter, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBlitImage]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBlitImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, + pRegions, filter, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBlitImage); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBlitImage]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBlitImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, - pRegions, filter, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBlitImage]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBlitImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, + filter, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBlitImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter); + device_dispatch->CmdBlitImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, + filter); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBlitImage]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBlitImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, - pRegions, filter, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBlitImage]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBlitImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, + filter, record_obj); } } } @@ -5281,37 +3798,37 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage(VkCommandBuffer commandBuffer, V const VkBufferImageCopy* pRegions) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCopyBufferToImage, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCopyBufferToImage]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCopyBufferToImage(commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, - pRegions, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCopyBufferToImage]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCopyBufferToImage(commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, + pRegions, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCopyBufferToImage); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCopyBufferToImage]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCopyBufferToImage(commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCopyBufferToImage]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCopyBufferToImage(commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions, + record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCopyBufferToImage(commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions); + device_dispatch->CmdCopyBufferToImage(commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCopyBufferToImage]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCopyBufferToImage(commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCopyBufferToImage]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCopyBufferToImage(commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions, + record_obj); } } } @@ -5320,37 +3837,37 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer(VkCommandBuffer commandBuffer, V VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCopyImageToBuffer, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCopyImageToBuffer]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCopyImageToBuffer(commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, - pRegions, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCopyImageToBuffer]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCopyImageToBuffer(commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, + pRegions, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCopyImageToBuffer); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCopyImageToBuffer]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCopyImageToBuffer(commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCopyImageToBuffer]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCopyImageToBuffer(commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions, + record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCopyImageToBuffer(commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions); + device_dispatch->CmdCopyImageToBuffer(commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCopyImageToBuffer]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCopyImageToBuffer(commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCopyImageToBuffer]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCopyImageToBuffer(commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions, + record_obj); } } } @@ -5359,34 +3876,34 @@ VKAPI_ATTR void VKAPI_CALL CmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuff VkDeviceSize dataSize, const void* pData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdUpdateBuffer, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdUpdateBuffer]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, dataSize, pData, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdUpdateBuffer]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, dataSize, pData, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdUpdateBuffer); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdUpdateBuffer]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, dataSize, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdUpdateBuffer]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, dataSize, pData, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, dataSize, pData); + device_dispatch->CmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, dataSize, pData); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdUpdateBuffer]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, dataSize, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdUpdateBuffer]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, dataSize, pData, record_obj); } } } @@ -5395,34 +3912,34 @@ VKAPI_ATTR void VKAPI_CALL CmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer VkDeviceSize size, uint32_t data) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdFillBuffer, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdFillBuffer]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdFillBuffer(commandBuffer, dstBuffer, dstOffset, size, data, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdFillBuffer]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdFillBuffer(commandBuffer, dstBuffer, dstOffset, size, data, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdFillBuffer); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdFillBuffer]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdFillBuffer(commandBuffer, dstBuffer, dstOffset, size, data, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdFillBuffer]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdFillBuffer(commandBuffer, dstBuffer, dstOffset, size, data, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdFillBuffer(commandBuffer, dstBuffer, dstOffset, size, data); + device_dispatch->CmdFillBuffer(commandBuffer, dstBuffer, dstOffset, size, data); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdFillBuffer]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdFillBuffer(commandBuffer, dstBuffer, dstOffset, size, data, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdFillBuffer]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdFillBuffer(commandBuffer, dstBuffer, dstOffset, size, data, record_obj); } } } @@ -5432,35 +3949,35 @@ VKAPI_ATTR void VKAPI_CALL CmdClearColorImage(VkCommandBuffer commandBuffer, VkI const VkImageSubresourceRange* pRanges) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdClearColorImage, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdClearColorImage]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdClearColorImage(commandBuffer, image, imageLayout, pColor, rangeCount, pRanges, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdClearColorImage]) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateCmdClearColorImage(commandBuffer, image, imageLayout, pColor, rangeCount, pRanges, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdClearColorImage); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdClearColorImage]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdClearColorImage(commandBuffer, image, imageLayout, pColor, rangeCount, pRanges, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdClearColorImage]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdClearColorImage(commandBuffer, image, imageLayout, pColor, rangeCount, pRanges, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdClearColorImage(commandBuffer, image, imageLayout, pColor, rangeCount, pRanges); + device_dispatch->CmdClearColorImage(commandBuffer, image, imageLayout, pColor, rangeCount, pRanges); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdClearColorImage]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdClearColorImage(commandBuffer, image, imageLayout, pColor, rangeCount, pRanges, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdClearColorImage]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdClearColorImage(commandBuffer, image, imageLayout, pColor, rangeCount, pRanges, record_obj); } } } @@ -5470,38 +3987,37 @@ VKAPI_ATTR void VKAPI_CALL CmdClearDepthStencilImage(VkCommandBuffer commandBuff const VkImageSubresourceRange* pRanges) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdClearDepthStencilImage, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdClearDepthStencilImage]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdClearDepthStencilImage(commandBuffer, image, imageLayout, pDepthStencil, - rangeCount, pRanges, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdClearDepthStencilImage]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdClearDepthStencilImage(commandBuffer, image, imageLayout, pDepthStencil, rangeCount, + pRanges, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdClearDepthStencilImage); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdClearDepthStencilImage]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdClearDepthStencilImage(commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdClearDepthStencilImage]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdClearDepthStencilImage(commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges, + record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdClearDepthStencilImage(commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges); + device_dispatch->CmdClearDepthStencilImage(commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdClearDepthStencilImage]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdClearDepthStencilImage(commandBuffer, image, imageLayout, pDepthStencil, rangeCount, - pRanges, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdClearDepthStencilImage]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdClearDepthStencilImage(commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges, + record_obj); } } } @@ -5511,37 +4027,35 @@ VKAPI_ATTR void VKAPI_CALL CmdClearAttachments(VkCommandBuffer commandBuffer, ui const VkClearRect* pRects) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdClearAttachments, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdClearAttachments]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdClearAttachments(commandBuffer, attachmentCount, pAttachments, rectCount, pRects, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdClearAttachments]) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateCmdClearAttachments(commandBuffer, attachmentCount, pAttachments, rectCount, pRects, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdClearAttachments); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdClearAttachments]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdClearAttachments(commandBuffer, attachmentCount, pAttachments, rectCount, pRects, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdClearAttachments]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdClearAttachments(commandBuffer, attachmentCount, pAttachments, rectCount, pRects, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdClearAttachments(commandBuffer, attachmentCount, pAttachments, rectCount, pRects); + device_dispatch->CmdClearAttachments(commandBuffer, attachmentCount, pAttachments, rectCount, pRects); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdClearAttachments]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdClearAttachments(commandBuffer, attachmentCount, pAttachments, rectCount, pRects, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdClearAttachments]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdClearAttachments(commandBuffer, attachmentCount, pAttachments, rectCount, pRects, record_obj); } } } @@ -5551,37 +4065,37 @@ VKAPI_ATTR void VKAPI_CALL CmdResolveImage(VkCommandBuffer commandBuffer, VkImag const VkImageResolve* pRegions) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdResolveImage, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdResolveImage]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdResolveImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, - regionCount, pRegions, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdResolveImage]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdResolveImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, + regionCount, pRegions, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdResolveImage); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdResolveImage]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdResolveImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, - pRegions, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdResolveImage]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdResolveImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, + pRegions, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdResolveImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); + device_dispatch->CmdResolveImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdResolveImage]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdResolveImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, - pRegions, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdResolveImage]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdResolveImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, + pRegions, record_obj); } } } @@ -5589,34 +4103,34 @@ VKAPI_ATTR void VKAPI_CALL CmdResolveImage(VkCommandBuffer commandBuffer, VkImag VKAPI_ATTR void VKAPI_CALL CmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetEvent, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetEvent]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetEvent(commandBuffer, event, stageMask, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetEvent]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetEvent(commandBuffer, event, stageMask, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetEvent); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetEvent]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetEvent(commandBuffer, event, stageMask, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetEvent]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetEvent(commandBuffer, event, stageMask, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetEvent(commandBuffer, event, stageMask); + device_dispatch->CmdSetEvent(commandBuffer, event, stageMask); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetEvent]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetEvent(commandBuffer, event, stageMask, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetEvent]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetEvent(commandBuffer, event, stageMask, record_obj); } } } @@ -5624,34 +4138,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetEvent(VkCommandBuffer commandBuffer, VkEvent ev VKAPI_ATTR void VKAPI_CALL CmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdResetEvent, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdResetEvent]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdResetEvent(commandBuffer, event, stageMask, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdResetEvent]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdResetEvent(commandBuffer, event, stageMask, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdResetEvent); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdResetEvent]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdResetEvent(commandBuffer, event, stageMask, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdResetEvent]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdResetEvent(commandBuffer, event, stageMask, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdResetEvent(commandBuffer, event, stageMask); + device_dispatch->CmdResetEvent(commandBuffer, event, stageMask); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdResetEvent]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdResetEvent(commandBuffer, event, stageMask, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdResetEvent]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdResetEvent(commandBuffer, event, stageMask, record_obj); } } } @@ -5663,14 +4177,14 @@ VKAPI_ATTR void VKAPI_CALL CmdWaitEvents(VkCommandBuffer commandBuffer, uint32_t uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdWaitEvents, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdWaitEvents]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdWaitEvents( + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdWaitEvents]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdWaitEvents( commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers, error_obj); if (skip) return; @@ -5679,25 +4193,26 @@ VKAPI_ATTR void VKAPI_CALL CmdWaitEvents(VkCommandBuffer commandBuffer, uint32_t RecordObject record_obj(vvl::Func::vkCmdWaitEvents); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdWaitEvents]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdWaitEvents(commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, - memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, - pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdWaitEvents]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdWaitEvents(commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, + pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, + imageMemoryBarrierCount, pImageMemoryBarriers, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdWaitEvents(commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, - bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); + device_dispatch->CmdWaitEvents(commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, + pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, + pImageMemoryBarriers); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdWaitEvents]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdWaitEvents( - commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, - bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdWaitEvents]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdWaitEvents(commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, + pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, + imageMemoryBarrierCount, pImageMemoryBarriers, record_obj); } } } @@ -5709,14 +4224,14 @@ VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier(VkCommandBuffer commandBuffer, VkP uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdPipelineBarrier, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdPipelineBarrier]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdPipelineBarrier( + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdPipelineBarrier]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdPipelineBarrier( commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers, error_obj); if (skip) return; @@ -5725,25 +4240,26 @@ VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier(VkCommandBuffer commandBuffer, VkP RecordObject record_obj(vvl::Func::vkCmdPipelineBarrier); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdPipelineBarrier]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdPipelineBarrier( - commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, - bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdPipelineBarrier]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdPipelineBarrier(commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, + pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, + imageMemoryBarrierCount, pImageMemoryBarriers, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdPipelineBarrier(commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, - bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); + device_dispatch->CmdPipelineBarrier(commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, + pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, + imageMemoryBarrierCount, pImageMemoryBarriers); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdPipelineBarrier]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdPipelineBarrier( - commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, - bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdPipelineBarrier]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdPipelineBarrier(commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, + pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, + imageMemoryBarrierCount, pImageMemoryBarriers, record_obj); } } } @@ -5752,34 +4268,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryP VkQueryControlFlags flags) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBeginQuery, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBeginQuery]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBeginQuery(commandBuffer, queryPool, query, flags, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBeginQuery]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBeginQuery(commandBuffer, queryPool, query, flags, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBeginQuery); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBeginQuery]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBeginQuery(commandBuffer, queryPool, query, flags, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBeginQuery]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBeginQuery(commandBuffer, queryPool, query, flags, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBeginQuery(commandBuffer, queryPool, query, flags); + device_dispatch->CmdBeginQuery(commandBuffer, queryPool, query, flags); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBeginQuery]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBeginQuery(commandBuffer, queryPool, query, flags, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBeginQuery]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBeginQuery(commandBuffer, queryPool, query, flags, record_obj); } } } @@ -5787,34 +4303,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryP VKAPI_ATTR void VKAPI_CALL CmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdEndQuery, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdEndQuery]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdEndQuery(commandBuffer, queryPool, query, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdEndQuery]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdEndQuery(commandBuffer, queryPool, query, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdEndQuery); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdEndQuery]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdEndQuery(commandBuffer, queryPool, query, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdEndQuery]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdEndQuery(commandBuffer, queryPool, query, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdEndQuery(commandBuffer, queryPool, query); + device_dispatch->CmdEndQuery(commandBuffer, queryPool, query); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdEndQuery]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdEndQuery(commandBuffer, queryPool, query, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdEndQuery]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdEndQuery(commandBuffer, queryPool, query, record_obj); } } } @@ -5823,34 +4339,34 @@ VKAPI_ATTR void VKAPI_CALL CmdResetQueryPool(VkCommandBuffer commandBuffer, VkQu uint32_t queryCount) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdResetQueryPool, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdResetQueryPool]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdResetQueryPool(commandBuffer, queryPool, firstQuery, queryCount, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdResetQueryPool]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdResetQueryPool(commandBuffer, queryPool, firstQuery, queryCount, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdResetQueryPool); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdResetQueryPool]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdResetQueryPool(commandBuffer, queryPool, firstQuery, queryCount, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdResetQueryPool]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdResetQueryPool(commandBuffer, queryPool, firstQuery, queryCount, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdResetQueryPool(commandBuffer, queryPool, firstQuery, queryCount); + device_dispatch->CmdResetQueryPool(commandBuffer, queryPool, firstQuery, queryCount); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdResetQueryPool]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdResetQueryPool(commandBuffer, queryPool, firstQuery, queryCount, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdResetQueryPool]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdResetQueryPool(commandBuffer, queryPool, firstQuery, queryCount, record_obj); } } } @@ -5859,34 +4375,34 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPi VkQueryPool queryPool, uint32_t query) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdWriteTimestamp, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdWriteTimestamp]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdWriteTimestamp(commandBuffer, pipelineStage, queryPool, query, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdWriteTimestamp]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdWriteTimestamp(commandBuffer, pipelineStage, queryPool, query, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdWriteTimestamp); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdWriteTimestamp]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdWriteTimestamp(commandBuffer, pipelineStage, queryPool, query, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdWriteTimestamp]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdWriteTimestamp(commandBuffer, pipelineStage, queryPool, query, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdWriteTimestamp(commandBuffer, pipelineStage, queryPool, query); + device_dispatch->CmdWriteTimestamp(commandBuffer, pipelineStage, queryPool, query); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdWriteTimestamp]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdWriteTimestamp(commandBuffer, pipelineStage, queryPool, query, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdWriteTimestamp]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdWriteTimestamp(commandBuffer, pipelineStage, queryPool, query, record_obj); } } } @@ -5896,37 +4412,38 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyQueryPoolResults(VkCommandBuffer commandBuffer VkDeviceSize stride, VkQueryResultFlags flags) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCopyQueryPoolResults, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCopyQueryPoolResults]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCopyQueryPoolResults(commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, - dstOffset, stride, flags, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCopyQueryPoolResults]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCopyQueryPoolResults(commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, + dstOffset, stride, flags, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCopyQueryPoolResults); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCopyQueryPoolResults]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCopyQueryPoolResults(commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, - stride, flags, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCopyQueryPoolResults]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCopyQueryPoolResults(commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, + flags, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCopyQueryPoolResults(commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags); + device_dispatch->CmdCopyQueryPoolResults(commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, + flags); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCopyQueryPoolResults]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCopyQueryPoolResults(commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, - stride, flags, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCopyQueryPoolResults]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCopyQueryPoolResults(commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, + stride, flags, record_obj); } } } @@ -5935,34 +4452,34 @@ VKAPI_ATTR void VKAPI_CALL CmdPushConstants(VkCommandBuffer commandBuffer, VkPip uint32_t offset, uint32_t size, const void* pValues) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdPushConstants, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdPushConstants]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdPushConstants(commandBuffer, layout, stageFlags, offset, size, pValues, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdPushConstants]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdPushConstants(commandBuffer, layout, stageFlags, offset, size, pValues, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdPushConstants); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdPushConstants]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdPushConstants(commandBuffer, layout, stageFlags, offset, size, pValues, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdPushConstants]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdPushConstants(commandBuffer, layout, stageFlags, offset, size, pValues, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdPushConstants(commandBuffer, layout, stageFlags, offset, size, pValues); + device_dispatch->CmdPushConstants(commandBuffer, layout, stageFlags, offset, size, pValues); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdPushConstants]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdPushConstants(commandBuffer, layout, stageFlags, offset, size, pValues, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdPushConstants]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdPushConstants(commandBuffer, layout, stageFlags, offset, size, pValues, record_obj); } } } @@ -5971,34 +4488,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass(VkCommandBuffer commandBuffer, con VkSubpassContents contents) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBeginRenderPass, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBeginRenderPass]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBeginRenderPass(commandBuffer, pRenderPassBegin, contents, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBeginRenderPass]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBeginRenderPass(commandBuffer, pRenderPassBegin, contents, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBeginRenderPass); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBeginRenderPass]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBeginRenderPass(commandBuffer, pRenderPassBegin, contents, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBeginRenderPass]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBeginRenderPass(commandBuffer, pRenderPassBegin, contents, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBeginRenderPass(commandBuffer, pRenderPassBegin, contents); + device_dispatch->CmdBeginRenderPass(commandBuffer, pRenderPassBegin, contents); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBeginRenderPass]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBeginRenderPass(commandBuffer, pRenderPassBegin, contents, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBeginRenderPass]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBeginRenderPass(commandBuffer, pRenderPassBegin, contents, record_obj); } } } @@ -6006,34 +4523,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass(VkCommandBuffer commandBuffer, con VKAPI_ATTR void VKAPI_CALL CmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdNextSubpass, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdNextSubpass]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdNextSubpass(commandBuffer, contents, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdNextSubpass]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdNextSubpass(commandBuffer, contents, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdNextSubpass); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdNextSubpass]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdNextSubpass(commandBuffer, contents, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdNextSubpass]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdNextSubpass(commandBuffer, contents, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdNextSubpass(commandBuffer, contents); + device_dispatch->CmdNextSubpass(commandBuffer, contents); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdNextSubpass]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdNextSubpass(commandBuffer, contents, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdNextSubpass]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdNextSubpass(commandBuffer, contents, record_obj); } } } @@ -6041,34 +4558,34 @@ VKAPI_ATTR void VKAPI_CALL CmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpa VKAPI_ATTR void VKAPI_CALL CmdEndRenderPass(VkCommandBuffer commandBuffer) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdEndRenderPass, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdEndRenderPass]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdEndRenderPass(commandBuffer, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdEndRenderPass]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdEndRenderPass(commandBuffer, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdEndRenderPass); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdEndRenderPass]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdEndRenderPass(commandBuffer, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdEndRenderPass]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdEndRenderPass(commandBuffer, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdEndRenderPass(commandBuffer); + device_dispatch->CmdEndRenderPass(commandBuffer); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdEndRenderPass]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdEndRenderPass(commandBuffer, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdEndRenderPass]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdEndRenderPass(commandBuffer, record_obj); } } } @@ -6077,34 +4594,34 @@ VKAPI_ATTR void VKAPI_CALL CmdExecuteCommands(VkCommandBuffer commandBuffer, uin const VkCommandBuffer* pCommandBuffers) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdExecuteCommands, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdExecuteCommands]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdExecuteCommands(commandBuffer, commandBufferCount, pCommandBuffers, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdExecuteCommands]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdExecuteCommands(commandBuffer, commandBufferCount, pCommandBuffers, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdExecuteCommands); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdExecuteCommands]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdExecuteCommands(commandBuffer, commandBufferCount, pCommandBuffers, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdExecuteCommands]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdExecuteCommands(commandBuffer, commandBufferCount, pCommandBuffers, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdExecuteCommands(commandBuffer, commandBufferCount, pCommandBuffers); + device_dispatch->CmdExecuteCommands(commandBuffer, commandBufferCount, pCommandBuffers); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdExecuteCommands]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdExecuteCommands(commandBuffer, commandBufferCount, pCommandBuffers, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdExecuteCommands]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdExecuteCommands(commandBuffer, commandBufferCount, pCommandBuffers, record_obj); } } } @@ -6113,36 +4630,36 @@ VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory2(VkDevice device, uint32_t bindI const VkBindBufferMemoryInfo* pBindInfos) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkBindBufferMemory2, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateBindBufferMemory2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateBindBufferMemory2(device, bindInfoCount, pBindInfos, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateBindBufferMemory2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateBindBufferMemory2(device, bindInfoCount, pBindInfos, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkBindBufferMemory2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordBindBufferMemory2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordBindBufferMemory2(device, bindInfoCount, pBindInfos, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordBindBufferMemory2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordBindBufferMemory2(device, bindInfoCount, pBindInfos, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchBindBufferMemory2(device, bindInfoCount, pBindInfos); + result = device_dispatch->BindBufferMemory2(device, bindInfoCount, pBindInfos); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordBindBufferMemory2]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordBindBufferMemory2(device, bindInfoCount, pBindInfos, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordBindBufferMemory2]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordBindBufferMemory2(device, bindInfoCount, pBindInfos, record_obj); } } return result; @@ -6151,36 +4668,36 @@ VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory2(VkDevice device, uint32_t bindI VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkBindImageMemory2, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateBindImageMemory2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateBindImageMemory2(device, bindInfoCount, pBindInfos, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateBindImageMemory2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateBindImageMemory2(device, bindInfoCount, pBindInfos, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkBindImageMemory2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordBindImageMemory2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordBindImageMemory2(device, bindInfoCount, pBindInfos, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordBindImageMemory2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordBindImageMemory2(device, bindInfoCount, pBindInfos, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchBindImageMemory2(device, bindInfoCount, pBindInfos); + result = device_dispatch->BindImageMemory2(device, bindInfoCount, pBindInfos); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordBindImageMemory2]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordBindImageMemory2(device, bindInfoCount, pBindInfos, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordBindImageMemory2]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordBindImageMemory2(device, bindInfoCount, pBindInfos, record_obj); } } return result; @@ -6191,40 +4708,38 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceGroupPeerMemoryFeatures(VkDevice device, uin VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeviceGroupPeerMemoryFeatures, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeviceGroupPeerMemoryFeatures]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDeviceGroupPeerMemoryFeatures(device, heapIndex, localDeviceIndex, - remoteDeviceIndex, pPeerMemoryFeatures, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeviceGroupPeerMemoryFeatures]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDeviceGroupPeerMemoryFeatures(device, heapIndex, localDeviceIndex, remoteDeviceIndex, + pPeerMemoryFeatures, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetDeviceGroupPeerMemoryFeatures); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeviceGroupPeerMemoryFeatures]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeviceGroupPeerMemoryFeatures(device, heapIndex, localDeviceIndex, remoteDeviceIndex, - pPeerMemoryFeatures, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeviceGroupPeerMemoryFeatures]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeviceGroupPeerMemoryFeatures(device, heapIndex, localDeviceIndex, remoteDeviceIndex, + pPeerMemoryFeatures, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetDeviceGroupPeerMemoryFeatures(device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures); + device_dispatch->GetDeviceGroupPeerMemoryFeatures(device, heapIndex, localDeviceIndex, remoteDeviceIndex, + pPeerMemoryFeatures); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeviceGroupPeerMemoryFeatures]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeviceGroupPeerMemoryFeatures(device, heapIndex, localDeviceIndex, remoteDeviceIndex, - pPeerMemoryFeatures, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeviceGroupPeerMemoryFeatures]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeviceGroupPeerMemoryFeatures(device, heapIndex, localDeviceIndex, remoteDeviceIndex, + pPeerMemoryFeatures, record_obj); } } } @@ -6232,34 +4747,34 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceGroupPeerMemoryFeatures(VkDevice device, uin VKAPI_ATTR void VKAPI_CALL CmdSetDeviceMask(VkCommandBuffer commandBuffer, uint32_t deviceMask) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDeviceMask, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDeviceMask]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDeviceMask(commandBuffer, deviceMask, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDeviceMask]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDeviceMask(commandBuffer, deviceMask, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDeviceMask); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDeviceMask]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDeviceMask(commandBuffer, deviceMask, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDeviceMask]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDeviceMask(commandBuffer, deviceMask, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDeviceMask(commandBuffer, deviceMask); + device_dispatch->CmdSetDeviceMask(commandBuffer, deviceMask); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDeviceMask]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDeviceMask(commandBuffer, deviceMask, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDeviceMask]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDeviceMask(commandBuffer, deviceMask, record_obj); } } } @@ -6268,37 +4783,37 @@ VKAPI_ATTR void VKAPI_CALL CmdDispatchBase(VkCommandBuffer commandBuffer, uint32 uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDispatchBase, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDispatchBase]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDispatchBase(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, - groupCountY, groupCountZ, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDispatchBase]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDispatchBase(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, + groupCountZ, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDispatchBase); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDispatchBase]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDispatchBase(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, - groupCountZ, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDispatchBase]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDispatchBase(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, + groupCountZ, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDispatchBase(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); + device_dispatch->CmdDispatchBase(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDispatchBase]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDispatchBase(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, - groupCountZ, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDispatchBase]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDispatchBase(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, + groupCountZ, record_obj); } } } @@ -6307,39 +4822,40 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDeviceGroups(VkInstance instance VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkEnumeratePhysicalDeviceGroups, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateEnumeratePhysicalDeviceGroups(instance, pPhysicalDeviceGroupCount, - pPhysicalDeviceGroupProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateEnumeratePhysicalDeviceGroups(instance, pPhysicalDeviceGroupCount, + pPhysicalDeviceGroupProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkEnumeratePhysicalDeviceGroups); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordEnumeratePhysicalDeviceGroups(instance, pPhysicalDeviceGroupCount, - pPhysicalDeviceGroupProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordEnumeratePhysicalDeviceGroups(instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchEnumeratePhysicalDeviceGroups(instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties); + result = + instance_dispatch->EnumeratePhysicalDeviceGroups(instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordEnumeratePhysicalDeviceGroups(instance, pPhysicalDeviceGroupCount, - pPhysicalDeviceGroupProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordEnumeratePhysicalDeviceGroups(instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties, + record_obj); } } return result; @@ -6349,35 +4865,34 @@ VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements2(VkDevice device, const Vk VkMemoryRequirements2* pMemoryRequirements) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetImageMemoryRequirements2, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetImageMemoryRequirements2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetImageMemoryRequirements2(device, pInfo, pMemoryRequirements, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetImageMemoryRequirements2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetImageMemoryRequirements2(device, pInfo, pMemoryRequirements, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetImageMemoryRequirements2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetImageMemoryRequirements2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetImageMemoryRequirements2(device, pInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetImageMemoryRequirements2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetImageMemoryRequirements2(device, pInfo, pMemoryRequirements, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetImageMemoryRequirements2(device, pInfo, pMemoryRequirements); + device_dispatch->GetImageMemoryRequirements2(device, pInfo, pMemoryRequirements); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetImageMemoryRequirements2]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetImageMemoryRequirements2(device, pInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetImageMemoryRequirements2]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetImageMemoryRequirements2(device, pInfo, pMemoryRequirements, record_obj); } } } @@ -6386,35 +4901,34 @@ VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements2(VkDevice device, const V VkMemoryRequirements2* pMemoryRequirements) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetBufferMemoryRequirements2, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetBufferMemoryRequirements2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetBufferMemoryRequirements2(device, pInfo, pMemoryRequirements, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetBufferMemoryRequirements2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetBufferMemoryRequirements2(device, pInfo, pMemoryRequirements, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetBufferMemoryRequirements2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetBufferMemoryRequirements2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetBufferMemoryRequirements2(device, pInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetBufferMemoryRequirements2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetBufferMemoryRequirements2(device, pInfo, pMemoryRequirements, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetBufferMemoryRequirements2(device, pInfo, pMemoryRequirements); + device_dispatch->GetBufferMemoryRequirements2(device, pInfo, pMemoryRequirements); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetBufferMemoryRequirements2]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetBufferMemoryRequirements2(device, pInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetBufferMemoryRequirements2]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetBufferMemoryRequirements2(device, pInfo, pMemoryRequirements, record_obj); } } } @@ -6424,40 +4938,37 @@ VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements2(VkDevice device, co VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetImageSparseMemoryRequirements2, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetImageSparseMemoryRequirements2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetImageSparseMemoryRequirements2(device, pInfo, pSparseMemoryRequirementCount, - pSparseMemoryRequirements, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetImageSparseMemoryRequirements2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetImageSparseMemoryRequirements2(device, pInfo, pSparseMemoryRequirementCount, + pSparseMemoryRequirements, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetImageSparseMemoryRequirements2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetImageSparseMemoryRequirements2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetImageSparseMemoryRequirements2(device, pInfo, pSparseMemoryRequirementCount, - pSparseMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetImageSparseMemoryRequirements2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetImageSparseMemoryRequirements2(device, pInfo, pSparseMemoryRequirementCount, + pSparseMemoryRequirements, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetImageSparseMemoryRequirements2(device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); + device_dispatch->GetImageSparseMemoryRequirements2(device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetImageSparseMemoryRequirements2]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetImageSparseMemoryRequirements2(device, pInfo, pSparseMemoryRequirementCount, - pSparseMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetImageSparseMemoryRequirements2]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetImageSparseMemoryRequirements2(device, pInfo, pSparseMemoryRequirementCount, + pSparseMemoryRequirements, record_obj); } } } @@ -6465,35 +4976,35 @@ VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements2(VkDevice device, co VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceFeatures2, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceFeatures2(physicalDevice, pFeatures, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceFeatures2(physicalDevice, pFeatures, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceFeatures2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceFeatures2(physicalDevice, pFeatures, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceFeatures2(physicalDevice, pFeatures, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceFeatures2(physicalDevice, pFeatures); + instance_dispatch->GetPhysicalDeviceFeatures2(physicalDevice, pFeatures); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceFeatures2(physicalDevice, pFeatures, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceFeatures2(physicalDevice, pFeatures, record_obj); } } } @@ -6501,35 +5012,35 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalD VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceProperties2, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceProperties2(physicalDevice, pProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceProperties2(physicalDevice, pProperties, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceProperties2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceProperties2(physicalDevice, pProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceProperties2(physicalDevice, pProperties, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceProperties2(physicalDevice, pProperties); + instance_dispatch->GetPhysicalDeviceProperties2(physicalDevice, pProperties); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceProperties2(physicalDevice, pProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceProperties2(physicalDevice, pProperties, record_obj); } } } @@ -6538,36 +5049,35 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFormatProperties2(VkPhysicalDevice p VkFormatProperties2* pFormatProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceFormatProperties2, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateGetPhysicalDeviceFormatProperties2(physicalDevice, format, pFormatProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceFormatProperties2(physicalDevice, format, pFormatProperties, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceFormatProperties2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceFormatProperties2(physicalDevice, format, pFormatProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceFormatProperties2(physicalDevice, format, pFormatProperties, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceFormatProperties2(physicalDevice, format, pFormatProperties); + instance_dispatch->GetPhysicalDeviceFormatProperties2(physicalDevice, format, pFormatProperties); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceFormatProperties2(physicalDevice, format, pFormatProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceFormatProperties2(physicalDevice, format, pFormatProperties, record_obj); } } } @@ -6577,40 +5087,41 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceImageFormatProperties2(VkPhysica VkImageFormatProperties2* pImageFormatProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceImageFormatProperties2, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceImageFormatProperties2(physicalDevice, pImageFormatInfo, - pImageFormatProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceImageFormatProperties2(physicalDevice, pImageFormatInfo, + pImageFormatProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceImageFormatProperties2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceImageFormatProperties2(physicalDevice, pImageFormatInfo, - pImageFormatProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceImageFormatProperties2(physicalDevice, pImageFormatInfo, pImageFormatProperties, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceImageFormatProperties2(physicalDevice, pImageFormatInfo, pImageFormatProperties); + result = + instance_dispatch->GetPhysicalDeviceImageFormatProperties2(physicalDevice, pImageFormatInfo, pImageFormatProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceImageFormatProperties2(physicalDevice, pImageFormatInfo, - pImageFormatProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceImageFormatProperties2(physicalDevice, pImageFormatInfo, pImageFormatProperties, + record_obj); } } return result; @@ -6621,38 +5132,39 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties2(VkPhysicalDev VkQueueFamilyProperties2* pQueueFamilyProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceQueueFamilyProperties2, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceQueueFamilyProperties2(physicalDevice, pQueueFamilyPropertyCount, - pQueueFamilyProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceQueueFamilyProperties2(physicalDevice, pQueueFamilyPropertyCount, + pQueueFamilyProperties, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceQueueFamilyProperties2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceQueueFamilyProperties2(physicalDevice, pQueueFamilyPropertyCount, - pQueueFamilyProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceQueueFamilyProperties2(physicalDevice, pQueueFamilyPropertyCount, + pQueueFamilyProperties, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceQueueFamilyProperties2(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); + instance_dispatch->GetPhysicalDeviceQueueFamilyProperties2(physicalDevice, pQueueFamilyPropertyCount, + pQueueFamilyProperties); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceQueueFamilyProperties2(physicalDevice, pQueueFamilyPropertyCount, - pQueueFamilyProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceQueueFamilyProperties2(physicalDevice, pQueueFamilyPropertyCount, + pQueueFamilyProperties, record_obj); } } } @@ -6661,35 +5173,35 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMemoryProperties2(VkPhysicalDevice p VkPhysicalDeviceMemoryProperties2* pMemoryProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceMemoryProperties2, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceMemoryProperties2(physicalDevice, pMemoryProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceMemoryProperties2(physicalDevice, pMemoryProperties, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceMemoryProperties2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceMemoryProperties2(physicalDevice, pMemoryProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceMemoryProperties2(physicalDevice, pMemoryProperties, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceMemoryProperties2(physicalDevice, pMemoryProperties); + instance_dispatch->GetPhysicalDeviceMemoryProperties2(physicalDevice, pMemoryProperties); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceMemoryProperties2(physicalDevice, pMemoryProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceMemoryProperties2(physicalDevice, pMemoryProperties, record_obj); } } } @@ -6700,38 +5212,38 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceSparseImageFormatProperties2(VkPhysi VkSparseImageFormatProperties2* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceSparseImageFormatProperties2, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceSparseImageFormatProperties2(physicalDevice, pFormatInfo, - pPropertyCount, pProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceSparseImageFormatProperties2(physicalDevice, pFormatInfo, pPropertyCount, + pProperties, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceSparseImageFormatProperties2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceSparseImageFormatProperties2(physicalDevice, pFormatInfo, pPropertyCount, - pProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceSparseImageFormatProperties2(physicalDevice, pFormatInfo, pPropertyCount, pProperties, + record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceSparseImageFormatProperties2(physicalDevice, pFormatInfo, pPropertyCount, pProperties); + instance_dispatch->GetPhysicalDeviceSparseImageFormatProperties2(physicalDevice, pFormatInfo, pPropertyCount, pProperties); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceSparseImageFormatProperties2(physicalDevice, pFormatInfo, pPropertyCount, - pProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceSparseImageFormatProperties2(physicalDevice, pFormatInfo, pPropertyCount, + pProperties, record_obj); } } } @@ -6739,34 +5251,34 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceSparseImageFormatProperties2(VkPhysi VKAPI_ATTR void VKAPI_CALL TrimCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkTrimCommandPool, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateTrimCommandPool]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateTrimCommandPool(device, commandPool, flags, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateTrimCommandPool]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateTrimCommandPool(device, commandPool, flags, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkTrimCommandPool); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordTrimCommandPool]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordTrimCommandPool(device, commandPool, flags, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordTrimCommandPool]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordTrimCommandPool(device, commandPool, flags, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchTrimCommandPool(device, commandPool, flags); + device_dispatch->TrimCommandPool(device, commandPool, flags); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordTrimCommandPool]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordTrimCommandPool(device, commandPool, flags, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordTrimCommandPool]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordTrimCommandPool(device, commandPool, flags, record_obj); } } } @@ -6774,34 +5286,34 @@ VKAPI_ATTR void VKAPI_CALL TrimCommandPool(VkDevice device, VkCommandPool comman VKAPI_ATTR void VKAPI_CALL GetDeviceQueue2(VkDevice device, const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeviceQueue2, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeviceQueue2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDeviceQueue2(device, pQueueInfo, pQueue, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeviceQueue2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDeviceQueue2(device, pQueueInfo, pQueue, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetDeviceQueue2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeviceQueue2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeviceQueue2(device, pQueueInfo, pQueue, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeviceQueue2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeviceQueue2(device, pQueueInfo, pQueue, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetDeviceQueue2(device, pQueueInfo, pQueue); + device_dispatch->GetDeviceQueue2(device, pQueueInfo, pQueue); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeviceQueue2]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeviceQueue2(device, pQueueInfo, pQueue, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeviceQueue2]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeviceQueue2(device, pQueueInfo, pQueue, record_obj); } } } @@ -6811,38 +5323,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSamplerYcbcrConversion(VkDevice device, con VkSamplerYcbcrConversion* pYcbcrConversion) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateSamplerYcbcrConversion, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCreateSamplerYcbcrConversion]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateSamplerYcbcrConversion(device, pCreateInfo, pAllocator, pYcbcrConversion, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateSamplerYcbcrConversion]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateSamplerYcbcrConversion(device, pCreateInfo, pAllocator, pYcbcrConversion, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateSamplerYcbcrConversion); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateSamplerYcbcrConversion]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateSamplerYcbcrConversion(device, pCreateInfo, pAllocator, pYcbcrConversion, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateSamplerYcbcrConversion]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateSamplerYcbcrConversion(device, pCreateInfo, pAllocator, pYcbcrConversion, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateSamplerYcbcrConversion(device, pCreateInfo, pAllocator, pYcbcrConversion); + result = device_dispatch->CreateSamplerYcbcrConversion(device, pCreateInfo, pAllocator, pYcbcrConversion); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateSamplerYcbcrConversion]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateSamplerYcbcrConversion(device, pCreateInfo, pAllocator, pYcbcrConversion, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateSamplerYcbcrConversion]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateSamplerYcbcrConversion(device, pCreateInfo, pAllocator, pYcbcrConversion, record_obj); } } return result; @@ -6852,35 +5362,34 @@ VKAPI_ATTR void VKAPI_CALL DestroySamplerYcbcrConversion(VkDevice device, VkSamp const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroySamplerYcbcrConversion, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateDestroySamplerYcbcrConversion]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroySamplerYcbcrConversion(device, ycbcrConversion, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroySamplerYcbcrConversion]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroySamplerYcbcrConversion(device, ycbcrConversion, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroySamplerYcbcrConversion); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroySamplerYcbcrConversion]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroySamplerYcbcrConversion(device, ycbcrConversion, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroySamplerYcbcrConversion]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroySamplerYcbcrConversion(device, ycbcrConversion, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroySamplerYcbcrConversion(device, ycbcrConversion, pAllocator); + device_dispatch->DestroySamplerYcbcrConversion(device, ycbcrConversion, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroySamplerYcbcrConversion]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroySamplerYcbcrConversion(device, ycbcrConversion, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroySamplerYcbcrConversion]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroySamplerYcbcrConversion(device, ycbcrConversion, pAllocator, record_obj); } } } @@ -6891,40 +5400,38 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorUpdateTemplate(VkDevice device, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateDescriptorUpdateTemplate, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCreateDescriptorUpdateTemplate]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateDescriptorUpdateTemplate(device, pCreateInfo, pAllocator, - pDescriptorUpdateTemplate, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateDescriptorUpdateTemplate]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateDescriptorUpdateTemplate(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateDescriptorUpdateTemplate); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateDescriptorUpdateTemplate]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateDescriptorUpdateTemplate(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateDescriptorUpdateTemplate]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateDescriptorUpdateTemplate(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateDescriptorUpdateTemplate(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate); + result = device_dispatch->CreateDescriptorUpdateTemplate(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateDescriptorUpdateTemplate]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateDescriptorUpdateTemplate(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateDescriptorUpdateTemplate]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateDescriptorUpdateTemplate(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate, + record_obj); } } return result; @@ -6934,37 +5441,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyDescriptorUpdateTemplate(VkDevice device, VkDe const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyDescriptorUpdateTemplate, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyDescriptorUpdateTemplate]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateDestroyDescriptorUpdateTemplate(device, descriptorUpdateTemplate, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyDescriptorUpdateTemplate]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyDescriptorUpdateTemplate(device, descriptorUpdateTemplate, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyDescriptorUpdateTemplate); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyDescriptorUpdateTemplate]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyDescriptorUpdateTemplate(device, descriptorUpdateTemplate, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyDescriptorUpdateTemplate]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyDescriptorUpdateTemplate(device, descriptorUpdateTemplate, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyDescriptorUpdateTemplate(device, descriptorUpdateTemplate, pAllocator); + device_dispatch->DestroyDescriptorUpdateTemplate(device, descriptorUpdateTemplate, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyDescriptorUpdateTemplate]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyDescriptorUpdateTemplate(device, descriptorUpdateTemplate, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyDescriptorUpdateTemplate]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyDescriptorUpdateTemplate(device, descriptorUpdateTemplate, pAllocator, record_obj); } } } @@ -6973,39 +5477,35 @@ VKAPI_ATTR void VKAPI_CALL UpdateDescriptorSetWithTemplate(VkDevice device, VkDe VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkUpdateDescriptorSetWithTemplate, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateUpdateDescriptorSetWithTemplate]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateUpdateDescriptorSetWithTemplate(device, descriptorSet, descriptorUpdateTemplate, - pData, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateUpdateDescriptorSetWithTemplate]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateUpdateDescriptorSetWithTemplate(device, descriptorSet, descriptorUpdateTemplate, pData, + error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkUpdateDescriptorSetWithTemplate); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordUpdateDescriptorSetWithTemplate]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordUpdateDescriptorSetWithTemplate(device, descriptorSet, descriptorUpdateTemplate, pData, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordUpdateDescriptorSetWithTemplate]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordUpdateDescriptorSetWithTemplate(device, descriptorSet, descriptorUpdateTemplate, pData, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchUpdateDescriptorSetWithTemplate(device, descriptorSet, descriptorUpdateTemplate, pData); + device_dispatch->UpdateDescriptorSetWithTemplate(device, descriptorSet, descriptorUpdateTemplate, pData); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordUpdateDescriptorSetWithTemplate]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordUpdateDescriptorSetWithTemplate(device, descriptorSet, descriptorUpdateTemplate, pData, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordUpdateDescriptorSetWithTemplate]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordUpdateDescriptorSetWithTemplate(device, descriptorSet, descriptorUpdateTemplate, pData, record_obj); } } } @@ -7015,38 +5515,39 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalBufferProperties(VkPhysicalD VkExternalBufferProperties* pExternalBufferProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceExternalBufferProperties, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceExternalBufferProperties(physicalDevice, pExternalBufferInfo, - pExternalBufferProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceExternalBufferProperties(physicalDevice, pExternalBufferInfo, + pExternalBufferProperties, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceExternalBufferProperties); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceExternalBufferProperties(physicalDevice, pExternalBufferInfo, - pExternalBufferProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceExternalBufferProperties(physicalDevice, pExternalBufferInfo, + pExternalBufferProperties, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceExternalBufferProperties(physicalDevice, pExternalBufferInfo, pExternalBufferProperties); + instance_dispatch->GetPhysicalDeviceExternalBufferProperties(physicalDevice, pExternalBufferInfo, + pExternalBufferProperties); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceExternalBufferProperties(physicalDevice, pExternalBufferInfo, - pExternalBufferProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceExternalBufferProperties(physicalDevice, pExternalBufferInfo, + pExternalBufferProperties, record_obj); } } } @@ -7056,38 +5557,38 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalFenceProperties(VkPhysicalDe VkExternalFenceProperties* pExternalFenceProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceExternalFenceProperties, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceExternalFenceProperties(physicalDevice, pExternalFenceInfo, - pExternalFenceProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceExternalFenceProperties(physicalDevice, pExternalFenceInfo, + pExternalFenceProperties, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceExternalFenceProperties); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceExternalFenceProperties(physicalDevice, pExternalFenceInfo, - pExternalFenceProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceExternalFenceProperties(physicalDevice, pExternalFenceInfo, pExternalFenceProperties, + record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceExternalFenceProperties(physicalDevice, pExternalFenceInfo, pExternalFenceProperties); + instance_dispatch->GetPhysicalDeviceExternalFenceProperties(physicalDevice, pExternalFenceInfo, pExternalFenceProperties); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceExternalFenceProperties(physicalDevice, pExternalFenceInfo, - pExternalFenceProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceExternalFenceProperties(physicalDevice, pExternalFenceInfo, pExternalFenceProperties, + record_obj); } } } @@ -7097,38 +5598,39 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalSemaphoreProperties( VkExternalSemaphoreProperties* pExternalSemaphoreProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceExternalSemaphoreProperties, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceExternalSemaphoreProperties(physicalDevice, pExternalSemaphoreInfo, - pExternalSemaphoreProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceExternalSemaphoreProperties(physicalDevice, pExternalSemaphoreInfo, + pExternalSemaphoreProperties, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceExternalSemaphoreProperties); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceExternalSemaphoreProperties(physicalDevice, pExternalSemaphoreInfo, - pExternalSemaphoreProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceExternalSemaphoreProperties(physicalDevice, pExternalSemaphoreInfo, + pExternalSemaphoreProperties, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceExternalSemaphoreProperties(physicalDevice, pExternalSemaphoreInfo, pExternalSemaphoreProperties); + instance_dispatch->GetPhysicalDeviceExternalSemaphoreProperties(physicalDevice, pExternalSemaphoreInfo, + pExternalSemaphoreProperties); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceExternalSemaphoreProperties(physicalDevice, pExternalSemaphoreInfo, - pExternalSemaphoreProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceExternalSemaphoreProperties(physicalDevice, pExternalSemaphoreInfo, + pExternalSemaphoreProperties, record_obj); } } } @@ -7137,35 +5639,34 @@ VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutSupport(VkDevice device, const VkDescriptorSetLayoutSupport* pSupport) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDescriptorSetLayoutSupport, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDescriptorSetLayoutSupport]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDescriptorSetLayoutSupport(device, pCreateInfo, pSupport, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDescriptorSetLayoutSupport]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDescriptorSetLayoutSupport(device, pCreateInfo, pSupport, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetDescriptorSetLayoutSupport); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetDescriptorSetLayoutSupport]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDescriptorSetLayoutSupport(device, pCreateInfo, pSupport, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDescriptorSetLayoutSupport]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDescriptorSetLayoutSupport(device, pCreateInfo, pSupport, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetDescriptorSetLayoutSupport(device, pCreateInfo, pSupport); + device_dispatch->GetDescriptorSetLayoutSupport(device, pCreateInfo, pSupport); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetDescriptorSetLayoutSupport]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDescriptorSetLayoutSupport(device, pCreateInfo, pSupport, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDescriptorSetLayoutSupport]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDescriptorSetLayoutSupport(device, pCreateInfo, pSupport, record_obj); } } } @@ -7175,37 +5676,37 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectCount(VkCommandBuffer commandBuffer, V uint32_t stride) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDrawIndirectCount, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDrawIndirectCount]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDrawIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDrawIndirectCount]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDrawIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDrawIndirectCount); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDrawIndirectCount]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDrawIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDrawIndirectCount]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDrawIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, + stride, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDrawIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); + device_dispatch->CmdDrawIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDrawIndirectCount]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDrawIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDrawIndirectCount]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDrawIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, + stride, record_obj); } } } @@ -7215,39 +5716,39 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCount(VkCommandBuffer commandBu uint32_t stride) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDrawIndexedIndirectCount, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDrawIndexedIndirectCount]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, - countBufferOffset, maxDrawCount, stride, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDrawIndexedIndirectCount]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDrawIndexedIndirectCount); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDrawIndexedIndirectCount]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDrawIndexedIndirectCount]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); + device_dispatch->CmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, + stride); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDrawIndexedIndirectCount]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDrawIndexedIndirectCount]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride, record_obj); } } } @@ -7256,36 +5757,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass2(VkDevice device, const VkRender const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateRenderPass2, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateRenderPass2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateRenderPass2(device, pCreateInfo, pAllocator, pRenderPass, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateRenderPass2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateRenderPass2(device, pCreateInfo, pAllocator, pRenderPass, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateRenderPass2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateRenderPass2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateRenderPass2(device, pCreateInfo, pAllocator, pRenderPass, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateRenderPass2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateRenderPass2(device, pCreateInfo, pAllocator, pRenderPass, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateRenderPass2(device, pCreateInfo, pAllocator, pRenderPass); + result = device_dispatch->CreateRenderPass2(device, pCreateInfo, pAllocator, pRenderPass); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateRenderPass2]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateRenderPass2(device, pCreateInfo, pAllocator, pRenderPass, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateRenderPass2]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateRenderPass2(device, pCreateInfo, pAllocator, pRenderPass, record_obj); } } return result; @@ -7295,34 +5796,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass2(VkCommandBuffer commandBuffer, co const VkSubpassBeginInfo* pSubpassBeginInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBeginRenderPass2, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBeginRenderPass2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBeginRenderPass2(commandBuffer, pRenderPassBegin, pSubpassBeginInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBeginRenderPass2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBeginRenderPass2(commandBuffer, pRenderPassBegin, pSubpassBeginInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBeginRenderPass2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBeginRenderPass2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBeginRenderPass2(commandBuffer, pRenderPassBegin, pSubpassBeginInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBeginRenderPass2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBeginRenderPass2(commandBuffer, pRenderPassBegin, pSubpassBeginInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBeginRenderPass2(commandBuffer, pRenderPassBegin, pSubpassBeginInfo); + device_dispatch->CmdBeginRenderPass2(commandBuffer, pRenderPassBegin, pSubpassBeginInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBeginRenderPass2]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBeginRenderPass2(commandBuffer, pRenderPassBegin, pSubpassBeginInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBeginRenderPass2]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBeginRenderPass2(commandBuffer, pRenderPassBegin, pSubpassBeginInfo, record_obj); } } } @@ -7331,34 +5832,34 @@ VKAPI_ATTR void VKAPI_CALL CmdNextSubpass2(VkCommandBuffer commandBuffer, const const VkSubpassEndInfo* pSubpassEndInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdNextSubpass2, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdNextSubpass2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdNextSubpass2(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdNextSubpass2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdNextSubpass2(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdNextSubpass2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdNextSubpass2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdNextSubpass2(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdNextSubpass2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdNextSubpass2(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdNextSubpass2(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo); + device_dispatch->CmdNextSubpass2(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdNextSubpass2]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdNextSubpass2(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdNextSubpass2]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdNextSubpass2(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo, record_obj); } } } @@ -7366,34 +5867,34 @@ VKAPI_ATTR void VKAPI_CALL CmdNextSubpass2(VkCommandBuffer commandBuffer, const VKAPI_ATTR void VKAPI_CALL CmdEndRenderPass2(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdEndRenderPass2, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdEndRenderPass2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdEndRenderPass2(commandBuffer, pSubpassEndInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdEndRenderPass2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdEndRenderPass2(commandBuffer, pSubpassEndInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdEndRenderPass2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdEndRenderPass2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdEndRenderPass2(commandBuffer, pSubpassEndInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdEndRenderPass2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdEndRenderPass2(commandBuffer, pSubpassEndInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdEndRenderPass2(commandBuffer, pSubpassEndInfo); + device_dispatch->CmdEndRenderPass2(commandBuffer, pSubpassEndInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdEndRenderPass2]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdEndRenderPass2(commandBuffer, pSubpassEndInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdEndRenderPass2]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdEndRenderPass2(commandBuffer, pSubpassEndInfo, record_obj); } } } @@ -7401,34 +5902,34 @@ VKAPI_ATTR void VKAPI_CALL CmdEndRenderPass2(VkCommandBuffer commandBuffer, cons VKAPI_ATTR void VKAPI_CALL ResetQueryPool(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkResetQueryPool, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateResetQueryPool]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateResetQueryPool(device, queryPool, firstQuery, queryCount, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateResetQueryPool]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateResetQueryPool(device, queryPool, firstQuery, queryCount, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkResetQueryPool); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordResetQueryPool]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordResetQueryPool(device, queryPool, firstQuery, queryCount, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordResetQueryPool]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordResetQueryPool(device, queryPool, firstQuery, queryCount, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchResetQueryPool(device, queryPool, firstQuery, queryCount); + device_dispatch->ResetQueryPool(device, queryPool, firstQuery, queryCount); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordResetQueryPool]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordResetQueryPool(device, queryPool, firstQuery, queryCount, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordResetQueryPool]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordResetQueryPool(device, queryPool, firstQuery, queryCount, record_obj); } } } @@ -7436,41 +5937,40 @@ VKAPI_ATTR void VKAPI_CALL ResetQueryPool(VkDevice device, VkQueryPool queryPool VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreCounterValue(VkDevice device, VkSemaphore semaphore, uint64_t* pValue) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetSemaphoreCounterValue, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetSemaphoreCounterValue]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetSemaphoreCounterValue(device, semaphore, pValue, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetSemaphoreCounterValue]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetSemaphoreCounterValue(device, semaphore, pValue, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetSemaphoreCounterValue); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetSemaphoreCounterValue]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetSemaphoreCounterValue(device, semaphore, pValue, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetSemaphoreCounterValue]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetSemaphoreCounterValue(device, semaphore, pValue, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetSemaphoreCounterValue(device, semaphore, pValue); + result = device_dispatch->GetSemaphoreCounterValue(device, semaphore, pValue); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetSemaphoreCounterValue]) { - ValidationObject::BlockingOperationGuard lock(intercept); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetSemaphoreCounterValue]) { + ValidationObject::BlockingOperationGuard lock(vo); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordGetSemaphoreCounterValue(device, semaphore, pValue, record_obj); + vo->PostCallRecordGetSemaphoreCounterValue(device, semaphore, pValue, record_obj); } } return result; @@ -7479,40 +5979,40 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreCounterValue(VkDevice device, VkSemap VKAPI_ATTR VkResult VKAPI_CALL WaitSemaphores(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkWaitSemaphores, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateWaitSemaphores]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateWaitSemaphores(device, pWaitInfo, timeout, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateWaitSemaphores]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateWaitSemaphores(device, pWaitInfo, timeout, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkWaitSemaphores); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordWaitSemaphores]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordWaitSemaphores(device, pWaitInfo, timeout, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordWaitSemaphores]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordWaitSemaphores(device, pWaitInfo, timeout, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchWaitSemaphores(device, pWaitInfo, timeout); + result = device_dispatch->WaitSemaphores(device, pWaitInfo, timeout); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordWaitSemaphores]) { - ValidationObject::BlockingOperationGuard lock(intercept); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordWaitSemaphores]) { + ValidationObject::BlockingOperationGuard lock(vo); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordWaitSemaphores(device, pWaitInfo, timeout, record_obj); + vo->PostCallRecordWaitSemaphores(device, pWaitInfo, timeout, record_obj); } } return result; @@ -7521,36 +6021,36 @@ VKAPI_ATTR VkResult VKAPI_CALL WaitSemaphores(VkDevice device, const VkSemaphore VKAPI_ATTR VkResult VKAPI_CALL SignalSemaphore(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkSignalSemaphore, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateSignalSemaphore]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateSignalSemaphore(device, pSignalInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateSignalSemaphore]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateSignalSemaphore(device, pSignalInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkSignalSemaphore); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordSignalSemaphore]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordSignalSemaphore(device, pSignalInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordSignalSemaphore]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordSignalSemaphore(device, pSignalInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchSignalSemaphore(device, pSignalInfo); + result = device_dispatch->SignalSemaphore(device, pSignalInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordSignalSemaphore]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordSignalSemaphore(device, pSignalInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordSignalSemaphore]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordSignalSemaphore(device, pSignalInfo, record_obj); } } return result; @@ -7559,36 +6059,36 @@ VKAPI_ATTR VkResult VKAPI_CALL SignalSemaphore(VkDevice device, const VkSemaphor VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetBufferDeviceAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetBufferDeviceAddress, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetBufferDeviceAddress]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetBufferDeviceAddress(device, pInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetBufferDeviceAddress]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetBufferDeviceAddress(device, pInfo, error_obj); if (skip) return 0; } } RecordObject record_obj(vvl::Func::vkGetBufferDeviceAddress); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetBufferDeviceAddress]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetBufferDeviceAddress(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetBufferDeviceAddress]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetBufferDeviceAddress(device, pInfo, record_obj); } } VkDeviceAddress result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetBufferDeviceAddress(device, pInfo); + result = device_dispatch->GetBufferDeviceAddress(device, pInfo); } record_obj.device_address = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetBufferDeviceAddress]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetBufferDeviceAddress(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetBufferDeviceAddress]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetBufferDeviceAddress(device, pInfo, record_obj); } } return result; @@ -7597,36 +6097,35 @@ VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetBufferDeviceAddress(VkDevice device, co VKAPI_ATTR uint64_t VKAPI_CALL GetBufferOpaqueCaptureAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetBufferOpaqueCaptureAddress, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetBufferOpaqueCaptureAddress]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetBufferOpaqueCaptureAddress(device, pInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetBufferOpaqueCaptureAddress]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetBufferOpaqueCaptureAddress(device, pInfo, error_obj); if (skip) return 0; } } RecordObject record_obj(vvl::Func::vkGetBufferOpaqueCaptureAddress); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetBufferOpaqueCaptureAddress]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetBufferOpaqueCaptureAddress(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetBufferOpaqueCaptureAddress]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetBufferOpaqueCaptureAddress(device, pInfo, record_obj); } } uint64_t result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetBufferOpaqueCaptureAddress(device, pInfo); + result = device_dispatch->GetBufferOpaqueCaptureAddress(device, pInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetBufferOpaqueCaptureAddress]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetBufferOpaqueCaptureAddress(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetBufferOpaqueCaptureAddress]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetBufferOpaqueCaptureAddress(device, pInfo, record_obj); } } return result; @@ -7636,38 +6135,35 @@ VKAPI_ATTR uint64_t VKAPI_CALL GetDeviceMemoryOpaqueCaptureAddress(VkDevice devi const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeviceMemoryOpaqueCaptureAddress, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeviceMemoryOpaqueCaptureAddress]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDeviceMemoryOpaqueCaptureAddress(device, pInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeviceMemoryOpaqueCaptureAddress]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDeviceMemoryOpaqueCaptureAddress(device, pInfo, error_obj); if (skip) return 0; } } RecordObject record_obj(vvl::Func::vkGetDeviceMemoryOpaqueCaptureAddress); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeviceMemoryOpaqueCaptureAddress]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeviceMemoryOpaqueCaptureAddress(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeviceMemoryOpaqueCaptureAddress]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeviceMemoryOpaqueCaptureAddress(device, pInfo, record_obj); } } uint64_t result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetDeviceMemoryOpaqueCaptureAddress(device, pInfo); + result = device_dispatch->GetDeviceMemoryOpaqueCaptureAddress(device, pInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeviceMemoryOpaqueCaptureAddress]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeviceMemoryOpaqueCaptureAddress(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeviceMemoryOpaqueCaptureAddress]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeviceMemoryOpaqueCaptureAddress(device, pInfo, record_obj); } } return result; @@ -7677,36 +6173,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePrivateDataSlot(VkDevice device, const VkPr const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreatePrivateDataSlot, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreatePrivateDataSlot]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreatePrivateDataSlot(device, pCreateInfo, pAllocator, pPrivateDataSlot, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreatePrivateDataSlot]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreatePrivateDataSlot(device, pCreateInfo, pAllocator, pPrivateDataSlot, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreatePrivateDataSlot); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreatePrivateDataSlot]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreatePrivateDataSlot(device, pCreateInfo, pAllocator, pPrivateDataSlot, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreatePrivateDataSlot]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreatePrivateDataSlot(device, pCreateInfo, pAllocator, pPrivateDataSlot, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreatePrivateDataSlot(device, pCreateInfo, pAllocator, pPrivateDataSlot); + result = device_dispatch->CreatePrivateDataSlot(device, pCreateInfo, pAllocator, pPrivateDataSlot); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreatePrivateDataSlot]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreatePrivateDataSlot(device, pCreateInfo, pAllocator, pPrivateDataSlot, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreatePrivateDataSlot]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreatePrivateDataSlot(device, pCreateInfo, pAllocator, pPrivateDataSlot, record_obj); } } return result; @@ -7716,34 +6212,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyPrivateDataSlot(VkDevice device, VkPrivateData const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyPrivateDataSlot, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyPrivateDataSlot]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyPrivateDataSlot(device, privateDataSlot, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyPrivateDataSlot]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyPrivateDataSlot(device, privateDataSlot, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyPrivateDataSlot); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyPrivateDataSlot]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyPrivateDataSlot(device, privateDataSlot, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyPrivateDataSlot]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyPrivateDataSlot(device, privateDataSlot, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyPrivateDataSlot(device, privateDataSlot, pAllocator); + device_dispatch->DestroyPrivateDataSlot(device, privateDataSlot, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyPrivateDataSlot]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyPrivateDataSlot(device, privateDataSlot, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyPrivateDataSlot]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyPrivateDataSlot(device, privateDataSlot, pAllocator, record_obj); } } } @@ -7752,36 +6248,36 @@ VKAPI_ATTR VkResult VKAPI_CALL SetPrivateData(VkDevice device, VkObjectType obje VkPrivateDataSlot privateDataSlot, uint64_t data) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkSetPrivateData, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateSetPrivateData]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateSetPrivateData(device, objectType, objectHandle, privateDataSlot, data, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateSetPrivateData]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateSetPrivateData(device, objectType, objectHandle, privateDataSlot, data, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkSetPrivateData); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordSetPrivateData]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordSetPrivateData(device, objectType, objectHandle, privateDataSlot, data, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordSetPrivateData]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordSetPrivateData(device, objectType, objectHandle, privateDataSlot, data, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchSetPrivateData(device, objectType, objectHandle, privateDataSlot, data); + result = device_dispatch->SetPrivateData(device, objectType, objectHandle, privateDataSlot, data); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordSetPrivateData]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordSetPrivateData(device, objectType, objectHandle, privateDataSlot, data, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordSetPrivateData]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordSetPrivateData(device, objectType, objectHandle, privateDataSlot, data, record_obj); } } return result; @@ -7791,34 +6287,34 @@ VKAPI_ATTR void VKAPI_CALL GetPrivateData(VkDevice device, VkObjectType objectTy VkPrivateDataSlot privateDataSlot, uint64_t* pData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPrivateData, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetPrivateData]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPrivateData(device, objectType, objectHandle, privateDataSlot, pData, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetPrivateData]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPrivateData(device, objectType, objectHandle, privateDataSlot, pData, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPrivateData); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetPrivateData]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPrivateData(device, objectType, objectHandle, privateDataSlot, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetPrivateData]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPrivateData(device, objectType, objectHandle, privateDataSlot, pData, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPrivateData(device, objectType, objectHandle, privateDataSlot, pData); + device_dispatch->GetPrivateData(device, objectType, objectHandle, privateDataSlot, pData); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetPrivateData]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPrivateData(device, objectType, objectHandle, privateDataSlot, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetPrivateData]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPrivateData(device, objectType, objectHandle, privateDataSlot, pData, record_obj); } } } @@ -7826,34 +6322,34 @@ VKAPI_ATTR void VKAPI_CALL GetPrivateData(VkDevice device, VkObjectType objectTy VKAPI_ATTR void VKAPI_CALL CmdSetEvent2(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetEvent2, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetEvent2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetEvent2(commandBuffer, event, pDependencyInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetEvent2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetEvent2(commandBuffer, event, pDependencyInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetEvent2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetEvent2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetEvent2(commandBuffer, event, pDependencyInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetEvent2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetEvent2(commandBuffer, event, pDependencyInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetEvent2(commandBuffer, event, pDependencyInfo); + device_dispatch->CmdSetEvent2(commandBuffer, event, pDependencyInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetEvent2]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetEvent2(commandBuffer, event, pDependencyInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetEvent2]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetEvent2(commandBuffer, event, pDependencyInfo, record_obj); } } } @@ -7861,34 +6357,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetEvent2(VkCommandBuffer commandBuffer, VkEvent e VKAPI_ATTR void VKAPI_CALL CmdResetEvent2(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdResetEvent2, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdResetEvent2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdResetEvent2(commandBuffer, event, stageMask, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdResetEvent2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdResetEvent2(commandBuffer, event, stageMask, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdResetEvent2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdResetEvent2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdResetEvent2(commandBuffer, event, stageMask, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdResetEvent2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdResetEvent2(commandBuffer, event, stageMask, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdResetEvent2(commandBuffer, event, stageMask); + device_dispatch->CmdResetEvent2(commandBuffer, event, stageMask); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdResetEvent2]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdResetEvent2(commandBuffer, event, stageMask, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdResetEvent2]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdResetEvent2(commandBuffer, event, stageMask, record_obj); } } } @@ -7897,34 +6393,34 @@ VKAPI_ATTR void VKAPI_CALL CmdWaitEvents2(VkCommandBuffer commandBuffer, uint32_ const VkDependencyInfo* pDependencyInfos) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdWaitEvents2, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdWaitEvents2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdWaitEvents2(commandBuffer, eventCount, pEvents, pDependencyInfos, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdWaitEvents2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdWaitEvents2(commandBuffer, eventCount, pEvents, pDependencyInfos, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdWaitEvents2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdWaitEvents2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdWaitEvents2(commandBuffer, eventCount, pEvents, pDependencyInfos, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdWaitEvents2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdWaitEvents2(commandBuffer, eventCount, pEvents, pDependencyInfos, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdWaitEvents2(commandBuffer, eventCount, pEvents, pDependencyInfos); + device_dispatch->CmdWaitEvents2(commandBuffer, eventCount, pEvents, pDependencyInfos); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdWaitEvents2]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdWaitEvents2(commandBuffer, eventCount, pEvents, pDependencyInfos, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdWaitEvents2]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdWaitEvents2(commandBuffer, eventCount, pEvents, pDependencyInfos, record_obj); } } } @@ -7932,34 +6428,34 @@ VKAPI_ATTR void VKAPI_CALL CmdWaitEvents2(VkCommandBuffer commandBuffer, uint32_ VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier2(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdPipelineBarrier2, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdPipelineBarrier2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdPipelineBarrier2(commandBuffer, pDependencyInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdPipelineBarrier2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdPipelineBarrier2(commandBuffer, pDependencyInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdPipelineBarrier2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdPipelineBarrier2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdPipelineBarrier2(commandBuffer, pDependencyInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdPipelineBarrier2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdPipelineBarrier2(commandBuffer, pDependencyInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdPipelineBarrier2(commandBuffer, pDependencyInfo); + device_dispatch->CmdPipelineBarrier2(commandBuffer, pDependencyInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdPipelineBarrier2]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdPipelineBarrier2(commandBuffer, pDependencyInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdPipelineBarrier2]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdPipelineBarrier2(commandBuffer, pDependencyInfo, record_obj); } } } @@ -7968,34 +6464,34 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteTimestamp2(VkCommandBuffer commandBuffer, VkP uint32_t query) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdWriteTimestamp2, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdWriteTimestamp2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdWriteTimestamp2(commandBuffer, stage, queryPool, query, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdWriteTimestamp2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdWriteTimestamp2(commandBuffer, stage, queryPool, query, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdWriteTimestamp2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdWriteTimestamp2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdWriteTimestamp2(commandBuffer, stage, queryPool, query, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdWriteTimestamp2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdWriteTimestamp2(commandBuffer, stage, queryPool, query, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdWriteTimestamp2(commandBuffer, stage, queryPool, query); + device_dispatch->CmdWriteTimestamp2(commandBuffer, stage, queryPool, query); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdWriteTimestamp2]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdWriteTimestamp2(commandBuffer, stage, queryPool, query, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdWriteTimestamp2]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdWriteTimestamp2(commandBuffer, stage, queryPool, query, record_obj); } } } @@ -8003,40 +6499,40 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteTimestamp2(VkCommandBuffer commandBuffer, VkP VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit2(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkQueueSubmit2, VulkanTypedHandle(queue, kVulkanObjectTypeQueue)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateQueueSubmit2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateQueueSubmit2(queue, submitCount, pSubmits, fence, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateQueueSubmit2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateQueueSubmit2(queue, submitCount, pSubmits, fence, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkQueueSubmit2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordQueueSubmit2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordQueueSubmit2(queue, submitCount, pSubmits, fence, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordQueueSubmit2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordQueueSubmit2(queue, submitCount, pSubmits, fence, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchQueueSubmit2(queue, submitCount, pSubmits, fence); + result = device_dispatch->QueueSubmit2(queue, submitCount, pSubmits, fence); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordQueueSubmit2]) { - auto lock = intercept->WriteLock(); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordQueueSubmit2]) { + auto lock = vo->WriteLock(); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordQueueSubmit2(queue, submitCount, pSubmits, fence, record_obj); + vo->PostCallRecordQueueSubmit2(queue, submitCount, pSubmits, fence, record_obj); } } return result; @@ -8045,34 +6541,34 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit2(VkQueue queue, uint32_t submitCount, VKAPI_ATTR void VKAPI_CALL CmdCopyBuffer2(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCopyBuffer2, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCopyBuffer2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCopyBuffer2(commandBuffer, pCopyBufferInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCopyBuffer2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCopyBuffer2(commandBuffer, pCopyBufferInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCopyBuffer2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCopyBuffer2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCopyBuffer2(commandBuffer, pCopyBufferInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCopyBuffer2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCopyBuffer2(commandBuffer, pCopyBufferInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCopyBuffer2(commandBuffer, pCopyBufferInfo); + device_dispatch->CmdCopyBuffer2(commandBuffer, pCopyBufferInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCopyBuffer2]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCopyBuffer2(commandBuffer, pCopyBufferInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCopyBuffer2]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCopyBuffer2(commandBuffer, pCopyBufferInfo, record_obj); } } } @@ -8080,34 +6576,34 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBuffer2(VkCommandBuffer commandBuffer, const V VKAPI_ATTR void VKAPI_CALL CmdCopyImage2(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCopyImage2, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCopyImage2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCopyImage2(commandBuffer, pCopyImageInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCopyImage2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCopyImage2(commandBuffer, pCopyImageInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCopyImage2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCopyImage2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCopyImage2(commandBuffer, pCopyImageInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCopyImage2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCopyImage2(commandBuffer, pCopyImageInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCopyImage2(commandBuffer, pCopyImageInfo); + device_dispatch->CmdCopyImage2(commandBuffer, pCopyImageInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCopyImage2]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCopyImage2(commandBuffer, pCopyImageInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCopyImage2]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCopyImage2(commandBuffer, pCopyImageInfo, record_obj); } } } @@ -8116,34 +6612,34 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage2(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCopyBufferToImage2, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCopyBufferToImage2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCopyBufferToImage2(commandBuffer, pCopyBufferToImageInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCopyBufferToImage2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCopyBufferToImage2(commandBuffer, pCopyBufferToImageInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCopyBufferToImage2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCopyBufferToImage2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCopyBufferToImage2(commandBuffer, pCopyBufferToImageInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCopyBufferToImage2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCopyBufferToImage2(commandBuffer, pCopyBufferToImageInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCopyBufferToImage2(commandBuffer, pCopyBufferToImageInfo); + device_dispatch->CmdCopyBufferToImage2(commandBuffer, pCopyBufferToImageInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCopyBufferToImage2]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCopyBufferToImage2(commandBuffer, pCopyBufferToImageInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCopyBufferToImage2]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCopyBufferToImage2(commandBuffer, pCopyBufferToImageInfo, record_obj); } } } @@ -8152,34 +6648,34 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCopyImageToBuffer2, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCopyImageToBuffer2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCopyImageToBuffer2(commandBuffer, pCopyImageToBufferInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCopyImageToBuffer2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCopyImageToBuffer2(commandBuffer, pCopyImageToBufferInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCopyImageToBuffer2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCopyImageToBuffer2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCopyImageToBuffer2(commandBuffer, pCopyImageToBufferInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCopyImageToBuffer2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCopyImageToBuffer2(commandBuffer, pCopyImageToBufferInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCopyImageToBuffer2(commandBuffer, pCopyImageToBufferInfo); + device_dispatch->CmdCopyImageToBuffer2(commandBuffer, pCopyImageToBufferInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCopyImageToBuffer2]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCopyImageToBuffer2(commandBuffer, pCopyImageToBufferInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCopyImageToBuffer2]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCopyImageToBuffer2(commandBuffer, pCopyImageToBufferInfo, record_obj); } } } @@ -8187,34 +6683,34 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, VKAPI_ATTR void VKAPI_CALL CmdBlitImage2(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBlitImage2, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBlitImage2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBlitImage2(commandBuffer, pBlitImageInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBlitImage2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBlitImage2(commandBuffer, pBlitImageInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBlitImage2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBlitImage2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBlitImage2(commandBuffer, pBlitImageInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBlitImage2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBlitImage2(commandBuffer, pBlitImageInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBlitImage2(commandBuffer, pBlitImageInfo); + device_dispatch->CmdBlitImage2(commandBuffer, pBlitImageInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBlitImage2]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBlitImage2(commandBuffer, pBlitImageInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBlitImage2]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBlitImage2(commandBuffer, pBlitImageInfo, record_obj); } } } @@ -8222,34 +6718,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBlitImage2(VkCommandBuffer commandBuffer, const Vk VKAPI_ATTR void VKAPI_CALL CmdResolveImage2(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdResolveImage2, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdResolveImage2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdResolveImage2(commandBuffer, pResolveImageInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdResolveImage2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdResolveImage2(commandBuffer, pResolveImageInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdResolveImage2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdResolveImage2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdResolveImage2(commandBuffer, pResolveImageInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdResolveImage2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdResolveImage2(commandBuffer, pResolveImageInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdResolveImage2(commandBuffer, pResolveImageInfo); + device_dispatch->CmdResolveImage2(commandBuffer, pResolveImageInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdResolveImage2]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdResolveImage2(commandBuffer, pResolveImageInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdResolveImage2]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdResolveImage2(commandBuffer, pResolveImageInfo, record_obj); } } } @@ -8257,34 +6753,34 @@ VKAPI_ATTR void VKAPI_CALL CmdResolveImage2(VkCommandBuffer commandBuffer, const VKAPI_ATTR void VKAPI_CALL CmdBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBeginRendering, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBeginRendering]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBeginRendering(commandBuffer, pRenderingInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBeginRendering]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBeginRendering(commandBuffer, pRenderingInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBeginRendering); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBeginRendering]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBeginRendering(commandBuffer, pRenderingInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBeginRendering]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBeginRendering(commandBuffer, pRenderingInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBeginRendering(commandBuffer, pRenderingInfo); + device_dispatch->CmdBeginRendering(commandBuffer, pRenderingInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBeginRendering]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBeginRendering(commandBuffer, pRenderingInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBeginRendering]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBeginRendering(commandBuffer, pRenderingInfo, record_obj); } } } @@ -8292,34 +6788,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRendering(VkCommandBuffer commandBuffer, cons VKAPI_ATTR void VKAPI_CALL CmdEndRendering(VkCommandBuffer commandBuffer) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdEndRendering, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdEndRendering]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdEndRendering(commandBuffer, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdEndRendering]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdEndRendering(commandBuffer, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdEndRendering); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdEndRendering]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdEndRendering(commandBuffer, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdEndRendering]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdEndRendering(commandBuffer, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdEndRendering(commandBuffer); + device_dispatch->CmdEndRendering(commandBuffer); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdEndRendering]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdEndRendering(commandBuffer, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdEndRendering]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdEndRendering(commandBuffer, record_obj); } } } @@ -8327,34 +6823,34 @@ VKAPI_ATTR void VKAPI_CALL CmdEndRendering(VkCommandBuffer commandBuffer) { VKAPI_ATTR void VKAPI_CALL CmdSetCullMode(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetCullMode, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetCullMode]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetCullMode(commandBuffer, cullMode, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetCullMode]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetCullMode(commandBuffer, cullMode, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetCullMode); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetCullMode]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetCullMode(commandBuffer, cullMode, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetCullMode]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetCullMode(commandBuffer, cullMode, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetCullMode(commandBuffer, cullMode); + device_dispatch->CmdSetCullMode(commandBuffer, cullMode); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetCullMode]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetCullMode(commandBuffer, cullMode, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetCullMode]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetCullMode(commandBuffer, cullMode, record_obj); } } } @@ -8362,34 +6858,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCullMode(VkCommandBuffer commandBuffer, VkCullM VKAPI_ATTR void VKAPI_CALL CmdSetFrontFace(VkCommandBuffer commandBuffer, VkFrontFace frontFace) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetFrontFace, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetFrontFace]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetFrontFace(commandBuffer, frontFace, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetFrontFace]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetFrontFace(commandBuffer, frontFace, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetFrontFace); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetFrontFace]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetFrontFace(commandBuffer, frontFace, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetFrontFace]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetFrontFace(commandBuffer, frontFace, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetFrontFace(commandBuffer, frontFace); + device_dispatch->CmdSetFrontFace(commandBuffer, frontFace); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetFrontFace]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetFrontFace(commandBuffer, frontFace, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetFrontFace]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetFrontFace(commandBuffer, frontFace, record_obj); } } } @@ -8397,34 +6893,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetFrontFace(VkCommandBuffer commandBuffer, VkFron VKAPI_ATTR void VKAPI_CALL CmdSetPrimitiveTopology(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetPrimitiveTopology, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetPrimitiveTopology]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetPrimitiveTopology(commandBuffer, primitiveTopology, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetPrimitiveTopology]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetPrimitiveTopology(commandBuffer, primitiveTopology, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetPrimitiveTopology); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetPrimitiveTopology]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetPrimitiveTopology(commandBuffer, primitiveTopology, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetPrimitiveTopology]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetPrimitiveTopology(commandBuffer, primitiveTopology, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetPrimitiveTopology(commandBuffer, primitiveTopology); + device_dispatch->CmdSetPrimitiveTopology(commandBuffer, primitiveTopology); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetPrimitiveTopology]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetPrimitiveTopology(commandBuffer, primitiveTopology, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetPrimitiveTopology]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetPrimitiveTopology(commandBuffer, primitiveTopology, record_obj); } } } @@ -8433,34 +6929,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewportWithCount(VkCommandBuffer commandBuffer const VkViewport* pViewports) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetViewportWithCount, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetViewportWithCount]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetViewportWithCount(commandBuffer, viewportCount, pViewports, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetViewportWithCount]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetViewportWithCount(commandBuffer, viewportCount, pViewports, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetViewportWithCount); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetViewportWithCount]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetViewportWithCount(commandBuffer, viewportCount, pViewports, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetViewportWithCount]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetViewportWithCount(commandBuffer, viewportCount, pViewports, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetViewportWithCount(commandBuffer, viewportCount, pViewports); + device_dispatch->CmdSetViewportWithCount(commandBuffer, viewportCount, pViewports); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetViewportWithCount]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetViewportWithCount(commandBuffer, viewportCount, pViewports, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetViewportWithCount]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetViewportWithCount(commandBuffer, viewportCount, pViewports, record_obj); } } } @@ -8468,34 +6964,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewportWithCount(VkCommandBuffer commandBuffer VKAPI_ATTR void VKAPI_CALL CmdSetScissorWithCount(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetScissorWithCount, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetScissorWithCount]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetScissorWithCount(commandBuffer, scissorCount, pScissors, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetScissorWithCount]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetScissorWithCount(commandBuffer, scissorCount, pScissors, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetScissorWithCount); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetScissorWithCount]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetScissorWithCount(commandBuffer, scissorCount, pScissors, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetScissorWithCount]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetScissorWithCount(commandBuffer, scissorCount, pScissors, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetScissorWithCount(commandBuffer, scissorCount, pScissors); + device_dispatch->CmdSetScissorWithCount(commandBuffer, scissorCount, pScissors); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetScissorWithCount]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetScissorWithCount(commandBuffer, scissorCount, pScissors, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetScissorWithCount]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetScissorWithCount(commandBuffer, scissorCount, pScissors, record_obj); } } } @@ -8505,37 +7001,37 @@ VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers2(VkCommandBuffer commandBuffer, const VkDeviceSize* pStrides) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBindVertexBuffers2, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBindVertexBuffers2]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBindVertexBuffers2(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, - pSizes, pStrides, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBindVertexBuffers2]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBindVertexBuffers2(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, + pStrides, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBindVertexBuffers2); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBindVertexBuffers2]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBindVertexBuffers2(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, - pStrides, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBindVertexBuffers2]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBindVertexBuffers2(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, pStrides, + record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBindVertexBuffers2(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, pStrides); + device_dispatch->CmdBindVertexBuffers2(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, pStrides); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBindVertexBuffers2]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBindVertexBuffers2(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, - pStrides, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBindVertexBuffers2]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBindVertexBuffers2(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, pStrides, + record_obj); } } } @@ -8543,34 +7039,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers2(VkCommandBuffer commandBuffer, VKAPI_ATTR void VKAPI_CALL CmdSetDepthTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDepthTestEnable, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthTestEnable]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDepthTestEnable(commandBuffer, depthTestEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthTestEnable]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDepthTestEnable(commandBuffer, depthTestEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDepthTestEnable); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthTestEnable]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDepthTestEnable(commandBuffer, depthTestEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthTestEnable]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDepthTestEnable(commandBuffer, depthTestEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDepthTestEnable(commandBuffer, depthTestEnable); + device_dispatch->CmdSetDepthTestEnable(commandBuffer, depthTestEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthTestEnable]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDepthTestEnable(commandBuffer, depthTestEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthTestEnable]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDepthTestEnable(commandBuffer, depthTestEnable, record_obj); } } } @@ -8578,34 +7074,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthTestEnable(VkCommandBuffer commandBuffer, VKAPI_ATTR void VKAPI_CALL CmdSetDepthWriteEnable(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDepthWriteEnable, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthWriteEnable]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDepthWriteEnable(commandBuffer, depthWriteEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthWriteEnable]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDepthWriteEnable(commandBuffer, depthWriteEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDepthWriteEnable); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthWriteEnable]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDepthWriteEnable(commandBuffer, depthWriteEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthWriteEnable]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDepthWriteEnable(commandBuffer, depthWriteEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDepthWriteEnable(commandBuffer, depthWriteEnable); + device_dispatch->CmdSetDepthWriteEnable(commandBuffer, depthWriteEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthWriteEnable]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDepthWriteEnable(commandBuffer, depthWriteEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthWriteEnable]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDepthWriteEnable(commandBuffer, depthWriteEnable, record_obj); } } } @@ -8613,34 +7109,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthWriteEnable(VkCommandBuffer commandBuffer, VKAPI_ATTR void VKAPI_CALL CmdSetDepthCompareOp(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDepthCompareOp, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthCompareOp]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDepthCompareOp(commandBuffer, depthCompareOp, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthCompareOp]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDepthCompareOp(commandBuffer, depthCompareOp, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDepthCompareOp); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthCompareOp]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDepthCompareOp(commandBuffer, depthCompareOp, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthCompareOp]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDepthCompareOp(commandBuffer, depthCompareOp, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDepthCompareOp(commandBuffer, depthCompareOp); + device_dispatch->CmdSetDepthCompareOp(commandBuffer, depthCompareOp); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthCompareOp]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDepthCompareOp(commandBuffer, depthCompareOp, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthCompareOp]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDepthCompareOp(commandBuffer, depthCompareOp, record_obj); } } } @@ -8648,36 +7144,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthCompareOp(VkCommandBuffer commandBuffer, V VKAPI_ATTR void VKAPI_CALL CmdSetDepthBoundsTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDepthBoundsTestEnable, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthBoundsTestEnable]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDepthBoundsTestEnable(commandBuffer, depthBoundsTestEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthBoundsTestEnable]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDepthBoundsTestEnable(commandBuffer, depthBoundsTestEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDepthBoundsTestEnable); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthBoundsTestEnable]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDepthBoundsTestEnable(commandBuffer, depthBoundsTestEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthBoundsTestEnable]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDepthBoundsTestEnable(commandBuffer, depthBoundsTestEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDepthBoundsTestEnable(commandBuffer, depthBoundsTestEnable); + device_dispatch->CmdSetDepthBoundsTestEnable(commandBuffer, depthBoundsTestEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthBoundsTestEnable]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDepthBoundsTestEnable(commandBuffer, depthBoundsTestEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthBoundsTestEnable]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDepthBoundsTestEnable(commandBuffer, depthBoundsTestEnable, record_obj); } } } @@ -8685,34 +7180,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBoundsTestEnable(VkCommandBuffer commandBu VKAPI_ATTR void VKAPI_CALL CmdSetStencilTestEnable(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetStencilTestEnable, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetStencilTestEnable]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetStencilTestEnable(commandBuffer, stencilTestEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetStencilTestEnable]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetStencilTestEnable(commandBuffer, stencilTestEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetStencilTestEnable); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetStencilTestEnable]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetStencilTestEnable(commandBuffer, stencilTestEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetStencilTestEnable]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetStencilTestEnable(commandBuffer, stencilTestEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetStencilTestEnable(commandBuffer, stencilTestEnable); + device_dispatch->CmdSetStencilTestEnable(commandBuffer, stencilTestEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetStencilTestEnable]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetStencilTestEnable(commandBuffer, stencilTestEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetStencilTestEnable]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetStencilTestEnable(commandBuffer, stencilTestEnable, record_obj); } } } @@ -8721,35 +7216,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilOp(VkCommandBuffer commandBuffer, VkSten VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetStencilOp, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetStencilOp]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetStencilOp(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetStencilOp]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetStencilOp(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetStencilOp); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetStencilOp]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetStencilOp(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetStencilOp]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetStencilOp(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetStencilOp(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp); + device_dispatch->CmdSetStencilOp(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetStencilOp]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetStencilOp(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetStencilOp]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetStencilOp(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp, record_obj); } } } @@ -8757,36 +7251,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilOp(VkCommandBuffer commandBuffer, VkSten VKAPI_ATTR void VKAPI_CALL CmdSetRasterizerDiscardEnable(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetRasterizerDiscardEnable, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetRasterizerDiscardEnable]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetRasterizerDiscardEnable(commandBuffer, rasterizerDiscardEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetRasterizerDiscardEnable]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetRasterizerDiscardEnable(commandBuffer, rasterizerDiscardEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetRasterizerDiscardEnable); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetRasterizerDiscardEnable]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetRasterizerDiscardEnable(commandBuffer, rasterizerDiscardEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetRasterizerDiscardEnable]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetRasterizerDiscardEnable(commandBuffer, rasterizerDiscardEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetRasterizerDiscardEnable(commandBuffer, rasterizerDiscardEnable); + device_dispatch->CmdSetRasterizerDiscardEnable(commandBuffer, rasterizerDiscardEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetRasterizerDiscardEnable]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetRasterizerDiscardEnable(commandBuffer, rasterizerDiscardEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetRasterizerDiscardEnable]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetRasterizerDiscardEnable(commandBuffer, rasterizerDiscardEnable, record_obj); } } } @@ -8794,34 +7287,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRasterizerDiscardEnable(VkCommandBuffer command VKAPI_ATTR void VKAPI_CALL CmdSetDepthBiasEnable(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDepthBiasEnable, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthBiasEnable]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDepthBiasEnable(commandBuffer, depthBiasEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthBiasEnable]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDepthBiasEnable(commandBuffer, depthBiasEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDepthBiasEnable); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthBiasEnable]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDepthBiasEnable(commandBuffer, depthBiasEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthBiasEnable]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDepthBiasEnable(commandBuffer, depthBiasEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDepthBiasEnable(commandBuffer, depthBiasEnable); + device_dispatch->CmdSetDepthBiasEnable(commandBuffer, depthBiasEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthBiasEnable]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDepthBiasEnable(commandBuffer, depthBiasEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthBiasEnable]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDepthBiasEnable(commandBuffer, depthBiasEnable, record_obj); } } } @@ -8829,36 +7322,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBiasEnable(VkCommandBuffer commandBuffer, VKAPI_ATTR void VKAPI_CALL CmdSetPrimitiveRestartEnable(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetPrimitiveRestartEnable, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetPrimitiveRestartEnable]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetPrimitiveRestartEnable(commandBuffer, primitiveRestartEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetPrimitiveRestartEnable]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetPrimitiveRestartEnable(commandBuffer, primitiveRestartEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetPrimitiveRestartEnable); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetPrimitiveRestartEnable]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetPrimitiveRestartEnable(commandBuffer, primitiveRestartEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetPrimitiveRestartEnable]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetPrimitiveRestartEnable(commandBuffer, primitiveRestartEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetPrimitiveRestartEnable(commandBuffer, primitiveRestartEnable); + device_dispatch->CmdSetPrimitiveRestartEnable(commandBuffer, primitiveRestartEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetPrimitiveRestartEnable]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetPrimitiveRestartEnable(commandBuffer, primitiveRestartEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetPrimitiveRestartEnable]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetPrimitiveRestartEnable(commandBuffer, primitiveRestartEnable, record_obj); } } } @@ -8867,37 +7359,34 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceBufferMemoryRequirements(VkDevice device, co VkMemoryRequirements2* pMemoryRequirements) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeviceBufferMemoryRequirements, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeviceBufferMemoryRequirements]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDeviceBufferMemoryRequirements(device, pInfo, pMemoryRequirements, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeviceBufferMemoryRequirements]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDeviceBufferMemoryRequirements(device, pInfo, pMemoryRequirements, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetDeviceBufferMemoryRequirements); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeviceBufferMemoryRequirements]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeviceBufferMemoryRequirements(device, pInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeviceBufferMemoryRequirements]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeviceBufferMemoryRequirements(device, pInfo, pMemoryRequirements, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetDeviceBufferMemoryRequirements(device, pInfo, pMemoryRequirements); + device_dispatch->GetDeviceBufferMemoryRequirements(device, pInfo, pMemoryRequirements); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeviceBufferMemoryRequirements]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeviceBufferMemoryRequirements(device, pInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeviceBufferMemoryRequirements]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeviceBufferMemoryRequirements(device, pInfo, pMemoryRequirements, record_obj); } } } @@ -8906,37 +7395,34 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceImageMemoryRequirements(VkDevice device, con VkMemoryRequirements2* pMemoryRequirements) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeviceImageMemoryRequirements, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeviceImageMemoryRequirements]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDeviceImageMemoryRequirements(device, pInfo, pMemoryRequirements, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeviceImageMemoryRequirements]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDeviceImageMemoryRequirements(device, pInfo, pMemoryRequirements, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetDeviceImageMemoryRequirements); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeviceImageMemoryRequirements]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeviceImageMemoryRequirements(device, pInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeviceImageMemoryRequirements]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeviceImageMemoryRequirements(device, pInfo, pMemoryRequirements, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetDeviceImageMemoryRequirements(device, pInfo, pMemoryRequirements); + device_dispatch->GetDeviceImageMemoryRequirements(device, pInfo, pMemoryRequirements); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeviceImageMemoryRequirements]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeviceImageMemoryRequirements(device, pInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeviceImageMemoryRequirements]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeviceImageMemoryRequirements(device, pInfo, pMemoryRequirements, record_obj); } } } @@ -8946,40 +7432,39 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceImageSparseMemoryRequirements(VkDevice devic VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeviceImageSparseMemoryRequirements, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeviceImageSparseMemoryRequirements]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDeviceImageSparseMemoryRequirements(device, pInfo, pSparseMemoryRequirementCount, - pSparseMemoryRequirements, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeviceImageSparseMemoryRequirements]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDeviceImageSparseMemoryRequirements(device, pInfo, pSparseMemoryRequirementCount, + pSparseMemoryRequirements, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetDeviceImageSparseMemoryRequirements); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeviceImageSparseMemoryRequirements]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeviceImageSparseMemoryRequirements(device, pInfo, pSparseMemoryRequirementCount, - pSparseMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeviceImageSparseMemoryRequirements]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeviceImageSparseMemoryRequirements(device, pInfo, pSparseMemoryRequirementCount, + pSparseMemoryRequirements, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetDeviceImageSparseMemoryRequirements(device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); + device_dispatch->GetDeviceImageSparseMemoryRequirements(device, pInfo, pSparseMemoryRequirementCount, + pSparseMemoryRequirements); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeviceImageSparseMemoryRequirements]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeviceImageSparseMemoryRequirements(device, pInfo, pSparseMemoryRequirementCount, - pSparseMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeviceImageSparseMemoryRequirements]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeviceImageSparseMemoryRequirements(device, pInfo, pSparseMemoryRequirementCount, + pSparseMemoryRequirements, record_obj); } } } @@ -8987,34 +7472,34 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceImageSparseMemoryRequirements(VkDevice devic VKAPI_ATTR void VKAPI_CALL DestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroySurfaceKHR, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroySurfaceKHR(instance, surface, pAllocator, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroySurfaceKHR(instance, surface, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroySurfaceKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroySurfaceKHR(instance, surface, pAllocator, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroySurfaceKHR(instance, surface, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroySurfaceKHR(instance, surface, pAllocator); + instance_dispatch->DestroySurfaceKHR(instance, surface, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroySurfaceKHR(instance, surface, pAllocator, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroySurfaceKHR(instance, surface, pAllocator, record_obj); } } } @@ -9023,40 +7508,38 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevi VkSurfaceKHR surface, VkBool32* pSupported) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceSurfaceSupportKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, surface, - pSupported, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, surface, pSupported, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceSurfaceSupportKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, surface, pSupported, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, surface, pSupported, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, surface, pSupported); + result = instance_dispatch->GetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, surface, pSupported); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, surface, pSupported, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, surface, pSupported, record_obj); } } return result; @@ -9066,40 +7549,38 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysica VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceSurfaceCapabilitiesKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, surface, pSurfaceCapabilities, - error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, surface, pSurfaceCapabilities, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceSurfaceCapabilitiesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, surface, pSurfaceCapabilities, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, surface, pSurfaceCapabilities, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, surface, pSurfaceCapabilities); + result = instance_dispatch->GetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, surface, pSurfaceCapabilities); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, surface, pSurfaceCapabilities, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, surface, pSurfaceCapabilities, record_obj); } } return result; @@ -9110,40 +7591,41 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevi VkSurfaceFormatKHR* pSurfaceFormats) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceSurfaceFormatsKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, pSurfaceFormatCount, - pSurfaceFormats, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, pSurfaceFormatCount, + pSurfaceFormats, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceSurfaceFormatsKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, pSurfaceFormatCount, - pSurfaceFormats, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, pSurfaceFormatCount, pSurfaceFormats, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, pSurfaceFormatCount, pSurfaceFormats); + result = + instance_dispatch->GetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, pSurfaceFormatCount, pSurfaceFormats); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, pSurfaceFormatCount, - pSurfaceFormats, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, pSurfaceFormatCount, pSurfaceFormats, + record_obj); } } return result; @@ -9154,40 +7636,41 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModesKHR(VkPhysica VkPresentModeKHR* pPresentModes) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceSurfacePresentModesKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, surface, pPresentModeCount, - pPresentModes, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, surface, pPresentModeCount, + pPresentModes, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceSurfacePresentModesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, surface, pPresentModeCount, - pPresentModes, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, surface, pPresentModeCount, pPresentModes, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, surface, pPresentModeCount, pPresentModes); + result = + instance_dispatch->GetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, surface, pPresentModeCount, pPresentModes); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, surface, pPresentModeCount, - pPresentModes, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, surface, pPresentModeCount, pPresentModes, + record_obj); } } return result; @@ -9197,40 +7680,40 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSwapchainKHR(VkDevice device, const VkSwapc const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateSwapchainKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateSwapchainKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateSwapchainKHR(device, pCreateInfo, pAllocator, pSwapchain, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateSwapchainKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateSwapchainKHR(device, pCreateInfo, pAllocator, pSwapchain, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateSwapchainKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateSwapchainKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateSwapchainKHR(device, pCreateInfo, pAllocator, pSwapchain, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateSwapchainKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateSwapchainKHR(device, pCreateInfo, pAllocator, pSwapchain, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateSwapchainKHR(device, pCreateInfo, pAllocator, pSwapchain); + result = device_dispatch->CreateSwapchainKHR(device, pCreateInfo, pAllocator, pSwapchain); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateSwapchainKHR]) { - auto lock = intercept->WriteLock(); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateSwapchainKHR]) { + auto lock = vo->WriteLock(); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordCreateSwapchainKHR(device, pCreateInfo, pAllocator, pSwapchain, record_obj); + vo->PostCallRecordCreateSwapchainKHR(device, pCreateInfo, pAllocator, pSwapchain, record_obj); } } return result; @@ -9239,34 +7722,34 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSwapchainKHR(VkDevice device, const VkSwapc VKAPI_ATTR void VKAPI_CALL DestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroySwapchainKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroySwapchainKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroySwapchainKHR(device, swapchain, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroySwapchainKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroySwapchainKHR(device, swapchain, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroySwapchainKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroySwapchainKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroySwapchainKHR(device, swapchain, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroySwapchainKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroySwapchainKHR(device, swapchain, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroySwapchainKHR(device, swapchain, pAllocator); + device_dispatch->DestroySwapchainKHR(device, swapchain, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroySwapchainKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroySwapchainKHR(device, swapchain, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroySwapchainKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroySwapchainKHR(device, swapchain, pAllocator, record_obj); } } } @@ -9275,37 +7758,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR(VkDevice device, VkSwapchai VkImage* pSwapchainImages) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetSwapchainImagesKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetSwapchainImagesKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetSwapchainImagesKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetSwapchainImagesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetSwapchainImagesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetSwapchainImagesKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages); + result = device_dispatch->GetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetSwapchainImagesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetSwapchainImagesKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages, record_obj); } } return result; @@ -9315,41 +7797,40 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireNextImageKHR(VkDevice device, VkSwapchainK VkSemaphore semaphore, VkFence fence, uint32_t* pImageIndex) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkAcquireNextImageKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateAcquireNextImageKHR]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateAcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, pImageIndex, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateAcquireNextImageKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateAcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, pImageIndex, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkAcquireNextImageKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordAcquireNextImageKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordAcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, pImageIndex, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordAcquireNextImageKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordAcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, pImageIndex, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchAcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, pImageIndex); + result = device_dispatch->AcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, pImageIndex); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordAcquireNextImageKHR]) { - auto lock = intercept->WriteLock(); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordAcquireNextImageKHR]) { + auto lock = vo->WriteLock(); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordAcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, pImageIndex, record_obj); + vo->PostCallRecordAcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, pImageIndex, record_obj); } } return result; @@ -9359,40 +7840,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDeviceGroupPresentCapabilitiesKHR(VkDevice device, VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeviceGroupPresentCapabilitiesKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeviceGroupPresentCapabilitiesKHR]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateGetDeviceGroupPresentCapabilitiesKHR(device, pDeviceGroupPresentCapabilities, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeviceGroupPresentCapabilitiesKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDeviceGroupPresentCapabilitiesKHR(device, pDeviceGroupPresentCapabilities, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetDeviceGroupPresentCapabilitiesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeviceGroupPresentCapabilitiesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeviceGroupPresentCapabilitiesKHR(device, pDeviceGroupPresentCapabilities, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeviceGroupPresentCapabilitiesKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeviceGroupPresentCapabilitiesKHR(device, pDeviceGroupPresentCapabilities, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetDeviceGroupPresentCapabilitiesKHR(device, pDeviceGroupPresentCapabilities); + result = device_dispatch->GetDeviceGroupPresentCapabilitiesKHR(device, pDeviceGroupPresentCapabilities); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeviceGroupPresentCapabilitiesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeviceGroupPresentCapabilitiesKHR(device, pDeviceGroupPresentCapabilities, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeviceGroupPresentCapabilitiesKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeviceGroupPresentCapabilitiesKHR(device, pDeviceGroupPresentCapabilities, record_obj); } } return result; @@ -9402,39 +7879,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDeviceGroupSurfacePresentModesKHR(VkDevice dev VkDeviceGroupPresentModeFlagsKHR* pModes) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeviceGroupSurfacePresentModesKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeviceGroupSurfacePresentModesKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDeviceGroupSurfacePresentModesKHR(device, surface, pModes, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeviceGroupSurfacePresentModesKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDeviceGroupSurfacePresentModesKHR(device, surface, pModes, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetDeviceGroupSurfacePresentModesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeviceGroupSurfacePresentModesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeviceGroupSurfacePresentModesKHR(device, surface, pModes, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeviceGroupSurfacePresentModesKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeviceGroupSurfacePresentModesKHR(device, surface, pModes, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetDeviceGroupSurfacePresentModesKHR(device, surface, pModes); + result = device_dispatch->GetDeviceGroupSurfacePresentModesKHR(device, surface, pModes); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeviceGroupSurfacePresentModesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeviceGroupSurfacePresentModesKHR(device, surface, pModes, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeviceGroupSurfacePresentModesKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeviceGroupSurfacePresentModesKHR(device, surface, pModes, record_obj); } } return result; @@ -9444,38 +7918,38 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDevicePresentRectanglesKHR(VkPhysicalD uint32_t* pRectCount, VkRect2D* pRects) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDevicePresentRectanglesKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDevicePresentRectanglesKHR(physicalDevice, surface, pRectCount, pRects, - error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateGetPhysicalDevicePresentRectanglesKHR(physicalDevice, surface, pRectCount, pRects, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDevicePresentRectanglesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDevicePresentRectanglesKHR(physicalDevice, surface, pRectCount, pRects, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDevicePresentRectanglesKHR(physicalDevice, surface, pRectCount, pRects, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDevicePresentRectanglesKHR(physicalDevice, surface, pRectCount, pRects); + result = instance_dispatch->GetPhysicalDevicePresentRectanglesKHR(physicalDevice, surface, pRectCount, pRects); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDevicePresentRectanglesKHR(physicalDevice, surface, pRectCount, pRects, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDevicePresentRectanglesKHR(physicalDevice, surface, pRectCount, pRects, record_obj); } } return result; @@ -9485,40 +7959,40 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireNextImage2KHR(VkDevice device, const VkAcq uint32_t* pImageIndex) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkAcquireNextImage2KHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateAcquireNextImage2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateAcquireNextImage2KHR(device, pAcquireInfo, pImageIndex, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateAcquireNextImage2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateAcquireNextImage2KHR(device, pAcquireInfo, pImageIndex, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkAcquireNextImage2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordAcquireNextImage2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordAcquireNextImage2KHR(device, pAcquireInfo, pImageIndex, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordAcquireNextImage2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordAcquireNextImage2KHR(device, pAcquireInfo, pImageIndex, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchAcquireNextImage2KHR(device, pAcquireInfo, pImageIndex); + result = device_dispatch->AcquireNextImage2KHR(device, pAcquireInfo, pImageIndex); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordAcquireNextImage2KHR]) { - auto lock = intercept->WriteLock(); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordAcquireNextImage2KHR]) { + auto lock = vo->WriteLock(); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordAcquireNextImage2KHR(device, pAcquireInfo, pImageIndex, record_obj); + vo->PostCallRecordAcquireNextImage2KHR(device, pAcquireInfo, pImageIndex, record_obj); } } return result; @@ -9528,38 +8002,38 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalD VkDisplayPropertiesKHR* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceDisplayPropertiesKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceDisplayPropertiesKHR(physicalDevice, pPropertyCount, pProperties, - error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateGetPhysicalDeviceDisplayPropertiesKHR(physicalDevice, pPropertyCount, pProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceDisplayPropertiesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceDisplayPropertiesKHR(physicalDevice, pPropertyCount, pProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceDisplayPropertiesKHR(physicalDevice, pPropertyCount, pProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceDisplayPropertiesKHR(physicalDevice, pPropertyCount, pProperties); + result = instance_dispatch->GetPhysicalDeviceDisplayPropertiesKHR(physicalDevice, pPropertyCount, pProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceDisplayPropertiesKHR(physicalDevice, pPropertyCount, pProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceDisplayPropertiesKHR(physicalDevice, pPropertyCount, pProperties, record_obj); } } return result; @@ -9569,40 +8043,38 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhys VkDisplayPlanePropertiesKHR* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceDisplayPlanePropertiesKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceDisplayPlanePropertiesKHR(physicalDevice, pPropertyCount, - pProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceDisplayPlanePropertiesKHR(physicalDevice, pPropertyCount, pProperties, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceDisplayPlanePropertiesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceDisplayPlanePropertiesKHR(physicalDevice, pPropertyCount, pProperties, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceDisplayPlanePropertiesKHR(physicalDevice, pPropertyCount, pProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceDisplayPlanePropertiesKHR(physicalDevice, pPropertyCount, pProperties); + result = instance_dispatch->GetPhysicalDeviceDisplayPlanePropertiesKHR(physicalDevice, pPropertyCount, pProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceDisplayPlanePropertiesKHR(physicalDevice, pPropertyCount, pProperties, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceDisplayPlanePropertiesKHR(physicalDevice, pPropertyCount, pProperties, record_obj); } } return result; @@ -9612,40 +8084,38 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDev uint32_t* pDisplayCount, VkDisplayKHR* pDisplays) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDisplayPlaneSupportedDisplaysKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDisplayPlaneSupportedDisplaysKHR(physicalDevice, planeIndex, pDisplayCount, - pDisplays, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDisplayPlaneSupportedDisplaysKHR(physicalDevice, planeIndex, pDisplayCount, pDisplays, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetDisplayPlaneSupportedDisplaysKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDisplayPlaneSupportedDisplaysKHR(physicalDevice, planeIndex, pDisplayCount, pDisplays, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDisplayPlaneSupportedDisplaysKHR(physicalDevice, planeIndex, pDisplayCount, pDisplays, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetDisplayPlaneSupportedDisplaysKHR(physicalDevice, planeIndex, pDisplayCount, pDisplays); + result = instance_dispatch->GetDisplayPlaneSupportedDisplaysKHR(physicalDevice, planeIndex, pDisplayCount, pDisplays); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDisplayPlaneSupportedDisplaysKHR(physicalDevice, planeIndex, pDisplayCount, pDisplays, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDisplayPlaneSupportedDisplaysKHR(physicalDevice, planeIndex, pDisplayCount, pDisplays, record_obj); } } return result; @@ -9655,38 +8125,37 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayModePropertiesKHR(VkPhysicalDevice phys uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDisplayModePropertiesKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDisplayModePropertiesKHR(physicalDevice, display, pPropertyCount, pProperties, - error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDisplayModePropertiesKHR(physicalDevice, display, pPropertyCount, pProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetDisplayModePropertiesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDisplayModePropertiesKHR(physicalDevice, display, pPropertyCount, pProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDisplayModePropertiesKHR(physicalDevice, display, pPropertyCount, pProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetDisplayModePropertiesKHR(physicalDevice, display, pPropertyCount, pProperties); + result = instance_dispatch->GetDisplayModePropertiesKHR(physicalDevice, display, pPropertyCount, pProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDisplayModePropertiesKHR(physicalDevice, display, pPropertyCount, pProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDisplayModePropertiesKHR(physicalDevice, display, pPropertyCount, pProperties, record_obj); } } return result; @@ -9697,37 +8166,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDisplayModeKHR(VkPhysicalDevice physicalDev const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateDisplayModeKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateCreateDisplayModeKHR(physicalDevice, display, pCreateInfo, pAllocator, pMode, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateDisplayModeKHR(physicalDevice, display, pCreateInfo, pAllocator, pMode, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateDisplayModeKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateDisplayModeKHR(physicalDevice, display, pCreateInfo, pAllocator, pMode, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateDisplayModeKHR(physicalDevice, display, pCreateInfo, pAllocator, pMode, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateDisplayModeKHR(physicalDevice, display, pCreateInfo, pAllocator, pMode); + result = instance_dispatch->CreateDisplayModeKHR(physicalDevice, display, pCreateInfo, pAllocator, pMode); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateDisplayModeKHR(physicalDevice, display, pCreateInfo, pAllocator, pMode, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateDisplayModeKHR(physicalDevice, display, pCreateInfo, pAllocator, pMode, record_obj); } } return result; @@ -9737,38 +8205,37 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice p uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDisplayPlaneCapabilitiesKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDisplayPlaneCapabilitiesKHR(physicalDevice, mode, planeIndex, pCapabilities, - error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDisplayPlaneCapabilitiesKHR(physicalDevice, mode, planeIndex, pCapabilities, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetDisplayPlaneCapabilitiesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDisplayPlaneCapabilitiesKHR(physicalDevice, mode, planeIndex, pCapabilities, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDisplayPlaneCapabilitiesKHR(physicalDevice, mode, planeIndex, pCapabilities, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetDisplayPlaneCapabilitiesKHR(physicalDevice, mode, planeIndex, pCapabilities); + result = instance_dispatch->GetDisplayPlaneCapabilitiesKHR(physicalDevice, mode, planeIndex, pCapabilities); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDisplayPlaneCapabilitiesKHR(physicalDevice, mode, planeIndex, pCapabilities, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDisplayPlaneCapabilitiesKHR(physicalDevice, mode, planeIndex, pCapabilities, record_obj); } } return result; @@ -9778,36 +8245,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDisplayPlaneSurfaceKHR(VkInstance instance, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateDisplayPlaneSurfaceKHR, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateDisplayPlaneSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateDisplayPlaneSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateDisplayPlaneSurfaceKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateDisplayPlaneSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateDisplayPlaneSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateDisplayPlaneSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + result = instance_dispatch->CreateDisplayPlaneSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateDisplayPlaneSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateDisplayPlaneSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } return result; @@ -9818,44 +8285,41 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSharedSwapchainsKHR(VkDevice device, uint32 const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateSharedSwapchainsKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCreateSharedSwapchainsKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateSharedSwapchainsKHR(device, swapchainCount, pCreateInfos, pAllocator, - pSwapchains, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateSharedSwapchainsKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateSharedSwapchainsKHR(device, swapchainCount, pCreateInfos, pAllocator, pSwapchains, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateSharedSwapchainsKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateSharedSwapchainsKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateSharedSwapchainsKHR(device, swapchainCount, pCreateInfos, pAllocator, pSwapchains, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateSharedSwapchainsKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateSharedSwapchainsKHR(device, swapchainCount, pCreateInfos, pAllocator, pSwapchains, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateSharedSwapchainsKHR(device, swapchainCount, pCreateInfos, pAllocator, pSwapchains); + result = device_dispatch->CreateSharedSwapchainsKHR(device, swapchainCount, pCreateInfos, pAllocator, pSwapchains); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateSharedSwapchainsKHR]) { - auto lock = intercept->WriteLock(); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateSharedSwapchainsKHR]) { + auto lock = vo->WriteLock(); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordCreateSharedSwapchainsKHR(device, swapchainCount, pCreateInfos, pAllocator, pSwapchains, - record_obj); + vo->PostCallRecordCreateSharedSwapchainsKHR(device, swapchainCount, pCreateInfos, pAllocator, pSwapchains, record_obj); } } return result; @@ -9866,36 +8330,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateXlibSurfaceKHR(VkInstance instance, const V const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateXlibSurfaceKHR, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateXlibSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateXlibSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateXlibSurfaceKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateXlibSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateXlibSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateXlibSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + result = instance_dispatch->CreateXlibSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateXlibSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateXlibSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } return result; @@ -9906,39 +8370,39 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceXlibPresentationSupportKHR(VkPhy VisualID visualID) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceXlibPresentationSupportKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceXlibPresentationSupportKHR(physicalDevice, queueFamilyIndex, dpy, - visualID, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceXlibPresentationSupportKHR(physicalDevice, queueFamilyIndex, dpy, visualID, + error_obj); if (skip) return VK_FALSE; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceXlibPresentationSupportKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceXlibPresentationSupportKHR(physicalDevice, queueFamilyIndex, dpy, visualID, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceXlibPresentationSupportKHR(physicalDevice, queueFamilyIndex, dpy, visualID, + record_obj); } } VkBool32 result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceXlibPresentationSupportKHR(physicalDevice, queueFamilyIndex, dpy, visualID); + result = instance_dispatch->GetPhysicalDeviceXlibPresentationSupportKHR(physicalDevice, queueFamilyIndex, dpy, visualID); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceXlibPresentationSupportKHR(physicalDevice, queueFamilyIndex, dpy, visualID, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceXlibPresentationSupportKHR(physicalDevice, queueFamilyIndex, dpy, visualID, + record_obj); } } return result; @@ -9950,36 +8414,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateXcbSurfaceKHR(VkInstance instance, const Vk const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateXcbSurfaceKHR, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateXcbSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateXcbSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateXcbSurfaceKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateXcbSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateXcbSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateXcbSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + result = instance_dispatch->CreateXcbSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateXcbSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateXcbSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } return result; @@ -9990,39 +8454,40 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceXcbPresentationSupportKHR(VkPhys xcb_visualid_t visual_id) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceXcbPresentationSupportKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceXcbPresentationSupportKHR(physicalDevice, queueFamilyIndex, - connection, visual_id, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceXcbPresentationSupportKHR(physicalDevice, queueFamilyIndex, connection, + visual_id, error_obj); if (skip) return VK_FALSE; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceXcbPresentationSupportKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceXcbPresentationSupportKHR(physicalDevice, queueFamilyIndex, connection, - visual_id, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceXcbPresentationSupportKHR(physicalDevice, queueFamilyIndex, connection, visual_id, + record_obj); } } VkBool32 result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceXcbPresentationSupportKHR(physicalDevice, queueFamilyIndex, connection, visual_id); + result = + instance_dispatch->GetPhysicalDeviceXcbPresentationSupportKHR(physicalDevice, queueFamilyIndex, connection, visual_id); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceXcbPresentationSupportKHR(physicalDevice, queueFamilyIndex, connection, - visual_id, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceXcbPresentationSupportKHR(physicalDevice, queueFamilyIndex, connection, visual_id, + record_obj); } } return result; @@ -10034,36 +8499,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateWaylandSurfaceKHR(VkInstance instance, cons const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateWaylandSurfaceKHR, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateWaylandSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateWaylandSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateWaylandSurfaceKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateWaylandSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateWaylandSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateWaylandSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + result = instance_dispatch->CreateWaylandSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateWaylandSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateWaylandSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } return result; @@ -10074,39 +8539,37 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceWaylandPresentationSupportKHR(Vk struct wl_display* display) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceWaylandPresentationSupportKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceWaylandPresentationSupportKHR(physicalDevice, queueFamilyIndex, - display, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceWaylandPresentationSupportKHR(physicalDevice, queueFamilyIndex, display, + error_obj); if (skip) return VK_FALSE; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceWaylandPresentationSupportKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceWaylandPresentationSupportKHR(physicalDevice, queueFamilyIndex, display, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceWaylandPresentationSupportKHR(physicalDevice, queueFamilyIndex, display, record_obj); } } VkBool32 result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceWaylandPresentationSupportKHR(physicalDevice, queueFamilyIndex, display); + result = instance_dispatch->GetPhysicalDeviceWaylandPresentationSupportKHR(physicalDevice, queueFamilyIndex, display); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceWaylandPresentationSupportKHR(physicalDevice, queueFamilyIndex, display, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceWaylandPresentationSupportKHR(physicalDevice, queueFamilyIndex, display, record_obj); } } return result; @@ -10118,36 +8581,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateAndroidSurfaceKHR(VkInstance instance, cons const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateAndroidSurfaceKHR, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateAndroidSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateAndroidSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateAndroidSurfaceKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateAndroidSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateAndroidSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateAndroidSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + result = instance_dispatch->CreateAndroidSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateAndroidSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateAndroidSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } return result; @@ -10159,36 +8622,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateWin32SurfaceKHR(VkInstance instance, const const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateWin32SurfaceKHR, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateWin32SurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateWin32SurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateWin32SurfaceKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateWin32SurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateWin32SurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateWin32SurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + result = instance_dispatch->CreateWin32SurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateWin32SurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateWin32SurfaceKHR(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } return result; @@ -10198,37 +8661,36 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceWin32PresentationSupportKHR(VkPh uint32_t queueFamilyIndex) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceWin32PresentationSupportKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateGetPhysicalDeviceWin32PresentationSupportKHR(physicalDevice, queueFamilyIndex, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceWin32PresentationSupportKHR(physicalDevice, queueFamilyIndex, error_obj); if (skip) return VK_FALSE; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceWin32PresentationSupportKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceWin32PresentationSupportKHR(physicalDevice, queueFamilyIndex, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceWin32PresentationSupportKHR(physicalDevice, queueFamilyIndex, record_obj); } } VkBool32 result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceWin32PresentationSupportKHR(physicalDevice, queueFamilyIndex); + result = instance_dispatch->GetPhysicalDeviceWin32PresentationSupportKHR(physicalDevice, queueFamilyIndex); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceWin32PresentationSupportKHR(physicalDevice, queueFamilyIndex, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceWin32PresentationSupportKHR(physicalDevice, queueFamilyIndex, record_obj); } } return result; @@ -10240,39 +8702,38 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceVideoCapabilitiesKHR(VkPhysicalD VkVideoCapabilitiesKHR* pCapabilities) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceVideoCapabilitiesKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceVideoCapabilitiesKHR(physicalDevice, pVideoProfile, pCapabilities, - error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateGetPhysicalDeviceVideoCapabilitiesKHR(physicalDevice, pVideoProfile, pCapabilities, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceVideoCapabilitiesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceVideoCapabilitiesKHR(physicalDevice, pVideoProfile, pCapabilities, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceVideoCapabilitiesKHR(physicalDevice, pVideoProfile, pCapabilities, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceVideoCapabilitiesKHR(physicalDevice, pVideoProfile, pCapabilities); + result = instance_dispatch->GetPhysicalDeviceVideoCapabilitiesKHR(physicalDevice, pVideoProfile, pCapabilities); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceVideoCapabilitiesKHR(physicalDevice, pVideoProfile, pCapabilities, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceVideoCapabilitiesKHR(physicalDevice, pVideoProfile, pCapabilities, record_obj); } } return result; @@ -10284,15 +8745,15 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceVideoFormatPropertiesKHR(VkPhysi VkVideoFormatPropertiesKHR* pVideoFormatProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceVideoFormatPropertiesKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceVideoFormatPropertiesKHR( + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceVideoFormatPropertiesKHR( physicalDevice, pVideoFormatInfo, pVideoFormatPropertyCount, pVideoFormatProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } @@ -10300,25 +8761,25 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceVideoFormatPropertiesKHR(VkPhysi RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceVideoFormatPropertiesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceVideoFormatPropertiesKHR( - physicalDevice, pVideoFormatInfo, pVideoFormatPropertyCount, pVideoFormatProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceVideoFormatPropertiesKHR(physicalDevice, pVideoFormatInfo, pVideoFormatPropertyCount, + pVideoFormatProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceVideoFormatPropertiesKHR(physicalDevice, pVideoFormatInfo, pVideoFormatPropertyCount, - pVideoFormatProperties); + result = instance_dispatch->GetPhysicalDeviceVideoFormatPropertiesKHR(physicalDevice, pVideoFormatInfo, + pVideoFormatPropertyCount, pVideoFormatProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceVideoFormatPropertiesKHR( - physicalDevice, pVideoFormatInfo, pVideoFormatPropertyCount, pVideoFormatProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceVideoFormatPropertiesKHR(physicalDevice, pVideoFormatInfo, pVideoFormatPropertyCount, + pVideoFormatProperties, record_obj); } } return result; @@ -10328,36 +8789,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateVideoSessionKHR(VkDevice device, const VkVi const VkAllocationCallbacks* pAllocator, VkVideoSessionKHR* pVideoSession) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateVideoSessionKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateVideoSessionKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateVideoSessionKHR(device, pCreateInfo, pAllocator, pVideoSession, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateVideoSessionKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateVideoSessionKHR(device, pCreateInfo, pAllocator, pVideoSession, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateVideoSessionKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateVideoSessionKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateVideoSessionKHR(device, pCreateInfo, pAllocator, pVideoSession, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateVideoSessionKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateVideoSessionKHR(device, pCreateInfo, pAllocator, pVideoSession, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateVideoSessionKHR(device, pCreateInfo, pAllocator, pVideoSession); + result = device_dispatch->CreateVideoSessionKHR(device, pCreateInfo, pAllocator, pVideoSession); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateVideoSessionKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateVideoSessionKHR(device, pCreateInfo, pAllocator, pVideoSession, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateVideoSessionKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateVideoSessionKHR(device, pCreateInfo, pAllocator, pVideoSession, record_obj); } } return result; @@ -10367,34 +8828,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyVideoSessionKHR(VkDevice device, VkVideoSessio const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyVideoSessionKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyVideoSessionKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyVideoSessionKHR(device, videoSession, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyVideoSessionKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyVideoSessionKHR(device, videoSession, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyVideoSessionKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyVideoSessionKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyVideoSessionKHR(device, videoSession, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyVideoSessionKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyVideoSessionKHR(device, videoSession, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyVideoSessionKHR(device, videoSession, pAllocator); + device_dispatch->DestroyVideoSessionKHR(device, videoSession, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyVideoSessionKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyVideoSessionKHR(device, videoSession, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyVideoSessionKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyVideoSessionKHR(device, videoSession, pAllocator, record_obj); } } } @@ -10404,42 +8865,40 @@ VKAPI_ATTR VkResult VKAPI_CALL GetVideoSessionMemoryRequirementsKHR(VkDevice dev VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetVideoSessionMemoryRequirementsKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetVideoSessionMemoryRequirementsKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetVideoSessionMemoryRequirementsKHR(device, videoSession, pMemoryRequirementsCount, - pMemoryRequirements, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetVideoSessionMemoryRequirementsKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetVideoSessionMemoryRequirementsKHR(device, videoSession, pMemoryRequirementsCount, + pMemoryRequirements, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetVideoSessionMemoryRequirementsKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetVideoSessionMemoryRequirementsKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetVideoSessionMemoryRequirementsKHR(device, videoSession, pMemoryRequirementsCount, - pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetVideoSessionMemoryRequirementsKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetVideoSessionMemoryRequirementsKHR(device, videoSession, pMemoryRequirementsCount, + pMemoryRequirements, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetVideoSessionMemoryRequirementsKHR(device, videoSession, pMemoryRequirementsCount, pMemoryRequirements); + result = device_dispatch->GetVideoSessionMemoryRequirementsKHR(device, videoSession, pMemoryRequirementsCount, + pMemoryRequirements); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetVideoSessionMemoryRequirementsKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetVideoSessionMemoryRequirementsKHR(device, videoSession, pMemoryRequirementsCount, - pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetVideoSessionMemoryRequirementsKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetVideoSessionMemoryRequirementsKHR(device, videoSession, pMemoryRequirementsCount, + pMemoryRequirements, record_obj); } } return result; @@ -10450,40 +8909,40 @@ VKAPI_ATTR VkResult VKAPI_CALL BindVideoSessionMemoryKHR(VkDevice device, VkVide const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkBindVideoSessionMemoryKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateBindVideoSessionMemoryKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateBindVideoSessionMemoryKHR(device, videoSession, bindSessionMemoryInfoCount, - pBindSessionMemoryInfos, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateBindVideoSessionMemoryKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateBindVideoSessionMemoryKHR(device, videoSession, bindSessionMemoryInfoCount, + pBindSessionMemoryInfos, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkBindVideoSessionMemoryKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordBindVideoSessionMemoryKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordBindVideoSessionMemoryKHR(device, videoSession, bindSessionMemoryInfoCount, - pBindSessionMemoryInfos, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordBindVideoSessionMemoryKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordBindVideoSessionMemoryKHR(device, videoSession, bindSessionMemoryInfoCount, pBindSessionMemoryInfos, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchBindVideoSessionMemoryKHR(device, videoSession, bindSessionMemoryInfoCount, pBindSessionMemoryInfos); + result = + device_dispatch->BindVideoSessionMemoryKHR(device, videoSession, bindSessionMemoryInfoCount, pBindSessionMemoryInfos); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordBindVideoSessionMemoryKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordBindVideoSessionMemoryKHR(device, videoSession, bindSessionMemoryInfoCount, - pBindSessionMemoryInfos, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordBindVideoSessionMemoryKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordBindVideoSessionMemoryKHR(device, videoSession, bindSessionMemoryInfoCount, pBindSessionMemoryInfos, + record_obj); } } return result; @@ -10495,41 +8954,37 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR* pVideoSessionParameters) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateVideoSessionParametersKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCreateVideoSessionParametersKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateVideoSessionParametersKHR(device, pCreateInfo, pAllocator, - pVideoSessionParameters, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateVideoSessionParametersKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateVideoSessionParametersKHR(device, pCreateInfo, pAllocator, pVideoSessionParameters, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateVideoSessionParametersKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateVideoSessionParametersKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateVideoSessionParametersKHR(device, pCreateInfo, pAllocator, pVideoSessionParameters, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateVideoSessionParametersKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateVideoSessionParametersKHR(device, pCreateInfo, pAllocator, pVideoSessionParameters, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateVideoSessionParametersKHR(device, pCreateInfo, pAllocator, pVideoSessionParameters); + result = device_dispatch->CreateVideoSessionParametersKHR(device, pCreateInfo, pAllocator, pVideoSessionParameters); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCreateVideoSessionParametersKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateVideoSessionParametersKHR(device, pCreateInfo, pAllocator, pVideoSessionParameters, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateVideoSessionParametersKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateVideoSessionParametersKHR(device, pCreateInfo, pAllocator, pVideoSessionParameters, record_obj); } } return result; @@ -10539,39 +8994,36 @@ VKAPI_ATTR VkResult VKAPI_CALL UpdateVideoSessionParametersKHR(VkDevice device, const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkUpdateVideoSessionParametersKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateUpdateVideoSessionParametersKHR]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateUpdateVideoSessionParametersKHR(device, videoSessionParameters, pUpdateInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateUpdateVideoSessionParametersKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateUpdateVideoSessionParametersKHR(device, videoSessionParameters, pUpdateInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkUpdateVideoSessionParametersKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordUpdateVideoSessionParametersKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordUpdateVideoSessionParametersKHR(device, videoSessionParameters, pUpdateInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordUpdateVideoSessionParametersKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordUpdateVideoSessionParametersKHR(device, videoSessionParameters, pUpdateInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchUpdateVideoSessionParametersKHR(device, videoSessionParameters, pUpdateInfo); + result = device_dispatch->UpdateVideoSessionParametersKHR(device, videoSessionParameters, pUpdateInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordUpdateVideoSessionParametersKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordUpdateVideoSessionParametersKHR(device, videoSessionParameters, pUpdateInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordUpdateVideoSessionParametersKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordUpdateVideoSessionParametersKHR(device, videoSessionParameters, pUpdateInfo, record_obj); } } return result; @@ -10581,38 +9033,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyVideoSessionParametersKHR(VkDevice device, VkV const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyVideoSessionParametersKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyVideoSessionParametersKHR]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateDestroyVideoSessionParametersKHR(device, videoSessionParameters, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyVideoSessionParametersKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyVideoSessionParametersKHR(device, videoSessionParameters, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyVideoSessionParametersKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyVideoSessionParametersKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyVideoSessionParametersKHR(device, videoSessionParameters, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyVideoSessionParametersKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyVideoSessionParametersKHR(device, videoSessionParameters, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyVideoSessionParametersKHR(device, videoSessionParameters, pAllocator); + device_dispatch->DestroyVideoSessionParametersKHR(device, videoSessionParameters, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyVideoSessionParametersKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyVideoSessionParametersKHR(device, videoSessionParameters, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyVideoSessionParametersKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyVideoSessionParametersKHR(device, videoSessionParameters, pAllocator, record_obj); } } } @@ -10620,34 +9068,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyVideoSessionParametersKHR(VkDevice device, VkV VKAPI_ATTR void VKAPI_CALL CmdBeginVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoBeginCodingInfoKHR* pBeginInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBeginVideoCodingKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBeginVideoCodingKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBeginVideoCodingKHR(commandBuffer, pBeginInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBeginVideoCodingKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBeginVideoCodingKHR(commandBuffer, pBeginInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBeginVideoCodingKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBeginVideoCodingKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBeginVideoCodingKHR(commandBuffer, pBeginInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBeginVideoCodingKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBeginVideoCodingKHR(commandBuffer, pBeginInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBeginVideoCodingKHR(commandBuffer, pBeginInfo); + device_dispatch->CmdBeginVideoCodingKHR(commandBuffer, pBeginInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBeginVideoCodingKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBeginVideoCodingKHR(commandBuffer, pBeginInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBeginVideoCodingKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBeginVideoCodingKHR(commandBuffer, pBeginInfo, record_obj); } } } @@ -10655,34 +9103,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginVideoCodingKHR(VkCommandBuffer commandBuffer, VKAPI_ATTR void VKAPI_CALL CmdEndVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoEndCodingInfoKHR* pEndCodingInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdEndVideoCodingKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdEndVideoCodingKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdEndVideoCodingKHR(commandBuffer, pEndCodingInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdEndVideoCodingKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdEndVideoCodingKHR(commandBuffer, pEndCodingInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdEndVideoCodingKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdEndVideoCodingKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdEndVideoCodingKHR(commandBuffer, pEndCodingInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdEndVideoCodingKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdEndVideoCodingKHR(commandBuffer, pEndCodingInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdEndVideoCodingKHR(commandBuffer, pEndCodingInfo); + device_dispatch->CmdEndVideoCodingKHR(commandBuffer, pEndCodingInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdEndVideoCodingKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdEndVideoCodingKHR(commandBuffer, pEndCodingInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdEndVideoCodingKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdEndVideoCodingKHR(commandBuffer, pEndCodingInfo, record_obj); } } } @@ -10691,35 +9139,34 @@ VKAPI_ATTR void VKAPI_CALL CmdControlVideoCodingKHR(VkCommandBuffer commandBuffe const VkVideoCodingControlInfoKHR* pCodingControlInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdControlVideoCodingKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdControlVideoCodingKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdControlVideoCodingKHR(commandBuffer, pCodingControlInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdControlVideoCodingKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdControlVideoCodingKHR(commandBuffer, pCodingControlInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdControlVideoCodingKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdControlVideoCodingKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdControlVideoCodingKHR(commandBuffer, pCodingControlInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdControlVideoCodingKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdControlVideoCodingKHR(commandBuffer, pCodingControlInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdControlVideoCodingKHR(commandBuffer, pCodingControlInfo); + device_dispatch->CmdControlVideoCodingKHR(commandBuffer, pCodingControlInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdControlVideoCodingKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdControlVideoCodingKHR(commandBuffer, pCodingControlInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdControlVideoCodingKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdControlVideoCodingKHR(commandBuffer, pCodingControlInfo, record_obj); } } } @@ -10727,34 +9174,34 @@ VKAPI_ATTR void VKAPI_CALL CmdControlVideoCodingKHR(VkCommandBuffer commandBuffe VKAPI_ATTR void VKAPI_CALL CmdDecodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR* pDecodeInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDecodeVideoKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDecodeVideoKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDecodeVideoKHR(commandBuffer, pDecodeInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDecodeVideoKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDecodeVideoKHR(commandBuffer, pDecodeInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDecodeVideoKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDecodeVideoKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDecodeVideoKHR(commandBuffer, pDecodeInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDecodeVideoKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDecodeVideoKHR(commandBuffer, pDecodeInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDecodeVideoKHR(commandBuffer, pDecodeInfo); + device_dispatch->CmdDecodeVideoKHR(commandBuffer, pDecodeInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDecodeVideoKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDecodeVideoKHR(commandBuffer, pDecodeInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDecodeVideoKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDecodeVideoKHR(commandBuffer, pDecodeInfo, record_obj); } } } @@ -10762,34 +9209,34 @@ VKAPI_ATTR void VKAPI_CALL CmdDecodeVideoKHR(VkCommandBuffer commandBuffer, cons VKAPI_ATTR void VKAPI_CALL CmdBeginRenderingKHR(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBeginRenderingKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBeginRenderingKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBeginRenderingKHR(commandBuffer, pRenderingInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBeginRenderingKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBeginRenderingKHR(commandBuffer, pRenderingInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBeginRenderingKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBeginRenderingKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBeginRenderingKHR(commandBuffer, pRenderingInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBeginRenderingKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBeginRenderingKHR(commandBuffer, pRenderingInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBeginRenderingKHR(commandBuffer, pRenderingInfo); + device_dispatch->CmdBeginRenderingKHR(commandBuffer, pRenderingInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBeginRenderingKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBeginRenderingKHR(commandBuffer, pRenderingInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBeginRenderingKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBeginRenderingKHR(commandBuffer, pRenderingInfo, record_obj); } } } @@ -10797,34 +9244,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRenderingKHR(VkCommandBuffer commandBuffer, c VKAPI_ATTR void VKAPI_CALL CmdEndRenderingKHR(VkCommandBuffer commandBuffer) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdEndRenderingKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdEndRenderingKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdEndRenderingKHR(commandBuffer, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdEndRenderingKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdEndRenderingKHR(commandBuffer, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdEndRenderingKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdEndRenderingKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdEndRenderingKHR(commandBuffer, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdEndRenderingKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdEndRenderingKHR(commandBuffer, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdEndRenderingKHR(commandBuffer); + device_dispatch->CmdEndRenderingKHR(commandBuffer); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdEndRenderingKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdEndRenderingKHR(commandBuffer, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdEndRenderingKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdEndRenderingKHR(commandBuffer, record_obj); } } } @@ -10832,35 +9279,35 @@ VKAPI_ATTR void VKAPI_CALL CmdEndRenderingKHR(VkCommandBuffer commandBuffer) { VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceFeatures2KHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceFeatures2KHR(physicalDevice, pFeatures, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceFeatures2KHR(physicalDevice, pFeatures, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceFeatures2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceFeatures2KHR(physicalDevice, pFeatures, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceFeatures2KHR(physicalDevice, pFeatures, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceFeatures2KHR(physicalDevice, pFeatures); + instance_dispatch->GetPhysicalDeviceFeatures2KHR(physicalDevice, pFeatures); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceFeatures2KHR(physicalDevice, pFeatures, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceFeatures2KHR(physicalDevice, pFeatures, record_obj); } } } @@ -10869,35 +9316,35 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties2KHR(VkPhysicalDevice phys VkPhysicalDeviceProperties2* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceProperties2KHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceProperties2KHR(physicalDevice, pProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceProperties2KHR(physicalDevice, pProperties, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceProperties2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceProperties2KHR(physicalDevice, pProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceProperties2KHR(physicalDevice, pProperties, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceProperties2KHR(physicalDevice, pProperties); + instance_dispatch->GetPhysicalDeviceProperties2KHR(physicalDevice, pProperties); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceProperties2KHR(physicalDevice, pProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceProperties2KHR(physicalDevice, pProperties, record_obj); } } } @@ -10906,36 +9353,35 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFormatProperties2KHR(VkPhysicalDevic VkFormatProperties2* pFormatProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceFormatProperties2KHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceFormatProperties2KHR(physicalDevice, format, pFormatProperties, - error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceFormatProperties2KHR(physicalDevice, format, pFormatProperties, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceFormatProperties2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceFormatProperties2KHR(physicalDevice, format, pFormatProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceFormatProperties2KHR(physicalDevice, format, pFormatProperties, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceFormatProperties2KHR(physicalDevice, format, pFormatProperties); + instance_dispatch->GetPhysicalDeviceFormatProperties2KHR(physicalDevice, format, pFormatProperties); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceFormatProperties2KHR(physicalDevice, format, pFormatProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceFormatProperties2KHR(physicalDevice, format, pFormatProperties, record_obj); } } } @@ -10945,40 +9391,41 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceImageFormatProperties2KHR(VkPhys VkImageFormatProperties2* pImageFormatProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceImageFormatProperties2KHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceImageFormatProperties2KHR(physicalDevice, pImageFormatInfo, - pImageFormatProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceImageFormatProperties2KHR(physicalDevice, pImageFormatInfo, + pImageFormatProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceImageFormatProperties2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceImageFormatProperties2KHR(physicalDevice, pImageFormatInfo, - pImageFormatProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceImageFormatProperties2KHR(physicalDevice, pImageFormatInfo, pImageFormatProperties, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceImageFormatProperties2KHR(physicalDevice, pImageFormatInfo, pImageFormatProperties); + result = + instance_dispatch->GetPhysicalDeviceImageFormatProperties2KHR(physicalDevice, pImageFormatInfo, pImageFormatProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceImageFormatProperties2KHR(physicalDevice, pImageFormatInfo, - pImageFormatProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceImageFormatProperties2KHR(physicalDevice, pImageFormatInfo, pImageFormatProperties, + record_obj); } } return result; @@ -10989,38 +9436,39 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysical VkQueueFamilyProperties2* pQueueFamilyProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceQueueFamilyProperties2KHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceQueueFamilyProperties2KHR(physicalDevice, pQueueFamilyPropertyCount, - pQueueFamilyProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceQueueFamilyProperties2KHR(physicalDevice, pQueueFamilyPropertyCount, + pQueueFamilyProperties, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceQueueFamilyProperties2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceQueueFamilyProperties2KHR(physicalDevice, pQueueFamilyPropertyCount, - pQueueFamilyProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceQueueFamilyProperties2KHR(physicalDevice, pQueueFamilyPropertyCount, + pQueueFamilyProperties, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceQueueFamilyProperties2KHR(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); + instance_dispatch->GetPhysicalDeviceQueueFamilyProperties2KHR(physicalDevice, pQueueFamilyPropertyCount, + pQueueFamilyProperties); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceQueueFamilyProperties2KHR(physicalDevice, pQueueFamilyPropertyCount, - pQueueFamilyProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceQueueFamilyProperties2KHR(physicalDevice, pQueueFamilyPropertyCount, + pQueueFamilyProperties, record_obj); } } } @@ -11029,35 +9477,35 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMemoryProperties2KHR(VkPhysicalDevic VkPhysicalDeviceMemoryProperties2* pMemoryProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceMemoryProperties2KHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceMemoryProperties2KHR(physicalDevice, pMemoryProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceMemoryProperties2KHR(physicalDevice, pMemoryProperties, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceMemoryProperties2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceMemoryProperties2KHR(physicalDevice, pMemoryProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceMemoryProperties2KHR(physicalDevice, pMemoryProperties, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceMemoryProperties2KHR(physicalDevice, pMemoryProperties); + instance_dispatch->GetPhysicalDeviceMemoryProperties2KHR(physicalDevice, pMemoryProperties); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceMemoryProperties2KHR(physicalDevice, pMemoryProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceMemoryProperties2KHR(physicalDevice, pMemoryProperties, record_obj); } } } @@ -11067,38 +9515,39 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceSparseImageFormatProperties2KHR( VkSparseImageFormatProperties2* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceSparseImageFormatProperties2KHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceSparseImageFormatProperties2KHR( - physicalDevice, pFormatInfo, pPropertyCount, pProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceSparseImageFormatProperties2KHR(physicalDevice, pFormatInfo, pPropertyCount, + pProperties, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceSparseImageFormatProperties2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceSparseImageFormatProperties2KHR(physicalDevice, pFormatInfo, pPropertyCount, - pProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceSparseImageFormatProperties2KHR(physicalDevice, pFormatInfo, pPropertyCount, + pProperties, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceSparseImageFormatProperties2KHR(physicalDevice, pFormatInfo, pPropertyCount, pProperties); + instance_dispatch->GetPhysicalDeviceSparseImageFormatProperties2KHR(physicalDevice, pFormatInfo, pPropertyCount, + pProperties); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceSparseImageFormatProperties2KHR(physicalDevice, pFormatInfo, pPropertyCount, - pProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceSparseImageFormatProperties2KHR(physicalDevice, pFormatInfo, pPropertyCount, + pProperties, record_obj); } } } @@ -11108,40 +9557,38 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeviceGroupPeerMemoryFeaturesKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeviceGroupPeerMemoryFeaturesKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDeviceGroupPeerMemoryFeaturesKHR( - device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeviceGroupPeerMemoryFeaturesKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDeviceGroupPeerMemoryFeaturesKHR(device, heapIndex, localDeviceIndex, remoteDeviceIndex, + pPeerMemoryFeatures, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetDeviceGroupPeerMemoryFeaturesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeviceGroupPeerMemoryFeaturesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeviceGroupPeerMemoryFeaturesKHR(device, heapIndex, localDeviceIndex, remoteDeviceIndex, - pPeerMemoryFeatures, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeviceGroupPeerMemoryFeaturesKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeviceGroupPeerMemoryFeaturesKHR(device, heapIndex, localDeviceIndex, remoteDeviceIndex, + pPeerMemoryFeatures, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetDeviceGroupPeerMemoryFeaturesKHR(device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures); + device_dispatch->GetDeviceGroupPeerMemoryFeaturesKHR(device, heapIndex, localDeviceIndex, remoteDeviceIndex, + pPeerMemoryFeatures); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeviceGroupPeerMemoryFeaturesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeviceGroupPeerMemoryFeaturesKHR(device, heapIndex, localDeviceIndex, remoteDeviceIndex, - pPeerMemoryFeatures, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeviceGroupPeerMemoryFeaturesKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeviceGroupPeerMemoryFeaturesKHR(device, heapIndex, localDeviceIndex, remoteDeviceIndex, + pPeerMemoryFeatures, record_obj); } } } @@ -11149,34 +9596,34 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, VKAPI_ATTR void VKAPI_CALL CmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, uint32_t deviceMask) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDeviceMaskKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDeviceMaskKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDeviceMaskKHR(commandBuffer, deviceMask, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDeviceMaskKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDeviceMaskKHR(commandBuffer, deviceMask, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDeviceMaskKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDeviceMaskKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDeviceMaskKHR(commandBuffer, deviceMask, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDeviceMaskKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDeviceMaskKHR(commandBuffer, deviceMask, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDeviceMaskKHR(commandBuffer, deviceMask); + device_dispatch->CmdSetDeviceMaskKHR(commandBuffer, deviceMask); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDeviceMaskKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDeviceMaskKHR(commandBuffer, deviceMask, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDeviceMaskKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDeviceMaskKHR(commandBuffer, deviceMask, record_obj); } } } @@ -11186,37 +9633,38 @@ VKAPI_ATTR void VKAPI_CALL CmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uin uint32_t groupCountZ) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDispatchBaseKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDispatchBaseKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDispatchBaseKHR(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, - groupCountY, groupCountZ, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDispatchBaseKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDispatchBaseKHR(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, + groupCountY, groupCountZ, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDispatchBaseKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDispatchBaseKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDispatchBaseKHR(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, - groupCountZ, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDispatchBaseKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDispatchBaseKHR(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, + groupCountZ, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDispatchBaseKHR(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); + device_dispatch->CmdDispatchBaseKHR(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, + groupCountZ); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDispatchBaseKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDispatchBaseKHR(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, - groupCountZ, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDispatchBaseKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDispatchBaseKHR(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, + groupCountZ, record_obj); } } } @@ -11224,34 +9672,34 @@ VKAPI_ATTR void VKAPI_CALL CmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uin VKAPI_ATTR void VKAPI_CALL TrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkTrimCommandPoolKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateTrimCommandPoolKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateTrimCommandPoolKHR(device, commandPool, flags, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateTrimCommandPoolKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateTrimCommandPoolKHR(device, commandPool, flags, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkTrimCommandPoolKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordTrimCommandPoolKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordTrimCommandPoolKHR(device, commandPool, flags, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordTrimCommandPoolKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordTrimCommandPoolKHR(device, commandPool, flags, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchTrimCommandPoolKHR(device, commandPool, flags); + device_dispatch->TrimCommandPoolKHR(device, commandPool, flags); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordTrimCommandPoolKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordTrimCommandPoolKHR(device, commandPool, flags, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordTrimCommandPoolKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordTrimCommandPoolKHR(device, commandPool, flags, record_obj); } } } @@ -11260,39 +9708,40 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDeviceGroupsKHR(VkInstance insta VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkEnumeratePhysicalDeviceGroupsKHR, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateEnumeratePhysicalDeviceGroupsKHR(instance, pPhysicalDeviceGroupCount, - pPhysicalDeviceGroupProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateEnumeratePhysicalDeviceGroupsKHR(instance, pPhysicalDeviceGroupCount, + pPhysicalDeviceGroupProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkEnumeratePhysicalDeviceGroupsKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordEnumeratePhysicalDeviceGroupsKHR(instance, pPhysicalDeviceGroupCount, - pPhysicalDeviceGroupProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordEnumeratePhysicalDeviceGroupsKHR(instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchEnumeratePhysicalDeviceGroupsKHR(instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties); + result = instance_dispatch->EnumeratePhysicalDeviceGroupsKHR(instance, pPhysicalDeviceGroupCount, + pPhysicalDeviceGroupProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordEnumeratePhysicalDeviceGroupsKHR(instance, pPhysicalDeviceGroupCount, - pPhysicalDeviceGroupProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordEnumeratePhysicalDeviceGroupsKHR(instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties, + record_obj); } } return result; @@ -11303,38 +9752,39 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalBufferPropertiesKHR( VkExternalBufferProperties* pExternalBufferProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceExternalBufferPropertiesKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceExternalBufferPropertiesKHR(physicalDevice, pExternalBufferInfo, - pExternalBufferProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceExternalBufferPropertiesKHR(physicalDevice, pExternalBufferInfo, + pExternalBufferProperties, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceExternalBufferPropertiesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceExternalBufferPropertiesKHR(physicalDevice, pExternalBufferInfo, - pExternalBufferProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceExternalBufferPropertiesKHR(physicalDevice, pExternalBufferInfo, + pExternalBufferProperties, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceExternalBufferPropertiesKHR(physicalDevice, pExternalBufferInfo, pExternalBufferProperties); + instance_dispatch->GetPhysicalDeviceExternalBufferPropertiesKHR(physicalDevice, pExternalBufferInfo, + pExternalBufferProperties); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceExternalBufferPropertiesKHR(physicalDevice, pExternalBufferInfo, - pExternalBufferProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceExternalBufferPropertiesKHR(physicalDevice, pExternalBufferInfo, + pExternalBufferProperties, record_obj); } } } @@ -11344,36 +9794,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandleKHR(VkDevice device, const Vk HANDLE* pHandle) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetMemoryWin32HandleKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetMemoryWin32HandleKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetMemoryWin32HandleKHR(device, pGetWin32HandleInfo, pHandle, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetMemoryWin32HandleKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetMemoryWin32HandleKHR(device, pGetWin32HandleInfo, pHandle, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetMemoryWin32HandleKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetMemoryWin32HandleKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetMemoryWin32HandleKHR(device, pGetWin32HandleInfo, pHandle, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetMemoryWin32HandleKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetMemoryWin32HandleKHR(device, pGetWin32HandleInfo, pHandle, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetMemoryWin32HandleKHR(device, pGetWin32HandleInfo, pHandle); + result = device_dispatch->GetMemoryWin32HandleKHR(device, pGetWin32HandleInfo, pHandle); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetMemoryWin32HandleKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetMemoryWin32HandleKHR(device, pGetWin32HandleInfo, pHandle, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetMemoryWin32HandleKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetMemoryWin32HandleKHR(device, pGetWin32HandleInfo, pHandle, record_obj); } } return result; @@ -11384,42 +9834,39 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandlePropertiesKHR(VkDevice device VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetMemoryWin32HandlePropertiesKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetMemoryWin32HandlePropertiesKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetMemoryWin32HandlePropertiesKHR(device, handleType, handle, - pMemoryWin32HandleProperties, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetMemoryWin32HandlePropertiesKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetMemoryWin32HandlePropertiesKHR(device, handleType, handle, pMemoryWin32HandleProperties, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetMemoryWin32HandlePropertiesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetMemoryWin32HandlePropertiesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetMemoryWin32HandlePropertiesKHR(device, handleType, handle, pMemoryWin32HandleProperties, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetMemoryWin32HandlePropertiesKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetMemoryWin32HandlePropertiesKHR(device, handleType, handle, pMemoryWin32HandleProperties, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetMemoryWin32HandlePropertiesKHR(device, handleType, handle, pMemoryWin32HandleProperties); + result = device_dispatch->GetMemoryWin32HandlePropertiesKHR(device, handleType, handle, pMemoryWin32HandleProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetMemoryWin32HandlePropertiesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetMemoryWin32HandlePropertiesKHR(device, handleType, handle, pMemoryWin32HandleProperties, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetMemoryWin32HandlePropertiesKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetMemoryWin32HandlePropertiesKHR(device, handleType, handle, pMemoryWin32HandleProperties, + record_obj); } } return result; @@ -11429,36 +9876,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandlePropertiesKHR(VkDevice device VKAPI_ATTR VkResult VKAPI_CALL GetMemoryFdKHR(VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetMemoryFdKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetMemoryFdKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetMemoryFdKHR(device, pGetFdInfo, pFd, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetMemoryFdKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetMemoryFdKHR(device, pGetFdInfo, pFd, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetMemoryFdKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetMemoryFdKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetMemoryFdKHR(device, pGetFdInfo, pFd, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetMemoryFdKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetMemoryFdKHR(device, pGetFdInfo, pFd, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetMemoryFdKHR(device, pGetFdInfo, pFd); + result = device_dispatch->GetMemoryFdKHR(device, pGetFdInfo, pFd); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetMemoryFdKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetMemoryFdKHR(device, pGetFdInfo, pFd, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetMemoryFdKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetMemoryFdKHR(device, pGetFdInfo, pFd, record_obj); } } return result; @@ -11468,37 +9915,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryFdPropertiesKHR(VkDevice device, VkExter VkMemoryFdPropertiesKHR* pMemoryFdProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetMemoryFdPropertiesKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetMemoryFdPropertiesKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetMemoryFdPropertiesKHR(device, handleType, fd, pMemoryFdProperties, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetMemoryFdPropertiesKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetMemoryFdPropertiesKHR(device, handleType, fd, pMemoryFdProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetMemoryFdPropertiesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetMemoryFdPropertiesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetMemoryFdPropertiesKHR(device, handleType, fd, pMemoryFdProperties, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetMemoryFdPropertiesKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetMemoryFdPropertiesKHR(device, handleType, fd, pMemoryFdProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetMemoryFdPropertiesKHR(device, handleType, fd, pMemoryFdProperties); + result = device_dispatch->GetMemoryFdPropertiesKHR(device, handleType, fd, pMemoryFdProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetMemoryFdPropertiesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetMemoryFdPropertiesKHR(device, handleType, fd, pMemoryFdProperties, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetMemoryFdPropertiesKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetMemoryFdPropertiesKHR(device, handleType, fd, pMemoryFdProperties, record_obj); } } return result; @@ -11509,39 +9955,39 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalSemaphorePropertiesKHR( VkExternalSemaphoreProperties* pExternalSemaphoreProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceExternalSemaphorePropertiesKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceExternalSemaphorePropertiesKHR( - physicalDevice, pExternalSemaphoreInfo, pExternalSemaphoreProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceExternalSemaphorePropertiesKHR(physicalDevice, pExternalSemaphoreInfo, + pExternalSemaphoreProperties, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceExternalSemaphorePropertiesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceExternalSemaphorePropertiesKHR(physicalDevice, pExternalSemaphoreInfo, - pExternalSemaphoreProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceExternalSemaphorePropertiesKHR(physicalDevice, pExternalSemaphoreInfo, + pExternalSemaphoreProperties, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceExternalSemaphorePropertiesKHR(physicalDevice, pExternalSemaphoreInfo, - pExternalSemaphoreProperties); + instance_dispatch->GetPhysicalDeviceExternalSemaphorePropertiesKHR(physicalDevice, pExternalSemaphoreInfo, + pExternalSemaphoreProperties); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceExternalSemaphorePropertiesKHR(physicalDevice, pExternalSemaphoreInfo, - pExternalSemaphoreProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceExternalSemaphorePropertiesKHR(physicalDevice, pExternalSemaphoreInfo, + pExternalSemaphoreProperties, record_obj); } } } @@ -11551,37 +9997,36 @@ VKAPI_ATTR VkResult VKAPI_CALL ImportSemaphoreWin32HandleKHR(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkImportSemaphoreWin32HandleKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateImportSemaphoreWin32HandleKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateImportSemaphoreWin32HandleKHR(device, pImportSemaphoreWin32HandleInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateImportSemaphoreWin32HandleKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateImportSemaphoreWin32HandleKHR(device, pImportSemaphoreWin32HandleInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkImportSemaphoreWin32HandleKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordImportSemaphoreWin32HandleKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordImportSemaphoreWin32HandleKHR(device, pImportSemaphoreWin32HandleInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordImportSemaphoreWin32HandleKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordImportSemaphoreWin32HandleKHR(device, pImportSemaphoreWin32HandleInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchImportSemaphoreWin32HandleKHR(device, pImportSemaphoreWin32HandleInfo); + result = device_dispatch->ImportSemaphoreWin32HandleKHR(device, pImportSemaphoreWin32HandleInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordImportSemaphoreWin32HandleKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordImportSemaphoreWin32HandleKHR(device, pImportSemaphoreWin32HandleInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordImportSemaphoreWin32HandleKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordImportSemaphoreWin32HandleKHR(device, pImportSemaphoreWin32HandleInfo, record_obj); } } return result; @@ -11592,37 +10037,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreWin32HandleKHR(VkDevice device, HANDLE* pHandle) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetSemaphoreWin32HandleKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetSemaphoreWin32HandleKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetSemaphoreWin32HandleKHR(device, pGetWin32HandleInfo, pHandle, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetSemaphoreWin32HandleKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetSemaphoreWin32HandleKHR(device, pGetWin32HandleInfo, pHandle, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetSemaphoreWin32HandleKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetSemaphoreWin32HandleKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetSemaphoreWin32HandleKHR(device, pGetWin32HandleInfo, pHandle, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetSemaphoreWin32HandleKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetSemaphoreWin32HandleKHR(device, pGetWin32HandleInfo, pHandle, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetSemaphoreWin32HandleKHR(device, pGetWin32HandleInfo, pHandle); + result = device_dispatch->GetSemaphoreWin32HandleKHR(device, pGetWin32HandleInfo, pHandle); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetSemaphoreWin32HandleKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetSemaphoreWin32HandleKHR(device, pGetWin32HandleInfo, pHandle, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetSemaphoreWin32HandleKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetSemaphoreWin32HandleKHR(device, pGetWin32HandleInfo, pHandle, record_obj); } } return result; @@ -11632,36 +10076,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreWin32HandleKHR(VkDevice device, VKAPI_ATTR VkResult VKAPI_CALL ImportSemaphoreFdKHR(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkImportSemaphoreFdKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateImportSemaphoreFdKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateImportSemaphoreFdKHR(device, pImportSemaphoreFdInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateImportSemaphoreFdKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateImportSemaphoreFdKHR(device, pImportSemaphoreFdInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkImportSemaphoreFdKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordImportSemaphoreFdKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordImportSemaphoreFdKHR(device, pImportSemaphoreFdInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordImportSemaphoreFdKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordImportSemaphoreFdKHR(device, pImportSemaphoreFdInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchImportSemaphoreFdKHR(device, pImportSemaphoreFdInfo); + result = device_dispatch->ImportSemaphoreFdKHR(device, pImportSemaphoreFdInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordImportSemaphoreFdKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordImportSemaphoreFdKHR(device, pImportSemaphoreFdInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordImportSemaphoreFdKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordImportSemaphoreFdKHR(device, pImportSemaphoreFdInfo, record_obj); } } return result; @@ -11670,36 +10114,36 @@ VKAPI_ATTR VkResult VKAPI_CALL ImportSemaphoreFdKHR(VkDevice device, const VkImp VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreFdKHR(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetSemaphoreFdKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetSemaphoreFdKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetSemaphoreFdKHR(device, pGetFdInfo, pFd, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetSemaphoreFdKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetSemaphoreFdKHR(device, pGetFdInfo, pFd, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetSemaphoreFdKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetSemaphoreFdKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetSemaphoreFdKHR(device, pGetFdInfo, pFd, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetSemaphoreFdKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetSemaphoreFdKHR(device, pGetFdInfo, pFd, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetSemaphoreFdKHR(device, pGetFdInfo, pFd); + result = device_dispatch->GetSemaphoreFdKHR(device, pGetFdInfo, pFd); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetSemaphoreFdKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetSemaphoreFdKHR(device, pGetFdInfo, pFd, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetSemaphoreFdKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetSemaphoreFdKHR(device, pGetFdInfo, pFd, record_obj); } } return result; @@ -11710,37 +10154,38 @@ VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer const VkWriteDescriptorSet* pDescriptorWrites) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdPushDescriptorSetKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdPushDescriptorSetKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdPushDescriptorSetKHR(commandBuffer, pipelineBindPoint, layout, set, - descriptorWriteCount, pDescriptorWrites, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdPushDescriptorSetKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdPushDescriptorSetKHR(commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, + pDescriptorWrites, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdPushDescriptorSetKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdPushDescriptorSetKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdPushDescriptorSetKHR(commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, - pDescriptorWrites, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdPushDescriptorSetKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdPushDescriptorSetKHR(commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, + pDescriptorWrites, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdPushDescriptorSetKHR(commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, pDescriptorWrites); + device_dispatch->CmdPushDescriptorSetKHR(commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, + pDescriptorWrites); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdPushDescriptorSetKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdPushDescriptorSetKHR(commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, - pDescriptorWrites, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdPushDescriptorSetKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdPushDescriptorSetKHR(commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, + pDescriptorWrites, record_obj); } } } @@ -11750,41 +10195,38 @@ VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer c VkPipelineLayout layout, uint32_t set, const void* pData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdPushDescriptorSetWithTemplateKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdPushDescriptorSetWithTemplateKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdPushDescriptorSetWithTemplateKHR(commandBuffer, descriptorUpdateTemplate, layout, - set, pData, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdPushDescriptorSetWithTemplateKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdPushDescriptorSetWithTemplateKHR(commandBuffer, descriptorUpdateTemplate, layout, set, + pData, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdPushDescriptorSetWithTemplateKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdPushDescriptorSetWithTemplateKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdPushDescriptorSetWithTemplateKHR(commandBuffer, descriptorUpdateTemplate, layout, set, pData, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdPushDescriptorSetWithTemplateKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdPushDescriptorSetWithTemplateKHR(commandBuffer, descriptorUpdateTemplate, layout, set, pData, + record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdPushDescriptorSetWithTemplateKHR(commandBuffer, descriptorUpdateTemplate, layout, set, pData); + device_dispatch->CmdPushDescriptorSetWithTemplateKHR(commandBuffer, descriptorUpdateTemplate, layout, set, pData); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdPushDescriptorSetWithTemplateKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdPushDescriptorSetWithTemplateKHR(commandBuffer, descriptorUpdateTemplate, layout, set, - pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdPushDescriptorSetWithTemplateKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdPushDescriptorSetWithTemplateKHR(commandBuffer, descriptorUpdateTemplate, layout, set, pData, + record_obj); } } } @@ -11795,42 +10237,39 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorUpdateTemplateKHR(VkDevice device VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateDescriptorUpdateTemplateKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCreateDescriptorUpdateTemplateKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateDescriptorUpdateTemplateKHR(device, pCreateInfo, pAllocator, - pDescriptorUpdateTemplate, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateDescriptorUpdateTemplateKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateDescriptorUpdateTemplateKHR(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateDescriptorUpdateTemplateKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCreateDescriptorUpdateTemplateKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateDescriptorUpdateTemplateKHR(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateDescriptorUpdateTemplateKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateDescriptorUpdateTemplateKHR(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateDescriptorUpdateTemplateKHR(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate); + result = device_dispatch->CreateDescriptorUpdateTemplateKHR(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCreateDescriptorUpdateTemplateKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateDescriptorUpdateTemplateKHR(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateDescriptorUpdateTemplateKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateDescriptorUpdateTemplateKHR(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate, + record_obj); } } return result; @@ -11840,38 +10279,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyDescriptorUpdateTemplateKHR(VkDevice device, V const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyDescriptorUpdateTemplateKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyDescriptorUpdateTemplateKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyDescriptorUpdateTemplateKHR(device, descriptorUpdateTemplate, pAllocator, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyDescriptorUpdateTemplateKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyDescriptorUpdateTemplateKHR(device, descriptorUpdateTemplate, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyDescriptorUpdateTemplateKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyDescriptorUpdateTemplateKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyDescriptorUpdateTemplateKHR(device, descriptorUpdateTemplate, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyDescriptorUpdateTemplateKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyDescriptorUpdateTemplateKHR(device, descriptorUpdateTemplate, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyDescriptorUpdateTemplateKHR(device, descriptorUpdateTemplate, pAllocator); + device_dispatch->DestroyDescriptorUpdateTemplateKHR(device, descriptorUpdateTemplate, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyDescriptorUpdateTemplateKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyDescriptorUpdateTemplateKHR(device, descriptorUpdateTemplate, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyDescriptorUpdateTemplateKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyDescriptorUpdateTemplateKHR(device, descriptorUpdateTemplate, pAllocator, record_obj); } } } @@ -11881,40 +10316,36 @@ VKAPI_ATTR void VKAPI_CALL UpdateDescriptorSetWithTemplateKHR(VkDevice device, V const void* pData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkUpdateDescriptorSetWithTemplateKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateUpdateDescriptorSetWithTemplateKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateUpdateDescriptorSetWithTemplateKHR(device, descriptorSet, descriptorUpdateTemplate, - pData, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateUpdateDescriptorSetWithTemplateKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateUpdateDescriptorSetWithTemplateKHR(device, descriptorSet, descriptorUpdateTemplate, pData, + error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkUpdateDescriptorSetWithTemplateKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordUpdateDescriptorSetWithTemplateKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordUpdateDescriptorSetWithTemplateKHR(device, descriptorSet, descriptorUpdateTemplate, pData, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordUpdateDescriptorSetWithTemplateKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordUpdateDescriptorSetWithTemplateKHR(device, descriptorSet, descriptorUpdateTemplate, pData, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchUpdateDescriptorSetWithTemplateKHR(device, descriptorSet, descriptorUpdateTemplate, pData); + device_dispatch->UpdateDescriptorSetWithTemplateKHR(device, descriptorSet, descriptorUpdateTemplate, pData); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordUpdateDescriptorSetWithTemplateKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordUpdateDescriptorSetWithTemplateKHR(device, descriptorSet, descriptorUpdateTemplate, pData, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordUpdateDescriptorSetWithTemplateKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordUpdateDescriptorSetWithTemplateKHR(device, descriptorSet, descriptorUpdateTemplate, pData, + record_obj); } } } @@ -11923,36 +10354,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass2KHR(VkDevice device, const VkRen const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateRenderPass2KHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateRenderPass2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateRenderPass2KHR(device, pCreateInfo, pAllocator, pRenderPass, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateRenderPass2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateRenderPass2KHR(device, pCreateInfo, pAllocator, pRenderPass, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateRenderPass2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateRenderPass2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateRenderPass2KHR(device, pCreateInfo, pAllocator, pRenderPass, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateRenderPass2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateRenderPass2KHR(device, pCreateInfo, pAllocator, pRenderPass, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateRenderPass2KHR(device, pCreateInfo, pAllocator, pRenderPass); + result = device_dispatch->CreateRenderPass2KHR(device, pCreateInfo, pAllocator, pRenderPass); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateRenderPass2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateRenderPass2KHR(device, pCreateInfo, pAllocator, pRenderPass, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateRenderPass2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateRenderPass2KHR(device, pCreateInfo, pAllocator, pRenderPass, record_obj); } } return result; @@ -11962,34 +10393,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBeginRenderPass2KHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBeginRenderPass2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBeginRenderPass2KHR(commandBuffer, pRenderPassBegin, pSubpassBeginInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBeginRenderPass2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBeginRenderPass2KHR(commandBuffer, pRenderPassBegin, pSubpassBeginInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBeginRenderPass2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBeginRenderPass2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBeginRenderPass2KHR(commandBuffer, pRenderPassBegin, pSubpassBeginInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBeginRenderPass2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBeginRenderPass2KHR(commandBuffer, pRenderPassBegin, pSubpassBeginInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBeginRenderPass2KHR(commandBuffer, pRenderPassBegin, pSubpassBeginInfo); + device_dispatch->CmdBeginRenderPass2KHR(commandBuffer, pRenderPassBegin, pSubpassBeginInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBeginRenderPass2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBeginRenderPass2KHR(commandBuffer, pRenderPassBegin, pSubpassBeginInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBeginRenderPass2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBeginRenderPass2KHR(commandBuffer, pRenderPassBegin, pSubpassBeginInfo, record_obj); } } } @@ -11998,34 +10429,34 @@ VKAPI_ATTR void VKAPI_CALL CmdNextSubpass2KHR(VkCommandBuffer commandBuffer, con const VkSubpassEndInfo* pSubpassEndInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdNextSubpass2KHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdNextSubpass2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdNextSubpass2KHR(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdNextSubpass2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdNextSubpass2KHR(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdNextSubpass2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdNextSubpass2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdNextSubpass2KHR(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdNextSubpass2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdNextSubpass2KHR(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdNextSubpass2KHR(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo); + device_dispatch->CmdNextSubpass2KHR(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdNextSubpass2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdNextSubpass2KHR(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdNextSubpass2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdNextSubpass2KHR(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo, record_obj); } } } @@ -12033,34 +10464,34 @@ VKAPI_ATTR void VKAPI_CALL CmdNextSubpass2KHR(VkCommandBuffer commandBuffer, con VKAPI_ATTR void VKAPI_CALL CmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdEndRenderPass2KHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdEndRenderPass2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdEndRenderPass2KHR(commandBuffer, pSubpassEndInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdEndRenderPass2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdEndRenderPass2KHR(commandBuffer, pSubpassEndInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdEndRenderPass2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdEndRenderPass2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdEndRenderPass2KHR(commandBuffer, pSubpassEndInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdEndRenderPass2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdEndRenderPass2KHR(commandBuffer, pSubpassEndInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdEndRenderPass2KHR(commandBuffer, pSubpassEndInfo); + device_dispatch->CmdEndRenderPass2KHR(commandBuffer, pSubpassEndInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdEndRenderPass2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdEndRenderPass2KHR(commandBuffer, pSubpassEndInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdEndRenderPass2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdEndRenderPass2KHR(commandBuffer, pSubpassEndInfo, record_obj); } } } @@ -12068,40 +10499,40 @@ VKAPI_ATTR void VKAPI_CALL CmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, c VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainStatusKHR(VkDevice device, VkSwapchainKHR swapchain) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetSwapchainStatusKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetSwapchainStatusKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetSwapchainStatusKHR(device, swapchain, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetSwapchainStatusKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetSwapchainStatusKHR(device, swapchain, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetSwapchainStatusKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetSwapchainStatusKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetSwapchainStatusKHR(device, swapchain, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetSwapchainStatusKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetSwapchainStatusKHR(device, swapchain, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetSwapchainStatusKHR(device, swapchain); + result = device_dispatch->GetSwapchainStatusKHR(device, swapchain); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetSwapchainStatusKHR]) { - auto lock = intercept->WriteLock(); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetSwapchainStatusKHR]) { + auto lock = vo->WriteLock(); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordGetSwapchainStatusKHR(device, swapchain, record_obj); + vo->PostCallRecordGetSwapchainStatusKHR(device, swapchain, record_obj); } } return result; @@ -12112,38 +10543,39 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalFencePropertiesKHR(VkPhysica VkExternalFenceProperties* pExternalFenceProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceExternalFencePropertiesKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceExternalFencePropertiesKHR(physicalDevice, pExternalFenceInfo, - pExternalFenceProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceExternalFencePropertiesKHR(physicalDevice, pExternalFenceInfo, + pExternalFenceProperties, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceExternalFencePropertiesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceExternalFencePropertiesKHR(physicalDevice, pExternalFenceInfo, - pExternalFenceProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceExternalFencePropertiesKHR(physicalDevice, pExternalFenceInfo, + pExternalFenceProperties, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceExternalFencePropertiesKHR(physicalDevice, pExternalFenceInfo, pExternalFenceProperties); + instance_dispatch->GetPhysicalDeviceExternalFencePropertiesKHR(physicalDevice, pExternalFenceInfo, + pExternalFenceProperties); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceExternalFencePropertiesKHR(physicalDevice, pExternalFenceInfo, - pExternalFenceProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceExternalFencePropertiesKHR(physicalDevice, pExternalFenceInfo, + pExternalFenceProperties, record_obj); } } } @@ -12153,37 +10585,36 @@ VKAPI_ATTR VkResult VKAPI_CALL ImportFenceWin32HandleKHR(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkImportFenceWin32HandleKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateImportFenceWin32HandleKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateImportFenceWin32HandleKHR(device, pImportFenceWin32HandleInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateImportFenceWin32HandleKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateImportFenceWin32HandleKHR(device, pImportFenceWin32HandleInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkImportFenceWin32HandleKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordImportFenceWin32HandleKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordImportFenceWin32HandleKHR(device, pImportFenceWin32HandleInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordImportFenceWin32HandleKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordImportFenceWin32HandleKHR(device, pImportFenceWin32HandleInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchImportFenceWin32HandleKHR(device, pImportFenceWin32HandleInfo); + result = device_dispatch->ImportFenceWin32HandleKHR(device, pImportFenceWin32HandleInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordImportFenceWin32HandleKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordImportFenceWin32HandleKHR(device, pImportFenceWin32HandleInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordImportFenceWin32HandleKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordImportFenceWin32HandleKHR(device, pImportFenceWin32HandleInfo, record_obj); } } return result; @@ -12193,36 +10624,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetFenceWin32HandleKHR(VkDevice device, const VkF HANDLE* pHandle) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetFenceWin32HandleKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetFenceWin32HandleKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetFenceWin32HandleKHR(device, pGetWin32HandleInfo, pHandle, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetFenceWin32HandleKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetFenceWin32HandleKHR(device, pGetWin32HandleInfo, pHandle, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetFenceWin32HandleKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetFenceWin32HandleKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetFenceWin32HandleKHR(device, pGetWin32HandleInfo, pHandle, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetFenceWin32HandleKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetFenceWin32HandleKHR(device, pGetWin32HandleInfo, pHandle, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetFenceWin32HandleKHR(device, pGetWin32HandleInfo, pHandle); + result = device_dispatch->GetFenceWin32HandleKHR(device, pGetWin32HandleInfo, pHandle); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetFenceWin32HandleKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetFenceWin32HandleKHR(device, pGetWin32HandleInfo, pHandle, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetFenceWin32HandleKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetFenceWin32HandleKHR(device, pGetWin32HandleInfo, pHandle, record_obj); } } return result; @@ -12232,36 +10663,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetFenceWin32HandleKHR(VkDevice device, const VkF VKAPI_ATTR VkResult VKAPI_CALL ImportFenceFdKHR(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkImportFenceFdKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateImportFenceFdKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateImportFenceFdKHR(device, pImportFenceFdInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateImportFenceFdKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateImportFenceFdKHR(device, pImportFenceFdInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkImportFenceFdKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordImportFenceFdKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordImportFenceFdKHR(device, pImportFenceFdInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordImportFenceFdKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordImportFenceFdKHR(device, pImportFenceFdInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchImportFenceFdKHR(device, pImportFenceFdInfo); + result = device_dispatch->ImportFenceFdKHR(device, pImportFenceFdInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordImportFenceFdKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordImportFenceFdKHR(device, pImportFenceFdInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordImportFenceFdKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordImportFenceFdKHR(device, pImportFenceFdInfo, record_obj); } } return result; @@ -12270,36 +10701,36 @@ VKAPI_ATTR VkResult VKAPI_CALL ImportFenceFdKHR(VkDevice device, const VkImportF VKAPI_ATTR VkResult VKAPI_CALL GetFenceFdKHR(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetFenceFdKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetFenceFdKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetFenceFdKHR(device, pGetFdInfo, pFd, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetFenceFdKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetFenceFdKHR(device, pGetFdInfo, pFd, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetFenceFdKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetFenceFdKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetFenceFdKHR(device, pGetFdInfo, pFd, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetFenceFdKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetFenceFdKHR(device, pGetFdInfo, pFd, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetFenceFdKHR(device, pGetFdInfo, pFd); + result = device_dispatch->GetFenceFdKHR(device, pGetFdInfo, pFd); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetFenceFdKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetFenceFdKHR(device, pGetFdInfo, pFd, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetFenceFdKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetFenceFdKHR(device, pGetFdInfo, pFd, record_obj); } } return result; @@ -12310,15 +10741,15 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDeviceQueueFamilyPerformanceQuer VkPerformanceCounterDescriptionKHR* pCounterDescriptions) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( physicalDevice, queueFamilyIndex, pCounterCount, pCounters, pCounterDescriptions, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } @@ -12326,24 +10757,24 @@ VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDeviceQueueFamilyPerformanceQuer RecordObject record_obj(vvl::Func::vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( physicalDevice, queueFamilyIndex, pCounterCount, pCounters, pCounterDescriptions, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + result = instance_dispatch->EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( physicalDevice, queueFamilyIndex, pCounterCount, pCounters, pCounterDescriptions); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( physicalDevice, queueFamilyIndex, pCounterCount, pCounters, pCounterDescriptions, record_obj); } } @@ -12354,15 +10785,15 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR VkPhysicalDevice physicalDevice, const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, uint32_t* pNumPasses) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( physicalDevice, pPerformanceQueryCreateInfo, pNumPasses, error_obj); if (skip) return; } @@ -12370,22 +10801,23 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( - physicalDevice, pPerformanceQueryCreateInfo, pNumPasses, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(physicalDevice, pPerformanceQueryCreateInfo, + pNumPasses, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(physicalDevice, pPerformanceQueryCreateInfo, pNumPasses); + instance_dispatch->GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(physicalDevice, pPerformanceQueryCreateInfo, + pNumPasses); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( - physicalDevice, pPerformanceQueryCreateInfo, pNumPasses, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(physicalDevice, pPerformanceQueryCreateInfo, + pNumPasses, record_obj); } } } @@ -12393,36 +10825,36 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR VKAPI_ATTR VkResult VKAPI_CALL AcquireProfilingLockKHR(VkDevice device, const VkAcquireProfilingLockInfoKHR* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkAcquireProfilingLockKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateAcquireProfilingLockKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateAcquireProfilingLockKHR(device, pInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateAcquireProfilingLockKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateAcquireProfilingLockKHR(device, pInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkAcquireProfilingLockKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordAcquireProfilingLockKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordAcquireProfilingLockKHR(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordAcquireProfilingLockKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordAcquireProfilingLockKHR(device, pInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchAcquireProfilingLockKHR(device, pInfo); + result = device_dispatch->AcquireProfilingLockKHR(device, pInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordAcquireProfilingLockKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordAcquireProfilingLockKHR(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordAcquireProfilingLockKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordAcquireProfilingLockKHR(device, pInfo, record_obj); } } return result; @@ -12431,34 +10863,34 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireProfilingLockKHR(VkDevice device, const Vk VKAPI_ATTR void VKAPI_CALL ReleaseProfilingLockKHR(VkDevice device) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkReleaseProfilingLockKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateReleaseProfilingLockKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateReleaseProfilingLockKHR(device, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateReleaseProfilingLockKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateReleaseProfilingLockKHR(device, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkReleaseProfilingLockKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordReleaseProfilingLockKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordReleaseProfilingLockKHR(device, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordReleaseProfilingLockKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordReleaseProfilingLockKHR(device, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchReleaseProfilingLockKHR(device); + device_dispatch->ReleaseProfilingLockKHR(device); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordReleaseProfilingLockKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordReleaseProfilingLockKHR(device, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordReleaseProfilingLockKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordReleaseProfilingLockKHR(device, record_obj); } } } @@ -12468,40 +10900,40 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysic VkSurfaceCapabilities2KHR* pSurfaceCapabilities) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceSurfaceCapabilities2KHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceSurfaceCapabilities2KHR(physicalDevice, pSurfaceInfo, - pSurfaceCapabilities, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceSurfaceCapabilities2KHR(physicalDevice, pSurfaceInfo, pSurfaceCapabilities, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceSurfaceCapabilities2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceSurfaceCapabilities2KHR(physicalDevice, pSurfaceInfo, pSurfaceCapabilities, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceSurfaceCapabilities2KHR(physicalDevice, pSurfaceInfo, pSurfaceCapabilities, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceSurfaceCapabilities2KHR(physicalDevice, pSurfaceInfo, pSurfaceCapabilities); + result = instance_dispatch->GetPhysicalDeviceSurfaceCapabilities2KHR(physicalDevice, pSurfaceInfo, pSurfaceCapabilities); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceSurfaceCapabilities2KHR(physicalDevice, pSurfaceInfo, pSurfaceCapabilities, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceSurfaceCapabilities2KHR(physicalDevice, pSurfaceInfo, pSurfaceCapabilities, + record_obj); } } return result; @@ -12513,40 +10945,41 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDev VkSurfaceFormat2KHR* pSurfaceFormats) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceSurfaceFormats2KHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceSurfaceFormats2KHR(physicalDevice, pSurfaceInfo, pSurfaceFormatCount, - pSurfaceFormats, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceSurfaceFormats2KHR(physicalDevice, pSurfaceInfo, pSurfaceFormatCount, + pSurfaceFormats, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceSurfaceFormats2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceSurfaceFormats2KHR(physicalDevice, pSurfaceInfo, pSurfaceFormatCount, - pSurfaceFormats, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceSurfaceFormats2KHR(physicalDevice, pSurfaceInfo, pSurfaceFormatCount, pSurfaceFormats, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceSurfaceFormats2KHR(physicalDevice, pSurfaceInfo, pSurfaceFormatCount, pSurfaceFormats); + result = instance_dispatch->GetPhysicalDeviceSurfaceFormats2KHR(physicalDevice, pSurfaceInfo, pSurfaceFormatCount, + pSurfaceFormats); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceSurfaceFormats2KHR(physicalDevice, pSurfaceInfo, pSurfaceFormatCount, - pSurfaceFormats, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceSurfaceFormats2KHR(physicalDevice, pSurfaceInfo, pSurfaceFormatCount, + pSurfaceFormats, record_obj); } } return result; @@ -12556,39 +10989,38 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayProperties2KHR(VkPhysical VkDisplayProperties2KHR* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceDisplayProperties2KHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceDisplayProperties2KHR(physicalDevice, pPropertyCount, pProperties, - error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateGetPhysicalDeviceDisplayProperties2KHR(physicalDevice, pPropertyCount, pProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceDisplayProperties2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceDisplayProperties2KHR(physicalDevice, pPropertyCount, pProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceDisplayProperties2KHR(physicalDevice, pPropertyCount, pProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceDisplayProperties2KHR(physicalDevice, pPropertyCount, pProperties); + result = instance_dispatch->GetPhysicalDeviceDisplayProperties2KHR(physicalDevice, pPropertyCount, pProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceDisplayProperties2KHR(physicalDevice, pPropertyCount, pProperties, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceDisplayProperties2KHR(physicalDevice, pPropertyCount, pProperties, record_obj); } } return result; @@ -12599,40 +11031,38 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPlaneProperties2KHR(VkPhy VkDisplayPlaneProperties2KHR* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceDisplayPlaneProperties2KHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceDisplayPlaneProperties2KHR(physicalDevice, pPropertyCount, - pProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceDisplayPlaneProperties2KHR(physicalDevice, pPropertyCount, pProperties, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceDisplayPlaneProperties2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceDisplayPlaneProperties2KHR(physicalDevice, pPropertyCount, pProperties, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceDisplayPlaneProperties2KHR(physicalDevice, pPropertyCount, pProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceDisplayPlaneProperties2KHR(physicalDevice, pPropertyCount, pProperties); + result = instance_dispatch->GetPhysicalDeviceDisplayPlaneProperties2KHR(physicalDevice, pPropertyCount, pProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceDisplayPlaneProperties2KHR(physicalDevice, pPropertyCount, pProperties, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceDisplayPlaneProperties2KHR(physicalDevice, pPropertyCount, pProperties, record_obj); } } return result; @@ -12642,38 +11072,38 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayModeProperties2KHR(VkPhysicalDevice phy uint32_t* pPropertyCount, VkDisplayModeProperties2KHR* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDisplayModeProperties2KHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDisplayModeProperties2KHR(physicalDevice, display, pPropertyCount, pProperties, - error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateGetDisplayModeProperties2KHR(physicalDevice, display, pPropertyCount, pProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetDisplayModeProperties2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDisplayModeProperties2KHR(physicalDevice, display, pPropertyCount, pProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDisplayModeProperties2KHR(physicalDevice, display, pPropertyCount, pProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetDisplayModeProperties2KHR(physicalDevice, display, pPropertyCount, pProperties); + result = instance_dispatch->GetDisplayModeProperties2KHR(physicalDevice, display, pPropertyCount, pProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDisplayModeProperties2KHR(physicalDevice, display, pPropertyCount, pProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDisplayModeProperties2KHR(physicalDevice, display, pPropertyCount, pProperties, record_obj); } } return result; @@ -12684,38 +11114,37 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneCapabilities2KHR(VkPhysicalDevice VkDisplayPlaneCapabilities2KHR* pCapabilities) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDisplayPlaneCapabilities2KHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDisplayPlaneCapabilities2KHR(physicalDevice, pDisplayPlaneInfo, pCapabilities, - error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDisplayPlaneCapabilities2KHR(physicalDevice, pDisplayPlaneInfo, pCapabilities, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetDisplayPlaneCapabilities2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDisplayPlaneCapabilities2KHR(physicalDevice, pDisplayPlaneInfo, pCapabilities, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDisplayPlaneCapabilities2KHR(physicalDevice, pDisplayPlaneInfo, pCapabilities, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetDisplayPlaneCapabilities2KHR(physicalDevice, pDisplayPlaneInfo, pCapabilities); + result = instance_dispatch->GetDisplayPlaneCapabilities2KHR(physicalDevice, pDisplayPlaneInfo, pCapabilities); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDisplayPlaneCapabilities2KHR(physicalDevice, pDisplayPlaneInfo, pCapabilities, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDisplayPlaneCapabilities2KHR(physicalDevice, pDisplayPlaneInfo, pCapabilities, record_obj); } } return result; @@ -12725,35 +11154,34 @@ VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements2KHR(VkDevice device, const VkMemoryRequirements2* pMemoryRequirements) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetImageMemoryRequirements2KHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetImageMemoryRequirements2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetImageMemoryRequirements2KHR(device, pInfo, pMemoryRequirements, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetImageMemoryRequirements2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetImageMemoryRequirements2KHR(device, pInfo, pMemoryRequirements, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetImageMemoryRequirements2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetImageMemoryRequirements2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetImageMemoryRequirements2KHR(device, pInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetImageMemoryRequirements2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetImageMemoryRequirements2KHR(device, pInfo, pMemoryRequirements, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetImageMemoryRequirements2KHR(device, pInfo, pMemoryRequirements); + device_dispatch->GetImageMemoryRequirements2KHR(device, pInfo, pMemoryRequirements); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetImageMemoryRequirements2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetImageMemoryRequirements2KHR(device, pInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetImageMemoryRequirements2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetImageMemoryRequirements2KHR(device, pInfo, pMemoryRequirements, record_obj); } } } @@ -12762,36 +11190,34 @@ VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements2KHR(VkDevice device, cons VkMemoryRequirements2* pMemoryRequirements) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetBufferMemoryRequirements2KHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetBufferMemoryRequirements2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetBufferMemoryRequirements2KHR(device, pInfo, pMemoryRequirements, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetBufferMemoryRequirements2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetBufferMemoryRequirements2KHR(device, pInfo, pMemoryRequirements, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetBufferMemoryRequirements2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetBufferMemoryRequirements2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetBufferMemoryRequirements2KHR(device, pInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetBufferMemoryRequirements2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetBufferMemoryRequirements2KHR(device, pInfo, pMemoryRequirements, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetBufferMemoryRequirements2KHR(device, pInfo, pMemoryRequirements); + device_dispatch->GetBufferMemoryRequirements2KHR(device, pInfo, pMemoryRequirements); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetBufferMemoryRequirements2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetBufferMemoryRequirements2KHR(device, pInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetBufferMemoryRequirements2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetBufferMemoryRequirements2KHR(device, pInfo, pMemoryRequirements, record_obj); } } } @@ -12801,40 +11227,38 @@ VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements2KHR(VkDevice device, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetImageSparseMemoryRequirements2KHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetImageSparseMemoryRequirements2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetImageSparseMemoryRequirements2KHR(device, pInfo, pSparseMemoryRequirementCount, - pSparseMemoryRequirements, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetImageSparseMemoryRequirements2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetImageSparseMemoryRequirements2KHR(device, pInfo, pSparseMemoryRequirementCount, + pSparseMemoryRequirements, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetImageSparseMemoryRequirements2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetImageSparseMemoryRequirements2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetImageSparseMemoryRequirements2KHR(device, pInfo, pSparseMemoryRequirementCount, - pSparseMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetImageSparseMemoryRequirements2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetImageSparseMemoryRequirements2KHR(device, pInfo, pSparseMemoryRequirementCount, + pSparseMemoryRequirements, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetImageSparseMemoryRequirements2KHR(device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); + device_dispatch->GetImageSparseMemoryRequirements2KHR(device, pInfo, pSparseMemoryRequirementCount, + pSparseMemoryRequirements); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetImageSparseMemoryRequirements2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetImageSparseMemoryRequirements2KHR(device, pInfo, pSparseMemoryRequirementCount, - pSparseMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetImageSparseMemoryRequirements2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetImageSparseMemoryRequirements2KHR(device, pInfo, pSparseMemoryRequirementCount, + pSparseMemoryRequirements, record_obj); } } } @@ -12845,39 +11269,37 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateSamplerYcbcrConversionKHR(VkDevice device, VkSamplerYcbcrConversion* pYcbcrConversion) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateSamplerYcbcrConversionKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCreateSamplerYcbcrConversionKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateSamplerYcbcrConversionKHR(device, pCreateInfo, pAllocator, pYcbcrConversion, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateSamplerYcbcrConversionKHR]) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateCreateSamplerYcbcrConversionKHR(device, pCreateInfo, pAllocator, pYcbcrConversion, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateSamplerYcbcrConversionKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateSamplerYcbcrConversionKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateSamplerYcbcrConversionKHR(device, pCreateInfo, pAllocator, pYcbcrConversion, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateSamplerYcbcrConversionKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateSamplerYcbcrConversionKHR(device, pCreateInfo, pAllocator, pYcbcrConversion, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateSamplerYcbcrConversionKHR(device, pCreateInfo, pAllocator, pYcbcrConversion); + result = device_dispatch->CreateSamplerYcbcrConversionKHR(device, pCreateInfo, pAllocator, pYcbcrConversion); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCreateSamplerYcbcrConversionKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateSamplerYcbcrConversionKHR(device, pCreateInfo, pAllocator, pYcbcrConversion, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateSamplerYcbcrConversionKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateSamplerYcbcrConversionKHR(device, pCreateInfo, pAllocator, pYcbcrConversion, record_obj); } } return result; @@ -12887,37 +11309,34 @@ VKAPI_ATTR void VKAPI_CALL DestroySamplerYcbcrConversionKHR(VkDevice device, VkS const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroySamplerYcbcrConversionKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateDestroySamplerYcbcrConversionKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroySamplerYcbcrConversionKHR(device, ycbcrConversion, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroySamplerYcbcrConversionKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroySamplerYcbcrConversionKHR(device, ycbcrConversion, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroySamplerYcbcrConversionKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordDestroySamplerYcbcrConversionKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroySamplerYcbcrConversionKHR(device, ycbcrConversion, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroySamplerYcbcrConversionKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroySamplerYcbcrConversionKHR(device, ycbcrConversion, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroySamplerYcbcrConversionKHR(device, ycbcrConversion, pAllocator); + device_dispatch->DestroySamplerYcbcrConversionKHR(device, ycbcrConversion, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordDestroySamplerYcbcrConversionKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroySamplerYcbcrConversionKHR(device, ycbcrConversion, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroySamplerYcbcrConversionKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroySamplerYcbcrConversionKHR(device, ycbcrConversion, pAllocator, record_obj); } } } @@ -12926,36 +11345,36 @@ VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory2KHR(VkDevice device, uint32_t bi const VkBindBufferMemoryInfo* pBindInfos) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkBindBufferMemory2KHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateBindBufferMemory2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateBindBufferMemory2KHR(device, bindInfoCount, pBindInfos, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateBindBufferMemory2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateBindBufferMemory2KHR(device, bindInfoCount, pBindInfos, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkBindBufferMemory2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordBindBufferMemory2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordBindBufferMemory2KHR(device, bindInfoCount, pBindInfos, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordBindBufferMemory2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordBindBufferMemory2KHR(device, bindInfoCount, pBindInfos, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchBindBufferMemory2KHR(device, bindInfoCount, pBindInfos); + result = device_dispatch->BindBufferMemory2KHR(device, bindInfoCount, pBindInfos); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordBindBufferMemory2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordBindBufferMemory2KHR(device, bindInfoCount, pBindInfos, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordBindBufferMemory2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordBindBufferMemory2KHR(device, bindInfoCount, pBindInfos, record_obj); } } return result; @@ -12965,36 +11384,36 @@ VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory2KHR(VkDevice device, uint32_t bin const VkBindImageMemoryInfo* pBindInfos) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkBindImageMemory2KHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateBindImageMemory2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateBindImageMemory2KHR(device, bindInfoCount, pBindInfos, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateBindImageMemory2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateBindImageMemory2KHR(device, bindInfoCount, pBindInfos, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkBindImageMemory2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordBindImageMemory2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordBindImageMemory2KHR(device, bindInfoCount, pBindInfos, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordBindImageMemory2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordBindImageMemory2KHR(device, bindInfoCount, pBindInfos, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchBindImageMemory2KHR(device, bindInfoCount, pBindInfos); + result = device_dispatch->BindImageMemory2KHR(device, bindInfoCount, pBindInfos); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordBindImageMemory2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordBindImageMemory2KHR(device, bindInfoCount, pBindInfos, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordBindImageMemory2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordBindImageMemory2KHR(device, bindInfoCount, pBindInfos, record_obj); } } return result; @@ -13004,37 +11423,34 @@ VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutSupportKHR(VkDevice device, con VkDescriptorSetLayoutSupport* pSupport) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDescriptorSetLayoutSupportKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDescriptorSetLayoutSupportKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDescriptorSetLayoutSupportKHR(device, pCreateInfo, pSupport, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDescriptorSetLayoutSupportKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDescriptorSetLayoutSupportKHR(device, pCreateInfo, pSupport, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetDescriptorSetLayoutSupportKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDescriptorSetLayoutSupportKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDescriptorSetLayoutSupportKHR(device, pCreateInfo, pSupport, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDescriptorSetLayoutSupportKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDescriptorSetLayoutSupportKHR(device, pCreateInfo, pSupport, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetDescriptorSetLayoutSupportKHR(device, pCreateInfo, pSupport); + device_dispatch->GetDescriptorSetLayoutSupportKHR(device, pCreateInfo, pSupport); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDescriptorSetLayoutSupportKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDescriptorSetLayoutSupportKHR(device, pCreateInfo, pSupport, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDescriptorSetLayoutSupportKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDescriptorSetLayoutSupportKHR(device, pCreateInfo, pSupport, record_obj); } } } @@ -13044,37 +11460,38 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer uint32_t stride) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDrawIndirectCountKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDrawIndirectCountKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDrawIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDrawIndirectCountKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDrawIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDrawIndirectCountKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDrawIndirectCountKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDrawIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDrawIndirectCountKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDrawIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, + stride, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDrawIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); + device_dispatch->CmdDrawIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, + stride); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDrawIndirectCountKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDrawIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDrawIndirectCountKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDrawIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, + stride, record_obj); } } } @@ -13084,39 +11501,39 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCountKHR(VkCommandBuffer comman uint32_t maxDrawCount, uint32_t stride) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDrawIndexedIndirectCountKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDrawIndexedIndirectCountKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDrawIndexedIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, - countBufferOffset, maxDrawCount, stride, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDrawIndexedIndirectCountKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDrawIndexedIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDrawIndexedIndirectCountKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDrawIndexedIndirectCountKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDrawIndexedIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDrawIndexedIndirectCountKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDrawIndexedIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDrawIndexedIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); + device_dispatch->CmdDrawIndexedIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, + stride); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDrawIndexedIndirectCountKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDrawIndexedIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDrawIndexedIndirectCountKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDrawIndexedIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride, record_obj); } } } @@ -13124,41 +11541,40 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCountKHR(VkCommandBuffer comman VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreCounterValueKHR(VkDevice device, VkSemaphore semaphore, uint64_t* pValue) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetSemaphoreCounterValueKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetSemaphoreCounterValueKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetSemaphoreCounterValueKHR(device, semaphore, pValue, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetSemaphoreCounterValueKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetSemaphoreCounterValueKHR(device, semaphore, pValue, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetSemaphoreCounterValueKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetSemaphoreCounterValueKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetSemaphoreCounterValueKHR(device, semaphore, pValue, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetSemaphoreCounterValueKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetSemaphoreCounterValueKHR(device, semaphore, pValue, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetSemaphoreCounterValueKHR(device, semaphore, pValue); + result = device_dispatch->GetSemaphoreCounterValueKHR(device, semaphore, pValue); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetSemaphoreCounterValueKHR]) { - ValidationObject::BlockingOperationGuard lock(intercept); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetSemaphoreCounterValueKHR]) { + ValidationObject::BlockingOperationGuard lock(vo); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordGetSemaphoreCounterValueKHR(device, semaphore, pValue, record_obj); + vo->PostCallRecordGetSemaphoreCounterValueKHR(device, semaphore, pValue, record_obj); } } return result; @@ -13167,40 +11583,40 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreCounterValueKHR(VkDevice device, VkSe VKAPI_ATTR VkResult VKAPI_CALL WaitSemaphoresKHR(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkWaitSemaphoresKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateWaitSemaphoresKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateWaitSemaphoresKHR(device, pWaitInfo, timeout, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateWaitSemaphoresKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateWaitSemaphoresKHR(device, pWaitInfo, timeout, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkWaitSemaphoresKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordWaitSemaphoresKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordWaitSemaphoresKHR(device, pWaitInfo, timeout, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordWaitSemaphoresKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordWaitSemaphoresKHR(device, pWaitInfo, timeout, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchWaitSemaphoresKHR(device, pWaitInfo, timeout); + result = device_dispatch->WaitSemaphoresKHR(device, pWaitInfo, timeout); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordWaitSemaphoresKHR]) { - ValidationObject::BlockingOperationGuard lock(intercept); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordWaitSemaphoresKHR]) { + ValidationObject::BlockingOperationGuard lock(vo); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordWaitSemaphoresKHR(device, pWaitInfo, timeout, record_obj); + vo->PostCallRecordWaitSemaphoresKHR(device, pWaitInfo, timeout, record_obj); } } return result; @@ -13209,36 +11625,36 @@ VKAPI_ATTR VkResult VKAPI_CALL WaitSemaphoresKHR(VkDevice device, const VkSemaph VKAPI_ATTR VkResult VKAPI_CALL SignalSemaphoreKHR(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkSignalSemaphoreKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateSignalSemaphoreKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateSignalSemaphoreKHR(device, pSignalInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateSignalSemaphoreKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateSignalSemaphoreKHR(device, pSignalInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkSignalSemaphoreKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordSignalSemaphoreKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordSignalSemaphoreKHR(device, pSignalInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordSignalSemaphoreKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordSignalSemaphoreKHR(device, pSignalInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchSignalSemaphoreKHR(device, pSignalInfo); + result = device_dispatch->SignalSemaphoreKHR(device, pSignalInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordSignalSemaphoreKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordSignalSemaphoreKHR(device, pSignalInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordSignalSemaphoreKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordSignalSemaphoreKHR(device, pSignalInfo, record_obj); } } return result; @@ -13249,40 +11665,41 @@ GetPhysicalDeviceFragmentShadingRatesKHR(VkPhysicalDevice physicalDevice, uint32 VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceFragmentShadingRatesKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceFragmentShadingRatesKHR(physicalDevice, pFragmentShadingRateCount, - pFragmentShadingRates, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceFragmentShadingRatesKHR(physicalDevice, pFragmentShadingRateCount, + pFragmentShadingRates, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceFragmentShadingRatesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceFragmentShadingRatesKHR(physicalDevice, pFragmentShadingRateCount, - pFragmentShadingRates, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceFragmentShadingRatesKHR(physicalDevice, pFragmentShadingRateCount, + pFragmentShadingRates, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceFragmentShadingRatesKHR(physicalDevice, pFragmentShadingRateCount, pFragmentShadingRates); + result = instance_dispatch->GetPhysicalDeviceFragmentShadingRatesKHR(physicalDevice, pFragmentShadingRateCount, + pFragmentShadingRates); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceFragmentShadingRatesKHR(physicalDevice, pFragmentShadingRateCount, - pFragmentShadingRates, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceFragmentShadingRatesKHR(physicalDevice, pFragmentShadingRateCount, + pFragmentShadingRates, record_obj); } } return result; @@ -13292,36 +11709,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetFragmentShadingRateKHR(VkCommandBuffer commandB const VkFragmentShadingRateCombinerOpKHR combinerOps[2]) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetFragmentShadingRateKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetFragmentShadingRateKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetFragmentShadingRateKHR(commandBuffer, pFragmentSize, combinerOps, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetFragmentShadingRateKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetFragmentShadingRateKHR(commandBuffer, pFragmentSize, combinerOps, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetFragmentShadingRateKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetFragmentShadingRateKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetFragmentShadingRateKHR(commandBuffer, pFragmentSize, combinerOps, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetFragmentShadingRateKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetFragmentShadingRateKHR(commandBuffer, pFragmentSize, combinerOps, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetFragmentShadingRateKHR(commandBuffer, pFragmentSize, combinerOps); + device_dispatch->CmdSetFragmentShadingRateKHR(commandBuffer, pFragmentSize, combinerOps); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetFragmentShadingRateKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetFragmentShadingRateKHR(commandBuffer, pFragmentSize, combinerOps, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetFragmentShadingRateKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetFragmentShadingRateKHR(commandBuffer, pFragmentSize, combinerOps, record_obj); } } } @@ -13330,38 +11746,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRenderingAttachmentLocationsKHR(VkCommandBuffer const VkRenderingAttachmentLocationInfoKHR* pLocationInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetRenderingAttachmentLocationsKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetRenderingAttachmentLocationsKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetRenderingAttachmentLocationsKHR(commandBuffer, pLocationInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetRenderingAttachmentLocationsKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetRenderingAttachmentLocationsKHR(commandBuffer, pLocationInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetRenderingAttachmentLocationsKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetRenderingAttachmentLocationsKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetRenderingAttachmentLocationsKHR(commandBuffer, pLocationInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetRenderingAttachmentLocationsKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetRenderingAttachmentLocationsKHR(commandBuffer, pLocationInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetRenderingAttachmentLocationsKHR(commandBuffer, pLocationInfo); + device_dispatch->CmdSetRenderingAttachmentLocationsKHR(commandBuffer, pLocationInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetRenderingAttachmentLocationsKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetRenderingAttachmentLocationsKHR(commandBuffer, pLocationInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetRenderingAttachmentLocationsKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetRenderingAttachmentLocationsKHR(commandBuffer, pLocationInfo, record_obj); } } } @@ -13370,39 +11783,37 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRenderingInputAttachmentIndicesKHR( VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfoKHR* pInputAttachmentIndexInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetRenderingInputAttachmentIndicesKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetRenderingInputAttachmentIndicesKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetRenderingInputAttachmentIndicesKHR(commandBuffer, pInputAttachmentIndexInfo, - error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetRenderingInputAttachmentIndicesKHR]) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateCmdSetRenderingInputAttachmentIndicesKHR(commandBuffer, pInputAttachmentIndexInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetRenderingInputAttachmentIndicesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetRenderingInputAttachmentIndicesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetRenderingInputAttachmentIndicesKHR(commandBuffer, pInputAttachmentIndexInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetRenderingInputAttachmentIndicesKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetRenderingInputAttachmentIndicesKHR(commandBuffer, pInputAttachmentIndexInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetRenderingInputAttachmentIndicesKHR(commandBuffer, pInputAttachmentIndexInfo); + device_dispatch->CmdSetRenderingInputAttachmentIndicesKHR(commandBuffer, pInputAttachmentIndexInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetRenderingInputAttachmentIndicesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetRenderingInputAttachmentIndicesKHR(commandBuffer, pInputAttachmentIndexInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetRenderingInputAttachmentIndicesKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetRenderingInputAttachmentIndicesKHR(commandBuffer, pInputAttachmentIndexInfo, record_obj); } } } @@ -13410,40 +11821,40 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRenderingInputAttachmentIndicesKHR( VKAPI_ATTR VkResult VKAPI_CALL WaitForPresentKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t presentId, uint64_t timeout) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkWaitForPresentKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateWaitForPresentKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateWaitForPresentKHR(device, swapchain, presentId, timeout, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateWaitForPresentKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateWaitForPresentKHR(device, swapchain, presentId, timeout, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkWaitForPresentKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordWaitForPresentKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordWaitForPresentKHR(device, swapchain, presentId, timeout, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordWaitForPresentKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordWaitForPresentKHR(device, swapchain, presentId, timeout, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchWaitForPresentKHR(device, swapchain, presentId, timeout); + result = device_dispatch->WaitForPresentKHR(device, swapchain, presentId, timeout); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordWaitForPresentKHR]) { - auto lock = intercept->WriteLock(); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordWaitForPresentKHR]) { + auto lock = vo->WriteLock(); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordWaitForPresentKHR(device, swapchain, presentId, timeout, record_obj); + vo->PostCallRecordWaitForPresentKHR(device, swapchain, presentId, timeout, record_obj); } } return result; @@ -13452,37 +11863,36 @@ VKAPI_ATTR VkResult VKAPI_CALL WaitForPresentKHR(VkDevice device, VkSwapchainKHR VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetBufferDeviceAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetBufferDeviceAddressKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetBufferDeviceAddressKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetBufferDeviceAddressKHR(device, pInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetBufferDeviceAddressKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetBufferDeviceAddressKHR(device, pInfo, error_obj); if (skip) return 0; } } RecordObject record_obj(vvl::Func::vkGetBufferDeviceAddressKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetBufferDeviceAddressKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetBufferDeviceAddressKHR(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetBufferDeviceAddressKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetBufferDeviceAddressKHR(device, pInfo, record_obj); } } VkDeviceAddress result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetBufferDeviceAddressKHR(device, pInfo); + result = device_dispatch->GetBufferDeviceAddressKHR(device, pInfo); } record_obj.device_address = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetBufferDeviceAddressKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetBufferDeviceAddressKHR(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetBufferDeviceAddressKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetBufferDeviceAddressKHR(device, pInfo, record_obj); } } return result; @@ -13491,38 +11901,35 @@ VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetBufferDeviceAddressKHR(VkDevice device, VKAPI_ATTR uint64_t VKAPI_CALL GetBufferOpaqueCaptureAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetBufferOpaqueCaptureAddressKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetBufferOpaqueCaptureAddressKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetBufferOpaqueCaptureAddressKHR(device, pInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetBufferOpaqueCaptureAddressKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetBufferOpaqueCaptureAddressKHR(device, pInfo, error_obj); if (skip) return 0; } } RecordObject record_obj(vvl::Func::vkGetBufferOpaqueCaptureAddressKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetBufferOpaqueCaptureAddressKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetBufferOpaqueCaptureAddressKHR(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetBufferOpaqueCaptureAddressKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetBufferOpaqueCaptureAddressKHR(device, pInfo, record_obj); } } uint64_t result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetBufferOpaqueCaptureAddressKHR(device, pInfo); + result = device_dispatch->GetBufferOpaqueCaptureAddressKHR(device, pInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetBufferOpaqueCaptureAddressKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetBufferOpaqueCaptureAddressKHR(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetBufferOpaqueCaptureAddressKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetBufferOpaqueCaptureAddressKHR(device, pInfo, record_obj); } } return result; @@ -13532,38 +11939,36 @@ VKAPI_ATTR uint64_t VKAPI_CALL GetDeviceMemoryOpaqueCaptureAddressKHR(VkDevice d const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeviceMemoryOpaqueCaptureAddressKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeviceMemoryOpaqueCaptureAddressKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDeviceMemoryOpaqueCaptureAddressKHR(device, pInfo, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeviceMemoryOpaqueCaptureAddressKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDeviceMemoryOpaqueCaptureAddressKHR(device, pInfo, error_obj); if (skip) return 0; } } RecordObject record_obj(vvl::Func::vkGetDeviceMemoryOpaqueCaptureAddressKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeviceMemoryOpaqueCaptureAddressKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeviceMemoryOpaqueCaptureAddressKHR(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeviceMemoryOpaqueCaptureAddressKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeviceMemoryOpaqueCaptureAddressKHR(device, pInfo, record_obj); } } uint64_t result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetDeviceMemoryOpaqueCaptureAddressKHR(device, pInfo); + result = device_dispatch->GetDeviceMemoryOpaqueCaptureAddressKHR(device, pInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeviceMemoryOpaqueCaptureAddressKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeviceMemoryOpaqueCaptureAddressKHR(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeviceMemoryOpaqueCaptureAddressKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeviceMemoryOpaqueCaptureAddressKHR(device, pInfo, record_obj); } } return result; @@ -13573,37 +11978,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDeferredOperationKHR(VkDevice device, const VkDeferredOperationKHR* pDeferredOperation) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateDeferredOperationKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCreateDeferredOperationKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateDeferredOperationKHR(device, pAllocator, pDeferredOperation, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateDeferredOperationKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateDeferredOperationKHR(device, pAllocator, pDeferredOperation, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateDeferredOperationKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateDeferredOperationKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateDeferredOperationKHR(device, pAllocator, pDeferredOperation, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateDeferredOperationKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateDeferredOperationKHR(device, pAllocator, pDeferredOperation, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateDeferredOperationKHR(device, pAllocator, pDeferredOperation); + result = device_dispatch->CreateDeferredOperationKHR(device, pAllocator, pDeferredOperation); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateDeferredOperationKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateDeferredOperationKHR(device, pAllocator, pDeferredOperation, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateDeferredOperationKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateDeferredOperationKHR(device, pAllocator, pDeferredOperation, record_obj); } } return result; @@ -13613,35 +12017,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyDeferredOperationKHR(VkDevice device, VkDeferr const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyDeferredOperationKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyDeferredOperationKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyDeferredOperationKHR(device, operation, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyDeferredOperationKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyDeferredOperationKHR(device, operation, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyDeferredOperationKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyDeferredOperationKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyDeferredOperationKHR(device, operation, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyDeferredOperationKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyDeferredOperationKHR(device, operation, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyDeferredOperationKHR(device, operation, pAllocator); + device_dispatch->DestroyDeferredOperationKHR(device, operation, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyDeferredOperationKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyDeferredOperationKHR(device, operation, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyDeferredOperationKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyDeferredOperationKHR(device, operation, pAllocator, record_obj); } } } @@ -13649,38 +12052,35 @@ VKAPI_ATTR void VKAPI_CALL DestroyDeferredOperationKHR(VkDevice device, VkDeferr VKAPI_ATTR uint32_t VKAPI_CALL GetDeferredOperationMaxConcurrencyKHR(VkDevice device, VkDeferredOperationKHR operation) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeferredOperationMaxConcurrencyKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeferredOperationMaxConcurrencyKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDeferredOperationMaxConcurrencyKHR(device, operation, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeferredOperationMaxConcurrencyKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDeferredOperationMaxConcurrencyKHR(device, operation, error_obj); if (skip) return 0; } } RecordObject record_obj(vvl::Func::vkGetDeferredOperationMaxConcurrencyKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeferredOperationMaxConcurrencyKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeferredOperationMaxConcurrencyKHR(device, operation, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeferredOperationMaxConcurrencyKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeferredOperationMaxConcurrencyKHR(device, operation, record_obj); } } uint32_t result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetDeferredOperationMaxConcurrencyKHR(device, operation); + result = device_dispatch->GetDeferredOperationMaxConcurrencyKHR(device, operation); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeferredOperationMaxConcurrencyKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeferredOperationMaxConcurrencyKHR(device, operation, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeferredOperationMaxConcurrencyKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeferredOperationMaxConcurrencyKHR(device, operation, record_obj); } } return result; @@ -13689,37 +12089,36 @@ VKAPI_ATTR uint32_t VKAPI_CALL GetDeferredOperationMaxConcurrencyKHR(VkDevice de VKAPI_ATTR VkResult VKAPI_CALL GetDeferredOperationResultKHR(VkDevice device, VkDeferredOperationKHR operation) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeferredOperationResultKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeferredOperationResultKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDeferredOperationResultKHR(device, operation, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeferredOperationResultKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDeferredOperationResultKHR(device, operation, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetDeferredOperationResultKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeferredOperationResultKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeferredOperationResultKHR(device, operation, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeferredOperationResultKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeferredOperationResultKHR(device, operation, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetDeferredOperationResultKHR(device, operation); + result = device_dispatch->GetDeferredOperationResultKHR(device, operation); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeferredOperationResultKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeferredOperationResultKHR(device, operation, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeferredOperationResultKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeferredOperationResultKHR(device, operation, record_obj); } } return result; @@ -13728,37 +12127,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDeferredOperationResultKHR(VkDevice device, Vk VKAPI_ATTR VkResult VKAPI_CALL DeferredOperationJoinKHR(VkDevice device, VkDeferredOperationKHR operation) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDeferredOperationJoinKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateDeferredOperationJoinKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDeferredOperationJoinKHR(device, operation, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDeferredOperationJoinKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDeferredOperationJoinKHR(device, operation, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkDeferredOperationJoinKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDeferredOperationJoinKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDeferredOperationJoinKHR(device, operation, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDeferredOperationJoinKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDeferredOperationJoinKHR(device, operation, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchDeferredOperationJoinKHR(device, operation); + result = device_dispatch->DeferredOperationJoinKHR(device, operation); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDeferredOperationJoinKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDeferredOperationJoinKHR(device, operation, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDeferredOperationJoinKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDeferredOperationJoinKHR(device, operation, record_obj); } } return result; @@ -13769,42 +12167,37 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutablePropertiesKHR(VkDevice devic VkPipelineExecutablePropertiesKHR* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPipelineExecutablePropertiesKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetPipelineExecutablePropertiesKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPipelineExecutablePropertiesKHR(device, pPipelineInfo, pExecutableCount, - pProperties, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetPipelineExecutablePropertiesKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPipelineExecutablePropertiesKHR(device, pPipelineInfo, pExecutableCount, pProperties, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPipelineExecutablePropertiesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetPipelineExecutablePropertiesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPipelineExecutablePropertiesKHR(device, pPipelineInfo, pExecutableCount, pProperties, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetPipelineExecutablePropertiesKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPipelineExecutablePropertiesKHR(device, pPipelineInfo, pExecutableCount, pProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPipelineExecutablePropertiesKHR(device, pPipelineInfo, pExecutableCount, pProperties); + result = device_dispatch->GetPipelineExecutablePropertiesKHR(device, pPipelineInfo, pExecutableCount, pProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetPipelineExecutablePropertiesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPipelineExecutablePropertiesKHR(device, pPipelineInfo, pExecutableCount, pProperties, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetPipelineExecutablePropertiesKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPipelineExecutablePropertiesKHR(device, pPipelineInfo, pExecutableCount, pProperties, record_obj); } } return result; @@ -13816,42 +12209,37 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutableStatisticsKHR(VkDevice devic VkPipelineExecutableStatisticKHR* pStatistics) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPipelineExecutableStatisticsKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetPipelineExecutableStatisticsKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPipelineExecutableStatisticsKHR(device, pExecutableInfo, pStatisticCount, - pStatistics, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetPipelineExecutableStatisticsKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPipelineExecutableStatisticsKHR(device, pExecutableInfo, pStatisticCount, pStatistics, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPipelineExecutableStatisticsKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetPipelineExecutableStatisticsKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPipelineExecutableStatisticsKHR(device, pExecutableInfo, pStatisticCount, pStatistics, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetPipelineExecutableStatisticsKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPipelineExecutableStatisticsKHR(device, pExecutableInfo, pStatisticCount, pStatistics, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPipelineExecutableStatisticsKHR(device, pExecutableInfo, pStatisticCount, pStatistics); + result = device_dispatch->GetPipelineExecutableStatisticsKHR(device, pExecutableInfo, pStatisticCount, pStatistics); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetPipelineExecutableStatisticsKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPipelineExecutableStatisticsKHR(device, pExecutableInfo, pStatisticCount, pStatistics, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetPipelineExecutableStatisticsKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPipelineExecutableStatisticsKHR(device, pExecutableInfo, pStatisticCount, pStatistics, record_obj); } } return result; @@ -13862,16 +12250,16 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutableInternalRepresentationsKHR( VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPipelineExecutableInternalRepresentationsKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetPipelineExecutableInternalRepresentationsKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPipelineExecutableInternalRepresentationsKHR( + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetPipelineExecutableInternalRepresentationsKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPipelineExecutableInternalRepresentationsKHR( device, pExecutableInfo, pInternalRepresentationCount, pInternalRepresentations, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } @@ -13879,27 +12267,27 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutableInternalRepresentationsKHR( RecordObject record_obj(vvl::Func::vkGetPipelineExecutableInternalRepresentationsKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetPipelineExecutableInternalRepresentationsKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPipelineExecutableInternalRepresentationsKHR( - device, pExecutableInfo, pInternalRepresentationCount, pInternalRepresentations, record_obj); + for (auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetPipelineExecutableInternalRepresentationsKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPipelineExecutableInternalRepresentationsKHR(device, pExecutableInfo, pInternalRepresentationCount, + pInternalRepresentations, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPipelineExecutableInternalRepresentationsKHR(device, pExecutableInfo, pInternalRepresentationCount, - pInternalRepresentations); + result = device_dispatch->GetPipelineExecutableInternalRepresentationsKHR( + device, pExecutableInfo, pInternalRepresentationCount, pInternalRepresentations); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetPipelineExecutableInternalRepresentationsKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPipelineExecutableInternalRepresentationsKHR( - device, pExecutableInfo, pInternalRepresentationCount, pInternalRepresentations, record_obj); + for (auto* vo : + device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetPipelineExecutableInternalRepresentationsKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPipelineExecutableInternalRepresentationsKHR(device, pExecutableInfo, pInternalRepresentationCount, + pInternalRepresentations, record_obj); } } return result; @@ -13908,36 +12296,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutableInternalRepresentationsKHR( VKAPI_ATTR VkResult VKAPI_CALL MapMemory2KHR(VkDevice device, const VkMemoryMapInfoKHR* pMemoryMapInfo, void** ppData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkMapMemory2KHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateMapMemory2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateMapMemory2KHR(device, pMemoryMapInfo, ppData, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateMapMemory2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateMapMemory2KHR(device, pMemoryMapInfo, ppData, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkMapMemory2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordMapMemory2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordMapMemory2KHR(device, pMemoryMapInfo, ppData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordMapMemory2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordMapMemory2KHR(device, pMemoryMapInfo, ppData, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchMapMemory2KHR(device, pMemoryMapInfo, ppData); + result = device_dispatch->MapMemory2KHR(device, pMemoryMapInfo, ppData); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordMapMemory2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordMapMemory2KHR(device, pMemoryMapInfo, ppData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordMapMemory2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordMapMemory2KHR(device, pMemoryMapInfo, ppData, record_obj); } } return result; @@ -13946,36 +12334,36 @@ VKAPI_ATTR VkResult VKAPI_CALL MapMemory2KHR(VkDevice device, const VkMemoryMapI VKAPI_ATTR VkResult VKAPI_CALL UnmapMemory2KHR(VkDevice device, const VkMemoryUnmapInfoKHR* pMemoryUnmapInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkUnmapMemory2KHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateUnmapMemory2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateUnmapMemory2KHR(device, pMemoryUnmapInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateUnmapMemory2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateUnmapMemory2KHR(device, pMemoryUnmapInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkUnmapMemory2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordUnmapMemory2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordUnmapMemory2KHR(device, pMemoryUnmapInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordUnmapMemory2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordUnmapMemory2KHR(device, pMemoryUnmapInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchUnmapMemory2KHR(device, pMemoryUnmapInfo); + result = device_dispatch->UnmapMemory2KHR(device, pMemoryUnmapInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordUnmapMemory2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordUnmapMemory2KHR(device, pMemoryUnmapInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordUnmapMemory2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordUnmapMemory2KHR(device, pMemoryUnmapInfo, record_obj); } } return result; @@ -13986,41 +12374,41 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceVideoEncodeQualityLevelPropertie VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( - physicalDevice, pQualityLevelInfo, pQualityLevelProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(physicalDevice, pQualityLevelInfo, + pQualityLevelProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(physicalDevice, pQualityLevelInfo, - pQualityLevelProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(physicalDevice, pQualityLevelInfo, + pQualityLevelProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(physicalDevice, pQualityLevelInfo, - pQualityLevelProperties); + result = instance_dispatch->GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(physicalDevice, pQualityLevelInfo, + pQualityLevelProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(physicalDevice, pQualityLevelInfo, - pQualityLevelProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(physicalDevice, pQualityLevelInfo, + pQualityLevelProperties, record_obj); } } return result; @@ -14031,42 +12419,40 @@ GetEncodedVideoSessionParametersKHR(VkDevice device, const VkVideoEncodeSessionP VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, size_t* pDataSize, void* pData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetEncodedVideoSessionParametersKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetEncodedVideoSessionParametersKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetEncodedVideoSessionParametersKHR(device, pVideoSessionParametersInfo, - pFeedbackInfo, pDataSize, pData, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetEncodedVideoSessionParametersKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetEncodedVideoSessionParametersKHR(device, pVideoSessionParametersInfo, pFeedbackInfo, + pDataSize, pData, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetEncodedVideoSessionParametersKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetEncodedVideoSessionParametersKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetEncodedVideoSessionParametersKHR(device, pVideoSessionParametersInfo, pFeedbackInfo, - pDataSize, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetEncodedVideoSessionParametersKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetEncodedVideoSessionParametersKHR(device, pVideoSessionParametersInfo, pFeedbackInfo, pDataSize, + pData, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetEncodedVideoSessionParametersKHR(device, pVideoSessionParametersInfo, pFeedbackInfo, pDataSize, pData); + result = device_dispatch->GetEncodedVideoSessionParametersKHR(device, pVideoSessionParametersInfo, pFeedbackInfo, pDataSize, + pData); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetEncodedVideoSessionParametersKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetEncodedVideoSessionParametersKHR(device, pVideoSessionParametersInfo, pFeedbackInfo, - pDataSize, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetEncodedVideoSessionParametersKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetEncodedVideoSessionParametersKHR(device, pVideoSessionParametersInfo, pFeedbackInfo, pDataSize, + pData, record_obj); } } return result; @@ -14075,34 +12461,34 @@ GetEncodedVideoSessionParametersKHR(VkDevice device, const VkVideoEncodeSessionP VKAPI_ATTR void VKAPI_CALL CmdEncodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdEncodeVideoKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdEncodeVideoKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdEncodeVideoKHR(commandBuffer, pEncodeInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdEncodeVideoKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdEncodeVideoKHR(commandBuffer, pEncodeInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdEncodeVideoKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdEncodeVideoKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdEncodeVideoKHR(commandBuffer, pEncodeInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdEncodeVideoKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdEncodeVideoKHR(commandBuffer, pEncodeInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdEncodeVideoKHR(commandBuffer, pEncodeInfo); + device_dispatch->CmdEncodeVideoKHR(commandBuffer, pEncodeInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdEncodeVideoKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdEncodeVideoKHR(commandBuffer, pEncodeInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdEncodeVideoKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdEncodeVideoKHR(commandBuffer, pEncodeInfo, record_obj); } } } @@ -14110,34 +12496,34 @@ VKAPI_ATTR void VKAPI_CALL CmdEncodeVideoKHR(VkCommandBuffer commandBuffer, cons VKAPI_ATTR void VKAPI_CALL CmdSetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetEvent2KHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetEvent2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetEvent2KHR(commandBuffer, event, pDependencyInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetEvent2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetEvent2KHR(commandBuffer, event, pDependencyInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetEvent2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetEvent2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetEvent2KHR(commandBuffer, event, pDependencyInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetEvent2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetEvent2KHR(commandBuffer, event, pDependencyInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetEvent2KHR(commandBuffer, event, pDependencyInfo); + device_dispatch->CmdSetEvent2KHR(commandBuffer, event, pDependencyInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetEvent2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetEvent2KHR(commandBuffer, event, pDependencyInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetEvent2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetEvent2KHR(commandBuffer, event, pDependencyInfo, record_obj); } } } @@ -14145,34 +12531,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetEvent2KHR(VkCommandBuffer commandBuffer, VkEven VKAPI_ATTR void VKAPI_CALL CmdResetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdResetEvent2KHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdResetEvent2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdResetEvent2KHR(commandBuffer, event, stageMask, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdResetEvent2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdResetEvent2KHR(commandBuffer, event, stageMask, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdResetEvent2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdResetEvent2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdResetEvent2KHR(commandBuffer, event, stageMask, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdResetEvent2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdResetEvent2KHR(commandBuffer, event, stageMask, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdResetEvent2KHR(commandBuffer, event, stageMask); + device_dispatch->CmdResetEvent2KHR(commandBuffer, event, stageMask); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdResetEvent2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdResetEvent2KHR(commandBuffer, event, stageMask, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdResetEvent2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdResetEvent2KHR(commandBuffer, event, stageMask, record_obj); } } } @@ -14181,34 +12567,34 @@ VKAPI_ATTR void VKAPI_CALL CmdWaitEvents2KHR(VkCommandBuffer commandBuffer, uint const VkDependencyInfo* pDependencyInfos) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdWaitEvents2KHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdWaitEvents2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdWaitEvents2KHR(commandBuffer, eventCount, pEvents, pDependencyInfos, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdWaitEvents2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdWaitEvents2KHR(commandBuffer, eventCount, pEvents, pDependencyInfos, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdWaitEvents2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdWaitEvents2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdWaitEvents2KHR(commandBuffer, eventCount, pEvents, pDependencyInfos, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdWaitEvents2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdWaitEvents2KHR(commandBuffer, eventCount, pEvents, pDependencyInfos, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdWaitEvents2KHR(commandBuffer, eventCount, pEvents, pDependencyInfos); + device_dispatch->CmdWaitEvents2KHR(commandBuffer, eventCount, pEvents, pDependencyInfos); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdWaitEvents2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdWaitEvents2KHR(commandBuffer, eventCount, pEvents, pDependencyInfos, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdWaitEvents2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdWaitEvents2KHR(commandBuffer, eventCount, pEvents, pDependencyInfos, record_obj); } } } @@ -14216,34 +12602,34 @@ VKAPI_ATTR void VKAPI_CALL CmdWaitEvents2KHR(VkCommandBuffer commandBuffer, uint VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier2KHR(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdPipelineBarrier2KHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdPipelineBarrier2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdPipelineBarrier2KHR(commandBuffer, pDependencyInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdPipelineBarrier2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdPipelineBarrier2KHR(commandBuffer, pDependencyInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdPipelineBarrier2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdPipelineBarrier2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdPipelineBarrier2KHR(commandBuffer, pDependencyInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdPipelineBarrier2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdPipelineBarrier2KHR(commandBuffer, pDependencyInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdPipelineBarrier2KHR(commandBuffer, pDependencyInfo); + device_dispatch->CmdPipelineBarrier2KHR(commandBuffer, pDependencyInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdPipelineBarrier2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdPipelineBarrier2KHR(commandBuffer, pDependencyInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdPipelineBarrier2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdPipelineBarrier2KHR(commandBuffer, pDependencyInfo, record_obj); } } } @@ -14252,34 +12638,34 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteTimestamp2KHR(VkCommandBuffer commandBuffer, uint32_t query) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdWriteTimestamp2KHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdWriteTimestamp2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdWriteTimestamp2KHR(commandBuffer, stage, queryPool, query, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdWriteTimestamp2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdWriteTimestamp2KHR(commandBuffer, stage, queryPool, query, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdWriteTimestamp2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdWriteTimestamp2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdWriteTimestamp2KHR(commandBuffer, stage, queryPool, query, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdWriteTimestamp2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdWriteTimestamp2KHR(commandBuffer, stage, queryPool, query, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdWriteTimestamp2KHR(commandBuffer, stage, queryPool, query); + device_dispatch->CmdWriteTimestamp2KHR(commandBuffer, stage, queryPool, query); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdWriteTimestamp2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdWriteTimestamp2KHR(commandBuffer, stage, queryPool, query, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdWriteTimestamp2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdWriteTimestamp2KHR(commandBuffer, stage, queryPool, query, record_obj); } } } @@ -14287,40 +12673,40 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteTimestamp2KHR(VkCommandBuffer commandBuffer, VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit2KHR(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkQueueSubmit2KHR, VulkanTypedHandle(queue, kVulkanObjectTypeQueue)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateQueueSubmit2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateQueueSubmit2KHR(queue, submitCount, pSubmits, fence, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateQueueSubmit2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateQueueSubmit2KHR(queue, submitCount, pSubmits, fence, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkQueueSubmit2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordQueueSubmit2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordQueueSubmit2KHR(queue, submitCount, pSubmits, fence, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordQueueSubmit2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordQueueSubmit2KHR(queue, submitCount, pSubmits, fence, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchQueueSubmit2KHR(queue, submitCount, pSubmits, fence); + result = device_dispatch->QueueSubmit2KHR(queue, submitCount, pSubmits, fence); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordQueueSubmit2KHR]) { - auto lock = intercept->WriteLock(); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordQueueSubmit2KHR]) { + auto lock = vo->WriteLock(); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordQueueSubmit2KHR(queue, submitCount, pSubmits, fence, record_obj); + vo->PostCallRecordQueueSubmit2KHR(queue, submitCount, pSubmits, fence, record_obj); } } return result; @@ -14329,34 +12715,34 @@ VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit2KHR(VkQueue queue, uint32_t submitCou VKAPI_ATTR void VKAPI_CALL CmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCopyBuffer2KHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCopyBuffer2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCopyBuffer2KHR(commandBuffer, pCopyBufferInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCopyBuffer2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCopyBuffer2KHR(commandBuffer, pCopyBufferInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCopyBuffer2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCopyBuffer2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCopyBuffer2KHR(commandBuffer, pCopyBufferInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCopyBuffer2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCopyBuffer2KHR(commandBuffer, pCopyBufferInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCopyBuffer2KHR(commandBuffer, pCopyBufferInfo); + device_dispatch->CmdCopyBuffer2KHR(commandBuffer, pCopyBufferInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCopyBuffer2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCopyBuffer2KHR(commandBuffer, pCopyBufferInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCopyBuffer2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCopyBuffer2KHR(commandBuffer, pCopyBufferInfo, record_obj); } } } @@ -14364,34 +12750,34 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, cons VKAPI_ATTR void VKAPI_CALL CmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCopyImage2KHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCopyImage2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCopyImage2KHR(commandBuffer, pCopyImageInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCopyImage2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCopyImage2KHR(commandBuffer, pCopyImageInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCopyImage2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCopyImage2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCopyImage2KHR(commandBuffer, pCopyImageInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCopyImage2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCopyImage2KHR(commandBuffer, pCopyImageInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCopyImage2KHR(commandBuffer, pCopyImageInfo); + device_dispatch->CmdCopyImage2KHR(commandBuffer, pCopyImageInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCopyImage2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCopyImage2KHR(commandBuffer, pCopyImageInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCopyImage2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCopyImage2KHR(commandBuffer, pCopyImageInfo, record_obj); } } } @@ -14400,35 +12786,34 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffe const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCopyBufferToImage2KHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCopyBufferToImage2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCopyBufferToImage2KHR(commandBuffer, pCopyBufferToImageInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCopyBufferToImage2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCopyBufferToImage2KHR(commandBuffer, pCopyBufferToImageInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCopyBufferToImage2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCopyBufferToImage2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCopyBufferToImage2KHR(commandBuffer, pCopyBufferToImageInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCopyBufferToImage2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCopyBufferToImage2KHR(commandBuffer, pCopyBufferToImageInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCopyBufferToImage2KHR(commandBuffer, pCopyBufferToImageInfo); + device_dispatch->CmdCopyBufferToImage2KHR(commandBuffer, pCopyBufferToImageInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCopyBufferToImage2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCopyBufferToImage2KHR(commandBuffer, pCopyBufferToImageInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCopyBufferToImage2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCopyBufferToImage2KHR(commandBuffer, pCopyBufferToImageInfo, record_obj); } } } @@ -14437,35 +12822,34 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffe const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCopyImageToBuffer2KHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCopyImageToBuffer2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCopyImageToBuffer2KHR(commandBuffer, pCopyImageToBufferInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCopyImageToBuffer2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCopyImageToBuffer2KHR(commandBuffer, pCopyImageToBufferInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCopyImageToBuffer2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCopyImageToBuffer2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCopyImageToBuffer2KHR(commandBuffer, pCopyImageToBufferInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCopyImageToBuffer2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCopyImageToBuffer2KHR(commandBuffer, pCopyImageToBufferInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCopyImageToBuffer2KHR(commandBuffer, pCopyImageToBufferInfo); + device_dispatch->CmdCopyImageToBuffer2KHR(commandBuffer, pCopyImageToBufferInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCopyImageToBuffer2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCopyImageToBuffer2KHR(commandBuffer, pCopyImageToBufferInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCopyImageToBuffer2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCopyImageToBuffer2KHR(commandBuffer, pCopyImageToBufferInfo, record_obj); } } } @@ -14473,34 +12857,34 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffe VKAPI_ATTR void VKAPI_CALL CmdBlitImage2KHR(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBlitImage2KHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBlitImage2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBlitImage2KHR(commandBuffer, pBlitImageInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBlitImage2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBlitImage2KHR(commandBuffer, pBlitImageInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBlitImage2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBlitImage2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBlitImage2KHR(commandBuffer, pBlitImageInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBlitImage2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBlitImage2KHR(commandBuffer, pBlitImageInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBlitImage2KHR(commandBuffer, pBlitImageInfo); + device_dispatch->CmdBlitImage2KHR(commandBuffer, pBlitImageInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBlitImage2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBlitImage2KHR(commandBuffer, pBlitImageInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBlitImage2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBlitImage2KHR(commandBuffer, pBlitImageInfo, record_obj); } } } @@ -14508,34 +12892,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBlitImage2KHR(VkCommandBuffer commandBuffer, const VKAPI_ATTR void VKAPI_CALL CmdResolveImage2KHR(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdResolveImage2KHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdResolveImage2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdResolveImage2KHR(commandBuffer, pResolveImageInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdResolveImage2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdResolveImage2KHR(commandBuffer, pResolveImageInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdResolveImage2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdResolveImage2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdResolveImage2KHR(commandBuffer, pResolveImageInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdResolveImage2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdResolveImage2KHR(commandBuffer, pResolveImageInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdResolveImage2KHR(commandBuffer, pResolveImageInfo); + device_dispatch->CmdResolveImage2KHR(commandBuffer, pResolveImageInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdResolveImage2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdResolveImage2KHR(commandBuffer, pResolveImageInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdResolveImage2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdResolveImage2KHR(commandBuffer, pResolveImageInfo, record_obj); } } } @@ -14543,35 +12927,34 @@ VKAPI_ATTR void VKAPI_CALL CmdResolveImage2KHR(VkCommandBuffer commandBuffer, co VKAPI_ATTR void VKAPI_CALL CmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdTraceRaysIndirect2KHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdTraceRaysIndirect2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdTraceRaysIndirect2KHR(commandBuffer, indirectDeviceAddress, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdTraceRaysIndirect2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdTraceRaysIndirect2KHR(commandBuffer, indirectDeviceAddress, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdTraceRaysIndirect2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdTraceRaysIndirect2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdTraceRaysIndirect2KHR(commandBuffer, indirectDeviceAddress, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdTraceRaysIndirect2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdTraceRaysIndirect2KHR(commandBuffer, indirectDeviceAddress, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdTraceRaysIndirect2KHR(commandBuffer, indirectDeviceAddress); + device_dispatch->CmdTraceRaysIndirect2KHR(commandBuffer, indirectDeviceAddress); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdTraceRaysIndirect2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdTraceRaysIndirect2KHR(commandBuffer, indirectDeviceAddress, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdTraceRaysIndirect2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdTraceRaysIndirect2KHR(commandBuffer, indirectDeviceAddress, record_obj); } } } @@ -14580,37 +12963,34 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceBufferMemoryRequirementsKHR(VkDevice device, VkMemoryRequirements2* pMemoryRequirements) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeviceBufferMemoryRequirementsKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeviceBufferMemoryRequirementsKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDeviceBufferMemoryRequirementsKHR(device, pInfo, pMemoryRequirements, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeviceBufferMemoryRequirementsKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDeviceBufferMemoryRequirementsKHR(device, pInfo, pMemoryRequirements, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetDeviceBufferMemoryRequirementsKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeviceBufferMemoryRequirementsKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeviceBufferMemoryRequirementsKHR(device, pInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeviceBufferMemoryRequirementsKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeviceBufferMemoryRequirementsKHR(device, pInfo, pMemoryRequirements, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetDeviceBufferMemoryRequirementsKHR(device, pInfo, pMemoryRequirements); + device_dispatch->GetDeviceBufferMemoryRequirementsKHR(device, pInfo, pMemoryRequirements); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeviceBufferMemoryRequirementsKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeviceBufferMemoryRequirementsKHR(device, pInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeviceBufferMemoryRequirementsKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeviceBufferMemoryRequirementsKHR(device, pInfo, pMemoryRequirements, record_obj); } } } @@ -14619,37 +12999,34 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceImageMemoryRequirementsKHR(VkDevice device, VkMemoryRequirements2* pMemoryRequirements) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeviceImageMemoryRequirementsKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeviceImageMemoryRequirementsKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDeviceImageMemoryRequirementsKHR(device, pInfo, pMemoryRequirements, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeviceImageMemoryRequirementsKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDeviceImageMemoryRequirementsKHR(device, pInfo, pMemoryRequirements, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetDeviceImageMemoryRequirementsKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeviceImageMemoryRequirementsKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeviceImageMemoryRequirementsKHR(device, pInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeviceImageMemoryRequirementsKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeviceImageMemoryRequirementsKHR(device, pInfo, pMemoryRequirements, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetDeviceImageMemoryRequirementsKHR(device, pInfo, pMemoryRequirements); + device_dispatch->GetDeviceImageMemoryRequirementsKHR(device, pInfo, pMemoryRequirements); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeviceImageMemoryRequirementsKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeviceImageMemoryRequirementsKHR(device, pInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeviceImageMemoryRequirementsKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeviceImageMemoryRequirementsKHR(device, pInfo, pMemoryRequirements, record_obj); } } } @@ -14659,41 +13036,40 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceImageSparseMemoryRequirementsKHR(VkDevice de VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeviceImageSparseMemoryRequirementsKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeviceImageSparseMemoryRequirementsKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDeviceImageSparseMemoryRequirementsKHR( - device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeviceImageSparseMemoryRequirementsKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDeviceImageSparseMemoryRequirementsKHR(device, pInfo, pSparseMemoryRequirementCount, + pSparseMemoryRequirements, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetDeviceImageSparseMemoryRequirementsKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeviceImageSparseMemoryRequirementsKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeviceImageSparseMemoryRequirementsKHR(device, pInfo, pSparseMemoryRequirementCount, - pSparseMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeviceImageSparseMemoryRequirementsKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeviceImageSparseMemoryRequirementsKHR(device, pInfo, pSparseMemoryRequirementCount, + pSparseMemoryRequirements, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetDeviceImageSparseMemoryRequirementsKHR(device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); + device_dispatch->GetDeviceImageSparseMemoryRequirementsKHR(device, pInfo, pSparseMemoryRequirementCount, + pSparseMemoryRequirements); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeviceImageSparseMemoryRequirementsKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeviceImageSparseMemoryRequirementsKHR(device, pInfo, pSparseMemoryRequirementCount, - pSparseMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeviceImageSparseMemoryRequirementsKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeviceImageSparseMemoryRequirementsKHR(device, pInfo, pSparseMemoryRequirementCount, + pSparseMemoryRequirements, record_obj); } } } @@ -14702,34 +13078,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBindIndexBuffer2KHR(VkCommandBuffer commandBuffer, VkDeviceSize size, VkIndexType indexType) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBindIndexBuffer2KHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBindIndexBuffer2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBindIndexBuffer2KHR(commandBuffer, buffer, offset, size, indexType, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBindIndexBuffer2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBindIndexBuffer2KHR(commandBuffer, buffer, offset, size, indexType, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBindIndexBuffer2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBindIndexBuffer2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBindIndexBuffer2KHR(commandBuffer, buffer, offset, size, indexType, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBindIndexBuffer2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBindIndexBuffer2KHR(commandBuffer, buffer, offset, size, indexType, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBindIndexBuffer2KHR(commandBuffer, buffer, offset, size, indexType); + device_dispatch->CmdBindIndexBuffer2KHR(commandBuffer, buffer, offset, size, indexType); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBindIndexBuffer2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBindIndexBuffer2KHR(commandBuffer, buffer, offset, size, indexType, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBindIndexBuffer2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBindIndexBuffer2KHR(commandBuffer, buffer, offset, size, indexType, record_obj); } } } @@ -14738,35 +13114,34 @@ VKAPI_ATTR void VKAPI_CALL GetRenderingAreaGranularityKHR(VkDevice device, const VkExtent2D* pGranularity) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetRenderingAreaGranularityKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetRenderingAreaGranularityKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetRenderingAreaGranularityKHR(device, pRenderingAreaInfo, pGranularity, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetRenderingAreaGranularityKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetRenderingAreaGranularityKHR(device, pRenderingAreaInfo, pGranularity, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetRenderingAreaGranularityKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetRenderingAreaGranularityKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetRenderingAreaGranularityKHR(device, pRenderingAreaInfo, pGranularity, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetRenderingAreaGranularityKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetRenderingAreaGranularityKHR(device, pRenderingAreaInfo, pGranularity, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetRenderingAreaGranularityKHR(device, pRenderingAreaInfo, pGranularity); + device_dispatch->GetRenderingAreaGranularityKHR(device, pRenderingAreaInfo, pGranularity); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetRenderingAreaGranularityKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetRenderingAreaGranularityKHR(device, pRenderingAreaInfo, pGranularity, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetRenderingAreaGranularityKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetRenderingAreaGranularityKHR(device, pRenderingAreaInfo, pGranularity, record_obj); } } } @@ -14775,37 +13150,34 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceImageSubresourceLayoutKHR(VkDevice device, c VkSubresourceLayout2KHR* pLayout) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeviceImageSubresourceLayoutKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeviceImageSubresourceLayoutKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDeviceImageSubresourceLayoutKHR(device, pInfo, pLayout, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeviceImageSubresourceLayoutKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDeviceImageSubresourceLayoutKHR(device, pInfo, pLayout, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetDeviceImageSubresourceLayoutKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeviceImageSubresourceLayoutKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeviceImageSubresourceLayoutKHR(device, pInfo, pLayout, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeviceImageSubresourceLayoutKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeviceImageSubresourceLayoutKHR(device, pInfo, pLayout, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetDeviceImageSubresourceLayoutKHR(device, pInfo, pLayout); + device_dispatch->GetDeviceImageSubresourceLayoutKHR(device, pInfo, pLayout); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeviceImageSubresourceLayoutKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeviceImageSubresourceLayoutKHR(device, pInfo, pLayout, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeviceImageSubresourceLayoutKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeviceImageSubresourceLayoutKHR(device, pInfo, pLayout, record_obj); } } } @@ -14814,35 +13186,34 @@ VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout2KHR(VkDevice device, VkImag VkSubresourceLayout2KHR* pLayout) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetImageSubresourceLayout2KHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetImageSubresourceLayout2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetImageSubresourceLayout2KHR(device, image, pSubresource, pLayout, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetImageSubresourceLayout2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetImageSubresourceLayout2KHR(device, image, pSubresource, pLayout, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetImageSubresourceLayout2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetImageSubresourceLayout2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetImageSubresourceLayout2KHR(device, image, pSubresource, pLayout, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetImageSubresourceLayout2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetImageSubresourceLayout2KHR(device, image, pSubresource, pLayout, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetImageSubresourceLayout2KHR(device, image, pSubresource, pLayout); + device_dispatch->GetImageSubresourceLayout2KHR(device, image, pSubresource, pLayout); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetImageSubresourceLayout2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetImageSubresourceLayout2KHR(device, image, pSubresource, pLayout, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetImageSubresourceLayout2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetImageSubresourceLayout2KHR(device, image, pSubresource, pLayout, record_obj); } } } @@ -14852,37 +13223,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineBinariesKHR(VkDevice device, const VkPipelineBinaryHandlesInfoKHR* pBinaries) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreatePipelineBinariesKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCreatePipelineBinariesKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreatePipelineBinariesKHR(device, pCreateInfo, pAllocator, pBinaries, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreatePipelineBinariesKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreatePipelineBinariesKHR(device, pCreateInfo, pAllocator, pBinaries, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreatePipelineBinariesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreatePipelineBinariesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreatePipelineBinariesKHR(device, pCreateInfo, pAllocator, pBinaries, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreatePipelineBinariesKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreatePipelineBinariesKHR(device, pCreateInfo, pAllocator, pBinaries, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreatePipelineBinariesKHR(device, pCreateInfo, pAllocator, pBinaries); + result = device_dispatch->CreatePipelineBinariesKHR(device, pCreateInfo, pAllocator, pBinaries); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreatePipelineBinariesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreatePipelineBinariesKHR(device, pCreateInfo, pAllocator, pBinaries, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreatePipelineBinariesKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreatePipelineBinariesKHR(device, pCreateInfo, pAllocator, pBinaries, record_obj); } } return result; @@ -14892,35 +13262,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyPipelineBinaryKHR(VkDevice device, VkPipelineB const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyPipelineBinaryKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyPipelineBinaryKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyPipelineBinaryKHR(device, pipelineBinary, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyPipelineBinaryKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyPipelineBinaryKHR(device, pipelineBinary, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyPipelineBinaryKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyPipelineBinaryKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyPipelineBinaryKHR(device, pipelineBinary, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyPipelineBinaryKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyPipelineBinaryKHR(device, pipelineBinary, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyPipelineBinaryKHR(device, pipelineBinary, pAllocator); + device_dispatch->DestroyPipelineBinaryKHR(device, pipelineBinary, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyPipelineBinaryKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyPipelineBinaryKHR(device, pipelineBinary, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyPipelineBinaryKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyPipelineBinaryKHR(device, pipelineBinary, pAllocator, record_obj); } } } @@ -14929,36 +13298,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPipelineKeyKHR(VkDevice device, const VkPipeli VkPipelineBinaryKeyKHR* pPipelineKey) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPipelineKeyKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetPipelineKeyKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPipelineKeyKHR(device, pPipelineCreateInfo, pPipelineKey, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetPipelineKeyKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPipelineKeyKHR(device, pPipelineCreateInfo, pPipelineKey, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPipelineKeyKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetPipelineKeyKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPipelineKeyKHR(device, pPipelineCreateInfo, pPipelineKey, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetPipelineKeyKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPipelineKeyKHR(device, pPipelineCreateInfo, pPipelineKey, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPipelineKeyKHR(device, pPipelineCreateInfo, pPipelineKey); + result = device_dispatch->GetPipelineKeyKHR(device, pPipelineCreateInfo, pPipelineKey); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetPipelineKeyKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPipelineKeyKHR(device, pPipelineCreateInfo, pPipelineKey, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetPipelineKeyKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPipelineKeyKHR(device, pPipelineCreateInfo, pPipelineKey, record_obj); } } return result; @@ -14969,40 +13338,40 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPipelineBinaryDataKHR(VkDevice device, const V void* pPipelineBinaryData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPipelineBinaryDataKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetPipelineBinaryDataKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPipelineBinaryDataKHR(device, pInfo, pPipelineBinaryKey, pPipelineBinaryDataSize, - pPipelineBinaryData, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetPipelineBinaryDataKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPipelineBinaryDataKHR(device, pInfo, pPipelineBinaryKey, pPipelineBinaryDataSize, + pPipelineBinaryData, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPipelineBinaryDataKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetPipelineBinaryDataKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPipelineBinaryDataKHR(device, pInfo, pPipelineBinaryKey, pPipelineBinaryDataSize, - pPipelineBinaryData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetPipelineBinaryDataKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPipelineBinaryDataKHR(device, pInfo, pPipelineBinaryKey, pPipelineBinaryDataSize, + pPipelineBinaryData, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPipelineBinaryDataKHR(device, pInfo, pPipelineBinaryKey, pPipelineBinaryDataSize, pPipelineBinaryData); + result = device_dispatch->GetPipelineBinaryDataKHR(device, pInfo, pPipelineBinaryKey, pPipelineBinaryDataSize, + pPipelineBinaryData); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetPipelineBinaryDataKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPipelineBinaryDataKHR(device, pInfo, pPipelineBinaryKey, pPipelineBinaryDataSize, - pPipelineBinaryData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetPipelineBinaryDataKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPipelineBinaryDataKHR(device, pInfo, pPipelineBinaryKey, pPipelineBinaryDataSize, + pPipelineBinaryData, record_obj); } } return result; @@ -15012,37 +13381,36 @@ VKAPI_ATTR VkResult VKAPI_CALL ReleaseCapturedPipelineDataKHR(VkDevice device, c const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkReleaseCapturedPipelineDataKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateReleaseCapturedPipelineDataKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateReleaseCapturedPipelineDataKHR(device, pInfo, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateReleaseCapturedPipelineDataKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateReleaseCapturedPipelineDataKHR(device, pInfo, pAllocator, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkReleaseCapturedPipelineDataKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordReleaseCapturedPipelineDataKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordReleaseCapturedPipelineDataKHR(device, pInfo, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordReleaseCapturedPipelineDataKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordReleaseCapturedPipelineDataKHR(device, pInfo, pAllocator, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchReleaseCapturedPipelineDataKHR(device, pInfo, pAllocator); + result = device_dispatch->ReleaseCapturedPipelineDataKHR(device, pInfo, pAllocator); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordReleaseCapturedPipelineDataKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordReleaseCapturedPipelineDataKHR(device, pInfo, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordReleaseCapturedPipelineDataKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordReleaseCapturedPipelineDataKHR(device, pInfo, pAllocator, record_obj); } } return result; @@ -15053,40 +13421,40 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCooperativeMatrixPropertiesKHR(V VkCooperativeMatrixPropertiesKHR* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceCooperativeMatrixPropertiesKHR(physicalDevice, pPropertyCount, - pProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceCooperativeMatrixPropertiesKHR(physicalDevice, pPropertyCount, pProperties, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceCooperativeMatrixPropertiesKHR(physicalDevice, pPropertyCount, pProperties, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceCooperativeMatrixPropertiesKHR(physicalDevice, pPropertyCount, pProperties, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceCooperativeMatrixPropertiesKHR(physicalDevice, pPropertyCount, pProperties); + result = instance_dispatch->GetPhysicalDeviceCooperativeMatrixPropertiesKHR(physicalDevice, pPropertyCount, pProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceCooperativeMatrixPropertiesKHR(physicalDevice, pPropertyCount, pProperties, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceCooperativeMatrixPropertiesKHR(physicalDevice, pPropertyCount, pProperties, + record_obj); } } return result; @@ -15096,34 +13464,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLineStippleKHR(VkCommandBuffer commandBuffer, u uint16_t lineStipplePattern) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetLineStippleKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetLineStippleKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetLineStippleKHR(commandBuffer, lineStippleFactor, lineStipplePattern, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetLineStippleKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetLineStippleKHR(commandBuffer, lineStippleFactor, lineStipplePattern, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetLineStippleKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetLineStippleKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetLineStippleKHR(commandBuffer, lineStippleFactor, lineStipplePattern, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetLineStippleKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetLineStippleKHR(commandBuffer, lineStippleFactor, lineStipplePattern, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetLineStippleKHR(commandBuffer, lineStippleFactor, lineStipplePattern); + device_dispatch->CmdSetLineStippleKHR(commandBuffer, lineStippleFactor, lineStipplePattern); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetLineStippleKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetLineStippleKHR(commandBuffer, lineStippleFactor, lineStipplePattern, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetLineStippleKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetLineStippleKHR(commandBuffer, lineStippleFactor, lineStipplePattern, record_obj); } } } @@ -15133,40 +13501,40 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCalibrateableTimeDomainsKHR(VkPh VkTimeDomainKHR* pTimeDomains) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceCalibrateableTimeDomainsKHR, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceCalibrateableTimeDomainsKHR(physicalDevice, pTimeDomainCount, - pTimeDomains, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceCalibrateableTimeDomainsKHR(physicalDevice, pTimeDomainCount, pTimeDomains, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceCalibrateableTimeDomainsKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceCalibrateableTimeDomainsKHR(physicalDevice, pTimeDomainCount, pTimeDomains, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceCalibrateableTimeDomainsKHR(physicalDevice, pTimeDomainCount, pTimeDomains, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceCalibrateableTimeDomainsKHR(physicalDevice, pTimeDomainCount, pTimeDomains); + result = instance_dispatch->GetPhysicalDeviceCalibrateableTimeDomainsKHR(physicalDevice, pTimeDomainCount, pTimeDomains); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceCalibrateableTimeDomainsKHR(physicalDevice, pTimeDomainCount, pTimeDomains, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceCalibrateableTimeDomainsKHR(physicalDevice, pTimeDomainCount, pTimeDomains, + record_obj); } } return result; @@ -15177,40 +13545,39 @@ VKAPI_ATTR VkResult VKAPI_CALL GetCalibratedTimestampsKHR(VkDevice device, uint3 uint64_t* pTimestamps, uint64_t* pMaxDeviation) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetCalibratedTimestampsKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetCalibratedTimestampsKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetCalibratedTimestampsKHR(device, timestampCount, pTimestampInfos, pTimestamps, - pMaxDeviation, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetCalibratedTimestampsKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetCalibratedTimestampsKHR(device, timestampCount, pTimestampInfos, pTimestamps, + pMaxDeviation, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetCalibratedTimestampsKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetCalibratedTimestampsKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetCalibratedTimestampsKHR(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetCalibratedTimestampsKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetCalibratedTimestampsKHR(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetCalibratedTimestampsKHR(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation); + result = device_dispatch->GetCalibratedTimestampsKHR(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetCalibratedTimestampsKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetCalibratedTimestampsKHR(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetCalibratedTimestampsKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetCalibratedTimestampsKHR(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation, + record_obj); } } return result; @@ -15220,35 +13587,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorSets2KHR(VkCommandBuffer commandBuff const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBindDescriptorSets2KHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBindDescriptorSets2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBindDescriptorSets2KHR(commandBuffer, pBindDescriptorSetsInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBindDescriptorSets2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBindDescriptorSets2KHR(commandBuffer, pBindDescriptorSetsInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBindDescriptorSets2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBindDescriptorSets2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBindDescriptorSets2KHR(commandBuffer, pBindDescriptorSetsInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBindDescriptorSets2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBindDescriptorSets2KHR(commandBuffer, pBindDescriptorSetsInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBindDescriptorSets2KHR(commandBuffer, pBindDescriptorSetsInfo); + device_dispatch->CmdBindDescriptorSets2KHR(commandBuffer, pBindDescriptorSetsInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBindDescriptorSets2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBindDescriptorSets2KHR(commandBuffer, pBindDescriptorSetsInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBindDescriptorSets2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBindDescriptorSets2KHR(commandBuffer, pBindDescriptorSetsInfo, record_obj); } } } @@ -15256,34 +13622,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorSets2KHR(VkCommandBuffer commandBuff VKAPI_ATTR void VKAPI_CALL CmdPushConstants2KHR(VkCommandBuffer commandBuffer, const VkPushConstantsInfoKHR* pPushConstantsInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdPushConstants2KHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdPushConstants2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdPushConstants2KHR(commandBuffer, pPushConstantsInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdPushConstants2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdPushConstants2KHR(commandBuffer, pPushConstantsInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdPushConstants2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdPushConstants2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdPushConstants2KHR(commandBuffer, pPushConstantsInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdPushConstants2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdPushConstants2KHR(commandBuffer, pPushConstantsInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdPushConstants2KHR(commandBuffer, pPushConstantsInfo); + device_dispatch->CmdPushConstants2KHR(commandBuffer, pPushConstantsInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdPushConstants2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdPushConstants2KHR(commandBuffer, pPushConstantsInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdPushConstants2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdPushConstants2KHR(commandBuffer, pPushConstantsInfo, record_obj); } } } @@ -15292,35 +13658,34 @@ VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSet2KHR(VkCommandBuffer commandBuffe const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdPushDescriptorSet2KHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdPushDescriptorSet2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdPushDescriptorSet2KHR(commandBuffer, pPushDescriptorSetInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdPushDescriptorSet2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdPushDescriptorSet2KHR(commandBuffer, pPushDescriptorSetInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdPushDescriptorSet2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdPushDescriptorSet2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdPushDescriptorSet2KHR(commandBuffer, pPushDescriptorSetInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdPushDescriptorSet2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdPushDescriptorSet2KHR(commandBuffer, pPushDescriptorSetInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdPushDescriptorSet2KHR(commandBuffer, pPushDescriptorSetInfo); + device_dispatch->CmdPushDescriptorSet2KHR(commandBuffer, pPushDescriptorSetInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdPushDescriptorSet2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdPushDescriptorSet2KHR(commandBuffer, pPushDescriptorSetInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdPushDescriptorSet2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdPushDescriptorSet2KHR(commandBuffer, pPushDescriptorSetInfo, record_obj); } } } @@ -15329,41 +13694,36 @@ VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSetWithTemplate2KHR( VkCommandBuffer commandBuffer, const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdPushDescriptorSetWithTemplate2KHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdPushDescriptorSetWithTemplate2KHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdPushDescriptorSetWithTemplate2KHR(commandBuffer, - pPushDescriptorSetWithTemplateInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdPushDescriptorSetWithTemplate2KHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdPushDescriptorSetWithTemplate2KHR(commandBuffer, pPushDescriptorSetWithTemplateInfo, + error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdPushDescriptorSetWithTemplate2KHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdPushDescriptorSetWithTemplate2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdPushDescriptorSetWithTemplate2KHR(commandBuffer, pPushDescriptorSetWithTemplateInfo, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdPushDescriptorSetWithTemplate2KHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdPushDescriptorSetWithTemplate2KHR(commandBuffer, pPushDescriptorSetWithTemplateInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdPushDescriptorSetWithTemplate2KHR(commandBuffer, pPushDescriptorSetWithTemplateInfo); + device_dispatch->CmdPushDescriptorSetWithTemplate2KHR(commandBuffer, pPushDescriptorSetWithTemplateInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdPushDescriptorSetWithTemplate2KHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdPushDescriptorSetWithTemplate2KHR(commandBuffer, pPushDescriptorSetWithTemplateInfo, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdPushDescriptorSetWithTemplate2KHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdPushDescriptorSetWithTemplate2KHR(commandBuffer, pPushDescriptorSetWithTemplateInfo, record_obj); } } } @@ -15372,39 +13732,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDescriptorBufferOffsets2EXT( VkCommandBuffer commandBuffer, const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDescriptorBufferOffsets2EXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDescriptorBufferOffsets2EXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDescriptorBufferOffsets2EXT(commandBuffer, pSetDescriptorBufferOffsetsInfo, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDescriptorBufferOffsets2EXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDescriptorBufferOffsets2EXT(commandBuffer, pSetDescriptorBufferOffsetsInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDescriptorBufferOffsets2EXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDescriptorBufferOffsets2EXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDescriptorBufferOffsets2EXT(commandBuffer, pSetDescriptorBufferOffsetsInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDescriptorBufferOffsets2EXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDescriptorBufferOffsets2EXT(commandBuffer, pSetDescriptorBufferOffsetsInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDescriptorBufferOffsets2EXT(commandBuffer, pSetDescriptorBufferOffsetsInfo); + device_dispatch->CmdSetDescriptorBufferOffsets2EXT(commandBuffer, pSetDescriptorBufferOffsetsInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDescriptorBufferOffsets2EXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDescriptorBufferOffsets2EXT(commandBuffer, pSetDescriptorBufferOffsetsInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDescriptorBufferOffsets2EXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDescriptorBufferOffsets2EXT(commandBuffer, pSetDescriptorBufferOffsetsInfo, record_obj); } } } @@ -15413,16 +13769,16 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorBufferEmbeddedSamplers2EXT( VkCommandBuffer commandBuffer, const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBindDescriptorBufferEmbeddedSamplers2EXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBindDescriptorBufferEmbeddedSamplers2EXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBindDescriptorBufferEmbeddedSamplers2EXT( + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBindDescriptorBufferEmbeddedSamplers2EXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBindDescriptorBufferEmbeddedSamplers2EXT( commandBuffer, pBindDescriptorBufferEmbeddedSamplersInfo, error_obj); if (skip) return; } @@ -15430,24 +13786,22 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorBufferEmbeddedSamplers2EXT( RecordObject record_obj(vvl::Func::vkCmdBindDescriptorBufferEmbeddedSamplers2EXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBindDescriptorBufferEmbeddedSamplers2EXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBindDescriptorBufferEmbeddedSamplers2EXT( - commandBuffer, pBindDescriptorBufferEmbeddedSamplersInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBindDescriptorBufferEmbeddedSamplers2EXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBindDescriptorBufferEmbeddedSamplers2EXT(commandBuffer, pBindDescriptorBufferEmbeddedSamplersInfo, + record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBindDescriptorBufferEmbeddedSamplers2EXT(commandBuffer, pBindDescriptorBufferEmbeddedSamplersInfo); + device_dispatch->CmdBindDescriptorBufferEmbeddedSamplers2EXT(commandBuffer, pBindDescriptorBufferEmbeddedSamplersInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBindDescriptorBufferEmbeddedSamplers2EXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBindDescriptorBufferEmbeddedSamplers2EXT( - commandBuffer, pBindDescriptorBufferEmbeddedSamplersInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBindDescriptorBufferEmbeddedSamplers2EXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBindDescriptorBufferEmbeddedSamplers2EXT(commandBuffer, pBindDescriptorBufferEmbeddedSamplersInfo, + record_obj); } } } @@ -15458,37 +13812,37 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT* pCallback) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateDebugReportCallbackEXT, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, pCallback, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, pCallback, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateDebugReportCallbackEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, pCallback, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, pCallback, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, pCallback); + result = instance_dispatch->CreateDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, pCallback); } - LayerCreateReportCallback(layer_data->debug_report, false, pCreateInfo, pCallback); + LayerCreateReportCallback(instance_dispatch->debug_report, false, pCreateInfo, pCallback); record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, pCallback, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, pCallback, record_obj); } } return result; @@ -15498,35 +13852,35 @@ VKAPI_ATTR void VKAPI_CALL DestroyDebugReportCallbackEXT(VkInstance instance, Vk const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyDebugReportCallbackEXT, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyDebugReportCallbackEXT(instance, callback, pAllocator, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyDebugReportCallbackEXT(instance, callback, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyDebugReportCallbackEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyDebugReportCallbackEXT(instance, callback, pAllocator, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyDebugReportCallbackEXT(instance, callback, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyDebugReportCallbackEXT(instance, callback, pAllocator); + instance_dispatch->DestroyDebugReportCallbackEXT(instance, callback, pAllocator); } - LayerDestroyCallback(layer_data->debug_report, callback); + LayerDestroyCallback(instance_dispatch->debug_report, callback); { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyDebugReportCallbackEXT(instance, callback, pAllocator, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyDebugReportCallbackEXT(instance, callback, pAllocator, record_obj); } } } @@ -15536,37 +13890,38 @@ VKAPI_ATTR void VKAPI_CALL DebugReportMessageEXT(VkInstance instance, VkDebugRep int32_t messageCode, const char* pLayerPrefix, const char* pMessage) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDebugReportMessageEXT, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDebugReportMessageEXT(instance, flags, objectType, object, location, messageCode, - pLayerPrefix, pMessage, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDebugReportMessageEXT(instance, flags, objectType, object, location, messageCode, + pLayerPrefix, pMessage, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDebugReportMessageEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDebugReportMessageEXT(instance, flags, objectType, object, location, messageCode, pLayerPrefix, - pMessage, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDebugReportMessageEXT(instance, flags, objectType, object, location, messageCode, pLayerPrefix, + pMessage, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDebugReportMessageEXT(instance, flags, objectType, object, location, messageCode, pLayerPrefix, pMessage); + instance_dispatch->DebugReportMessageEXT(instance, flags, objectType, object, location, messageCode, pLayerPrefix, + pMessage); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDebugReportMessageEXT(instance, flags, objectType, object, location, messageCode, pLayerPrefix, - pMessage, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDebugReportMessageEXT(instance, flags, objectType, object, location, messageCode, pLayerPrefix, + pMessage, record_obj); } } } @@ -15574,37 +13929,36 @@ VKAPI_ATTR void VKAPI_CALL DebugReportMessageEXT(VkInstance instance, VkDebugRep VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectTagEXT(VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDebugMarkerSetObjectTagEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateDebugMarkerSetObjectTagEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDebugMarkerSetObjectTagEXT(device, pTagInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDebugMarkerSetObjectTagEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDebugMarkerSetObjectTagEXT(device, pTagInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkDebugMarkerSetObjectTagEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDebugMarkerSetObjectTagEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDebugMarkerSetObjectTagEXT(device, pTagInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDebugMarkerSetObjectTagEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDebugMarkerSetObjectTagEXT(device, pTagInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchDebugMarkerSetObjectTagEXT(device, pTagInfo); + result = device_dispatch->DebugMarkerSetObjectTagEXT(device, pTagInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDebugMarkerSetObjectTagEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDebugMarkerSetObjectTagEXT(device, pTagInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDebugMarkerSetObjectTagEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDebugMarkerSetObjectTagEXT(device, pTagInfo, record_obj); } } return result; @@ -15613,38 +13967,37 @@ VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectTagEXT(VkDevice device, const VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectNameEXT(VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDebugMarkerSetObjectNameEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateDebugMarkerSetObjectNameEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDebugMarkerSetObjectNameEXT(device, pNameInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDebugMarkerSetObjectNameEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDebugMarkerSetObjectNameEXT(device, pNameInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkDebugMarkerSetObjectNameEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDebugMarkerSetObjectNameEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDebugMarkerSetObjectNameEXT(device, pNameInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDebugMarkerSetObjectNameEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDebugMarkerSetObjectNameEXT(device, pNameInfo, record_obj); } } - layer_data->debug_report->SetMarkerObjectName(pNameInfo); + device_dispatch->debug_report->SetMarkerObjectName(pNameInfo); VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchDebugMarkerSetObjectNameEXT(device, pNameInfo); + result = device_dispatch->DebugMarkerSetObjectNameEXT(device, pNameInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDebugMarkerSetObjectNameEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDebugMarkerSetObjectNameEXT(device, pNameInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDebugMarkerSetObjectNameEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDebugMarkerSetObjectNameEXT(device, pNameInfo, record_obj); } } return result; @@ -15653,34 +14006,34 @@ VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectNameEXT(VkDevice device, cons VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDebugMarkerBeginEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDebugMarkerBeginEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDebugMarkerBeginEXT(commandBuffer, pMarkerInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDebugMarkerBeginEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDebugMarkerBeginEXT(commandBuffer, pMarkerInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDebugMarkerBeginEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDebugMarkerBeginEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDebugMarkerBeginEXT(commandBuffer, pMarkerInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDebugMarkerBeginEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDebugMarkerBeginEXT(commandBuffer, pMarkerInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDebugMarkerBeginEXT(commandBuffer, pMarkerInfo); + device_dispatch->CmdDebugMarkerBeginEXT(commandBuffer, pMarkerInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDebugMarkerBeginEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDebugMarkerBeginEXT(commandBuffer, pMarkerInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDebugMarkerBeginEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDebugMarkerBeginEXT(commandBuffer, pMarkerInfo, record_obj); } } } @@ -15688,34 +14041,34 @@ VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerEndEXT(VkCommandBuffer commandBuffer) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDebugMarkerEndEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDebugMarkerEndEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDebugMarkerEndEXT(commandBuffer, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDebugMarkerEndEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDebugMarkerEndEXT(commandBuffer, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDebugMarkerEndEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDebugMarkerEndEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDebugMarkerEndEXT(commandBuffer, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDebugMarkerEndEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDebugMarkerEndEXT(commandBuffer, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDebugMarkerEndEXT(commandBuffer); + device_dispatch->CmdDebugMarkerEndEXT(commandBuffer); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDebugMarkerEndEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDebugMarkerEndEXT(commandBuffer, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDebugMarkerEndEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDebugMarkerEndEXT(commandBuffer, record_obj); } } } @@ -15723,34 +14076,34 @@ VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerEndEXT(VkCommandBuffer commandBuffer) { VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDebugMarkerInsertEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDebugMarkerInsertEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDebugMarkerInsertEXT(commandBuffer, pMarkerInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDebugMarkerInsertEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDebugMarkerInsertEXT(commandBuffer, pMarkerInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDebugMarkerInsertEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDebugMarkerInsertEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDebugMarkerInsertEXT(commandBuffer, pMarkerInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDebugMarkerInsertEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDebugMarkerInsertEXT(commandBuffer, pMarkerInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDebugMarkerInsertEXT(commandBuffer, pMarkerInfo); + device_dispatch->CmdDebugMarkerInsertEXT(commandBuffer, pMarkerInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDebugMarkerInsertEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDebugMarkerInsertEXT(commandBuffer, pMarkerInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDebugMarkerInsertEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDebugMarkerInsertEXT(commandBuffer, pMarkerInfo, record_obj); } } } @@ -15760,41 +14113,38 @@ VKAPI_ATTR void VKAPI_CALL CmdBindTransformFeedbackBuffersEXT(VkCommandBuffer co const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBindTransformFeedbackBuffersEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBindTransformFeedbackBuffersEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBindTransformFeedbackBuffersEXT(commandBuffer, firstBinding, bindingCount, - pBuffers, pOffsets, pSizes, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBindTransformFeedbackBuffersEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBindTransformFeedbackBuffersEXT(commandBuffer, firstBinding, bindingCount, pBuffers, + pOffsets, pSizes, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBindTransformFeedbackBuffersEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBindTransformFeedbackBuffersEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBindTransformFeedbackBuffersEXT(commandBuffer, firstBinding, bindingCount, pBuffers, - pOffsets, pSizes, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBindTransformFeedbackBuffersEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBindTransformFeedbackBuffersEXT(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, + pSizes, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBindTransformFeedbackBuffersEXT(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes); + device_dispatch->CmdBindTransformFeedbackBuffersEXT(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBindTransformFeedbackBuffersEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBindTransformFeedbackBuffersEXT(commandBuffer, firstBinding, bindingCount, pBuffers, - pOffsets, pSizes, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBindTransformFeedbackBuffersEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBindTransformFeedbackBuffersEXT(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, + pSizes, record_obj); } } } @@ -15804,40 +14154,39 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginTransformFeedbackEXT(VkCommandBuffer commandB const VkDeviceSize* pCounterBufferOffsets) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBeginTransformFeedbackEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBeginTransformFeedbackEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBeginTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, - pCounterBuffers, pCounterBufferOffsets, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBeginTransformFeedbackEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBeginTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, + pCounterBuffers, pCounterBufferOffsets, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBeginTransformFeedbackEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBeginTransformFeedbackEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBeginTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, - pCounterBuffers, pCounterBufferOffsets, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBeginTransformFeedbackEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBeginTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, + pCounterBufferOffsets, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBeginTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, - pCounterBufferOffsets); + device_dispatch->CmdBeginTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, + pCounterBufferOffsets); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBeginTransformFeedbackEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBeginTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, - pCounterBuffers, pCounterBufferOffsets, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBeginTransformFeedbackEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBeginTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, + pCounterBufferOffsets, record_obj); } } } @@ -15847,40 +14196,39 @@ VKAPI_ATTR void VKAPI_CALL CmdEndTransformFeedbackEXT(VkCommandBuffer commandBuf const VkDeviceSize* pCounterBufferOffsets) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdEndTransformFeedbackEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdEndTransformFeedbackEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdEndTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, - pCounterBuffers, pCounterBufferOffsets, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdEndTransformFeedbackEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdEndTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, + pCounterBuffers, pCounterBufferOffsets, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdEndTransformFeedbackEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdEndTransformFeedbackEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdEndTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, - pCounterBuffers, pCounterBufferOffsets, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdEndTransformFeedbackEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdEndTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, + pCounterBufferOffsets, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdEndTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, - pCounterBufferOffsets); + device_dispatch->CmdEndTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, + pCounterBufferOffsets); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdEndTransformFeedbackEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdEndTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, - pCounterBuffers, pCounterBufferOffsets, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdEndTransformFeedbackEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdEndTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, + pCounterBufferOffsets, record_obj); } } } @@ -15889,34 +14237,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginQueryIndexedEXT(VkCommandBuffer commandBuffer VkQueryControlFlags flags, uint32_t index) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBeginQueryIndexedEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBeginQueryIndexedEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBeginQueryIndexedEXT(commandBuffer, queryPool, query, flags, index, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBeginQueryIndexedEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBeginQueryIndexedEXT(commandBuffer, queryPool, query, flags, index, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBeginQueryIndexedEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBeginQueryIndexedEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBeginQueryIndexedEXT(commandBuffer, queryPool, query, flags, index, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBeginQueryIndexedEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBeginQueryIndexedEXT(commandBuffer, queryPool, query, flags, index, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBeginQueryIndexedEXT(commandBuffer, queryPool, query, flags, index); + device_dispatch->CmdBeginQueryIndexedEXT(commandBuffer, queryPool, query, flags, index); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBeginQueryIndexedEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBeginQueryIndexedEXT(commandBuffer, queryPool, query, flags, index, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBeginQueryIndexedEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBeginQueryIndexedEXT(commandBuffer, queryPool, query, flags, index, record_obj); } } } @@ -15925,34 +14273,34 @@ VKAPI_ATTR void VKAPI_CALL CmdEndQueryIndexedEXT(VkCommandBuffer commandBuffer, uint32_t index) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdEndQueryIndexedEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdEndQueryIndexedEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdEndQueryIndexedEXT(commandBuffer, queryPool, query, index, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdEndQueryIndexedEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdEndQueryIndexedEXT(commandBuffer, queryPool, query, index, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdEndQueryIndexedEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdEndQueryIndexedEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdEndQueryIndexedEXT(commandBuffer, queryPool, query, index, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdEndQueryIndexedEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdEndQueryIndexedEXT(commandBuffer, queryPool, query, index, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdEndQueryIndexedEXT(commandBuffer, queryPool, query, index); + device_dispatch->CmdEndQueryIndexedEXT(commandBuffer, queryPool, query, index); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdEndQueryIndexedEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdEndQueryIndexedEXT(commandBuffer, queryPool, query, index, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdEndQueryIndexedEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdEndQueryIndexedEXT(commandBuffer, queryPool, query, index, record_obj); } } } @@ -15963,41 +14311,39 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectByteCountEXT(VkCommandBuffer commandBu uint32_t vertexStride) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDrawIndirectByteCountEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDrawIndirectByteCountEXT]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateCmdDrawIndirectByteCountEXT(commandBuffer, instanceCount, firstInstance, counterBuffer, - counterBufferOffset, counterOffset, vertexStride, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDrawIndirectByteCountEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDrawIndirectByteCountEXT(commandBuffer, instanceCount, firstInstance, counterBuffer, + counterBufferOffset, counterOffset, vertexStride, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDrawIndirectByteCountEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDrawIndirectByteCountEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDrawIndirectByteCountEXT(commandBuffer, instanceCount, firstInstance, counterBuffer, - counterBufferOffset, counterOffset, vertexStride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDrawIndirectByteCountEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDrawIndirectByteCountEXT(commandBuffer, instanceCount, firstInstance, counterBuffer, + counterBufferOffset, counterOffset, vertexStride, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDrawIndirectByteCountEXT(commandBuffer, instanceCount, firstInstance, counterBuffer, counterBufferOffset, - counterOffset, vertexStride); + device_dispatch->CmdDrawIndirectByteCountEXT(commandBuffer, instanceCount, firstInstance, counterBuffer, + counterBufferOffset, counterOffset, vertexStride); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDrawIndirectByteCountEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDrawIndirectByteCountEXT(commandBuffer, instanceCount, firstInstance, counterBuffer, - counterBufferOffset, counterOffset, vertexStride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDrawIndirectByteCountEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDrawIndirectByteCountEXT(commandBuffer, instanceCount, firstInstance, counterBuffer, + counterBufferOffset, counterOffset, vertexStride, record_obj); } } } @@ -16006,36 +14352,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateCuModuleNVX(VkDevice device, const VkCuModu const VkAllocationCallbacks* pAllocator, VkCuModuleNVX* pModule) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateCuModuleNVX, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateCuModuleNVX]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateCuModuleNVX(device, pCreateInfo, pAllocator, pModule, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateCuModuleNVX]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateCuModuleNVX(device, pCreateInfo, pAllocator, pModule, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateCuModuleNVX); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateCuModuleNVX]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateCuModuleNVX(device, pCreateInfo, pAllocator, pModule, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateCuModuleNVX]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateCuModuleNVX(device, pCreateInfo, pAllocator, pModule, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateCuModuleNVX(device, pCreateInfo, pAllocator, pModule); + result = device_dispatch->CreateCuModuleNVX(device, pCreateInfo, pAllocator, pModule); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateCuModuleNVX]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateCuModuleNVX(device, pCreateInfo, pAllocator, pModule, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateCuModuleNVX]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateCuModuleNVX(device, pCreateInfo, pAllocator, pModule, record_obj); } } return result; @@ -16045,36 +14391,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateCuFunctionNVX(VkDevice device, const VkCuFu const VkAllocationCallbacks* pAllocator, VkCuFunctionNVX* pFunction) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateCuFunctionNVX, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateCuFunctionNVX]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateCuFunctionNVX(device, pCreateInfo, pAllocator, pFunction, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateCuFunctionNVX]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateCuFunctionNVX(device, pCreateInfo, pAllocator, pFunction, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateCuFunctionNVX); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateCuFunctionNVX]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateCuFunctionNVX(device, pCreateInfo, pAllocator, pFunction, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateCuFunctionNVX]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateCuFunctionNVX(device, pCreateInfo, pAllocator, pFunction, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateCuFunctionNVX(device, pCreateInfo, pAllocator, pFunction); + result = device_dispatch->CreateCuFunctionNVX(device, pCreateInfo, pAllocator, pFunction); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateCuFunctionNVX]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateCuFunctionNVX(device, pCreateInfo, pAllocator, pFunction, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateCuFunctionNVX]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateCuFunctionNVX(device, pCreateInfo, pAllocator, pFunction, record_obj); } } return result; @@ -16083,34 +14429,34 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateCuFunctionNVX(VkDevice device, const VkCuFu VKAPI_ATTR void VKAPI_CALL DestroyCuModuleNVX(VkDevice device, VkCuModuleNVX module, const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyCuModuleNVX, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyCuModuleNVX]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyCuModuleNVX(device, module, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyCuModuleNVX]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyCuModuleNVX(device, module, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyCuModuleNVX); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyCuModuleNVX]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyCuModuleNVX(device, module, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyCuModuleNVX]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyCuModuleNVX(device, module, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyCuModuleNVX(device, module, pAllocator); + device_dispatch->DestroyCuModuleNVX(device, module, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyCuModuleNVX]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyCuModuleNVX(device, module, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyCuModuleNVX]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyCuModuleNVX(device, module, pAllocator, record_obj); } } } @@ -16119,34 +14465,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyCuFunctionNVX(VkDevice device, VkCuFunctionNVX const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyCuFunctionNVX, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyCuFunctionNVX]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyCuFunctionNVX(device, function, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyCuFunctionNVX]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyCuFunctionNVX(device, function, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyCuFunctionNVX); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyCuFunctionNVX]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyCuFunctionNVX(device, function, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyCuFunctionNVX]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyCuFunctionNVX(device, function, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyCuFunctionNVX(device, function, pAllocator); + device_dispatch->DestroyCuFunctionNVX(device, function, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyCuFunctionNVX]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyCuFunctionNVX(device, function, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyCuFunctionNVX]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyCuFunctionNVX(device, function, pAllocator, record_obj); } } } @@ -16154,34 +14500,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyCuFunctionNVX(VkDevice device, VkCuFunctionNVX VKAPI_ATTR void VKAPI_CALL CmdCuLaunchKernelNVX(VkCommandBuffer commandBuffer, const VkCuLaunchInfoNVX* pLaunchInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCuLaunchKernelNVX, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCuLaunchKernelNVX]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCuLaunchKernelNVX(commandBuffer, pLaunchInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCuLaunchKernelNVX]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCuLaunchKernelNVX(commandBuffer, pLaunchInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCuLaunchKernelNVX); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCuLaunchKernelNVX]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCuLaunchKernelNVX(commandBuffer, pLaunchInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCuLaunchKernelNVX]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCuLaunchKernelNVX(commandBuffer, pLaunchInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCuLaunchKernelNVX(commandBuffer, pLaunchInfo); + device_dispatch->CmdCuLaunchKernelNVX(commandBuffer, pLaunchInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCuLaunchKernelNVX]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCuLaunchKernelNVX(commandBuffer, pLaunchInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCuLaunchKernelNVX]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCuLaunchKernelNVX(commandBuffer, pLaunchInfo, record_obj); } } } @@ -16189,35 +14535,35 @@ VKAPI_ATTR void VKAPI_CALL CmdCuLaunchKernelNVX(VkCommandBuffer commandBuffer, c VKAPI_ATTR uint32_t VKAPI_CALL GetImageViewHandleNVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetImageViewHandleNVX, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetImageViewHandleNVX]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetImageViewHandleNVX(device, pInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetImageViewHandleNVX]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetImageViewHandleNVX(device, pInfo, error_obj); if (skip) return 0; } } RecordObject record_obj(vvl::Func::vkGetImageViewHandleNVX); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetImageViewHandleNVX]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetImageViewHandleNVX(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetImageViewHandleNVX]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetImageViewHandleNVX(device, pInfo, record_obj); } } uint32_t result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetImageViewHandleNVX(device, pInfo); + result = device_dispatch->GetImageViewHandleNVX(device, pInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetImageViewHandleNVX]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetImageViewHandleNVX(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetImageViewHandleNVX]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetImageViewHandleNVX(device, pInfo, record_obj); } } return result; @@ -16226,35 +14572,35 @@ VKAPI_ATTR uint32_t VKAPI_CALL GetImageViewHandleNVX(VkDevice device, const VkIm VKAPI_ATTR uint64_t VKAPI_CALL GetImageViewHandle64NVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetImageViewHandle64NVX, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetImageViewHandle64NVX]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetImageViewHandle64NVX(device, pInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetImageViewHandle64NVX]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetImageViewHandle64NVX(device, pInfo, error_obj); if (skip) return 0; } } RecordObject record_obj(vvl::Func::vkGetImageViewHandle64NVX); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetImageViewHandle64NVX]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetImageViewHandle64NVX(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetImageViewHandle64NVX]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetImageViewHandle64NVX(device, pInfo, record_obj); } } uint64_t result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetImageViewHandle64NVX(device, pInfo); + result = device_dispatch->GetImageViewHandle64NVX(device, pInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetImageViewHandle64NVX]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetImageViewHandle64NVX(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetImageViewHandle64NVX]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetImageViewHandle64NVX(device, pInfo, record_obj); } } return result; @@ -16264,36 +14610,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetImageViewAddressNVX(VkDevice device, VkImageVi VkImageViewAddressPropertiesNVX* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetImageViewAddressNVX, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetImageViewAddressNVX]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetImageViewAddressNVX(device, imageView, pProperties, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetImageViewAddressNVX]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetImageViewAddressNVX(device, imageView, pProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetImageViewAddressNVX); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetImageViewAddressNVX]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetImageViewAddressNVX(device, imageView, pProperties, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetImageViewAddressNVX]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetImageViewAddressNVX(device, imageView, pProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetImageViewAddressNVX(device, imageView, pProperties); + result = device_dispatch->GetImageViewAddressNVX(device, imageView, pProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetImageViewAddressNVX]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetImageViewAddressNVX(device, imageView, pProperties, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetImageViewAddressNVX]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetImageViewAddressNVX(device, imageView, pProperties, record_obj); } } return result; @@ -16304,37 +14650,38 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectCountAMD(VkCommandBuffer commandBuffer uint32_t stride) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDrawIndirectCountAMD, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDrawIndirectCountAMD]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDrawIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDrawIndirectCountAMD]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDrawIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDrawIndirectCountAMD); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDrawIndirectCountAMD]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDrawIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDrawIndirectCountAMD]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDrawIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, + stride, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDrawIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); + device_dispatch->CmdDrawIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, + stride); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDrawIndirectCountAMD]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDrawIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDrawIndirectCountAMD]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDrawIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, + stride, record_obj); } } } @@ -16344,39 +14691,39 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCountAMD(VkCommandBuffer comman uint32_t maxDrawCount, uint32_t stride) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDrawIndexedIndirectCountAMD, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDrawIndexedIndirectCountAMD]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDrawIndexedIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, - countBufferOffset, maxDrawCount, stride, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDrawIndexedIndirectCountAMD]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDrawIndexedIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDrawIndexedIndirectCountAMD); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDrawIndexedIndirectCountAMD]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDrawIndexedIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDrawIndexedIndirectCountAMD]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDrawIndexedIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDrawIndexedIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); + device_dispatch->CmdDrawIndexedIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, + stride); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDrawIndexedIndirectCountAMD]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDrawIndexedIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDrawIndexedIndirectCountAMD]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDrawIndexedIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride, record_obj); } } } @@ -16385,37 +14732,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetShaderInfoAMD(VkDevice device, VkPipeline pipe VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetShaderInfoAMD, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetShaderInfoAMD]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateGetShaderInfoAMD(device, pipeline, shaderStage, infoType, pInfoSize, pInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetShaderInfoAMD]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetShaderInfoAMD(device, pipeline, shaderStage, infoType, pInfoSize, pInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetShaderInfoAMD); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetShaderInfoAMD]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetShaderInfoAMD(device, pipeline, shaderStage, infoType, pInfoSize, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetShaderInfoAMD]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetShaderInfoAMD(device, pipeline, shaderStage, infoType, pInfoSize, pInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetShaderInfoAMD(device, pipeline, shaderStage, infoType, pInfoSize, pInfo); + result = device_dispatch->GetShaderInfoAMD(device, pipeline, shaderStage, infoType, pInfoSize, pInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetShaderInfoAMD]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetShaderInfoAMD(device, pipeline, shaderStage, infoType, pInfoSize, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetShaderInfoAMD]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetShaderInfoAMD(device, pipeline, shaderStage, infoType, pInfoSize, pInfo, record_obj); } } return result; @@ -16427,37 +14773,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateStreamDescriptorSurfaceGGP(VkInstance insta const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateStreamDescriptorSurfaceGGP, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateCreateStreamDescriptorSurfaceGGP(instance, pCreateInfo, pAllocator, pSurface, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateStreamDescriptorSurfaceGGP(instance, pCreateInfo, pAllocator, pSurface, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateStreamDescriptorSurfaceGGP); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateStreamDescriptorSurfaceGGP(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateStreamDescriptorSurfaceGGP(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateStreamDescriptorSurfaceGGP(instance, pCreateInfo, pAllocator, pSurface); + result = instance_dispatch->CreateStreamDescriptorSurfaceGGP(instance, pCreateInfo, pAllocator, pSurface); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateStreamDescriptorSurfaceGGP(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateStreamDescriptorSurfaceGGP(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } return result; @@ -16470,15 +14815,15 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceExternalImageFormatPropertiesNV( VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceExternalImageFormatPropertiesNV, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceExternalImageFormatPropertiesNV( + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceExternalImageFormatPropertiesNV( physicalDevice, format, type, tiling, usage, flags, externalHandleType, pExternalImageFormatProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } @@ -16486,24 +14831,24 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceExternalImageFormatPropertiesNV( RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceExternalImageFormatPropertiesNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceExternalImageFormatPropertiesNV( + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceExternalImageFormatPropertiesNV( physicalDevice, format, type, tiling, usage, flags, externalHandleType, pExternalImageFormatProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceExternalImageFormatPropertiesNV(physicalDevice, format, type, tiling, usage, flags, - externalHandleType, pExternalImageFormatProperties); + result = instance_dispatch->GetPhysicalDeviceExternalImageFormatPropertiesNV( + physicalDevice, format, type, tiling, usage, flags, externalHandleType, pExternalImageFormatProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceExternalImageFormatPropertiesNV( + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceExternalImageFormatPropertiesNV( physicalDevice, format, type, tiling, usage, flags, externalHandleType, pExternalImageFormatProperties, record_obj); } } @@ -16515,36 +14860,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandleNV(VkDevice device, VkDeviceM VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetMemoryWin32HandleNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetMemoryWin32HandleNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetMemoryWin32HandleNV(device, memory, handleType, pHandle, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetMemoryWin32HandleNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetMemoryWin32HandleNV(device, memory, handleType, pHandle, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetMemoryWin32HandleNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetMemoryWin32HandleNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetMemoryWin32HandleNV(device, memory, handleType, pHandle, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetMemoryWin32HandleNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetMemoryWin32HandleNV(device, memory, handleType, pHandle, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetMemoryWin32HandleNV(device, memory, handleType, pHandle); + result = device_dispatch->GetMemoryWin32HandleNV(device, memory, handleType, pHandle); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetMemoryWin32HandleNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetMemoryWin32HandleNV(device, memory, handleType, pHandle, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetMemoryWin32HandleNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetMemoryWin32HandleNV(device, memory, handleType, pHandle, record_obj); } } return result; @@ -16556,36 +14901,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateViSurfaceNN(VkInstance instance, const VkVi const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateViSurfaceNN, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateViSurfaceNN(instance, pCreateInfo, pAllocator, pSurface, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateViSurfaceNN(instance, pCreateInfo, pAllocator, pSurface, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateViSurfaceNN); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateViSurfaceNN(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateViSurfaceNN(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateViSurfaceNN(instance, pCreateInfo, pAllocator, pSurface); + result = instance_dispatch->CreateViSurfaceNN(instance, pCreateInfo, pAllocator, pSurface); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateViSurfaceNN(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateViSurfaceNN(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } return result; @@ -16596,37 +14941,35 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginConditionalRenderingEXT(VkCommandBuffer comma const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBeginConditionalRenderingEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBeginConditionalRenderingEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBeginConditionalRenderingEXT(commandBuffer, pConditionalRenderingBegin, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBeginConditionalRenderingEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBeginConditionalRenderingEXT(commandBuffer, pConditionalRenderingBegin, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBeginConditionalRenderingEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBeginConditionalRenderingEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBeginConditionalRenderingEXT(commandBuffer, pConditionalRenderingBegin, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBeginConditionalRenderingEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBeginConditionalRenderingEXT(commandBuffer, pConditionalRenderingBegin, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBeginConditionalRenderingEXT(commandBuffer, pConditionalRenderingBegin); + device_dispatch->CmdBeginConditionalRenderingEXT(commandBuffer, pConditionalRenderingBegin); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBeginConditionalRenderingEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBeginConditionalRenderingEXT(commandBuffer, pConditionalRenderingBegin, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBeginConditionalRenderingEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBeginConditionalRenderingEXT(commandBuffer, pConditionalRenderingBegin, record_obj); } } } @@ -16634,36 +14977,35 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginConditionalRenderingEXT(VkCommandBuffer comma VKAPI_ATTR void VKAPI_CALL CmdEndConditionalRenderingEXT(VkCommandBuffer commandBuffer) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdEndConditionalRenderingEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdEndConditionalRenderingEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdEndConditionalRenderingEXT(commandBuffer, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdEndConditionalRenderingEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdEndConditionalRenderingEXT(commandBuffer, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdEndConditionalRenderingEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdEndConditionalRenderingEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdEndConditionalRenderingEXT(commandBuffer, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdEndConditionalRenderingEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdEndConditionalRenderingEXT(commandBuffer, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdEndConditionalRenderingEXT(commandBuffer); + device_dispatch->CmdEndConditionalRenderingEXT(commandBuffer); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdEndConditionalRenderingEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdEndConditionalRenderingEXT(commandBuffer, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdEndConditionalRenderingEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdEndConditionalRenderingEXT(commandBuffer, record_obj); } } } @@ -16672,38 +15014,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewportWScalingNV(VkCommandBuffer commandBuffe const VkViewportWScalingNV* pViewportWScalings) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetViewportWScalingNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetViewportWScalingNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetViewportWScalingNV(commandBuffer, firstViewport, viewportCount, - pViewportWScalings, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetViewportWScalingNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetViewportWScalingNV(commandBuffer, firstViewport, viewportCount, pViewportWScalings, + error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetViewportWScalingNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetViewportWScalingNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetViewportWScalingNV(commandBuffer, firstViewport, viewportCount, pViewportWScalings, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetViewportWScalingNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetViewportWScalingNV(commandBuffer, firstViewport, viewportCount, pViewportWScalings, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetViewportWScalingNV(commandBuffer, firstViewport, viewportCount, pViewportWScalings); + device_dispatch->CmdSetViewportWScalingNV(commandBuffer, firstViewport, viewportCount, pViewportWScalings); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetViewportWScalingNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetViewportWScalingNV(commandBuffer, firstViewport, viewportCount, pViewportWScalings, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetViewportWScalingNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetViewportWScalingNV(commandBuffer, firstViewport, viewportCount, pViewportWScalings, record_obj); } } } @@ -16711,36 +15050,36 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewportWScalingNV(VkCommandBuffer commandBuffe VKAPI_ATTR VkResult VKAPI_CALL ReleaseDisplayEXT(VkPhysicalDevice physicalDevice, VkDisplayKHR display) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkReleaseDisplayEXT, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateReleaseDisplayEXT(physicalDevice, display, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateReleaseDisplayEXT(physicalDevice, display, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkReleaseDisplayEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordReleaseDisplayEXT(physicalDevice, display, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordReleaseDisplayEXT(physicalDevice, display, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchReleaseDisplayEXT(physicalDevice, display); + result = instance_dispatch->ReleaseDisplayEXT(physicalDevice, display); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordReleaseDisplayEXT(physicalDevice, display, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordReleaseDisplayEXT(physicalDevice, display, record_obj); } } return result; @@ -16750,36 +15089,36 @@ VKAPI_ATTR VkResult VKAPI_CALL ReleaseDisplayEXT(VkPhysicalDevice physicalDevice VKAPI_ATTR VkResult VKAPI_CALL AcquireXlibDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkAcquireXlibDisplayEXT, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateAcquireXlibDisplayEXT(physicalDevice, dpy, display, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateAcquireXlibDisplayEXT(physicalDevice, dpy, display, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkAcquireXlibDisplayEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordAcquireXlibDisplayEXT(physicalDevice, dpy, display, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordAcquireXlibDisplayEXT(physicalDevice, dpy, display, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchAcquireXlibDisplayEXT(physicalDevice, dpy, display); + result = instance_dispatch->AcquireXlibDisplayEXT(physicalDevice, dpy, display); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordAcquireXlibDisplayEXT(physicalDevice, dpy, display, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordAcquireXlibDisplayEXT(physicalDevice, dpy, display, record_obj); } } return result; @@ -16789,37 +15128,37 @@ VKAPI_ATTR VkResult VKAPI_CALL GetRandROutputDisplayEXT(VkPhysicalDevice physica VkDisplayKHR* pDisplay) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetRandROutputDisplayEXT, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetRandROutputDisplayEXT(physicalDevice, dpy, rrOutput, pDisplay, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetRandROutputDisplayEXT(physicalDevice, dpy, rrOutput, pDisplay, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetRandROutputDisplayEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetRandROutputDisplayEXT(physicalDevice, dpy, rrOutput, pDisplay, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetRandROutputDisplayEXT(physicalDevice, dpy, rrOutput, pDisplay, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetRandROutputDisplayEXT(physicalDevice, dpy, rrOutput, pDisplay); + result = instance_dispatch->GetRandROutputDisplayEXT(physicalDevice, dpy, rrOutput, pDisplay); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetRandROutputDisplayEXT(physicalDevice, dpy, rrOutput, pDisplay, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetRandROutputDisplayEXT(physicalDevice, dpy, rrOutput, pDisplay, record_obj); } } return result; @@ -16830,40 +15169,38 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilities2EXT(VkPhysic VkSurfaceCapabilities2EXT* pSurfaceCapabilities) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceSurfaceCapabilities2EXT, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceSurfaceCapabilities2EXT(physicalDevice, surface, - pSurfaceCapabilities, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceSurfaceCapabilities2EXT(physicalDevice, surface, pSurfaceCapabilities, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceSurfaceCapabilities2EXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceSurfaceCapabilities2EXT(physicalDevice, surface, pSurfaceCapabilities, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceSurfaceCapabilities2EXT(physicalDevice, surface, pSurfaceCapabilities, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceSurfaceCapabilities2EXT(physicalDevice, surface, pSurfaceCapabilities); + result = instance_dispatch->GetPhysicalDeviceSurfaceCapabilities2EXT(physicalDevice, surface, pSurfaceCapabilities); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceSurfaceCapabilities2EXT(physicalDevice, surface, pSurfaceCapabilities, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceSurfaceCapabilities2EXT(physicalDevice, surface, pSurfaceCapabilities, record_obj); } } return result; @@ -16873,36 +15210,36 @@ VKAPI_ATTR VkResult VKAPI_CALL DisplayPowerControlEXT(VkDevice device, VkDisplay const VkDisplayPowerInfoEXT* pDisplayPowerInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDisplayPowerControlEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDisplayPowerControlEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDisplayPowerControlEXT(device, display, pDisplayPowerInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDisplayPowerControlEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDisplayPowerControlEXT(device, display, pDisplayPowerInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkDisplayPowerControlEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDisplayPowerControlEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDisplayPowerControlEXT(device, display, pDisplayPowerInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDisplayPowerControlEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDisplayPowerControlEXT(device, display, pDisplayPowerInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchDisplayPowerControlEXT(device, display, pDisplayPowerInfo); + result = device_dispatch->DisplayPowerControlEXT(device, display, pDisplayPowerInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDisplayPowerControlEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDisplayPowerControlEXT(device, display, pDisplayPowerInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDisplayPowerControlEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDisplayPowerControlEXT(device, display, pDisplayPowerInfo, record_obj); } } return result; @@ -16912,36 +15249,36 @@ VKAPI_ATTR VkResult VKAPI_CALL RegisterDeviceEventEXT(VkDevice device, const VkD const VkAllocationCallbacks* pAllocator, VkFence* pFence) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkRegisterDeviceEventEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateRegisterDeviceEventEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateRegisterDeviceEventEXT(device, pDeviceEventInfo, pAllocator, pFence, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateRegisterDeviceEventEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateRegisterDeviceEventEXT(device, pDeviceEventInfo, pAllocator, pFence, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkRegisterDeviceEventEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordRegisterDeviceEventEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordRegisterDeviceEventEXT(device, pDeviceEventInfo, pAllocator, pFence, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordRegisterDeviceEventEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordRegisterDeviceEventEXT(device, pDeviceEventInfo, pAllocator, pFence, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchRegisterDeviceEventEXT(device, pDeviceEventInfo, pAllocator, pFence); + result = device_dispatch->RegisterDeviceEventEXT(device, pDeviceEventInfo, pAllocator, pFence); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordRegisterDeviceEventEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordRegisterDeviceEventEXT(device, pDeviceEventInfo, pAllocator, pFence, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordRegisterDeviceEventEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordRegisterDeviceEventEXT(device, pDeviceEventInfo, pAllocator, pFence, record_obj); } } return result; @@ -16952,37 +15289,36 @@ VKAPI_ATTR VkResult VKAPI_CALL RegisterDisplayEventEXT(VkDevice device, VkDispla const VkAllocationCallbacks* pAllocator, VkFence* pFence) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkRegisterDisplayEventEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateRegisterDisplayEventEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateRegisterDisplayEventEXT(device, display, pDisplayEventInfo, pAllocator, pFence, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateRegisterDisplayEventEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateRegisterDisplayEventEXT(device, display, pDisplayEventInfo, pAllocator, pFence, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkRegisterDisplayEventEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordRegisterDisplayEventEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordRegisterDisplayEventEXT(device, display, pDisplayEventInfo, pAllocator, pFence, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordRegisterDisplayEventEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordRegisterDisplayEventEXT(device, display, pDisplayEventInfo, pAllocator, pFence, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchRegisterDisplayEventEXT(device, display, pDisplayEventInfo, pAllocator, pFence); + result = device_dispatch->RegisterDisplayEventEXT(device, display, pDisplayEventInfo, pAllocator, pFence); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordRegisterDisplayEventEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordRegisterDisplayEventEXT(device, display, pDisplayEventInfo, pAllocator, pFence, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordRegisterDisplayEventEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordRegisterDisplayEventEXT(device, display, pDisplayEventInfo, pAllocator, pFence, record_obj); } } return result; @@ -16992,40 +15328,40 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainCounterEXT(VkDevice device, VkSwapcha VkSurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetSwapchainCounterEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetSwapchainCounterEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetSwapchainCounterEXT(device, swapchain, counter, pCounterValue, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetSwapchainCounterEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetSwapchainCounterEXT(device, swapchain, counter, pCounterValue, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetSwapchainCounterEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetSwapchainCounterEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetSwapchainCounterEXT(device, swapchain, counter, pCounterValue, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetSwapchainCounterEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetSwapchainCounterEXT(device, swapchain, counter, pCounterValue, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetSwapchainCounterEXT(device, swapchain, counter, pCounterValue); + result = device_dispatch->GetSwapchainCounterEXT(device, swapchain, counter, pCounterValue); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetSwapchainCounterEXT]) { - auto lock = intercept->WriteLock(); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetSwapchainCounterEXT]) { + auto lock = vo->WriteLock(); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordGetSwapchainCounterEXT(device, swapchain, counter, pCounterValue, record_obj); + vo->PostCallRecordGetSwapchainCounterEXT(device, swapchain, counter, pCounterValue, record_obj); } } return result; @@ -17035,41 +15371,40 @@ VKAPI_ATTR VkResult VKAPI_CALL GetRefreshCycleDurationGOOGLE(VkDevice device, Vk VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetRefreshCycleDurationGOOGLE, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetRefreshCycleDurationGOOGLE]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetRefreshCycleDurationGOOGLE(device, swapchain, pDisplayTimingProperties, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetRefreshCycleDurationGOOGLE]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetRefreshCycleDurationGOOGLE(device, swapchain, pDisplayTimingProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetRefreshCycleDurationGOOGLE); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetRefreshCycleDurationGOOGLE]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetRefreshCycleDurationGOOGLE(device, swapchain, pDisplayTimingProperties, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetRefreshCycleDurationGOOGLE]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetRefreshCycleDurationGOOGLE(device, swapchain, pDisplayTimingProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetRefreshCycleDurationGOOGLE(device, swapchain, pDisplayTimingProperties); + result = device_dispatch->GetRefreshCycleDurationGOOGLE(device, swapchain, pDisplayTimingProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetRefreshCycleDurationGOOGLE]) { - auto lock = intercept->WriteLock(); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetRefreshCycleDurationGOOGLE]) { + auto lock = vo->WriteLock(); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordGetRefreshCycleDurationGOOGLE(device, swapchain, pDisplayTimingProperties, record_obj); + vo->PostCallRecordGetRefreshCycleDurationGOOGLE(device, swapchain, pDisplayTimingProperties, record_obj); } } return result; @@ -17080,45 +15415,44 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPastPresentationTimingGOOGLE(VkDevice device, VkPastPresentationTimingGOOGLE* pPresentationTimings) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPastPresentationTimingGOOGLE, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetPastPresentationTimingGOOGLE]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPastPresentationTimingGOOGLE(device, swapchain, pPresentationTimingCount, - pPresentationTimings, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetPastPresentationTimingGOOGLE]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPastPresentationTimingGOOGLE(device, swapchain, pPresentationTimingCount, + pPresentationTimings, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPastPresentationTimingGOOGLE); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetPastPresentationTimingGOOGLE]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPastPresentationTimingGOOGLE(device, swapchain, pPresentationTimingCount, - pPresentationTimings, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetPastPresentationTimingGOOGLE]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPastPresentationTimingGOOGLE(device, swapchain, pPresentationTimingCount, pPresentationTimings, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPastPresentationTimingGOOGLE(device, swapchain, pPresentationTimingCount, pPresentationTimings); + result = + device_dispatch->GetPastPresentationTimingGOOGLE(device, swapchain, pPresentationTimingCount, pPresentationTimings); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetPastPresentationTimingGOOGLE]) { - auto lock = intercept->WriteLock(); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetPastPresentationTimingGOOGLE]) { + auto lock = vo->WriteLock(); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordGetPastPresentationTimingGOOGLE(device, swapchain, pPresentationTimingCount, - pPresentationTimings, record_obj); + vo->PostCallRecordGetPastPresentationTimingGOOGLE(device, swapchain, pPresentationTimingCount, pPresentationTimings, + record_obj); } } return result; @@ -17128,38 +15462,37 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDiscardRectangleEXT(VkCommandBuffer commandBuff uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDiscardRectangleEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDiscardRectangleEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDiscardRectangleEXT(commandBuffer, firstDiscardRectangle, discardRectangleCount, - pDiscardRectangles, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDiscardRectangleEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDiscardRectangleEXT(commandBuffer, firstDiscardRectangle, discardRectangleCount, + pDiscardRectangles, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDiscardRectangleEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDiscardRectangleEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDiscardRectangleEXT(commandBuffer, firstDiscardRectangle, discardRectangleCount, - pDiscardRectangles, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDiscardRectangleEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDiscardRectangleEXT(commandBuffer, firstDiscardRectangle, discardRectangleCount, + pDiscardRectangles, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDiscardRectangleEXT(commandBuffer, firstDiscardRectangle, discardRectangleCount, pDiscardRectangles); + device_dispatch->CmdSetDiscardRectangleEXT(commandBuffer, firstDiscardRectangle, discardRectangleCount, pDiscardRectangles); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDiscardRectangleEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDiscardRectangleEXT(commandBuffer, firstDiscardRectangle, discardRectangleCount, - pDiscardRectangles, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDiscardRectangleEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDiscardRectangleEXT(commandBuffer, firstDiscardRectangle, discardRectangleCount, + pDiscardRectangles, record_obj); } } } @@ -17167,37 +15500,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDiscardRectangleEXT(VkCommandBuffer commandBuff VKAPI_ATTR void VKAPI_CALL CmdSetDiscardRectangleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 discardRectangleEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDiscardRectangleEnableEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDiscardRectangleEnableEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDiscardRectangleEnableEXT(commandBuffer, discardRectangleEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDiscardRectangleEnableEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDiscardRectangleEnableEXT(commandBuffer, discardRectangleEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDiscardRectangleEnableEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDiscardRectangleEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDiscardRectangleEnableEXT(commandBuffer, discardRectangleEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDiscardRectangleEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDiscardRectangleEnableEXT(commandBuffer, discardRectangleEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDiscardRectangleEnableEXT(commandBuffer, discardRectangleEnable); + device_dispatch->CmdSetDiscardRectangleEnableEXT(commandBuffer, discardRectangleEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDiscardRectangleEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDiscardRectangleEnableEXT(commandBuffer, discardRectangleEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDiscardRectangleEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDiscardRectangleEnableEXT(commandBuffer, discardRectangleEnable, record_obj); } } } @@ -17206,36 +15537,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDiscardRectangleModeEXT(VkCommandBuffer command VkDiscardRectangleModeEXT discardRectangleMode) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDiscardRectangleModeEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDiscardRectangleModeEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDiscardRectangleModeEXT(commandBuffer, discardRectangleMode, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDiscardRectangleModeEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDiscardRectangleModeEXT(commandBuffer, discardRectangleMode, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDiscardRectangleModeEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDiscardRectangleModeEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDiscardRectangleModeEXT(commandBuffer, discardRectangleMode, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDiscardRectangleModeEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDiscardRectangleModeEXT(commandBuffer, discardRectangleMode, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDiscardRectangleModeEXT(commandBuffer, discardRectangleMode); + device_dispatch->CmdSetDiscardRectangleModeEXT(commandBuffer, discardRectangleMode); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDiscardRectangleModeEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDiscardRectangleModeEXT(commandBuffer, discardRectangleMode, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDiscardRectangleModeEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDiscardRectangleModeEXT(commandBuffer, discardRectangleMode, record_obj); } } } @@ -17244,34 +15574,34 @@ VKAPI_ATTR void VKAPI_CALL SetHdrMetadataEXT(VkDevice device, uint32_t swapchain const VkHdrMetadataEXT* pMetadata) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkSetHdrMetadataEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateSetHdrMetadataEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateSetHdrMetadataEXT(device, swapchainCount, pSwapchains, pMetadata, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateSetHdrMetadataEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateSetHdrMetadataEXT(device, swapchainCount, pSwapchains, pMetadata, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkSetHdrMetadataEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordSetHdrMetadataEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordSetHdrMetadataEXT(device, swapchainCount, pSwapchains, pMetadata, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordSetHdrMetadataEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordSetHdrMetadataEXT(device, swapchainCount, pSwapchains, pMetadata, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchSetHdrMetadataEXT(device, swapchainCount, pSwapchains, pMetadata); + device_dispatch->SetHdrMetadataEXT(device, swapchainCount, pSwapchains, pMetadata); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordSetHdrMetadataEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordSetHdrMetadataEXT(device, swapchainCount, pSwapchains, pMetadata, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordSetHdrMetadataEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordSetHdrMetadataEXT(device, swapchainCount, pSwapchains, pMetadata, record_obj); } } } @@ -17281,36 +15611,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateIOSSurfaceMVK(VkInstance instance, const Vk const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateIOSSurfaceMVK, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateIOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateIOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateIOSSurfaceMVK); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateIOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateIOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateIOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); + result = instance_dispatch->CreateIOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateIOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateIOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } return result; @@ -17322,36 +15652,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateMacOSSurfaceMVK(VkInstance instance, const const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateMacOSSurfaceMVK, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateMacOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateMacOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateMacOSSurfaceMVK); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateMacOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateMacOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateMacOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); + result = instance_dispatch->CreateMacOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateMacOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateMacOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } return result; @@ -17361,38 +15691,37 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateMacOSSurfaceMVK(VkInstance instance, const VKAPI_ATTR VkResult VKAPI_CALL SetDebugUtilsObjectNameEXT(VkDevice device, const VkDebugUtilsObjectNameInfoEXT* pNameInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkSetDebugUtilsObjectNameEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateSetDebugUtilsObjectNameEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateSetDebugUtilsObjectNameEXT(device, pNameInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateSetDebugUtilsObjectNameEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateSetDebugUtilsObjectNameEXT(device, pNameInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkSetDebugUtilsObjectNameEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordSetDebugUtilsObjectNameEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordSetDebugUtilsObjectNameEXT(device, pNameInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordSetDebugUtilsObjectNameEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordSetDebugUtilsObjectNameEXT(device, pNameInfo, record_obj); } } - layer_data->debug_report->SetUtilsObjectName(pNameInfo); + device_dispatch->debug_report->SetUtilsObjectName(pNameInfo); VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchSetDebugUtilsObjectNameEXT(device, pNameInfo); + result = device_dispatch->SetDebugUtilsObjectNameEXT(device, pNameInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordSetDebugUtilsObjectNameEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordSetDebugUtilsObjectNameEXT(device, pNameInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordSetDebugUtilsObjectNameEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordSetDebugUtilsObjectNameEXT(device, pNameInfo, record_obj); } } return result; @@ -17401,37 +15730,36 @@ VKAPI_ATTR VkResult VKAPI_CALL SetDebugUtilsObjectNameEXT(VkDevice device, const VKAPI_ATTR VkResult VKAPI_CALL SetDebugUtilsObjectTagEXT(VkDevice device, const VkDebugUtilsObjectTagInfoEXT* pTagInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkSetDebugUtilsObjectTagEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateSetDebugUtilsObjectTagEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateSetDebugUtilsObjectTagEXT(device, pTagInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateSetDebugUtilsObjectTagEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateSetDebugUtilsObjectTagEXT(device, pTagInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkSetDebugUtilsObjectTagEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordSetDebugUtilsObjectTagEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordSetDebugUtilsObjectTagEXT(device, pTagInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordSetDebugUtilsObjectTagEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordSetDebugUtilsObjectTagEXT(device, pTagInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchSetDebugUtilsObjectTagEXT(device, pTagInfo); + result = device_dispatch->SetDebugUtilsObjectTagEXT(device, pTagInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordSetDebugUtilsObjectTagEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordSetDebugUtilsObjectTagEXT(device, pTagInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordSetDebugUtilsObjectTagEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordSetDebugUtilsObjectTagEXT(device, pTagInfo, record_obj); } } return result; @@ -17440,36 +15768,35 @@ VKAPI_ATTR VkResult VKAPI_CALL SetDebugUtilsObjectTagEXT(VkDevice device, const VKAPI_ATTR void VKAPI_CALL QueueBeginDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkQueueBeginDebugUtilsLabelEXT, VulkanTypedHandle(queue, kVulkanObjectTypeQueue)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateQueueBeginDebugUtilsLabelEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateQueueBeginDebugUtilsLabelEXT(queue, pLabelInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateQueueBeginDebugUtilsLabelEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateQueueBeginDebugUtilsLabelEXT(queue, pLabelInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkQueueBeginDebugUtilsLabelEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordQueueBeginDebugUtilsLabelEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordQueueBeginDebugUtilsLabelEXT(queue, pLabelInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordQueueBeginDebugUtilsLabelEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordQueueBeginDebugUtilsLabelEXT(queue, pLabelInfo, record_obj); } } - layer_data->debug_report->BeginQueueDebugUtilsLabel(queue, pLabelInfo); + device_dispatch->debug_report->BeginQueueDebugUtilsLabel(queue, pLabelInfo); { VVL_ZoneScopedN("Dispatch"); - DispatchQueueBeginDebugUtilsLabelEXT(queue, pLabelInfo); + device_dispatch->QueueBeginDebugUtilsLabelEXT(queue, pLabelInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordQueueBeginDebugUtilsLabelEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordQueueBeginDebugUtilsLabelEXT(queue, pLabelInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordQueueBeginDebugUtilsLabelEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordQueueBeginDebugUtilsLabelEXT(queue, pLabelInfo, record_obj); } } } @@ -17477,36 +15804,35 @@ VKAPI_ATTR void VKAPI_CALL QueueBeginDebugUtilsLabelEXT(VkQueue queue, const VkD VKAPI_ATTR void VKAPI_CALL QueueEndDebugUtilsLabelEXT(VkQueue queue) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkQueueEndDebugUtilsLabelEXT, VulkanTypedHandle(queue, kVulkanObjectTypeQueue)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateQueueEndDebugUtilsLabelEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateQueueEndDebugUtilsLabelEXT(queue, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateQueueEndDebugUtilsLabelEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateQueueEndDebugUtilsLabelEXT(queue, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkQueueEndDebugUtilsLabelEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordQueueEndDebugUtilsLabelEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordQueueEndDebugUtilsLabelEXT(queue, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordQueueEndDebugUtilsLabelEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordQueueEndDebugUtilsLabelEXT(queue, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchQueueEndDebugUtilsLabelEXT(queue); + device_dispatch->QueueEndDebugUtilsLabelEXT(queue); } - layer_data->debug_report->EndQueueDebugUtilsLabel(queue); + device_dispatch->debug_report->EndQueueDebugUtilsLabel(queue); { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordQueueEndDebugUtilsLabelEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordQueueEndDebugUtilsLabelEXT(queue, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordQueueEndDebugUtilsLabelEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordQueueEndDebugUtilsLabelEXT(queue, record_obj); } } } @@ -17514,36 +15840,35 @@ VKAPI_ATTR void VKAPI_CALL QueueEndDebugUtilsLabelEXT(VkQueue queue) { VKAPI_ATTR void VKAPI_CALL QueueInsertDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkQueueInsertDebugUtilsLabelEXT, VulkanTypedHandle(queue, kVulkanObjectTypeQueue)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateQueueInsertDebugUtilsLabelEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateQueueInsertDebugUtilsLabelEXT(queue, pLabelInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateQueueInsertDebugUtilsLabelEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateQueueInsertDebugUtilsLabelEXT(queue, pLabelInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkQueueInsertDebugUtilsLabelEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordQueueInsertDebugUtilsLabelEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordQueueInsertDebugUtilsLabelEXT(queue, pLabelInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordQueueInsertDebugUtilsLabelEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordQueueInsertDebugUtilsLabelEXT(queue, pLabelInfo, record_obj); } } - layer_data->debug_report->InsertQueueDebugUtilsLabel(queue, pLabelInfo); + device_dispatch->debug_report->InsertQueueDebugUtilsLabel(queue, pLabelInfo); { VVL_ZoneScopedN("Dispatch"); - DispatchQueueInsertDebugUtilsLabelEXT(queue, pLabelInfo); + device_dispatch->QueueInsertDebugUtilsLabelEXT(queue, pLabelInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordQueueInsertDebugUtilsLabelEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordQueueInsertDebugUtilsLabelEXT(queue, pLabelInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordQueueInsertDebugUtilsLabelEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordQueueInsertDebugUtilsLabelEXT(queue, pLabelInfo, record_obj); } } } @@ -17551,36 +15876,35 @@ VKAPI_ATTR void VKAPI_CALL QueueInsertDebugUtilsLabelEXT(VkQueue queue, const Vk VKAPI_ATTR void VKAPI_CALL CmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBeginDebugUtilsLabelEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBeginDebugUtilsLabelEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBeginDebugUtilsLabelEXT(commandBuffer, pLabelInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBeginDebugUtilsLabelEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBeginDebugUtilsLabelEXT(commandBuffer, pLabelInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBeginDebugUtilsLabelEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBeginDebugUtilsLabelEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBeginDebugUtilsLabelEXT(commandBuffer, pLabelInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBeginDebugUtilsLabelEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBeginDebugUtilsLabelEXT(commandBuffer, pLabelInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBeginDebugUtilsLabelEXT(commandBuffer, pLabelInfo); + device_dispatch->CmdBeginDebugUtilsLabelEXT(commandBuffer, pLabelInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBeginDebugUtilsLabelEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBeginDebugUtilsLabelEXT(commandBuffer, pLabelInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBeginDebugUtilsLabelEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBeginDebugUtilsLabelEXT(commandBuffer, pLabelInfo, record_obj); } } } @@ -17588,35 +15912,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuf VKAPI_ATTR void VKAPI_CALL CmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdEndDebugUtilsLabelEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdEndDebugUtilsLabelEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdEndDebugUtilsLabelEXT(commandBuffer, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdEndDebugUtilsLabelEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdEndDebugUtilsLabelEXT(commandBuffer, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdEndDebugUtilsLabelEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdEndDebugUtilsLabelEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdEndDebugUtilsLabelEXT(commandBuffer, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdEndDebugUtilsLabelEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdEndDebugUtilsLabelEXT(commandBuffer, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdEndDebugUtilsLabelEXT(commandBuffer); + device_dispatch->CmdEndDebugUtilsLabelEXT(commandBuffer); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdEndDebugUtilsLabelEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdEndDebugUtilsLabelEXT(commandBuffer, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdEndDebugUtilsLabelEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdEndDebugUtilsLabelEXT(commandBuffer, record_obj); } } } @@ -17624,36 +15947,35 @@ VKAPI_ATTR void VKAPI_CALL CmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffe VKAPI_ATTR void VKAPI_CALL CmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdInsertDebugUtilsLabelEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdInsertDebugUtilsLabelEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdInsertDebugUtilsLabelEXT(commandBuffer, pLabelInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdInsertDebugUtilsLabelEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdInsertDebugUtilsLabelEXT(commandBuffer, pLabelInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdInsertDebugUtilsLabelEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdInsertDebugUtilsLabelEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdInsertDebugUtilsLabelEXT(commandBuffer, pLabelInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdInsertDebugUtilsLabelEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdInsertDebugUtilsLabelEXT(commandBuffer, pLabelInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdInsertDebugUtilsLabelEXT(commandBuffer, pLabelInfo); + device_dispatch->CmdInsertDebugUtilsLabelEXT(commandBuffer, pLabelInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdInsertDebugUtilsLabelEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdInsertDebugUtilsLabelEXT(commandBuffer, pLabelInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdInsertDebugUtilsLabelEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdInsertDebugUtilsLabelEXT(commandBuffer, pLabelInfo, record_obj); } } } @@ -17664,38 +15986,37 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT* pMessenger) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateDebugUtilsMessengerEXT, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateCreateDebugUtilsMessengerEXT(instance, pCreateInfo, pAllocator, pMessenger, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateDebugUtilsMessengerEXT(instance, pCreateInfo, pAllocator, pMessenger, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateDebugUtilsMessengerEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateDebugUtilsMessengerEXT(instance, pCreateInfo, pAllocator, pMessenger, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateDebugUtilsMessengerEXT(instance, pCreateInfo, pAllocator, pMessenger, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateDebugUtilsMessengerEXT(instance, pCreateInfo, pAllocator, pMessenger); + result = instance_dispatch->CreateDebugUtilsMessengerEXT(instance, pCreateInfo, pAllocator, pMessenger); } - LayerCreateMessengerCallback(layer_data->debug_report, false, pCreateInfo, pMessenger); + LayerCreateMessengerCallback(instance_dispatch->debug_report, false, pCreateInfo, pMessenger); record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateDebugUtilsMessengerEXT(instance, pCreateInfo, pAllocator, pMessenger, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateDebugUtilsMessengerEXT(instance, pCreateInfo, pAllocator, pMessenger, record_obj); } } return result; @@ -17705,35 +16026,35 @@ VKAPI_ATTR void VKAPI_CALL DestroyDebugUtilsMessengerEXT(VkInstance instance, Vk const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyDebugUtilsMessengerEXT, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyDebugUtilsMessengerEXT(instance, messenger, pAllocator, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyDebugUtilsMessengerEXT(instance, messenger, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyDebugUtilsMessengerEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyDebugUtilsMessengerEXT(instance, messenger, pAllocator, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyDebugUtilsMessengerEXT(instance, messenger, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyDebugUtilsMessengerEXT(instance, messenger, pAllocator); + instance_dispatch->DestroyDebugUtilsMessengerEXT(instance, messenger, pAllocator); } - LayerDestroyCallback(layer_data->debug_report, messenger); + LayerDestroyCallback(instance_dispatch->debug_report, messenger); { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyDebugUtilsMessengerEXT(instance, messenger, pAllocator, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyDebugUtilsMessengerEXT(instance, messenger, pAllocator, record_obj); } } } @@ -17743,35 +16064,35 @@ VKAPI_ATTR void VKAPI_CALL SubmitDebugUtilsMessageEXT(VkInstance instance, VkDeb const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkSubmitDebugUtilsMessageEXT, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateSubmitDebugUtilsMessageEXT(instance, messageSeverity, messageTypes, pCallbackData, - error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateSubmitDebugUtilsMessageEXT(instance, messageSeverity, messageTypes, pCallbackData, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkSubmitDebugUtilsMessageEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordSubmitDebugUtilsMessageEXT(instance, messageSeverity, messageTypes, pCallbackData, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordSubmitDebugUtilsMessageEXT(instance, messageSeverity, messageTypes, pCallbackData, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchSubmitDebugUtilsMessageEXT(instance, messageSeverity, messageTypes, pCallbackData); + instance_dispatch->SubmitDebugUtilsMessageEXT(instance, messageSeverity, messageTypes, pCallbackData); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordSubmitDebugUtilsMessageEXT(instance, messageSeverity, messageTypes, pCallbackData, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordSubmitDebugUtilsMessageEXT(instance, messageSeverity, messageTypes, pCallbackData, record_obj); } } } @@ -17781,40 +16102,38 @@ VKAPI_ATTR VkResult VKAPI_CALL GetAndroidHardwareBufferPropertiesANDROID(VkDevic VkAndroidHardwareBufferPropertiesANDROID* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetAndroidHardwareBufferPropertiesANDROID, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetAndroidHardwareBufferPropertiesANDROID]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetAndroidHardwareBufferPropertiesANDROID(device, buffer, pProperties, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetAndroidHardwareBufferPropertiesANDROID]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetAndroidHardwareBufferPropertiesANDROID(device, buffer, pProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetAndroidHardwareBufferPropertiesANDROID); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetAndroidHardwareBufferPropertiesANDROID]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetAndroidHardwareBufferPropertiesANDROID(device, buffer, pProperties, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetAndroidHardwareBufferPropertiesANDROID]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetAndroidHardwareBufferPropertiesANDROID(device, buffer, pProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetAndroidHardwareBufferPropertiesANDROID(device, buffer, pProperties); + result = device_dispatch->GetAndroidHardwareBufferPropertiesANDROID(device, buffer, pProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetAndroidHardwareBufferPropertiesANDROID]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetAndroidHardwareBufferPropertiesANDROID(device, buffer, pProperties, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetAndroidHardwareBufferPropertiesANDROID]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetAndroidHardwareBufferPropertiesANDROID(device, buffer, pProperties, record_obj); } } return result; @@ -17825,39 +16144,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryAndroidHardwareBufferANDROID(VkDevice de struct AHardwareBuffer** pBuffer) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetMemoryAndroidHardwareBufferANDROID, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetMemoryAndroidHardwareBufferANDROID]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetMemoryAndroidHardwareBufferANDROID(device, pInfo, pBuffer, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetMemoryAndroidHardwareBufferANDROID]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetMemoryAndroidHardwareBufferANDROID(device, pInfo, pBuffer, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetMemoryAndroidHardwareBufferANDROID); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetMemoryAndroidHardwareBufferANDROID]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetMemoryAndroidHardwareBufferANDROID(device, pInfo, pBuffer, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetMemoryAndroidHardwareBufferANDROID]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetMemoryAndroidHardwareBufferANDROID(device, pInfo, pBuffer, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetMemoryAndroidHardwareBufferANDROID(device, pInfo, pBuffer); + result = device_dispatch->GetMemoryAndroidHardwareBufferANDROID(device, pInfo, pBuffer); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetMemoryAndroidHardwareBufferANDROID]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetMemoryAndroidHardwareBufferANDROID(device, pInfo, pBuffer, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetMemoryAndroidHardwareBufferANDROID]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetMemoryAndroidHardwareBufferANDROID(device, pInfo, pBuffer, record_obj); } } return result; @@ -17871,43 +16187,40 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateExecutionGraphPipelinesAMDX(VkDevice device const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateExecutionGraphPipelinesAMDX, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCreateExecutionGraphPipelinesAMDX]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateExecutionGraphPipelinesAMDX(device, pipelineCache, createInfoCount, - pCreateInfos, pAllocator, pPipelines, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateExecutionGraphPipelinesAMDX]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateExecutionGraphPipelinesAMDX(device, pipelineCache, createInfoCount, pCreateInfos, + pAllocator, pPipelines, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateExecutionGraphPipelinesAMDX); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCreateExecutionGraphPipelinesAMDX]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateExecutionGraphPipelinesAMDX(device, pipelineCache, createInfoCount, pCreateInfos, - pAllocator, pPipelines, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateExecutionGraphPipelinesAMDX]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateExecutionGraphPipelinesAMDX(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, + pPipelines, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = - DispatchCreateExecutionGraphPipelinesAMDX(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); + result = device_dispatch->CreateExecutionGraphPipelinesAMDX(device, pipelineCache, createInfoCount, pCreateInfos, + pAllocator, pPipelines); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCreateExecutionGraphPipelinesAMDX]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateExecutionGraphPipelinesAMDX(device, pipelineCache, createInfoCount, pCreateInfos, - pAllocator, pPipelines, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateExecutionGraphPipelinesAMDX]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateExecutionGraphPipelinesAMDX(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, + pPipelines, record_obj); } } return result; @@ -17917,41 +16230,38 @@ VKAPI_ATTR VkResult VKAPI_CALL GetExecutionGraphPipelineScratchSizeAMDX(VkDevice VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetExecutionGraphPipelineScratchSizeAMDX, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetExecutionGraphPipelineScratchSizeAMDX]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateGetExecutionGraphPipelineScratchSizeAMDX(device, executionGraph, pSizeInfo, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetExecutionGraphPipelineScratchSizeAMDX]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetExecutionGraphPipelineScratchSizeAMDX(device, executionGraph, pSizeInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetExecutionGraphPipelineScratchSizeAMDX); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetExecutionGraphPipelineScratchSizeAMDX]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetExecutionGraphPipelineScratchSizeAMDX(device, executionGraph, pSizeInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetExecutionGraphPipelineScratchSizeAMDX]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetExecutionGraphPipelineScratchSizeAMDX(device, executionGraph, pSizeInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetExecutionGraphPipelineScratchSizeAMDX(device, executionGraph, pSizeInfo); + result = device_dispatch->GetExecutionGraphPipelineScratchSizeAMDX(device, executionGraph, pSizeInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetExecutionGraphPipelineScratchSizeAMDX]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetExecutionGraphPipelineScratchSizeAMDX(device, executionGraph, pSizeInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetExecutionGraphPipelineScratchSizeAMDX]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetExecutionGraphPipelineScratchSizeAMDX(device, executionGraph, pSizeInfo, record_obj); } } return result; @@ -17962,42 +16272,38 @@ VKAPI_ATTR VkResult VKAPI_CALL GetExecutionGraphPipelineNodeIndexAMDX(VkDevice d uint32_t* pNodeIndex) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetExecutionGraphPipelineNodeIndexAMDX, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetExecutionGraphPipelineNodeIndexAMDX]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetExecutionGraphPipelineNodeIndexAMDX(device, executionGraph, pNodeInfo, pNodeIndex, - error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetExecutionGraphPipelineNodeIndexAMDX]) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateGetExecutionGraphPipelineNodeIndexAMDX(device, executionGraph, pNodeInfo, pNodeIndex, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetExecutionGraphPipelineNodeIndexAMDX); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetExecutionGraphPipelineNodeIndexAMDX]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetExecutionGraphPipelineNodeIndexAMDX(device, executionGraph, pNodeInfo, pNodeIndex, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetExecutionGraphPipelineNodeIndexAMDX]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetExecutionGraphPipelineNodeIndexAMDX(device, executionGraph, pNodeInfo, pNodeIndex, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetExecutionGraphPipelineNodeIndexAMDX(device, executionGraph, pNodeInfo, pNodeIndex); + result = device_dispatch->GetExecutionGraphPipelineNodeIndexAMDX(device, executionGraph, pNodeInfo, pNodeIndex); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetExecutionGraphPipelineNodeIndexAMDX]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetExecutionGraphPipelineNodeIndexAMDX(device, executionGraph, pNodeInfo, pNodeIndex, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetExecutionGraphPipelineNodeIndexAMDX]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetExecutionGraphPipelineNodeIndexAMDX(device, executionGraph, pNodeInfo, pNodeIndex, record_obj); } } return result; @@ -18007,41 +16313,36 @@ VKAPI_ATTR void VKAPI_CALL CmdInitializeGraphScratchMemoryAMDX(VkCommandBuffer c VkDeviceAddress scratch, VkDeviceSize scratchSize) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdInitializeGraphScratchMemoryAMDX, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdInitializeGraphScratchMemoryAMDX]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdInitializeGraphScratchMemoryAMDX(commandBuffer, executionGraph, scratch, - scratchSize, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdInitializeGraphScratchMemoryAMDX]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdInitializeGraphScratchMemoryAMDX(commandBuffer, executionGraph, scratch, scratchSize, + error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdInitializeGraphScratchMemoryAMDX); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdInitializeGraphScratchMemoryAMDX]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdInitializeGraphScratchMemoryAMDX(commandBuffer, executionGraph, scratch, scratchSize, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdInitializeGraphScratchMemoryAMDX]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdInitializeGraphScratchMemoryAMDX(commandBuffer, executionGraph, scratch, scratchSize, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdInitializeGraphScratchMemoryAMDX(commandBuffer, executionGraph, scratch, scratchSize); + device_dispatch->CmdInitializeGraphScratchMemoryAMDX(commandBuffer, executionGraph, scratch, scratchSize); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdInitializeGraphScratchMemoryAMDX]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdInitializeGraphScratchMemoryAMDX(commandBuffer, executionGraph, scratch, scratchSize, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdInitializeGraphScratchMemoryAMDX]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdInitializeGraphScratchMemoryAMDX(commandBuffer, executionGraph, scratch, scratchSize, record_obj); } } } @@ -18050,34 +16351,34 @@ VKAPI_ATTR void VKAPI_CALL CmdDispatchGraphAMDX(VkCommandBuffer commandBuffer, V const VkDispatchGraphCountInfoAMDX* pCountInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDispatchGraphAMDX, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDispatchGraphAMDX]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDispatchGraphAMDX(commandBuffer, scratch, scratchSize, pCountInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDispatchGraphAMDX]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDispatchGraphAMDX(commandBuffer, scratch, scratchSize, pCountInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDispatchGraphAMDX); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDispatchGraphAMDX]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDispatchGraphAMDX(commandBuffer, scratch, scratchSize, pCountInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDispatchGraphAMDX]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDispatchGraphAMDX(commandBuffer, scratch, scratchSize, pCountInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDispatchGraphAMDX(commandBuffer, scratch, scratchSize, pCountInfo); + device_dispatch->CmdDispatchGraphAMDX(commandBuffer, scratch, scratchSize, pCountInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDispatchGraphAMDX]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDispatchGraphAMDX(commandBuffer, scratch, scratchSize, pCountInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDispatchGraphAMDX]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDispatchGraphAMDX(commandBuffer, scratch, scratchSize, pCountInfo, record_obj); } } } @@ -18086,37 +16387,35 @@ VKAPI_ATTR void VKAPI_CALL CmdDispatchGraphIndirectAMDX(VkCommandBuffer commandB VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX* pCountInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDispatchGraphIndirectAMDX, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDispatchGraphIndirectAMDX]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateCmdDispatchGraphIndirectAMDX(commandBuffer, scratch, scratchSize, pCountInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDispatchGraphIndirectAMDX]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDispatchGraphIndirectAMDX(commandBuffer, scratch, scratchSize, pCountInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDispatchGraphIndirectAMDX); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDispatchGraphIndirectAMDX]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDispatchGraphIndirectAMDX(commandBuffer, scratch, scratchSize, pCountInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDispatchGraphIndirectAMDX]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDispatchGraphIndirectAMDX(commandBuffer, scratch, scratchSize, pCountInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDispatchGraphIndirectAMDX(commandBuffer, scratch, scratchSize, pCountInfo); + device_dispatch->CmdDispatchGraphIndirectAMDX(commandBuffer, scratch, scratchSize, pCountInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDispatchGraphIndirectAMDX]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDispatchGraphIndirectAMDX(commandBuffer, scratch, scratchSize, pCountInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDispatchGraphIndirectAMDX]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDispatchGraphIndirectAMDX(commandBuffer, scratch, scratchSize, pCountInfo, record_obj); } } } @@ -18125,39 +16424,35 @@ VKAPI_ATTR void VKAPI_CALL CmdDispatchGraphIndirectCountAMDX(VkCommandBuffer com VkDeviceSize scratchSize, VkDeviceAddress countInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDispatchGraphIndirectCountAMDX, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDispatchGraphIndirectCountAMDX]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDispatchGraphIndirectCountAMDX(commandBuffer, scratch, scratchSize, countInfo, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDispatchGraphIndirectCountAMDX]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDispatchGraphIndirectCountAMDX(commandBuffer, scratch, scratchSize, countInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDispatchGraphIndirectCountAMDX); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDispatchGraphIndirectCountAMDX]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDispatchGraphIndirectCountAMDX(commandBuffer, scratch, scratchSize, countInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDispatchGraphIndirectCountAMDX]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDispatchGraphIndirectCountAMDX(commandBuffer, scratch, scratchSize, countInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDispatchGraphIndirectCountAMDX(commandBuffer, scratch, scratchSize, countInfo); + device_dispatch->CmdDispatchGraphIndirectCountAMDX(commandBuffer, scratch, scratchSize, countInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDispatchGraphIndirectCountAMDX]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDispatchGraphIndirectCountAMDX(commandBuffer, scratch, scratchSize, countInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDispatchGraphIndirectCountAMDX]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDispatchGraphIndirectCountAMDX(commandBuffer, scratch, scratchSize, countInfo, record_obj); } } } @@ -18167,35 +16462,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetSampleLocationsEXT(VkCommandBuffer commandBuffe const VkSampleLocationsInfoEXT* pSampleLocationsInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetSampleLocationsEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetSampleLocationsEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetSampleLocationsEXT(commandBuffer, pSampleLocationsInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetSampleLocationsEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetSampleLocationsEXT(commandBuffer, pSampleLocationsInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetSampleLocationsEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetSampleLocationsEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetSampleLocationsEXT(commandBuffer, pSampleLocationsInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetSampleLocationsEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetSampleLocationsEXT(commandBuffer, pSampleLocationsInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetSampleLocationsEXT(commandBuffer, pSampleLocationsInfo); + device_dispatch->CmdSetSampleLocationsEXT(commandBuffer, pSampleLocationsInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetSampleLocationsEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetSampleLocationsEXT(commandBuffer, pSampleLocationsInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetSampleLocationsEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetSampleLocationsEXT(commandBuffer, pSampleLocationsInfo, record_obj); } } } @@ -18204,38 +16498,37 @@ VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalD VkMultisamplePropertiesEXT* pMultisampleProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceMultisamplePropertiesEXT, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceMultisamplePropertiesEXT(physicalDevice, samples, - pMultisampleProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceMultisamplePropertiesEXT(physicalDevice, samples, pMultisampleProperties, + error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceMultisamplePropertiesEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceMultisamplePropertiesEXT(physicalDevice, samples, pMultisampleProperties, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceMultisamplePropertiesEXT(physicalDevice, samples, pMultisampleProperties, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPhysicalDeviceMultisamplePropertiesEXT(physicalDevice, samples, pMultisampleProperties); + instance_dispatch->GetPhysicalDeviceMultisamplePropertiesEXT(physicalDevice, samples, pMultisampleProperties); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceMultisamplePropertiesEXT(physicalDevice, samples, pMultisampleProperties, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceMultisamplePropertiesEXT(physicalDevice, samples, pMultisampleProperties, + record_obj); } } } @@ -18244,39 +16537,37 @@ VKAPI_ATTR VkResult VKAPI_CALL GetImageDrmFormatModifierPropertiesEXT(VkDevice d VkImageDrmFormatModifierPropertiesEXT* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetImageDrmFormatModifierPropertiesEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetImageDrmFormatModifierPropertiesEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetImageDrmFormatModifierPropertiesEXT(device, image, pProperties, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetImageDrmFormatModifierPropertiesEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetImageDrmFormatModifierPropertiesEXT(device, image, pProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetImageDrmFormatModifierPropertiesEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetImageDrmFormatModifierPropertiesEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetImageDrmFormatModifierPropertiesEXT(device, image, pProperties, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetImageDrmFormatModifierPropertiesEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetImageDrmFormatModifierPropertiesEXT(device, image, pProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetImageDrmFormatModifierPropertiesEXT(device, image, pProperties); + result = device_dispatch->GetImageDrmFormatModifierPropertiesEXT(device, image, pProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetImageDrmFormatModifierPropertiesEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetImageDrmFormatModifierPropertiesEXT(device, image, pProperties, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetImageDrmFormatModifierPropertiesEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetImageDrmFormatModifierPropertiesEXT(device, image, pProperties, record_obj); } } return result; @@ -18286,35 +16577,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBindShadingRateImageNV(VkCommandBuffer commandBuff VkImageLayout imageLayout) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBindShadingRateImageNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBindShadingRateImageNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBindShadingRateImageNV(commandBuffer, imageView, imageLayout, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBindShadingRateImageNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBindShadingRateImageNV(commandBuffer, imageView, imageLayout, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBindShadingRateImageNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBindShadingRateImageNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBindShadingRateImageNV(commandBuffer, imageView, imageLayout, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBindShadingRateImageNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBindShadingRateImageNV(commandBuffer, imageView, imageLayout, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBindShadingRateImageNV(commandBuffer, imageView, imageLayout); + device_dispatch->CmdBindShadingRateImageNV(commandBuffer, imageView, imageLayout); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBindShadingRateImageNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBindShadingRateImageNV(commandBuffer, imageView, imageLayout, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBindShadingRateImageNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBindShadingRateImageNV(commandBuffer, imageView, imageLayout, record_obj); } } } @@ -18324,41 +16614,38 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewportShadingRatePaletteNV(VkCommandBuffer co const VkShadingRatePaletteNV* pShadingRatePalettes) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetViewportShadingRatePaletteNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetViewportShadingRatePaletteNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetViewportShadingRatePaletteNV(commandBuffer, firstViewport, viewportCount, - pShadingRatePalettes, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetViewportShadingRatePaletteNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetViewportShadingRatePaletteNV(commandBuffer, firstViewport, viewportCount, + pShadingRatePalettes, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetViewportShadingRatePaletteNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetViewportShadingRatePaletteNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetViewportShadingRatePaletteNV(commandBuffer, firstViewport, viewportCount, - pShadingRatePalettes, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetViewportShadingRatePaletteNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetViewportShadingRatePaletteNV(commandBuffer, firstViewport, viewportCount, pShadingRatePalettes, + record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetViewportShadingRatePaletteNV(commandBuffer, firstViewport, viewportCount, pShadingRatePalettes); + device_dispatch->CmdSetViewportShadingRatePaletteNV(commandBuffer, firstViewport, viewportCount, pShadingRatePalettes); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetViewportShadingRatePaletteNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetViewportShadingRatePaletteNV(commandBuffer, firstViewport, viewportCount, - pShadingRatePalettes, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetViewportShadingRatePaletteNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetViewportShadingRatePaletteNV(commandBuffer, firstViewport, viewportCount, pShadingRatePalettes, + record_obj); } } } @@ -18368,38 +16655,37 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCoarseSampleOrderNV(VkCommandBuffer commandBuff const VkCoarseSampleOrderCustomNV* pCustomSampleOrders) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetCoarseSampleOrderNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetCoarseSampleOrderNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetCoarseSampleOrderNV(commandBuffer, sampleOrderType, customSampleOrderCount, - pCustomSampleOrders, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetCoarseSampleOrderNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetCoarseSampleOrderNV(commandBuffer, sampleOrderType, customSampleOrderCount, + pCustomSampleOrders, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetCoarseSampleOrderNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetCoarseSampleOrderNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetCoarseSampleOrderNV(commandBuffer, sampleOrderType, customSampleOrderCount, - pCustomSampleOrders, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetCoarseSampleOrderNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetCoarseSampleOrderNV(commandBuffer, sampleOrderType, customSampleOrderCount, pCustomSampleOrders, + record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetCoarseSampleOrderNV(commandBuffer, sampleOrderType, customSampleOrderCount, pCustomSampleOrders); + device_dispatch->CmdSetCoarseSampleOrderNV(commandBuffer, sampleOrderType, customSampleOrderCount, pCustomSampleOrders); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetCoarseSampleOrderNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetCoarseSampleOrderNV(commandBuffer, sampleOrderType, customSampleOrderCount, - pCustomSampleOrders, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetCoarseSampleOrderNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetCoarseSampleOrderNV(commandBuffer, sampleOrderType, customSampleOrderCount, pCustomSampleOrders, + record_obj); } } } @@ -18410,40 +16696,37 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateAccelerationStructureNV(VkDevice device, VkAccelerationStructureNV* pAccelerationStructure) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateAccelerationStructureNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCreateAccelerationStructureNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateAccelerationStructureNV(device, pCreateInfo, pAllocator, pAccelerationStructure, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateAccelerationStructureNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateAccelerationStructureNV(device, pCreateInfo, pAllocator, pAccelerationStructure, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateAccelerationStructureNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateAccelerationStructureNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateAccelerationStructureNV(device, pCreateInfo, pAllocator, pAccelerationStructure, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateAccelerationStructureNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateAccelerationStructureNV(device, pCreateInfo, pAllocator, pAccelerationStructure, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateAccelerationStructureNV(device, pCreateInfo, pAllocator, pAccelerationStructure); + result = device_dispatch->CreateAccelerationStructureNV(device, pCreateInfo, pAllocator, pAccelerationStructure); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateAccelerationStructureNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateAccelerationStructureNV(device, pCreateInfo, pAllocator, pAccelerationStructure, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateAccelerationStructureNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateAccelerationStructureNV(device, pCreateInfo, pAllocator, pAccelerationStructure, record_obj); } } return result; @@ -18453,35 +16736,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyAccelerationStructureNV(VkDevice device, VkAcc const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyAccelerationStructureNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyAccelerationStructureNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyAccelerationStructureNV(device, accelerationStructure, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyAccelerationStructureNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyAccelerationStructureNV(device, accelerationStructure, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyAccelerationStructureNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyAccelerationStructureNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyAccelerationStructureNV(device, accelerationStructure, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyAccelerationStructureNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyAccelerationStructureNV(device, accelerationStructure, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyAccelerationStructureNV(device, accelerationStructure, pAllocator); + device_dispatch->DestroyAccelerationStructureNV(device, accelerationStructure, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyAccelerationStructureNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyAccelerationStructureNV(device, accelerationStructure, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyAccelerationStructureNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyAccelerationStructureNV(device, accelerationStructure, pAllocator, record_obj); } } } @@ -18490,39 +16772,36 @@ VKAPI_ATTR void VKAPI_CALL GetAccelerationStructureMemoryRequirementsNV( VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetAccelerationStructureMemoryRequirementsNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetAccelerationStructureMemoryRequirementsNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetAccelerationStructureMemoryRequirementsNV(device, pInfo, pMemoryRequirements, - error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetAccelerationStructureMemoryRequirementsNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetAccelerationStructureMemoryRequirementsNV(device, pInfo, pMemoryRequirements, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetAccelerationStructureMemoryRequirementsNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetAccelerationStructureMemoryRequirementsNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetAccelerationStructureMemoryRequirementsNV(device, pInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetAccelerationStructureMemoryRequirementsNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetAccelerationStructureMemoryRequirementsNV(device, pInfo, pMemoryRequirements, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetAccelerationStructureMemoryRequirementsNV(device, pInfo, pMemoryRequirements); + device_dispatch->GetAccelerationStructureMemoryRequirementsNV(device, pInfo, pMemoryRequirements); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetAccelerationStructureMemoryRequirementsNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetAccelerationStructureMemoryRequirementsNV(device, pInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetAccelerationStructureMemoryRequirementsNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetAccelerationStructureMemoryRequirementsNV(device, pInfo, pMemoryRequirements, record_obj); } } } @@ -18531,39 +16810,36 @@ VKAPI_ATTR VkResult VKAPI_CALL BindAccelerationStructureMemoryNV(VkDevice device const VkBindAccelerationStructureMemoryInfoNV* pBindInfos) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkBindAccelerationStructureMemoryNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateBindAccelerationStructureMemoryNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateBindAccelerationStructureMemoryNV(device, bindInfoCount, pBindInfos, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateBindAccelerationStructureMemoryNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateBindAccelerationStructureMemoryNV(device, bindInfoCount, pBindInfos, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkBindAccelerationStructureMemoryNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordBindAccelerationStructureMemoryNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordBindAccelerationStructureMemoryNV(device, bindInfoCount, pBindInfos, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordBindAccelerationStructureMemoryNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordBindAccelerationStructureMemoryNV(device, bindInfoCount, pBindInfos, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchBindAccelerationStructureMemoryNV(device, bindInfoCount, pBindInfos); + result = device_dispatch->BindAccelerationStructureMemoryNV(device, bindInfoCount, pBindInfos); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordBindAccelerationStructureMemoryNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordBindAccelerationStructureMemoryNV(device, bindInfoCount, pBindInfos, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordBindAccelerationStructureMemoryNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordBindAccelerationStructureMemoryNV(device, bindInfoCount, pBindInfos, record_obj); } } return result; @@ -18576,41 +16852,39 @@ VKAPI_ATTR void VKAPI_CALL CmdBuildAccelerationStructureNV(VkCommandBuffer comma VkBuffer scratch, VkDeviceSize scratchOffset) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBuildAccelerationStructureNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBuildAccelerationStructureNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBuildAccelerationStructureNV(commandBuffer, pInfo, instanceData, instanceOffset, - update, dst, src, scratch, scratchOffset, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBuildAccelerationStructureNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBuildAccelerationStructureNV(commandBuffer, pInfo, instanceData, instanceOffset, update, + dst, src, scratch, scratchOffset, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBuildAccelerationStructureNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBuildAccelerationStructureNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBuildAccelerationStructureNV(commandBuffer, pInfo, instanceData, instanceOffset, update, dst, - src, scratch, scratchOffset, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBuildAccelerationStructureNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBuildAccelerationStructureNV(commandBuffer, pInfo, instanceData, instanceOffset, update, dst, src, + scratch, scratchOffset, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBuildAccelerationStructureNV(commandBuffer, pInfo, instanceData, instanceOffset, update, dst, src, scratch, - scratchOffset); + device_dispatch->CmdBuildAccelerationStructureNV(commandBuffer, pInfo, instanceData, instanceOffset, update, dst, src, + scratch, scratchOffset); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBuildAccelerationStructureNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBuildAccelerationStructureNV(commandBuffer, pInfo, instanceData, instanceOffset, update, - dst, src, scratch, scratchOffset, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBuildAccelerationStructureNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBuildAccelerationStructureNV(commandBuffer, pInfo, instanceData, instanceOffset, update, dst, src, + scratch, scratchOffset, record_obj); } } } @@ -18619,36 +16893,35 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyAccelerationStructureNV(VkCommandBuffer comman VkAccelerationStructureNV src, VkCopyAccelerationStructureModeKHR mode) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCopyAccelerationStructureNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCopyAccelerationStructureNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCopyAccelerationStructureNV(commandBuffer, dst, src, mode, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCopyAccelerationStructureNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCopyAccelerationStructureNV(commandBuffer, dst, src, mode, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCopyAccelerationStructureNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCopyAccelerationStructureNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCopyAccelerationStructureNV(commandBuffer, dst, src, mode, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCopyAccelerationStructureNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCopyAccelerationStructureNV(commandBuffer, dst, src, mode, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCopyAccelerationStructureNV(commandBuffer, dst, src, mode); + device_dispatch->CmdCopyAccelerationStructureNV(commandBuffer, dst, src, mode); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCopyAccelerationStructureNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCopyAccelerationStructureNV(commandBuffer, dst, src, mode, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCopyAccelerationStructureNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCopyAccelerationStructureNV(commandBuffer, dst, src, mode, record_obj); } } } @@ -18662,14 +16935,14 @@ VKAPI_ATTR void VKAPI_CALL CmdTraceRaysNV(VkCommandBuffer commandBuffer, VkBuffe uint32_t width, uint32_t height, uint32_t depth) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdTraceRaysNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdTraceRaysNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdTraceRaysNV( + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdTraceRaysNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdTraceRaysNV( commandBuffer, raygenShaderBindingTableBuffer, raygenShaderBindingOffset, missShaderBindingTableBuffer, missShaderBindingOffset, missShaderBindingStride, hitShaderBindingTableBuffer, hitShaderBindingOffset, hitShaderBindingStride, callableShaderBindingTableBuffer, callableShaderBindingOffset, callableShaderBindingStride, @@ -18680,32 +16953,32 @@ VKAPI_ATTR void VKAPI_CALL CmdTraceRaysNV(VkCommandBuffer commandBuffer, VkBuffe RecordObject record_obj(vvl::Func::vkCmdTraceRaysNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdTraceRaysNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdTraceRaysNV(commandBuffer, raygenShaderBindingTableBuffer, raygenShaderBindingOffset, - missShaderBindingTableBuffer, missShaderBindingOffset, missShaderBindingStride, - hitShaderBindingTableBuffer, hitShaderBindingOffset, hitShaderBindingStride, - callableShaderBindingTableBuffer, callableShaderBindingOffset, - callableShaderBindingStride, width, height, depth, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdTraceRaysNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdTraceRaysNV(commandBuffer, raygenShaderBindingTableBuffer, raygenShaderBindingOffset, + missShaderBindingTableBuffer, missShaderBindingOffset, missShaderBindingStride, + hitShaderBindingTableBuffer, hitShaderBindingOffset, hitShaderBindingStride, + callableShaderBindingTableBuffer, callableShaderBindingOffset, + callableShaderBindingStride, width, height, depth, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdTraceRaysNV(commandBuffer, raygenShaderBindingTableBuffer, raygenShaderBindingOffset, - missShaderBindingTableBuffer, missShaderBindingOffset, missShaderBindingStride, - hitShaderBindingTableBuffer, hitShaderBindingOffset, hitShaderBindingStride, - callableShaderBindingTableBuffer, callableShaderBindingOffset, callableShaderBindingStride, width, - height, depth); + device_dispatch->CmdTraceRaysNV(commandBuffer, raygenShaderBindingTableBuffer, raygenShaderBindingOffset, + missShaderBindingTableBuffer, missShaderBindingOffset, missShaderBindingStride, + hitShaderBindingTableBuffer, hitShaderBindingOffset, hitShaderBindingStride, + callableShaderBindingTableBuffer, callableShaderBindingOffset, callableShaderBindingStride, + width, height, depth); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdTraceRaysNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdTraceRaysNV(commandBuffer, raygenShaderBindingTableBuffer, raygenShaderBindingOffset, - missShaderBindingTableBuffer, missShaderBindingOffset, missShaderBindingStride, - hitShaderBindingTableBuffer, hitShaderBindingOffset, hitShaderBindingStride, - callableShaderBindingTableBuffer, callableShaderBindingOffset, - callableShaderBindingStride, width, height, depth, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdTraceRaysNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdTraceRaysNV(commandBuffer, raygenShaderBindingTableBuffer, raygenShaderBindingOffset, + missShaderBindingTableBuffer, missShaderBindingOffset, missShaderBindingStride, + hitShaderBindingTableBuffer, hitShaderBindingOffset, hitShaderBindingStride, + callableShaderBindingTableBuffer, callableShaderBindingOffset, + callableShaderBindingStride, width, height, depth, record_obj); } } } @@ -18714,42 +16987,39 @@ VKAPI_ATTR VkResult VKAPI_CALL GetRayTracingShaderGroupHandlesKHR(VkDevice devic uint32_t groupCount, size_t dataSize, void* pData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetRayTracingShaderGroupHandlesKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetRayTracingShaderGroupHandlesKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetRayTracingShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, dataSize, - pData, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetRayTracingShaderGroupHandlesKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetRayTracingShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, dataSize, pData, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetRayTracingShaderGroupHandlesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetRayTracingShaderGroupHandlesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetRayTracingShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, dataSize, pData, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetRayTracingShaderGroupHandlesKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetRayTracingShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, dataSize, pData, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetRayTracingShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, dataSize, pData); + result = device_dispatch->GetRayTracingShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, dataSize, pData); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetRayTracingShaderGroupHandlesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetRayTracingShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, dataSize, pData, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetRayTracingShaderGroupHandlesKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetRayTracingShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, dataSize, pData, + record_obj); } } return result; @@ -18759,42 +17029,39 @@ VKAPI_ATTR VkResult VKAPI_CALL GetRayTracingShaderGroupHandlesNV(VkDevice device uint32_t groupCount, size_t dataSize, void* pData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetRayTracingShaderGroupHandlesNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetRayTracingShaderGroupHandlesNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetRayTracingShaderGroupHandlesNV(device, pipeline, firstGroup, groupCount, dataSize, - pData, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetRayTracingShaderGroupHandlesNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetRayTracingShaderGroupHandlesNV(device, pipeline, firstGroup, groupCount, dataSize, pData, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetRayTracingShaderGroupHandlesNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetRayTracingShaderGroupHandlesNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetRayTracingShaderGroupHandlesNV(device, pipeline, firstGroup, groupCount, dataSize, pData, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetRayTracingShaderGroupHandlesNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetRayTracingShaderGroupHandlesNV(device, pipeline, firstGroup, groupCount, dataSize, pData, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetRayTracingShaderGroupHandlesNV(device, pipeline, firstGroup, groupCount, dataSize, pData); + result = device_dispatch->GetRayTracingShaderGroupHandlesNV(device, pipeline, firstGroup, groupCount, dataSize, pData); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetRayTracingShaderGroupHandlesNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetRayTracingShaderGroupHandlesNV(device, pipeline, firstGroup, groupCount, dataSize, pData, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetRayTracingShaderGroupHandlesNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetRayTracingShaderGroupHandlesNV(device, pipeline, firstGroup, groupCount, dataSize, pData, + record_obj); } } return result; @@ -18804,40 +17071,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetAccelerationStructureHandleNV(VkDevice device, size_t dataSize, void* pData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetAccelerationStructureHandleNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetAccelerationStructureHandleNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetAccelerationStructureHandleNV(device, accelerationStructure, dataSize, pData, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetAccelerationStructureHandleNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetAccelerationStructureHandleNV(device, accelerationStructure, dataSize, pData, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetAccelerationStructureHandleNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetAccelerationStructureHandleNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetAccelerationStructureHandleNV(device, accelerationStructure, dataSize, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetAccelerationStructureHandleNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetAccelerationStructureHandleNV(device, accelerationStructure, dataSize, pData, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetAccelerationStructureHandleNV(device, accelerationStructure, dataSize, pData); + result = device_dispatch->GetAccelerationStructureHandleNV(device, accelerationStructure, dataSize, pData); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetAccelerationStructureHandleNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetAccelerationStructureHandleNV(device, accelerationStructure, dataSize, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetAccelerationStructureHandleNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetAccelerationStructureHandleNV(device, accelerationStructure, dataSize, pData, record_obj); } } return result; @@ -18850,16 +17113,16 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteAccelerationStructuresPropertiesNV(VkCommandB uint32_t firstQuery) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdWriteAccelerationStructuresPropertiesNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdWriteAccelerationStructuresPropertiesNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdWriteAccelerationStructuresPropertiesNV( + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdWriteAccelerationStructuresPropertiesNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdWriteAccelerationStructuresPropertiesNV( commandBuffer, accelerationStructureCount, pAccelerationStructures, queryType, queryPool, firstQuery, error_obj); if (skip) return; } @@ -18867,24 +17130,22 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteAccelerationStructuresPropertiesNV(VkCommandB RecordObject record_obj(vvl::Func::vkCmdWriteAccelerationStructuresPropertiesNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdWriteAccelerationStructuresPropertiesNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdWriteAccelerationStructuresPropertiesNV( + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdWriteAccelerationStructuresPropertiesNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdWriteAccelerationStructuresPropertiesNV( commandBuffer, accelerationStructureCount, pAccelerationStructures, queryType, queryPool, firstQuery, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdWriteAccelerationStructuresPropertiesNV(commandBuffer, accelerationStructureCount, pAccelerationStructures, - queryType, queryPool, firstQuery); + device_dispatch->CmdWriteAccelerationStructuresPropertiesNV(commandBuffer, accelerationStructureCount, + pAccelerationStructures, queryType, queryPool, firstQuery); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdWriteAccelerationStructuresPropertiesNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdWriteAccelerationStructuresPropertiesNV( + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdWriteAccelerationStructuresPropertiesNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdWriteAccelerationStructuresPropertiesNV( commandBuffer, accelerationStructureCount, pAccelerationStructures, queryType, queryPool, firstQuery, record_obj); } } @@ -18893,36 +17154,36 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteAccelerationStructuresPropertiesNV(VkCommandB VKAPI_ATTR VkResult VKAPI_CALL CompileDeferredNV(VkDevice device, VkPipeline pipeline, uint32_t shader) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCompileDeferredNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCompileDeferredNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCompileDeferredNV(device, pipeline, shader, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCompileDeferredNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCompileDeferredNV(device, pipeline, shader, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCompileDeferredNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCompileDeferredNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCompileDeferredNV(device, pipeline, shader, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCompileDeferredNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCompileDeferredNV(device, pipeline, shader, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCompileDeferredNV(device, pipeline, shader); + result = device_dispatch->CompileDeferredNV(device, pipeline, shader); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCompileDeferredNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCompileDeferredNV(device, pipeline, shader, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCompileDeferredNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCompileDeferredNV(device, pipeline, shader, record_obj); } } return result; @@ -18933,42 +17194,39 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryHostPointerPropertiesEXT(VkDevice device VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetMemoryHostPointerPropertiesEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetMemoryHostPointerPropertiesEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetMemoryHostPointerPropertiesEXT(device, handleType, pHostPointer, - pMemoryHostPointerProperties, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetMemoryHostPointerPropertiesEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetMemoryHostPointerPropertiesEXT(device, handleType, pHostPointer, + pMemoryHostPointerProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetMemoryHostPointerPropertiesEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetMemoryHostPointerPropertiesEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetMemoryHostPointerPropertiesEXT(device, handleType, pHostPointer, - pMemoryHostPointerProperties, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetMemoryHostPointerPropertiesEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetMemoryHostPointerPropertiesEXT(device, handleType, pHostPointer, pMemoryHostPointerProperties, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetMemoryHostPointerPropertiesEXT(device, handleType, pHostPointer, pMemoryHostPointerProperties); + result = device_dispatch->GetMemoryHostPointerPropertiesEXT(device, handleType, pHostPointer, pMemoryHostPointerProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetMemoryHostPointerPropertiesEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetMemoryHostPointerPropertiesEXT(device, handleType, pHostPointer, - pMemoryHostPointerProperties, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetMemoryHostPointerPropertiesEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetMemoryHostPointerPropertiesEXT(device, handleType, pHostPointer, pMemoryHostPointerProperties, + record_obj); } } return result; @@ -18978,36 +17236,35 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteBufferMarkerAMD(VkCommandBuffer commandBuffer VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdWriteBufferMarkerAMD, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdWriteBufferMarkerAMD]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdWriteBufferMarkerAMD(commandBuffer, pipelineStage, dstBuffer, dstOffset, marker, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdWriteBufferMarkerAMD]) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateCmdWriteBufferMarkerAMD(commandBuffer, pipelineStage, dstBuffer, dstOffset, marker, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdWriteBufferMarkerAMD); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdWriteBufferMarkerAMD]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdWriteBufferMarkerAMD(commandBuffer, pipelineStage, dstBuffer, dstOffset, marker, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdWriteBufferMarkerAMD]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdWriteBufferMarkerAMD(commandBuffer, pipelineStage, dstBuffer, dstOffset, marker, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdWriteBufferMarkerAMD(commandBuffer, pipelineStage, dstBuffer, dstOffset, marker); + device_dispatch->CmdWriteBufferMarkerAMD(commandBuffer, pipelineStage, dstBuffer, dstOffset, marker); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdWriteBufferMarkerAMD]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdWriteBufferMarkerAMD(commandBuffer, pipelineStage, dstBuffer, dstOffset, marker, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdWriteBufferMarkerAMD]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdWriteBufferMarkerAMD(commandBuffer, pipelineStage, dstBuffer, dstOffset, marker, record_obj); } } } @@ -19016,36 +17273,34 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteBufferMarker2AMD(VkCommandBuffer commandBuffe VkDeviceSize dstOffset, uint32_t marker) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdWriteBufferMarker2AMD, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdWriteBufferMarker2AMD]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateCmdWriteBufferMarker2AMD(commandBuffer, stage, dstBuffer, dstOffset, marker, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdWriteBufferMarker2AMD]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdWriteBufferMarker2AMD(commandBuffer, stage, dstBuffer, dstOffset, marker, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdWriteBufferMarker2AMD); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdWriteBufferMarker2AMD]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdWriteBufferMarker2AMD(commandBuffer, stage, dstBuffer, dstOffset, marker, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdWriteBufferMarker2AMD]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdWriteBufferMarker2AMD(commandBuffer, stage, dstBuffer, dstOffset, marker, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdWriteBufferMarker2AMD(commandBuffer, stage, dstBuffer, dstOffset, marker); + device_dispatch->CmdWriteBufferMarker2AMD(commandBuffer, stage, dstBuffer, dstOffset, marker); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdWriteBufferMarker2AMD]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdWriteBufferMarker2AMD(commandBuffer, stage, dstBuffer, dstOffset, marker, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdWriteBufferMarker2AMD]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdWriteBufferMarker2AMD(commandBuffer, stage, dstBuffer, dstOffset, marker, record_obj); } } } @@ -19055,40 +17310,40 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPh VkTimeDomainKHR* pTimeDomains) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceCalibrateableTimeDomainsEXT, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceCalibrateableTimeDomainsEXT(physicalDevice, pTimeDomainCount, - pTimeDomains, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceCalibrateableTimeDomainsEXT(physicalDevice, pTimeDomainCount, pTimeDomains, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceCalibrateableTimeDomainsEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceCalibrateableTimeDomainsEXT(physicalDevice, pTimeDomainCount, pTimeDomains, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceCalibrateableTimeDomainsEXT(physicalDevice, pTimeDomainCount, pTimeDomains, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceCalibrateableTimeDomainsEXT(physicalDevice, pTimeDomainCount, pTimeDomains); + result = instance_dispatch->GetPhysicalDeviceCalibrateableTimeDomainsEXT(physicalDevice, pTimeDomainCount, pTimeDomains); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceCalibrateableTimeDomainsEXT(physicalDevice, pTimeDomainCount, pTimeDomains, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceCalibrateableTimeDomainsEXT(physicalDevice, pTimeDomainCount, pTimeDomains, + record_obj); } } return result; @@ -19099,40 +17354,39 @@ VKAPI_ATTR VkResult VKAPI_CALL GetCalibratedTimestampsEXT(VkDevice device, uint3 uint64_t* pTimestamps, uint64_t* pMaxDeviation) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetCalibratedTimestampsEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetCalibratedTimestampsEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetCalibratedTimestampsEXT(device, timestampCount, pTimestampInfos, pTimestamps, - pMaxDeviation, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetCalibratedTimestampsEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetCalibratedTimestampsEXT(device, timestampCount, pTimestampInfos, pTimestamps, + pMaxDeviation, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetCalibratedTimestampsEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetCalibratedTimestampsEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetCalibratedTimestampsEXT(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetCalibratedTimestampsEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetCalibratedTimestampsEXT(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetCalibratedTimestampsEXT(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation); + result = device_dispatch->GetCalibratedTimestampsEXT(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetCalibratedTimestampsEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetCalibratedTimestampsEXT(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetCalibratedTimestampsEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetCalibratedTimestampsEXT(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation, + record_obj); } } return result; @@ -19141,34 +17395,34 @@ VKAPI_ATTR VkResult VKAPI_CALL GetCalibratedTimestampsEXT(VkDevice device, uint3 VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDrawMeshTasksNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDrawMeshTasksNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDrawMeshTasksNV(commandBuffer, taskCount, firstTask, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDrawMeshTasksNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDrawMeshTasksNV(commandBuffer, taskCount, firstTask, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDrawMeshTasksNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDrawMeshTasksNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDrawMeshTasksNV(commandBuffer, taskCount, firstTask, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDrawMeshTasksNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDrawMeshTasksNV(commandBuffer, taskCount, firstTask, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDrawMeshTasksNV(commandBuffer, taskCount, firstTask); + device_dispatch->CmdDrawMeshTasksNV(commandBuffer, taskCount, firstTask); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDrawMeshTasksNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDrawMeshTasksNV(commandBuffer, taskCount, firstTask, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDrawMeshTasksNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDrawMeshTasksNV(commandBuffer, taskCount, firstTask, record_obj); } } } @@ -19177,37 +17431,35 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectNV(VkCommandBuffer commandBuf uint32_t drawCount, uint32_t stride) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDrawMeshTasksIndirectNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDrawMeshTasksIndirectNV]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateCmdDrawMeshTasksIndirectNV(commandBuffer, buffer, offset, drawCount, stride, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDrawMeshTasksIndirectNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDrawMeshTasksIndirectNV(commandBuffer, buffer, offset, drawCount, stride, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDrawMeshTasksIndirectNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDrawMeshTasksIndirectNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDrawMeshTasksIndirectNV(commandBuffer, buffer, offset, drawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDrawMeshTasksIndirectNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDrawMeshTasksIndirectNV(commandBuffer, buffer, offset, drawCount, stride, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDrawMeshTasksIndirectNV(commandBuffer, buffer, offset, drawCount, stride); + device_dispatch->CmdDrawMeshTasksIndirectNV(commandBuffer, buffer, offset, drawCount, stride); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDrawMeshTasksIndirectNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDrawMeshTasksIndirectNV(commandBuffer, buffer, offset, drawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDrawMeshTasksIndirectNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDrawMeshTasksIndirectNV(commandBuffer, buffer, offset, drawCount, stride, record_obj); } } } @@ -19217,41 +17469,39 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectCountNV(VkCommandBuffer comma uint32_t maxDrawCount, uint32_t stride) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDrawMeshTasksIndirectCountNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDrawMeshTasksIndirectCountNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDrawMeshTasksIndirectCountNV(commandBuffer, buffer, offset, countBuffer, - countBufferOffset, maxDrawCount, stride, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDrawMeshTasksIndirectCountNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDrawMeshTasksIndirectCountNV(commandBuffer, buffer, offset, countBuffer, + countBufferOffset, maxDrawCount, stride, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDrawMeshTasksIndirectCountNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDrawMeshTasksIndirectCountNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDrawMeshTasksIndirectCountNV(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDrawMeshTasksIndirectCountNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDrawMeshTasksIndirectCountNV(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDrawMeshTasksIndirectCountNV(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, - stride); + device_dispatch->CmdDrawMeshTasksIndirectCountNV(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDrawMeshTasksIndirectCountNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDrawMeshTasksIndirectCountNV(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDrawMeshTasksIndirectCountNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDrawMeshTasksIndirectCountNV(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride, record_obj); } } } @@ -19261,40 +17511,39 @@ VKAPI_ATTR void VKAPI_CALL CmdSetExclusiveScissorEnableNV(VkCommandBuffer comman const VkBool32* pExclusiveScissorEnables) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetExclusiveScissorEnableNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetExclusiveScissorEnableNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetExclusiveScissorEnableNV( - commandBuffer, firstExclusiveScissor, exclusiveScissorCount, pExclusiveScissorEnables, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetExclusiveScissorEnableNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetExclusiveScissorEnableNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, + pExclusiveScissorEnables, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetExclusiveScissorEnableNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetExclusiveScissorEnableNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetExclusiveScissorEnableNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, - pExclusiveScissorEnables, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetExclusiveScissorEnableNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetExclusiveScissorEnableNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, + pExclusiveScissorEnables, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetExclusiveScissorEnableNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, - pExclusiveScissorEnables); + device_dispatch->CmdSetExclusiveScissorEnableNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, + pExclusiveScissorEnables); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetExclusiveScissorEnableNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetExclusiveScissorEnableNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, - pExclusiveScissorEnables, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetExclusiveScissorEnableNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetExclusiveScissorEnableNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, + pExclusiveScissorEnables, record_obj); } } } @@ -19303,38 +17552,37 @@ VKAPI_ATTR void VKAPI_CALL CmdSetExclusiveScissorNV(VkCommandBuffer commandBuffe uint32_t exclusiveScissorCount, const VkRect2D* pExclusiveScissors) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetExclusiveScissorNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetExclusiveScissorNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetExclusiveScissorNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, - pExclusiveScissors, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetExclusiveScissorNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetExclusiveScissorNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, + pExclusiveScissors, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetExclusiveScissorNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetExclusiveScissorNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetExclusiveScissorNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, - pExclusiveScissors, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetExclusiveScissorNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetExclusiveScissorNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, + pExclusiveScissors, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetExclusiveScissorNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, pExclusiveScissors); + device_dispatch->CmdSetExclusiveScissorNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, pExclusiveScissors); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetExclusiveScissorNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetExclusiveScissorNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, - pExclusiveScissors, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetExclusiveScissorNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetExclusiveScissorNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, + pExclusiveScissors, record_obj); } } } @@ -19342,34 +17590,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetExclusiveScissorNV(VkCommandBuffer commandBuffe VKAPI_ATTR void VKAPI_CALL CmdSetCheckpointNV(VkCommandBuffer commandBuffer, const void* pCheckpointMarker) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetCheckpointNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetCheckpointNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetCheckpointNV(commandBuffer, pCheckpointMarker, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetCheckpointNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetCheckpointNV(commandBuffer, pCheckpointMarker, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetCheckpointNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetCheckpointNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetCheckpointNV(commandBuffer, pCheckpointMarker, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetCheckpointNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetCheckpointNV(commandBuffer, pCheckpointMarker, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetCheckpointNV(commandBuffer, pCheckpointMarker); + device_dispatch->CmdSetCheckpointNV(commandBuffer, pCheckpointMarker); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetCheckpointNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetCheckpointNV(commandBuffer, pCheckpointMarker, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetCheckpointNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetCheckpointNV(commandBuffer, pCheckpointMarker, record_obj); } } } @@ -19378,35 +17626,34 @@ VKAPI_ATTR void VKAPI_CALL GetQueueCheckpointDataNV(VkQueue queue, uint32_t* pCh VkCheckpointDataNV* pCheckpointData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetQueueCheckpointDataNV, VulkanTypedHandle(queue, kVulkanObjectTypeQueue)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetQueueCheckpointDataNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetQueueCheckpointDataNV(queue, pCheckpointDataCount, pCheckpointData, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetQueueCheckpointDataNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetQueueCheckpointDataNV(queue, pCheckpointDataCount, pCheckpointData, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetQueueCheckpointDataNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetQueueCheckpointDataNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetQueueCheckpointDataNV(queue, pCheckpointDataCount, pCheckpointData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetQueueCheckpointDataNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetQueueCheckpointDataNV(queue, pCheckpointDataCount, pCheckpointData, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetQueueCheckpointDataNV(queue, pCheckpointDataCount, pCheckpointData); + device_dispatch->GetQueueCheckpointDataNV(queue, pCheckpointDataCount, pCheckpointData); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetQueueCheckpointDataNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetQueueCheckpointDataNV(queue, pCheckpointDataCount, pCheckpointData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetQueueCheckpointDataNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetQueueCheckpointDataNV(queue, pCheckpointDataCount, pCheckpointData, record_obj); } } } @@ -19415,35 +17662,34 @@ VKAPI_ATTR void VKAPI_CALL GetQueueCheckpointData2NV(VkQueue queue, uint32_t* pC VkCheckpointData2NV* pCheckpointData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetQueueCheckpointData2NV, VulkanTypedHandle(queue, kVulkanObjectTypeQueue)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetQueueCheckpointData2NV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetQueueCheckpointData2NV(queue, pCheckpointDataCount, pCheckpointData, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetQueueCheckpointData2NV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetQueueCheckpointData2NV(queue, pCheckpointDataCount, pCheckpointData, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetQueueCheckpointData2NV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetQueueCheckpointData2NV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetQueueCheckpointData2NV(queue, pCheckpointDataCount, pCheckpointData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetQueueCheckpointData2NV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetQueueCheckpointData2NV(queue, pCheckpointDataCount, pCheckpointData, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetQueueCheckpointData2NV(queue, pCheckpointDataCount, pCheckpointData); + device_dispatch->GetQueueCheckpointData2NV(queue, pCheckpointDataCount, pCheckpointData); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetQueueCheckpointData2NV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetQueueCheckpointData2NV(queue, pCheckpointDataCount, pCheckpointData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetQueueCheckpointData2NV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetQueueCheckpointData2NV(queue, pCheckpointDataCount, pCheckpointData, record_obj); } } } @@ -19452,37 +17698,36 @@ VKAPI_ATTR VkResult VKAPI_CALL InitializePerformanceApiINTEL(VkDevice device, const VkInitializePerformanceApiInfoINTEL* pInitializeInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkInitializePerformanceApiINTEL, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateInitializePerformanceApiINTEL]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateInitializePerformanceApiINTEL(device, pInitializeInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateInitializePerformanceApiINTEL]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateInitializePerformanceApiINTEL(device, pInitializeInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkInitializePerformanceApiINTEL); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordInitializePerformanceApiINTEL]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordInitializePerformanceApiINTEL(device, pInitializeInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordInitializePerformanceApiINTEL]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordInitializePerformanceApiINTEL(device, pInitializeInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchInitializePerformanceApiINTEL(device, pInitializeInfo); + result = device_dispatch->InitializePerformanceApiINTEL(device, pInitializeInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordInitializePerformanceApiINTEL]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordInitializePerformanceApiINTEL(device, pInitializeInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordInitializePerformanceApiINTEL]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordInitializePerformanceApiINTEL(device, pInitializeInfo, record_obj); } } return result; @@ -19491,36 +17736,34 @@ VKAPI_ATTR VkResult VKAPI_CALL InitializePerformanceApiINTEL(VkDevice device, VKAPI_ATTR void VKAPI_CALL UninitializePerformanceApiINTEL(VkDevice device) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkUninitializePerformanceApiINTEL, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateUninitializePerformanceApiINTEL]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateUninitializePerformanceApiINTEL(device, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateUninitializePerformanceApiINTEL]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateUninitializePerformanceApiINTEL(device, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkUninitializePerformanceApiINTEL); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordUninitializePerformanceApiINTEL]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordUninitializePerformanceApiINTEL(device, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordUninitializePerformanceApiINTEL]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordUninitializePerformanceApiINTEL(device, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchUninitializePerformanceApiINTEL(device); + device_dispatch->UninitializePerformanceApiINTEL(device); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordUninitializePerformanceApiINTEL]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordUninitializePerformanceApiINTEL(device, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordUninitializePerformanceApiINTEL]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordUninitializePerformanceApiINTEL(device, record_obj); } } } @@ -19529,38 +17772,37 @@ VKAPI_ATTR VkResult VKAPI_CALL CmdSetPerformanceMarkerINTEL(VkCommandBuffer comm const VkPerformanceMarkerInfoINTEL* pMarkerInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetPerformanceMarkerINTEL, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetPerformanceMarkerINTEL]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetPerformanceMarkerINTEL(commandBuffer, pMarkerInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetPerformanceMarkerINTEL]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetPerformanceMarkerINTEL(commandBuffer, pMarkerInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCmdSetPerformanceMarkerINTEL); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetPerformanceMarkerINTEL]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetPerformanceMarkerINTEL(commandBuffer, pMarkerInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetPerformanceMarkerINTEL]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetPerformanceMarkerINTEL(commandBuffer, pMarkerInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCmdSetPerformanceMarkerINTEL(commandBuffer, pMarkerInfo); + result = device_dispatch->CmdSetPerformanceMarkerINTEL(commandBuffer, pMarkerInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetPerformanceMarkerINTEL]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetPerformanceMarkerINTEL(commandBuffer, pMarkerInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetPerformanceMarkerINTEL]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetPerformanceMarkerINTEL(commandBuffer, pMarkerInfo, record_obj); } } return result; @@ -19570,40 +17812,37 @@ VKAPI_ATTR VkResult VKAPI_CALL CmdSetPerformanceStreamMarkerINTEL(VkCommandBuffe const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetPerformanceStreamMarkerINTEL, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetPerformanceStreamMarkerINTEL]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetPerformanceStreamMarkerINTEL(commandBuffer, pMarkerInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetPerformanceStreamMarkerINTEL]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetPerformanceStreamMarkerINTEL(commandBuffer, pMarkerInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCmdSetPerformanceStreamMarkerINTEL); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetPerformanceStreamMarkerINTEL]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetPerformanceStreamMarkerINTEL(commandBuffer, pMarkerInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetPerformanceStreamMarkerINTEL]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetPerformanceStreamMarkerINTEL(commandBuffer, pMarkerInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCmdSetPerformanceStreamMarkerINTEL(commandBuffer, pMarkerInfo); + result = device_dispatch->CmdSetPerformanceStreamMarkerINTEL(commandBuffer, pMarkerInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetPerformanceStreamMarkerINTEL]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetPerformanceStreamMarkerINTEL(commandBuffer, pMarkerInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetPerformanceStreamMarkerINTEL]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetPerformanceStreamMarkerINTEL(commandBuffer, pMarkerInfo, record_obj); } } return result; @@ -19613,38 +17852,37 @@ VKAPI_ATTR VkResult VKAPI_CALL CmdSetPerformanceOverrideINTEL(VkCommandBuffer co const VkPerformanceOverrideInfoINTEL* pOverrideInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetPerformanceOverrideINTEL, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetPerformanceOverrideINTEL]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetPerformanceOverrideINTEL(commandBuffer, pOverrideInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetPerformanceOverrideINTEL]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetPerformanceOverrideINTEL(commandBuffer, pOverrideInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCmdSetPerformanceOverrideINTEL); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetPerformanceOverrideINTEL]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetPerformanceOverrideINTEL(commandBuffer, pOverrideInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetPerformanceOverrideINTEL]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetPerformanceOverrideINTEL(commandBuffer, pOverrideInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCmdSetPerformanceOverrideINTEL(commandBuffer, pOverrideInfo); + result = device_dispatch->CmdSetPerformanceOverrideINTEL(commandBuffer, pOverrideInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetPerformanceOverrideINTEL]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetPerformanceOverrideINTEL(commandBuffer, pOverrideInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetPerformanceOverrideINTEL]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetPerformanceOverrideINTEL(commandBuffer, pOverrideInfo, record_obj); } } return result; @@ -19655,39 +17893,36 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquirePerformanceConfigurationINTEL(VkDevice dev VkPerformanceConfigurationINTEL* pConfiguration) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkAcquirePerformanceConfigurationINTEL, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateAcquirePerformanceConfigurationINTEL]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateAcquirePerformanceConfigurationINTEL(device, pAcquireInfo, pConfiguration, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateAcquirePerformanceConfigurationINTEL]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateAcquirePerformanceConfigurationINTEL(device, pAcquireInfo, pConfiguration, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkAcquirePerformanceConfigurationINTEL); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordAcquirePerformanceConfigurationINTEL]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordAcquirePerformanceConfigurationINTEL(device, pAcquireInfo, pConfiguration, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordAcquirePerformanceConfigurationINTEL]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordAcquirePerformanceConfigurationINTEL(device, pAcquireInfo, pConfiguration, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchAcquirePerformanceConfigurationINTEL(device, pAcquireInfo, pConfiguration); + result = device_dispatch->AcquirePerformanceConfigurationINTEL(device, pAcquireInfo, pConfiguration); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordAcquirePerformanceConfigurationINTEL]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordAcquirePerformanceConfigurationINTEL(device, pAcquireInfo, pConfiguration, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordAcquirePerformanceConfigurationINTEL]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordAcquirePerformanceConfigurationINTEL(device, pAcquireInfo, pConfiguration, record_obj); } } return result; @@ -19697,39 +17932,36 @@ VKAPI_ATTR VkResult VKAPI_CALL ReleasePerformanceConfigurationINTEL(VkDevice dev VkPerformanceConfigurationINTEL configuration) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkReleasePerformanceConfigurationINTEL, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateReleasePerformanceConfigurationINTEL]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateReleasePerformanceConfigurationINTEL(device, configuration, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateReleasePerformanceConfigurationINTEL]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateReleasePerformanceConfigurationINTEL(device, configuration, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkReleasePerformanceConfigurationINTEL); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordReleasePerformanceConfigurationINTEL]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordReleasePerformanceConfigurationINTEL(device, configuration, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordReleasePerformanceConfigurationINTEL]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordReleasePerformanceConfigurationINTEL(device, configuration, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchReleasePerformanceConfigurationINTEL(device, configuration); + result = device_dispatch->ReleasePerformanceConfigurationINTEL(device, configuration); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordReleasePerformanceConfigurationINTEL]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordReleasePerformanceConfigurationINTEL(device, configuration, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordReleasePerformanceConfigurationINTEL]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordReleasePerformanceConfigurationINTEL(device, configuration, record_obj); } } return result; @@ -19738,39 +17970,36 @@ VKAPI_ATTR VkResult VKAPI_CALL ReleasePerformanceConfigurationINTEL(VkDevice dev VKAPI_ATTR VkResult VKAPI_CALL QueueSetPerformanceConfigurationINTEL(VkQueue queue, VkPerformanceConfigurationINTEL configuration) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkQueueSetPerformanceConfigurationINTEL, VulkanTypedHandle(queue, kVulkanObjectTypeQueue)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateQueueSetPerformanceConfigurationINTEL]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateQueueSetPerformanceConfigurationINTEL(queue, configuration, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateQueueSetPerformanceConfigurationINTEL]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateQueueSetPerformanceConfigurationINTEL(queue, configuration, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkQueueSetPerformanceConfigurationINTEL); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordQueueSetPerformanceConfigurationINTEL]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordQueueSetPerformanceConfigurationINTEL(queue, configuration, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordQueueSetPerformanceConfigurationINTEL]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordQueueSetPerformanceConfigurationINTEL(queue, configuration, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchQueueSetPerformanceConfigurationINTEL(queue, configuration); + result = device_dispatch->QueueSetPerformanceConfigurationINTEL(queue, configuration); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordQueueSetPerformanceConfigurationINTEL]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordQueueSetPerformanceConfigurationINTEL(queue, configuration, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordQueueSetPerformanceConfigurationINTEL]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordQueueSetPerformanceConfigurationINTEL(queue, configuration, record_obj); } } return result; @@ -19780,37 +18009,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPerformanceParameterINTEL(VkDevice device, VkP VkPerformanceValueINTEL* pValue) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPerformanceParameterINTEL, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetPerformanceParameterINTEL]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPerformanceParameterINTEL(device, parameter, pValue, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetPerformanceParameterINTEL]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPerformanceParameterINTEL(device, parameter, pValue, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPerformanceParameterINTEL); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetPerformanceParameterINTEL]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPerformanceParameterINTEL(device, parameter, pValue, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetPerformanceParameterINTEL]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPerformanceParameterINTEL(device, parameter, pValue, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPerformanceParameterINTEL(device, parameter, pValue); + result = device_dispatch->GetPerformanceParameterINTEL(device, parameter, pValue); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetPerformanceParameterINTEL]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPerformanceParameterINTEL(device, parameter, pValue, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetPerformanceParameterINTEL]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPerformanceParameterINTEL(device, parameter, pValue, record_obj); } } return result; @@ -19819,34 +18047,34 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPerformanceParameterINTEL(VkDevice device, VkP VKAPI_ATTR void VKAPI_CALL SetLocalDimmingAMD(VkDevice device, VkSwapchainKHR swapChain, VkBool32 localDimmingEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkSetLocalDimmingAMD, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateSetLocalDimmingAMD]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateSetLocalDimmingAMD(device, swapChain, localDimmingEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateSetLocalDimmingAMD]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateSetLocalDimmingAMD(device, swapChain, localDimmingEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkSetLocalDimmingAMD); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordSetLocalDimmingAMD]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordSetLocalDimmingAMD(device, swapChain, localDimmingEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordSetLocalDimmingAMD]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordSetLocalDimmingAMD(device, swapChain, localDimmingEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchSetLocalDimmingAMD(device, swapChain, localDimmingEnable); + device_dispatch->SetLocalDimmingAMD(device, swapChain, localDimmingEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordSetLocalDimmingAMD]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordSetLocalDimmingAMD(device, swapChain, localDimmingEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordSetLocalDimmingAMD]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordSetLocalDimmingAMD(device, swapChain, localDimmingEnable, record_obj); } } } @@ -19857,36 +18085,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateImagePipeSurfaceFUCHSIA(VkInstance instance const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateImagePipeSurfaceFUCHSIA, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateImagePipeSurfaceFUCHSIA(instance, pCreateInfo, pAllocator, pSurface, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateImagePipeSurfaceFUCHSIA(instance, pCreateInfo, pAllocator, pSurface, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateImagePipeSurfaceFUCHSIA); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateImagePipeSurfaceFUCHSIA(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateImagePipeSurfaceFUCHSIA(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateImagePipeSurfaceFUCHSIA(instance, pCreateInfo, pAllocator, pSurface); + result = instance_dispatch->CreateImagePipeSurfaceFUCHSIA(instance, pCreateInfo, pAllocator, pSurface); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateImagePipeSurfaceFUCHSIA(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateImagePipeSurfaceFUCHSIA(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } return result; @@ -19898,36 +18126,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateMetalSurfaceEXT(VkInstance instance, const const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateMetalSurfaceEXT, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateMetalSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateMetalSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateMetalSurfaceEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateMetalSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateMetalSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateMetalSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); + result = instance_dispatch->CreateMetalSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateMetalSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateMetalSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } return result; @@ -19937,37 +18165,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateMetalSurfaceEXT(VkInstance instance, const VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetBufferDeviceAddressEXT(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetBufferDeviceAddressEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetBufferDeviceAddressEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetBufferDeviceAddressEXT(device, pInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetBufferDeviceAddressEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetBufferDeviceAddressEXT(device, pInfo, error_obj); if (skip) return 0; } } RecordObject record_obj(vvl::Func::vkGetBufferDeviceAddressEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetBufferDeviceAddressEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetBufferDeviceAddressEXT(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetBufferDeviceAddressEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetBufferDeviceAddressEXT(device, pInfo, record_obj); } } VkDeviceAddress result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetBufferDeviceAddressEXT(device, pInfo); + result = device_dispatch->GetBufferDeviceAddressEXT(device, pInfo); } record_obj.device_address = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetBufferDeviceAddressEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetBufferDeviceAddressEXT(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetBufferDeviceAddressEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetBufferDeviceAddressEXT(device, pInfo, record_obj); } } return result; @@ -19978,40 +18205,40 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCooperativeMatrixPropertiesNV(Vk VkCooperativeMatrixPropertiesNV* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceCooperativeMatrixPropertiesNV, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceCooperativeMatrixPropertiesNV(physicalDevice, pPropertyCount, - pProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceCooperativeMatrixPropertiesNV(physicalDevice, pPropertyCount, pProperties, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceCooperativeMatrixPropertiesNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceCooperativeMatrixPropertiesNV(physicalDevice, pPropertyCount, pProperties, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceCooperativeMatrixPropertiesNV(physicalDevice, pPropertyCount, pProperties, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceCooperativeMatrixPropertiesNV(physicalDevice, pPropertyCount, pProperties); + result = instance_dispatch->GetPhysicalDeviceCooperativeMatrixPropertiesNV(physicalDevice, pPropertyCount, pProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceCooperativeMatrixPropertiesNV(physicalDevice, pPropertyCount, pProperties, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceCooperativeMatrixPropertiesNV(physicalDevice, pPropertyCount, pProperties, + record_obj); } } return result; @@ -20021,15 +18248,15 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSupportedFramebufferMixedSamples VkPhysicalDevice physicalDevice, uint32_t* pCombinationCount, VkFramebufferMixedSamplesCombinationNV* pCombinations) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( physicalDevice, pCombinationCount, pCombinations, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } @@ -20037,25 +18264,25 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSupportedFramebufferMixedSamples RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( - physicalDevice, pCombinationCount, pCombinations, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(physicalDevice, pCombinationCount, + pCombinations, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(physicalDevice, pCombinationCount, - pCombinations); + result = instance_dispatch->GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( + physicalDevice, pCombinationCount, pCombinations); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( - physicalDevice, pCombinationCount, pCombinations, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(physicalDevice, pCombinationCount, + pCombinations, record_obj); } } return result; @@ -20068,40 +18295,41 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModes2EXT(VkPhysic VkPresentModeKHR* pPresentModes) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceSurfacePresentModes2EXT, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceSurfacePresentModes2EXT(physicalDevice, pSurfaceInfo, - pPresentModeCount, pPresentModes, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceSurfacePresentModes2EXT(physicalDevice, pSurfaceInfo, pPresentModeCount, + pPresentModes, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceSurfacePresentModes2EXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceSurfacePresentModes2EXT(physicalDevice, pSurfaceInfo, pPresentModeCount, - pPresentModes, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceSurfacePresentModes2EXT(physicalDevice, pSurfaceInfo, pPresentModeCount, + pPresentModes, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceSurfacePresentModes2EXT(physicalDevice, pSurfaceInfo, pPresentModeCount, pPresentModes); + result = instance_dispatch->GetPhysicalDeviceSurfacePresentModes2EXT(physicalDevice, pSurfaceInfo, pPresentModeCount, + pPresentModes); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceSurfacePresentModes2EXT(physicalDevice, pSurfaceInfo, pPresentModeCount, - pPresentModes, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceSurfacePresentModes2EXT(physicalDevice, pSurfaceInfo, pPresentModeCount, + pPresentModes, record_obj); } } return result; @@ -20110,39 +18338,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModes2EXT(VkPhysic VKAPI_ATTR VkResult VKAPI_CALL AcquireFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkAcquireFullScreenExclusiveModeEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateAcquireFullScreenExclusiveModeEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateAcquireFullScreenExclusiveModeEXT(device, swapchain, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateAcquireFullScreenExclusiveModeEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateAcquireFullScreenExclusiveModeEXT(device, swapchain, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkAcquireFullScreenExclusiveModeEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordAcquireFullScreenExclusiveModeEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordAcquireFullScreenExclusiveModeEXT(device, swapchain, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordAcquireFullScreenExclusiveModeEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordAcquireFullScreenExclusiveModeEXT(device, swapchain, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchAcquireFullScreenExclusiveModeEXT(device, swapchain); + result = device_dispatch->AcquireFullScreenExclusiveModeEXT(device, swapchain); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordAcquireFullScreenExclusiveModeEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordAcquireFullScreenExclusiveModeEXT(device, swapchain, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordAcquireFullScreenExclusiveModeEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordAcquireFullScreenExclusiveModeEXT(device, swapchain, record_obj); } } return result; @@ -20151,39 +18376,36 @@ VKAPI_ATTR VkResult VKAPI_CALL AcquireFullScreenExclusiveModeEXT(VkDevice device VKAPI_ATTR VkResult VKAPI_CALL ReleaseFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkReleaseFullScreenExclusiveModeEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateReleaseFullScreenExclusiveModeEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateReleaseFullScreenExclusiveModeEXT(device, swapchain, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateReleaseFullScreenExclusiveModeEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateReleaseFullScreenExclusiveModeEXT(device, swapchain, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkReleaseFullScreenExclusiveModeEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordReleaseFullScreenExclusiveModeEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordReleaseFullScreenExclusiveModeEXT(device, swapchain, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordReleaseFullScreenExclusiveModeEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordReleaseFullScreenExclusiveModeEXT(device, swapchain, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchReleaseFullScreenExclusiveModeEXT(device, swapchain); + result = device_dispatch->ReleaseFullScreenExclusiveModeEXT(device, swapchain); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordReleaseFullScreenExclusiveModeEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordReleaseFullScreenExclusiveModeEXT(device, swapchain, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordReleaseFullScreenExclusiveModeEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordReleaseFullScreenExclusiveModeEXT(device, swapchain, record_obj); } } return result; @@ -20194,39 +18416,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDeviceGroupSurfacePresentModes2EXT(VkDevice de VkDeviceGroupPresentModeFlagsKHR* pModes) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeviceGroupSurfacePresentModes2EXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeviceGroupSurfacePresentModes2EXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDeviceGroupSurfacePresentModes2EXT(device, pSurfaceInfo, pModes, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeviceGroupSurfacePresentModes2EXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDeviceGroupSurfacePresentModes2EXT(device, pSurfaceInfo, pModes, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetDeviceGroupSurfacePresentModes2EXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeviceGroupSurfacePresentModes2EXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeviceGroupSurfacePresentModes2EXT(device, pSurfaceInfo, pModes, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeviceGroupSurfacePresentModes2EXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeviceGroupSurfacePresentModes2EXT(device, pSurfaceInfo, pModes, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetDeviceGroupSurfacePresentModes2EXT(device, pSurfaceInfo, pModes); + result = device_dispatch->GetDeviceGroupSurfacePresentModes2EXT(device, pSurfaceInfo, pModes); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeviceGroupSurfacePresentModes2EXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeviceGroupSurfacePresentModes2EXT(device, pSurfaceInfo, pModes, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeviceGroupSurfacePresentModes2EXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeviceGroupSurfacePresentModes2EXT(device, pSurfaceInfo, pModes, record_obj); } } return result; @@ -20237,36 +18456,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateHeadlessSurfaceEXT(VkInstance instance, con const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateHeadlessSurfaceEXT, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateHeadlessSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateHeadlessSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateHeadlessSurfaceEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateHeadlessSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateHeadlessSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateHeadlessSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); + result = instance_dispatch->CreateHeadlessSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateHeadlessSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateHeadlessSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } return result; @@ -20276,34 +18495,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLineStippleEXT(VkCommandBuffer commandBuffer, u uint16_t lineStipplePattern) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetLineStippleEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetLineStippleEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetLineStippleEXT(commandBuffer, lineStippleFactor, lineStipplePattern, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetLineStippleEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetLineStippleEXT(commandBuffer, lineStippleFactor, lineStipplePattern, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetLineStippleEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetLineStippleEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetLineStippleEXT(commandBuffer, lineStippleFactor, lineStipplePattern, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetLineStippleEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetLineStippleEXT(commandBuffer, lineStippleFactor, lineStipplePattern, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetLineStippleEXT(commandBuffer, lineStippleFactor, lineStipplePattern); + device_dispatch->CmdSetLineStippleEXT(commandBuffer, lineStippleFactor, lineStipplePattern); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetLineStippleEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetLineStippleEXT(commandBuffer, lineStippleFactor, lineStipplePattern, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetLineStippleEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetLineStippleEXT(commandBuffer, lineStippleFactor, lineStipplePattern, record_obj); } } } @@ -20311,34 +18530,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLineStippleEXT(VkCommandBuffer commandBuffer, u VKAPI_ATTR void VKAPI_CALL ResetQueryPoolEXT(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkResetQueryPoolEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateResetQueryPoolEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateResetQueryPoolEXT(device, queryPool, firstQuery, queryCount, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateResetQueryPoolEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateResetQueryPoolEXT(device, queryPool, firstQuery, queryCount, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkResetQueryPoolEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordResetQueryPoolEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordResetQueryPoolEXT(device, queryPool, firstQuery, queryCount, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordResetQueryPoolEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordResetQueryPoolEXT(device, queryPool, firstQuery, queryCount, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchResetQueryPoolEXT(device, queryPool, firstQuery, queryCount); + device_dispatch->ResetQueryPoolEXT(device, queryPool, firstQuery, queryCount); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordResetQueryPoolEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordResetQueryPoolEXT(device, queryPool, firstQuery, queryCount, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordResetQueryPoolEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordResetQueryPoolEXT(device, queryPool, firstQuery, queryCount, record_obj); } } } @@ -20346,34 +18565,34 @@ VKAPI_ATTR void VKAPI_CALL ResetQueryPoolEXT(VkDevice device, VkQueryPool queryP VKAPI_ATTR void VKAPI_CALL CmdSetCullModeEXT(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetCullModeEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetCullModeEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetCullModeEXT(commandBuffer, cullMode, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetCullModeEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetCullModeEXT(commandBuffer, cullMode, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetCullModeEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetCullModeEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetCullModeEXT(commandBuffer, cullMode, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetCullModeEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetCullModeEXT(commandBuffer, cullMode, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetCullModeEXT(commandBuffer, cullMode); + device_dispatch->CmdSetCullModeEXT(commandBuffer, cullMode); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetCullModeEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetCullModeEXT(commandBuffer, cullMode, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetCullModeEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetCullModeEXT(commandBuffer, cullMode, record_obj); } } } @@ -20381,34 +18600,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCullModeEXT(VkCommandBuffer commandBuffer, VkCu VKAPI_ATTR void VKAPI_CALL CmdSetFrontFaceEXT(VkCommandBuffer commandBuffer, VkFrontFace frontFace) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetFrontFaceEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetFrontFaceEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetFrontFaceEXT(commandBuffer, frontFace, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetFrontFaceEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetFrontFaceEXT(commandBuffer, frontFace, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetFrontFaceEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetFrontFaceEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetFrontFaceEXT(commandBuffer, frontFace, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetFrontFaceEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetFrontFaceEXT(commandBuffer, frontFace, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetFrontFaceEXT(commandBuffer, frontFace); + device_dispatch->CmdSetFrontFaceEXT(commandBuffer, frontFace); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetFrontFaceEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetFrontFaceEXT(commandBuffer, frontFace, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetFrontFaceEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetFrontFaceEXT(commandBuffer, frontFace, record_obj); } } } @@ -20416,36 +18635,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetFrontFaceEXT(VkCommandBuffer commandBuffer, VkF VKAPI_ATTR void VKAPI_CALL CmdSetPrimitiveTopologyEXT(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetPrimitiveTopologyEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetPrimitiveTopologyEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetPrimitiveTopologyEXT(commandBuffer, primitiveTopology, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetPrimitiveTopologyEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetPrimitiveTopologyEXT(commandBuffer, primitiveTopology, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetPrimitiveTopologyEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetPrimitiveTopologyEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetPrimitiveTopologyEXT(commandBuffer, primitiveTopology, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetPrimitiveTopologyEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetPrimitiveTopologyEXT(commandBuffer, primitiveTopology, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetPrimitiveTopologyEXT(commandBuffer, primitiveTopology); + device_dispatch->CmdSetPrimitiveTopologyEXT(commandBuffer, primitiveTopology); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetPrimitiveTopologyEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetPrimitiveTopologyEXT(commandBuffer, primitiveTopology, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetPrimitiveTopologyEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetPrimitiveTopologyEXT(commandBuffer, primitiveTopology, record_obj); } } } @@ -20454,36 +18672,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewportWithCountEXT(VkCommandBuffer commandBuf const VkViewport* pViewports) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetViewportWithCountEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetViewportWithCountEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetViewportWithCountEXT(commandBuffer, viewportCount, pViewports, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetViewportWithCountEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetViewportWithCountEXT(commandBuffer, viewportCount, pViewports, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetViewportWithCountEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetViewportWithCountEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetViewportWithCountEXT(commandBuffer, viewportCount, pViewports, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetViewportWithCountEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetViewportWithCountEXT(commandBuffer, viewportCount, pViewports, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetViewportWithCountEXT(commandBuffer, viewportCount, pViewports); + device_dispatch->CmdSetViewportWithCountEXT(commandBuffer, viewportCount, pViewports); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetViewportWithCountEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetViewportWithCountEXT(commandBuffer, viewportCount, pViewports, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetViewportWithCountEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetViewportWithCountEXT(commandBuffer, viewportCount, pViewports, record_obj); } } } @@ -20492,35 +18709,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetScissorWithCountEXT(VkCommandBuffer commandBuff const VkRect2D* pScissors) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetScissorWithCountEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetScissorWithCountEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetScissorWithCountEXT(commandBuffer, scissorCount, pScissors, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetScissorWithCountEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetScissorWithCountEXT(commandBuffer, scissorCount, pScissors, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetScissorWithCountEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetScissorWithCountEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetScissorWithCountEXT(commandBuffer, scissorCount, pScissors, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetScissorWithCountEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetScissorWithCountEXT(commandBuffer, scissorCount, pScissors, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetScissorWithCountEXT(commandBuffer, scissorCount, pScissors); + device_dispatch->CmdSetScissorWithCountEXT(commandBuffer, scissorCount, pScissors); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetScissorWithCountEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetScissorWithCountEXT(commandBuffer, scissorCount, pScissors, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetScissorWithCountEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetScissorWithCountEXT(commandBuffer, scissorCount, pScissors, record_obj); } } } @@ -20530,38 +18746,37 @@ VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers2EXT(VkCommandBuffer commandBuffe const VkDeviceSize* pSizes, const VkDeviceSize* pStrides) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBindVertexBuffers2EXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBindVertexBuffers2EXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBindVertexBuffers2EXT(commandBuffer, firstBinding, bindingCount, pBuffers, - pOffsets, pSizes, pStrides, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBindVertexBuffers2EXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBindVertexBuffers2EXT(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, + pSizes, pStrides, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBindVertexBuffers2EXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBindVertexBuffers2EXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBindVertexBuffers2EXT(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, - pStrides, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBindVertexBuffers2EXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBindVertexBuffers2EXT(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, + pStrides, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBindVertexBuffers2EXT(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, pStrides); + device_dispatch->CmdBindVertexBuffers2EXT(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, pStrides); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBindVertexBuffers2EXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBindVertexBuffers2EXT(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, - pStrides, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBindVertexBuffers2EXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBindVertexBuffers2EXT(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, + pStrides, record_obj); } } } @@ -20569,35 +18784,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers2EXT(VkCommandBuffer commandBuffe VKAPI_ATTR void VKAPI_CALL CmdSetDepthTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDepthTestEnableEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthTestEnableEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDepthTestEnableEXT(commandBuffer, depthTestEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthTestEnableEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDepthTestEnableEXT(commandBuffer, depthTestEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDepthTestEnableEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthTestEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDepthTestEnableEXT(commandBuffer, depthTestEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthTestEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDepthTestEnableEXT(commandBuffer, depthTestEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDepthTestEnableEXT(commandBuffer, depthTestEnable); + device_dispatch->CmdSetDepthTestEnableEXT(commandBuffer, depthTestEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthTestEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDepthTestEnableEXT(commandBuffer, depthTestEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthTestEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDepthTestEnableEXT(commandBuffer, depthTestEnable, record_obj); } } } @@ -20605,35 +18819,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthTestEnableEXT(VkCommandBuffer commandBuffe VKAPI_ATTR void VKAPI_CALL CmdSetDepthWriteEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDepthWriteEnableEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthWriteEnableEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDepthWriteEnableEXT(commandBuffer, depthWriteEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthWriteEnableEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDepthWriteEnableEXT(commandBuffer, depthWriteEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDepthWriteEnableEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthWriteEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDepthWriteEnableEXT(commandBuffer, depthWriteEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthWriteEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDepthWriteEnableEXT(commandBuffer, depthWriteEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDepthWriteEnableEXT(commandBuffer, depthWriteEnable); + device_dispatch->CmdSetDepthWriteEnableEXT(commandBuffer, depthWriteEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthWriteEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDepthWriteEnableEXT(commandBuffer, depthWriteEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthWriteEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDepthWriteEnableEXT(commandBuffer, depthWriteEnable, record_obj); } } } @@ -20641,34 +18854,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthWriteEnableEXT(VkCommandBuffer commandBuff VKAPI_ATTR void VKAPI_CALL CmdSetDepthCompareOpEXT(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDepthCompareOpEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthCompareOpEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDepthCompareOpEXT(commandBuffer, depthCompareOp, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthCompareOpEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDepthCompareOpEXT(commandBuffer, depthCompareOp, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDepthCompareOpEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthCompareOpEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDepthCompareOpEXT(commandBuffer, depthCompareOp, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthCompareOpEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDepthCompareOpEXT(commandBuffer, depthCompareOp, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDepthCompareOpEXT(commandBuffer, depthCompareOp); + device_dispatch->CmdSetDepthCompareOpEXT(commandBuffer, depthCompareOp); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthCompareOpEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDepthCompareOpEXT(commandBuffer, depthCompareOp, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthCompareOpEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDepthCompareOpEXT(commandBuffer, depthCompareOp, record_obj); } } } @@ -20676,36 +18889,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthCompareOpEXT(VkCommandBuffer commandBuffer VKAPI_ATTR void VKAPI_CALL CmdSetDepthBoundsTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDepthBoundsTestEnableEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthBoundsTestEnableEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDepthBoundsTestEnableEXT(commandBuffer, depthBoundsTestEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthBoundsTestEnableEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDepthBoundsTestEnableEXT(commandBuffer, depthBoundsTestEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDepthBoundsTestEnableEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthBoundsTestEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDepthBoundsTestEnableEXT(commandBuffer, depthBoundsTestEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthBoundsTestEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDepthBoundsTestEnableEXT(commandBuffer, depthBoundsTestEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDepthBoundsTestEnableEXT(commandBuffer, depthBoundsTestEnable); + device_dispatch->CmdSetDepthBoundsTestEnableEXT(commandBuffer, depthBoundsTestEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthBoundsTestEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDepthBoundsTestEnableEXT(commandBuffer, depthBoundsTestEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthBoundsTestEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDepthBoundsTestEnableEXT(commandBuffer, depthBoundsTestEnable, record_obj); } } } @@ -20713,36 +18925,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBoundsTestEnableEXT(VkCommandBuffer comman VKAPI_ATTR void VKAPI_CALL CmdSetStencilTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetStencilTestEnableEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetStencilTestEnableEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetStencilTestEnableEXT(commandBuffer, stencilTestEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetStencilTestEnableEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetStencilTestEnableEXT(commandBuffer, stencilTestEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetStencilTestEnableEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetStencilTestEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetStencilTestEnableEXT(commandBuffer, stencilTestEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetStencilTestEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetStencilTestEnableEXT(commandBuffer, stencilTestEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetStencilTestEnableEXT(commandBuffer, stencilTestEnable); + device_dispatch->CmdSetStencilTestEnableEXT(commandBuffer, stencilTestEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetStencilTestEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetStencilTestEnableEXT(commandBuffer, stencilTestEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetStencilTestEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetStencilTestEnableEXT(commandBuffer, stencilTestEnable, record_obj); } } } @@ -20751,36 +18962,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilOpEXT(VkCommandBuffer commandBuffer, VkS VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetStencilOpEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetStencilOpEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetStencilOpEXT(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetStencilOpEXT]) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateCmdSetStencilOpEXT(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetStencilOpEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetStencilOpEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetStencilOpEXT(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetStencilOpEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetStencilOpEXT(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetStencilOpEXT(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp); + device_dispatch->CmdSetStencilOpEXT(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetStencilOpEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetStencilOpEXT(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetStencilOpEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetStencilOpEXT(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp, record_obj); } } } @@ -20788,36 +18998,36 @@ VKAPI_ATTR void VKAPI_CALL CmdSetStencilOpEXT(VkCommandBuffer commandBuffer, VkS VKAPI_ATTR VkResult VKAPI_CALL CopyMemoryToImageEXT(VkDevice device, const VkCopyMemoryToImageInfoEXT* pCopyMemoryToImageInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCopyMemoryToImageEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCopyMemoryToImageEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCopyMemoryToImageEXT(device, pCopyMemoryToImageInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCopyMemoryToImageEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCopyMemoryToImageEXT(device, pCopyMemoryToImageInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCopyMemoryToImageEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCopyMemoryToImageEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCopyMemoryToImageEXT(device, pCopyMemoryToImageInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCopyMemoryToImageEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCopyMemoryToImageEXT(device, pCopyMemoryToImageInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCopyMemoryToImageEXT(device, pCopyMemoryToImageInfo); + result = device_dispatch->CopyMemoryToImageEXT(device, pCopyMemoryToImageInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCopyMemoryToImageEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCopyMemoryToImageEXT(device, pCopyMemoryToImageInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCopyMemoryToImageEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCopyMemoryToImageEXT(device, pCopyMemoryToImageInfo, record_obj); } } return result; @@ -20826,36 +19036,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyMemoryToImageEXT(VkDevice device, const VkCop VKAPI_ATTR VkResult VKAPI_CALL CopyImageToMemoryEXT(VkDevice device, const VkCopyImageToMemoryInfoEXT* pCopyImageToMemoryInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCopyImageToMemoryEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCopyImageToMemoryEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCopyImageToMemoryEXT(device, pCopyImageToMemoryInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCopyImageToMemoryEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCopyImageToMemoryEXT(device, pCopyImageToMemoryInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCopyImageToMemoryEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCopyImageToMemoryEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCopyImageToMemoryEXT(device, pCopyImageToMemoryInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCopyImageToMemoryEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCopyImageToMemoryEXT(device, pCopyImageToMemoryInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCopyImageToMemoryEXT(device, pCopyImageToMemoryInfo); + result = device_dispatch->CopyImageToMemoryEXT(device, pCopyImageToMemoryInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCopyImageToMemoryEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCopyImageToMemoryEXT(device, pCopyImageToMemoryInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCopyImageToMemoryEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCopyImageToMemoryEXT(device, pCopyImageToMemoryInfo, record_obj); } } return result; @@ -20864,36 +19074,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyImageToMemoryEXT(VkDevice device, const VkCop VKAPI_ATTR VkResult VKAPI_CALL CopyImageToImageEXT(VkDevice device, const VkCopyImageToImageInfoEXT* pCopyImageToImageInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCopyImageToImageEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCopyImageToImageEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCopyImageToImageEXT(device, pCopyImageToImageInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCopyImageToImageEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCopyImageToImageEXT(device, pCopyImageToImageInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCopyImageToImageEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCopyImageToImageEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCopyImageToImageEXT(device, pCopyImageToImageInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCopyImageToImageEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCopyImageToImageEXT(device, pCopyImageToImageInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCopyImageToImageEXT(device, pCopyImageToImageInfo); + result = device_dispatch->CopyImageToImageEXT(device, pCopyImageToImageInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCopyImageToImageEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCopyImageToImageEXT(device, pCopyImageToImageInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCopyImageToImageEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCopyImageToImageEXT(device, pCopyImageToImageInfo, record_obj); } } return result; @@ -20903,37 +19113,36 @@ VKAPI_ATTR VkResult VKAPI_CALL TransitionImageLayoutEXT(VkDevice device, uint32_ const VkHostImageLayoutTransitionInfoEXT* pTransitions) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkTransitionImageLayoutEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateTransitionImageLayoutEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateTransitionImageLayoutEXT(device, transitionCount, pTransitions, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateTransitionImageLayoutEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateTransitionImageLayoutEXT(device, transitionCount, pTransitions, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkTransitionImageLayoutEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordTransitionImageLayoutEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordTransitionImageLayoutEXT(device, transitionCount, pTransitions, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordTransitionImageLayoutEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordTransitionImageLayoutEXT(device, transitionCount, pTransitions, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchTransitionImageLayoutEXT(device, transitionCount, pTransitions); + result = device_dispatch->TransitionImageLayoutEXT(device, transitionCount, pTransitions); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordTransitionImageLayoutEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordTransitionImageLayoutEXT(device, transitionCount, pTransitions, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordTransitionImageLayoutEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordTransitionImageLayoutEXT(device, transitionCount, pTransitions, record_obj); } } return result; @@ -20943,35 +19152,34 @@ VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout2EXT(VkDevice device, VkImag VkSubresourceLayout2KHR* pLayout) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetImageSubresourceLayout2EXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetImageSubresourceLayout2EXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetImageSubresourceLayout2EXT(device, image, pSubresource, pLayout, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetImageSubresourceLayout2EXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetImageSubresourceLayout2EXT(device, image, pSubresource, pLayout, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetImageSubresourceLayout2EXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetImageSubresourceLayout2EXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetImageSubresourceLayout2EXT(device, image, pSubresource, pLayout, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetImageSubresourceLayout2EXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetImageSubresourceLayout2EXT(device, image, pSubresource, pLayout, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetImageSubresourceLayout2EXT(device, image, pSubresource, pLayout); + device_dispatch->GetImageSubresourceLayout2EXT(device, image, pSubresource, pLayout); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetImageSubresourceLayout2EXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetImageSubresourceLayout2EXT(device, image, pSubresource, pLayout, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetImageSubresourceLayout2EXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetImageSubresourceLayout2EXT(device, image, pSubresource, pLayout, record_obj); } } } @@ -20979,37 +19187,36 @@ VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout2EXT(VkDevice device, VkImag VKAPI_ATTR VkResult VKAPI_CALL ReleaseSwapchainImagesEXT(VkDevice device, const VkReleaseSwapchainImagesInfoEXT* pReleaseInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkReleaseSwapchainImagesEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateReleaseSwapchainImagesEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateReleaseSwapchainImagesEXT(device, pReleaseInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateReleaseSwapchainImagesEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateReleaseSwapchainImagesEXT(device, pReleaseInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkReleaseSwapchainImagesEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordReleaseSwapchainImagesEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordReleaseSwapchainImagesEXT(device, pReleaseInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordReleaseSwapchainImagesEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordReleaseSwapchainImagesEXT(device, pReleaseInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchReleaseSwapchainImagesEXT(device, pReleaseInfo); + result = device_dispatch->ReleaseSwapchainImagesEXT(device, pReleaseInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordReleaseSwapchainImagesEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordReleaseSwapchainImagesEXT(device, pReleaseInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordReleaseSwapchainImagesEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordReleaseSwapchainImagesEXT(device, pReleaseInfo, record_obj); } } return result; @@ -21020,39 +19227,36 @@ VKAPI_ATTR void VKAPI_CALL GetGeneratedCommandsMemoryRequirementsNV(VkDevice dev VkMemoryRequirements2* pMemoryRequirements) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetGeneratedCommandsMemoryRequirementsNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetGeneratedCommandsMemoryRequirementsNV]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateGetGeneratedCommandsMemoryRequirementsNV(device, pInfo, pMemoryRequirements, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetGeneratedCommandsMemoryRequirementsNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetGeneratedCommandsMemoryRequirementsNV(device, pInfo, pMemoryRequirements, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetGeneratedCommandsMemoryRequirementsNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetGeneratedCommandsMemoryRequirementsNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetGeneratedCommandsMemoryRequirementsNV(device, pInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetGeneratedCommandsMemoryRequirementsNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetGeneratedCommandsMemoryRequirementsNV(device, pInfo, pMemoryRequirements, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetGeneratedCommandsMemoryRequirementsNV(device, pInfo, pMemoryRequirements); + device_dispatch->GetGeneratedCommandsMemoryRequirementsNV(device, pInfo, pMemoryRequirements); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetGeneratedCommandsMemoryRequirementsNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetGeneratedCommandsMemoryRequirementsNV(device, pInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetGeneratedCommandsMemoryRequirementsNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetGeneratedCommandsMemoryRequirementsNV(device, pInfo, pMemoryRequirements, record_obj); } } } @@ -21061,38 +19265,35 @@ VKAPI_ATTR void VKAPI_CALL CmdPreprocessGeneratedCommandsNV(VkCommandBuffer comm const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdPreprocessGeneratedCommandsNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdPreprocessGeneratedCommandsNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdPreprocessGeneratedCommandsNV(commandBuffer, pGeneratedCommandsInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdPreprocessGeneratedCommandsNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdPreprocessGeneratedCommandsNV(commandBuffer, pGeneratedCommandsInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdPreprocessGeneratedCommandsNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdPreprocessGeneratedCommandsNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdPreprocessGeneratedCommandsNV(commandBuffer, pGeneratedCommandsInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdPreprocessGeneratedCommandsNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdPreprocessGeneratedCommandsNV(commandBuffer, pGeneratedCommandsInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdPreprocessGeneratedCommandsNV(commandBuffer, pGeneratedCommandsInfo); + device_dispatch->CmdPreprocessGeneratedCommandsNV(commandBuffer, pGeneratedCommandsInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdPreprocessGeneratedCommandsNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdPreprocessGeneratedCommandsNV(commandBuffer, pGeneratedCommandsInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdPreprocessGeneratedCommandsNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdPreprocessGeneratedCommandsNV(commandBuffer, pGeneratedCommandsInfo, record_obj); } } } @@ -21101,39 +19302,36 @@ VKAPI_ATTR void VKAPI_CALL CmdExecuteGeneratedCommandsNV(VkCommandBuffer command const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdExecuteGeneratedCommandsNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdExecuteGeneratedCommandsNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdExecuteGeneratedCommandsNV(commandBuffer, isPreprocessed, pGeneratedCommandsInfo, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdExecuteGeneratedCommandsNV]) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateCmdExecuteGeneratedCommandsNV(commandBuffer, isPreprocessed, pGeneratedCommandsInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdExecuteGeneratedCommandsNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdExecuteGeneratedCommandsNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdExecuteGeneratedCommandsNV(commandBuffer, isPreprocessed, pGeneratedCommandsInfo, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdExecuteGeneratedCommandsNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdExecuteGeneratedCommandsNV(commandBuffer, isPreprocessed, pGeneratedCommandsInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdExecuteGeneratedCommandsNV(commandBuffer, isPreprocessed, pGeneratedCommandsInfo); + device_dispatch->CmdExecuteGeneratedCommandsNV(commandBuffer, isPreprocessed, pGeneratedCommandsInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdExecuteGeneratedCommandsNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdExecuteGeneratedCommandsNV(commandBuffer, isPreprocessed, pGeneratedCommandsInfo, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdExecuteGeneratedCommandsNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdExecuteGeneratedCommandsNV(commandBuffer, isPreprocessed, pGeneratedCommandsInfo, record_obj); } } } @@ -21142,39 +19340,36 @@ VKAPI_ATTR void VKAPI_CALL CmdBindPipelineShaderGroupNV(VkCommandBuffer commandB VkPipeline pipeline, uint32_t groupIndex) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBindPipelineShaderGroupNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBindPipelineShaderGroupNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBindPipelineShaderGroupNV(commandBuffer, pipelineBindPoint, pipeline, groupIndex, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBindPipelineShaderGroupNV]) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateCmdBindPipelineShaderGroupNV(commandBuffer, pipelineBindPoint, pipeline, groupIndex, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBindPipelineShaderGroupNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBindPipelineShaderGroupNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBindPipelineShaderGroupNV(commandBuffer, pipelineBindPoint, pipeline, groupIndex, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBindPipelineShaderGroupNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBindPipelineShaderGroupNV(commandBuffer, pipelineBindPoint, pipeline, groupIndex, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBindPipelineShaderGroupNV(commandBuffer, pipelineBindPoint, pipeline, groupIndex); + device_dispatch->CmdBindPipelineShaderGroupNV(commandBuffer, pipelineBindPoint, pipeline, groupIndex); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBindPipelineShaderGroupNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBindPipelineShaderGroupNV(commandBuffer, pipelineBindPoint, pipeline, groupIndex, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBindPipelineShaderGroupNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBindPipelineShaderGroupNV(commandBuffer, pipelineBindPoint, pipeline, groupIndex, record_obj); } } } @@ -21185,40 +19380,37 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateIndirectCommandsLayoutNV(VkDevice device, VkIndirectCommandsLayoutNV* pIndirectCommandsLayout) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateIndirectCommandsLayoutNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCreateIndirectCommandsLayoutNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateIndirectCommandsLayoutNV(device, pCreateInfo, pAllocator, - pIndirectCommandsLayout, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateIndirectCommandsLayoutNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateIndirectCommandsLayoutNV(device, pCreateInfo, pAllocator, pIndirectCommandsLayout, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateIndirectCommandsLayoutNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateIndirectCommandsLayoutNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateIndirectCommandsLayoutNV(device, pCreateInfo, pAllocator, pIndirectCommandsLayout, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateIndirectCommandsLayoutNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateIndirectCommandsLayoutNV(device, pCreateInfo, pAllocator, pIndirectCommandsLayout, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateIndirectCommandsLayoutNV(device, pCreateInfo, pAllocator, pIndirectCommandsLayout); + result = device_dispatch->CreateIndirectCommandsLayoutNV(device, pCreateInfo, pAllocator, pIndirectCommandsLayout); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateIndirectCommandsLayoutNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateIndirectCommandsLayoutNV(device, pCreateInfo, pAllocator, pIndirectCommandsLayout, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateIndirectCommandsLayoutNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateIndirectCommandsLayoutNV(device, pCreateInfo, pAllocator, pIndirectCommandsLayout, record_obj); } } return result; @@ -21228,37 +19420,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyIndirectCommandsLayoutNV(VkDevice device, VkIn const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyIndirectCommandsLayoutNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyIndirectCommandsLayoutNV]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateDestroyIndirectCommandsLayoutNV(device, indirectCommandsLayout, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyIndirectCommandsLayoutNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyIndirectCommandsLayoutNV(device, indirectCommandsLayout, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyIndirectCommandsLayoutNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyIndirectCommandsLayoutNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyIndirectCommandsLayoutNV(device, indirectCommandsLayout, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyIndirectCommandsLayoutNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyIndirectCommandsLayoutNV(device, indirectCommandsLayout, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyIndirectCommandsLayoutNV(device, indirectCommandsLayout, pAllocator); + device_dispatch->DestroyIndirectCommandsLayoutNV(device, indirectCommandsLayout, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyIndirectCommandsLayoutNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyIndirectCommandsLayoutNV(device, indirectCommandsLayout, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyIndirectCommandsLayoutNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyIndirectCommandsLayoutNV(device, indirectCommandsLayout, pAllocator, record_obj); } } } @@ -21266,34 +19455,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyIndirectCommandsLayoutNV(VkDevice device, VkIn VKAPI_ATTR void VKAPI_CALL CmdSetDepthBias2EXT(VkCommandBuffer commandBuffer, const VkDepthBiasInfoEXT* pDepthBiasInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDepthBias2EXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthBias2EXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDepthBias2EXT(commandBuffer, pDepthBiasInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthBias2EXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDepthBias2EXT(commandBuffer, pDepthBiasInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDepthBias2EXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthBias2EXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDepthBias2EXT(commandBuffer, pDepthBiasInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthBias2EXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDepthBias2EXT(commandBuffer, pDepthBiasInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDepthBias2EXT(commandBuffer, pDepthBiasInfo); + device_dispatch->CmdSetDepthBias2EXT(commandBuffer, pDepthBiasInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthBias2EXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDepthBias2EXT(commandBuffer, pDepthBiasInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthBias2EXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDepthBias2EXT(commandBuffer, pDepthBiasInfo, record_obj); } } } @@ -21301,36 +19490,36 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBias2EXT(VkCommandBuffer commandBuffer, co VKAPI_ATTR VkResult VKAPI_CALL AcquireDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, VkDisplayKHR display) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkAcquireDrmDisplayEXT, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateAcquireDrmDisplayEXT(physicalDevice, drmFd, display, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateAcquireDrmDisplayEXT(physicalDevice, drmFd, display, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkAcquireDrmDisplayEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordAcquireDrmDisplayEXT(physicalDevice, drmFd, display, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordAcquireDrmDisplayEXT(physicalDevice, drmFd, display, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchAcquireDrmDisplayEXT(physicalDevice, drmFd, display); + result = instance_dispatch->AcquireDrmDisplayEXT(physicalDevice, drmFd, display); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordAcquireDrmDisplayEXT(physicalDevice, drmFd, display, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordAcquireDrmDisplayEXT(physicalDevice, drmFd, display, record_obj); } } return result; @@ -21340,36 +19529,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDrmDisplayEXT(VkPhysicalDevice physicalDevice, VkDisplayKHR* display) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDrmDisplayEXT, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDrmDisplayEXT(physicalDevice, drmFd, connectorId, display, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDrmDisplayEXT(physicalDevice, drmFd, connectorId, display, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetDrmDisplayEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDrmDisplayEXT(physicalDevice, drmFd, connectorId, display, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDrmDisplayEXT(physicalDevice, drmFd, connectorId, display, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetDrmDisplayEXT(physicalDevice, drmFd, connectorId, display); + result = instance_dispatch->GetDrmDisplayEXT(physicalDevice, drmFd, connectorId, display); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDrmDisplayEXT(physicalDevice, drmFd, connectorId, display, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDrmDisplayEXT(physicalDevice, drmFd, connectorId, display, record_obj); } } return result; @@ -21380,38 +19569,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreatePrivateDataSlotEXT(VkDevice device, const V VkPrivateDataSlot* pPrivateDataSlot) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreatePrivateDataSlotEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCreatePrivateDataSlotEXT]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateCreatePrivateDataSlotEXT(device, pCreateInfo, pAllocator, pPrivateDataSlot, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreatePrivateDataSlotEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreatePrivateDataSlotEXT(device, pCreateInfo, pAllocator, pPrivateDataSlot, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreatePrivateDataSlotEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreatePrivateDataSlotEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreatePrivateDataSlotEXT(device, pCreateInfo, pAllocator, pPrivateDataSlot, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreatePrivateDataSlotEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreatePrivateDataSlotEXT(device, pCreateInfo, pAllocator, pPrivateDataSlot, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreatePrivateDataSlotEXT(device, pCreateInfo, pAllocator, pPrivateDataSlot); + result = device_dispatch->CreatePrivateDataSlotEXT(device, pCreateInfo, pAllocator, pPrivateDataSlot); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreatePrivateDataSlotEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreatePrivateDataSlotEXT(device, pCreateInfo, pAllocator, pPrivateDataSlot, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreatePrivateDataSlotEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreatePrivateDataSlotEXT(device, pCreateInfo, pAllocator, pPrivateDataSlot, record_obj); } } return result; @@ -21421,35 +19608,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyPrivateDataSlotEXT(VkDevice device, VkPrivateD const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyPrivateDataSlotEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyPrivateDataSlotEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyPrivateDataSlotEXT(device, privateDataSlot, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyPrivateDataSlotEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyPrivateDataSlotEXT(device, privateDataSlot, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyPrivateDataSlotEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyPrivateDataSlotEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyPrivateDataSlotEXT(device, privateDataSlot, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyPrivateDataSlotEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyPrivateDataSlotEXT(device, privateDataSlot, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyPrivateDataSlotEXT(device, privateDataSlot, pAllocator); + device_dispatch->DestroyPrivateDataSlotEXT(device, privateDataSlot, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyPrivateDataSlotEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyPrivateDataSlotEXT(device, privateDataSlot, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyPrivateDataSlotEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyPrivateDataSlotEXT(device, privateDataSlot, pAllocator, record_obj); } } } @@ -21458,36 +19644,36 @@ VKAPI_ATTR VkResult VKAPI_CALL SetPrivateDataEXT(VkDevice device, VkObjectType o VkPrivateDataSlot privateDataSlot, uint64_t data) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkSetPrivateDataEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateSetPrivateDataEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateSetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, data, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateSetPrivateDataEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateSetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, data, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkSetPrivateDataEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordSetPrivateDataEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordSetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, data, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordSetPrivateDataEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordSetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, data, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchSetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, data); + result = device_dispatch->SetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, data); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordSetPrivateDataEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordSetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, data, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordSetPrivateDataEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordSetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, data, record_obj); } } return result; @@ -21497,35 +19683,34 @@ VKAPI_ATTR void VKAPI_CALL GetPrivateDataEXT(VkDevice device, VkObjectType objec VkPrivateDataSlot privateDataSlot, uint64_t* pData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPrivateDataEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetPrivateDataEXT]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateGetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, pData, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetPrivateDataEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, pData, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPrivateDataEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetPrivateDataEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetPrivateDataEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, pData, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, pData); + device_dispatch->GetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, pData); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetPrivateDataEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetPrivateDataEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, pData, record_obj); } } } @@ -21534,36 +19719,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateCudaModuleNV(VkDevice device, const VkCudaM const VkAllocationCallbacks* pAllocator, VkCudaModuleNV* pModule) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateCudaModuleNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateCudaModuleNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateCudaModuleNV(device, pCreateInfo, pAllocator, pModule, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateCudaModuleNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateCudaModuleNV(device, pCreateInfo, pAllocator, pModule, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateCudaModuleNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateCudaModuleNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateCudaModuleNV(device, pCreateInfo, pAllocator, pModule, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateCudaModuleNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateCudaModuleNV(device, pCreateInfo, pAllocator, pModule, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateCudaModuleNV(device, pCreateInfo, pAllocator, pModule); + result = device_dispatch->CreateCudaModuleNV(device, pCreateInfo, pAllocator, pModule); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateCudaModuleNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateCudaModuleNV(device, pCreateInfo, pAllocator, pModule, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateCudaModuleNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateCudaModuleNV(device, pCreateInfo, pAllocator, pModule, record_obj); } } return result; @@ -21572,36 +19757,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateCudaModuleNV(VkDevice device, const VkCudaM VKAPI_ATTR VkResult VKAPI_CALL GetCudaModuleCacheNV(VkDevice device, VkCudaModuleNV module, size_t* pCacheSize, void* pCacheData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetCudaModuleCacheNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetCudaModuleCacheNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetCudaModuleCacheNV(device, module, pCacheSize, pCacheData, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetCudaModuleCacheNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetCudaModuleCacheNV(device, module, pCacheSize, pCacheData, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetCudaModuleCacheNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetCudaModuleCacheNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetCudaModuleCacheNV(device, module, pCacheSize, pCacheData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetCudaModuleCacheNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetCudaModuleCacheNV(device, module, pCacheSize, pCacheData, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetCudaModuleCacheNV(device, module, pCacheSize, pCacheData); + result = device_dispatch->GetCudaModuleCacheNV(device, module, pCacheSize, pCacheData); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetCudaModuleCacheNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetCudaModuleCacheNV(device, module, pCacheSize, pCacheData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetCudaModuleCacheNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetCudaModuleCacheNV(device, module, pCacheSize, pCacheData, record_obj); } } return result; @@ -21611,36 +19796,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateCudaFunctionNV(VkDevice device, const VkCud const VkAllocationCallbacks* pAllocator, VkCudaFunctionNV* pFunction) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateCudaFunctionNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateCudaFunctionNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateCudaFunctionNV(device, pCreateInfo, pAllocator, pFunction, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateCudaFunctionNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateCudaFunctionNV(device, pCreateInfo, pAllocator, pFunction, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateCudaFunctionNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateCudaFunctionNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateCudaFunctionNV(device, pCreateInfo, pAllocator, pFunction, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateCudaFunctionNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateCudaFunctionNV(device, pCreateInfo, pAllocator, pFunction, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateCudaFunctionNV(device, pCreateInfo, pAllocator, pFunction); + result = device_dispatch->CreateCudaFunctionNV(device, pCreateInfo, pAllocator, pFunction); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateCudaFunctionNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateCudaFunctionNV(device, pCreateInfo, pAllocator, pFunction, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateCudaFunctionNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateCudaFunctionNV(device, pCreateInfo, pAllocator, pFunction, record_obj); } } return result; @@ -21649,34 +19834,34 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateCudaFunctionNV(VkDevice device, const VkCud VKAPI_ATTR void VKAPI_CALL DestroyCudaModuleNV(VkDevice device, VkCudaModuleNV module, const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyCudaModuleNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyCudaModuleNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyCudaModuleNV(device, module, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyCudaModuleNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyCudaModuleNV(device, module, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyCudaModuleNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyCudaModuleNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyCudaModuleNV(device, module, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyCudaModuleNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyCudaModuleNV(device, module, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyCudaModuleNV(device, module, pAllocator); + device_dispatch->DestroyCudaModuleNV(device, module, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyCudaModuleNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyCudaModuleNV(device, module, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyCudaModuleNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyCudaModuleNV(device, module, pAllocator, record_obj); } } } @@ -21685,34 +19870,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyCudaFunctionNV(VkDevice device, VkCudaFunction const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyCudaFunctionNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyCudaFunctionNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyCudaFunctionNV(device, function, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyCudaFunctionNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyCudaFunctionNV(device, function, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyCudaFunctionNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyCudaFunctionNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyCudaFunctionNV(device, function, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyCudaFunctionNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyCudaFunctionNV(device, function, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyCudaFunctionNV(device, function, pAllocator); + device_dispatch->DestroyCudaFunctionNV(device, function, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyCudaFunctionNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyCudaFunctionNV(device, function, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyCudaFunctionNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyCudaFunctionNV(device, function, pAllocator, record_obj); } } } @@ -21720,34 +19905,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyCudaFunctionNV(VkDevice device, VkCudaFunction VKAPI_ATTR void VKAPI_CALL CmdCudaLaunchKernelNV(VkCommandBuffer commandBuffer, const VkCudaLaunchInfoNV* pLaunchInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCudaLaunchKernelNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCudaLaunchKernelNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCudaLaunchKernelNV(commandBuffer, pLaunchInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCudaLaunchKernelNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCudaLaunchKernelNV(commandBuffer, pLaunchInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCudaLaunchKernelNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCudaLaunchKernelNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCudaLaunchKernelNV(commandBuffer, pLaunchInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCudaLaunchKernelNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCudaLaunchKernelNV(commandBuffer, pLaunchInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCudaLaunchKernelNV(commandBuffer, pLaunchInfo); + device_dispatch->CmdCudaLaunchKernelNV(commandBuffer, pLaunchInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCudaLaunchKernelNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCudaLaunchKernelNV(commandBuffer, pLaunchInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCudaLaunchKernelNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCudaLaunchKernelNV(commandBuffer, pLaunchInfo, record_obj); } } } @@ -21756,34 +19941,34 @@ VKAPI_ATTR void VKAPI_CALL CmdCudaLaunchKernelNV(VkCommandBuffer commandBuffer, VKAPI_ATTR void VKAPI_CALL ExportMetalObjectsEXT(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkExportMetalObjectsEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateExportMetalObjectsEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateExportMetalObjectsEXT(device, pMetalObjectsInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateExportMetalObjectsEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateExportMetalObjectsEXT(device, pMetalObjectsInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkExportMetalObjectsEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordExportMetalObjectsEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordExportMetalObjectsEXT(device, pMetalObjectsInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordExportMetalObjectsEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordExportMetalObjectsEXT(device, pMetalObjectsInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchExportMetalObjectsEXT(device, pMetalObjectsInfo); + device_dispatch->ExportMetalObjectsEXT(device, pMetalObjectsInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordExportMetalObjectsEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordExportMetalObjectsEXT(device, pMetalObjectsInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordExportMetalObjectsEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordExportMetalObjectsEXT(device, pMetalObjectsInfo, record_obj); } } } @@ -21793,35 +19978,34 @@ VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutSizeEXT(VkDevice device, VkDesc VkDeviceSize* pLayoutSizeInBytes) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDescriptorSetLayoutSizeEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDescriptorSetLayoutSizeEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDescriptorSetLayoutSizeEXT(device, layout, pLayoutSizeInBytes, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDescriptorSetLayoutSizeEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDescriptorSetLayoutSizeEXT(device, layout, pLayoutSizeInBytes, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetDescriptorSetLayoutSizeEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetDescriptorSetLayoutSizeEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDescriptorSetLayoutSizeEXT(device, layout, pLayoutSizeInBytes, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDescriptorSetLayoutSizeEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDescriptorSetLayoutSizeEXT(device, layout, pLayoutSizeInBytes, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetDescriptorSetLayoutSizeEXT(device, layout, pLayoutSizeInBytes); + device_dispatch->GetDescriptorSetLayoutSizeEXT(device, layout, pLayoutSizeInBytes); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetDescriptorSetLayoutSizeEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDescriptorSetLayoutSizeEXT(device, layout, pLayoutSizeInBytes, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDescriptorSetLayoutSizeEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDescriptorSetLayoutSizeEXT(device, layout, pLayoutSizeInBytes, record_obj); } } } @@ -21830,37 +20014,35 @@ VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutBindingOffsetEXT(VkDevice devic VkDeviceSize* pOffset) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDescriptorSetLayoutBindingOffsetEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDescriptorSetLayoutBindingOffsetEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDescriptorSetLayoutBindingOffsetEXT(device, layout, binding, pOffset, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDescriptorSetLayoutBindingOffsetEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDescriptorSetLayoutBindingOffsetEXT(device, layout, binding, pOffset, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetDescriptorSetLayoutBindingOffsetEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDescriptorSetLayoutBindingOffsetEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDescriptorSetLayoutBindingOffsetEXT(device, layout, binding, pOffset, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDescriptorSetLayoutBindingOffsetEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDescriptorSetLayoutBindingOffsetEXT(device, layout, binding, pOffset, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetDescriptorSetLayoutBindingOffsetEXT(device, layout, binding, pOffset); + device_dispatch->GetDescriptorSetLayoutBindingOffsetEXT(device, layout, binding, pOffset); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDescriptorSetLayoutBindingOffsetEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDescriptorSetLayoutBindingOffsetEXT(device, layout, binding, pOffset, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDescriptorSetLayoutBindingOffsetEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDescriptorSetLayoutBindingOffsetEXT(device, layout, binding, pOffset, record_obj); } } } @@ -21869,34 +20051,34 @@ VKAPI_ATTR void VKAPI_CALL GetDescriptorEXT(VkDevice device, const VkDescriptorG void* pDescriptor) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDescriptorEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetDescriptorEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDescriptorEXT(device, pDescriptorInfo, dataSize, pDescriptor, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDescriptorEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDescriptorEXT(device, pDescriptorInfo, dataSize, pDescriptor, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetDescriptorEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetDescriptorEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDescriptorEXT(device, pDescriptorInfo, dataSize, pDescriptor, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDescriptorEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDescriptorEXT(device, pDescriptorInfo, dataSize, pDescriptor, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetDescriptorEXT(device, pDescriptorInfo, dataSize, pDescriptor); + device_dispatch->GetDescriptorEXT(device, pDescriptorInfo, dataSize, pDescriptor); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetDescriptorEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDescriptorEXT(device, pDescriptorInfo, dataSize, pDescriptor, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDescriptorEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDescriptorEXT(device, pDescriptorInfo, dataSize, pDescriptor, record_obj); } } } @@ -21905,36 +20087,35 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorBuffersEXT(VkCommandBuffer commandBu const VkDescriptorBufferBindingInfoEXT* pBindingInfos) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBindDescriptorBuffersEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBindDescriptorBuffersEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBindDescriptorBuffersEXT(commandBuffer, bufferCount, pBindingInfos, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBindDescriptorBuffersEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBindDescriptorBuffersEXT(commandBuffer, bufferCount, pBindingInfos, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBindDescriptorBuffersEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBindDescriptorBuffersEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBindDescriptorBuffersEXT(commandBuffer, bufferCount, pBindingInfos, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBindDescriptorBuffersEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBindDescriptorBuffersEXT(commandBuffer, bufferCount, pBindingInfos, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBindDescriptorBuffersEXT(commandBuffer, bufferCount, pBindingInfos); + device_dispatch->CmdBindDescriptorBuffersEXT(commandBuffer, bufferCount, pBindingInfos); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBindDescriptorBuffersEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBindDescriptorBuffersEXT(commandBuffer, bufferCount, pBindingInfos, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBindDescriptorBuffersEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBindDescriptorBuffersEXT(commandBuffer, bufferCount, pBindingInfos, record_obj); } } } @@ -21944,42 +20125,39 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDescriptorBufferOffsetsEXT(VkCommandBuffer comm const uint32_t* pBufferIndices, const VkDeviceSize* pOffsets) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDescriptorBufferOffsetsEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDescriptorBufferOffsetsEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDescriptorBufferOffsetsEXT(commandBuffer, pipelineBindPoint, layout, firstSet, - setCount, pBufferIndices, pOffsets, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDescriptorBufferOffsetsEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDescriptorBufferOffsetsEXT(commandBuffer, pipelineBindPoint, layout, firstSet, + setCount, pBufferIndices, pOffsets, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDescriptorBufferOffsetsEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDescriptorBufferOffsetsEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDescriptorBufferOffsetsEXT(commandBuffer, pipelineBindPoint, layout, firstSet, setCount, - pBufferIndices, pOffsets, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDescriptorBufferOffsetsEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDescriptorBufferOffsetsEXT(commandBuffer, pipelineBindPoint, layout, firstSet, setCount, + pBufferIndices, pOffsets, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDescriptorBufferOffsetsEXT(commandBuffer, pipelineBindPoint, layout, firstSet, setCount, pBufferIndices, - pOffsets); + device_dispatch->CmdSetDescriptorBufferOffsetsEXT(commandBuffer, pipelineBindPoint, layout, firstSet, setCount, + pBufferIndices, pOffsets); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDescriptorBufferOffsetsEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDescriptorBufferOffsetsEXT(commandBuffer, pipelineBindPoint, layout, firstSet, setCount, - pBufferIndices, pOffsets, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDescriptorBufferOffsetsEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDescriptorBufferOffsetsEXT(commandBuffer, pipelineBindPoint, layout, firstSet, setCount, + pBufferIndices, pOffsets, record_obj); } } } @@ -21989,41 +20167,37 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorBufferEmbeddedSamplersEXT(VkCommandB VkPipelineLayout layout, uint32_t set) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBindDescriptorBufferEmbeddedSamplersEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBindDescriptorBufferEmbeddedSamplersEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBindDescriptorBufferEmbeddedSamplersEXT(commandBuffer, pipelineBindPoint, layout, - set, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBindDescriptorBufferEmbeddedSamplersEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBindDescriptorBufferEmbeddedSamplersEXT(commandBuffer, pipelineBindPoint, layout, set, + error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBindDescriptorBufferEmbeddedSamplersEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBindDescriptorBufferEmbeddedSamplersEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBindDescriptorBufferEmbeddedSamplersEXT(commandBuffer, pipelineBindPoint, layout, set, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBindDescriptorBufferEmbeddedSamplersEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBindDescriptorBufferEmbeddedSamplersEXT(commandBuffer, pipelineBindPoint, layout, set, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBindDescriptorBufferEmbeddedSamplersEXT(commandBuffer, pipelineBindPoint, layout, set); + device_dispatch->CmdBindDescriptorBufferEmbeddedSamplersEXT(commandBuffer, pipelineBindPoint, layout, set); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBindDescriptorBufferEmbeddedSamplersEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBindDescriptorBufferEmbeddedSamplersEXT(commandBuffer, pipelineBindPoint, layout, set, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBindDescriptorBufferEmbeddedSamplersEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBindDescriptorBufferEmbeddedSamplersEXT(commandBuffer, pipelineBindPoint, layout, set, record_obj); } } } @@ -22033,39 +20207,37 @@ VKAPI_ATTR VkResult VKAPI_CALL GetBufferOpaqueCaptureDescriptorDataEXT(VkDevice void* pData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetBufferOpaqueCaptureDescriptorDataEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetBufferOpaqueCaptureDescriptorDataEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetBufferOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetBufferOpaqueCaptureDescriptorDataEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetBufferOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetBufferOpaqueCaptureDescriptorDataEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetBufferOpaqueCaptureDescriptorDataEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetBufferOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetBufferOpaqueCaptureDescriptorDataEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetBufferOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetBufferOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); + result = device_dispatch->GetBufferOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetBufferOpaqueCaptureDescriptorDataEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetBufferOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetBufferOpaqueCaptureDescriptorDataEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetBufferOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, record_obj); } } return result; @@ -22076,39 +20248,37 @@ VKAPI_ATTR VkResult VKAPI_CALL GetImageOpaqueCaptureDescriptorDataEXT(VkDevice d void* pData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetImageOpaqueCaptureDescriptorDataEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetImageOpaqueCaptureDescriptorDataEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetImageOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetImageOpaqueCaptureDescriptorDataEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetImageOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetImageOpaqueCaptureDescriptorDataEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetImageOpaqueCaptureDescriptorDataEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetImageOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetImageOpaqueCaptureDescriptorDataEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetImageOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetImageOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); + result = device_dispatch->GetImageOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetImageOpaqueCaptureDescriptorDataEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetImageOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetImageOpaqueCaptureDescriptorDataEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetImageOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, record_obj); } } return result; @@ -22119,40 +20289,38 @@ VKAPI_ATTR VkResult VKAPI_CALL GetImageViewOpaqueCaptureDescriptorDataEXT(VkDevi void* pData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetImageViewOpaqueCaptureDescriptorDataEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetImageViewOpaqueCaptureDescriptorDataEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetImageViewOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetImageViewOpaqueCaptureDescriptorDataEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetImageViewOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetImageViewOpaqueCaptureDescriptorDataEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetImageViewOpaqueCaptureDescriptorDataEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetImageViewOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetImageViewOpaqueCaptureDescriptorDataEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetImageViewOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetImageViewOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); + result = device_dispatch->GetImageViewOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetImageViewOpaqueCaptureDescriptorDataEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetImageViewOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetImageViewOpaqueCaptureDescriptorDataEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetImageViewOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, record_obj); } } return result; @@ -22163,40 +20331,38 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSamplerOpaqueCaptureDescriptorDataEXT(VkDevice void* pData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetSamplerOpaqueCaptureDescriptorDataEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetSamplerOpaqueCaptureDescriptorDataEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetSamplerOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetSamplerOpaqueCaptureDescriptorDataEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetSamplerOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetSamplerOpaqueCaptureDescriptorDataEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetSamplerOpaqueCaptureDescriptorDataEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetSamplerOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetSamplerOpaqueCaptureDescriptorDataEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetSamplerOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetSamplerOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); + result = device_dispatch->GetSamplerOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetSamplerOpaqueCaptureDescriptorDataEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetSamplerOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetSamplerOpaqueCaptureDescriptorDataEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetSamplerOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, record_obj); } } return result; @@ -22206,41 +20372,40 @@ VKAPI_ATTR VkResult VKAPI_CALL GetAccelerationStructureOpaqueCaptureDescriptorDa VkDevice device, const VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfo, void* pData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetAccelerationStructureOpaqueCaptureDescriptorDataEXT]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateGetAccelerationStructureOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetAccelerationStructureOpaqueCaptureDescriptorDataEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetAccelerationStructureOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetAccelerationStructureOpaqueCaptureDescriptorDataEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetAccelerationStructureOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, record_obj); + for (auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetAccelerationStructureOpaqueCaptureDescriptorDataEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetAccelerationStructureOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetAccelerationStructureOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); + result = device_dispatch->GetAccelerationStructureOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetAccelerationStructureOpaqueCaptureDescriptorDataEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetAccelerationStructureOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, record_obj); + for (auto* vo : + device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetAccelerationStructureOpaqueCaptureDescriptorDataEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetAccelerationStructureOpaqueCaptureDescriptorDataEXT(device, pInfo, pData, record_obj); } } return result; @@ -22250,37 +20415,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetFragmentShadingRateEnumNV(VkCommandBuffer comma const VkFragmentShadingRateCombinerOpKHR combinerOps[2]) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetFragmentShadingRateEnumNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetFragmentShadingRateEnumNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetFragmentShadingRateEnumNV(commandBuffer, shadingRate, combinerOps, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetFragmentShadingRateEnumNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetFragmentShadingRateEnumNV(commandBuffer, shadingRate, combinerOps, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetFragmentShadingRateEnumNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetFragmentShadingRateEnumNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetFragmentShadingRateEnumNV(commandBuffer, shadingRate, combinerOps, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetFragmentShadingRateEnumNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetFragmentShadingRateEnumNV(commandBuffer, shadingRate, combinerOps, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetFragmentShadingRateEnumNV(commandBuffer, shadingRate, combinerOps); + device_dispatch->CmdSetFragmentShadingRateEnumNV(commandBuffer, shadingRate, combinerOps); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetFragmentShadingRateEnumNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetFragmentShadingRateEnumNV(commandBuffer, shadingRate, combinerOps, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetFragmentShadingRateEnumNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetFragmentShadingRateEnumNV(commandBuffer, shadingRate, combinerOps, record_obj); } } } @@ -22289,36 +20452,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDeviceFaultInfoEXT(VkDevice device, VkDeviceFa VkDeviceFaultInfoEXT* pFaultInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeviceFaultInfoEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeviceFaultInfoEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDeviceFaultInfoEXT(device, pFaultCounts, pFaultInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeviceFaultInfoEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDeviceFaultInfoEXT(device, pFaultCounts, pFaultInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetDeviceFaultInfoEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeviceFaultInfoEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeviceFaultInfoEXT(device, pFaultCounts, pFaultInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeviceFaultInfoEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeviceFaultInfoEXT(device, pFaultCounts, pFaultInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetDeviceFaultInfoEXT(device, pFaultCounts, pFaultInfo); + result = device_dispatch->GetDeviceFaultInfoEXT(device, pFaultCounts, pFaultInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeviceFaultInfoEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeviceFaultInfoEXT(device, pFaultCounts, pFaultInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeviceFaultInfoEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeviceFaultInfoEXT(device, pFaultCounts, pFaultInfo, record_obj); } } return result; @@ -22328,40 +20491,40 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDeviceFaultInfoEXT(VkDevice device, VkDeviceFa VKAPI_ATTR VkResult VKAPI_CALL AcquireWinrtDisplayNV(VkPhysicalDevice physicalDevice, VkDisplayKHR display) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkAcquireWinrtDisplayNV, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateAcquireWinrtDisplayNV(physicalDevice, display, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateAcquireWinrtDisplayNV(physicalDevice, display, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkAcquireWinrtDisplayNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordAcquireWinrtDisplayNV(physicalDevice, display, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordAcquireWinrtDisplayNV(physicalDevice, display, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchAcquireWinrtDisplayNV(physicalDevice, display); + result = instance_dispatch->AcquireWinrtDisplayNV(physicalDevice, display); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordAcquireWinrtDisplayNV(physicalDevice, display, record_obj); + vo->PostCallRecordAcquireWinrtDisplayNV(physicalDevice, display, record_obj); } } return result; @@ -22371,40 +20534,40 @@ VKAPI_ATTR VkResult VKAPI_CALL GetWinrtDisplayNV(VkPhysicalDevice physicalDevice VkDisplayKHR* pDisplay) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetWinrtDisplayNV, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetWinrtDisplayNV(physicalDevice, deviceRelativeId, pDisplay, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetWinrtDisplayNV(physicalDevice, deviceRelativeId, pDisplay, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetWinrtDisplayNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetWinrtDisplayNV(physicalDevice, deviceRelativeId, pDisplay, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetWinrtDisplayNV(physicalDevice, deviceRelativeId, pDisplay, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetWinrtDisplayNV(physicalDevice, deviceRelativeId, pDisplay); + result = instance_dispatch->GetWinrtDisplayNV(physicalDevice, deviceRelativeId, pDisplay); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } - intercept->PostCallRecordGetWinrtDisplayNV(physicalDevice, deviceRelativeId, pDisplay, record_obj); + vo->PostCallRecordGetWinrtDisplayNV(physicalDevice, deviceRelativeId, pDisplay, record_obj); } } return result; @@ -22416,36 +20579,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDirectFBSurfaceEXT(VkInstance instance, con const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateDirectFBSurfaceEXT, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateDirectFBSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateDirectFBSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateDirectFBSurfaceEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateDirectFBSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateDirectFBSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateDirectFBSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); + result = instance_dispatch->CreateDirectFBSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateDirectFBSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateDirectFBSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } return result; @@ -22455,39 +20618,37 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceDirectFBPresentationSupportEXT(V uint32_t queueFamilyIndex, IDirectFB* dfb) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceDirectFBPresentationSupportEXT, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceDirectFBPresentationSupportEXT(physicalDevice, queueFamilyIndex, dfb, - error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceDirectFBPresentationSupportEXT(physicalDevice, queueFamilyIndex, dfb, + error_obj); if (skip) return VK_FALSE; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceDirectFBPresentationSupportEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceDirectFBPresentationSupportEXT(physicalDevice, queueFamilyIndex, dfb, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceDirectFBPresentationSupportEXT(physicalDevice, queueFamilyIndex, dfb, record_obj); } } VkBool32 result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceDirectFBPresentationSupportEXT(physicalDevice, queueFamilyIndex, dfb); + result = instance_dispatch->GetPhysicalDeviceDirectFBPresentationSupportEXT(physicalDevice, queueFamilyIndex, dfb); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceDirectFBPresentationSupportEXT(physicalDevice, queueFamilyIndex, dfb, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceDirectFBPresentationSupportEXT(physicalDevice, queueFamilyIndex, dfb, record_obj); } } return result; @@ -22500,40 +20661,39 @@ VKAPI_ATTR void VKAPI_CALL CmdSetVertexInputEXT(VkCommandBuffer commandBuffer, u const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetVertexInputEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetVertexInputEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetVertexInputEXT(commandBuffer, vertexBindingDescriptionCount, - pVertexBindingDescriptions, vertexAttributeDescriptionCount, - pVertexAttributeDescriptions, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetVertexInputEXT]) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateCmdSetVertexInputEXT(commandBuffer, vertexBindingDescriptionCount, pVertexBindingDescriptions, + vertexAttributeDescriptionCount, pVertexAttributeDescriptions, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetVertexInputEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetVertexInputEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetVertexInputEXT(commandBuffer, vertexBindingDescriptionCount, pVertexBindingDescriptions, - vertexAttributeDescriptionCount, pVertexAttributeDescriptions, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetVertexInputEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetVertexInputEXT(commandBuffer, vertexBindingDescriptionCount, pVertexBindingDescriptions, + vertexAttributeDescriptionCount, pVertexAttributeDescriptions, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetVertexInputEXT(commandBuffer, vertexBindingDescriptionCount, pVertexBindingDescriptions, - vertexAttributeDescriptionCount, pVertexAttributeDescriptions); + device_dispatch->CmdSetVertexInputEXT(commandBuffer, vertexBindingDescriptionCount, pVertexBindingDescriptions, + vertexAttributeDescriptionCount, pVertexAttributeDescriptions); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetVertexInputEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetVertexInputEXT(commandBuffer, vertexBindingDescriptionCount, pVertexBindingDescriptions, - vertexAttributeDescriptionCount, pVertexAttributeDescriptions, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetVertexInputEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetVertexInputEXT(commandBuffer, vertexBindingDescriptionCount, pVertexBindingDescriptions, + vertexAttributeDescriptionCount, pVertexAttributeDescriptions, record_obj); } } } @@ -22544,37 +20704,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryZirconHandleFUCHSIA(VkDevice device, zx_handle_t* pZirconHandle) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetMemoryZirconHandleFUCHSIA, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetMemoryZirconHandleFUCHSIA]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetMemoryZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetMemoryZirconHandleFUCHSIA]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetMemoryZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetMemoryZirconHandleFUCHSIA); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetMemoryZirconHandleFUCHSIA]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetMemoryZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetMemoryZirconHandleFUCHSIA]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetMemoryZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetMemoryZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle); + result = device_dispatch->GetMemoryZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetMemoryZirconHandleFUCHSIA]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetMemoryZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetMemoryZirconHandleFUCHSIA]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetMemoryZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle, record_obj); } } return result; @@ -22585,42 +20744,41 @@ GetMemoryZirconHandlePropertiesFUCHSIA(VkDevice device, VkExternalMemoryHandleTy VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetMemoryZirconHandlePropertiesFUCHSIA, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetMemoryZirconHandlePropertiesFUCHSIA]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetMemoryZirconHandlePropertiesFUCHSIA(device, handleType, zirconHandle, - pMemoryZirconHandleProperties, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetMemoryZirconHandlePropertiesFUCHSIA]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetMemoryZirconHandlePropertiesFUCHSIA(device, handleType, zirconHandle, + pMemoryZirconHandleProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetMemoryZirconHandlePropertiesFUCHSIA); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetMemoryZirconHandlePropertiesFUCHSIA]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetMemoryZirconHandlePropertiesFUCHSIA(device, handleType, zirconHandle, - pMemoryZirconHandleProperties, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetMemoryZirconHandlePropertiesFUCHSIA]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetMemoryZirconHandlePropertiesFUCHSIA(device, handleType, zirconHandle, pMemoryZirconHandleProperties, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetMemoryZirconHandlePropertiesFUCHSIA(device, handleType, zirconHandle, pMemoryZirconHandleProperties); + result = device_dispatch->GetMemoryZirconHandlePropertiesFUCHSIA(device, handleType, zirconHandle, + pMemoryZirconHandleProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetMemoryZirconHandlePropertiesFUCHSIA]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetMemoryZirconHandlePropertiesFUCHSIA(device, handleType, zirconHandle, - pMemoryZirconHandleProperties, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetMemoryZirconHandlePropertiesFUCHSIA]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetMemoryZirconHandlePropertiesFUCHSIA(device, handleType, zirconHandle, + pMemoryZirconHandleProperties, record_obj); } } return result; @@ -22630,40 +20788,36 @@ VKAPI_ATTR VkResult VKAPI_CALL ImportSemaphoreZirconHandleFUCHSIA( VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkImportSemaphoreZirconHandleFUCHSIA, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateImportSemaphoreZirconHandleFUCHSIA]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateImportSemaphoreZirconHandleFUCHSIA(device, pImportSemaphoreZirconHandleInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateImportSemaphoreZirconHandleFUCHSIA]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateImportSemaphoreZirconHandleFUCHSIA(device, pImportSemaphoreZirconHandleInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkImportSemaphoreZirconHandleFUCHSIA); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordImportSemaphoreZirconHandleFUCHSIA]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordImportSemaphoreZirconHandleFUCHSIA(device, pImportSemaphoreZirconHandleInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordImportSemaphoreZirconHandleFUCHSIA]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordImportSemaphoreZirconHandleFUCHSIA(device, pImportSemaphoreZirconHandleInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchImportSemaphoreZirconHandleFUCHSIA(device, pImportSemaphoreZirconHandleInfo); + result = device_dispatch->ImportSemaphoreZirconHandleFUCHSIA(device, pImportSemaphoreZirconHandleInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordImportSemaphoreZirconHandleFUCHSIA]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordImportSemaphoreZirconHandleFUCHSIA(device, pImportSemaphoreZirconHandleInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordImportSemaphoreZirconHandleFUCHSIA]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordImportSemaphoreZirconHandleFUCHSIA(device, pImportSemaphoreZirconHandleInfo, record_obj); } } return result; @@ -22674,39 +20828,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreZirconHandleFUCHSIA(VkDevice device, zx_handle_t* pZirconHandle) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetSemaphoreZirconHandleFUCHSIA, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetSemaphoreZirconHandleFUCHSIA]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateGetSemaphoreZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetSemaphoreZirconHandleFUCHSIA]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetSemaphoreZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetSemaphoreZirconHandleFUCHSIA); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetSemaphoreZirconHandleFUCHSIA]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetSemaphoreZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetSemaphoreZirconHandleFUCHSIA]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetSemaphoreZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetSemaphoreZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle); + result = device_dispatch->GetSemaphoreZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetSemaphoreZirconHandleFUCHSIA]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetSemaphoreZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetSemaphoreZirconHandleFUCHSIA]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetSemaphoreZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle, record_obj); } } return result; @@ -22718,38 +20869,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateBufferCollectionFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA* pCollection) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateBufferCollectionFUCHSIA, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCreateBufferCollectionFUCHSIA]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateCreateBufferCollectionFUCHSIA(device, pCreateInfo, pAllocator, pCollection, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateBufferCollectionFUCHSIA]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateBufferCollectionFUCHSIA(device, pCreateInfo, pAllocator, pCollection, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateBufferCollectionFUCHSIA); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateBufferCollectionFUCHSIA]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateBufferCollectionFUCHSIA(device, pCreateInfo, pAllocator, pCollection, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateBufferCollectionFUCHSIA]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateBufferCollectionFUCHSIA(device, pCreateInfo, pAllocator, pCollection, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateBufferCollectionFUCHSIA(device, pCreateInfo, pAllocator, pCollection); + result = device_dispatch->CreateBufferCollectionFUCHSIA(device, pCreateInfo, pAllocator, pCollection); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateBufferCollectionFUCHSIA]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateBufferCollectionFUCHSIA(device, pCreateInfo, pAllocator, pCollection, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateBufferCollectionFUCHSIA]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateBufferCollectionFUCHSIA(device, pCreateInfo, pAllocator, pCollection, record_obj); } } return result; @@ -22759,43 +20908,39 @@ VKAPI_ATTR VkResult VKAPI_CALL SetBufferCollectionImageConstraintsFUCHSIA( VkDevice device, VkBufferCollectionFUCHSIA collection, const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkSetBufferCollectionImageConstraintsFUCHSIA, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateSetBufferCollectionImageConstraintsFUCHSIA]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateSetBufferCollectionImageConstraintsFUCHSIA(device, collection, pImageConstraintsInfo, - error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateSetBufferCollectionImageConstraintsFUCHSIA]) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateSetBufferCollectionImageConstraintsFUCHSIA(device, collection, pImageConstraintsInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkSetBufferCollectionImageConstraintsFUCHSIA); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordSetBufferCollectionImageConstraintsFUCHSIA]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordSetBufferCollectionImageConstraintsFUCHSIA(device, collection, pImageConstraintsInfo, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordSetBufferCollectionImageConstraintsFUCHSIA]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordSetBufferCollectionImageConstraintsFUCHSIA(device, collection, pImageConstraintsInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchSetBufferCollectionImageConstraintsFUCHSIA(device, collection, pImageConstraintsInfo); + result = device_dispatch->SetBufferCollectionImageConstraintsFUCHSIA(device, collection, pImageConstraintsInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordSetBufferCollectionImageConstraintsFUCHSIA]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordSetBufferCollectionImageConstraintsFUCHSIA(device, collection, pImageConstraintsInfo, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordSetBufferCollectionImageConstraintsFUCHSIA]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordSetBufferCollectionImageConstraintsFUCHSIA(device, collection, pImageConstraintsInfo, record_obj); } } return result; @@ -22805,43 +20950,39 @@ VKAPI_ATTR VkResult VKAPI_CALL SetBufferCollectionBufferConstraintsFUCHSIA( VkDevice device, VkBufferCollectionFUCHSIA collection, const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkSetBufferCollectionBufferConstraintsFUCHSIA, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateSetBufferCollectionBufferConstraintsFUCHSIA]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateSetBufferCollectionBufferConstraintsFUCHSIA(device, collection, - pBufferConstraintsInfo, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateSetBufferCollectionBufferConstraintsFUCHSIA]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateSetBufferCollectionBufferConstraintsFUCHSIA(device, collection, pBufferConstraintsInfo, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkSetBufferCollectionBufferConstraintsFUCHSIA); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordSetBufferCollectionBufferConstraintsFUCHSIA]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordSetBufferCollectionBufferConstraintsFUCHSIA(device, collection, pBufferConstraintsInfo, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordSetBufferCollectionBufferConstraintsFUCHSIA]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordSetBufferCollectionBufferConstraintsFUCHSIA(device, collection, pBufferConstraintsInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchSetBufferCollectionBufferConstraintsFUCHSIA(device, collection, pBufferConstraintsInfo); + result = device_dispatch->SetBufferCollectionBufferConstraintsFUCHSIA(device, collection, pBufferConstraintsInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordSetBufferCollectionBufferConstraintsFUCHSIA]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordSetBufferCollectionBufferConstraintsFUCHSIA(device, collection, pBufferConstraintsInfo, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordSetBufferCollectionBufferConstraintsFUCHSIA]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordSetBufferCollectionBufferConstraintsFUCHSIA(device, collection, pBufferConstraintsInfo, record_obj); } } return result; @@ -22851,35 +20992,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyBufferCollectionFUCHSIA(VkDevice device, VkBuf const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyBufferCollectionFUCHSIA, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyBufferCollectionFUCHSIA]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyBufferCollectionFUCHSIA(device, collection, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyBufferCollectionFUCHSIA]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyBufferCollectionFUCHSIA(device, collection, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyBufferCollectionFUCHSIA); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyBufferCollectionFUCHSIA]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyBufferCollectionFUCHSIA(device, collection, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyBufferCollectionFUCHSIA]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyBufferCollectionFUCHSIA(device, collection, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyBufferCollectionFUCHSIA(device, collection, pAllocator); + device_dispatch->DestroyBufferCollectionFUCHSIA(device, collection, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyBufferCollectionFUCHSIA]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyBufferCollectionFUCHSIA(device, collection, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyBufferCollectionFUCHSIA]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyBufferCollectionFUCHSIA(device, collection, pAllocator, record_obj); } } } @@ -22888,39 +21028,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetBufferCollectionPropertiesFUCHSIA(VkDevice dev VkBufferCollectionPropertiesFUCHSIA* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetBufferCollectionPropertiesFUCHSIA, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetBufferCollectionPropertiesFUCHSIA]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetBufferCollectionPropertiesFUCHSIA(device, collection, pProperties, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetBufferCollectionPropertiesFUCHSIA]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetBufferCollectionPropertiesFUCHSIA(device, collection, pProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetBufferCollectionPropertiesFUCHSIA); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetBufferCollectionPropertiesFUCHSIA]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetBufferCollectionPropertiesFUCHSIA(device, collection, pProperties, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetBufferCollectionPropertiesFUCHSIA]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetBufferCollectionPropertiesFUCHSIA(device, collection, pProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetBufferCollectionPropertiesFUCHSIA(device, collection, pProperties); + result = device_dispatch->GetBufferCollectionPropertiesFUCHSIA(device, collection, pProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetBufferCollectionPropertiesFUCHSIA]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetBufferCollectionPropertiesFUCHSIA(device, collection, pProperties, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetBufferCollectionPropertiesFUCHSIA]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetBufferCollectionPropertiesFUCHSIA(device, collection, pProperties, record_obj); } } return result; @@ -22931,43 +21068,40 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(VkD VkExtent2D* pMaxWorkgroupSize) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(device, renderpass, pMaxWorkgroupSize, - error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI]) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(device, renderpass, pMaxWorkgroupSize, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(device, renderpass, pMaxWorkgroupSize, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(device, renderpass, pMaxWorkgroupSize, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(device, renderpass, pMaxWorkgroupSize); + result = device_dispatch->GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(device, renderpass, pMaxWorkgroupSize); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(device, renderpass, pMaxWorkgroupSize, - record_obj); + for (auto* vo : + device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(device, renderpass, pMaxWorkgroupSize, record_obj); } } return result; @@ -22976,34 +21110,34 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(VkD VKAPI_ATTR void VKAPI_CALL CmdSubpassShadingHUAWEI(VkCommandBuffer commandBuffer) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSubpassShadingHUAWEI, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSubpassShadingHUAWEI]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSubpassShadingHUAWEI(commandBuffer, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSubpassShadingHUAWEI]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSubpassShadingHUAWEI(commandBuffer, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSubpassShadingHUAWEI); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSubpassShadingHUAWEI]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSubpassShadingHUAWEI(commandBuffer, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSubpassShadingHUAWEI]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSubpassShadingHUAWEI(commandBuffer, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSubpassShadingHUAWEI(commandBuffer); + device_dispatch->CmdSubpassShadingHUAWEI(commandBuffer); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSubpassShadingHUAWEI]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSubpassShadingHUAWEI(commandBuffer, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSubpassShadingHUAWEI]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSubpassShadingHUAWEI(commandBuffer, record_obj); } } } @@ -23012,36 +21146,35 @@ VKAPI_ATTR void VKAPI_CALL CmdBindInvocationMaskHUAWEI(VkCommandBuffer commandBu VkImageLayout imageLayout) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBindInvocationMaskHUAWEI, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBindInvocationMaskHUAWEI]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBindInvocationMaskHUAWEI(commandBuffer, imageView, imageLayout, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBindInvocationMaskHUAWEI]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBindInvocationMaskHUAWEI(commandBuffer, imageView, imageLayout, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBindInvocationMaskHUAWEI); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBindInvocationMaskHUAWEI]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBindInvocationMaskHUAWEI(commandBuffer, imageView, imageLayout, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBindInvocationMaskHUAWEI]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBindInvocationMaskHUAWEI(commandBuffer, imageView, imageLayout, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBindInvocationMaskHUAWEI(commandBuffer, imageView, imageLayout); + device_dispatch->CmdBindInvocationMaskHUAWEI(commandBuffer, imageView, imageLayout); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBindInvocationMaskHUAWEI]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBindInvocationMaskHUAWEI(commandBuffer, imageView, imageLayout, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBindInvocationMaskHUAWEI]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBindInvocationMaskHUAWEI(commandBuffer, imageView, imageLayout, record_obj); } } } @@ -23051,37 +21184,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetMemoryRemoteAddressNV(VkDevice device, VkRemoteAddressNV* pAddress) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetMemoryRemoteAddressNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetMemoryRemoteAddressNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetMemoryRemoteAddressNV(device, pMemoryGetRemoteAddressInfo, pAddress, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetMemoryRemoteAddressNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetMemoryRemoteAddressNV(device, pMemoryGetRemoteAddressInfo, pAddress, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetMemoryRemoteAddressNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetMemoryRemoteAddressNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetMemoryRemoteAddressNV(device, pMemoryGetRemoteAddressInfo, pAddress, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetMemoryRemoteAddressNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetMemoryRemoteAddressNV(device, pMemoryGetRemoteAddressInfo, pAddress, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetMemoryRemoteAddressNV(device, pMemoryGetRemoteAddressInfo, pAddress); + result = device_dispatch->GetMemoryRemoteAddressNV(device, pMemoryGetRemoteAddressInfo, pAddress); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetMemoryRemoteAddressNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetMemoryRemoteAddressNV(device, pMemoryGetRemoteAddressInfo, pAddress, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetMemoryRemoteAddressNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetMemoryRemoteAddressNV(device, pMemoryGetRemoteAddressInfo, pAddress, record_obj); } } return result; @@ -23091,37 +21223,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPipelinePropertiesEXT(VkDevice device, const V VkBaseOutStructure* pPipelineProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPipelinePropertiesEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetPipelinePropertiesEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPipelinePropertiesEXT(device, pPipelineInfo, pPipelineProperties, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetPipelinePropertiesEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPipelinePropertiesEXT(device, pPipelineInfo, pPipelineProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPipelinePropertiesEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetPipelinePropertiesEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPipelinePropertiesEXT(device, pPipelineInfo, pPipelineProperties, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetPipelinePropertiesEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPipelinePropertiesEXT(device, pPipelineInfo, pPipelineProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPipelinePropertiesEXT(device, pPipelineInfo, pPipelineProperties); + result = device_dispatch->GetPipelinePropertiesEXT(device, pPipelineInfo, pPipelineProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetPipelinePropertiesEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPipelinePropertiesEXT(device, pPipelineInfo, pPipelineProperties, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetPipelinePropertiesEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPipelinePropertiesEXT(device, pPipelineInfo, pPipelineProperties, record_obj); } } return result; @@ -23130,36 +21261,35 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPipelinePropertiesEXT(VkDevice device, const V VKAPI_ATTR void VKAPI_CALL CmdSetPatchControlPointsEXT(VkCommandBuffer commandBuffer, uint32_t patchControlPoints) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetPatchControlPointsEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetPatchControlPointsEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetPatchControlPointsEXT(commandBuffer, patchControlPoints, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetPatchControlPointsEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetPatchControlPointsEXT(commandBuffer, patchControlPoints, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetPatchControlPointsEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetPatchControlPointsEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetPatchControlPointsEXT(commandBuffer, patchControlPoints, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetPatchControlPointsEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetPatchControlPointsEXT(commandBuffer, patchControlPoints, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetPatchControlPointsEXT(commandBuffer, patchControlPoints); + device_dispatch->CmdSetPatchControlPointsEXT(commandBuffer, patchControlPoints); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetPatchControlPointsEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetPatchControlPointsEXT(commandBuffer, patchControlPoints, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetPatchControlPointsEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetPatchControlPointsEXT(commandBuffer, patchControlPoints, record_obj); } } } @@ -23167,38 +21297,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetPatchControlPointsEXT(VkCommandBuffer commandBu VKAPI_ATTR void VKAPI_CALL CmdSetRasterizerDiscardEnableEXT(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetRasterizerDiscardEnableEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetRasterizerDiscardEnableEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetRasterizerDiscardEnableEXT(commandBuffer, rasterizerDiscardEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetRasterizerDiscardEnableEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetRasterizerDiscardEnableEXT(commandBuffer, rasterizerDiscardEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetRasterizerDiscardEnableEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetRasterizerDiscardEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetRasterizerDiscardEnableEXT(commandBuffer, rasterizerDiscardEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetRasterizerDiscardEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetRasterizerDiscardEnableEXT(commandBuffer, rasterizerDiscardEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetRasterizerDiscardEnableEXT(commandBuffer, rasterizerDiscardEnable); + device_dispatch->CmdSetRasterizerDiscardEnableEXT(commandBuffer, rasterizerDiscardEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetRasterizerDiscardEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetRasterizerDiscardEnableEXT(commandBuffer, rasterizerDiscardEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetRasterizerDiscardEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetRasterizerDiscardEnableEXT(commandBuffer, rasterizerDiscardEnable, record_obj); } } } @@ -23206,35 +21333,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRasterizerDiscardEnableEXT(VkCommandBuffer comm VKAPI_ATTR void VKAPI_CALL CmdSetDepthBiasEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDepthBiasEnableEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthBiasEnableEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDepthBiasEnableEXT(commandBuffer, depthBiasEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthBiasEnableEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDepthBiasEnableEXT(commandBuffer, depthBiasEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDepthBiasEnableEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthBiasEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDepthBiasEnableEXT(commandBuffer, depthBiasEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthBiasEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDepthBiasEnableEXT(commandBuffer, depthBiasEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDepthBiasEnableEXT(commandBuffer, depthBiasEnable); + device_dispatch->CmdSetDepthBiasEnableEXT(commandBuffer, depthBiasEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthBiasEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDepthBiasEnableEXT(commandBuffer, depthBiasEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthBiasEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDepthBiasEnableEXT(commandBuffer, depthBiasEnable, record_obj); } } } @@ -23242,34 +21368,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthBiasEnableEXT(VkCommandBuffer commandBuffe VKAPI_ATTR void VKAPI_CALL CmdSetLogicOpEXT(VkCommandBuffer commandBuffer, VkLogicOp logicOp) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetLogicOpEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetLogicOpEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetLogicOpEXT(commandBuffer, logicOp, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetLogicOpEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetLogicOpEXT(commandBuffer, logicOp, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetLogicOpEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetLogicOpEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetLogicOpEXT(commandBuffer, logicOp, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetLogicOpEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetLogicOpEXT(commandBuffer, logicOp, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetLogicOpEXT(commandBuffer, logicOp); + device_dispatch->CmdSetLogicOpEXT(commandBuffer, logicOp); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetLogicOpEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetLogicOpEXT(commandBuffer, logicOp, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetLogicOpEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetLogicOpEXT(commandBuffer, logicOp, record_obj); } } } @@ -23277,37 +21403,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLogicOpEXT(VkCommandBuffer commandBuffer, VkLog VKAPI_ATTR void VKAPI_CALL CmdSetPrimitiveRestartEnableEXT(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetPrimitiveRestartEnableEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetPrimitiveRestartEnableEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetPrimitiveRestartEnableEXT(commandBuffer, primitiveRestartEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetPrimitiveRestartEnableEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetPrimitiveRestartEnableEXT(commandBuffer, primitiveRestartEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetPrimitiveRestartEnableEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetPrimitiveRestartEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetPrimitiveRestartEnableEXT(commandBuffer, primitiveRestartEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetPrimitiveRestartEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetPrimitiveRestartEnableEXT(commandBuffer, primitiveRestartEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetPrimitiveRestartEnableEXT(commandBuffer, primitiveRestartEnable); + device_dispatch->CmdSetPrimitiveRestartEnableEXT(commandBuffer, primitiveRestartEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetPrimitiveRestartEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetPrimitiveRestartEnableEXT(commandBuffer, primitiveRestartEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetPrimitiveRestartEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetPrimitiveRestartEnableEXT(commandBuffer, primitiveRestartEnable, record_obj); } } } @@ -23317,36 +21441,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateScreenSurfaceQNX(VkInstance instance, const const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateScreenSurfaceQNX, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateScreenSurfaceQNX(instance, pCreateInfo, pAllocator, pSurface, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateScreenSurfaceQNX(instance, pCreateInfo, pAllocator, pSurface, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateScreenSurfaceQNX); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateScreenSurfaceQNX(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateScreenSurfaceQNX(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateScreenSurfaceQNX(instance, pCreateInfo, pAllocator, pSurface); + result = instance_dispatch->CreateScreenSurfaceQNX(instance, pCreateInfo, pAllocator, pSurface); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateScreenSurfaceQNX(instance, pCreateInfo, pAllocator, pSurface, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateScreenSurfaceQNX(instance, pCreateInfo, pAllocator, pSurface, record_obj); } } return result; @@ -23357,39 +21481,37 @@ VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceScreenPresentationSupportQNX(VkP struct _screen_window* window) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceScreenPresentationSupportQNX, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceScreenPresentationSupportQNX(physicalDevice, queueFamilyIndex, - window, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceScreenPresentationSupportQNX(physicalDevice, queueFamilyIndex, window, + error_obj); if (skip) return VK_FALSE; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceScreenPresentationSupportQNX); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceScreenPresentationSupportQNX(physicalDevice, queueFamilyIndex, window, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceScreenPresentationSupportQNX(physicalDevice, queueFamilyIndex, window, record_obj); } } VkBool32 result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceScreenPresentationSupportQNX(physicalDevice, queueFamilyIndex, window); + result = instance_dispatch->GetPhysicalDeviceScreenPresentationSupportQNX(physicalDevice, queueFamilyIndex, window); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceScreenPresentationSupportQNX(physicalDevice, queueFamilyIndex, window, - record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceScreenPresentationSupportQNX(physicalDevice, queueFamilyIndex, window, record_obj); } } return result; @@ -23400,36 +21522,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetColorWriteEnableEXT(VkCommandBuffer commandBuff const VkBool32* pColorWriteEnables) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetColorWriteEnableEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetColorWriteEnableEXT]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateCmdSetColorWriteEnableEXT(commandBuffer, attachmentCount, pColorWriteEnables, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetColorWriteEnableEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetColorWriteEnableEXT(commandBuffer, attachmentCount, pColorWriteEnables, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetColorWriteEnableEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetColorWriteEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetColorWriteEnableEXT(commandBuffer, attachmentCount, pColorWriteEnables, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetColorWriteEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetColorWriteEnableEXT(commandBuffer, attachmentCount, pColorWriteEnables, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetColorWriteEnableEXT(commandBuffer, attachmentCount, pColorWriteEnables); + device_dispatch->CmdSetColorWriteEnableEXT(commandBuffer, attachmentCount, pColorWriteEnables); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetColorWriteEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetColorWriteEnableEXT(commandBuffer, attachmentCount, pColorWriteEnables, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetColorWriteEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetColorWriteEnableEXT(commandBuffer, attachmentCount, pColorWriteEnables, record_obj); } } } @@ -23438,37 +21558,37 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMultiEXT(VkCommandBuffer commandBuffer, uint32 uint32_t instanceCount, uint32_t firstInstance, uint32_t stride) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDrawMultiEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDrawMultiEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDrawMultiEXT(commandBuffer, drawCount, pVertexInfo, instanceCount, firstInstance, - stride, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDrawMultiEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDrawMultiEXT(commandBuffer, drawCount, pVertexInfo, instanceCount, firstInstance, stride, + error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDrawMultiEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDrawMultiEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDrawMultiEXT(commandBuffer, drawCount, pVertexInfo, instanceCount, firstInstance, stride, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDrawMultiEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDrawMultiEXT(commandBuffer, drawCount, pVertexInfo, instanceCount, firstInstance, stride, + record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDrawMultiEXT(commandBuffer, drawCount, pVertexInfo, instanceCount, firstInstance, stride); + device_dispatch->CmdDrawMultiEXT(commandBuffer, drawCount, pVertexInfo, instanceCount, firstInstance, stride); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDrawMultiEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDrawMultiEXT(commandBuffer, drawCount, pVertexInfo, instanceCount, firstInstance, stride, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDrawMultiEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDrawMultiEXT(commandBuffer, drawCount, pVertexInfo, instanceCount, firstInstance, stride, + record_obj); } } } @@ -23478,37 +21598,38 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMultiIndexedEXT(VkCommandBuffer commandBuffer, uint32_t firstInstance, uint32_t stride, const int32_t* pVertexOffset) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDrawMultiIndexedEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDrawMultiIndexedEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDrawMultiIndexedEXT(commandBuffer, drawCount, pIndexInfo, instanceCount, - firstInstance, stride, pVertexOffset, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDrawMultiIndexedEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDrawMultiIndexedEXT(commandBuffer, drawCount, pIndexInfo, instanceCount, firstInstance, + stride, pVertexOffset, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDrawMultiIndexedEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDrawMultiIndexedEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDrawMultiIndexedEXT(commandBuffer, drawCount, pIndexInfo, instanceCount, firstInstance, - stride, pVertexOffset, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDrawMultiIndexedEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDrawMultiIndexedEXT(commandBuffer, drawCount, pIndexInfo, instanceCount, firstInstance, stride, + pVertexOffset, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDrawMultiIndexedEXT(commandBuffer, drawCount, pIndexInfo, instanceCount, firstInstance, stride, pVertexOffset); + device_dispatch->CmdDrawMultiIndexedEXT(commandBuffer, drawCount, pIndexInfo, instanceCount, firstInstance, stride, + pVertexOffset); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDrawMultiIndexedEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDrawMultiIndexedEXT(commandBuffer, drawCount, pIndexInfo, instanceCount, firstInstance, - stride, pVertexOffset, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDrawMultiIndexedEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDrawMultiIndexedEXT(commandBuffer, drawCount, pIndexInfo, instanceCount, firstInstance, stride, + pVertexOffset, record_obj); } } } @@ -23517,36 +21638,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateMicromapEXT(VkDevice device, const VkMicrom const VkAllocationCallbacks* pAllocator, VkMicromapEXT* pMicromap) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateMicromapEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateMicromapEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateMicromapEXT(device, pCreateInfo, pAllocator, pMicromap, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateMicromapEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateMicromapEXT(device, pCreateInfo, pAllocator, pMicromap, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateMicromapEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateMicromapEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateMicromapEXT(device, pCreateInfo, pAllocator, pMicromap, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateMicromapEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateMicromapEXT(device, pCreateInfo, pAllocator, pMicromap, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateMicromapEXT(device, pCreateInfo, pAllocator, pMicromap); + result = device_dispatch->CreateMicromapEXT(device, pCreateInfo, pAllocator, pMicromap); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateMicromapEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateMicromapEXT(device, pCreateInfo, pAllocator, pMicromap, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateMicromapEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateMicromapEXT(device, pCreateInfo, pAllocator, pMicromap, record_obj); } } return result; @@ -23555,34 +21676,34 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateMicromapEXT(VkDevice device, const VkMicrom VKAPI_ATTR void VKAPI_CALL DestroyMicromapEXT(VkDevice device, VkMicromapEXT micromap, const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyMicromapEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyMicromapEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyMicromapEXT(device, micromap, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyMicromapEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyMicromapEXT(device, micromap, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyMicromapEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyMicromapEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyMicromapEXT(device, micromap, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyMicromapEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyMicromapEXT(device, micromap, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyMicromapEXT(device, micromap, pAllocator); + device_dispatch->DestroyMicromapEXT(device, micromap, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyMicromapEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyMicromapEXT(device, micromap, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyMicromapEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyMicromapEXT(device, micromap, pAllocator, record_obj); } } } @@ -23591,34 +21712,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBuildMicromapsEXT(VkCommandBuffer commandBuffer, u const VkMicromapBuildInfoEXT* pInfos) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBuildMicromapsEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBuildMicromapsEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBuildMicromapsEXT(commandBuffer, infoCount, pInfos, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBuildMicromapsEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBuildMicromapsEXT(commandBuffer, infoCount, pInfos, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBuildMicromapsEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBuildMicromapsEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBuildMicromapsEXT(commandBuffer, infoCount, pInfos, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBuildMicromapsEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBuildMicromapsEXT(commandBuffer, infoCount, pInfos, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBuildMicromapsEXT(commandBuffer, infoCount, pInfos); + device_dispatch->CmdBuildMicromapsEXT(commandBuffer, infoCount, pInfos); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBuildMicromapsEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBuildMicromapsEXT(commandBuffer, infoCount, pInfos, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBuildMicromapsEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBuildMicromapsEXT(commandBuffer, infoCount, pInfos, record_obj); } } } @@ -23627,36 +21748,36 @@ VKAPI_ATTR VkResult VKAPI_CALL BuildMicromapsEXT(VkDevice device, VkDeferredOper const VkMicromapBuildInfoEXT* pInfos) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkBuildMicromapsEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateBuildMicromapsEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateBuildMicromapsEXT(device, deferredOperation, infoCount, pInfos, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateBuildMicromapsEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateBuildMicromapsEXT(device, deferredOperation, infoCount, pInfos, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkBuildMicromapsEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordBuildMicromapsEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordBuildMicromapsEXT(device, deferredOperation, infoCount, pInfos, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordBuildMicromapsEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordBuildMicromapsEXT(device, deferredOperation, infoCount, pInfos, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchBuildMicromapsEXT(device, deferredOperation, infoCount, pInfos); + result = device_dispatch->BuildMicromapsEXT(device, deferredOperation, infoCount, pInfos); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordBuildMicromapsEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordBuildMicromapsEXT(device, deferredOperation, infoCount, pInfos, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordBuildMicromapsEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordBuildMicromapsEXT(device, deferredOperation, infoCount, pInfos, record_obj); } } return result; @@ -23666,36 +21787,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyMicromapEXT(VkDevice device, VkDeferredOperat const VkCopyMicromapInfoEXT* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCopyMicromapEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCopyMicromapEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCopyMicromapEXT(device, deferredOperation, pInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCopyMicromapEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCopyMicromapEXT(device, deferredOperation, pInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCopyMicromapEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCopyMicromapEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCopyMicromapEXT(device, deferredOperation, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCopyMicromapEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCopyMicromapEXT(device, deferredOperation, pInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCopyMicromapEXT(device, deferredOperation, pInfo); + result = device_dispatch->CopyMicromapEXT(device, deferredOperation, pInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCopyMicromapEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCopyMicromapEXT(device, deferredOperation, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCopyMicromapEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCopyMicromapEXT(device, deferredOperation, pInfo, record_obj); } } return result; @@ -23705,36 +21826,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyMicromapToMemoryEXT(VkDevice device, VkDeferr const VkCopyMicromapToMemoryInfoEXT* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCopyMicromapToMemoryEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCopyMicromapToMemoryEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCopyMicromapToMemoryEXT(device, deferredOperation, pInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCopyMicromapToMemoryEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCopyMicromapToMemoryEXT(device, deferredOperation, pInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCopyMicromapToMemoryEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCopyMicromapToMemoryEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCopyMicromapToMemoryEXT(device, deferredOperation, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCopyMicromapToMemoryEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCopyMicromapToMemoryEXT(device, deferredOperation, pInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCopyMicromapToMemoryEXT(device, deferredOperation, pInfo); + result = device_dispatch->CopyMicromapToMemoryEXT(device, deferredOperation, pInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCopyMicromapToMemoryEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCopyMicromapToMemoryEXT(device, deferredOperation, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCopyMicromapToMemoryEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCopyMicromapToMemoryEXT(device, deferredOperation, pInfo, record_obj); } } return result; @@ -23744,36 +21865,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyMemoryToMicromapEXT(VkDevice device, VkDeferr const VkCopyMemoryToMicromapInfoEXT* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCopyMemoryToMicromapEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCopyMemoryToMicromapEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCopyMemoryToMicromapEXT(device, deferredOperation, pInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCopyMemoryToMicromapEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCopyMemoryToMicromapEXT(device, deferredOperation, pInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCopyMemoryToMicromapEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCopyMemoryToMicromapEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCopyMemoryToMicromapEXT(device, deferredOperation, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCopyMemoryToMicromapEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCopyMemoryToMicromapEXT(device, deferredOperation, pInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCopyMemoryToMicromapEXT(device, deferredOperation, pInfo); + result = device_dispatch->CopyMemoryToMicromapEXT(device, deferredOperation, pInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCopyMemoryToMicromapEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCopyMemoryToMicromapEXT(device, deferredOperation, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCopyMemoryToMicromapEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCopyMemoryToMicromapEXT(device, deferredOperation, pInfo, record_obj); } } return result; @@ -23783,40 +21904,40 @@ VKAPI_ATTR VkResult VKAPI_CALL WriteMicromapsPropertiesEXT(VkDevice device, uint VkQueryType queryType, size_t dataSize, void* pData, size_t stride) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkWriteMicromapsPropertiesEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateWriteMicromapsPropertiesEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateWriteMicromapsPropertiesEXT(device, micromapCount, pMicromaps, queryType, dataSize, - pData, stride, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateWriteMicromapsPropertiesEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateWriteMicromapsPropertiesEXT(device, micromapCount, pMicromaps, queryType, dataSize, pData, + stride, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkWriteMicromapsPropertiesEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordWriteMicromapsPropertiesEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordWriteMicromapsPropertiesEXT(device, micromapCount, pMicromaps, queryType, dataSize, pData, - stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordWriteMicromapsPropertiesEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordWriteMicromapsPropertiesEXT(device, micromapCount, pMicromaps, queryType, dataSize, pData, stride, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchWriteMicromapsPropertiesEXT(device, micromapCount, pMicromaps, queryType, dataSize, pData, stride); + result = + device_dispatch->WriteMicromapsPropertiesEXT(device, micromapCount, pMicromaps, queryType, dataSize, pData, stride); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordWriteMicromapsPropertiesEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordWriteMicromapsPropertiesEXT(device, micromapCount, pMicromaps, queryType, dataSize, pData, - stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordWriteMicromapsPropertiesEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordWriteMicromapsPropertiesEXT(device, micromapCount, pMicromaps, queryType, dataSize, pData, stride, + record_obj); } } return result; @@ -23825,34 +21946,34 @@ VKAPI_ATTR VkResult VKAPI_CALL WriteMicromapsPropertiesEXT(VkDevice device, uint VKAPI_ATTR void VKAPI_CALL CmdCopyMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCopyMicromapEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCopyMicromapEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCopyMicromapEXT(commandBuffer, pInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCopyMicromapEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCopyMicromapEXT(commandBuffer, pInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCopyMicromapEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCopyMicromapEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCopyMicromapEXT(commandBuffer, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCopyMicromapEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCopyMicromapEXT(commandBuffer, pInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCopyMicromapEXT(commandBuffer, pInfo); + device_dispatch->CmdCopyMicromapEXT(commandBuffer, pInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCopyMicromapEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCopyMicromapEXT(commandBuffer, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCopyMicromapEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCopyMicromapEXT(commandBuffer, pInfo, record_obj); } } } @@ -23860,36 +21981,35 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyMicromapEXT(VkCommandBuffer commandBuffer, con VKAPI_ATTR void VKAPI_CALL CmdCopyMicromapToMemoryEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCopyMicromapToMemoryEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCopyMicromapToMemoryEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCopyMicromapToMemoryEXT(commandBuffer, pInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCopyMicromapToMemoryEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCopyMicromapToMemoryEXT(commandBuffer, pInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCopyMicromapToMemoryEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCopyMicromapToMemoryEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCopyMicromapToMemoryEXT(commandBuffer, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCopyMicromapToMemoryEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCopyMicromapToMemoryEXT(commandBuffer, pInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCopyMicromapToMemoryEXT(commandBuffer, pInfo); + device_dispatch->CmdCopyMicromapToMemoryEXT(commandBuffer, pInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCopyMicromapToMemoryEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCopyMicromapToMemoryEXT(commandBuffer, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCopyMicromapToMemoryEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCopyMicromapToMemoryEXT(commandBuffer, pInfo, record_obj); } } } @@ -23897,36 +22017,35 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyMicromapToMemoryEXT(VkCommandBuffer commandBuf VKAPI_ATTR void VKAPI_CALL CmdCopyMemoryToMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCopyMemoryToMicromapEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCopyMemoryToMicromapEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCopyMemoryToMicromapEXT(commandBuffer, pInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCopyMemoryToMicromapEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCopyMemoryToMicromapEXT(commandBuffer, pInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCopyMemoryToMicromapEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCopyMemoryToMicromapEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCopyMemoryToMicromapEXT(commandBuffer, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCopyMemoryToMicromapEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCopyMemoryToMicromapEXT(commandBuffer, pInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCopyMemoryToMicromapEXT(commandBuffer, pInfo); + device_dispatch->CmdCopyMemoryToMicromapEXT(commandBuffer, pInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCopyMemoryToMicromapEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCopyMemoryToMicromapEXT(commandBuffer, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCopyMemoryToMicromapEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCopyMemoryToMicromapEXT(commandBuffer, pInfo, record_obj); } } } @@ -23936,39 +22055,38 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteMicromapsPropertiesEXT(VkCommandBuffer comman VkQueryPool queryPool, uint32_t firstQuery) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdWriteMicromapsPropertiesEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdWriteMicromapsPropertiesEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdWriteMicromapsPropertiesEXT(commandBuffer, micromapCount, pMicromaps, queryType, - queryPool, firstQuery, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdWriteMicromapsPropertiesEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdWriteMicromapsPropertiesEXT(commandBuffer, micromapCount, pMicromaps, queryType, + queryPool, firstQuery, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdWriteMicromapsPropertiesEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdWriteMicromapsPropertiesEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdWriteMicromapsPropertiesEXT(commandBuffer, micromapCount, pMicromaps, queryType, queryPool, - firstQuery, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdWriteMicromapsPropertiesEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdWriteMicromapsPropertiesEXT(commandBuffer, micromapCount, pMicromaps, queryType, queryPool, + firstQuery, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdWriteMicromapsPropertiesEXT(commandBuffer, micromapCount, pMicromaps, queryType, queryPool, firstQuery); + device_dispatch->CmdWriteMicromapsPropertiesEXT(commandBuffer, micromapCount, pMicromaps, queryType, queryPool, firstQuery); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdWriteMicromapsPropertiesEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdWriteMicromapsPropertiesEXT(commandBuffer, micromapCount, pMicromaps, queryType, queryPool, - firstQuery, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdWriteMicromapsPropertiesEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdWriteMicromapsPropertiesEXT(commandBuffer, micromapCount, pMicromaps, queryType, queryPool, + firstQuery, record_obj); } } } @@ -23977,37 +22095,34 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceMicromapCompatibilityEXT(VkDevice device, co VkAccelerationStructureCompatibilityKHR* pCompatibility) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeviceMicromapCompatibilityEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeviceMicromapCompatibilityEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDeviceMicromapCompatibilityEXT(device, pVersionInfo, pCompatibility, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeviceMicromapCompatibilityEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDeviceMicromapCompatibilityEXT(device, pVersionInfo, pCompatibility, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetDeviceMicromapCompatibilityEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeviceMicromapCompatibilityEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeviceMicromapCompatibilityEXT(device, pVersionInfo, pCompatibility, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeviceMicromapCompatibilityEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeviceMicromapCompatibilityEXT(device, pVersionInfo, pCompatibility, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetDeviceMicromapCompatibilityEXT(device, pVersionInfo, pCompatibility); + device_dispatch->GetDeviceMicromapCompatibilityEXT(device, pVersionInfo, pCompatibility); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeviceMicromapCompatibilityEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeviceMicromapCompatibilityEXT(device, pVersionInfo, pCompatibility, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeviceMicromapCompatibilityEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeviceMicromapCompatibilityEXT(device, pVersionInfo, pCompatibility, record_obj); } } } @@ -24017,35 +22132,34 @@ VKAPI_ATTR void VKAPI_CALL GetMicromapBuildSizesEXT(VkDevice device, VkAccelerat VkMicromapBuildSizesInfoEXT* pSizeInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetMicromapBuildSizesEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetMicromapBuildSizesEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetMicromapBuildSizesEXT(device, buildType, pBuildInfo, pSizeInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetMicromapBuildSizesEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetMicromapBuildSizesEXT(device, buildType, pBuildInfo, pSizeInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetMicromapBuildSizesEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetMicromapBuildSizesEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetMicromapBuildSizesEXT(device, buildType, pBuildInfo, pSizeInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetMicromapBuildSizesEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetMicromapBuildSizesEXT(device, buildType, pBuildInfo, pSizeInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetMicromapBuildSizesEXT(device, buildType, pBuildInfo, pSizeInfo); + device_dispatch->GetMicromapBuildSizesEXT(device, buildType, pBuildInfo, pSizeInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetMicromapBuildSizesEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetMicromapBuildSizesEXT(device, buildType, pBuildInfo, pSizeInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetMicromapBuildSizesEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetMicromapBuildSizesEXT(device, buildType, pBuildInfo, pSizeInfo, record_obj); } } } @@ -24054,34 +22168,34 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawClusterHUAWEI(VkCommandBuffer commandBuffer, u uint32_t groupCountZ) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDrawClusterHUAWEI, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDrawClusterHUAWEI]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDrawClusterHUAWEI(commandBuffer, groupCountX, groupCountY, groupCountZ, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDrawClusterHUAWEI]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDrawClusterHUAWEI(commandBuffer, groupCountX, groupCountY, groupCountZ, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDrawClusterHUAWEI); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDrawClusterHUAWEI]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDrawClusterHUAWEI(commandBuffer, groupCountX, groupCountY, groupCountZ, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDrawClusterHUAWEI]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDrawClusterHUAWEI(commandBuffer, groupCountX, groupCountY, groupCountZ, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDrawClusterHUAWEI(commandBuffer, groupCountX, groupCountY, groupCountZ); + device_dispatch->CmdDrawClusterHUAWEI(commandBuffer, groupCountX, groupCountY, groupCountZ); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDrawClusterHUAWEI]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDrawClusterHUAWEI(commandBuffer, groupCountX, groupCountY, groupCountZ, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDrawClusterHUAWEI]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDrawClusterHUAWEI(commandBuffer, groupCountX, groupCountY, groupCountZ, record_obj); } } } @@ -24089,36 +22203,35 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawClusterHUAWEI(VkCommandBuffer commandBuffer, u VKAPI_ATTR void VKAPI_CALL CmdDrawClusterIndirectHUAWEI(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDrawClusterIndirectHUAWEI, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDrawClusterIndirectHUAWEI]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDrawClusterIndirectHUAWEI(commandBuffer, buffer, offset, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDrawClusterIndirectHUAWEI]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDrawClusterIndirectHUAWEI(commandBuffer, buffer, offset, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDrawClusterIndirectHUAWEI); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDrawClusterIndirectHUAWEI]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDrawClusterIndirectHUAWEI(commandBuffer, buffer, offset, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDrawClusterIndirectHUAWEI]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDrawClusterIndirectHUAWEI(commandBuffer, buffer, offset, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDrawClusterIndirectHUAWEI(commandBuffer, buffer, offset); + device_dispatch->CmdDrawClusterIndirectHUAWEI(commandBuffer, buffer, offset); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDrawClusterIndirectHUAWEI]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDrawClusterIndirectHUAWEI(commandBuffer, buffer, offset, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDrawClusterIndirectHUAWEI]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDrawClusterIndirectHUAWEI(commandBuffer, buffer, offset, record_obj); } } } @@ -24126,35 +22239,34 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawClusterIndirectHUAWEI(VkCommandBuffer commandB VKAPI_ATTR void VKAPI_CALL SetDeviceMemoryPriorityEXT(VkDevice device, VkDeviceMemory memory, float priority) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkSetDeviceMemoryPriorityEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateSetDeviceMemoryPriorityEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateSetDeviceMemoryPriorityEXT(device, memory, priority, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateSetDeviceMemoryPriorityEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateSetDeviceMemoryPriorityEXT(device, memory, priority, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkSetDeviceMemoryPriorityEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordSetDeviceMemoryPriorityEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordSetDeviceMemoryPriorityEXT(device, memory, priority, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordSetDeviceMemoryPriorityEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordSetDeviceMemoryPriorityEXT(device, memory, priority, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchSetDeviceMemoryPriorityEXT(device, memory, priority); + device_dispatch->SetDeviceMemoryPriorityEXT(device, memory, priority); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordSetDeviceMemoryPriorityEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordSetDeviceMemoryPriorityEXT(device, memory, priority, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordSetDeviceMemoryPriorityEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordSetDeviceMemoryPriorityEXT(device, memory, priority, record_obj); } } } @@ -24164,40 +22276,37 @@ VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutHostMappingInfoVALVE(VkDevice d VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDescriptorSetLayoutHostMappingInfoVALVE, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDescriptorSetLayoutHostMappingInfoVALVE]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDescriptorSetLayoutHostMappingInfoVALVE(device, pBindingReference, pHostMapping, - error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDescriptorSetLayoutHostMappingInfoVALVE]) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateGetDescriptorSetLayoutHostMappingInfoVALVE(device, pBindingReference, pHostMapping, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetDescriptorSetLayoutHostMappingInfoVALVE); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDescriptorSetLayoutHostMappingInfoVALVE]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDescriptorSetLayoutHostMappingInfoVALVE(device, pBindingReference, pHostMapping, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDescriptorSetLayoutHostMappingInfoVALVE]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDescriptorSetLayoutHostMappingInfoVALVE(device, pBindingReference, pHostMapping, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetDescriptorSetLayoutHostMappingInfoVALVE(device, pBindingReference, pHostMapping); + device_dispatch->GetDescriptorSetLayoutHostMappingInfoVALVE(device, pBindingReference, pHostMapping); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDescriptorSetLayoutHostMappingInfoVALVE]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDescriptorSetLayoutHostMappingInfoVALVE(device, pBindingReference, pHostMapping, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDescriptorSetLayoutHostMappingInfoVALVE]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDescriptorSetLayoutHostMappingInfoVALVE(device, pBindingReference, pHostMapping, record_obj); } } } @@ -24205,37 +22314,34 @@ VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutHostMappingInfoVALVE(VkDevice d VKAPI_ATTR void VKAPI_CALL GetDescriptorSetHostMappingVALVE(VkDevice device, VkDescriptorSet descriptorSet, void** ppData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDescriptorSetHostMappingVALVE, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDescriptorSetHostMappingVALVE]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDescriptorSetHostMappingVALVE(device, descriptorSet, ppData, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDescriptorSetHostMappingVALVE]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDescriptorSetHostMappingVALVE(device, descriptorSet, ppData, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetDescriptorSetHostMappingVALVE); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDescriptorSetHostMappingVALVE]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDescriptorSetHostMappingVALVE(device, descriptorSet, ppData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDescriptorSetHostMappingVALVE]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDescriptorSetHostMappingVALVE(device, descriptorSet, ppData, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetDescriptorSetHostMappingVALVE(device, descriptorSet, ppData); + device_dispatch->GetDescriptorSetHostMappingVALVE(device, descriptorSet, ppData); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDescriptorSetHostMappingVALVE]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDescriptorSetHostMappingVALVE(device, descriptorSet, ppData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDescriptorSetHostMappingVALVE]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDescriptorSetHostMappingVALVE(device, descriptorSet, ppData, record_obj); } } } @@ -24244,35 +22350,34 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyMemoryIndirectNV(VkCommandBuffer commandBuffer uint32_t copyCount, uint32_t stride) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCopyMemoryIndirectNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCopyMemoryIndirectNV]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateCmdCopyMemoryIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCopyMemoryIndirectNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCopyMemoryIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCopyMemoryIndirectNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCopyMemoryIndirectNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCopyMemoryIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCopyMemoryIndirectNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCopyMemoryIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCopyMemoryIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride); + device_dispatch->CmdCopyMemoryIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCopyMemoryIndirectNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCopyMemoryIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCopyMemoryIndirectNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCopyMemoryIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride, record_obj); } } } @@ -24283,40 +22388,39 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyMemoryToImageIndirectNV(VkCommandBuffer comman const VkImageSubresourceLayers* pImageSubresources) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCopyMemoryToImageIndirectNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCopyMemoryToImageIndirectNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCopyMemoryToImageIndirectNV( - commandBuffer, copyBufferAddress, copyCount, stride, dstImage, dstImageLayout, pImageSubresources, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCopyMemoryToImageIndirectNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCopyMemoryToImageIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride, dstImage, + dstImageLayout, pImageSubresources, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCopyMemoryToImageIndirectNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCopyMemoryToImageIndirectNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCopyMemoryToImageIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride, dstImage, - dstImageLayout, pImageSubresources, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCopyMemoryToImageIndirectNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCopyMemoryToImageIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride, dstImage, + dstImageLayout, pImageSubresources, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCopyMemoryToImageIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride, dstImage, dstImageLayout, - pImageSubresources); + device_dispatch->CmdCopyMemoryToImageIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride, dstImage, + dstImageLayout, pImageSubresources); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCopyMemoryToImageIndirectNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCopyMemoryToImageIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride, dstImage, - dstImageLayout, pImageSubresources, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCopyMemoryToImageIndirectNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCopyMemoryToImageIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride, dstImage, + dstImageLayout, pImageSubresources, record_obj); } } } @@ -24325,37 +22429,35 @@ VKAPI_ATTR void VKAPI_CALL CmdDecompressMemoryNV(VkCommandBuffer commandBuffer, const VkDecompressMemoryRegionNV* pDecompressMemoryRegions) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDecompressMemoryNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDecompressMemoryNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDecompressMemoryNV(commandBuffer, decompressRegionCount, pDecompressMemoryRegions, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDecompressMemoryNV]) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateCmdDecompressMemoryNV(commandBuffer, decompressRegionCount, pDecompressMemoryRegions, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDecompressMemoryNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDecompressMemoryNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDecompressMemoryNV(commandBuffer, decompressRegionCount, pDecompressMemoryRegions, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDecompressMemoryNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDecompressMemoryNV(commandBuffer, decompressRegionCount, pDecompressMemoryRegions, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDecompressMemoryNV(commandBuffer, decompressRegionCount, pDecompressMemoryRegions); + device_dispatch->CmdDecompressMemoryNV(commandBuffer, decompressRegionCount, pDecompressMemoryRegions); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDecompressMemoryNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDecompressMemoryNV(commandBuffer, decompressRegionCount, pDecompressMemoryRegions, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDecompressMemoryNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDecompressMemoryNV(commandBuffer, decompressRegionCount, pDecompressMemoryRegions, record_obj); } } } @@ -24365,41 +22467,39 @@ VKAPI_ATTR void VKAPI_CALL CmdDecompressMemoryIndirectCountNV(VkCommandBuffer co VkDeviceAddress indirectCommandsCountAddress, uint32_t stride) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDecompressMemoryIndirectCountNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDecompressMemoryIndirectCountNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDecompressMemoryIndirectCountNV(commandBuffer, indirectCommandsAddress, - indirectCommandsCountAddress, stride, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDecompressMemoryIndirectCountNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDecompressMemoryIndirectCountNV(commandBuffer, indirectCommandsAddress, + indirectCommandsCountAddress, stride, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDecompressMemoryIndirectCountNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDecompressMemoryIndirectCountNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDecompressMemoryIndirectCountNV(commandBuffer, indirectCommandsAddress, - indirectCommandsCountAddress, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDecompressMemoryIndirectCountNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDecompressMemoryIndirectCountNV(commandBuffer, indirectCommandsAddress, + indirectCommandsCountAddress, stride, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDecompressMemoryIndirectCountNV(commandBuffer, indirectCommandsAddress, indirectCommandsCountAddress, stride); + device_dispatch->CmdDecompressMemoryIndirectCountNV(commandBuffer, indirectCommandsAddress, indirectCommandsCountAddress, + stride); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDecompressMemoryIndirectCountNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDecompressMemoryIndirectCountNV(commandBuffer, indirectCommandsAddress, - indirectCommandsCountAddress, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDecompressMemoryIndirectCountNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDecompressMemoryIndirectCountNV(commandBuffer, indirectCommandsAddress, + indirectCommandsCountAddress, stride, record_obj); } } } @@ -24408,38 +22508,35 @@ VKAPI_ATTR void VKAPI_CALL GetPipelineIndirectMemoryRequirementsNV(VkDevice devi VkMemoryRequirements2* pMemoryRequirements) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPipelineIndirectMemoryRequirementsNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetPipelineIndirectMemoryRequirementsNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPipelineIndirectMemoryRequirementsNV(device, pCreateInfo, pMemoryRequirements, - error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetPipelineIndirectMemoryRequirementsNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPipelineIndirectMemoryRequirementsNV(device, pCreateInfo, pMemoryRequirements, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetPipelineIndirectMemoryRequirementsNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetPipelineIndirectMemoryRequirementsNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPipelineIndirectMemoryRequirementsNV(device, pCreateInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetPipelineIndirectMemoryRequirementsNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPipelineIndirectMemoryRequirementsNV(device, pCreateInfo, pMemoryRequirements, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetPipelineIndirectMemoryRequirementsNV(device, pCreateInfo, pMemoryRequirements); + device_dispatch->GetPipelineIndirectMemoryRequirementsNV(device, pCreateInfo, pMemoryRequirements); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetPipelineIndirectMemoryRequirementsNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPipelineIndirectMemoryRequirementsNV(device, pCreateInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetPipelineIndirectMemoryRequirementsNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPipelineIndirectMemoryRequirementsNV(device, pCreateInfo, pMemoryRequirements, record_obj); } } } @@ -24448,39 +22545,35 @@ VKAPI_ATTR void VKAPI_CALL CmdUpdatePipelineIndirectBufferNV(VkCommandBuffer com VkPipeline pipeline) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdUpdatePipelineIndirectBufferNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdUpdatePipelineIndirectBufferNV]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateCmdUpdatePipelineIndirectBufferNV(commandBuffer, pipelineBindPoint, pipeline, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdUpdatePipelineIndirectBufferNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdUpdatePipelineIndirectBufferNV(commandBuffer, pipelineBindPoint, pipeline, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdUpdatePipelineIndirectBufferNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdUpdatePipelineIndirectBufferNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdUpdatePipelineIndirectBufferNV(commandBuffer, pipelineBindPoint, pipeline, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdUpdatePipelineIndirectBufferNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdUpdatePipelineIndirectBufferNV(commandBuffer, pipelineBindPoint, pipeline, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdUpdatePipelineIndirectBufferNV(commandBuffer, pipelineBindPoint, pipeline); + device_dispatch->CmdUpdatePipelineIndirectBufferNV(commandBuffer, pipelineBindPoint, pipeline); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdUpdatePipelineIndirectBufferNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdUpdatePipelineIndirectBufferNV(commandBuffer, pipelineBindPoint, pipeline, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdUpdatePipelineIndirectBufferNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdUpdatePipelineIndirectBufferNV(commandBuffer, pipelineBindPoint, pipeline, record_obj); } } } @@ -24489,39 +22582,36 @@ VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetPipelineIndirectDeviceAddressNV(VkDevic const VkPipelineIndirectDeviceAddressInfoNV* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPipelineIndirectDeviceAddressNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetPipelineIndirectDeviceAddressNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPipelineIndirectDeviceAddressNV(device, pInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetPipelineIndirectDeviceAddressNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPipelineIndirectDeviceAddressNV(device, pInfo, error_obj); if (skip) return 0; } } RecordObject record_obj(vvl::Func::vkGetPipelineIndirectDeviceAddressNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetPipelineIndirectDeviceAddressNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPipelineIndirectDeviceAddressNV(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetPipelineIndirectDeviceAddressNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPipelineIndirectDeviceAddressNV(device, pInfo, record_obj); } } VkDeviceAddress result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPipelineIndirectDeviceAddressNV(device, pInfo); + result = device_dispatch->GetPipelineIndirectDeviceAddressNV(device, pInfo); } record_obj.device_address = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetPipelineIndirectDeviceAddressNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPipelineIndirectDeviceAddressNV(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetPipelineIndirectDeviceAddressNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPipelineIndirectDeviceAddressNV(device, pInfo, record_obj); } } return result; @@ -24530,35 +22620,34 @@ VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetPipelineIndirectDeviceAddressNV(VkDevic VKAPI_ATTR void VKAPI_CALL CmdSetDepthClampEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClampEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDepthClampEnableEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthClampEnableEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDepthClampEnableEXT(commandBuffer, depthClampEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthClampEnableEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDepthClampEnableEXT(commandBuffer, depthClampEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDepthClampEnableEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthClampEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDepthClampEnableEXT(commandBuffer, depthClampEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthClampEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDepthClampEnableEXT(commandBuffer, depthClampEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDepthClampEnableEXT(commandBuffer, depthClampEnable); + device_dispatch->CmdSetDepthClampEnableEXT(commandBuffer, depthClampEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthClampEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDepthClampEnableEXT(commandBuffer, depthClampEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthClampEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDepthClampEnableEXT(commandBuffer, depthClampEnable, record_obj); } } } @@ -24566,34 +22655,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthClampEnableEXT(VkCommandBuffer commandBuff VKAPI_ATTR void VKAPI_CALL CmdSetPolygonModeEXT(VkCommandBuffer commandBuffer, VkPolygonMode polygonMode) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetPolygonModeEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetPolygonModeEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetPolygonModeEXT(commandBuffer, polygonMode, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetPolygonModeEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetPolygonModeEXT(commandBuffer, polygonMode, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetPolygonModeEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetPolygonModeEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetPolygonModeEXT(commandBuffer, polygonMode, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetPolygonModeEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetPolygonModeEXT(commandBuffer, polygonMode, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetPolygonModeEXT(commandBuffer, polygonMode); + device_dispatch->CmdSetPolygonModeEXT(commandBuffer, polygonMode); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetPolygonModeEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetPolygonModeEXT(commandBuffer, polygonMode, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetPolygonModeEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetPolygonModeEXT(commandBuffer, polygonMode, record_obj); } } } @@ -24602,36 +22691,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRasterizationSamplesEXT(VkCommandBuffer command VkSampleCountFlagBits rasterizationSamples) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetRasterizationSamplesEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetRasterizationSamplesEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetRasterizationSamplesEXT(commandBuffer, rasterizationSamples, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetRasterizationSamplesEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetRasterizationSamplesEXT(commandBuffer, rasterizationSamples, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetRasterizationSamplesEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetRasterizationSamplesEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetRasterizationSamplesEXT(commandBuffer, rasterizationSamples, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetRasterizationSamplesEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetRasterizationSamplesEXT(commandBuffer, rasterizationSamples, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetRasterizationSamplesEXT(commandBuffer, rasterizationSamples); + device_dispatch->CmdSetRasterizationSamplesEXT(commandBuffer, rasterizationSamples); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetRasterizationSamplesEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetRasterizationSamplesEXT(commandBuffer, rasterizationSamples, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetRasterizationSamplesEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetRasterizationSamplesEXT(commandBuffer, rasterizationSamples, record_obj); } } } @@ -24640,34 +22728,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetSampleMaskEXT(VkCommandBuffer commandBuffer, Vk const VkSampleMask* pSampleMask) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetSampleMaskEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetSampleMaskEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetSampleMaskEXT(commandBuffer, samples, pSampleMask, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetSampleMaskEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetSampleMaskEXT(commandBuffer, samples, pSampleMask, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetSampleMaskEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetSampleMaskEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetSampleMaskEXT(commandBuffer, samples, pSampleMask, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetSampleMaskEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetSampleMaskEXT(commandBuffer, samples, pSampleMask, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetSampleMaskEXT(commandBuffer, samples, pSampleMask); + device_dispatch->CmdSetSampleMaskEXT(commandBuffer, samples, pSampleMask); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetSampleMaskEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetSampleMaskEXT(commandBuffer, samples, pSampleMask, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetSampleMaskEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetSampleMaskEXT(commandBuffer, samples, pSampleMask, record_obj); } } } @@ -24675,36 +22763,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetSampleMaskEXT(VkCommandBuffer commandBuffer, Vk VKAPI_ATTR void VKAPI_CALL CmdSetAlphaToCoverageEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToCoverageEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetAlphaToCoverageEnableEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetAlphaToCoverageEnableEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetAlphaToCoverageEnableEXT(commandBuffer, alphaToCoverageEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetAlphaToCoverageEnableEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetAlphaToCoverageEnableEXT(commandBuffer, alphaToCoverageEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetAlphaToCoverageEnableEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetAlphaToCoverageEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetAlphaToCoverageEnableEXT(commandBuffer, alphaToCoverageEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetAlphaToCoverageEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetAlphaToCoverageEnableEXT(commandBuffer, alphaToCoverageEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetAlphaToCoverageEnableEXT(commandBuffer, alphaToCoverageEnable); + device_dispatch->CmdSetAlphaToCoverageEnableEXT(commandBuffer, alphaToCoverageEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetAlphaToCoverageEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetAlphaToCoverageEnableEXT(commandBuffer, alphaToCoverageEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetAlphaToCoverageEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetAlphaToCoverageEnableEXT(commandBuffer, alphaToCoverageEnable, record_obj); } } } @@ -24712,35 +22799,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetAlphaToCoverageEnableEXT(VkCommandBuffer comman VKAPI_ATTR void VKAPI_CALL CmdSetAlphaToOneEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToOneEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetAlphaToOneEnableEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetAlphaToOneEnableEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetAlphaToOneEnableEXT(commandBuffer, alphaToOneEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetAlphaToOneEnableEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetAlphaToOneEnableEXT(commandBuffer, alphaToOneEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetAlphaToOneEnableEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetAlphaToOneEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetAlphaToOneEnableEXT(commandBuffer, alphaToOneEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetAlphaToOneEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetAlphaToOneEnableEXT(commandBuffer, alphaToOneEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetAlphaToOneEnableEXT(commandBuffer, alphaToOneEnable); + device_dispatch->CmdSetAlphaToOneEnableEXT(commandBuffer, alphaToOneEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetAlphaToOneEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetAlphaToOneEnableEXT(commandBuffer, alphaToOneEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetAlphaToOneEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetAlphaToOneEnableEXT(commandBuffer, alphaToOneEnable, record_obj); } } } @@ -24748,34 +22834,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetAlphaToOneEnableEXT(VkCommandBuffer commandBuff VKAPI_ATTR void VKAPI_CALL CmdSetLogicOpEnableEXT(VkCommandBuffer commandBuffer, VkBool32 logicOpEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetLogicOpEnableEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetLogicOpEnableEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetLogicOpEnableEXT(commandBuffer, logicOpEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetLogicOpEnableEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetLogicOpEnableEXT(commandBuffer, logicOpEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetLogicOpEnableEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetLogicOpEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetLogicOpEnableEXT(commandBuffer, logicOpEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetLogicOpEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetLogicOpEnableEXT(commandBuffer, logicOpEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetLogicOpEnableEXT(commandBuffer, logicOpEnable); + device_dispatch->CmdSetLogicOpEnableEXT(commandBuffer, logicOpEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetLogicOpEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetLogicOpEnableEXT(commandBuffer, logicOpEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetLogicOpEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetLogicOpEnableEXT(commandBuffer, logicOpEnable, record_obj); } } } @@ -24784,38 +22870,37 @@ VKAPI_ATTR void VKAPI_CALL CmdSetColorBlendEnableEXT(VkCommandBuffer commandBuff uint32_t attachmentCount, const VkBool32* pColorBlendEnables) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetColorBlendEnableEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetColorBlendEnableEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetColorBlendEnableEXT(commandBuffer, firstAttachment, attachmentCount, - pColorBlendEnables, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetColorBlendEnableEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetColorBlendEnableEXT(commandBuffer, firstAttachment, attachmentCount, + pColorBlendEnables, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetColorBlendEnableEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetColorBlendEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetColorBlendEnableEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendEnables, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetColorBlendEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetColorBlendEnableEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendEnables, + record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetColorBlendEnableEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendEnables); + device_dispatch->CmdSetColorBlendEnableEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendEnables); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetColorBlendEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetColorBlendEnableEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendEnables, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetColorBlendEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetColorBlendEnableEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendEnables, + record_obj); } } } @@ -24825,39 +22910,38 @@ VKAPI_ATTR void VKAPI_CALL CmdSetColorBlendEquationEXT(VkCommandBuffer commandBu const VkColorBlendEquationEXT* pColorBlendEquations) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetColorBlendEquationEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetColorBlendEquationEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetColorBlendEquationEXT(commandBuffer, firstAttachment, attachmentCount, - pColorBlendEquations, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetColorBlendEquationEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetColorBlendEquationEXT(commandBuffer, firstAttachment, attachmentCount, + pColorBlendEquations, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetColorBlendEquationEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetColorBlendEquationEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetColorBlendEquationEXT(commandBuffer, firstAttachment, attachmentCount, - pColorBlendEquations, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetColorBlendEquationEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetColorBlendEquationEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendEquations, + record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetColorBlendEquationEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendEquations); + device_dispatch->CmdSetColorBlendEquationEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendEquations); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetColorBlendEquationEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetColorBlendEquationEXT(commandBuffer, firstAttachment, attachmentCount, - pColorBlendEquations, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetColorBlendEquationEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetColorBlendEquationEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendEquations, + record_obj); } } } @@ -24866,37 +22950,36 @@ VKAPI_ATTR void VKAPI_CALL CmdSetColorWriteMaskEXT(VkCommandBuffer commandBuffer uint32_t attachmentCount, const VkColorComponentFlags* pColorWriteMasks) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetColorWriteMaskEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetColorWriteMaskEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetColorWriteMaskEXT(commandBuffer, firstAttachment, attachmentCount, - pColorWriteMasks, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetColorWriteMaskEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetColorWriteMaskEXT(commandBuffer, firstAttachment, attachmentCount, pColorWriteMasks, + error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetColorWriteMaskEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetColorWriteMaskEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetColorWriteMaskEXT(commandBuffer, firstAttachment, attachmentCount, pColorWriteMasks, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetColorWriteMaskEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetColorWriteMaskEXT(commandBuffer, firstAttachment, attachmentCount, pColorWriteMasks, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetColorWriteMaskEXT(commandBuffer, firstAttachment, attachmentCount, pColorWriteMasks); + device_dispatch->CmdSetColorWriteMaskEXT(commandBuffer, firstAttachment, attachmentCount, pColorWriteMasks); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetColorWriteMaskEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetColorWriteMaskEXT(commandBuffer, firstAttachment, attachmentCount, pColorWriteMasks, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetColorWriteMaskEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetColorWriteMaskEXT(commandBuffer, firstAttachment, attachmentCount, pColorWriteMasks, + record_obj); } } } @@ -24905,38 +22988,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetTessellationDomainOriginEXT(VkCommandBuffer com VkTessellationDomainOrigin domainOrigin) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetTessellationDomainOriginEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetTessellationDomainOriginEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetTessellationDomainOriginEXT(commandBuffer, domainOrigin, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetTessellationDomainOriginEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetTessellationDomainOriginEXT(commandBuffer, domainOrigin, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetTessellationDomainOriginEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetTessellationDomainOriginEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetTessellationDomainOriginEXT(commandBuffer, domainOrigin, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetTessellationDomainOriginEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetTessellationDomainOriginEXT(commandBuffer, domainOrigin, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetTessellationDomainOriginEXT(commandBuffer, domainOrigin); + device_dispatch->CmdSetTessellationDomainOriginEXT(commandBuffer, domainOrigin); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetTessellationDomainOriginEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetTessellationDomainOriginEXT(commandBuffer, domainOrigin, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetTessellationDomainOriginEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetTessellationDomainOriginEXT(commandBuffer, domainOrigin, record_obj); } } } @@ -24944,36 +23024,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetTessellationDomainOriginEXT(VkCommandBuffer com VKAPI_ATTR void VKAPI_CALL CmdSetRasterizationStreamEXT(VkCommandBuffer commandBuffer, uint32_t rasterizationStream) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetRasterizationStreamEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetRasterizationStreamEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetRasterizationStreamEXT(commandBuffer, rasterizationStream, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetRasterizationStreamEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetRasterizationStreamEXT(commandBuffer, rasterizationStream, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetRasterizationStreamEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetRasterizationStreamEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetRasterizationStreamEXT(commandBuffer, rasterizationStream, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetRasterizationStreamEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetRasterizationStreamEXT(commandBuffer, rasterizationStream, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetRasterizationStreamEXT(commandBuffer, rasterizationStream); + device_dispatch->CmdSetRasterizationStreamEXT(commandBuffer, rasterizationStream); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetRasterizationStreamEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetRasterizationStreamEXT(commandBuffer, rasterizationStream, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetRasterizationStreamEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetRasterizationStreamEXT(commandBuffer, rasterizationStream, record_obj); } } } @@ -24982,41 +23061,37 @@ VKAPI_ATTR void VKAPI_CALL CmdSetConservativeRasterizationModeEXT( VkCommandBuffer commandBuffer, VkConservativeRasterizationModeEXT conservativeRasterizationMode) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetConservativeRasterizationModeEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetConservativeRasterizationModeEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetConservativeRasterizationModeEXT(commandBuffer, conservativeRasterizationMode, - error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetConservativeRasterizationModeEXT]) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateCmdSetConservativeRasterizationModeEXT(commandBuffer, conservativeRasterizationMode, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetConservativeRasterizationModeEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetConservativeRasterizationModeEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetConservativeRasterizationModeEXT(commandBuffer, conservativeRasterizationMode, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetConservativeRasterizationModeEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetConservativeRasterizationModeEXT(commandBuffer, conservativeRasterizationMode, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetConservativeRasterizationModeEXT(commandBuffer, conservativeRasterizationMode); + device_dispatch->CmdSetConservativeRasterizationModeEXT(commandBuffer, conservativeRasterizationMode); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetConservativeRasterizationModeEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetConservativeRasterizationModeEXT(commandBuffer, conservativeRasterizationMode, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetConservativeRasterizationModeEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetConservativeRasterizationModeEXT(commandBuffer, conservativeRasterizationMode, record_obj); } } } @@ -25025,41 +23100,38 @@ VKAPI_ATTR void VKAPI_CALL CmdSetExtraPrimitiveOverestimationSizeEXT(VkCommandBu float extraPrimitiveOverestimationSize) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetExtraPrimitiveOverestimationSizeEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetExtraPrimitiveOverestimationSizeEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetExtraPrimitiveOverestimationSizeEXT( - commandBuffer, extraPrimitiveOverestimationSize, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetExtraPrimitiveOverestimationSizeEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetExtraPrimitiveOverestimationSizeEXT(commandBuffer, extraPrimitiveOverestimationSize, + error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetExtraPrimitiveOverestimationSizeEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetExtraPrimitiveOverestimationSizeEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetExtraPrimitiveOverestimationSizeEXT(commandBuffer, extraPrimitiveOverestimationSize, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetExtraPrimitiveOverestimationSizeEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetExtraPrimitiveOverestimationSizeEXT(commandBuffer, extraPrimitiveOverestimationSize, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetExtraPrimitiveOverestimationSizeEXT(commandBuffer, extraPrimitiveOverestimationSize); + device_dispatch->CmdSetExtraPrimitiveOverestimationSizeEXT(commandBuffer, extraPrimitiveOverestimationSize); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetExtraPrimitiveOverestimationSizeEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetExtraPrimitiveOverestimationSizeEXT(commandBuffer, extraPrimitiveOverestimationSize, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetExtraPrimitiveOverestimationSizeEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetExtraPrimitiveOverestimationSizeEXT(commandBuffer, extraPrimitiveOverestimationSize, + record_obj); } } } @@ -25067,35 +23139,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetExtraPrimitiveOverestimationSizeEXT(VkCommandBu VKAPI_ATTR void VKAPI_CALL CmdSetDepthClipEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClipEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDepthClipEnableEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthClipEnableEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDepthClipEnableEXT(commandBuffer, depthClipEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthClipEnableEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDepthClipEnableEXT(commandBuffer, depthClipEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDepthClipEnableEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthClipEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDepthClipEnableEXT(commandBuffer, depthClipEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthClipEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDepthClipEnableEXT(commandBuffer, depthClipEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDepthClipEnableEXT(commandBuffer, depthClipEnable); + device_dispatch->CmdSetDepthClipEnableEXT(commandBuffer, depthClipEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthClipEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDepthClipEnableEXT(commandBuffer, depthClipEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthClipEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDepthClipEnableEXT(commandBuffer, depthClipEnable, record_obj); } } } @@ -25103,36 +23174,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthClipEnableEXT(VkCommandBuffer commandBuffe VKAPI_ATTR void VKAPI_CALL CmdSetSampleLocationsEnableEXT(VkCommandBuffer commandBuffer, VkBool32 sampleLocationsEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetSampleLocationsEnableEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetSampleLocationsEnableEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetSampleLocationsEnableEXT(commandBuffer, sampleLocationsEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetSampleLocationsEnableEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetSampleLocationsEnableEXT(commandBuffer, sampleLocationsEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetSampleLocationsEnableEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetSampleLocationsEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetSampleLocationsEnableEXT(commandBuffer, sampleLocationsEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetSampleLocationsEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetSampleLocationsEnableEXT(commandBuffer, sampleLocationsEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetSampleLocationsEnableEXT(commandBuffer, sampleLocationsEnable); + device_dispatch->CmdSetSampleLocationsEnableEXT(commandBuffer, sampleLocationsEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetSampleLocationsEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetSampleLocationsEnableEXT(commandBuffer, sampleLocationsEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetSampleLocationsEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetSampleLocationsEnableEXT(commandBuffer, sampleLocationsEnable, record_obj); } } } @@ -25142,39 +23212,38 @@ VKAPI_ATTR void VKAPI_CALL CmdSetColorBlendAdvancedEXT(VkCommandBuffer commandBu const VkColorBlendAdvancedEXT* pColorBlendAdvanced) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetColorBlendAdvancedEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetColorBlendAdvancedEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetColorBlendAdvancedEXT(commandBuffer, firstAttachment, attachmentCount, - pColorBlendAdvanced, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetColorBlendAdvancedEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetColorBlendAdvancedEXT(commandBuffer, firstAttachment, attachmentCount, + pColorBlendAdvanced, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetColorBlendAdvancedEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetColorBlendAdvancedEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetColorBlendAdvancedEXT(commandBuffer, firstAttachment, attachmentCount, - pColorBlendAdvanced, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetColorBlendAdvancedEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetColorBlendAdvancedEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendAdvanced, + record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetColorBlendAdvancedEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendAdvanced); + device_dispatch->CmdSetColorBlendAdvancedEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendAdvanced); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetColorBlendAdvancedEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetColorBlendAdvancedEXT(commandBuffer, firstAttachment, attachmentCount, - pColorBlendAdvanced, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetColorBlendAdvancedEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetColorBlendAdvancedEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendAdvanced, + record_obj); } } } @@ -25183,36 +23252,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetProvokingVertexModeEXT(VkCommandBuffer commandB VkProvokingVertexModeEXT provokingVertexMode) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetProvokingVertexModeEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetProvokingVertexModeEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetProvokingVertexModeEXT(commandBuffer, provokingVertexMode, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetProvokingVertexModeEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetProvokingVertexModeEXT(commandBuffer, provokingVertexMode, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetProvokingVertexModeEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetProvokingVertexModeEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetProvokingVertexModeEXT(commandBuffer, provokingVertexMode, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetProvokingVertexModeEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetProvokingVertexModeEXT(commandBuffer, provokingVertexMode, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetProvokingVertexModeEXT(commandBuffer, provokingVertexMode); + device_dispatch->CmdSetProvokingVertexModeEXT(commandBuffer, provokingVertexMode); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetProvokingVertexModeEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetProvokingVertexModeEXT(commandBuffer, provokingVertexMode, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetProvokingVertexModeEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetProvokingVertexModeEXT(commandBuffer, provokingVertexMode, record_obj); } } } @@ -25221,36 +23289,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLineRasterizationModeEXT(VkCommandBuffer comman VkLineRasterizationModeEXT lineRasterizationMode) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetLineRasterizationModeEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetLineRasterizationModeEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetLineRasterizationModeEXT(commandBuffer, lineRasterizationMode, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetLineRasterizationModeEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetLineRasterizationModeEXT(commandBuffer, lineRasterizationMode, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetLineRasterizationModeEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetLineRasterizationModeEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetLineRasterizationModeEXT(commandBuffer, lineRasterizationMode, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetLineRasterizationModeEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetLineRasterizationModeEXT(commandBuffer, lineRasterizationMode, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetLineRasterizationModeEXT(commandBuffer, lineRasterizationMode); + device_dispatch->CmdSetLineRasterizationModeEXT(commandBuffer, lineRasterizationMode); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetLineRasterizationModeEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetLineRasterizationModeEXT(commandBuffer, lineRasterizationMode, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetLineRasterizationModeEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetLineRasterizationModeEXT(commandBuffer, lineRasterizationMode, record_obj); } } } @@ -25258,36 +23325,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLineRasterizationModeEXT(VkCommandBuffer comman VKAPI_ATTR void VKAPI_CALL CmdSetLineStippleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stippledLineEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetLineStippleEnableEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetLineStippleEnableEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetLineStippleEnableEXT(commandBuffer, stippledLineEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetLineStippleEnableEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetLineStippleEnableEXT(commandBuffer, stippledLineEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetLineStippleEnableEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetLineStippleEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetLineStippleEnableEXT(commandBuffer, stippledLineEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetLineStippleEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetLineStippleEnableEXT(commandBuffer, stippledLineEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetLineStippleEnableEXT(commandBuffer, stippledLineEnable); + device_dispatch->CmdSetLineStippleEnableEXT(commandBuffer, stippledLineEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetLineStippleEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetLineStippleEnableEXT(commandBuffer, stippledLineEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetLineStippleEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetLineStippleEnableEXT(commandBuffer, stippledLineEnable, record_obj); } } } @@ -25295,38 +23361,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetLineStippleEnableEXT(VkCommandBuffer commandBuf VKAPI_ATTR void VKAPI_CALL CmdSetDepthClipNegativeOneToOneEXT(VkCommandBuffer commandBuffer, VkBool32 negativeOneToOne) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDepthClipNegativeOneToOneEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthClipNegativeOneToOneEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDepthClipNegativeOneToOneEXT(commandBuffer, negativeOneToOne, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthClipNegativeOneToOneEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDepthClipNegativeOneToOneEXT(commandBuffer, negativeOneToOne, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDepthClipNegativeOneToOneEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthClipNegativeOneToOneEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDepthClipNegativeOneToOneEXT(commandBuffer, negativeOneToOne, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthClipNegativeOneToOneEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDepthClipNegativeOneToOneEXT(commandBuffer, negativeOneToOne, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDepthClipNegativeOneToOneEXT(commandBuffer, negativeOneToOne); + device_dispatch->CmdSetDepthClipNegativeOneToOneEXT(commandBuffer, negativeOneToOne); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthClipNegativeOneToOneEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDepthClipNegativeOneToOneEXT(commandBuffer, negativeOneToOne, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthClipNegativeOneToOneEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDepthClipNegativeOneToOneEXT(commandBuffer, negativeOneToOne, record_obj); } } } @@ -25334,36 +23397,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthClipNegativeOneToOneEXT(VkCommandBuffer co VKAPI_ATTR void VKAPI_CALL CmdSetViewportWScalingEnableNV(VkCommandBuffer commandBuffer, VkBool32 viewportWScalingEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetViewportWScalingEnableNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetViewportWScalingEnableNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetViewportWScalingEnableNV(commandBuffer, viewportWScalingEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetViewportWScalingEnableNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetViewportWScalingEnableNV(commandBuffer, viewportWScalingEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetViewportWScalingEnableNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetViewportWScalingEnableNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetViewportWScalingEnableNV(commandBuffer, viewportWScalingEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetViewportWScalingEnableNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetViewportWScalingEnableNV(commandBuffer, viewportWScalingEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetViewportWScalingEnableNV(commandBuffer, viewportWScalingEnable); + device_dispatch->CmdSetViewportWScalingEnableNV(commandBuffer, viewportWScalingEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetViewportWScalingEnableNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetViewportWScalingEnableNV(commandBuffer, viewportWScalingEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetViewportWScalingEnableNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetViewportWScalingEnableNV(commandBuffer, viewportWScalingEnable, record_obj); } } } @@ -25372,37 +23434,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewportSwizzleNV(VkCommandBuffer commandBuffer const VkViewportSwizzleNV* pViewportSwizzles) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetViewportSwizzleNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetViewportSwizzleNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetViewportSwizzleNV(commandBuffer, firstViewport, viewportCount, - pViewportSwizzles, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetViewportSwizzleNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetViewportSwizzleNV(commandBuffer, firstViewport, viewportCount, pViewportSwizzles, + error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetViewportSwizzleNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetViewportSwizzleNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetViewportSwizzleNV(commandBuffer, firstViewport, viewportCount, pViewportSwizzles, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetViewportSwizzleNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetViewportSwizzleNV(commandBuffer, firstViewport, viewportCount, pViewportSwizzles, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetViewportSwizzleNV(commandBuffer, firstViewport, viewportCount, pViewportSwizzles); + device_dispatch->CmdSetViewportSwizzleNV(commandBuffer, firstViewport, viewportCount, pViewportSwizzles); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetViewportSwizzleNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetViewportSwizzleNV(commandBuffer, firstViewport, viewportCount, pViewportSwizzles, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetViewportSwizzleNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetViewportSwizzleNV(commandBuffer, firstViewport, viewportCount, pViewportSwizzles, record_obj); } } } @@ -25410,36 +23470,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetViewportSwizzleNV(VkCommandBuffer commandBuffer VKAPI_ATTR void VKAPI_CALL CmdSetCoverageToColorEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageToColorEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetCoverageToColorEnableNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetCoverageToColorEnableNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetCoverageToColorEnableNV(commandBuffer, coverageToColorEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetCoverageToColorEnableNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetCoverageToColorEnableNV(commandBuffer, coverageToColorEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetCoverageToColorEnableNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetCoverageToColorEnableNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetCoverageToColorEnableNV(commandBuffer, coverageToColorEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetCoverageToColorEnableNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetCoverageToColorEnableNV(commandBuffer, coverageToColorEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetCoverageToColorEnableNV(commandBuffer, coverageToColorEnable); + device_dispatch->CmdSetCoverageToColorEnableNV(commandBuffer, coverageToColorEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetCoverageToColorEnableNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetCoverageToColorEnableNV(commandBuffer, coverageToColorEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetCoverageToColorEnableNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetCoverageToColorEnableNV(commandBuffer, coverageToColorEnable, record_obj); } } } @@ -25447,37 +23506,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCoverageToColorEnableNV(VkCommandBuffer command VKAPI_ATTR void VKAPI_CALL CmdSetCoverageToColorLocationNV(VkCommandBuffer commandBuffer, uint32_t coverageToColorLocation) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetCoverageToColorLocationNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetCoverageToColorLocationNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetCoverageToColorLocationNV(commandBuffer, coverageToColorLocation, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetCoverageToColorLocationNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetCoverageToColorLocationNV(commandBuffer, coverageToColorLocation, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetCoverageToColorLocationNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetCoverageToColorLocationNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetCoverageToColorLocationNV(commandBuffer, coverageToColorLocation, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetCoverageToColorLocationNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetCoverageToColorLocationNV(commandBuffer, coverageToColorLocation, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetCoverageToColorLocationNV(commandBuffer, coverageToColorLocation); + device_dispatch->CmdSetCoverageToColorLocationNV(commandBuffer, coverageToColorLocation); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetCoverageToColorLocationNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetCoverageToColorLocationNV(commandBuffer, coverageToColorLocation, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetCoverageToColorLocationNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetCoverageToColorLocationNV(commandBuffer, coverageToColorLocation, record_obj); } } } @@ -25486,36 +23543,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCoverageModulationModeNV(VkCommandBuffer comman VkCoverageModulationModeNV coverageModulationMode) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetCoverageModulationModeNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetCoverageModulationModeNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetCoverageModulationModeNV(commandBuffer, coverageModulationMode, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetCoverageModulationModeNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetCoverageModulationModeNV(commandBuffer, coverageModulationMode, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetCoverageModulationModeNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetCoverageModulationModeNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetCoverageModulationModeNV(commandBuffer, coverageModulationMode, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetCoverageModulationModeNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetCoverageModulationModeNV(commandBuffer, coverageModulationMode, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetCoverageModulationModeNV(commandBuffer, coverageModulationMode); + device_dispatch->CmdSetCoverageModulationModeNV(commandBuffer, coverageModulationMode); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetCoverageModulationModeNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetCoverageModulationModeNV(commandBuffer, coverageModulationMode, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetCoverageModulationModeNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetCoverageModulationModeNV(commandBuffer, coverageModulationMode, record_obj); } } } @@ -25524,40 +23580,36 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCoverageModulationTableEnableNV(VkCommandBuffer VkBool32 coverageModulationTableEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetCoverageModulationTableEnableNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetCoverageModulationTableEnableNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetCoverageModulationTableEnableNV(commandBuffer, coverageModulationTableEnable, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetCoverageModulationTableEnableNV]) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateCmdSetCoverageModulationTableEnableNV(commandBuffer, coverageModulationTableEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetCoverageModulationTableEnableNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetCoverageModulationTableEnableNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetCoverageModulationTableEnableNV(commandBuffer, coverageModulationTableEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetCoverageModulationTableEnableNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetCoverageModulationTableEnableNV(commandBuffer, coverageModulationTableEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetCoverageModulationTableEnableNV(commandBuffer, coverageModulationTableEnable); + device_dispatch->CmdSetCoverageModulationTableEnableNV(commandBuffer, coverageModulationTableEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetCoverageModulationTableEnableNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetCoverageModulationTableEnableNV(commandBuffer, coverageModulationTableEnable, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetCoverageModulationTableEnableNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetCoverageModulationTableEnableNV(commandBuffer, coverageModulationTableEnable, record_obj); } } } @@ -25566,40 +23618,38 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCoverageModulationTableNV(VkCommandBuffer comma const float* pCoverageModulationTable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetCoverageModulationTableNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetCoverageModulationTableNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetCoverageModulationTableNV(commandBuffer, coverageModulationTableCount, - pCoverageModulationTable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetCoverageModulationTableNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetCoverageModulationTableNV(commandBuffer, coverageModulationTableCount, + pCoverageModulationTable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetCoverageModulationTableNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetCoverageModulationTableNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetCoverageModulationTableNV(commandBuffer, coverageModulationTableCount, - pCoverageModulationTable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetCoverageModulationTableNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetCoverageModulationTableNV(commandBuffer, coverageModulationTableCount, pCoverageModulationTable, + record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetCoverageModulationTableNV(commandBuffer, coverageModulationTableCount, pCoverageModulationTable); + device_dispatch->CmdSetCoverageModulationTableNV(commandBuffer, coverageModulationTableCount, pCoverageModulationTable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetCoverageModulationTableNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetCoverageModulationTableNV(commandBuffer, coverageModulationTableCount, - pCoverageModulationTable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetCoverageModulationTableNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetCoverageModulationTableNV(commandBuffer, coverageModulationTableCount, pCoverageModulationTable, + record_obj); } } } @@ -25607,36 +23657,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCoverageModulationTableNV(VkCommandBuffer comma VKAPI_ATTR void VKAPI_CALL CmdSetShadingRateImageEnableNV(VkCommandBuffer commandBuffer, VkBool32 shadingRateImageEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetShadingRateImageEnableNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetShadingRateImageEnableNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetShadingRateImageEnableNV(commandBuffer, shadingRateImageEnable, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetShadingRateImageEnableNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetShadingRateImageEnableNV(commandBuffer, shadingRateImageEnable, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetShadingRateImageEnableNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetShadingRateImageEnableNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetShadingRateImageEnableNV(commandBuffer, shadingRateImageEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetShadingRateImageEnableNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetShadingRateImageEnableNV(commandBuffer, shadingRateImageEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetShadingRateImageEnableNV(commandBuffer, shadingRateImageEnable); + device_dispatch->CmdSetShadingRateImageEnableNV(commandBuffer, shadingRateImageEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetShadingRateImageEnableNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetShadingRateImageEnableNV(commandBuffer, shadingRateImageEnable, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetShadingRateImageEnableNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetShadingRateImageEnableNV(commandBuffer, shadingRateImageEnable, record_obj); } } } @@ -25645,41 +23694,37 @@ VKAPI_ATTR void VKAPI_CALL CmdSetRepresentativeFragmentTestEnableNV(VkCommandBuf VkBool32 representativeFragmentTestEnable) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetRepresentativeFragmentTestEnableNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetRepresentativeFragmentTestEnableNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetRepresentativeFragmentTestEnableNV(commandBuffer, - representativeFragmentTestEnable, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetRepresentativeFragmentTestEnableNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetRepresentativeFragmentTestEnableNV(commandBuffer, representativeFragmentTestEnable, + error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetRepresentativeFragmentTestEnableNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetRepresentativeFragmentTestEnableNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetRepresentativeFragmentTestEnableNV(commandBuffer, representativeFragmentTestEnable, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetRepresentativeFragmentTestEnableNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetRepresentativeFragmentTestEnableNV(commandBuffer, representativeFragmentTestEnable, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetRepresentativeFragmentTestEnableNV(commandBuffer, representativeFragmentTestEnable); + device_dispatch->CmdSetRepresentativeFragmentTestEnableNV(commandBuffer, representativeFragmentTestEnable); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetRepresentativeFragmentTestEnableNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetRepresentativeFragmentTestEnableNV(commandBuffer, representativeFragmentTestEnable, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetRepresentativeFragmentTestEnableNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetRepresentativeFragmentTestEnableNV(commandBuffer, representativeFragmentTestEnable, record_obj); } } } @@ -25688,36 +23733,35 @@ VKAPI_ATTR void VKAPI_CALL CmdSetCoverageReductionModeNV(VkCommandBuffer command VkCoverageReductionModeNV coverageReductionMode) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetCoverageReductionModeNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetCoverageReductionModeNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetCoverageReductionModeNV(commandBuffer, coverageReductionMode, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetCoverageReductionModeNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetCoverageReductionModeNV(commandBuffer, coverageReductionMode, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetCoverageReductionModeNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetCoverageReductionModeNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetCoverageReductionModeNV(commandBuffer, coverageReductionMode, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetCoverageReductionModeNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetCoverageReductionModeNV(commandBuffer, coverageReductionMode, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetCoverageReductionModeNV(commandBuffer, coverageReductionMode); + device_dispatch->CmdSetCoverageReductionModeNV(commandBuffer, coverageReductionMode); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetCoverageReductionModeNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetCoverageReductionModeNV(commandBuffer, coverageReductionMode, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetCoverageReductionModeNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetCoverageReductionModeNV(commandBuffer, coverageReductionMode, record_obj); } } } @@ -25726,35 +23770,34 @@ VKAPI_ATTR void VKAPI_CALL GetShaderModuleIdentifierEXT(VkDevice device, VkShade VkShaderModuleIdentifierEXT* pIdentifier) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetShaderModuleIdentifierEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetShaderModuleIdentifierEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetShaderModuleIdentifierEXT(device, shaderModule, pIdentifier, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetShaderModuleIdentifierEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetShaderModuleIdentifierEXT(device, shaderModule, pIdentifier, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetShaderModuleIdentifierEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetShaderModuleIdentifierEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetShaderModuleIdentifierEXT(device, shaderModule, pIdentifier, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetShaderModuleIdentifierEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetShaderModuleIdentifierEXT(device, shaderModule, pIdentifier, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetShaderModuleIdentifierEXT(device, shaderModule, pIdentifier); + device_dispatch->GetShaderModuleIdentifierEXT(device, shaderModule, pIdentifier); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetShaderModuleIdentifierEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetShaderModuleIdentifierEXT(device, shaderModule, pIdentifier, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetShaderModuleIdentifierEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetShaderModuleIdentifierEXT(device, shaderModule, pIdentifier, record_obj); } } } @@ -25763,37 +23806,35 @@ VKAPI_ATTR void VKAPI_CALL GetShaderModuleCreateInfoIdentifierEXT(VkDevice devic VkShaderModuleIdentifierEXT* pIdentifier) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetShaderModuleCreateInfoIdentifierEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetShaderModuleCreateInfoIdentifierEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetShaderModuleCreateInfoIdentifierEXT(device, pCreateInfo, pIdentifier, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetShaderModuleCreateInfoIdentifierEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetShaderModuleCreateInfoIdentifierEXT(device, pCreateInfo, pIdentifier, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetShaderModuleCreateInfoIdentifierEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetShaderModuleCreateInfoIdentifierEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetShaderModuleCreateInfoIdentifierEXT(device, pCreateInfo, pIdentifier, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetShaderModuleCreateInfoIdentifierEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetShaderModuleCreateInfoIdentifierEXT(device, pCreateInfo, pIdentifier, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetShaderModuleCreateInfoIdentifierEXT(device, pCreateInfo, pIdentifier); + device_dispatch->GetShaderModuleCreateInfoIdentifierEXT(device, pCreateInfo, pIdentifier); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetShaderModuleCreateInfoIdentifierEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetShaderModuleCreateInfoIdentifierEXT(device, pCreateInfo, pIdentifier, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetShaderModuleCreateInfoIdentifierEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetShaderModuleCreateInfoIdentifierEXT(device, pCreateInfo, pIdentifier, record_obj); } } } @@ -25803,41 +23844,41 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceOpticalFlowImageFormatsNV( VkOpticalFlowImageFormatPropertiesNV* pImageFormatProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceOpticalFlowImageFormatsNV, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceOpticalFlowImageFormatsNV( - physicalDevice, pOpticalFlowImageFormatInfo, pFormatCount, pImageFormatProperties, error_obj); + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceOpticalFlowImageFormatsNV(physicalDevice, pOpticalFlowImageFormatInfo, + pFormatCount, pImageFormatProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceOpticalFlowImageFormatsNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceOpticalFlowImageFormatsNV(physicalDevice, pOpticalFlowImageFormatInfo, - pFormatCount, pImageFormatProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceOpticalFlowImageFormatsNV(physicalDevice, pOpticalFlowImageFormatInfo, pFormatCount, + pImageFormatProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetPhysicalDeviceOpticalFlowImageFormatsNV(physicalDevice, pOpticalFlowImageFormatInfo, pFormatCount, - pImageFormatProperties); + result = instance_dispatch->GetPhysicalDeviceOpticalFlowImageFormatsNV(physicalDevice, pOpticalFlowImageFormatInfo, + pFormatCount, pImageFormatProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceOpticalFlowImageFormatsNV(physicalDevice, pOpticalFlowImageFormatInfo, - pFormatCount, pImageFormatProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceOpticalFlowImageFormatsNV(physicalDevice, pOpticalFlowImageFormatInfo, pFormatCount, + pImageFormatProperties, record_obj); } } return result; @@ -25848,37 +23889,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateOpticalFlowSessionNV(VkDevice device, const VkOpticalFlowSessionNV* pSession) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateOpticalFlowSessionNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCreateOpticalFlowSessionNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateOpticalFlowSessionNV(device, pCreateInfo, pAllocator, pSession, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateOpticalFlowSessionNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateOpticalFlowSessionNV(device, pCreateInfo, pAllocator, pSession, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateOpticalFlowSessionNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateOpticalFlowSessionNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateOpticalFlowSessionNV(device, pCreateInfo, pAllocator, pSession, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateOpticalFlowSessionNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateOpticalFlowSessionNV(device, pCreateInfo, pAllocator, pSession, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateOpticalFlowSessionNV(device, pCreateInfo, pAllocator, pSession); + result = device_dispatch->CreateOpticalFlowSessionNV(device, pCreateInfo, pAllocator, pSession); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateOpticalFlowSessionNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateOpticalFlowSessionNV(device, pCreateInfo, pAllocator, pSession, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateOpticalFlowSessionNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateOpticalFlowSessionNV(device, pCreateInfo, pAllocator, pSession, record_obj); } } return result; @@ -25888,35 +23928,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyOpticalFlowSessionNV(VkDevice device, VkOptica const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyOpticalFlowSessionNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyOpticalFlowSessionNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyOpticalFlowSessionNV(device, session, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyOpticalFlowSessionNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyOpticalFlowSessionNV(device, session, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyOpticalFlowSessionNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyOpticalFlowSessionNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyOpticalFlowSessionNV(device, session, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyOpticalFlowSessionNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyOpticalFlowSessionNV(device, session, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyOpticalFlowSessionNV(device, session, pAllocator); + device_dispatch->DestroyOpticalFlowSessionNV(device, session, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyOpticalFlowSessionNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyOpticalFlowSessionNV(device, session, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyOpticalFlowSessionNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyOpticalFlowSessionNV(device, session, pAllocator, record_obj); } } } @@ -25926,37 +23965,36 @@ VKAPI_ATTR VkResult VKAPI_CALL BindOpticalFlowSessionImageNV(VkDevice device, Vk VkImageLayout layout) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkBindOpticalFlowSessionImageNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateBindOpticalFlowSessionImageNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateBindOpticalFlowSessionImageNV(device, session, bindingPoint, view, layout, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateBindOpticalFlowSessionImageNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateBindOpticalFlowSessionImageNV(device, session, bindingPoint, view, layout, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkBindOpticalFlowSessionImageNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordBindOpticalFlowSessionImageNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordBindOpticalFlowSessionImageNV(device, session, bindingPoint, view, layout, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordBindOpticalFlowSessionImageNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordBindOpticalFlowSessionImageNV(device, session, bindingPoint, view, layout, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchBindOpticalFlowSessionImageNV(device, session, bindingPoint, view, layout); + result = device_dispatch->BindOpticalFlowSessionImageNV(device, session, bindingPoint, view, layout); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordBindOpticalFlowSessionImageNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordBindOpticalFlowSessionImageNV(device, session, bindingPoint, view, layout, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordBindOpticalFlowSessionImageNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordBindOpticalFlowSessionImageNV(device, session, bindingPoint, view, layout, record_obj); } } return result; @@ -25966,34 +24004,34 @@ VKAPI_ATTR void VKAPI_CALL CmdOpticalFlowExecuteNV(VkCommandBuffer commandBuffer const VkOpticalFlowExecuteInfoNV* pExecuteInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdOpticalFlowExecuteNV, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdOpticalFlowExecuteNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdOpticalFlowExecuteNV(commandBuffer, session, pExecuteInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdOpticalFlowExecuteNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdOpticalFlowExecuteNV(commandBuffer, session, pExecuteInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdOpticalFlowExecuteNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdOpticalFlowExecuteNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdOpticalFlowExecuteNV(commandBuffer, session, pExecuteInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdOpticalFlowExecuteNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdOpticalFlowExecuteNV(commandBuffer, session, pExecuteInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdOpticalFlowExecuteNV(commandBuffer, session, pExecuteInfo); + device_dispatch->CmdOpticalFlowExecuteNV(commandBuffer, session, pExecuteInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdOpticalFlowExecuteNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdOpticalFlowExecuteNV(commandBuffer, session, pExecuteInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdOpticalFlowExecuteNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdOpticalFlowExecuteNV(commandBuffer, session, pExecuteInfo, record_obj); } } } @@ -26001,34 +24039,34 @@ VKAPI_ATTR void VKAPI_CALL CmdOpticalFlowExecuteNV(VkCommandBuffer commandBuffer VKAPI_ATTR void VKAPI_CALL AntiLagUpdateAMD(VkDevice device, const VkAntiLagDataAMD* pData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkAntiLagUpdateAMD, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateAntiLagUpdateAMD]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateAntiLagUpdateAMD(device, pData, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateAntiLagUpdateAMD]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateAntiLagUpdateAMD(device, pData, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkAntiLagUpdateAMD); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordAntiLagUpdateAMD]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordAntiLagUpdateAMD(device, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordAntiLagUpdateAMD]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordAntiLagUpdateAMD(device, pData, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchAntiLagUpdateAMD(device, pData); + device_dispatch->AntiLagUpdateAMD(device, pData); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordAntiLagUpdateAMD]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordAntiLagUpdateAMD(device, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordAntiLagUpdateAMD]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordAntiLagUpdateAMD(device, pData, record_obj); } } } @@ -26036,34 +24074,34 @@ VKAPI_ATTR void VKAPI_CALL AntiLagUpdateAMD(VkDevice device, const VkAntiLagData VKAPI_ATTR void VKAPI_CALL DestroyShaderEXT(VkDevice device, VkShaderEXT shader, const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyShaderEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyShaderEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyShaderEXT(device, shader, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyShaderEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyShaderEXT(device, shader, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyShaderEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyShaderEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyShaderEXT(device, shader, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyShaderEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyShaderEXT(device, shader, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyShaderEXT(device, shader, pAllocator); + device_dispatch->DestroyShaderEXT(device, shader, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyShaderEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyShaderEXT(device, shader, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyShaderEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyShaderEXT(device, shader, pAllocator, record_obj); } } } @@ -26071,36 +24109,36 @@ VKAPI_ATTR void VKAPI_CALL DestroyShaderEXT(VkDevice device, VkShaderEXT shader, VKAPI_ATTR VkResult VKAPI_CALL GetShaderBinaryDataEXT(VkDevice device, VkShaderEXT shader, size_t* pDataSize, void* pData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetShaderBinaryDataEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetShaderBinaryDataEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetShaderBinaryDataEXT(device, shader, pDataSize, pData, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetShaderBinaryDataEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetShaderBinaryDataEXT(device, shader, pDataSize, pData, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetShaderBinaryDataEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetShaderBinaryDataEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetShaderBinaryDataEXT(device, shader, pDataSize, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetShaderBinaryDataEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetShaderBinaryDataEXT(device, shader, pDataSize, pData, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetShaderBinaryDataEXT(device, shader, pDataSize, pData); + result = device_dispatch->GetShaderBinaryDataEXT(device, shader, pDataSize, pData); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetShaderBinaryDataEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetShaderBinaryDataEXT(device, shader, pDataSize, pData, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetShaderBinaryDataEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetShaderBinaryDataEXT(device, shader, pDataSize, pData, record_obj); } } return result; @@ -26110,34 +24148,34 @@ VKAPI_ATTR void VKAPI_CALL CmdBindShadersEXT(VkCommandBuffer commandBuffer, uint const VkShaderStageFlagBits* pStages, const VkShaderEXT* pShaders) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBindShadersEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBindShadersEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBindShadersEXT(commandBuffer, stageCount, pStages, pShaders, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBindShadersEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBindShadersEXT(commandBuffer, stageCount, pStages, pShaders, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBindShadersEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBindShadersEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBindShadersEXT(commandBuffer, stageCount, pStages, pShaders, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBindShadersEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBindShadersEXT(commandBuffer, stageCount, pStages, pShaders, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBindShadersEXT(commandBuffer, stageCount, pStages, pShaders); + device_dispatch->CmdBindShadersEXT(commandBuffer, stageCount, pStages, pShaders); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBindShadersEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBindShadersEXT(commandBuffer, stageCount, pStages, pShaders, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBindShadersEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBindShadersEXT(commandBuffer, stageCount, pStages, pShaders, record_obj); } } } @@ -26146,35 +24184,34 @@ VKAPI_ATTR void VKAPI_CALL CmdSetDepthClampRangeEXT(VkCommandBuffer commandBuffe const VkDepthClampRangeEXT* pDepthClampRange) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetDepthClampRangeEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthClampRangeEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetDepthClampRangeEXT(commandBuffer, depthClampMode, pDepthClampRange, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetDepthClampRangeEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetDepthClampRangeEXT(commandBuffer, depthClampMode, pDepthClampRange, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetDepthClampRangeEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthClampRangeEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetDepthClampRangeEXT(commandBuffer, depthClampMode, pDepthClampRange, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetDepthClampRangeEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetDepthClampRangeEXT(commandBuffer, depthClampMode, pDepthClampRange, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetDepthClampRangeEXT(commandBuffer, depthClampMode, pDepthClampRange); + device_dispatch->CmdSetDepthClampRangeEXT(commandBuffer, depthClampMode, pDepthClampRange); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthClampRangeEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetDepthClampRangeEXT(commandBuffer, depthClampMode, pDepthClampRange, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetDepthClampRangeEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetDepthClampRangeEXT(commandBuffer, depthClampMode, pDepthClampRange, record_obj); } } } @@ -26183,42 +24220,37 @@ VKAPI_ATTR VkResult VKAPI_CALL GetFramebufferTilePropertiesQCOM(VkDevice device, uint32_t* pPropertiesCount, VkTilePropertiesQCOM* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetFramebufferTilePropertiesQCOM, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetFramebufferTilePropertiesQCOM]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetFramebufferTilePropertiesQCOM(device, framebuffer, pPropertiesCount, pProperties, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetFramebufferTilePropertiesQCOM]) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateGetFramebufferTilePropertiesQCOM(device, framebuffer, pPropertiesCount, pProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetFramebufferTilePropertiesQCOM); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetFramebufferTilePropertiesQCOM]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetFramebufferTilePropertiesQCOM(device, framebuffer, pPropertiesCount, pProperties, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetFramebufferTilePropertiesQCOM]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetFramebufferTilePropertiesQCOM(device, framebuffer, pPropertiesCount, pProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetFramebufferTilePropertiesQCOM(device, framebuffer, pPropertiesCount, pProperties); + result = device_dispatch->GetFramebufferTilePropertiesQCOM(device, framebuffer, pPropertiesCount, pProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetFramebufferTilePropertiesQCOM]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetFramebufferTilePropertiesQCOM(device, framebuffer, pPropertiesCount, pProperties, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetFramebufferTilePropertiesQCOM]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetFramebufferTilePropertiesQCOM(device, framebuffer, pPropertiesCount, pProperties, record_obj); } } return result; @@ -26228,39 +24260,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetDynamicRenderingTilePropertiesQCOM(VkDevice de VkTilePropertiesQCOM* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDynamicRenderingTilePropertiesQCOM, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDynamicRenderingTilePropertiesQCOM]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDynamicRenderingTilePropertiesQCOM(device, pRenderingInfo, pProperties, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDynamicRenderingTilePropertiesQCOM]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetDynamicRenderingTilePropertiesQCOM(device, pRenderingInfo, pProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetDynamicRenderingTilePropertiesQCOM); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDynamicRenderingTilePropertiesQCOM]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDynamicRenderingTilePropertiesQCOM(device, pRenderingInfo, pProperties, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDynamicRenderingTilePropertiesQCOM]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDynamicRenderingTilePropertiesQCOM(device, pRenderingInfo, pProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetDynamicRenderingTilePropertiesQCOM(device, pRenderingInfo, pProperties); + result = device_dispatch->GetDynamicRenderingTilePropertiesQCOM(device, pRenderingInfo, pProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDynamicRenderingTilePropertiesQCOM]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDynamicRenderingTilePropertiesQCOM(device, pRenderingInfo, pProperties, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDynamicRenderingTilePropertiesQCOM]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDynamicRenderingTilePropertiesQCOM(device, pRenderingInfo, pProperties, record_obj); } } return result; @@ -26270,36 +24299,36 @@ VKAPI_ATTR VkResult VKAPI_CALL SetLatencySleepModeNV(VkDevice device, VkSwapchai const VkLatencySleepModeInfoNV* pSleepModeInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkSetLatencySleepModeNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateSetLatencySleepModeNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateSetLatencySleepModeNV(device, swapchain, pSleepModeInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateSetLatencySleepModeNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateSetLatencySleepModeNV(device, swapchain, pSleepModeInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkSetLatencySleepModeNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordSetLatencySleepModeNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordSetLatencySleepModeNV(device, swapchain, pSleepModeInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordSetLatencySleepModeNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordSetLatencySleepModeNV(device, swapchain, pSleepModeInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchSetLatencySleepModeNV(device, swapchain, pSleepModeInfo); + result = device_dispatch->SetLatencySleepModeNV(device, swapchain, pSleepModeInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordSetLatencySleepModeNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordSetLatencySleepModeNV(device, swapchain, pSleepModeInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordSetLatencySleepModeNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordSetLatencySleepModeNV(device, swapchain, pSleepModeInfo, record_obj); } } return result; @@ -26308,36 +24337,36 @@ VKAPI_ATTR VkResult VKAPI_CALL SetLatencySleepModeNV(VkDevice device, VkSwapchai VKAPI_ATTR VkResult VKAPI_CALL LatencySleepNV(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepInfoNV* pSleepInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkLatencySleepNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateLatencySleepNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateLatencySleepNV(device, swapchain, pSleepInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateLatencySleepNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateLatencySleepNV(device, swapchain, pSleepInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkLatencySleepNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordLatencySleepNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordLatencySleepNV(device, swapchain, pSleepInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordLatencySleepNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordLatencySleepNV(device, swapchain, pSleepInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchLatencySleepNV(device, swapchain, pSleepInfo); + result = device_dispatch->LatencySleepNV(device, swapchain, pSleepInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordLatencySleepNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordLatencySleepNV(device, swapchain, pSleepInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordLatencySleepNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordLatencySleepNV(device, swapchain, pSleepInfo, record_obj); } } return result; @@ -26347,34 +24376,34 @@ VKAPI_ATTR void VKAPI_CALL SetLatencyMarkerNV(VkDevice device, VkSwapchainKHR sw const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkSetLatencyMarkerNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateSetLatencyMarkerNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateSetLatencyMarkerNV(device, swapchain, pLatencyMarkerInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateSetLatencyMarkerNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateSetLatencyMarkerNV(device, swapchain, pLatencyMarkerInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkSetLatencyMarkerNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordSetLatencyMarkerNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordSetLatencyMarkerNV(device, swapchain, pLatencyMarkerInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordSetLatencyMarkerNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordSetLatencyMarkerNV(device, swapchain, pLatencyMarkerInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchSetLatencyMarkerNV(device, swapchain, pLatencyMarkerInfo); + device_dispatch->SetLatencyMarkerNV(device, swapchain, pLatencyMarkerInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordSetLatencyMarkerNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordSetLatencyMarkerNV(device, swapchain, pLatencyMarkerInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordSetLatencyMarkerNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordSetLatencyMarkerNV(device, swapchain, pLatencyMarkerInfo, record_obj); } } } @@ -26383,34 +24412,34 @@ VKAPI_ATTR void VKAPI_CALL GetLatencyTimingsNV(VkDevice device, VkSwapchainKHR s VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetLatencyTimingsNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateGetLatencyTimingsNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetLatencyTimingsNV(device, swapchain, pLatencyMarkerInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetLatencyTimingsNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetLatencyTimingsNV(device, swapchain, pLatencyMarkerInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetLatencyTimingsNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetLatencyTimingsNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetLatencyTimingsNV(device, swapchain, pLatencyMarkerInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetLatencyTimingsNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetLatencyTimingsNV(device, swapchain, pLatencyMarkerInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetLatencyTimingsNV(device, swapchain, pLatencyMarkerInfo); + device_dispatch->GetLatencyTimingsNV(device, swapchain, pLatencyMarkerInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetLatencyTimingsNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetLatencyTimingsNV(device, swapchain, pLatencyMarkerInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetLatencyTimingsNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetLatencyTimingsNV(device, swapchain, pLatencyMarkerInfo, record_obj); } } } @@ -26418,34 +24447,34 @@ VKAPI_ATTR void VKAPI_CALL GetLatencyTimingsNV(VkDevice device, VkSwapchainKHR s VKAPI_ATTR void VKAPI_CALL QueueNotifyOutOfBandNV(VkQueue queue, const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkQueueNotifyOutOfBandNV, VulkanTypedHandle(queue, kVulkanObjectTypeQueue)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateQueueNotifyOutOfBandNV]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateQueueNotifyOutOfBandNV(queue, pQueueTypeInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateQueueNotifyOutOfBandNV]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateQueueNotifyOutOfBandNV(queue, pQueueTypeInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkQueueNotifyOutOfBandNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordQueueNotifyOutOfBandNV]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordQueueNotifyOutOfBandNV(queue, pQueueTypeInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordQueueNotifyOutOfBandNV]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordQueueNotifyOutOfBandNV(queue, pQueueTypeInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchQueueNotifyOutOfBandNV(queue, pQueueTypeInfo); + device_dispatch->QueueNotifyOutOfBandNV(queue, pQueueTypeInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordQueueNotifyOutOfBandNV]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordQueueNotifyOutOfBandNV(queue, pQueueTypeInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordQueueNotifyOutOfBandNV]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordQueueNotifyOutOfBandNV(queue, pQueueTypeInfo, record_obj); } } } @@ -26453,38 +24482,35 @@ VKAPI_ATTR void VKAPI_CALL QueueNotifyOutOfBandNV(VkQueue queue, const VkOutOfBa VKAPI_ATTR void VKAPI_CALL CmdSetAttachmentFeedbackLoopEnableEXT(VkCommandBuffer commandBuffer, VkImageAspectFlags aspectMask) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetAttachmentFeedbackLoopEnableEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetAttachmentFeedbackLoopEnableEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetAttachmentFeedbackLoopEnableEXT(commandBuffer, aspectMask, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetAttachmentFeedbackLoopEnableEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetAttachmentFeedbackLoopEnableEXT(commandBuffer, aspectMask, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetAttachmentFeedbackLoopEnableEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetAttachmentFeedbackLoopEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetAttachmentFeedbackLoopEnableEXT(commandBuffer, aspectMask, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetAttachmentFeedbackLoopEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetAttachmentFeedbackLoopEnableEXT(commandBuffer, aspectMask, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetAttachmentFeedbackLoopEnableEXT(commandBuffer, aspectMask); + device_dispatch->CmdSetAttachmentFeedbackLoopEnableEXT(commandBuffer, aspectMask); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetAttachmentFeedbackLoopEnableEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetAttachmentFeedbackLoopEnableEXT(commandBuffer, aspectMask, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetAttachmentFeedbackLoopEnableEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetAttachmentFeedbackLoopEnableEXT(commandBuffer, aspectMask, record_obj); } } } @@ -26494,37 +24520,36 @@ VKAPI_ATTR VkResult VKAPI_CALL GetScreenBufferPropertiesQNX(VkDevice device, con VkScreenBufferPropertiesQNX* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetScreenBufferPropertiesQNX, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetScreenBufferPropertiesQNX]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetScreenBufferPropertiesQNX(device, buffer, pProperties, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetScreenBufferPropertiesQNX]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetScreenBufferPropertiesQNX(device, buffer, pProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetScreenBufferPropertiesQNX); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordGetScreenBufferPropertiesQNX]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetScreenBufferPropertiesQNX(device, buffer, pProperties, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetScreenBufferPropertiesQNX]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetScreenBufferPropertiesQNX(device, buffer, pProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetScreenBufferPropertiesQNX(device, buffer, pProperties); + result = device_dispatch->GetScreenBufferPropertiesQNX(device, buffer, pProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordGetScreenBufferPropertiesQNX]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetScreenBufferPropertiesQNX(device, buffer, pProperties, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetScreenBufferPropertiesQNX]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetScreenBufferPropertiesQNX(device, buffer, pProperties, record_obj); } } return result; @@ -26536,39 +24561,36 @@ VKAPI_ATTR void VKAPI_CALL GetGeneratedCommandsMemoryRequirementsEXT(VkDevice de VkMemoryRequirements2* pMemoryRequirements) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetGeneratedCommandsMemoryRequirementsEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetGeneratedCommandsMemoryRequirementsEXT]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateGetGeneratedCommandsMemoryRequirementsEXT(device, pInfo, pMemoryRequirements, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetGeneratedCommandsMemoryRequirementsEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetGeneratedCommandsMemoryRequirementsEXT(device, pInfo, pMemoryRequirements, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetGeneratedCommandsMemoryRequirementsEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetGeneratedCommandsMemoryRequirementsEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetGeneratedCommandsMemoryRequirementsEXT(device, pInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetGeneratedCommandsMemoryRequirementsEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetGeneratedCommandsMemoryRequirementsEXT(device, pInfo, pMemoryRequirements, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetGeneratedCommandsMemoryRequirementsEXT(device, pInfo, pMemoryRequirements); + device_dispatch->GetGeneratedCommandsMemoryRequirementsEXT(device, pInfo, pMemoryRequirements); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetGeneratedCommandsMemoryRequirementsEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetGeneratedCommandsMemoryRequirementsEXT(device, pInfo, pMemoryRequirements, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetGeneratedCommandsMemoryRequirementsEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetGeneratedCommandsMemoryRequirementsEXT(device, pInfo, pMemoryRequirements, record_obj); } } } @@ -26578,41 +24600,38 @@ VKAPI_ATTR void VKAPI_CALL CmdPreprocessGeneratedCommandsEXT(VkCommandBuffer com VkCommandBuffer stateCommandBuffer) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdPreprocessGeneratedCommandsEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdPreprocessGeneratedCommandsEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdPreprocessGeneratedCommandsEXT(commandBuffer, pGeneratedCommandsInfo, - stateCommandBuffer, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdPreprocessGeneratedCommandsEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdPreprocessGeneratedCommandsEXT(commandBuffer, pGeneratedCommandsInfo, stateCommandBuffer, + error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdPreprocessGeneratedCommandsEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdPreprocessGeneratedCommandsEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdPreprocessGeneratedCommandsEXT(commandBuffer, pGeneratedCommandsInfo, stateCommandBuffer, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdPreprocessGeneratedCommandsEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdPreprocessGeneratedCommandsEXT(commandBuffer, pGeneratedCommandsInfo, stateCommandBuffer, + record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdPreprocessGeneratedCommandsEXT(commandBuffer, pGeneratedCommandsInfo, stateCommandBuffer); + device_dispatch->CmdPreprocessGeneratedCommandsEXT(commandBuffer, pGeneratedCommandsInfo, stateCommandBuffer); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdPreprocessGeneratedCommandsEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdPreprocessGeneratedCommandsEXT(commandBuffer, pGeneratedCommandsInfo, stateCommandBuffer, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdPreprocessGeneratedCommandsEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdPreprocessGeneratedCommandsEXT(commandBuffer, pGeneratedCommandsInfo, stateCommandBuffer, + record_obj); } } } @@ -26621,39 +24640,36 @@ VKAPI_ATTR void VKAPI_CALL CmdExecuteGeneratedCommandsEXT(VkCommandBuffer comman const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdExecuteGeneratedCommandsEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdExecuteGeneratedCommandsEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdExecuteGeneratedCommandsEXT(commandBuffer, isPreprocessed, pGeneratedCommandsInfo, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdExecuteGeneratedCommandsEXT]) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateCmdExecuteGeneratedCommandsEXT(commandBuffer, isPreprocessed, pGeneratedCommandsInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdExecuteGeneratedCommandsEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdExecuteGeneratedCommandsEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdExecuteGeneratedCommandsEXT(commandBuffer, isPreprocessed, pGeneratedCommandsInfo, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdExecuteGeneratedCommandsEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdExecuteGeneratedCommandsEXT(commandBuffer, isPreprocessed, pGeneratedCommandsInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdExecuteGeneratedCommandsEXT(commandBuffer, isPreprocessed, pGeneratedCommandsInfo); + device_dispatch->CmdExecuteGeneratedCommandsEXT(commandBuffer, isPreprocessed, pGeneratedCommandsInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdExecuteGeneratedCommandsEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdExecuteGeneratedCommandsEXT(commandBuffer, isPreprocessed, pGeneratedCommandsInfo, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdExecuteGeneratedCommandsEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdExecuteGeneratedCommandsEXT(commandBuffer, isPreprocessed, pGeneratedCommandsInfo, record_obj); } } } @@ -26664,41 +24680,37 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateIndirectCommandsLayoutEXT(VkDevice device, VkIndirectCommandsLayoutEXT* pIndirectCommandsLayout) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateIndirectCommandsLayoutEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCreateIndirectCommandsLayoutEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateIndirectCommandsLayoutEXT(device, pCreateInfo, pAllocator, - pIndirectCommandsLayout, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateIndirectCommandsLayoutEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateIndirectCommandsLayoutEXT(device, pCreateInfo, pAllocator, pIndirectCommandsLayout, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateIndirectCommandsLayoutEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateIndirectCommandsLayoutEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateIndirectCommandsLayoutEXT(device, pCreateInfo, pAllocator, pIndirectCommandsLayout, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateIndirectCommandsLayoutEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateIndirectCommandsLayoutEXT(device, pCreateInfo, pAllocator, pIndirectCommandsLayout, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateIndirectCommandsLayoutEXT(device, pCreateInfo, pAllocator, pIndirectCommandsLayout); + result = device_dispatch->CreateIndirectCommandsLayoutEXT(device, pCreateInfo, pAllocator, pIndirectCommandsLayout); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCreateIndirectCommandsLayoutEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateIndirectCommandsLayoutEXT(device, pCreateInfo, pAllocator, pIndirectCommandsLayout, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateIndirectCommandsLayoutEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateIndirectCommandsLayoutEXT(device, pCreateInfo, pAllocator, pIndirectCommandsLayout, record_obj); } } return result; @@ -26708,38 +24720,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyIndirectCommandsLayoutEXT(VkDevice device, VkI const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyIndirectCommandsLayoutEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyIndirectCommandsLayoutEXT]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateDestroyIndirectCommandsLayoutEXT(device, indirectCommandsLayout, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyIndirectCommandsLayoutEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyIndirectCommandsLayoutEXT(device, indirectCommandsLayout, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyIndirectCommandsLayoutEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyIndirectCommandsLayoutEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyIndirectCommandsLayoutEXT(device, indirectCommandsLayout, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyIndirectCommandsLayoutEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyIndirectCommandsLayoutEXT(device, indirectCommandsLayout, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyIndirectCommandsLayoutEXT(device, indirectCommandsLayout, pAllocator); + device_dispatch->DestroyIndirectCommandsLayoutEXT(device, indirectCommandsLayout, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyIndirectCommandsLayoutEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyIndirectCommandsLayoutEXT(device, indirectCommandsLayout, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyIndirectCommandsLayoutEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyIndirectCommandsLayoutEXT(device, indirectCommandsLayout, pAllocator, record_obj); } } } @@ -26750,40 +24758,37 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateIndirectExecutionSetEXT(VkDevice device, VkIndirectExecutionSetEXT* pIndirectExecutionSet) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateIndirectExecutionSetEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCreateIndirectExecutionSetEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateIndirectExecutionSetEXT(device, pCreateInfo, pAllocator, pIndirectExecutionSet, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateIndirectExecutionSetEXT]) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateCreateIndirectExecutionSetEXT(device, pCreateInfo, pAllocator, pIndirectExecutionSet, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateIndirectExecutionSetEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateIndirectExecutionSetEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateIndirectExecutionSetEXT(device, pCreateInfo, pAllocator, pIndirectExecutionSet, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateIndirectExecutionSetEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateIndirectExecutionSetEXT(device, pCreateInfo, pAllocator, pIndirectExecutionSet, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateIndirectExecutionSetEXT(device, pCreateInfo, pAllocator, pIndirectExecutionSet); + result = device_dispatch->CreateIndirectExecutionSetEXT(device, pCreateInfo, pAllocator, pIndirectExecutionSet); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateIndirectExecutionSetEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateIndirectExecutionSetEXT(device, pCreateInfo, pAllocator, pIndirectExecutionSet, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateIndirectExecutionSetEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateIndirectExecutionSetEXT(device, pCreateInfo, pAllocator, pIndirectExecutionSet, record_obj); } } return result; @@ -26793,35 +24798,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyIndirectExecutionSetEXT(VkDevice device, VkInd const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyIndirectExecutionSetEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyIndirectExecutionSetEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyIndirectExecutionSetEXT(device, indirectExecutionSet, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyIndirectExecutionSetEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyIndirectExecutionSetEXT(device, indirectExecutionSet, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyIndirectExecutionSetEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyIndirectExecutionSetEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyIndirectExecutionSetEXT(device, indirectExecutionSet, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyIndirectExecutionSetEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyIndirectExecutionSetEXT(device, indirectExecutionSet, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyIndirectExecutionSetEXT(device, indirectExecutionSet, pAllocator); + device_dispatch->DestroyIndirectExecutionSetEXT(device, indirectExecutionSet, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyIndirectExecutionSetEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyIndirectExecutionSetEXT(device, indirectExecutionSet, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyIndirectExecutionSetEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyIndirectExecutionSetEXT(device, indirectExecutionSet, pAllocator, record_obj); } } } @@ -26831,40 +24835,38 @@ VKAPI_ATTR void VKAPI_CALL UpdateIndirectExecutionSetPipelineEXT( const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkUpdateIndirectExecutionSetPipelineEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateUpdateIndirectExecutionSetPipelineEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateUpdateIndirectExecutionSetPipelineEXT( - device, indirectExecutionSet, executionSetWriteCount, pExecutionSetWrites, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateUpdateIndirectExecutionSetPipelineEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateUpdateIndirectExecutionSetPipelineEXT(device, indirectExecutionSet, executionSetWriteCount, + pExecutionSetWrites, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkUpdateIndirectExecutionSetPipelineEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordUpdateIndirectExecutionSetPipelineEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordUpdateIndirectExecutionSetPipelineEXT(device, indirectExecutionSet, executionSetWriteCount, - pExecutionSetWrites, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordUpdateIndirectExecutionSetPipelineEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordUpdateIndirectExecutionSetPipelineEXT(device, indirectExecutionSet, executionSetWriteCount, + pExecutionSetWrites, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchUpdateIndirectExecutionSetPipelineEXT(device, indirectExecutionSet, executionSetWriteCount, pExecutionSetWrites); + device_dispatch->UpdateIndirectExecutionSetPipelineEXT(device, indirectExecutionSet, executionSetWriteCount, + pExecutionSetWrites); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordUpdateIndirectExecutionSetPipelineEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordUpdateIndirectExecutionSetPipelineEXT(device, indirectExecutionSet, executionSetWriteCount, - pExecutionSetWrites, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordUpdateIndirectExecutionSetPipelineEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordUpdateIndirectExecutionSetPipelineEXT(device, indirectExecutionSet, executionSetWriteCount, + pExecutionSetWrites, record_obj); } } } @@ -26874,40 +24876,38 @@ VKAPI_ATTR void VKAPI_CALL UpdateIndirectExecutionSetShaderEXT(VkDevice device, const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkUpdateIndirectExecutionSetShaderEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateUpdateIndirectExecutionSetShaderEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateUpdateIndirectExecutionSetShaderEXT( - device, indirectExecutionSet, executionSetWriteCount, pExecutionSetWrites, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateUpdateIndirectExecutionSetShaderEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateUpdateIndirectExecutionSetShaderEXT(device, indirectExecutionSet, executionSetWriteCount, + pExecutionSetWrites, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkUpdateIndirectExecutionSetShaderEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordUpdateIndirectExecutionSetShaderEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordUpdateIndirectExecutionSetShaderEXT(device, indirectExecutionSet, executionSetWriteCount, - pExecutionSetWrites, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordUpdateIndirectExecutionSetShaderEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordUpdateIndirectExecutionSetShaderEXT(device, indirectExecutionSet, executionSetWriteCount, + pExecutionSetWrites, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchUpdateIndirectExecutionSetShaderEXT(device, indirectExecutionSet, executionSetWriteCount, pExecutionSetWrites); + device_dispatch->UpdateIndirectExecutionSetShaderEXT(device, indirectExecutionSet, executionSetWriteCount, + pExecutionSetWrites); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordUpdateIndirectExecutionSetShaderEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordUpdateIndirectExecutionSetShaderEXT(device, indirectExecutionSet, executionSetWriteCount, - pExecutionSetWrites, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordUpdateIndirectExecutionSetShaderEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordUpdateIndirectExecutionSetShaderEXT(device, indirectExecutionSet, executionSetWriteCount, + pExecutionSetWrites, record_obj); } } } @@ -26916,15 +24916,15 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCooperativeMatrixFlexibleDimensi VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixFlexibleDimensionsPropertiesNV* pProperties) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + auto instance_dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV, VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( + for (const auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( physicalDevice, pPropertyCount, pProperties, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } @@ -26932,25 +24932,25 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCooperativeMatrixFlexibleDimensi RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV(physicalDevice, pPropertyCount, - pProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV(physicalDevice, pPropertyCount, + pProperties, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = - DispatchGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV(physicalDevice, pPropertyCount, pProperties); + result = instance_dispatch->GetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV(physicalDevice, pPropertyCount, + pProperties); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( - physicalDevice, pPropertyCount, pProperties, record_obj); + for (auto* vo : instance_dispatch->object_dispatch) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV(physicalDevice, pPropertyCount, + pProperties, record_obj); } } return result; @@ -26962,40 +24962,37 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateAccelerationStructureKHR(VkDevice device, VkAccelerationStructureKHR* pAccelerationStructure) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCreateAccelerationStructureKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCreateAccelerationStructureKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateAccelerationStructureKHR(device, pCreateInfo, pAllocator, - pAccelerationStructure, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCreateAccelerationStructureKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCreateAccelerationStructureKHR(device, pCreateInfo, pAllocator, pAccelerationStructure, + error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCreateAccelerationStructureKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCreateAccelerationStructureKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateAccelerationStructureKHR(device, pCreateInfo, pAllocator, pAccelerationStructure, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCreateAccelerationStructureKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCreateAccelerationStructureKHR(device, pCreateInfo, pAllocator, pAccelerationStructure, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateAccelerationStructureKHR(device, pCreateInfo, pAllocator, pAccelerationStructure); + result = device_dispatch->CreateAccelerationStructureKHR(device, pCreateInfo, pAllocator, pAccelerationStructure); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateAccelerationStructureKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateAccelerationStructureKHR(device, pCreateInfo, pAllocator, pAccelerationStructure, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCreateAccelerationStructureKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCreateAccelerationStructureKHR(device, pCreateInfo, pAllocator, pAccelerationStructure, record_obj); } } return result; @@ -27005,36 +25002,34 @@ VKAPI_ATTR void VKAPI_CALL DestroyAccelerationStructureKHR(VkDevice device, VkAc const VkAllocationCallbacks* pAllocator) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkDestroyAccelerationStructureKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateDestroyAccelerationStructureKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateDestroyAccelerationStructureKHR(device, accelerationStructure, pAllocator, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateDestroyAccelerationStructureKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateDestroyAccelerationStructureKHR(device, accelerationStructure, pAllocator, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkDestroyAccelerationStructureKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordDestroyAccelerationStructureKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyAccelerationStructureKHR(device, accelerationStructure, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordDestroyAccelerationStructureKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordDestroyAccelerationStructureKHR(device, accelerationStructure, pAllocator, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchDestroyAccelerationStructureKHR(device, accelerationStructure, pAllocator); + device_dispatch->DestroyAccelerationStructureKHR(device, accelerationStructure, pAllocator); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordDestroyAccelerationStructureKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyAccelerationStructureKHR(device, accelerationStructure, pAllocator, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordDestroyAccelerationStructureKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordDestroyAccelerationStructureKHR(device, accelerationStructure, pAllocator, record_obj); } } } @@ -27044,41 +25039,36 @@ VKAPI_ATTR void VKAPI_CALL CmdBuildAccelerationStructuresKHR( const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBuildAccelerationStructuresKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBuildAccelerationStructuresKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBuildAccelerationStructuresKHR(commandBuffer, infoCount, pInfos, ppBuildRangeInfos, - error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBuildAccelerationStructuresKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBuildAccelerationStructuresKHR(commandBuffer, infoCount, pInfos, ppBuildRangeInfos, + error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdBuildAccelerationStructuresKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBuildAccelerationStructuresKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBuildAccelerationStructuresKHR(commandBuffer, infoCount, pInfos, ppBuildRangeInfos, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBuildAccelerationStructuresKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBuildAccelerationStructuresKHR(commandBuffer, infoCount, pInfos, ppBuildRangeInfos, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBuildAccelerationStructuresKHR(commandBuffer, infoCount, pInfos, ppBuildRangeInfos); + device_dispatch->CmdBuildAccelerationStructuresKHR(commandBuffer, infoCount, pInfos, ppBuildRangeInfos); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBuildAccelerationStructuresKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBuildAccelerationStructuresKHR(commandBuffer, infoCount, pInfos, ppBuildRangeInfos, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBuildAccelerationStructuresKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBuildAccelerationStructuresKHR(commandBuffer, infoCount, pInfos, ppBuildRangeInfos, record_obj); } } } @@ -27090,16 +25080,16 @@ VKAPI_ATTR void VKAPI_CALL CmdBuildAccelerationStructuresIndirectKHR(VkCommandBu const uint32_t* const* ppMaxPrimitiveCounts) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdBuildAccelerationStructuresIndirectKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdBuildAccelerationStructuresIndirectKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdBuildAccelerationStructuresIndirectKHR( + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdBuildAccelerationStructuresIndirectKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdBuildAccelerationStructuresIndirectKHR( commandBuffer, infoCount, pInfos, pIndirectDeviceAddresses, pIndirectStrides, ppMaxPrimitiveCounts, error_obj); if (skip) return; } @@ -27107,25 +25097,23 @@ VKAPI_ATTR void VKAPI_CALL CmdBuildAccelerationStructuresIndirectKHR(VkCommandBu RecordObject record_obj(vvl::Func::vkCmdBuildAccelerationStructuresIndirectKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdBuildAccelerationStructuresIndirectKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdBuildAccelerationStructuresIndirectKHR( - commandBuffer, infoCount, pInfos, pIndirectDeviceAddresses, pIndirectStrides, ppMaxPrimitiveCounts, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdBuildAccelerationStructuresIndirectKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdBuildAccelerationStructuresIndirectKHR(commandBuffer, infoCount, pInfos, pIndirectDeviceAddresses, + pIndirectStrides, ppMaxPrimitiveCounts, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdBuildAccelerationStructuresIndirectKHR(commandBuffer, infoCount, pInfos, pIndirectDeviceAddresses, - pIndirectStrides, ppMaxPrimitiveCounts); + device_dispatch->CmdBuildAccelerationStructuresIndirectKHR(commandBuffer, infoCount, pInfos, pIndirectDeviceAddresses, + pIndirectStrides, ppMaxPrimitiveCounts); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdBuildAccelerationStructuresIndirectKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdBuildAccelerationStructuresIndirectKHR( - commandBuffer, infoCount, pInfos, pIndirectDeviceAddresses, pIndirectStrides, ppMaxPrimitiveCounts, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdBuildAccelerationStructuresIndirectKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdBuildAccelerationStructuresIndirectKHR(commandBuffer, infoCount, pInfos, pIndirectDeviceAddresses, + pIndirectStrides, ppMaxPrimitiveCounts, record_obj); } } } @@ -27136,40 +25124,39 @@ BuildAccelerationStructuresKHR(VkDevice device, VkDeferredOperationKHR deferredO const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkBuildAccelerationStructuresKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateBuildAccelerationStructuresKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateBuildAccelerationStructuresKHR(device, deferredOperation, infoCount, pInfos, - ppBuildRangeInfos, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateBuildAccelerationStructuresKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateBuildAccelerationStructuresKHR(device, deferredOperation, infoCount, pInfos, + ppBuildRangeInfos, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkBuildAccelerationStructuresKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordBuildAccelerationStructuresKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordBuildAccelerationStructuresKHR(device, deferredOperation, infoCount, pInfos, ppBuildRangeInfos, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordBuildAccelerationStructuresKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordBuildAccelerationStructuresKHR(device, deferredOperation, infoCount, pInfos, ppBuildRangeInfos, + record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchBuildAccelerationStructuresKHR(device, deferredOperation, infoCount, pInfos, ppBuildRangeInfos); + result = device_dispatch->BuildAccelerationStructuresKHR(device, deferredOperation, infoCount, pInfos, ppBuildRangeInfos); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordBuildAccelerationStructuresKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordBuildAccelerationStructuresKHR(device, deferredOperation, infoCount, pInfos, ppBuildRangeInfos, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordBuildAccelerationStructuresKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordBuildAccelerationStructuresKHR(device, deferredOperation, infoCount, pInfos, ppBuildRangeInfos, + record_obj); } } return result; @@ -27179,37 +25166,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyAccelerationStructureKHR(VkDevice device, VkD const VkCopyAccelerationStructureInfoKHR* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCopyAccelerationStructureKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCopyAccelerationStructureKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCopyAccelerationStructureKHR(device, deferredOperation, pInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCopyAccelerationStructureKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCopyAccelerationStructureKHR(device, deferredOperation, pInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCopyAccelerationStructureKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCopyAccelerationStructureKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCopyAccelerationStructureKHR(device, deferredOperation, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCopyAccelerationStructureKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCopyAccelerationStructureKHR(device, deferredOperation, pInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCopyAccelerationStructureKHR(device, deferredOperation, pInfo); + result = device_dispatch->CopyAccelerationStructureKHR(device, deferredOperation, pInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCopyAccelerationStructureKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCopyAccelerationStructureKHR(device, deferredOperation, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCopyAccelerationStructureKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCopyAccelerationStructureKHR(device, deferredOperation, pInfo, record_obj); } } return result; @@ -27219,39 +25205,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyAccelerationStructureToMemoryKHR(VkDevice dev const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCopyAccelerationStructureToMemoryKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCopyAccelerationStructureToMemoryKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCopyAccelerationStructureToMemoryKHR(device, deferredOperation, pInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCopyAccelerationStructureToMemoryKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCopyAccelerationStructureToMemoryKHR(device, deferredOperation, pInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCopyAccelerationStructureToMemoryKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCopyAccelerationStructureToMemoryKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCopyAccelerationStructureToMemoryKHR(device, deferredOperation, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCopyAccelerationStructureToMemoryKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCopyAccelerationStructureToMemoryKHR(device, deferredOperation, pInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCopyAccelerationStructureToMemoryKHR(device, deferredOperation, pInfo); + result = device_dispatch->CopyAccelerationStructureToMemoryKHR(device, deferredOperation, pInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCopyAccelerationStructureToMemoryKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCopyAccelerationStructureToMemoryKHR(device, deferredOperation, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCopyAccelerationStructureToMemoryKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCopyAccelerationStructureToMemoryKHR(device, deferredOperation, pInfo, record_obj); } } return result; @@ -27261,39 +25244,36 @@ VKAPI_ATTR VkResult VKAPI_CALL CopyMemoryToAccelerationStructureKHR(VkDevice dev const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCopyMemoryToAccelerationStructureKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCopyMemoryToAccelerationStructureKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCopyMemoryToAccelerationStructureKHR(device, deferredOperation, pInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCopyMemoryToAccelerationStructureKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCopyMemoryToAccelerationStructureKHR(device, deferredOperation, pInfo, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkCopyMemoryToAccelerationStructureKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCopyMemoryToAccelerationStructureKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCopyMemoryToAccelerationStructureKHR(device, deferredOperation, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCopyMemoryToAccelerationStructureKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCopyMemoryToAccelerationStructureKHR(device, deferredOperation, pInfo, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchCopyMemoryToAccelerationStructureKHR(device, deferredOperation, pInfo); + result = device_dispatch->CopyMemoryToAccelerationStructureKHR(device, deferredOperation, pInfo); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCopyMemoryToAccelerationStructureKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCopyMemoryToAccelerationStructureKHR(device, deferredOperation, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCopyMemoryToAccelerationStructureKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCopyMemoryToAccelerationStructureKHR(device, deferredOperation, pInfo, record_obj); } } return result; @@ -27305,16 +25285,16 @@ VKAPI_ATTR VkResult VKAPI_CALL WriteAccelerationStructuresPropertiesKHR(VkDevice size_t stride) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkWriteAccelerationStructuresPropertiesKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateWriteAccelerationStructuresPropertiesKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateWriteAccelerationStructuresPropertiesKHR( + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateWriteAccelerationStructuresPropertiesKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateWriteAccelerationStructuresPropertiesKHR( device, accelerationStructureCount, pAccelerationStructures, queryType, dataSize, pData, stride, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } @@ -27322,27 +25302,25 @@ VKAPI_ATTR VkResult VKAPI_CALL WriteAccelerationStructuresPropertiesKHR(VkDevice RecordObject record_obj(vvl::Func::vkWriteAccelerationStructuresPropertiesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordWriteAccelerationStructuresPropertiesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordWriteAccelerationStructuresPropertiesKHR( - device, accelerationStructureCount, pAccelerationStructures, queryType, dataSize, pData, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordWriteAccelerationStructuresPropertiesKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordWriteAccelerationStructuresPropertiesKHR(device, accelerationStructureCount, pAccelerationStructures, + queryType, dataSize, pData, stride, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchWriteAccelerationStructuresPropertiesKHR(device, accelerationStructureCount, pAccelerationStructures, - queryType, dataSize, pData, stride); + result = device_dispatch->WriteAccelerationStructuresPropertiesKHR( + device, accelerationStructureCount, pAccelerationStructures, queryType, dataSize, pData, stride); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordWriteAccelerationStructuresPropertiesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordWriteAccelerationStructuresPropertiesKHR( - device, accelerationStructureCount, pAccelerationStructures, queryType, dataSize, pData, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordWriteAccelerationStructuresPropertiesKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordWriteAccelerationStructuresPropertiesKHR(device, accelerationStructureCount, pAccelerationStructures, + queryType, dataSize, pData, stride, record_obj); } } return result; @@ -27352,37 +25330,35 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyAccelerationStructureKHR(VkCommandBuffer comma const VkCopyAccelerationStructureInfoKHR* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCopyAccelerationStructureKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCopyAccelerationStructureKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCopyAccelerationStructureKHR(commandBuffer, pInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCopyAccelerationStructureKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCopyAccelerationStructureKHR(commandBuffer, pInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCopyAccelerationStructureKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCopyAccelerationStructureKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCopyAccelerationStructureKHR(commandBuffer, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCopyAccelerationStructureKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCopyAccelerationStructureKHR(commandBuffer, pInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCopyAccelerationStructureKHR(commandBuffer, pInfo); + device_dispatch->CmdCopyAccelerationStructureKHR(commandBuffer, pInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCopyAccelerationStructureKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCopyAccelerationStructureKHR(commandBuffer, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCopyAccelerationStructureKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCopyAccelerationStructureKHR(commandBuffer, pInfo, record_obj); } } } @@ -27391,38 +25367,36 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyAccelerationStructureToMemoryKHR(VkCommandBuff const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCopyAccelerationStructureToMemoryKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCopyAccelerationStructureToMemoryKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCopyAccelerationStructureToMemoryKHR(commandBuffer, pInfo, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCopyAccelerationStructureToMemoryKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCopyAccelerationStructureToMemoryKHR(commandBuffer, pInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCopyAccelerationStructureToMemoryKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCopyAccelerationStructureToMemoryKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCopyAccelerationStructureToMemoryKHR(commandBuffer, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCopyAccelerationStructureToMemoryKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCopyAccelerationStructureToMemoryKHR(commandBuffer, pInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCopyAccelerationStructureToMemoryKHR(commandBuffer, pInfo); + device_dispatch->CmdCopyAccelerationStructureToMemoryKHR(commandBuffer, pInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCopyAccelerationStructureToMemoryKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCopyAccelerationStructureToMemoryKHR(commandBuffer, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCopyAccelerationStructureToMemoryKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCopyAccelerationStructureToMemoryKHR(commandBuffer, pInfo, record_obj); } } } @@ -27431,38 +25405,36 @@ VKAPI_ATTR void VKAPI_CALL CmdCopyMemoryToAccelerationStructureKHR(VkCommandBuff const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdCopyMemoryToAccelerationStructureKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdCopyMemoryToAccelerationStructureKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdCopyMemoryToAccelerationStructureKHR(commandBuffer, pInfo, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdCopyMemoryToAccelerationStructureKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdCopyMemoryToAccelerationStructureKHR(commandBuffer, pInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdCopyMemoryToAccelerationStructureKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdCopyMemoryToAccelerationStructureKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdCopyMemoryToAccelerationStructureKHR(commandBuffer, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdCopyMemoryToAccelerationStructureKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdCopyMemoryToAccelerationStructureKHR(commandBuffer, pInfo, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdCopyMemoryToAccelerationStructureKHR(commandBuffer, pInfo); + device_dispatch->CmdCopyMemoryToAccelerationStructureKHR(commandBuffer, pInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdCopyMemoryToAccelerationStructureKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdCopyMemoryToAccelerationStructureKHR(commandBuffer, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdCopyMemoryToAccelerationStructureKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdCopyMemoryToAccelerationStructureKHR(commandBuffer, pInfo, record_obj); } } } @@ -27471,40 +25443,38 @@ VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetAccelerationStructureDeviceAddressKHR(VkDevice device, const VkAccelerationStructureDeviceAddressInfoKHR* pInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetAccelerationStructureDeviceAddressKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetAccelerationStructureDeviceAddressKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetAccelerationStructureDeviceAddressKHR(device, pInfo, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetAccelerationStructureDeviceAddressKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetAccelerationStructureDeviceAddressKHR(device, pInfo, error_obj); if (skip) return 0; } } RecordObject record_obj(vvl::Func::vkGetAccelerationStructureDeviceAddressKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetAccelerationStructureDeviceAddressKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetAccelerationStructureDeviceAddressKHR(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetAccelerationStructureDeviceAddressKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetAccelerationStructureDeviceAddressKHR(device, pInfo, record_obj); } } VkDeviceAddress result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetAccelerationStructureDeviceAddressKHR(device, pInfo); + result = device_dispatch->GetAccelerationStructureDeviceAddressKHR(device, pInfo); } record_obj.device_address = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetAccelerationStructureDeviceAddressKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetAccelerationStructureDeviceAddressKHR(device, pInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetAccelerationStructureDeviceAddressKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetAccelerationStructureDeviceAddressKHR(device, pInfo, record_obj); } } return result; @@ -27517,16 +25487,16 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteAccelerationStructuresPropertiesKHR(VkCommand uint32_t firstQuery) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdWriteAccelerationStructuresPropertiesKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdWriteAccelerationStructuresPropertiesKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdWriteAccelerationStructuresPropertiesKHR( + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdWriteAccelerationStructuresPropertiesKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdWriteAccelerationStructuresPropertiesKHR( commandBuffer, accelerationStructureCount, pAccelerationStructures, queryType, queryPool, firstQuery, error_obj); if (skip) return; } @@ -27534,24 +25504,22 @@ VKAPI_ATTR void VKAPI_CALL CmdWriteAccelerationStructuresPropertiesKHR(VkCommand RecordObject record_obj(vvl::Func::vkCmdWriteAccelerationStructuresPropertiesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdWriteAccelerationStructuresPropertiesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdWriteAccelerationStructuresPropertiesKHR( + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdWriteAccelerationStructuresPropertiesKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdWriteAccelerationStructuresPropertiesKHR( commandBuffer, accelerationStructureCount, pAccelerationStructures, queryType, queryPool, firstQuery, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdWriteAccelerationStructuresPropertiesKHR(commandBuffer, accelerationStructureCount, pAccelerationStructures, - queryType, queryPool, firstQuery); + device_dispatch->CmdWriteAccelerationStructuresPropertiesKHR(commandBuffer, accelerationStructureCount, + pAccelerationStructures, queryType, queryPool, firstQuery); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdWriteAccelerationStructuresPropertiesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdWriteAccelerationStructuresPropertiesKHR( + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdWriteAccelerationStructuresPropertiesKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdWriteAccelerationStructuresPropertiesKHR( commandBuffer, accelerationStructureCount, pAccelerationStructures, queryType, queryPool, firstQuery, record_obj); } } @@ -27562,41 +25530,39 @@ VKAPI_ATTR void VKAPI_CALL GetDeviceAccelerationStructureCompatibilityKHR(VkDevi VkAccelerationStructureCompatibilityKHR* pCompatibility) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetDeviceAccelerationStructureCompatibilityKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetDeviceAccelerationStructureCompatibilityKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetDeviceAccelerationStructureCompatibilityKHR(device, pVersionInfo, pCompatibility, - error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetDeviceAccelerationStructureCompatibilityKHR]) { + auto lock = vo->ReadLock(); + skip |= + vo->PreCallValidateGetDeviceAccelerationStructureCompatibilityKHR(device, pVersionInfo, pCompatibility, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetDeviceAccelerationStructureCompatibilityKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetDeviceAccelerationStructureCompatibilityKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetDeviceAccelerationStructureCompatibilityKHR(device, pVersionInfo, pCompatibility, - record_obj); + for (auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetDeviceAccelerationStructureCompatibilityKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetDeviceAccelerationStructureCompatibilityKHR(device, pVersionInfo, pCompatibility, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetDeviceAccelerationStructureCompatibilityKHR(device, pVersionInfo, pCompatibility); + device_dispatch->GetDeviceAccelerationStructureCompatibilityKHR(device, pVersionInfo, pCompatibility); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetDeviceAccelerationStructureCompatibilityKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetDeviceAccelerationStructureCompatibilityKHR(device, pVersionInfo, pCompatibility, - record_obj); + for (auto* vo : + device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetDeviceAccelerationStructureCompatibilityKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetDeviceAccelerationStructureCompatibilityKHR(device, pVersionInfo, pCompatibility, record_obj); } } } @@ -27607,40 +25573,37 @@ VKAPI_ATTR void VKAPI_CALL GetAccelerationStructureBuildSizesKHR(VkDevice device VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetAccelerationStructureBuildSizesKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetAccelerationStructureBuildSizesKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetAccelerationStructureBuildSizesKHR(device, buildType, pBuildInfo, - pMaxPrimitiveCounts, pSizeInfo, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetAccelerationStructureBuildSizesKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetAccelerationStructureBuildSizesKHR(device, buildType, pBuildInfo, pMaxPrimitiveCounts, + pSizeInfo, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkGetAccelerationStructureBuildSizesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetAccelerationStructureBuildSizesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetAccelerationStructureBuildSizesKHR(device, buildType, pBuildInfo, pMaxPrimitiveCounts, - pSizeInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetAccelerationStructureBuildSizesKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetAccelerationStructureBuildSizesKHR(device, buildType, pBuildInfo, pMaxPrimitiveCounts, pSizeInfo, + record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchGetAccelerationStructureBuildSizesKHR(device, buildType, pBuildInfo, pMaxPrimitiveCounts, pSizeInfo); + device_dispatch->GetAccelerationStructureBuildSizesKHR(device, buildType, pBuildInfo, pMaxPrimitiveCounts, pSizeInfo); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetAccelerationStructureBuildSizesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetAccelerationStructureBuildSizesKHR(device, buildType, pBuildInfo, pMaxPrimitiveCounts, - pSizeInfo, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetAccelerationStructureBuildSizesKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetAccelerationStructureBuildSizesKHR(device, buildType, pBuildInfo, pMaxPrimitiveCounts, pSizeInfo, + record_obj); } } } @@ -27653,41 +25616,40 @@ VKAPI_ATTR void VKAPI_CALL CmdTraceRaysKHR(VkCommandBuffer commandBuffer, uint32_t height, uint32_t depth) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdTraceRaysKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdTraceRaysKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdTraceRaysKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, - pHitShaderBindingTable, pCallableShaderBindingTable, width, height, - depth, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdTraceRaysKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdTraceRaysKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, + pHitShaderBindingTable, pCallableShaderBindingTable, width, height, depth, + error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdTraceRaysKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdTraceRaysKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdTraceRaysKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, - pHitShaderBindingTable, pCallableShaderBindingTable, width, height, depth, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdTraceRaysKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdTraceRaysKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, + pHitShaderBindingTable, pCallableShaderBindingTable, width, height, depth, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdTraceRaysKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, pHitShaderBindingTable, - pCallableShaderBindingTable, width, height, depth); + device_dispatch->CmdTraceRaysKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, pHitShaderBindingTable, + pCallableShaderBindingTable, width, height, depth); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdTraceRaysKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdTraceRaysKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, - pHitShaderBindingTable, pCallableShaderBindingTable, width, height, depth, - record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdTraceRaysKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdTraceRaysKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, + pHitShaderBindingTable, pCallableShaderBindingTable, width, height, depth, + record_obj); } } } @@ -27697,43 +25659,44 @@ VKAPI_ATTR VkResult VKAPI_CALL GetRayTracingCaptureReplayShaderGroupHandlesKHR(V size_t dataSize, void* pData) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetRayTracingCaptureReplayShaderGroupHandlesKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetRayTracingCaptureReplayShaderGroupHandlesKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetRayTracingCaptureReplayShaderGroupHandlesKHR( - device, pipeline, firstGroup, groupCount, dataSize, pData, error_obj); + for (const auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetRayTracingCaptureReplayShaderGroupHandlesKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetRayTracingCaptureReplayShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, + dataSize, pData, error_obj); if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; } } RecordObject record_obj(vvl::Func::vkGetRayTracingCaptureReplayShaderGroupHandlesKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetRayTracingCaptureReplayShaderGroupHandlesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetRayTracingCaptureReplayShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, - dataSize, pData, record_obj); + for (auto* vo : + device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetRayTracingCaptureReplayShaderGroupHandlesKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetRayTracingCaptureReplayShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, dataSize, + pData, record_obj); } } VkResult result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetRayTracingCaptureReplayShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, dataSize, pData); + result = device_dispatch->GetRayTracingCaptureReplayShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, + dataSize, pData); } record_obj.result = result; { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetRayTracingCaptureReplayShaderGroupHandlesKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetRayTracingCaptureReplayShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, - dataSize, pData, record_obj); + for (auto* vo : + device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetRayTracingCaptureReplayShaderGroupHandlesKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetRayTracingCaptureReplayShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, dataSize, + pData, record_obj); } } return result; @@ -27747,41 +25710,41 @@ VKAPI_ATTR void VKAPI_CALL CmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer VkDeviceAddress indirectDeviceAddress) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdTraceRaysIndirectKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdTraceRaysIndirectKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdTraceRaysIndirectKHR( - commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, pHitShaderBindingTable, - pCallableShaderBindingTable, indirectDeviceAddress, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdTraceRaysIndirectKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdTraceRaysIndirectKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, + pHitShaderBindingTable, pCallableShaderBindingTable, + indirectDeviceAddress, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdTraceRaysIndirectKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdTraceRaysIndirectKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdTraceRaysIndirectKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, - pHitShaderBindingTable, pCallableShaderBindingTable, - indirectDeviceAddress, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdTraceRaysIndirectKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdTraceRaysIndirectKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, + pHitShaderBindingTable, pCallableShaderBindingTable, indirectDeviceAddress, + record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdTraceRaysIndirectKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, pHitShaderBindingTable, - pCallableShaderBindingTable, indirectDeviceAddress); + device_dispatch->CmdTraceRaysIndirectKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, + pHitShaderBindingTable, pCallableShaderBindingTable, indirectDeviceAddress); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdTraceRaysIndirectKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdTraceRaysIndirectKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, - pHitShaderBindingTable, pCallableShaderBindingTable, - indirectDeviceAddress, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdTraceRaysIndirectKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdTraceRaysIndirectKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, + pHitShaderBindingTable, pCallableShaderBindingTable, indirectDeviceAddress, + record_obj); } } } @@ -27790,38 +25753,35 @@ VKAPI_ATTR VkDeviceSize VKAPI_CALL GetRayTracingShaderGroupStackSizeKHR(VkDevice VkShaderGroupShaderKHR groupShader) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkGetRayTracingShaderGroupStackSizeKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateGetRayTracingShaderGroupStackSizeKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateGetRayTracingShaderGroupStackSizeKHR(device, pipeline, group, groupShader, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateGetRayTracingShaderGroupStackSizeKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateGetRayTracingShaderGroupStackSizeKHR(device, pipeline, group, groupShader, error_obj); if (skip) return 0; } } RecordObject record_obj(vvl::Func::vkGetRayTracingShaderGroupStackSizeKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordGetRayTracingShaderGroupStackSizeKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetRayTracingShaderGroupStackSizeKHR(device, pipeline, group, groupShader, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordGetRayTracingShaderGroupStackSizeKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordGetRayTracingShaderGroupStackSizeKHR(device, pipeline, group, groupShader, record_obj); } } VkDeviceSize result; { VVL_ZoneScopedN("Dispatch"); - result = DispatchGetRayTracingShaderGroupStackSizeKHR(device, pipeline, group, groupShader); + result = device_dispatch->GetRayTracingShaderGroupStackSizeKHR(device, pipeline, group, groupShader); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordGetRayTracingShaderGroupStackSizeKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetRayTracingShaderGroupStackSizeKHR(device, pipeline, group, groupShader, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordGetRayTracingShaderGroupStackSizeKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordGetRayTracingShaderGroupStackSizeKHR(device, pipeline, group, groupShader, record_obj); } } return result; @@ -27830,38 +25790,35 @@ VKAPI_ATTR VkDeviceSize VKAPI_CALL GetRayTracingShaderGroupStackSizeKHR(VkDevice VKAPI_ATTR void VKAPI_CALL CmdSetRayTracingPipelineStackSizeKHR(VkCommandBuffer commandBuffer, uint32_t pipelineStackSize) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdSetRayTracingPipelineStackSizeKHR, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdSetRayTracingPipelineStackSizeKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdSetRayTracingPipelineStackSizeKHR(commandBuffer, pipelineStackSize, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdSetRayTracingPipelineStackSizeKHR]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdSetRayTracingPipelineStackSizeKHR(commandBuffer, pipelineStackSize, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdSetRayTracingPipelineStackSizeKHR); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdSetRayTracingPipelineStackSizeKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdSetRayTracingPipelineStackSizeKHR(commandBuffer, pipelineStackSize, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdSetRayTracingPipelineStackSizeKHR]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdSetRayTracingPipelineStackSizeKHR(commandBuffer, pipelineStackSize, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdSetRayTracingPipelineStackSizeKHR(commandBuffer, pipelineStackSize); + device_dispatch->CmdSetRayTracingPipelineStackSizeKHR(commandBuffer, pipelineStackSize); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdSetRayTracingPipelineStackSizeKHR]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdSetRayTracingPipelineStackSizeKHR(commandBuffer, pipelineStackSize, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdSetRayTracingPipelineStackSizeKHR]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdSetRayTracingPipelineStackSizeKHR(commandBuffer, pipelineStackSize, record_obj); } } } @@ -27870,34 +25827,34 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksEXT(VkCommandBuffer commandBuffer, ui uint32_t groupCountZ) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDrawMeshTasksEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDrawMeshTasksEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDrawMeshTasksEXT(commandBuffer, groupCountX, groupCountY, groupCountZ, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDrawMeshTasksEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDrawMeshTasksEXT(commandBuffer, groupCountX, groupCountY, groupCountZ, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDrawMeshTasksEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDrawMeshTasksEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDrawMeshTasksEXT(commandBuffer, groupCountX, groupCountY, groupCountZ, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDrawMeshTasksEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDrawMeshTasksEXT(commandBuffer, groupCountX, groupCountY, groupCountZ, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDrawMeshTasksEXT(commandBuffer, groupCountX, groupCountY, groupCountZ); + device_dispatch->CmdDrawMeshTasksEXT(commandBuffer, groupCountX, groupCountY, groupCountZ); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDrawMeshTasksEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDrawMeshTasksEXT(commandBuffer, groupCountX, groupCountY, groupCountZ, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDrawMeshTasksEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDrawMeshTasksEXT(commandBuffer, groupCountX, groupCountY, groupCountZ, record_obj); } } } @@ -27906,37 +25863,35 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectEXT(VkCommandBuffer commandBu uint32_t drawCount, uint32_t stride) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDrawMeshTasksIndirectEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDrawMeshTasksIndirectEXT]) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateCmdDrawMeshTasksIndirectEXT(commandBuffer, buffer, offset, drawCount, stride, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDrawMeshTasksIndirectEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDrawMeshTasksIndirectEXT(commandBuffer, buffer, offset, drawCount, stride, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDrawMeshTasksIndirectEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDrawMeshTasksIndirectEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDrawMeshTasksIndirectEXT(commandBuffer, buffer, offset, drawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDrawMeshTasksIndirectEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDrawMeshTasksIndirectEXT(commandBuffer, buffer, offset, drawCount, stride, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDrawMeshTasksIndirectEXT(commandBuffer, buffer, offset, drawCount, stride); + device_dispatch->CmdDrawMeshTasksIndirectEXT(commandBuffer, buffer, offset, drawCount, stride); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDrawMeshTasksIndirectEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDrawMeshTasksIndirectEXT(commandBuffer, buffer, offset, drawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDrawMeshTasksIndirectEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDrawMeshTasksIndirectEXT(commandBuffer, buffer, offset, drawCount, stride, record_obj); } } } @@ -27946,42 +25901,39 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer comm uint32_t maxDrawCount, uint32_t stride) { VVL_ZoneScoped; - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + auto device_dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); bool skip = false; ErrorObject error_obj(vvl::Func::vkCmdDrawMeshTasksIndirectCountEXT, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer)); { VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallValidateCmdDrawMeshTasksIndirectCountEXT]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCmdDrawMeshTasksIndirectCountEXT(commandBuffer, buffer, offset, countBuffer, - countBufferOffset, maxDrawCount, stride, error_obj); + for (const auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallValidateCmdDrawMeshTasksIndirectCountEXT]) { + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidateCmdDrawMeshTasksIndirectCountEXT(commandBuffer, buffer, offset, countBuffer, + countBufferOffset, maxDrawCount, stride, error_obj); if (skip) return; } } RecordObject record_obj(vvl::Func::vkCmdDrawMeshTasksIndirectCountEXT); { VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPreCallRecordCmdDrawMeshTasksIndirectCountEXT]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCmdDrawMeshTasksIndirectCountEXT(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPreCallRecordCmdDrawMeshTasksIndirectCountEXT]) { + auto lock = vo->WriteLock(); + vo->PreCallRecordCmdDrawMeshTasksIndirectCountEXT(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride, record_obj); } } { VVL_ZoneScopedN("Dispatch"); - DispatchCmdDrawMeshTasksIndirectCountEXT(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, - stride); + device_dispatch->CmdDrawMeshTasksIndirectCountEXT(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride); } { VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : - layer_data->intercept_vectors[InterceptIdPostCallRecordCmdDrawMeshTasksIndirectCountEXT]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCmdDrawMeshTasksIndirectCountEXT(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride, record_obj); + for (auto* vo : device_dispatch->intercept_vectors[InterceptIdPostCallRecordCmdDrawMeshTasksIndirectCountEXT]) { + auto lock = vo->WriteLock(); + vo->PostCallRecordCmdDrawMeshTasksIndirectCountEXT(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride, record_obj); } } } @@ -27990,763 +25942,776 @@ VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer comm #ifdef _MSC_VER #pragma warning(suppress : 6262) // VS analysis: this uses more than 16 kiB, which is fine here at global scope #endif -// clang-format off -const vvl::unordered_map &GetNameToFuncPtrMap() { +const vvl::unordered_map& GetNameToFuncPtrMap() { static const vvl::unordered_map name_to_func_ptr_map = { - {"vk_layerGetPhysicalDeviceProcAddr", {kFuncTypeInst, (void*)GetPhysicalDeviceProcAddr}}, - {"vkCreateInstance", {kFuncTypeInst, (void*)CreateInstance}}, - {"vkDestroyInstance", {kFuncTypeInst, (void*)DestroyInstance}}, - {"vkEnumeratePhysicalDevices", {kFuncTypeInst, (void*)EnumeratePhysicalDevices}}, - {"vkGetPhysicalDeviceFeatures", {kFuncTypePdev, (void*)GetPhysicalDeviceFeatures}}, - {"vkGetPhysicalDeviceFormatProperties", {kFuncTypePdev, (void*)GetPhysicalDeviceFormatProperties}}, - {"vkGetPhysicalDeviceImageFormatProperties", {kFuncTypePdev, (void*)GetPhysicalDeviceImageFormatProperties}}, - {"vkGetPhysicalDeviceProperties", {kFuncTypePdev, (void*)GetPhysicalDeviceProperties}}, - {"vkGetPhysicalDeviceQueueFamilyProperties", {kFuncTypePdev, (void*)GetPhysicalDeviceQueueFamilyProperties}}, - {"vkGetPhysicalDeviceMemoryProperties", {kFuncTypePdev, (void*)GetPhysicalDeviceMemoryProperties}}, - {"vkGetInstanceProcAddr", {kFuncTypeInst, (void*)GetInstanceProcAddr}}, - {"vkGetDeviceProcAddr", {kFuncTypeDev, (void*)GetDeviceProcAddr}}, - {"vkCreateDevice", {kFuncTypePdev, (void*)CreateDevice}}, - {"vkDestroyDevice", {kFuncTypeDev, (void*)DestroyDevice}}, - {"vkEnumerateInstanceExtensionProperties", {kFuncTypeInst, (void*)EnumerateInstanceExtensionProperties}}, - {"vkEnumerateDeviceExtensionProperties", {kFuncTypePdev, (void*)EnumerateDeviceExtensionProperties}}, - {"vkEnumerateInstanceLayerProperties", {kFuncTypeInst, (void*)EnumerateInstanceLayerProperties}}, - {"vkEnumerateDeviceLayerProperties", {kFuncTypePdev, (void*)EnumerateDeviceLayerProperties}}, - {"vkGetDeviceQueue", {kFuncTypeDev, (void*)GetDeviceQueue}}, - {"vkQueueSubmit", {kFuncTypeDev, (void*)QueueSubmit}}, - {"vkQueueWaitIdle", {kFuncTypeDev, (void*)QueueWaitIdle}}, - {"vkDeviceWaitIdle", {kFuncTypeDev, (void*)DeviceWaitIdle}}, - {"vkAllocateMemory", {kFuncTypeDev, (void*)AllocateMemory}}, - {"vkFreeMemory", {kFuncTypeDev, (void*)FreeMemory}}, - {"vkMapMemory", {kFuncTypeDev, (void*)MapMemory}}, - {"vkUnmapMemory", {kFuncTypeDev, (void*)UnmapMemory}}, - {"vkFlushMappedMemoryRanges", {kFuncTypeDev, (void*)FlushMappedMemoryRanges}}, - {"vkInvalidateMappedMemoryRanges", {kFuncTypeDev, (void*)InvalidateMappedMemoryRanges}}, - {"vkGetDeviceMemoryCommitment", {kFuncTypeDev, (void*)GetDeviceMemoryCommitment}}, - {"vkBindBufferMemory", {kFuncTypeDev, (void*)BindBufferMemory}}, - {"vkBindImageMemory", {kFuncTypeDev, (void*)BindImageMemory}}, - {"vkGetBufferMemoryRequirements", {kFuncTypeDev, (void*)GetBufferMemoryRequirements}}, - {"vkGetImageMemoryRequirements", {kFuncTypeDev, (void*)GetImageMemoryRequirements}}, - {"vkGetImageSparseMemoryRequirements", {kFuncTypeDev, (void*)GetImageSparseMemoryRequirements}}, - {"vkGetPhysicalDeviceSparseImageFormatProperties", {kFuncTypePdev, (void*)GetPhysicalDeviceSparseImageFormatProperties}}, - {"vkQueueBindSparse", {kFuncTypeDev, (void*)QueueBindSparse}}, - {"vkCreateFence", {kFuncTypeDev, (void*)CreateFence}}, - {"vkDestroyFence", {kFuncTypeDev, (void*)DestroyFence}}, - {"vkResetFences", {kFuncTypeDev, (void*)ResetFences}}, - {"vkGetFenceStatus", {kFuncTypeDev, (void*)GetFenceStatus}}, - {"vkWaitForFences", {kFuncTypeDev, (void*)WaitForFences}}, - {"vkCreateSemaphore", {kFuncTypeDev, (void*)CreateSemaphore}}, - {"vkDestroySemaphore", {kFuncTypeDev, (void*)DestroySemaphore}}, - {"vkCreateEvent", {kFuncTypeDev, (void*)CreateEvent}}, - {"vkDestroyEvent", {kFuncTypeDev, (void*)DestroyEvent}}, - {"vkGetEventStatus", {kFuncTypeDev, (void*)GetEventStatus}}, - {"vkSetEvent", {kFuncTypeDev, (void*)SetEvent}}, - {"vkResetEvent", {kFuncTypeDev, (void*)ResetEvent}}, - {"vkCreateQueryPool", {kFuncTypeDev, (void*)CreateQueryPool}}, - {"vkDestroyQueryPool", {kFuncTypeDev, (void*)DestroyQueryPool}}, - {"vkGetQueryPoolResults", {kFuncTypeDev, (void*)GetQueryPoolResults}}, - {"vkCreateBuffer", {kFuncTypeDev, (void*)CreateBuffer}}, - {"vkDestroyBuffer", {kFuncTypeDev, (void*)DestroyBuffer}}, - {"vkCreateBufferView", {kFuncTypeDev, (void*)CreateBufferView}}, - {"vkDestroyBufferView", {kFuncTypeDev, (void*)DestroyBufferView}}, - {"vkCreateImage", {kFuncTypeDev, (void*)CreateImage}}, - {"vkDestroyImage", {kFuncTypeDev, (void*)DestroyImage}}, - {"vkGetImageSubresourceLayout", {kFuncTypeDev, (void*)GetImageSubresourceLayout}}, - {"vkCreateImageView", {kFuncTypeDev, (void*)CreateImageView}}, - {"vkDestroyImageView", {kFuncTypeDev, (void*)DestroyImageView}}, - {"vkCreateShaderModule", {kFuncTypeDev, (void*)CreateShaderModule}}, - {"vkDestroyShaderModule", {kFuncTypeDev, (void*)DestroyShaderModule}}, - {"vkCreatePipelineCache", {kFuncTypeDev, (void*)CreatePipelineCache}}, - {"vkDestroyPipelineCache", {kFuncTypeDev, (void*)DestroyPipelineCache}}, - {"vkGetPipelineCacheData", {kFuncTypeDev, (void*)GetPipelineCacheData}}, - {"vkMergePipelineCaches", {kFuncTypeDev, (void*)MergePipelineCaches}}, - {"vkCreateGraphicsPipelines", {kFuncTypeDev, (void*)CreateGraphicsPipelines}}, - {"vkCreateComputePipelines", {kFuncTypeDev, (void*)CreateComputePipelines}}, - {"vkDestroyPipeline", {kFuncTypeDev, (void*)DestroyPipeline}}, - {"vkCreatePipelineLayout", {kFuncTypeDev, (void*)CreatePipelineLayout}}, - {"vkDestroyPipelineLayout", {kFuncTypeDev, (void*)DestroyPipelineLayout}}, - {"vkCreateSampler", {kFuncTypeDev, (void*)CreateSampler}}, - {"vkDestroySampler", {kFuncTypeDev, (void*)DestroySampler}}, - {"vkCreateDescriptorSetLayout", {kFuncTypeDev, (void*)CreateDescriptorSetLayout}}, - {"vkDestroyDescriptorSetLayout", {kFuncTypeDev, (void*)DestroyDescriptorSetLayout}}, - {"vkCreateDescriptorPool", {kFuncTypeDev, (void*)CreateDescriptorPool}}, - {"vkDestroyDescriptorPool", {kFuncTypeDev, (void*)DestroyDescriptorPool}}, - {"vkResetDescriptorPool", {kFuncTypeDev, (void*)ResetDescriptorPool}}, - {"vkAllocateDescriptorSets", {kFuncTypeDev, (void*)AllocateDescriptorSets}}, - {"vkFreeDescriptorSets", {kFuncTypeDev, (void*)FreeDescriptorSets}}, - {"vkUpdateDescriptorSets", {kFuncTypeDev, (void*)UpdateDescriptorSets}}, - {"vkCreateFramebuffer", {kFuncTypeDev, (void*)CreateFramebuffer}}, - {"vkDestroyFramebuffer", {kFuncTypeDev, (void*)DestroyFramebuffer}}, - {"vkCreateRenderPass", {kFuncTypeDev, (void*)CreateRenderPass}}, - {"vkDestroyRenderPass", {kFuncTypeDev, (void*)DestroyRenderPass}}, - {"vkGetRenderAreaGranularity", {kFuncTypeDev, (void*)GetRenderAreaGranularity}}, - {"vkCreateCommandPool", {kFuncTypeDev, (void*)CreateCommandPool}}, - {"vkDestroyCommandPool", {kFuncTypeDev, (void*)DestroyCommandPool}}, - {"vkResetCommandPool", {kFuncTypeDev, (void*)ResetCommandPool}}, - {"vkAllocateCommandBuffers", {kFuncTypeDev, (void*)AllocateCommandBuffers}}, - {"vkFreeCommandBuffers", {kFuncTypeDev, (void*)FreeCommandBuffers}}, - {"vkBeginCommandBuffer", {kFuncTypeDev, (void*)BeginCommandBuffer}}, - {"vkEndCommandBuffer", {kFuncTypeDev, (void*)EndCommandBuffer}}, - {"vkResetCommandBuffer", {kFuncTypeDev, (void*)ResetCommandBuffer}}, - {"vkCmdBindPipeline", {kFuncTypeDev, (void*)CmdBindPipeline}}, - {"vkCmdSetViewport", {kFuncTypeDev, (void*)CmdSetViewport}}, - {"vkCmdSetScissor", {kFuncTypeDev, (void*)CmdSetScissor}}, - {"vkCmdSetLineWidth", {kFuncTypeDev, (void*)CmdSetLineWidth}}, - {"vkCmdSetDepthBias", {kFuncTypeDev, (void*)CmdSetDepthBias}}, - {"vkCmdSetBlendConstants", {kFuncTypeDev, (void*)CmdSetBlendConstants}}, - {"vkCmdSetDepthBounds", {kFuncTypeDev, (void*)CmdSetDepthBounds}}, - {"vkCmdSetStencilCompareMask", {kFuncTypeDev, (void*)CmdSetStencilCompareMask}}, - {"vkCmdSetStencilWriteMask", {kFuncTypeDev, (void*)CmdSetStencilWriteMask}}, - {"vkCmdSetStencilReference", {kFuncTypeDev, (void*)CmdSetStencilReference}}, - {"vkCmdBindDescriptorSets", {kFuncTypeDev, (void*)CmdBindDescriptorSets}}, - {"vkCmdBindIndexBuffer", {kFuncTypeDev, (void*)CmdBindIndexBuffer}}, - {"vkCmdBindVertexBuffers", {kFuncTypeDev, (void*)CmdBindVertexBuffers}}, - {"vkCmdDraw", {kFuncTypeDev, (void*)CmdDraw}}, - {"vkCmdDrawIndexed", {kFuncTypeDev, (void*)CmdDrawIndexed}}, - {"vkCmdDrawIndirect", {kFuncTypeDev, (void*)CmdDrawIndirect}}, - {"vkCmdDrawIndexedIndirect", {kFuncTypeDev, (void*)CmdDrawIndexedIndirect}}, - {"vkCmdDispatch", {kFuncTypeDev, (void*)CmdDispatch}}, - {"vkCmdDispatchIndirect", {kFuncTypeDev, (void*)CmdDispatchIndirect}}, - {"vkCmdCopyBuffer", {kFuncTypeDev, (void*)CmdCopyBuffer}}, - {"vkCmdCopyImage", {kFuncTypeDev, (void*)CmdCopyImage}}, - {"vkCmdBlitImage", {kFuncTypeDev, (void*)CmdBlitImage}}, - {"vkCmdCopyBufferToImage", {kFuncTypeDev, (void*)CmdCopyBufferToImage}}, - {"vkCmdCopyImageToBuffer", {kFuncTypeDev, (void*)CmdCopyImageToBuffer}}, - {"vkCmdUpdateBuffer", {kFuncTypeDev, (void*)CmdUpdateBuffer}}, - {"vkCmdFillBuffer", {kFuncTypeDev, (void*)CmdFillBuffer}}, - {"vkCmdClearColorImage", {kFuncTypeDev, (void*)CmdClearColorImage}}, - {"vkCmdClearDepthStencilImage", {kFuncTypeDev, (void*)CmdClearDepthStencilImage}}, - {"vkCmdClearAttachments", {kFuncTypeDev, (void*)CmdClearAttachments}}, - {"vkCmdResolveImage", {kFuncTypeDev, (void*)CmdResolveImage}}, - {"vkCmdSetEvent", {kFuncTypeDev, (void*)CmdSetEvent}}, - {"vkCmdResetEvent", {kFuncTypeDev, (void*)CmdResetEvent}}, - {"vkCmdWaitEvents", {kFuncTypeDev, (void*)CmdWaitEvents}}, - {"vkCmdPipelineBarrier", {kFuncTypeDev, (void*)CmdPipelineBarrier}}, - {"vkCmdBeginQuery", {kFuncTypeDev, (void*)CmdBeginQuery}}, - {"vkCmdEndQuery", {kFuncTypeDev, (void*)CmdEndQuery}}, - {"vkCmdResetQueryPool", {kFuncTypeDev, (void*)CmdResetQueryPool}}, - {"vkCmdWriteTimestamp", {kFuncTypeDev, (void*)CmdWriteTimestamp}}, - {"vkCmdCopyQueryPoolResults", {kFuncTypeDev, (void*)CmdCopyQueryPoolResults}}, - {"vkCmdPushConstants", {kFuncTypeDev, (void*)CmdPushConstants}}, - {"vkCmdBeginRenderPass", {kFuncTypeDev, (void*)CmdBeginRenderPass}}, - {"vkCmdNextSubpass", {kFuncTypeDev, (void*)CmdNextSubpass}}, - {"vkCmdEndRenderPass", {kFuncTypeDev, (void*)CmdEndRenderPass}}, - {"vkCmdExecuteCommands", {kFuncTypeDev, (void*)CmdExecuteCommands}}, - {"vkBindBufferMemory2", {kFuncTypeDev, (void*)BindBufferMemory2}}, - {"vkBindImageMemory2", {kFuncTypeDev, (void*)BindImageMemory2}}, - {"vkGetDeviceGroupPeerMemoryFeatures", {kFuncTypeDev, (void*)GetDeviceGroupPeerMemoryFeatures}}, - {"vkCmdSetDeviceMask", {kFuncTypeDev, (void*)CmdSetDeviceMask}}, - {"vkCmdDispatchBase", {kFuncTypeDev, (void*)CmdDispatchBase}}, - {"vkEnumeratePhysicalDeviceGroups", {kFuncTypeInst, (void*)EnumeratePhysicalDeviceGroups}}, - {"vkGetImageMemoryRequirements2", {kFuncTypeDev, (void*)GetImageMemoryRequirements2}}, - {"vkGetBufferMemoryRequirements2", {kFuncTypeDev, (void*)GetBufferMemoryRequirements2}}, - {"vkGetImageSparseMemoryRequirements2", {kFuncTypeDev, (void*)GetImageSparseMemoryRequirements2}}, - {"vkGetPhysicalDeviceFeatures2", {kFuncTypePdev, (void*)GetPhysicalDeviceFeatures2}}, - {"vkGetPhysicalDeviceProperties2", {kFuncTypePdev, (void*)GetPhysicalDeviceProperties2}}, - {"vkGetPhysicalDeviceFormatProperties2", {kFuncTypePdev, (void*)GetPhysicalDeviceFormatProperties2}}, - {"vkGetPhysicalDeviceImageFormatProperties2", {kFuncTypePdev, (void*)GetPhysicalDeviceImageFormatProperties2}}, - {"vkGetPhysicalDeviceQueueFamilyProperties2", {kFuncTypePdev, (void*)GetPhysicalDeviceQueueFamilyProperties2}}, - {"vkGetPhysicalDeviceMemoryProperties2", {kFuncTypePdev, (void*)GetPhysicalDeviceMemoryProperties2}}, - {"vkGetPhysicalDeviceSparseImageFormatProperties2", {kFuncTypePdev, (void*)GetPhysicalDeviceSparseImageFormatProperties2}}, - {"vkTrimCommandPool", {kFuncTypeDev, (void*)TrimCommandPool}}, - {"vkGetDeviceQueue2", {kFuncTypeDev, (void*)GetDeviceQueue2}}, - {"vkCreateSamplerYcbcrConversion", {kFuncTypeDev, (void*)CreateSamplerYcbcrConversion}}, - {"vkDestroySamplerYcbcrConversion", {kFuncTypeDev, (void*)DestroySamplerYcbcrConversion}}, - {"vkCreateDescriptorUpdateTemplate", {kFuncTypeDev, (void*)CreateDescriptorUpdateTemplate}}, - {"vkDestroyDescriptorUpdateTemplate", {kFuncTypeDev, (void*)DestroyDescriptorUpdateTemplate}}, - {"vkUpdateDescriptorSetWithTemplate", {kFuncTypeDev, (void*)UpdateDescriptorSetWithTemplate}}, - {"vkGetPhysicalDeviceExternalBufferProperties", {kFuncTypePdev, (void*)GetPhysicalDeviceExternalBufferProperties}}, - {"vkGetPhysicalDeviceExternalFenceProperties", {kFuncTypePdev, (void*)GetPhysicalDeviceExternalFenceProperties}}, - {"vkGetPhysicalDeviceExternalSemaphoreProperties", {kFuncTypePdev, (void*)GetPhysicalDeviceExternalSemaphoreProperties}}, - {"vkGetDescriptorSetLayoutSupport", {kFuncTypeDev, (void*)GetDescriptorSetLayoutSupport}}, - {"vkCmdDrawIndirectCount", {kFuncTypeDev, (void*)CmdDrawIndirectCount}}, - {"vkCmdDrawIndexedIndirectCount", {kFuncTypeDev, (void*)CmdDrawIndexedIndirectCount}}, - {"vkCreateRenderPass2", {kFuncTypeDev, (void*)CreateRenderPass2}}, - {"vkCmdBeginRenderPass2", {kFuncTypeDev, (void*)CmdBeginRenderPass2}}, - {"vkCmdNextSubpass2", {kFuncTypeDev, (void*)CmdNextSubpass2}}, - {"vkCmdEndRenderPass2", {kFuncTypeDev, (void*)CmdEndRenderPass2}}, - {"vkResetQueryPool", {kFuncTypeDev, (void*)ResetQueryPool}}, - {"vkGetSemaphoreCounterValue", {kFuncTypeDev, (void*)GetSemaphoreCounterValue}}, - {"vkWaitSemaphores", {kFuncTypeDev, (void*)WaitSemaphores}}, - {"vkSignalSemaphore", {kFuncTypeDev, (void*)SignalSemaphore}}, - {"vkGetBufferDeviceAddress", {kFuncTypeDev, (void*)GetBufferDeviceAddress}}, - {"vkGetBufferOpaqueCaptureAddress", {kFuncTypeDev, (void*)GetBufferOpaqueCaptureAddress}}, - {"vkGetDeviceMemoryOpaqueCaptureAddress", {kFuncTypeDev, (void*)GetDeviceMemoryOpaqueCaptureAddress}}, - {"vkGetPhysicalDeviceToolProperties", {kFuncTypePdev, (void*)GetPhysicalDeviceToolProperties}}, - {"vkCreatePrivateDataSlot", {kFuncTypeDev, (void*)CreatePrivateDataSlot}}, - {"vkDestroyPrivateDataSlot", {kFuncTypeDev, (void*)DestroyPrivateDataSlot}}, - {"vkSetPrivateData", {kFuncTypeDev, (void*)SetPrivateData}}, - {"vkGetPrivateData", {kFuncTypeDev, (void*)GetPrivateData}}, - {"vkCmdSetEvent2", {kFuncTypeDev, (void*)CmdSetEvent2}}, - {"vkCmdResetEvent2", {kFuncTypeDev, (void*)CmdResetEvent2}}, - {"vkCmdWaitEvents2", {kFuncTypeDev, (void*)CmdWaitEvents2}}, - {"vkCmdPipelineBarrier2", {kFuncTypeDev, (void*)CmdPipelineBarrier2}}, - {"vkCmdWriteTimestamp2", {kFuncTypeDev, (void*)CmdWriteTimestamp2}}, - {"vkQueueSubmit2", {kFuncTypeDev, (void*)QueueSubmit2}}, - {"vkCmdCopyBuffer2", {kFuncTypeDev, (void*)CmdCopyBuffer2}}, - {"vkCmdCopyImage2", {kFuncTypeDev, (void*)CmdCopyImage2}}, - {"vkCmdCopyBufferToImage2", {kFuncTypeDev, (void*)CmdCopyBufferToImage2}}, - {"vkCmdCopyImageToBuffer2", {kFuncTypeDev, (void*)CmdCopyImageToBuffer2}}, - {"vkCmdBlitImage2", {kFuncTypeDev, (void*)CmdBlitImage2}}, - {"vkCmdResolveImage2", {kFuncTypeDev, (void*)CmdResolveImage2}}, - {"vkCmdBeginRendering", {kFuncTypeDev, (void*)CmdBeginRendering}}, - {"vkCmdEndRendering", {kFuncTypeDev, (void*)CmdEndRendering}}, - {"vkCmdSetCullMode", {kFuncTypeDev, (void*)CmdSetCullMode}}, - {"vkCmdSetFrontFace", {kFuncTypeDev, (void*)CmdSetFrontFace}}, - {"vkCmdSetPrimitiveTopology", {kFuncTypeDev, (void*)CmdSetPrimitiveTopology}}, - {"vkCmdSetViewportWithCount", {kFuncTypeDev, (void*)CmdSetViewportWithCount}}, - {"vkCmdSetScissorWithCount", {kFuncTypeDev, (void*)CmdSetScissorWithCount}}, - {"vkCmdBindVertexBuffers2", {kFuncTypeDev, (void*)CmdBindVertexBuffers2}}, - {"vkCmdSetDepthTestEnable", {kFuncTypeDev, (void*)CmdSetDepthTestEnable}}, - {"vkCmdSetDepthWriteEnable", {kFuncTypeDev, (void*)CmdSetDepthWriteEnable}}, - {"vkCmdSetDepthCompareOp", {kFuncTypeDev, (void*)CmdSetDepthCompareOp}}, - {"vkCmdSetDepthBoundsTestEnable", {kFuncTypeDev, (void*)CmdSetDepthBoundsTestEnable}}, - {"vkCmdSetStencilTestEnable", {kFuncTypeDev, (void*)CmdSetStencilTestEnable}}, - {"vkCmdSetStencilOp", {kFuncTypeDev, (void*)CmdSetStencilOp}}, - {"vkCmdSetRasterizerDiscardEnable", {kFuncTypeDev, (void*)CmdSetRasterizerDiscardEnable}}, - {"vkCmdSetDepthBiasEnable", {kFuncTypeDev, (void*)CmdSetDepthBiasEnable}}, - {"vkCmdSetPrimitiveRestartEnable", {kFuncTypeDev, (void*)CmdSetPrimitiveRestartEnable}}, - {"vkGetDeviceBufferMemoryRequirements", {kFuncTypeDev, (void*)GetDeviceBufferMemoryRequirements}}, - {"vkGetDeviceImageMemoryRequirements", {kFuncTypeDev, (void*)GetDeviceImageMemoryRequirements}}, - {"vkGetDeviceImageSparseMemoryRequirements", {kFuncTypeDev, (void*)GetDeviceImageSparseMemoryRequirements}}, - {"vkDestroySurfaceKHR", {kFuncTypeInst, (void*)DestroySurfaceKHR}}, - {"vkGetPhysicalDeviceSurfaceSupportKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceSurfaceSupportKHR}}, - {"vkGetPhysicalDeviceSurfaceCapabilitiesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceSurfaceCapabilitiesKHR}}, - {"vkGetPhysicalDeviceSurfaceFormatsKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceSurfaceFormatsKHR}}, - {"vkGetPhysicalDeviceSurfacePresentModesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceSurfacePresentModesKHR}}, - {"vkCreateSwapchainKHR", {kFuncTypeDev, (void*)CreateSwapchainKHR}}, - {"vkDestroySwapchainKHR", {kFuncTypeDev, (void*)DestroySwapchainKHR}}, - {"vkGetSwapchainImagesKHR", {kFuncTypeDev, (void*)GetSwapchainImagesKHR}}, - {"vkAcquireNextImageKHR", {kFuncTypeDev, (void*)AcquireNextImageKHR}}, - {"vkQueuePresentKHR", {kFuncTypeDev, (void*)QueuePresentKHR}}, - {"vkGetDeviceGroupPresentCapabilitiesKHR", {kFuncTypeDev, (void*)GetDeviceGroupPresentCapabilitiesKHR}}, - {"vkGetDeviceGroupSurfacePresentModesKHR", {kFuncTypeDev, (void*)GetDeviceGroupSurfacePresentModesKHR}}, - {"vkGetPhysicalDevicePresentRectanglesKHR", {kFuncTypePdev, (void*)GetPhysicalDevicePresentRectanglesKHR}}, - {"vkAcquireNextImage2KHR", {kFuncTypeDev, (void*)AcquireNextImage2KHR}}, - {"vkGetPhysicalDeviceDisplayPropertiesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceDisplayPropertiesKHR}}, - {"vkGetPhysicalDeviceDisplayPlanePropertiesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceDisplayPlanePropertiesKHR}}, - {"vkGetDisplayPlaneSupportedDisplaysKHR", {kFuncTypePdev, (void*)GetDisplayPlaneSupportedDisplaysKHR}}, - {"vkGetDisplayModePropertiesKHR", {kFuncTypePdev, (void*)GetDisplayModePropertiesKHR}}, - {"vkCreateDisplayModeKHR", {kFuncTypePdev, (void*)CreateDisplayModeKHR}}, - {"vkGetDisplayPlaneCapabilitiesKHR", {kFuncTypePdev, (void*)GetDisplayPlaneCapabilitiesKHR}}, - {"vkCreateDisplayPlaneSurfaceKHR", {kFuncTypeInst, (void*)CreateDisplayPlaneSurfaceKHR}}, - {"vkCreateSharedSwapchainsKHR", {kFuncTypeDev, (void*)CreateSharedSwapchainsKHR}}, + {"vk_layerGetPhysicalDeviceProcAddr", {kFuncTypeInst, (void*)GetPhysicalDeviceProcAddr}}, + {"vkCreateInstance", {kFuncTypeInst, (void*)CreateInstance}}, + {"vkDestroyInstance", {kFuncTypeInst, (void*)DestroyInstance}}, + {"vkEnumeratePhysicalDevices", {kFuncTypeInst, (void*)EnumeratePhysicalDevices}}, + {"vkGetPhysicalDeviceFeatures", {kFuncTypePdev, (void*)GetPhysicalDeviceFeatures}}, + {"vkGetPhysicalDeviceFormatProperties", {kFuncTypePdev, (void*)GetPhysicalDeviceFormatProperties}}, + {"vkGetPhysicalDeviceImageFormatProperties", {kFuncTypePdev, (void*)GetPhysicalDeviceImageFormatProperties}}, + {"vkGetPhysicalDeviceProperties", {kFuncTypePdev, (void*)GetPhysicalDeviceProperties}}, + {"vkGetPhysicalDeviceQueueFamilyProperties", {kFuncTypePdev, (void*)GetPhysicalDeviceQueueFamilyProperties}}, + {"vkGetPhysicalDeviceMemoryProperties", {kFuncTypePdev, (void*)GetPhysicalDeviceMemoryProperties}}, + {"vkGetInstanceProcAddr", {kFuncTypeInst, (void*)GetInstanceProcAddr}}, + {"vkGetDeviceProcAddr", {kFuncTypeDev, (void*)GetDeviceProcAddr}}, + {"vkCreateDevice", {kFuncTypePdev, (void*)CreateDevice}}, + {"vkDestroyDevice", {kFuncTypeDev, (void*)DestroyDevice}}, + {"vkEnumerateInstanceExtensionProperties", {kFuncTypeInst, (void*)EnumerateInstanceExtensionProperties}}, + {"vkEnumerateDeviceExtensionProperties", {kFuncTypePdev, (void*)EnumerateDeviceExtensionProperties}}, + {"vkEnumerateInstanceLayerProperties", {kFuncTypeInst, (void*)EnumerateInstanceLayerProperties}}, + {"vkEnumerateDeviceLayerProperties", {kFuncTypePdev, (void*)EnumerateDeviceLayerProperties}}, + {"vkGetDeviceQueue", {kFuncTypeDev, (void*)GetDeviceQueue}}, + {"vkQueueSubmit", {kFuncTypeDev, (void*)QueueSubmit}}, + {"vkQueueWaitIdle", {kFuncTypeDev, (void*)QueueWaitIdle}}, + {"vkDeviceWaitIdle", {kFuncTypeDev, (void*)DeviceWaitIdle}}, + {"vkAllocateMemory", {kFuncTypeDev, (void*)AllocateMemory}}, + {"vkFreeMemory", {kFuncTypeDev, (void*)FreeMemory}}, + {"vkMapMemory", {kFuncTypeDev, (void*)MapMemory}}, + {"vkUnmapMemory", {kFuncTypeDev, (void*)UnmapMemory}}, + {"vkFlushMappedMemoryRanges", {kFuncTypeDev, (void*)FlushMappedMemoryRanges}}, + {"vkInvalidateMappedMemoryRanges", {kFuncTypeDev, (void*)InvalidateMappedMemoryRanges}}, + {"vkGetDeviceMemoryCommitment", {kFuncTypeDev, (void*)GetDeviceMemoryCommitment}}, + {"vkBindBufferMemory", {kFuncTypeDev, (void*)BindBufferMemory}}, + {"vkBindImageMemory", {kFuncTypeDev, (void*)BindImageMemory}}, + {"vkGetBufferMemoryRequirements", {kFuncTypeDev, (void*)GetBufferMemoryRequirements}}, + {"vkGetImageMemoryRequirements", {kFuncTypeDev, (void*)GetImageMemoryRequirements}}, + {"vkGetImageSparseMemoryRequirements", {kFuncTypeDev, (void*)GetImageSparseMemoryRequirements}}, + {"vkGetPhysicalDeviceSparseImageFormatProperties", {kFuncTypePdev, (void*)GetPhysicalDeviceSparseImageFormatProperties}}, + {"vkQueueBindSparse", {kFuncTypeDev, (void*)QueueBindSparse}}, + {"vkCreateFence", {kFuncTypeDev, (void*)CreateFence}}, + {"vkDestroyFence", {kFuncTypeDev, (void*)DestroyFence}}, + {"vkResetFences", {kFuncTypeDev, (void*)ResetFences}}, + {"vkGetFenceStatus", {kFuncTypeDev, (void*)GetFenceStatus}}, + {"vkWaitForFences", {kFuncTypeDev, (void*)WaitForFences}}, + {"vkCreateSemaphore", {kFuncTypeDev, (void*)CreateSemaphore}}, + {"vkDestroySemaphore", {kFuncTypeDev, (void*)DestroySemaphore}}, + {"vkCreateEvent", {kFuncTypeDev, (void*)CreateEvent}}, + {"vkDestroyEvent", {kFuncTypeDev, (void*)DestroyEvent}}, + {"vkGetEventStatus", {kFuncTypeDev, (void*)GetEventStatus}}, + {"vkSetEvent", {kFuncTypeDev, (void*)SetEvent}}, + {"vkResetEvent", {kFuncTypeDev, (void*)ResetEvent}}, + {"vkCreateQueryPool", {kFuncTypeDev, (void*)CreateQueryPool}}, + {"vkDestroyQueryPool", {kFuncTypeDev, (void*)DestroyQueryPool}}, + {"vkGetQueryPoolResults", {kFuncTypeDev, (void*)GetQueryPoolResults}}, + {"vkCreateBuffer", {kFuncTypeDev, (void*)CreateBuffer}}, + {"vkDestroyBuffer", {kFuncTypeDev, (void*)DestroyBuffer}}, + {"vkCreateBufferView", {kFuncTypeDev, (void*)CreateBufferView}}, + {"vkDestroyBufferView", {kFuncTypeDev, (void*)DestroyBufferView}}, + {"vkCreateImage", {kFuncTypeDev, (void*)CreateImage}}, + {"vkDestroyImage", {kFuncTypeDev, (void*)DestroyImage}}, + {"vkGetImageSubresourceLayout", {kFuncTypeDev, (void*)GetImageSubresourceLayout}}, + {"vkCreateImageView", {kFuncTypeDev, (void*)CreateImageView}}, + {"vkDestroyImageView", {kFuncTypeDev, (void*)DestroyImageView}}, + {"vkCreateShaderModule", {kFuncTypeDev, (void*)CreateShaderModule}}, + {"vkDestroyShaderModule", {kFuncTypeDev, (void*)DestroyShaderModule}}, + {"vkCreatePipelineCache", {kFuncTypeDev, (void*)CreatePipelineCache}}, + {"vkDestroyPipelineCache", {kFuncTypeDev, (void*)DestroyPipelineCache}}, + {"vkGetPipelineCacheData", {kFuncTypeDev, (void*)GetPipelineCacheData}}, + {"vkMergePipelineCaches", {kFuncTypeDev, (void*)MergePipelineCaches}}, + {"vkCreateGraphicsPipelines", {kFuncTypeDev, (void*)CreateGraphicsPipelines}}, + {"vkCreateComputePipelines", {kFuncTypeDev, (void*)CreateComputePipelines}}, + {"vkDestroyPipeline", {kFuncTypeDev, (void*)DestroyPipeline}}, + {"vkCreatePipelineLayout", {kFuncTypeDev, (void*)CreatePipelineLayout}}, + {"vkDestroyPipelineLayout", {kFuncTypeDev, (void*)DestroyPipelineLayout}}, + {"vkCreateSampler", {kFuncTypeDev, (void*)CreateSampler}}, + {"vkDestroySampler", {kFuncTypeDev, (void*)DestroySampler}}, + {"vkCreateDescriptorSetLayout", {kFuncTypeDev, (void*)CreateDescriptorSetLayout}}, + {"vkDestroyDescriptorSetLayout", {kFuncTypeDev, (void*)DestroyDescriptorSetLayout}}, + {"vkCreateDescriptorPool", {kFuncTypeDev, (void*)CreateDescriptorPool}}, + {"vkDestroyDescriptorPool", {kFuncTypeDev, (void*)DestroyDescriptorPool}}, + {"vkResetDescriptorPool", {kFuncTypeDev, (void*)ResetDescriptorPool}}, + {"vkAllocateDescriptorSets", {kFuncTypeDev, (void*)AllocateDescriptorSets}}, + {"vkFreeDescriptorSets", {kFuncTypeDev, (void*)FreeDescriptorSets}}, + {"vkUpdateDescriptorSets", {kFuncTypeDev, (void*)UpdateDescriptorSets}}, + {"vkCreateFramebuffer", {kFuncTypeDev, (void*)CreateFramebuffer}}, + {"vkDestroyFramebuffer", {kFuncTypeDev, (void*)DestroyFramebuffer}}, + {"vkCreateRenderPass", {kFuncTypeDev, (void*)CreateRenderPass}}, + {"vkDestroyRenderPass", {kFuncTypeDev, (void*)DestroyRenderPass}}, + {"vkGetRenderAreaGranularity", {kFuncTypeDev, (void*)GetRenderAreaGranularity}}, + {"vkCreateCommandPool", {kFuncTypeDev, (void*)CreateCommandPool}}, + {"vkDestroyCommandPool", {kFuncTypeDev, (void*)DestroyCommandPool}}, + {"vkResetCommandPool", {kFuncTypeDev, (void*)ResetCommandPool}}, + {"vkAllocateCommandBuffers", {kFuncTypeDev, (void*)AllocateCommandBuffers}}, + {"vkFreeCommandBuffers", {kFuncTypeDev, (void*)FreeCommandBuffers}}, + {"vkBeginCommandBuffer", {kFuncTypeDev, (void*)BeginCommandBuffer}}, + {"vkEndCommandBuffer", {kFuncTypeDev, (void*)EndCommandBuffer}}, + {"vkResetCommandBuffer", {kFuncTypeDev, (void*)ResetCommandBuffer}}, + {"vkCmdBindPipeline", {kFuncTypeDev, (void*)CmdBindPipeline}}, + {"vkCmdSetViewport", {kFuncTypeDev, (void*)CmdSetViewport}}, + {"vkCmdSetScissor", {kFuncTypeDev, (void*)CmdSetScissor}}, + {"vkCmdSetLineWidth", {kFuncTypeDev, (void*)CmdSetLineWidth}}, + {"vkCmdSetDepthBias", {kFuncTypeDev, (void*)CmdSetDepthBias}}, + {"vkCmdSetBlendConstants", {kFuncTypeDev, (void*)CmdSetBlendConstants}}, + {"vkCmdSetDepthBounds", {kFuncTypeDev, (void*)CmdSetDepthBounds}}, + {"vkCmdSetStencilCompareMask", {kFuncTypeDev, (void*)CmdSetStencilCompareMask}}, + {"vkCmdSetStencilWriteMask", {kFuncTypeDev, (void*)CmdSetStencilWriteMask}}, + {"vkCmdSetStencilReference", {kFuncTypeDev, (void*)CmdSetStencilReference}}, + {"vkCmdBindDescriptorSets", {kFuncTypeDev, (void*)CmdBindDescriptorSets}}, + {"vkCmdBindIndexBuffer", {kFuncTypeDev, (void*)CmdBindIndexBuffer}}, + {"vkCmdBindVertexBuffers", {kFuncTypeDev, (void*)CmdBindVertexBuffers}}, + {"vkCmdDraw", {kFuncTypeDev, (void*)CmdDraw}}, + {"vkCmdDrawIndexed", {kFuncTypeDev, (void*)CmdDrawIndexed}}, + {"vkCmdDrawIndirect", {kFuncTypeDev, (void*)CmdDrawIndirect}}, + {"vkCmdDrawIndexedIndirect", {kFuncTypeDev, (void*)CmdDrawIndexedIndirect}}, + {"vkCmdDispatch", {kFuncTypeDev, (void*)CmdDispatch}}, + {"vkCmdDispatchIndirect", {kFuncTypeDev, (void*)CmdDispatchIndirect}}, + {"vkCmdCopyBuffer", {kFuncTypeDev, (void*)CmdCopyBuffer}}, + {"vkCmdCopyImage", {kFuncTypeDev, (void*)CmdCopyImage}}, + {"vkCmdBlitImage", {kFuncTypeDev, (void*)CmdBlitImage}}, + {"vkCmdCopyBufferToImage", {kFuncTypeDev, (void*)CmdCopyBufferToImage}}, + {"vkCmdCopyImageToBuffer", {kFuncTypeDev, (void*)CmdCopyImageToBuffer}}, + {"vkCmdUpdateBuffer", {kFuncTypeDev, (void*)CmdUpdateBuffer}}, + {"vkCmdFillBuffer", {kFuncTypeDev, (void*)CmdFillBuffer}}, + {"vkCmdClearColorImage", {kFuncTypeDev, (void*)CmdClearColorImage}}, + {"vkCmdClearDepthStencilImage", {kFuncTypeDev, (void*)CmdClearDepthStencilImage}}, + {"vkCmdClearAttachments", {kFuncTypeDev, (void*)CmdClearAttachments}}, + {"vkCmdResolveImage", {kFuncTypeDev, (void*)CmdResolveImage}}, + {"vkCmdSetEvent", {kFuncTypeDev, (void*)CmdSetEvent}}, + {"vkCmdResetEvent", {kFuncTypeDev, (void*)CmdResetEvent}}, + {"vkCmdWaitEvents", {kFuncTypeDev, (void*)CmdWaitEvents}}, + {"vkCmdPipelineBarrier", {kFuncTypeDev, (void*)CmdPipelineBarrier}}, + {"vkCmdBeginQuery", {kFuncTypeDev, (void*)CmdBeginQuery}}, + {"vkCmdEndQuery", {kFuncTypeDev, (void*)CmdEndQuery}}, + {"vkCmdResetQueryPool", {kFuncTypeDev, (void*)CmdResetQueryPool}}, + {"vkCmdWriteTimestamp", {kFuncTypeDev, (void*)CmdWriteTimestamp}}, + {"vkCmdCopyQueryPoolResults", {kFuncTypeDev, (void*)CmdCopyQueryPoolResults}}, + {"vkCmdPushConstants", {kFuncTypeDev, (void*)CmdPushConstants}}, + {"vkCmdBeginRenderPass", {kFuncTypeDev, (void*)CmdBeginRenderPass}}, + {"vkCmdNextSubpass", {kFuncTypeDev, (void*)CmdNextSubpass}}, + {"vkCmdEndRenderPass", {kFuncTypeDev, (void*)CmdEndRenderPass}}, + {"vkCmdExecuteCommands", {kFuncTypeDev, (void*)CmdExecuteCommands}}, + {"vkBindBufferMemory2", {kFuncTypeDev, (void*)BindBufferMemory2}}, + {"vkBindImageMemory2", {kFuncTypeDev, (void*)BindImageMemory2}}, + {"vkGetDeviceGroupPeerMemoryFeatures", {kFuncTypeDev, (void*)GetDeviceGroupPeerMemoryFeatures}}, + {"vkCmdSetDeviceMask", {kFuncTypeDev, (void*)CmdSetDeviceMask}}, + {"vkCmdDispatchBase", {kFuncTypeDev, (void*)CmdDispatchBase}}, + {"vkEnumeratePhysicalDeviceGroups", {kFuncTypeInst, (void*)EnumeratePhysicalDeviceGroups}}, + {"vkGetImageMemoryRequirements2", {kFuncTypeDev, (void*)GetImageMemoryRequirements2}}, + {"vkGetBufferMemoryRequirements2", {kFuncTypeDev, (void*)GetBufferMemoryRequirements2}}, + {"vkGetImageSparseMemoryRequirements2", {kFuncTypeDev, (void*)GetImageSparseMemoryRequirements2}}, + {"vkGetPhysicalDeviceFeatures2", {kFuncTypePdev, (void*)GetPhysicalDeviceFeatures2}}, + {"vkGetPhysicalDeviceProperties2", {kFuncTypePdev, (void*)GetPhysicalDeviceProperties2}}, + {"vkGetPhysicalDeviceFormatProperties2", {kFuncTypePdev, (void*)GetPhysicalDeviceFormatProperties2}}, + {"vkGetPhysicalDeviceImageFormatProperties2", {kFuncTypePdev, (void*)GetPhysicalDeviceImageFormatProperties2}}, + {"vkGetPhysicalDeviceQueueFamilyProperties2", {kFuncTypePdev, (void*)GetPhysicalDeviceQueueFamilyProperties2}}, + {"vkGetPhysicalDeviceMemoryProperties2", {kFuncTypePdev, (void*)GetPhysicalDeviceMemoryProperties2}}, + {"vkGetPhysicalDeviceSparseImageFormatProperties2", {kFuncTypePdev, (void*)GetPhysicalDeviceSparseImageFormatProperties2}}, + {"vkTrimCommandPool", {kFuncTypeDev, (void*)TrimCommandPool}}, + {"vkGetDeviceQueue2", {kFuncTypeDev, (void*)GetDeviceQueue2}}, + {"vkCreateSamplerYcbcrConversion", {kFuncTypeDev, (void*)CreateSamplerYcbcrConversion}}, + {"vkDestroySamplerYcbcrConversion", {kFuncTypeDev, (void*)DestroySamplerYcbcrConversion}}, + {"vkCreateDescriptorUpdateTemplate", {kFuncTypeDev, (void*)CreateDescriptorUpdateTemplate}}, + {"vkDestroyDescriptorUpdateTemplate", {kFuncTypeDev, (void*)DestroyDescriptorUpdateTemplate}}, + {"vkUpdateDescriptorSetWithTemplate", {kFuncTypeDev, (void*)UpdateDescriptorSetWithTemplate}}, + {"vkGetPhysicalDeviceExternalBufferProperties", {kFuncTypePdev, (void*)GetPhysicalDeviceExternalBufferProperties}}, + {"vkGetPhysicalDeviceExternalFenceProperties", {kFuncTypePdev, (void*)GetPhysicalDeviceExternalFenceProperties}}, + {"vkGetPhysicalDeviceExternalSemaphoreProperties", {kFuncTypePdev, (void*)GetPhysicalDeviceExternalSemaphoreProperties}}, + {"vkGetDescriptorSetLayoutSupport", {kFuncTypeDev, (void*)GetDescriptorSetLayoutSupport}}, + {"vkCmdDrawIndirectCount", {kFuncTypeDev, (void*)CmdDrawIndirectCount}}, + {"vkCmdDrawIndexedIndirectCount", {kFuncTypeDev, (void*)CmdDrawIndexedIndirectCount}}, + {"vkCreateRenderPass2", {kFuncTypeDev, (void*)CreateRenderPass2}}, + {"vkCmdBeginRenderPass2", {kFuncTypeDev, (void*)CmdBeginRenderPass2}}, + {"vkCmdNextSubpass2", {kFuncTypeDev, (void*)CmdNextSubpass2}}, + {"vkCmdEndRenderPass2", {kFuncTypeDev, (void*)CmdEndRenderPass2}}, + {"vkResetQueryPool", {kFuncTypeDev, (void*)ResetQueryPool}}, + {"vkGetSemaphoreCounterValue", {kFuncTypeDev, (void*)GetSemaphoreCounterValue}}, + {"vkWaitSemaphores", {kFuncTypeDev, (void*)WaitSemaphores}}, + {"vkSignalSemaphore", {kFuncTypeDev, (void*)SignalSemaphore}}, + {"vkGetBufferDeviceAddress", {kFuncTypeDev, (void*)GetBufferDeviceAddress}}, + {"vkGetBufferOpaqueCaptureAddress", {kFuncTypeDev, (void*)GetBufferOpaqueCaptureAddress}}, + {"vkGetDeviceMemoryOpaqueCaptureAddress", {kFuncTypeDev, (void*)GetDeviceMemoryOpaqueCaptureAddress}}, + {"vkGetPhysicalDeviceToolProperties", {kFuncTypePdev, (void*)GetPhysicalDeviceToolProperties}}, + {"vkCreatePrivateDataSlot", {kFuncTypeDev, (void*)CreatePrivateDataSlot}}, + {"vkDestroyPrivateDataSlot", {kFuncTypeDev, (void*)DestroyPrivateDataSlot}}, + {"vkSetPrivateData", {kFuncTypeDev, (void*)SetPrivateData}}, + {"vkGetPrivateData", {kFuncTypeDev, (void*)GetPrivateData}}, + {"vkCmdSetEvent2", {kFuncTypeDev, (void*)CmdSetEvent2}}, + {"vkCmdResetEvent2", {kFuncTypeDev, (void*)CmdResetEvent2}}, + {"vkCmdWaitEvents2", {kFuncTypeDev, (void*)CmdWaitEvents2}}, + {"vkCmdPipelineBarrier2", {kFuncTypeDev, (void*)CmdPipelineBarrier2}}, + {"vkCmdWriteTimestamp2", {kFuncTypeDev, (void*)CmdWriteTimestamp2}}, + {"vkQueueSubmit2", {kFuncTypeDev, (void*)QueueSubmit2}}, + {"vkCmdCopyBuffer2", {kFuncTypeDev, (void*)CmdCopyBuffer2}}, + {"vkCmdCopyImage2", {kFuncTypeDev, (void*)CmdCopyImage2}}, + {"vkCmdCopyBufferToImage2", {kFuncTypeDev, (void*)CmdCopyBufferToImage2}}, + {"vkCmdCopyImageToBuffer2", {kFuncTypeDev, (void*)CmdCopyImageToBuffer2}}, + {"vkCmdBlitImage2", {kFuncTypeDev, (void*)CmdBlitImage2}}, + {"vkCmdResolveImage2", {kFuncTypeDev, (void*)CmdResolveImage2}}, + {"vkCmdBeginRendering", {kFuncTypeDev, (void*)CmdBeginRendering}}, + {"vkCmdEndRendering", {kFuncTypeDev, (void*)CmdEndRendering}}, + {"vkCmdSetCullMode", {kFuncTypeDev, (void*)CmdSetCullMode}}, + {"vkCmdSetFrontFace", {kFuncTypeDev, (void*)CmdSetFrontFace}}, + {"vkCmdSetPrimitiveTopology", {kFuncTypeDev, (void*)CmdSetPrimitiveTopology}}, + {"vkCmdSetViewportWithCount", {kFuncTypeDev, (void*)CmdSetViewportWithCount}}, + {"vkCmdSetScissorWithCount", {kFuncTypeDev, (void*)CmdSetScissorWithCount}}, + {"vkCmdBindVertexBuffers2", {kFuncTypeDev, (void*)CmdBindVertexBuffers2}}, + {"vkCmdSetDepthTestEnable", {kFuncTypeDev, (void*)CmdSetDepthTestEnable}}, + {"vkCmdSetDepthWriteEnable", {kFuncTypeDev, (void*)CmdSetDepthWriteEnable}}, + {"vkCmdSetDepthCompareOp", {kFuncTypeDev, (void*)CmdSetDepthCompareOp}}, + {"vkCmdSetDepthBoundsTestEnable", {kFuncTypeDev, (void*)CmdSetDepthBoundsTestEnable}}, + {"vkCmdSetStencilTestEnable", {kFuncTypeDev, (void*)CmdSetStencilTestEnable}}, + {"vkCmdSetStencilOp", {kFuncTypeDev, (void*)CmdSetStencilOp}}, + {"vkCmdSetRasterizerDiscardEnable", {kFuncTypeDev, (void*)CmdSetRasterizerDiscardEnable}}, + {"vkCmdSetDepthBiasEnable", {kFuncTypeDev, (void*)CmdSetDepthBiasEnable}}, + {"vkCmdSetPrimitiveRestartEnable", {kFuncTypeDev, (void*)CmdSetPrimitiveRestartEnable}}, + {"vkGetDeviceBufferMemoryRequirements", {kFuncTypeDev, (void*)GetDeviceBufferMemoryRequirements}}, + {"vkGetDeviceImageMemoryRequirements", {kFuncTypeDev, (void*)GetDeviceImageMemoryRequirements}}, + {"vkGetDeviceImageSparseMemoryRequirements", {kFuncTypeDev, (void*)GetDeviceImageSparseMemoryRequirements}}, + {"vkDestroySurfaceKHR", {kFuncTypeInst, (void*)DestroySurfaceKHR}}, + {"vkGetPhysicalDeviceSurfaceSupportKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceSurfaceSupportKHR}}, + {"vkGetPhysicalDeviceSurfaceCapabilitiesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceSurfaceCapabilitiesKHR}}, + {"vkGetPhysicalDeviceSurfaceFormatsKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceSurfaceFormatsKHR}}, + {"vkGetPhysicalDeviceSurfacePresentModesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceSurfacePresentModesKHR}}, + {"vkCreateSwapchainKHR", {kFuncTypeDev, (void*)CreateSwapchainKHR}}, + {"vkDestroySwapchainKHR", {kFuncTypeDev, (void*)DestroySwapchainKHR}}, + {"vkGetSwapchainImagesKHR", {kFuncTypeDev, (void*)GetSwapchainImagesKHR}}, + {"vkAcquireNextImageKHR", {kFuncTypeDev, (void*)AcquireNextImageKHR}}, + {"vkQueuePresentKHR", {kFuncTypeDev, (void*)QueuePresentKHR}}, + {"vkGetDeviceGroupPresentCapabilitiesKHR", {kFuncTypeDev, (void*)GetDeviceGroupPresentCapabilitiesKHR}}, + {"vkGetDeviceGroupSurfacePresentModesKHR", {kFuncTypeDev, (void*)GetDeviceGroupSurfacePresentModesKHR}}, + {"vkGetPhysicalDevicePresentRectanglesKHR", {kFuncTypePdev, (void*)GetPhysicalDevicePresentRectanglesKHR}}, + {"vkAcquireNextImage2KHR", {kFuncTypeDev, (void*)AcquireNextImage2KHR}}, + {"vkGetPhysicalDeviceDisplayPropertiesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceDisplayPropertiesKHR}}, + {"vkGetPhysicalDeviceDisplayPlanePropertiesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceDisplayPlanePropertiesKHR}}, + {"vkGetDisplayPlaneSupportedDisplaysKHR", {kFuncTypePdev, (void*)GetDisplayPlaneSupportedDisplaysKHR}}, + {"vkGetDisplayModePropertiesKHR", {kFuncTypePdev, (void*)GetDisplayModePropertiesKHR}}, + {"vkCreateDisplayModeKHR", {kFuncTypePdev, (void*)CreateDisplayModeKHR}}, + {"vkGetDisplayPlaneCapabilitiesKHR", {kFuncTypePdev, (void*)GetDisplayPlaneCapabilitiesKHR}}, + {"vkCreateDisplayPlaneSurfaceKHR", {kFuncTypeInst, (void*)CreateDisplayPlaneSurfaceKHR}}, + {"vkCreateSharedSwapchainsKHR", {kFuncTypeDev, (void*)CreateSharedSwapchainsKHR}}, #ifdef VK_USE_PLATFORM_XLIB_KHR - {"vkCreateXlibSurfaceKHR", {kFuncTypeInst, (void*)CreateXlibSurfaceKHR}}, - {"vkGetPhysicalDeviceXlibPresentationSupportKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceXlibPresentationSupportKHR}}, + {"vkCreateXlibSurfaceKHR", {kFuncTypeInst, (void*)CreateXlibSurfaceKHR}}, + {"vkGetPhysicalDeviceXlibPresentationSupportKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceXlibPresentationSupportKHR}}, #endif // VK_USE_PLATFORM_XLIB_KHR #ifdef VK_USE_PLATFORM_XCB_KHR - {"vkCreateXcbSurfaceKHR", {kFuncTypeInst, (void*)CreateXcbSurfaceKHR}}, - {"vkGetPhysicalDeviceXcbPresentationSupportKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceXcbPresentationSupportKHR}}, + {"vkCreateXcbSurfaceKHR", {kFuncTypeInst, (void*)CreateXcbSurfaceKHR}}, + {"vkGetPhysicalDeviceXcbPresentationSupportKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceXcbPresentationSupportKHR}}, #endif // VK_USE_PLATFORM_XCB_KHR #ifdef VK_USE_PLATFORM_WAYLAND_KHR - {"vkCreateWaylandSurfaceKHR", {kFuncTypeInst, (void*)CreateWaylandSurfaceKHR}}, - {"vkGetPhysicalDeviceWaylandPresentationSupportKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceWaylandPresentationSupportKHR}}, + {"vkCreateWaylandSurfaceKHR", {kFuncTypeInst, (void*)CreateWaylandSurfaceKHR}}, + {"vkGetPhysicalDeviceWaylandPresentationSupportKHR", + {kFuncTypePdev, (void*)GetPhysicalDeviceWaylandPresentationSupportKHR}}, #endif // VK_USE_PLATFORM_WAYLAND_KHR #ifdef VK_USE_PLATFORM_ANDROID_KHR - {"vkCreateAndroidSurfaceKHR", {kFuncTypeInst, (void*)CreateAndroidSurfaceKHR}}, + {"vkCreateAndroidSurfaceKHR", {kFuncTypeInst, (void*)CreateAndroidSurfaceKHR}}, #endif // VK_USE_PLATFORM_ANDROID_KHR #ifdef VK_USE_PLATFORM_WIN32_KHR - {"vkCreateWin32SurfaceKHR", {kFuncTypeInst, (void*)CreateWin32SurfaceKHR}}, - {"vkGetPhysicalDeviceWin32PresentationSupportKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceWin32PresentationSupportKHR}}, + {"vkCreateWin32SurfaceKHR", {kFuncTypeInst, (void*)CreateWin32SurfaceKHR}}, + {"vkGetPhysicalDeviceWin32PresentationSupportKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceWin32PresentationSupportKHR}}, #endif // VK_USE_PLATFORM_WIN32_KHR - {"vkGetPhysicalDeviceVideoCapabilitiesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceVideoCapabilitiesKHR}}, - {"vkGetPhysicalDeviceVideoFormatPropertiesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceVideoFormatPropertiesKHR}}, - {"vkCreateVideoSessionKHR", {kFuncTypeDev, (void*)CreateVideoSessionKHR}}, - {"vkDestroyVideoSessionKHR", {kFuncTypeDev, (void*)DestroyVideoSessionKHR}}, - {"vkGetVideoSessionMemoryRequirementsKHR", {kFuncTypeDev, (void*)GetVideoSessionMemoryRequirementsKHR}}, - {"vkBindVideoSessionMemoryKHR", {kFuncTypeDev, (void*)BindVideoSessionMemoryKHR}}, - {"vkCreateVideoSessionParametersKHR", {kFuncTypeDev, (void*)CreateVideoSessionParametersKHR}}, - {"vkUpdateVideoSessionParametersKHR", {kFuncTypeDev, (void*)UpdateVideoSessionParametersKHR}}, - {"vkDestroyVideoSessionParametersKHR", {kFuncTypeDev, (void*)DestroyVideoSessionParametersKHR}}, - {"vkCmdBeginVideoCodingKHR", {kFuncTypeDev, (void*)CmdBeginVideoCodingKHR}}, - {"vkCmdEndVideoCodingKHR", {kFuncTypeDev, (void*)CmdEndVideoCodingKHR}}, - {"vkCmdControlVideoCodingKHR", {kFuncTypeDev, (void*)CmdControlVideoCodingKHR}}, - {"vkCmdDecodeVideoKHR", {kFuncTypeDev, (void*)CmdDecodeVideoKHR}}, - {"vkCmdBeginRenderingKHR", {kFuncTypeDev, (void*)CmdBeginRenderingKHR}}, - {"vkCmdEndRenderingKHR", {kFuncTypeDev, (void*)CmdEndRenderingKHR}}, - {"vkGetPhysicalDeviceFeatures2KHR", {kFuncTypePdev, (void*)GetPhysicalDeviceFeatures2KHR}}, - {"vkGetPhysicalDeviceProperties2KHR", {kFuncTypePdev, (void*)GetPhysicalDeviceProperties2KHR}}, - {"vkGetPhysicalDeviceFormatProperties2KHR", {kFuncTypePdev, (void*)GetPhysicalDeviceFormatProperties2KHR}}, - {"vkGetPhysicalDeviceImageFormatProperties2KHR", {kFuncTypePdev, (void*)GetPhysicalDeviceImageFormatProperties2KHR}}, - {"vkGetPhysicalDeviceQueueFamilyProperties2KHR", {kFuncTypePdev, (void*)GetPhysicalDeviceQueueFamilyProperties2KHR}}, - {"vkGetPhysicalDeviceMemoryProperties2KHR", {kFuncTypePdev, (void*)GetPhysicalDeviceMemoryProperties2KHR}}, - {"vkGetPhysicalDeviceSparseImageFormatProperties2KHR", {kFuncTypePdev, (void*)GetPhysicalDeviceSparseImageFormatProperties2KHR}}, - {"vkGetDeviceGroupPeerMemoryFeaturesKHR", {kFuncTypeDev, (void*)GetDeviceGroupPeerMemoryFeaturesKHR}}, - {"vkCmdSetDeviceMaskKHR", {kFuncTypeDev, (void*)CmdSetDeviceMaskKHR}}, - {"vkCmdDispatchBaseKHR", {kFuncTypeDev, (void*)CmdDispatchBaseKHR}}, - {"vkTrimCommandPoolKHR", {kFuncTypeDev, (void*)TrimCommandPoolKHR}}, - {"vkEnumeratePhysicalDeviceGroupsKHR", {kFuncTypeInst, (void*)EnumeratePhysicalDeviceGroupsKHR}}, - {"vkGetPhysicalDeviceExternalBufferPropertiesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceExternalBufferPropertiesKHR}}, + {"vkGetPhysicalDeviceVideoCapabilitiesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceVideoCapabilitiesKHR}}, + {"vkGetPhysicalDeviceVideoFormatPropertiesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceVideoFormatPropertiesKHR}}, + {"vkCreateVideoSessionKHR", {kFuncTypeDev, (void*)CreateVideoSessionKHR}}, + {"vkDestroyVideoSessionKHR", {kFuncTypeDev, (void*)DestroyVideoSessionKHR}}, + {"vkGetVideoSessionMemoryRequirementsKHR", {kFuncTypeDev, (void*)GetVideoSessionMemoryRequirementsKHR}}, + {"vkBindVideoSessionMemoryKHR", {kFuncTypeDev, (void*)BindVideoSessionMemoryKHR}}, + {"vkCreateVideoSessionParametersKHR", {kFuncTypeDev, (void*)CreateVideoSessionParametersKHR}}, + {"vkUpdateVideoSessionParametersKHR", {kFuncTypeDev, (void*)UpdateVideoSessionParametersKHR}}, + {"vkDestroyVideoSessionParametersKHR", {kFuncTypeDev, (void*)DestroyVideoSessionParametersKHR}}, + {"vkCmdBeginVideoCodingKHR", {kFuncTypeDev, (void*)CmdBeginVideoCodingKHR}}, + {"vkCmdEndVideoCodingKHR", {kFuncTypeDev, (void*)CmdEndVideoCodingKHR}}, + {"vkCmdControlVideoCodingKHR", {kFuncTypeDev, (void*)CmdControlVideoCodingKHR}}, + {"vkCmdDecodeVideoKHR", {kFuncTypeDev, (void*)CmdDecodeVideoKHR}}, + {"vkCmdBeginRenderingKHR", {kFuncTypeDev, (void*)CmdBeginRenderingKHR}}, + {"vkCmdEndRenderingKHR", {kFuncTypeDev, (void*)CmdEndRenderingKHR}}, + {"vkGetPhysicalDeviceFeatures2KHR", {kFuncTypePdev, (void*)GetPhysicalDeviceFeatures2KHR}}, + {"vkGetPhysicalDeviceProperties2KHR", {kFuncTypePdev, (void*)GetPhysicalDeviceProperties2KHR}}, + {"vkGetPhysicalDeviceFormatProperties2KHR", {kFuncTypePdev, (void*)GetPhysicalDeviceFormatProperties2KHR}}, + {"vkGetPhysicalDeviceImageFormatProperties2KHR", {kFuncTypePdev, (void*)GetPhysicalDeviceImageFormatProperties2KHR}}, + {"vkGetPhysicalDeviceQueueFamilyProperties2KHR", {kFuncTypePdev, (void*)GetPhysicalDeviceQueueFamilyProperties2KHR}}, + {"vkGetPhysicalDeviceMemoryProperties2KHR", {kFuncTypePdev, (void*)GetPhysicalDeviceMemoryProperties2KHR}}, + {"vkGetPhysicalDeviceSparseImageFormatProperties2KHR", + {kFuncTypePdev, (void*)GetPhysicalDeviceSparseImageFormatProperties2KHR}}, + {"vkGetDeviceGroupPeerMemoryFeaturesKHR", {kFuncTypeDev, (void*)GetDeviceGroupPeerMemoryFeaturesKHR}}, + {"vkCmdSetDeviceMaskKHR", {kFuncTypeDev, (void*)CmdSetDeviceMaskKHR}}, + {"vkCmdDispatchBaseKHR", {kFuncTypeDev, (void*)CmdDispatchBaseKHR}}, + {"vkTrimCommandPoolKHR", {kFuncTypeDev, (void*)TrimCommandPoolKHR}}, + {"vkEnumeratePhysicalDeviceGroupsKHR", {kFuncTypeInst, (void*)EnumeratePhysicalDeviceGroupsKHR}}, + {"vkGetPhysicalDeviceExternalBufferPropertiesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceExternalBufferPropertiesKHR}}, #ifdef VK_USE_PLATFORM_WIN32_KHR - {"vkGetMemoryWin32HandleKHR", {kFuncTypeDev, (void*)GetMemoryWin32HandleKHR}}, - {"vkGetMemoryWin32HandlePropertiesKHR", {kFuncTypeDev, (void*)GetMemoryWin32HandlePropertiesKHR}}, + {"vkGetMemoryWin32HandleKHR", {kFuncTypeDev, (void*)GetMemoryWin32HandleKHR}}, + {"vkGetMemoryWin32HandlePropertiesKHR", {kFuncTypeDev, (void*)GetMemoryWin32HandlePropertiesKHR}}, #endif // VK_USE_PLATFORM_WIN32_KHR - {"vkGetMemoryFdKHR", {kFuncTypeDev, (void*)GetMemoryFdKHR}}, - {"vkGetMemoryFdPropertiesKHR", {kFuncTypeDev, (void*)GetMemoryFdPropertiesKHR}}, - {"vkGetPhysicalDeviceExternalSemaphorePropertiesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceExternalSemaphorePropertiesKHR}}, + {"vkGetMemoryFdKHR", {kFuncTypeDev, (void*)GetMemoryFdKHR}}, + {"vkGetMemoryFdPropertiesKHR", {kFuncTypeDev, (void*)GetMemoryFdPropertiesKHR}}, + {"vkGetPhysicalDeviceExternalSemaphorePropertiesKHR", + {kFuncTypePdev, (void*)GetPhysicalDeviceExternalSemaphorePropertiesKHR}}, #ifdef VK_USE_PLATFORM_WIN32_KHR - {"vkImportSemaphoreWin32HandleKHR", {kFuncTypeDev, (void*)ImportSemaphoreWin32HandleKHR}}, - {"vkGetSemaphoreWin32HandleKHR", {kFuncTypeDev, (void*)GetSemaphoreWin32HandleKHR}}, + {"vkImportSemaphoreWin32HandleKHR", {kFuncTypeDev, (void*)ImportSemaphoreWin32HandleKHR}}, + {"vkGetSemaphoreWin32HandleKHR", {kFuncTypeDev, (void*)GetSemaphoreWin32HandleKHR}}, #endif // VK_USE_PLATFORM_WIN32_KHR - {"vkImportSemaphoreFdKHR", {kFuncTypeDev, (void*)ImportSemaphoreFdKHR}}, - {"vkGetSemaphoreFdKHR", {kFuncTypeDev, (void*)GetSemaphoreFdKHR}}, - {"vkCmdPushDescriptorSetKHR", {kFuncTypeDev, (void*)CmdPushDescriptorSetKHR}}, - {"vkCmdPushDescriptorSetWithTemplateKHR", {kFuncTypeDev, (void*)CmdPushDescriptorSetWithTemplateKHR}}, - {"vkCreateDescriptorUpdateTemplateKHR", {kFuncTypeDev, (void*)CreateDescriptorUpdateTemplateKHR}}, - {"vkDestroyDescriptorUpdateTemplateKHR", {kFuncTypeDev, (void*)DestroyDescriptorUpdateTemplateKHR}}, - {"vkUpdateDescriptorSetWithTemplateKHR", {kFuncTypeDev, (void*)UpdateDescriptorSetWithTemplateKHR}}, - {"vkCreateRenderPass2KHR", {kFuncTypeDev, (void*)CreateRenderPass2KHR}}, - {"vkCmdBeginRenderPass2KHR", {kFuncTypeDev, (void*)CmdBeginRenderPass2KHR}}, - {"vkCmdNextSubpass2KHR", {kFuncTypeDev, (void*)CmdNextSubpass2KHR}}, - {"vkCmdEndRenderPass2KHR", {kFuncTypeDev, (void*)CmdEndRenderPass2KHR}}, - {"vkGetSwapchainStatusKHR", {kFuncTypeDev, (void*)GetSwapchainStatusKHR}}, - {"vkGetPhysicalDeviceExternalFencePropertiesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceExternalFencePropertiesKHR}}, + {"vkImportSemaphoreFdKHR", {kFuncTypeDev, (void*)ImportSemaphoreFdKHR}}, + {"vkGetSemaphoreFdKHR", {kFuncTypeDev, (void*)GetSemaphoreFdKHR}}, + {"vkCmdPushDescriptorSetKHR", {kFuncTypeDev, (void*)CmdPushDescriptorSetKHR}}, + {"vkCmdPushDescriptorSetWithTemplateKHR", {kFuncTypeDev, (void*)CmdPushDescriptorSetWithTemplateKHR}}, + {"vkCreateDescriptorUpdateTemplateKHR", {kFuncTypeDev, (void*)CreateDescriptorUpdateTemplateKHR}}, + {"vkDestroyDescriptorUpdateTemplateKHR", {kFuncTypeDev, (void*)DestroyDescriptorUpdateTemplateKHR}}, + {"vkUpdateDescriptorSetWithTemplateKHR", {kFuncTypeDev, (void*)UpdateDescriptorSetWithTemplateKHR}}, + {"vkCreateRenderPass2KHR", {kFuncTypeDev, (void*)CreateRenderPass2KHR}}, + {"vkCmdBeginRenderPass2KHR", {kFuncTypeDev, (void*)CmdBeginRenderPass2KHR}}, + {"vkCmdNextSubpass2KHR", {kFuncTypeDev, (void*)CmdNextSubpass2KHR}}, + {"vkCmdEndRenderPass2KHR", {kFuncTypeDev, (void*)CmdEndRenderPass2KHR}}, + {"vkGetSwapchainStatusKHR", {kFuncTypeDev, (void*)GetSwapchainStatusKHR}}, + {"vkGetPhysicalDeviceExternalFencePropertiesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceExternalFencePropertiesKHR}}, #ifdef VK_USE_PLATFORM_WIN32_KHR - {"vkImportFenceWin32HandleKHR", {kFuncTypeDev, (void*)ImportFenceWin32HandleKHR}}, - {"vkGetFenceWin32HandleKHR", {kFuncTypeDev, (void*)GetFenceWin32HandleKHR}}, + {"vkImportFenceWin32HandleKHR", {kFuncTypeDev, (void*)ImportFenceWin32HandleKHR}}, + {"vkGetFenceWin32HandleKHR", {kFuncTypeDev, (void*)GetFenceWin32HandleKHR}}, #endif // VK_USE_PLATFORM_WIN32_KHR - {"vkImportFenceFdKHR", {kFuncTypeDev, (void*)ImportFenceFdKHR}}, - {"vkGetFenceFdKHR", {kFuncTypeDev, (void*)GetFenceFdKHR}}, - {"vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR", {kFuncTypePdev, (void*)EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR}}, - {"vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR}}, - {"vkAcquireProfilingLockKHR", {kFuncTypeDev, (void*)AcquireProfilingLockKHR}}, - {"vkReleaseProfilingLockKHR", {kFuncTypeDev, (void*)ReleaseProfilingLockKHR}}, - {"vkGetPhysicalDeviceSurfaceCapabilities2KHR", {kFuncTypePdev, (void*)GetPhysicalDeviceSurfaceCapabilities2KHR}}, - {"vkGetPhysicalDeviceSurfaceFormats2KHR", {kFuncTypePdev, (void*)GetPhysicalDeviceSurfaceFormats2KHR}}, - {"vkGetPhysicalDeviceDisplayProperties2KHR", {kFuncTypePdev, (void*)GetPhysicalDeviceDisplayProperties2KHR}}, - {"vkGetPhysicalDeviceDisplayPlaneProperties2KHR", {kFuncTypePdev, (void*)GetPhysicalDeviceDisplayPlaneProperties2KHR}}, - {"vkGetDisplayModeProperties2KHR", {kFuncTypePdev, (void*)GetDisplayModeProperties2KHR}}, - {"vkGetDisplayPlaneCapabilities2KHR", {kFuncTypePdev, (void*)GetDisplayPlaneCapabilities2KHR}}, - {"vkGetImageMemoryRequirements2KHR", {kFuncTypeDev, (void*)GetImageMemoryRequirements2KHR}}, - {"vkGetBufferMemoryRequirements2KHR", {kFuncTypeDev, (void*)GetBufferMemoryRequirements2KHR}}, - {"vkGetImageSparseMemoryRequirements2KHR", {kFuncTypeDev, (void*)GetImageSparseMemoryRequirements2KHR}}, - {"vkCreateSamplerYcbcrConversionKHR", {kFuncTypeDev, (void*)CreateSamplerYcbcrConversionKHR}}, - {"vkDestroySamplerYcbcrConversionKHR", {kFuncTypeDev, (void*)DestroySamplerYcbcrConversionKHR}}, - {"vkBindBufferMemory2KHR", {kFuncTypeDev, (void*)BindBufferMemory2KHR}}, - {"vkBindImageMemory2KHR", {kFuncTypeDev, (void*)BindImageMemory2KHR}}, - {"vkGetDescriptorSetLayoutSupportKHR", {kFuncTypeDev, (void*)GetDescriptorSetLayoutSupportKHR}}, - {"vkCmdDrawIndirectCountKHR", {kFuncTypeDev, (void*)CmdDrawIndirectCountKHR}}, - {"vkCmdDrawIndexedIndirectCountKHR", {kFuncTypeDev, (void*)CmdDrawIndexedIndirectCountKHR}}, - {"vkGetSemaphoreCounterValueKHR", {kFuncTypeDev, (void*)GetSemaphoreCounterValueKHR}}, - {"vkWaitSemaphoresKHR", {kFuncTypeDev, (void*)WaitSemaphoresKHR}}, - {"vkSignalSemaphoreKHR", {kFuncTypeDev, (void*)SignalSemaphoreKHR}}, - {"vkGetPhysicalDeviceFragmentShadingRatesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceFragmentShadingRatesKHR}}, - {"vkCmdSetFragmentShadingRateKHR", {kFuncTypeDev, (void*)CmdSetFragmentShadingRateKHR}}, - {"vkCmdSetRenderingAttachmentLocationsKHR", {kFuncTypeDev, (void*)CmdSetRenderingAttachmentLocationsKHR}}, - {"vkCmdSetRenderingInputAttachmentIndicesKHR", {kFuncTypeDev, (void*)CmdSetRenderingInputAttachmentIndicesKHR}}, - {"vkWaitForPresentKHR", {kFuncTypeDev, (void*)WaitForPresentKHR}}, - {"vkGetBufferDeviceAddressKHR", {kFuncTypeDev, (void*)GetBufferDeviceAddressKHR}}, - {"vkGetBufferOpaqueCaptureAddressKHR", {kFuncTypeDev, (void*)GetBufferOpaqueCaptureAddressKHR}}, - {"vkGetDeviceMemoryOpaqueCaptureAddressKHR", {kFuncTypeDev, (void*)GetDeviceMemoryOpaqueCaptureAddressKHR}}, - {"vkCreateDeferredOperationKHR", {kFuncTypeDev, (void*)CreateDeferredOperationKHR}}, - {"vkDestroyDeferredOperationKHR", {kFuncTypeDev, (void*)DestroyDeferredOperationKHR}}, - {"vkGetDeferredOperationMaxConcurrencyKHR", {kFuncTypeDev, (void*)GetDeferredOperationMaxConcurrencyKHR}}, - {"vkGetDeferredOperationResultKHR", {kFuncTypeDev, (void*)GetDeferredOperationResultKHR}}, - {"vkDeferredOperationJoinKHR", {kFuncTypeDev, (void*)DeferredOperationJoinKHR}}, - {"vkGetPipelineExecutablePropertiesKHR", {kFuncTypeDev, (void*)GetPipelineExecutablePropertiesKHR}}, - {"vkGetPipelineExecutableStatisticsKHR", {kFuncTypeDev, (void*)GetPipelineExecutableStatisticsKHR}}, - {"vkGetPipelineExecutableInternalRepresentationsKHR", {kFuncTypeDev, (void*)GetPipelineExecutableInternalRepresentationsKHR}}, - {"vkMapMemory2KHR", {kFuncTypeDev, (void*)MapMemory2KHR}}, - {"vkUnmapMemory2KHR", {kFuncTypeDev, (void*)UnmapMemory2KHR}}, - {"vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR}}, - {"vkGetEncodedVideoSessionParametersKHR", {kFuncTypeDev, (void*)GetEncodedVideoSessionParametersKHR}}, - {"vkCmdEncodeVideoKHR", {kFuncTypeDev, (void*)CmdEncodeVideoKHR}}, - {"vkCmdSetEvent2KHR", {kFuncTypeDev, (void*)CmdSetEvent2KHR}}, - {"vkCmdResetEvent2KHR", {kFuncTypeDev, (void*)CmdResetEvent2KHR}}, - {"vkCmdWaitEvents2KHR", {kFuncTypeDev, (void*)CmdWaitEvents2KHR}}, - {"vkCmdPipelineBarrier2KHR", {kFuncTypeDev, (void*)CmdPipelineBarrier2KHR}}, - {"vkCmdWriteTimestamp2KHR", {kFuncTypeDev, (void*)CmdWriteTimestamp2KHR}}, - {"vkQueueSubmit2KHR", {kFuncTypeDev, (void*)QueueSubmit2KHR}}, - {"vkCmdCopyBuffer2KHR", {kFuncTypeDev, (void*)CmdCopyBuffer2KHR}}, - {"vkCmdCopyImage2KHR", {kFuncTypeDev, (void*)CmdCopyImage2KHR}}, - {"vkCmdCopyBufferToImage2KHR", {kFuncTypeDev, (void*)CmdCopyBufferToImage2KHR}}, - {"vkCmdCopyImageToBuffer2KHR", {kFuncTypeDev, (void*)CmdCopyImageToBuffer2KHR}}, - {"vkCmdBlitImage2KHR", {kFuncTypeDev, (void*)CmdBlitImage2KHR}}, - {"vkCmdResolveImage2KHR", {kFuncTypeDev, (void*)CmdResolveImage2KHR}}, - {"vkCmdTraceRaysIndirect2KHR", {kFuncTypeDev, (void*)CmdTraceRaysIndirect2KHR}}, - {"vkGetDeviceBufferMemoryRequirementsKHR", {kFuncTypeDev, (void*)GetDeviceBufferMemoryRequirementsKHR}}, - {"vkGetDeviceImageMemoryRequirementsKHR", {kFuncTypeDev, (void*)GetDeviceImageMemoryRequirementsKHR}}, - {"vkGetDeviceImageSparseMemoryRequirementsKHR", {kFuncTypeDev, (void*)GetDeviceImageSparseMemoryRequirementsKHR}}, - {"vkCmdBindIndexBuffer2KHR", {kFuncTypeDev, (void*)CmdBindIndexBuffer2KHR}}, - {"vkGetRenderingAreaGranularityKHR", {kFuncTypeDev, (void*)GetRenderingAreaGranularityKHR}}, - {"vkGetDeviceImageSubresourceLayoutKHR", {kFuncTypeDev, (void*)GetDeviceImageSubresourceLayoutKHR}}, - {"vkGetImageSubresourceLayout2KHR", {kFuncTypeDev, (void*)GetImageSubresourceLayout2KHR}}, - {"vkCreatePipelineBinariesKHR", {kFuncTypeDev, (void*)CreatePipelineBinariesKHR}}, - {"vkDestroyPipelineBinaryKHR", {kFuncTypeDev, (void*)DestroyPipelineBinaryKHR}}, - {"vkGetPipelineKeyKHR", {kFuncTypeDev, (void*)GetPipelineKeyKHR}}, - {"vkGetPipelineBinaryDataKHR", {kFuncTypeDev, (void*)GetPipelineBinaryDataKHR}}, - {"vkReleaseCapturedPipelineDataKHR", {kFuncTypeDev, (void*)ReleaseCapturedPipelineDataKHR}}, - {"vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceCooperativeMatrixPropertiesKHR}}, - {"vkCmdSetLineStippleKHR", {kFuncTypeDev, (void*)CmdSetLineStippleKHR}}, - {"vkGetPhysicalDeviceCalibrateableTimeDomainsKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceCalibrateableTimeDomainsKHR}}, - {"vkGetCalibratedTimestampsKHR", {kFuncTypeDev, (void*)GetCalibratedTimestampsKHR}}, - {"vkCmdBindDescriptorSets2KHR", {kFuncTypeDev, (void*)CmdBindDescriptorSets2KHR}}, - {"vkCmdPushConstants2KHR", {kFuncTypeDev, (void*)CmdPushConstants2KHR}}, - {"vkCmdPushDescriptorSet2KHR", {kFuncTypeDev, (void*)CmdPushDescriptorSet2KHR}}, - {"vkCmdPushDescriptorSetWithTemplate2KHR", {kFuncTypeDev, (void*)CmdPushDescriptorSetWithTemplate2KHR}}, - {"vkCmdSetDescriptorBufferOffsets2EXT", {kFuncTypeDev, (void*)CmdSetDescriptorBufferOffsets2EXT}}, - {"vkCmdBindDescriptorBufferEmbeddedSamplers2EXT", {kFuncTypeDev, (void*)CmdBindDescriptorBufferEmbeddedSamplers2EXT}}, - {"vkCreateDebugReportCallbackEXT", {kFuncTypeInst, (void*)CreateDebugReportCallbackEXT}}, - {"vkDestroyDebugReportCallbackEXT", {kFuncTypeInst, (void*)DestroyDebugReportCallbackEXT}}, - {"vkDebugReportMessageEXT", {kFuncTypeInst, (void*)DebugReportMessageEXT}}, - {"vkDebugMarkerSetObjectTagEXT", {kFuncTypeDev, (void*)DebugMarkerSetObjectTagEXT}}, - {"vkDebugMarkerSetObjectNameEXT", {kFuncTypeDev, (void*)DebugMarkerSetObjectNameEXT}}, - {"vkCmdDebugMarkerBeginEXT", {kFuncTypeDev, (void*)CmdDebugMarkerBeginEXT}}, - {"vkCmdDebugMarkerEndEXT", {kFuncTypeDev, (void*)CmdDebugMarkerEndEXT}}, - {"vkCmdDebugMarkerInsertEXT", {kFuncTypeDev, (void*)CmdDebugMarkerInsertEXT}}, - {"vkCmdBindTransformFeedbackBuffersEXT", {kFuncTypeDev, (void*)CmdBindTransformFeedbackBuffersEXT}}, - {"vkCmdBeginTransformFeedbackEXT", {kFuncTypeDev, (void*)CmdBeginTransformFeedbackEXT}}, - {"vkCmdEndTransformFeedbackEXT", {kFuncTypeDev, (void*)CmdEndTransformFeedbackEXT}}, - {"vkCmdBeginQueryIndexedEXT", {kFuncTypeDev, (void*)CmdBeginQueryIndexedEXT}}, - {"vkCmdEndQueryIndexedEXT", {kFuncTypeDev, (void*)CmdEndQueryIndexedEXT}}, - {"vkCmdDrawIndirectByteCountEXT", {kFuncTypeDev, (void*)CmdDrawIndirectByteCountEXT}}, - {"vkCreateCuModuleNVX", {kFuncTypeDev, (void*)CreateCuModuleNVX}}, - {"vkCreateCuFunctionNVX", {kFuncTypeDev, (void*)CreateCuFunctionNVX}}, - {"vkDestroyCuModuleNVX", {kFuncTypeDev, (void*)DestroyCuModuleNVX}}, - {"vkDestroyCuFunctionNVX", {kFuncTypeDev, (void*)DestroyCuFunctionNVX}}, - {"vkCmdCuLaunchKernelNVX", {kFuncTypeDev, (void*)CmdCuLaunchKernelNVX}}, - {"vkGetImageViewHandleNVX", {kFuncTypeDev, (void*)GetImageViewHandleNVX}}, - {"vkGetImageViewHandle64NVX", {kFuncTypeDev, (void*)GetImageViewHandle64NVX}}, - {"vkGetImageViewAddressNVX", {kFuncTypeDev, (void*)GetImageViewAddressNVX}}, - {"vkCmdDrawIndirectCountAMD", {kFuncTypeDev, (void*)CmdDrawIndirectCountAMD}}, - {"vkCmdDrawIndexedIndirectCountAMD", {kFuncTypeDev, (void*)CmdDrawIndexedIndirectCountAMD}}, - {"vkGetShaderInfoAMD", {kFuncTypeDev, (void*)GetShaderInfoAMD}}, + {"vkImportFenceFdKHR", {kFuncTypeDev, (void*)ImportFenceFdKHR}}, + {"vkGetFenceFdKHR", {kFuncTypeDev, (void*)GetFenceFdKHR}}, + {"vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR", + {kFuncTypePdev, (void*)EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR}}, + {"vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR", + {kFuncTypePdev, (void*)GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR}}, + {"vkAcquireProfilingLockKHR", {kFuncTypeDev, (void*)AcquireProfilingLockKHR}}, + {"vkReleaseProfilingLockKHR", {kFuncTypeDev, (void*)ReleaseProfilingLockKHR}}, + {"vkGetPhysicalDeviceSurfaceCapabilities2KHR", {kFuncTypePdev, (void*)GetPhysicalDeviceSurfaceCapabilities2KHR}}, + {"vkGetPhysicalDeviceSurfaceFormats2KHR", {kFuncTypePdev, (void*)GetPhysicalDeviceSurfaceFormats2KHR}}, + {"vkGetPhysicalDeviceDisplayProperties2KHR", {kFuncTypePdev, (void*)GetPhysicalDeviceDisplayProperties2KHR}}, + {"vkGetPhysicalDeviceDisplayPlaneProperties2KHR", {kFuncTypePdev, (void*)GetPhysicalDeviceDisplayPlaneProperties2KHR}}, + {"vkGetDisplayModeProperties2KHR", {kFuncTypePdev, (void*)GetDisplayModeProperties2KHR}}, + {"vkGetDisplayPlaneCapabilities2KHR", {kFuncTypePdev, (void*)GetDisplayPlaneCapabilities2KHR}}, + {"vkGetImageMemoryRequirements2KHR", {kFuncTypeDev, (void*)GetImageMemoryRequirements2KHR}}, + {"vkGetBufferMemoryRequirements2KHR", {kFuncTypeDev, (void*)GetBufferMemoryRequirements2KHR}}, + {"vkGetImageSparseMemoryRequirements2KHR", {kFuncTypeDev, (void*)GetImageSparseMemoryRequirements2KHR}}, + {"vkCreateSamplerYcbcrConversionKHR", {kFuncTypeDev, (void*)CreateSamplerYcbcrConversionKHR}}, + {"vkDestroySamplerYcbcrConversionKHR", {kFuncTypeDev, (void*)DestroySamplerYcbcrConversionKHR}}, + {"vkBindBufferMemory2KHR", {kFuncTypeDev, (void*)BindBufferMemory2KHR}}, + {"vkBindImageMemory2KHR", {kFuncTypeDev, (void*)BindImageMemory2KHR}}, + {"vkGetDescriptorSetLayoutSupportKHR", {kFuncTypeDev, (void*)GetDescriptorSetLayoutSupportKHR}}, + {"vkCmdDrawIndirectCountKHR", {kFuncTypeDev, (void*)CmdDrawIndirectCountKHR}}, + {"vkCmdDrawIndexedIndirectCountKHR", {kFuncTypeDev, (void*)CmdDrawIndexedIndirectCountKHR}}, + {"vkGetSemaphoreCounterValueKHR", {kFuncTypeDev, (void*)GetSemaphoreCounterValueKHR}}, + {"vkWaitSemaphoresKHR", {kFuncTypeDev, (void*)WaitSemaphoresKHR}}, + {"vkSignalSemaphoreKHR", {kFuncTypeDev, (void*)SignalSemaphoreKHR}}, + {"vkGetPhysicalDeviceFragmentShadingRatesKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceFragmentShadingRatesKHR}}, + {"vkCmdSetFragmentShadingRateKHR", {kFuncTypeDev, (void*)CmdSetFragmentShadingRateKHR}}, + {"vkCmdSetRenderingAttachmentLocationsKHR", {kFuncTypeDev, (void*)CmdSetRenderingAttachmentLocationsKHR}}, + {"vkCmdSetRenderingInputAttachmentIndicesKHR", {kFuncTypeDev, (void*)CmdSetRenderingInputAttachmentIndicesKHR}}, + {"vkWaitForPresentKHR", {kFuncTypeDev, (void*)WaitForPresentKHR}}, + {"vkGetBufferDeviceAddressKHR", {kFuncTypeDev, (void*)GetBufferDeviceAddressKHR}}, + {"vkGetBufferOpaqueCaptureAddressKHR", {kFuncTypeDev, (void*)GetBufferOpaqueCaptureAddressKHR}}, + {"vkGetDeviceMemoryOpaqueCaptureAddressKHR", {kFuncTypeDev, (void*)GetDeviceMemoryOpaqueCaptureAddressKHR}}, + {"vkCreateDeferredOperationKHR", {kFuncTypeDev, (void*)CreateDeferredOperationKHR}}, + {"vkDestroyDeferredOperationKHR", {kFuncTypeDev, (void*)DestroyDeferredOperationKHR}}, + {"vkGetDeferredOperationMaxConcurrencyKHR", {kFuncTypeDev, (void*)GetDeferredOperationMaxConcurrencyKHR}}, + {"vkGetDeferredOperationResultKHR", {kFuncTypeDev, (void*)GetDeferredOperationResultKHR}}, + {"vkDeferredOperationJoinKHR", {kFuncTypeDev, (void*)DeferredOperationJoinKHR}}, + {"vkGetPipelineExecutablePropertiesKHR", {kFuncTypeDev, (void*)GetPipelineExecutablePropertiesKHR}}, + {"vkGetPipelineExecutableStatisticsKHR", {kFuncTypeDev, (void*)GetPipelineExecutableStatisticsKHR}}, + {"vkGetPipelineExecutableInternalRepresentationsKHR", + {kFuncTypeDev, (void*)GetPipelineExecutableInternalRepresentationsKHR}}, + {"vkMapMemory2KHR", {kFuncTypeDev, (void*)MapMemory2KHR}}, + {"vkUnmapMemory2KHR", {kFuncTypeDev, (void*)UnmapMemory2KHR}}, + {"vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR", + {kFuncTypePdev, (void*)GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR}}, + {"vkGetEncodedVideoSessionParametersKHR", {kFuncTypeDev, (void*)GetEncodedVideoSessionParametersKHR}}, + {"vkCmdEncodeVideoKHR", {kFuncTypeDev, (void*)CmdEncodeVideoKHR}}, + {"vkCmdSetEvent2KHR", {kFuncTypeDev, (void*)CmdSetEvent2KHR}}, + {"vkCmdResetEvent2KHR", {kFuncTypeDev, (void*)CmdResetEvent2KHR}}, + {"vkCmdWaitEvents2KHR", {kFuncTypeDev, (void*)CmdWaitEvents2KHR}}, + {"vkCmdPipelineBarrier2KHR", {kFuncTypeDev, (void*)CmdPipelineBarrier2KHR}}, + {"vkCmdWriteTimestamp2KHR", {kFuncTypeDev, (void*)CmdWriteTimestamp2KHR}}, + {"vkQueueSubmit2KHR", {kFuncTypeDev, (void*)QueueSubmit2KHR}}, + {"vkCmdCopyBuffer2KHR", {kFuncTypeDev, (void*)CmdCopyBuffer2KHR}}, + {"vkCmdCopyImage2KHR", {kFuncTypeDev, (void*)CmdCopyImage2KHR}}, + {"vkCmdCopyBufferToImage2KHR", {kFuncTypeDev, (void*)CmdCopyBufferToImage2KHR}}, + {"vkCmdCopyImageToBuffer2KHR", {kFuncTypeDev, (void*)CmdCopyImageToBuffer2KHR}}, + {"vkCmdBlitImage2KHR", {kFuncTypeDev, (void*)CmdBlitImage2KHR}}, + {"vkCmdResolveImage2KHR", {kFuncTypeDev, (void*)CmdResolveImage2KHR}}, + {"vkCmdTraceRaysIndirect2KHR", {kFuncTypeDev, (void*)CmdTraceRaysIndirect2KHR}}, + {"vkGetDeviceBufferMemoryRequirementsKHR", {kFuncTypeDev, (void*)GetDeviceBufferMemoryRequirementsKHR}}, + {"vkGetDeviceImageMemoryRequirementsKHR", {kFuncTypeDev, (void*)GetDeviceImageMemoryRequirementsKHR}}, + {"vkGetDeviceImageSparseMemoryRequirementsKHR", {kFuncTypeDev, (void*)GetDeviceImageSparseMemoryRequirementsKHR}}, + {"vkCmdBindIndexBuffer2KHR", {kFuncTypeDev, (void*)CmdBindIndexBuffer2KHR}}, + {"vkGetRenderingAreaGranularityKHR", {kFuncTypeDev, (void*)GetRenderingAreaGranularityKHR}}, + {"vkGetDeviceImageSubresourceLayoutKHR", {kFuncTypeDev, (void*)GetDeviceImageSubresourceLayoutKHR}}, + {"vkGetImageSubresourceLayout2KHR", {kFuncTypeDev, (void*)GetImageSubresourceLayout2KHR}}, + {"vkCreatePipelineBinariesKHR", {kFuncTypeDev, (void*)CreatePipelineBinariesKHR}}, + {"vkDestroyPipelineBinaryKHR", {kFuncTypeDev, (void*)DestroyPipelineBinaryKHR}}, + {"vkGetPipelineKeyKHR", {kFuncTypeDev, (void*)GetPipelineKeyKHR}}, + {"vkGetPipelineBinaryDataKHR", {kFuncTypeDev, (void*)GetPipelineBinaryDataKHR}}, + {"vkReleaseCapturedPipelineDataKHR", {kFuncTypeDev, (void*)ReleaseCapturedPipelineDataKHR}}, + {"vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR", + {kFuncTypePdev, (void*)GetPhysicalDeviceCooperativeMatrixPropertiesKHR}}, + {"vkCmdSetLineStippleKHR", {kFuncTypeDev, (void*)CmdSetLineStippleKHR}}, + {"vkGetPhysicalDeviceCalibrateableTimeDomainsKHR", {kFuncTypePdev, (void*)GetPhysicalDeviceCalibrateableTimeDomainsKHR}}, + {"vkGetCalibratedTimestampsKHR", {kFuncTypeDev, (void*)GetCalibratedTimestampsKHR}}, + {"vkCmdBindDescriptorSets2KHR", {kFuncTypeDev, (void*)CmdBindDescriptorSets2KHR}}, + {"vkCmdPushConstants2KHR", {kFuncTypeDev, (void*)CmdPushConstants2KHR}}, + {"vkCmdPushDescriptorSet2KHR", {kFuncTypeDev, (void*)CmdPushDescriptorSet2KHR}}, + {"vkCmdPushDescriptorSetWithTemplate2KHR", {kFuncTypeDev, (void*)CmdPushDescriptorSetWithTemplate2KHR}}, + {"vkCmdSetDescriptorBufferOffsets2EXT", {kFuncTypeDev, (void*)CmdSetDescriptorBufferOffsets2EXT}}, + {"vkCmdBindDescriptorBufferEmbeddedSamplers2EXT", {kFuncTypeDev, (void*)CmdBindDescriptorBufferEmbeddedSamplers2EXT}}, + {"vkCreateDebugReportCallbackEXT", {kFuncTypeInst, (void*)CreateDebugReportCallbackEXT}}, + {"vkDestroyDebugReportCallbackEXT", {kFuncTypeInst, (void*)DestroyDebugReportCallbackEXT}}, + {"vkDebugReportMessageEXT", {kFuncTypeInst, (void*)DebugReportMessageEXT}}, + {"vkDebugMarkerSetObjectTagEXT", {kFuncTypeDev, (void*)DebugMarkerSetObjectTagEXT}}, + {"vkDebugMarkerSetObjectNameEXT", {kFuncTypeDev, (void*)DebugMarkerSetObjectNameEXT}}, + {"vkCmdDebugMarkerBeginEXT", {kFuncTypeDev, (void*)CmdDebugMarkerBeginEXT}}, + {"vkCmdDebugMarkerEndEXT", {kFuncTypeDev, (void*)CmdDebugMarkerEndEXT}}, + {"vkCmdDebugMarkerInsertEXT", {kFuncTypeDev, (void*)CmdDebugMarkerInsertEXT}}, + {"vkCmdBindTransformFeedbackBuffersEXT", {kFuncTypeDev, (void*)CmdBindTransformFeedbackBuffersEXT}}, + {"vkCmdBeginTransformFeedbackEXT", {kFuncTypeDev, (void*)CmdBeginTransformFeedbackEXT}}, + {"vkCmdEndTransformFeedbackEXT", {kFuncTypeDev, (void*)CmdEndTransformFeedbackEXT}}, + {"vkCmdBeginQueryIndexedEXT", {kFuncTypeDev, (void*)CmdBeginQueryIndexedEXT}}, + {"vkCmdEndQueryIndexedEXT", {kFuncTypeDev, (void*)CmdEndQueryIndexedEXT}}, + {"vkCmdDrawIndirectByteCountEXT", {kFuncTypeDev, (void*)CmdDrawIndirectByteCountEXT}}, + {"vkCreateCuModuleNVX", {kFuncTypeDev, (void*)CreateCuModuleNVX}}, + {"vkCreateCuFunctionNVX", {kFuncTypeDev, (void*)CreateCuFunctionNVX}}, + {"vkDestroyCuModuleNVX", {kFuncTypeDev, (void*)DestroyCuModuleNVX}}, + {"vkDestroyCuFunctionNVX", {kFuncTypeDev, (void*)DestroyCuFunctionNVX}}, + {"vkCmdCuLaunchKernelNVX", {kFuncTypeDev, (void*)CmdCuLaunchKernelNVX}}, + {"vkGetImageViewHandleNVX", {kFuncTypeDev, (void*)GetImageViewHandleNVX}}, + {"vkGetImageViewHandle64NVX", {kFuncTypeDev, (void*)GetImageViewHandle64NVX}}, + {"vkGetImageViewAddressNVX", {kFuncTypeDev, (void*)GetImageViewAddressNVX}}, + {"vkCmdDrawIndirectCountAMD", {kFuncTypeDev, (void*)CmdDrawIndirectCountAMD}}, + {"vkCmdDrawIndexedIndirectCountAMD", {kFuncTypeDev, (void*)CmdDrawIndexedIndirectCountAMD}}, + {"vkGetShaderInfoAMD", {kFuncTypeDev, (void*)GetShaderInfoAMD}}, #ifdef VK_USE_PLATFORM_GGP - {"vkCreateStreamDescriptorSurfaceGGP", {kFuncTypeInst, (void*)CreateStreamDescriptorSurfaceGGP}}, + {"vkCreateStreamDescriptorSurfaceGGP", {kFuncTypeInst, (void*)CreateStreamDescriptorSurfaceGGP}}, #endif // VK_USE_PLATFORM_GGP - {"vkGetPhysicalDeviceExternalImageFormatPropertiesNV", {kFuncTypePdev, (void*)GetPhysicalDeviceExternalImageFormatPropertiesNV}}, + {"vkGetPhysicalDeviceExternalImageFormatPropertiesNV", + {kFuncTypePdev, (void*)GetPhysicalDeviceExternalImageFormatPropertiesNV}}, #ifdef VK_USE_PLATFORM_WIN32_KHR - {"vkGetMemoryWin32HandleNV", {kFuncTypeDev, (void*)GetMemoryWin32HandleNV}}, + {"vkGetMemoryWin32HandleNV", {kFuncTypeDev, (void*)GetMemoryWin32HandleNV}}, #endif // VK_USE_PLATFORM_WIN32_KHR #ifdef VK_USE_PLATFORM_VI_NN - {"vkCreateViSurfaceNN", {kFuncTypeInst, (void*)CreateViSurfaceNN}}, + {"vkCreateViSurfaceNN", {kFuncTypeInst, (void*)CreateViSurfaceNN}}, #endif // VK_USE_PLATFORM_VI_NN - {"vkCmdBeginConditionalRenderingEXT", {kFuncTypeDev, (void*)CmdBeginConditionalRenderingEXT}}, - {"vkCmdEndConditionalRenderingEXT", {kFuncTypeDev, (void*)CmdEndConditionalRenderingEXT}}, - {"vkCmdSetViewportWScalingNV", {kFuncTypeDev, (void*)CmdSetViewportWScalingNV}}, - {"vkReleaseDisplayEXT", {kFuncTypePdev, (void*)ReleaseDisplayEXT}}, + {"vkCmdBeginConditionalRenderingEXT", {kFuncTypeDev, (void*)CmdBeginConditionalRenderingEXT}}, + {"vkCmdEndConditionalRenderingEXT", {kFuncTypeDev, (void*)CmdEndConditionalRenderingEXT}}, + {"vkCmdSetViewportWScalingNV", {kFuncTypeDev, (void*)CmdSetViewportWScalingNV}}, + {"vkReleaseDisplayEXT", {kFuncTypePdev, (void*)ReleaseDisplayEXT}}, #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - {"vkAcquireXlibDisplayEXT", {kFuncTypePdev, (void*)AcquireXlibDisplayEXT}}, - {"vkGetRandROutputDisplayEXT", {kFuncTypePdev, (void*)GetRandROutputDisplayEXT}}, + {"vkAcquireXlibDisplayEXT", {kFuncTypePdev, (void*)AcquireXlibDisplayEXT}}, + {"vkGetRandROutputDisplayEXT", {kFuncTypePdev, (void*)GetRandROutputDisplayEXT}}, #endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT - {"vkGetPhysicalDeviceSurfaceCapabilities2EXT", {kFuncTypePdev, (void*)GetPhysicalDeviceSurfaceCapabilities2EXT}}, - {"vkDisplayPowerControlEXT", {kFuncTypeDev, (void*)DisplayPowerControlEXT}}, - {"vkRegisterDeviceEventEXT", {kFuncTypeDev, (void*)RegisterDeviceEventEXT}}, - {"vkRegisterDisplayEventEXT", {kFuncTypeDev, (void*)RegisterDisplayEventEXT}}, - {"vkGetSwapchainCounterEXT", {kFuncTypeDev, (void*)GetSwapchainCounterEXT}}, - {"vkGetRefreshCycleDurationGOOGLE", {kFuncTypeDev, (void*)GetRefreshCycleDurationGOOGLE}}, - {"vkGetPastPresentationTimingGOOGLE", {kFuncTypeDev, (void*)GetPastPresentationTimingGOOGLE}}, - {"vkCmdSetDiscardRectangleEXT", {kFuncTypeDev, (void*)CmdSetDiscardRectangleEXT}}, - {"vkCmdSetDiscardRectangleEnableEXT", {kFuncTypeDev, (void*)CmdSetDiscardRectangleEnableEXT}}, - {"vkCmdSetDiscardRectangleModeEXT", {kFuncTypeDev, (void*)CmdSetDiscardRectangleModeEXT}}, - {"vkSetHdrMetadataEXT", {kFuncTypeDev, (void*)SetHdrMetadataEXT}}, + {"vkGetPhysicalDeviceSurfaceCapabilities2EXT", {kFuncTypePdev, (void*)GetPhysicalDeviceSurfaceCapabilities2EXT}}, + {"vkDisplayPowerControlEXT", {kFuncTypeDev, (void*)DisplayPowerControlEXT}}, + {"vkRegisterDeviceEventEXT", {kFuncTypeDev, (void*)RegisterDeviceEventEXT}}, + {"vkRegisterDisplayEventEXT", {kFuncTypeDev, (void*)RegisterDisplayEventEXT}}, + {"vkGetSwapchainCounterEXT", {kFuncTypeDev, (void*)GetSwapchainCounterEXT}}, + {"vkGetRefreshCycleDurationGOOGLE", {kFuncTypeDev, (void*)GetRefreshCycleDurationGOOGLE}}, + {"vkGetPastPresentationTimingGOOGLE", {kFuncTypeDev, (void*)GetPastPresentationTimingGOOGLE}}, + {"vkCmdSetDiscardRectangleEXT", {kFuncTypeDev, (void*)CmdSetDiscardRectangleEXT}}, + {"vkCmdSetDiscardRectangleEnableEXT", {kFuncTypeDev, (void*)CmdSetDiscardRectangleEnableEXT}}, + {"vkCmdSetDiscardRectangleModeEXT", {kFuncTypeDev, (void*)CmdSetDiscardRectangleModeEXT}}, + {"vkSetHdrMetadataEXT", {kFuncTypeDev, (void*)SetHdrMetadataEXT}}, #ifdef VK_USE_PLATFORM_IOS_MVK - {"vkCreateIOSSurfaceMVK", {kFuncTypeInst, (void*)CreateIOSSurfaceMVK}}, + {"vkCreateIOSSurfaceMVK", {kFuncTypeInst, (void*)CreateIOSSurfaceMVK}}, #endif // VK_USE_PLATFORM_IOS_MVK #ifdef VK_USE_PLATFORM_MACOS_MVK - {"vkCreateMacOSSurfaceMVK", {kFuncTypeInst, (void*)CreateMacOSSurfaceMVK}}, + {"vkCreateMacOSSurfaceMVK", {kFuncTypeInst, (void*)CreateMacOSSurfaceMVK}}, #endif // VK_USE_PLATFORM_MACOS_MVK - {"vkSetDebugUtilsObjectNameEXT", {kFuncTypeDev, (void*)SetDebugUtilsObjectNameEXT}}, - {"vkSetDebugUtilsObjectTagEXT", {kFuncTypeDev, (void*)SetDebugUtilsObjectTagEXT}}, - {"vkQueueBeginDebugUtilsLabelEXT", {kFuncTypeDev, (void*)QueueBeginDebugUtilsLabelEXT}}, - {"vkQueueEndDebugUtilsLabelEXT", {kFuncTypeDev, (void*)QueueEndDebugUtilsLabelEXT}}, - {"vkQueueInsertDebugUtilsLabelEXT", {kFuncTypeDev, (void*)QueueInsertDebugUtilsLabelEXT}}, - {"vkCmdBeginDebugUtilsLabelEXT", {kFuncTypeDev, (void*)CmdBeginDebugUtilsLabelEXT}}, - {"vkCmdEndDebugUtilsLabelEXT", {kFuncTypeDev, (void*)CmdEndDebugUtilsLabelEXT}}, - {"vkCmdInsertDebugUtilsLabelEXT", {kFuncTypeDev, (void*)CmdInsertDebugUtilsLabelEXT}}, - {"vkCreateDebugUtilsMessengerEXT", {kFuncTypeInst, (void*)CreateDebugUtilsMessengerEXT}}, - {"vkDestroyDebugUtilsMessengerEXT", {kFuncTypeInst, (void*)DestroyDebugUtilsMessengerEXT}}, - {"vkSubmitDebugUtilsMessageEXT", {kFuncTypeInst, (void*)SubmitDebugUtilsMessageEXT}}, + {"vkSetDebugUtilsObjectNameEXT", {kFuncTypeDev, (void*)SetDebugUtilsObjectNameEXT}}, + {"vkSetDebugUtilsObjectTagEXT", {kFuncTypeDev, (void*)SetDebugUtilsObjectTagEXT}}, + {"vkQueueBeginDebugUtilsLabelEXT", {kFuncTypeDev, (void*)QueueBeginDebugUtilsLabelEXT}}, + {"vkQueueEndDebugUtilsLabelEXT", {kFuncTypeDev, (void*)QueueEndDebugUtilsLabelEXT}}, + {"vkQueueInsertDebugUtilsLabelEXT", {kFuncTypeDev, (void*)QueueInsertDebugUtilsLabelEXT}}, + {"vkCmdBeginDebugUtilsLabelEXT", {kFuncTypeDev, (void*)CmdBeginDebugUtilsLabelEXT}}, + {"vkCmdEndDebugUtilsLabelEXT", {kFuncTypeDev, (void*)CmdEndDebugUtilsLabelEXT}}, + {"vkCmdInsertDebugUtilsLabelEXT", {kFuncTypeDev, (void*)CmdInsertDebugUtilsLabelEXT}}, + {"vkCreateDebugUtilsMessengerEXT", {kFuncTypeInst, (void*)CreateDebugUtilsMessengerEXT}}, + {"vkDestroyDebugUtilsMessengerEXT", {kFuncTypeInst, (void*)DestroyDebugUtilsMessengerEXT}}, + {"vkSubmitDebugUtilsMessageEXT", {kFuncTypeInst, (void*)SubmitDebugUtilsMessageEXT}}, #ifdef VK_USE_PLATFORM_ANDROID_KHR - {"vkGetAndroidHardwareBufferPropertiesANDROID", {kFuncTypeDev, (void*)GetAndroidHardwareBufferPropertiesANDROID}}, - {"vkGetMemoryAndroidHardwareBufferANDROID", {kFuncTypeDev, (void*)GetMemoryAndroidHardwareBufferANDROID}}, + {"vkGetAndroidHardwareBufferPropertiesANDROID", {kFuncTypeDev, (void*)GetAndroidHardwareBufferPropertiesANDROID}}, + {"vkGetMemoryAndroidHardwareBufferANDROID", {kFuncTypeDev, (void*)GetMemoryAndroidHardwareBufferANDROID}}, #endif // VK_USE_PLATFORM_ANDROID_KHR #ifdef VK_ENABLE_BETA_EXTENSIONS - {"vkCreateExecutionGraphPipelinesAMDX", {kFuncTypeDev, (void*)CreateExecutionGraphPipelinesAMDX}}, - {"vkGetExecutionGraphPipelineScratchSizeAMDX", {kFuncTypeDev, (void*)GetExecutionGraphPipelineScratchSizeAMDX}}, - {"vkGetExecutionGraphPipelineNodeIndexAMDX", {kFuncTypeDev, (void*)GetExecutionGraphPipelineNodeIndexAMDX}}, - {"vkCmdInitializeGraphScratchMemoryAMDX", {kFuncTypeDev, (void*)CmdInitializeGraphScratchMemoryAMDX}}, - {"vkCmdDispatchGraphAMDX", {kFuncTypeDev, (void*)CmdDispatchGraphAMDX}}, - {"vkCmdDispatchGraphIndirectAMDX", {kFuncTypeDev, (void*)CmdDispatchGraphIndirectAMDX}}, - {"vkCmdDispatchGraphIndirectCountAMDX", {kFuncTypeDev, (void*)CmdDispatchGraphIndirectCountAMDX}}, + {"vkCreateExecutionGraphPipelinesAMDX", {kFuncTypeDev, (void*)CreateExecutionGraphPipelinesAMDX}}, + {"vkGetExecutionGraphPipelineScratchSizeAMDX", {kFuncTypeDev, (void*)GetExecutionGraphPipelineScratchSizeAMDX}}, + {"vkGetExecutionGraphPipelineNodeIndexAMDX", {kFuncTypeDev, (void*)GetExecutionGraphPipelineNodeIndexAMDX}}, + {"vkCmdInitializeGraphScratchMemoryAMDX", {kFuncTypeDev, (void*)CmdInitializeGraphScratchMemoryAMDX}}, + {"vkCmdDispatchGraphAMDX", {kFuncTypeDev, (void*)CmdDispatchGraphAMDX}}, + {"vkCmdDispatchGraphIndirectAMDX", {kFuncTypeDev, (void*)CmdDispatchGraphIndirectAMDX}}, + {"vkCmdDispatchGraphIndirectCountAMDX", {kFuncTypeDev, (void*)CmdDispatchGraphIndirectCountAMDX}}, #endif // VK_ENABLE_BETA_EXTENSIONS - {"vkCmdSetSampleLocationsEXT", {kFuncTypeDev, (void*)CmdSetSampleLocationsEXT}}, - {"vkGetPhysicalDeviceMultisamplePropertiesEXT", {kFuncTypePdev, (void*)GetPhysicalDeviceMultisamplePropertiesEXT}}, - {"vkGetImageDrmFormatModifierPropertiesEXT", {kFuncTypeDev, (void*)GetImageDrmFormatModifierPropertiesEXT}}, - {"vkCreateValidationCacheEXT", {kFuncTypeDev, (void*)CreateValidationCacheEXT}}, - {"vkDestroyValidationCacheEXT", {kFuncTypeDev, (void*)DestroyValidationCacheEXT}}, - {"vkMergeValidationCachesEXT", {kFuncTypeDev, (void*)MergeValidationCachesEXT}}, - {"vkGetValidationCacheDataEXT", {kFuncTypeDev, (void*)GetValidationCacheDataEXT}}, - {"vkCmdBindShadingRateImageNV", {kFuncTypeDev, (void*)CmdBindShadingRateImageNV}}, - {"vkCmdSetViewportShadingRatePaletteNV", {kFuncTypeDev, (void*)CmdSetViewportShadingRatePaletteNV}}, - {"vkCmdSetCoarseSampleOrderNV", {kFuncTypeDev, (void*)CmdSetCoarseSampleOrderNV}}, - {"vkCreateAccelerationStructureNV", {kFuncTypeDev, (void*)CreateAccelerationStructureNV}}, - {"vkDestroyAccelerationStructureNV", {kFuncTypeDev, (void*)DestroyAccelerationStructureNV}}, - {"vkGetAccelerationStructureMemoryRequirementsNV", {kFuncTypeDev, (void*)GetAccelerationStructureMemoryRequirementsNV}}, - {"vkBindAccelerationStructureMemoryNV", {kFuncTypeDev, (void*)BindAccelerationStructureMemoryNV}}, - {"vkCmdBuildAccelerationStructureNV", {kFuncTypeDev, (void*)CmdBuildAccelerationStructureNV}}, - {"vkCmdCopyAccelerationStructureNV", {kFuncTypeDev, (void*)CmdCopyAccelerationStructureNV}}, - {"vkCmdTraceRaysNV", {kFuncTypeDev, (void*)CmdTraceRaysNV}}, - {"vkCreateRayTracingPipelinesNV", {kFuncTypeDev, (void*)CreateRayTracingPipelinesNV}}, - {"vkGetRayTracingShaderGroupHandlesKHR", {kFuncTypeDev, (void*)GetRayTracingShaderGroupHandlesKHR}}, - {"vkGetRayTracingShaderGroupHandlesNV", {kFuncTypeDev, (void*)GetRayTracingShaderGroupHandlesNV}}, - {"vkGetAccelerationStructureHandleNV", {kFuncTypeDev, (void*)GetAccelerationStructureHandleNV}}, - {"vkCmdWriteAccelerationStructuresPropertiesNV", {kFuncTypeDev, (void*)CmdWriteAccelerationStructuresPropertiesNV}}, - {"vkCompileDeferredNV", {kFuncTypeDev, (void*)CompileDeferredNV}}, - {"vkGetMemoryHostPointerPropertiesEXT", {kFuncTypeDev, (void*)GetMemoryHostPointerPropertiesEXT}}, - {"vkCmdWriteBufferMarkerAMD", {kFuncTypeDev, (void*)CmdWriteBufferMarkerAMD}}, - {"vkCmdWriteBufferMarker2AMD", {kFuncTypeDev, (void*)CmdWriteBufferMarker2AMD}}, - {"vkGetPhysicalDeviceCalibrateableTimeDomainsEXT", {kFuncTypePdev, (void*)GetPhysicalDeviceCalibrateableTimeDomainsEXT}}, - {"vkGetCalibratedTimestampsEXT", {kFuncTypeDev, (void*)GetCalibratedTimestampsEXT}}, - {"vkCmdDrawMeshTasksNV", {kFuncTypeDev, (void*)CmdDrawMeshTasksNV}}, - {"vkCmdDrawMeshTasksIndirectNV", {kFuncTypeDev, (void*)CmdDrawMeshTasksIndirectNV}}, - {"vkCmdDrawMeshTasksIndirectCountNV", {kFuncTypeDev, (void*)CmdDrawMeshTasksIndirectCountNV}}, - {"vkCmdSetExclusiveScissorEnableNV", {kFuncTypeDev, (void*)CmdSetExclusiveScissorEnableNV}}, - {"vkCmdSetExclusiveScissorNV", {kFuncTypeDev, (void*)CmdSetExclusiveScissorNV}}, - {"vkCmdSetCheckpointNV", {kFuncTypeDev, (void*)CmdSetCheckpointNV}}, - {"vkGetQueueCheckpointDataNV", {kFuncTypeDev, (void*)GetQueueCheckpointDataNV}}, - {"vkGetQueueCheckpointData2NV", {kFuncTypeDev, (void*)GetQueueCheckpointData2NV}}, - {"vkInitializePerformanceApiINTEL", {kFuncTypeDev, (void*)InitializePerformanceApiINTEL}}, - {"vkUninitializePerformanceApiINTEL", {kFuncTypeDev, (void*)UninitializePerformanceApiINTEL}}, - {"vkCmdSetPerformanceMarkerINTEL", {kFuncTypeDev, (void*)CmdSetPerformanceMarkerINTEL}}, - {"vkCmdSetPerformanceStreamMarkerINTEL", {kFuncTypeDev, (void*)CmdSetPerformanceStreamMarkerINTEL}}, - {"vkCmdSetPerformanceOverrideINTEL", {kFuncTypeDev, (void*)CmdSetPerformanceOverrideINTEL}}, - {"vkAcquirePerformanceConfigurationINTEL", {kFuncTypeDev, (void*)AcquirePerformanceConfigurationINTEL}}, - {"vkReleasePerformanceConfigurationINTEL", {kFuncTypeDev, (void*)ReleasePerformanceConfigurationINTEL}}, - {"vkQueueSetPerformanceConfigurationINTEL", {kFuncTypeDev, (void*)QueueSetPerformanceConfigurationINTEL}}, - {"vkGetPerformanceParameterINTEL", {kFuncTypeDev, (void*)GetPerformanceParameterINTEL}}, - {"vkSetLocalDimmingAMD", {kFuncTypeDev, (void*)SetLocalDimmingAMD}}, + {"vkCmdSetSampleLocationsEXT", {kFuncTypeDev, (void*)CmdSetSampleLocationsEXT}}, + {"vkGetPhysicalDeviceMultisamplePropertiesEXT", {kFuncTypePdev, (void*)GetPhysicalDeviceMultisamplePropertiesEXT}}, + {"vkGetImageDrmFormatModifierPropertiesEXT", {kFuncTypeDev, (void*)GetImageDrmFormatModifierPropertiesEXT}}, + {"vkCreateValidationCacheEXT", {kFuncTypeDev, (void*)CreateValidationCacheEXT}}, + {"vkDestroyValidationCacheEXT", {kFuncTypeDev, (void*)DestroyValidationCacheEXT}}, + {"vkMergeValidationCachesEXT", {kFuncTypeDev, (void*)MergeValidationCachesEXT}}, + {"vkGetValidationCacheDataEXT", {kFuncTypeDev, (void*)GetValidationCacheDataEXT}}, + {"vkCmdBindShadingRateImageNV", {kFuncTypeDev, (void*)CmdBindShadingRateImageNV}}, + {"vkCmdSetViewportShadingRatePaletteNV", {kFuncTypeDev, (void*)CmdSetViewportShadingRatePaletteNV}}, + {"vkCmdSetCoarseSampleOrderNV", {kFuncTypeDev, (void*)CmdSetCoarseSampleOrderNV}}, + {"vkCreateAccelerationStructureNV", {kFuncTypeDev, (void*)CreateAccelerationStructureNV}}, + {"vkDestroyAccelerationStructureNV", {kFuncTypeDev, (void*)DestroyAccelerationStructureNV}}, + {"vkGetAccelerationStructureMemoryRequirementsNV", {kFuncTypeDev, (void*)GetAccelerationStructureMemoryRequirementsNV}}, + {"vkBindAccelerationStructureMemoryNV", {kFuncTypeDev, (void*)BindAccelerationStructureMemoryNV}}, + {"vkCmdBuildAccelerationStructureNV", {kFuncTypeDev, (void*)CmdBuildAccelerationStructureNV}}, + {"vkCmdCopyAccelerationStructureNV", {kFuncTypeDev, (void*)CmdCopyAccelerationStructureNV}}, + {"vkCmdTraceRaysNV", {kFuncTypeDev, (void*)CmdTraceRaysNV}}, + {"vkCreateRayTracingPipelinesNV", {kFuncTypeDev, (void*)CreateRayTracingPipelinesNV}}, + {"vkGetRayTracingShaderGroupHandlesKHR", {kFuncTypeDev, (void*)GetRayTracingShaderGroupHandlesKHR}}, + {"vkGetRayTracingShaderGroupHandlesNV", {kFuncTypeDev, (void*)GetRayTracingShaderGroupHandlesNV}}, + {"vkGetAccelerationStructureHandleNV", {kFuncTypeDev, (void*)GetAccelerationStructureHandleNV}}, + {"vkCmdWriteAccelerationStructuresPropertiesNV", {kFuncTypeDev, (void*)CmdWriteAccelerationStructuresPropertiesNV}}, + {"vkCompileDeferredNV", {kFuncTypeDev, (void*)CompileDeferredNV}}, + {"vkGetMemoryHostPointerPropertiesEXT", {kFuncTypeDev, (void*)GetMemoryHostPointerPropertiesEXT}}, + {"vkCmdWriteBufferMarkerAMD", {kFuncTypeDev, (void*)CmdWriteBufferMarkerAMD}}, + {"vkCmdWriteBufferMarker2AMD", {kFuncTypeDev, (void*)CmdWriteBufferMarker2AMD}}, + {"vkGetPhysicalDeviceCalibrateableTimeDomainsEXT", {kFuncTypePdev, (void*)GetPhysicalDeviceCalibrateableTimeDomainsEXT}}, + {"vkGetCalibratedTimestampsEXT", {kFuncTypeDev, (void*)GetCalibratedTimestampsEXT}}, + {"vkCmdDrawMeshTasksNV", {kFuncTypeDev, (void*)CmdDrawMeshTasksNV}}, + {"vkCmdDrawMeshTasksIndirectNV", {kFuncTypeDev, (void*)CmdDrawMeshTasksIndirectNV}}, + {"vkCmdDrawMeshTasksIndirectCountNV", {kFuncTypeDev, (void*)CmdDrawMeshTasksIndirectCountNV}}, + {"vkCmdSetExclusiveScissorEnableNV", {kFuncTypeDev, (void*)CmdSetExclusiveScissorEnableNV}}, + {"vkCmdSetExclusiveScissorNV", {kFuncTypeDev, (void*)CmdSetExclusiveScissorNV}}, + {"vkCmdSetCheckpointNV", {kFuncTypeDev, (void*)CmdSetCheckpointNV}}, + {"vkGetQueueCheckpointDataNV", {kFuncTypeDev, (void*)GetQueueCheckpointDataNV}}, + {"vkGetQueueCheckpointData2NV", {kFuncTypeDev, (void*)GetQueueCheckpointData2NV}}, + {"vkInitializePerformanceApiINTEL", {kFuncTypeDev, (void*)InitializePerformanceApiINTEL}}, + {"vkUninitializePerformanceApiINTEL", {kFuncTypeDev, (void*)UninitializePerformanceApiINTEL}}, + {"vkCmdSetPerformanceMarkerINTEL", {kFuncTypeDev, (void*)CmdSetPerformanceMarkerINTEL}}, + {"vkCmdSetPerformanceStreamMarkerINTEL", {kFuncTypeDev, (void*)CmdSetPerformanceStreamMarkerINTEL}}, + {"vkCmdSetPerformanceOverrideINTEL", {kFuncTypeDev, (void*)CmdSetPerformanceOverrideINTEL}}, + {"vkAcquirePerformanceConfigurationINTEL", {kFuncTypeDev, (void*)AcquirePerformanceConfigurationINTEL}}, + {"vkReleasePerformanceConfigurationINTEL", {kFuncTypeDev, (void*)ReleasePerformanceConfigurationINTEL}}, + {"vkQueueSetPerformanceConfigurationINTEL", {kFuncTypeDev, (void*)QueueSetPerformanceConfigurationINTEL}}, + {"vkGetPerformanceParameterINTEL", {kFuncTypeDev, (void*)GetPerformanceParameterINTEL}}, + {"vkSetLocalDimmingAMD", {kFuncTypeDev, (void*)SetLocalDimmingAMD}}, #ifdef VK_USE_PLATFORM_FUCHSIA - {"vkCreateImagePipeSurfaceFUCHSIA", {kFuncTypeInst, (void*)CreateImagePipeSurfaceFUCHSIA}}, + {"vkCreateImagePipeSurfaceFUCHSIA", {kFuncTypeInst, (void*)CreateImagePipeSurfaceFUCHSIA}}, #endif // VK_USE_PLATFORM_FUCHSIA #ifdef VK_USE_PLATFORM_METAL_EXT - {"vkCreateMetalSurfaceEXT", {kFuncTypeInst, (void*)CreateMetalSurfaceEXT}}, + {"vkCreateMetalSurfaceEXT", {kFuncTypeInst, (void*)CreateMetalSurfaceEXT}}, #endif // VK_USE_PLATFORM_METAL_EXT - {"vkGetBufferDeviceAddressEXT", {kFuncTypeDev, (void*)GetBufferDeviceAddressEXT}}, - {"vkGetPhysicalDeviceToolPropertiesEXT", {kFuncTypePdev, (void*)GetPhysicalDeviceToolPropertiesEXT}}, - {"vkGetPhysicalDeviceCooperativeMatrixPropertiesNV", {kFuncTypePdev, (void*)GetPhysicalDeviceCooperativeMatrixPropertiesNV}}, - {"vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV", {kFuncTypePdev, (void*)GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV}}, + {"vkGetBufferDeviceAddressEXT", {kFuncTypeDev, (void*)GetBufferDeviceAddressEXT}}, + {"vkGetPhysicalDeviceToolPropertiesEXT", {kFuncTypePdev, (void*)GetPhysicalDeviceToolPropertiesEXT}}, + {"vkGetPhysicalDeviceCooperativeMatrixPropertiesNV", + {kFuncTypePdev, (void*)GetPhysicalDeviceCooperativeMatrixPropertiesNV}}, + {"vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV", + {kFuncTypePdev, (void*)GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV}}, #ifdef VK_USE_PLATFORM_WIN32_KHR - {"vkGetPhysicalDeviceSurfacePresentModes2EXT", {kFuncTypePdev, (void*)GetPhysicalDeviceSurfacePresentModes2EXT}}, - {"vkAcquireFullScreenExclusiveModeEXT", {kFuncTypeDev, (void*)AcquireFullScreenExclusiveModeEXT}}, - {"vkReleaseFullScreenExclusiveModeEXT", {kFuncTypeDev, (void*)ReleaseFullScreenExclusiveModeEXT}}, - {"vkGetDeviceGroupSurfacePresentModes2EXT", {kFuncTypeDev, (void*)GetDeviceGroupSurfacePresentModes2EXT}}, + {"vkGetPhysicalDeviceSurfacePresentModes2EXT", {kFuncTypePdev, (void*)GetPhysicalDeviceSurfacePresentModes2EXT}}, + {"vkAcquireFullScreenExclusiveModeEXT", {kFuncTypeDev, (void*)AcquireFullScreenExclusiveModeEXT}}, + {"vkReleaseFullScreenExclusiveModeEXT", {kFuncTypeDev, (void*)ReleaseFullScreenExclusiveModeEXT}}, + {"vkGetDeviceGroupSurfacePresentModes2EXT", {kFuncTypeDev, (void*)GetDeviceGroupSurfacePresentModes2EXT}}, #endif // VK_USE_PLATFORM_WIN32_KHR - {"vkCreateHeadlessSurfaceEXT", {kFuncTypeInst, (void*)CreateHeadlessSurfaceEXT}}, - {"vkCmdSetLineStippleEXT", {kFuncTypeDev, (void*)CmdSetLineStippleEXT}}, - {"vkResetQueryPoolEXT", {kFuncTypeDev, (void*)ResetQueryPoolEXT}}, - {"vkCmdSetCullModeEXT", {kFuncTypeDev, (void*)CmdSetCullModeEXT}}, - {"vkCmdSetFrontFaceEXT", {kFuncTypeDev, (void*)CmdSetFrontFaceEXT}}, - {"vkCmdSetPrimitiveTopologyEXT", {kFuncTypeDev, (void*)CmdSetPrimitiveTopologyEXT}}, - {"vkCmdSetViewportWithCountEXT", {kFuncTypeDev, (void*)CmdSetViewportWithCountEXT}}, - {"vkCmdSetScissorWithCountEXT", {kFuncTypeDev, (void*)CmdSetScissorWithCountEXT}}, - {"vkCmdBindVertexBuffers2EXT", {kFuncTypeDev, (void*)CmdBindVertexBuffers2EXT}}, - {"vkCmdSetDepthTestEnableEXT", {kFuncTypeDev, (void*)CmdSetDepthTestEnableEXT}}, - {"vkCmdSetDepthWriteEnableEXT", {kFuncTypeDev, (void*)CmdSetDepthWriteEnableEXT}}, - {"vkCmdSetDepthCompareOpEXT", {kFuncTypeDev, (void*)CmdSetDepthCompareOpEXT}}, - {"vkCmdSetDepthBoundsTestEnableEXT", {kFuncTypeDev, (void*)CmdSetDepthBoundsTestEnableEXT}}, - {"vkCmdSetStencilTestEnableEXT", {kFuncTypeDev, (void*)CmdSetStencilTestEnableEXT}}, - {"vkCmdSetStencilOpEXT", {kFuncTypeDev, (void*)CmdSetStencilOpEXT}}, - {"vkCopyMemoryToImageEXT", {kFuncTypeDev, (void*)CopyMemoryToImageEXT}}, - {"vkCopyImageToMemoryEXT", {kFuncTypeDev, (void*)CopyImageToMemoryEXT}}, - {"vkCopyImageToImageEXT", {kFuncTypeDev, (void*)CopyImageToImageEXT}}, - {"vkTransitionImageLayoutEXT", {kFuncTypeDev, (void*)TransitionImageLayoutEXT}}, - {"vkGetImageSubresourceLayout2EXT", {kFuncTypeDev, (void*)GetImageSubresourceLayout2EXT}}, - {"vkReleaseSwapchainImagesEXT", {kFuncTypeDev, (void*)ReleaseSwapchainImagesEXT}}, - {"vkGetGeneratedCommandsMemoryRequirementsNV", {kFuncTypeDev, (void*)GetGeneratedCommandsMemoryRequirementsNV}}, - {"vkCmdPreprocessGeneratedCommandsNV", {kFuncTypeDev, (void*)CmdPreprocessGeneratedCommandsNV}}, - {"vkCmdExecuteGeneratedCommandsNV", {kFuncTypeDev, (void*)CmdExecuteGeneratedCommandsNV}}, - {"vkCmdBindPipelineShaderGroupNV", {kFuncTypeDev, (void*)CmdBindPipelineShaderGroupNV}}, - {"vkCreateIndirectCommandsLayoutNV", {kFuncTypeDev, (void*)CreateIndirectCommandsLayoutNV}}, - {"vkDestroyIndirectCommandsLayoutNV", {kFuncTypeDev, (void*)DestroyIndirectCommandsLayoutNV}}, - {"vkCmdSetDepthBias2EXT", {kFuncTypeDev, (void*)CmdSetDepthBias2EXT}}, - {"vkAcquireDrmDisplayEXT", {kFuncTypePdev, (void*)AcquireDrmDisplayEXT}}, - {"vkGetDrmDisplayEXT", {kFuncTypePdev, (void*)GetDrmDisplayEXT}}, - {"vkCreatePrivateDataSlotEXT", {kFuncTypeDev, (void*)CreatePrivateDataSlotEXT}}, - {"vkDestroyPrivateDataSlotEXT", {kFuncTypeDev, (void*)DestroyPrivateDataSlotEXT}}, - {"vkSetPrivateDataEXT", {kFuncTypeDev, (void*)SetPrivateDataEXT}}, - {"vkGetPrivateDataEXT", {kFuncTypeDev, (void*)GetPrivateDataEXT}}, - {"vkCreateCudaModuleNV", {kFuncTypeDev, (void*)CreateCudaModuleNV}}, - {"vkGetCudaModuleCacheNV", {kFuncTypeDev, (void*)GetCudaModuleCacheNV}}, - {"vkCreateCudaFunctionNV", {kFuncTypeDev, (void*)CreateCudaFunctionNV}}, - {"vkDestroyCudaModuleNV", {kFuncTypeDev, (void*)DestroyCudaModuleNV}}, - {"vkDestroyCudaFunctionNV", {kFuncTypeDev, (void*)DestroyCudaFunctionNV}}, - {"vkCmdCudaLaunchKernelNV", {kFuncTypeDev, (void*)CmdCudaLaunchKernelNV}}, + {"vkCreateHeadlessSurfaceEXT", {kFuncTypeInst, (void*)CreateHeadlessSurfaceEXT}}, + {"vkCmdSetLineStippleEXT", {kFuncTypeDev, (void*)CmdSetLineStippleEXT}}, + {"vkResetQueryPoolEXT", {kFuncTypeDev, (void*)ResetQueryPoolEXT}}, + {"vkCmdSetCullModeEXT", {kFuncTypeDev, (void*)CmdSetCullModeEXT}}, + {"vkCmdSetFrontFaceEXT", {kFuncTypeDev, (void*)CmdSetFrontFaceEXT}}, + {"vkCmdSetPrimitiveTopologyEXT", {kFuncTypeDev, (void*)CmdSetPrimitiveTopologyEXT}}, + {"vkCmdSetViewportWithCountEXT", {kFuncTypeDev, (void*)CmdSetViewportWithCountEXT}}, + {"vkCmdSetScissorWithCountEXT", {kFuncTypeDev, (void*)CmdSetScissorWithCountEXT}}, + {"vkCmdBindVertexBuffers2EXT", {kFuncTypeDev, (void*)CmdBindVertexBuffers2EXT}}, + {"vkCmdSetDepthTestEnableEXT", {kFuncTypeDev, (void*)CmdSetDepthTestEnableEXT}}, + {"vkCmdSetDepthWriteEnableEXT", {kFuncTypeDev, (void*)CmdSetDepthWriteEnableEXT}}, + {"vkCmdSetDepthCompareOpEXT", {kFuncTypeDev, (void*)CmdSetDepthCompareOpEXT}}, + {"vkCmdSetDepthBoundsTestEnableEXT", {kFuncTypeDev, (void*)CmdSetDepthBoundsTestEnableEXT}}, + {"vkCmdSetStencilTestEnableEXT", {kFuncTypeDev, (void*)CmdSetStencilTestEnableEXT}}, + {"vkCmdSetStencilOpEXT", {kFuncTypeDev, (void*)CmdSetStencilOpEXT}}, + {"vkCopyMemoryToImageEXT", {kFuncTypeDev, (void*)CopyMemoryToImageEXT}}, + {"vkCopyImageToMemoryEXT", {kFuncTypeDev, (void*)CopyImageToMemoryEXT}}, + {"vkCopyImageToImageEXT", {kFuncTypeDev, (void*)CopyImageToImageEXT}}, + {"vkTransitionImageLayoutEXT", {kFuncTypeDev, (void*)TransitionImageLayoutEXT}}, + {"vkGetImageSubresourceLayout2EXT", {kFuncTypeDev, (void*)GetImageSubresourceLayout2EXT}}, + {"vkReleaseSwapchainImagesEXT", {kFuncTypeDev, (void*)ReleaseSwapchainImagesEXT}}, + {"vkGetGeneratedCommandsMemoryRequirementsNV", {kFuncTypeDev, (void*)GetGeneratedCommandsMemoryRequirementsNV}}, + {"vkCmdPreprocessGeneratedCommandsNV", {kFuncTypeDev, (void*)CmdPreprocessGeneratedCommandsNV}}, + {"vkCmdExecuteGeneratedCommandsNV", {kFuncTypeDev, (void*)CmdExecuteGeneratedCommandsNV}}, + {"vkCmdBindPipelineShaderGroupNV", {kFuncTypeDev, (void*)CmdBindPipelineShaderGroupNV}}, + {"vkCreateIndirectCommandsLayoutNV", {kFuncTypeDev, (void*)CreateIndirectCommandsLayoutNV}}, + {"vkDestroyIndirectCommandsLayoutNV", {kFuncTypeDev, (void*)DestroyIndirectCommandsLayoutNV}}, + {"vkCmdSetDepthBias2EXT", {kFuncTypeDev, (void*)CmdSetDepthBias2EXT}}, + {"vkAcquireDrmDisplayEXT", {kFuncTypePdev, (void*)AcquireDrmDisplayEXT}}, + {"vkGetDrmDisplayEXT", {kFuncTypePdev, (void*)GetDrmDisplayEXT}}, + {"vkCreatePrivateDataSlotEXT", {kFuncTypeDev, (void*)CreatePrivateDataSlotEXT}}, + {"vkDestroyPrivateDataSlotEXT", {kFuncTypeDev, (void*)DestroyPrivateDataSlotEXT}}, + {"vkSetPrivateDataEXT", {kFuncTypeDev, (void*)SetPrivateDataEXT}}, + {"vkGetPrivateDataEXT", {kFuncTypeDev, (void*)GetPrivateDataEXT}}, + {"vkCreateCudaModuleNV", {kFuncTypeDev, (void*)CreateCudaModuleNV}}, + {"vkGetCudaModuleCacheNV", {kFuncTypeDev, (void*)GetCudaModuleCacheNV}}, + {"vkCreateCudaFunctionNV", {kFuncTypeDev, (void*)CreateCudaFunctionNV}}, + {"vkDestroyCudaModuleNV", {kFuncTypeDev, (void*)DestroyCudaModuleNV}}, + {"vkDestroyCudaFunctionNV", {kFuncTypeDev, (void*)DestroyCudaFunctionNV}}, + {"vkCmdCudaLaunchKernelNV", {kFuncTypeDev, (void*)CmdCudaLaunchKernelNV}}, #ifdef VK_USE_PLATFORM_METAL_EXT - {"vkExportMetalObjectsEXT", {kFuncTypeDev, (void*)ExportMetalObjectsEXT}}, + {"vkExportMetalObjectsEXT", {kFuncTypeDev, (void*)ExportMetalObjectsEXT}}, #endif // VK_USE_PLATFORM_METAL_EXT - {"vkGetDescriptorSetLayoutSizeEXT", {kFuncTypeDev, (void*)GetDescriptorSetLayoutSizeEXT}}, - {"vkGetDescriptorSetLayoutBindingOffsetEXT", {kFuncTypeDev, (void*)GetDescriptorSetLayoutBindingOffsetEXT}}, - {"vkGetDescriptorEXT", {kFuncTypeDev, (void*)GetDescriptorEXT}}, - {"vkCmdBindDescriptorBuffersEXT", {kFuncTypeDev, (void*)CmdBindDescriptorBuffersEXT}}, - {"vkCmdSetDescriptorBufferOffsetsEXT", {kFuncTypeDev, (void*)CmdSetDescriptorBufferOffsetsEXT}}, - {"vkCmdBindDescriptorBufferEmbeddedSamplersEXT", {kFuncTypeDev, (void*)CmdBindDescriptorBufferEmbeddedSamplersEXT}}, - {"vkGetBufferOpaqueCaptureDescriptorDataEXT", {kFuncTypeDev, (void*)GetBufferOpaqueCaptureDescriptorDataEXT}}, - {"vkGetImageOpaqueCaptureDescriptorDataEXT", {kFuncTypeDev, (void*)GetImageOpaqueCaptureDescriptorDataEXT}}, - {"vkGetImageViewOpaqueCaptureDescriptorDataEXT", {kFuncTypeDev, (void*)GetImageViewOpaqueCaptureDescriptorDataEXT}}, - {"vkGetSamplerOpaqueCaptureDescriptorDataEXT", {kFuncTypeDev, (void*)GetSamplerOpaqueCaptureDescriptorDataEXT}}, - {"vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT", {kFuncTypeDev, (void*)GetAccelerationStructureOpaqueCaptureDescriptorDataEXT}}, - {"vkCmdSetFragmentShadingRateEnumNV", {kFuncTypeDev, (void*)CmdSetFragmentShadingRateEnumNV}}, - {"vkGetDeviceFaultInfoEXT", {kFuncTypeDev, (void*)GetDeviceFaultInfoEXT}}, + {"vkGetDescriptorSetLayoutSizeEXT", {kFuncTypeDev, (void*)GetDescriptorSetLayoutSizeEXT}}, + {"vkGetDescriptorSetLayoutBindingOffsetEXT", {kFuncTypeDev, (void*)GetDescriptorSetLayoutBindingOffsetEXT}}, + {"vkGetDescriptorEXT", {kFuncTypeDev, (void*)GetDescriptorEXT}}, + {"vkCmdBindDescriptorBuffersEXT", {kFuncTypeDev, (void*)CmdBindDescriptorBuffersEXT}}, + {"vkCmdSetDescriptorBufferOffsetsEXT", {kFuncTypeDev, (void*)CmdSetDescriptorBufferOffsetsEXT}}, + {"vkCmdBindDescriptorBufferEmbeddedSamplersEXT", {kFuncTypeDev, (void*)CmdBindDescriptorBufferEmbeddedSamplersEXT}}, + {"vkGetBufferOpaqueCaptureDescriptorDataEXT", {kFuncTypeDev, (void*)GetBufferOpaqueCaptureDescriptorDataEXT}}, + {"vkGetImageOpaqueCaptureDescriptorDataEXT", {kFuncTypeDev, (void*)GetImageOpaqueCaptureDescriptorDataEXT}}, + {"vkGetImageViewOpaqueCaptureDescriptorDataEXT", {kFuncTypeDev, (void*)GetImageViewOpaqueCaptureDescriptorDataEXT}}, + {"vkGetSamplerOpaqueCaptureDescriptorDataEXT", {kFuncTypeDev, (void*)GetSamplerOpaqueCaptureDescriptorDataEXT}}, + {"vkGetAccelerationStructureOpaqueCaptureDescriptorDataEXT", + {kFuncTypeDev, (void*)GetAccelerationStructureOpaqueCaptureDescriptorDataEXT}}, + {"vkCmdSetFragmentShadingRateEnumNV", {kFuncTypeDev, (void*)CmdSetFragmentShadingRateEnumNV}}, + {"vkGetDeviceFaultInfoEXT", {kFuncTypeDev, (void*)GetDeviceFaultInfoEXT}}, #ifdef VK_USE_PLATFORM_WIN32_KHR - {"vkAcquireWinrtDisplayNV", {kFuncTypePdev, (void*)AcquireWinrtDisplayNV}}, - {"vkGetWinrtDisplayNV", {kFuncTypePdev, (void*)GetWinrtDisplayNV}}, + {"vkAcquireWinrtDisplayNV", {kFuncTypePdev, (void*)AcquireWinrtDisplayNV}}, + {"vkGetWinrtDisplayNV", {kFuncTypePdev, (void*)GetWinrtDisplayNV}}, #endif // VK_USE_PLATFORM_WIN32_KHR #ifdef VK_USE_PLATFORM_DIRECTFB_EXT - {"vkCreateDirectFBSurfaceEXT", {kFuncTypeInst, (void*)CreateDirectFBSurfaceEXT}}, - {"vkGetPhysicalDeviceDirectFBPresentationSupportEXT", {kFuncTypePdev, (void*)GetPhysicalDeviceDirectFBPresentationSupportEXT}}, + {"vkCreateDirectFBSurfaceEXT", {kFuncTypeInst, (void*)CreateDirectFBSurfaceEXT}}, + {"vkGetPhysicalDeviceDirectFBPresentationSupportEXT", + {kFuncTypePdev, (void*)GetPhysicalDeviceDirectFBPresentationSupportEXT}}, #endif // VK_USE_PLATFORM_DIRECTFB_EXT - {"vkCmdSetVertexInputEXT", {kFuncTypeDev, (void*)CmdSetVertexInputEXT}}, + {"vkCmdSetVertexInputEXT", {kFuncTypeDev, (void*)CmdSetVertexInputEXT}}, #ifdef VK_USE_PLATFORM_FUCHSIA - {"vkGetMemoryZirconHandleFUCHSIA", {kFuncTypeDev, (void*)GetMemoryZirconHandleFUCHSIA}}, - {"vkGetMemoryZirconHandlePropertiesFUCHSIA", {kFuncTypeDev, (void*)GetMemoryZirconHandlePropertiesFUCHSIA}}, - {"vkImportSemaphoreZirconHandleFUCHSIA", {kFuncTypeDev, (void*)ImportSemaphoreZirconHandleFUCHSIA}}, - {"vkGetSemaphoreZirconHandleFUCHSIA", {kFuncTypeDev, (void*)GetSemaphoreZirconHandleFUCHSIA}}, - {"vkCreateBufferCollectionFUCHSIA", {kFuncTypeDev, (void*)CreateBufferCollectionFUCHSIA}}, - {"vkSetBufferCollectionImageConstraintsFUCHSIA", {kFuncTypeDev, (void*)SetBufferCollectionImageConstraintsFUCHSIA}}, - {"vkSetBufferCollectionBufferConstraintsFUCHSIA", {kFuncTypeDev, (void*)SetBufferCollectionBufferConstraintsFUCHSIA}}, - {"vkDestroyBufferCollectionFUCHSIA", {kFuncTypeDev, (void*)DestroyBufferCollectionFUCHSIA}}, - {"vkGetBufferCollectionPropertiesFUCHSIA", {kFuncTypeDev, (void*)GetBufferCollectionPropertiesFUCHSIA}}, + {"vkGetMemoryZirconHandleFUCHSIA", {kFuncTypeDev, (void*)GetMemoryZirconHandleFUCHSIA}}, + {"vkGetMemoryZirconHandlePropertiesFUCHSIA", {kFuncTypeDev, (void*)GetMemoryZirconHandlePropertiesFUCHSIA}}, + {"vkImportSemaphoreZirconHandleFUCHSIA", {kFuncTypeDev, (void*)ImportSemaphoreZirconHandleFUCHSIA}}, + {"vkGetSemaphoreZirconHandleFUCHSIA", {kFuncTypeDev, (void*)GetSemaphoreZirconHandleFUCHSIA}}, + {"vkCreateBufferCollectionFUCHSIA", {kFuncTypeDev, (void*)CreateBufferCollectionFUCHSIA}}, + {"vkSetBufferCollectionImageConstraintsFUCHSIA", {kFuncTypeDev, (void*)SetBufferCollectionImageConstraintsFUCHSIA}}, + {"vkSetBufferCollectionBufferConstraintsFUCHSIA", {kFuncTypeDev, (void*)SetBufferCollectionBufferConstraintsFUCHSIA}}, + {"vkDestroyBufferCollectionFUCHSIA", {kFuncTypeDev, (void*)DestroyBufferCollectionFUCHSIA}}, + {"vkGetBufferCollectionPropertiesFUCHSIA", {kFuncTypeDev, (void*)GetBufferCollectionPropertiesFUCHSIA}}, #endif // VK_USE_PLATFORM_FUCHSIA - {"vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI", {kFuncTypeDev, (void*)GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI}}, - {"vkCmdSubpassShadingHUAWEI", {kFuncTypeDev, (void*)CmdSubpassShadingHUAWEI}}, - {"vkCmdBindInvocationMaskHUAWEI", {kFuncTypeDev, (void*)CmdBindInvocationMaskHUAWEI}}, - {"vkGetMemoryRemoteAddressNV", {kFuncTypeDev, (void*)GetMemoryRemoteAddressNV}}, - {"vkGetPipelinePropertiesEXT", {kFuncTypeDev, (void*)GetPipelinePropertiesEXT}}, - {"vkCmdSetPatchControlPointsEXT", {kFuncTypeDev, (void*)CmdSetPatchControlPointsEXT}}, - {"vkCmdSetRasterizerDiscardEnableEXT", {kFuncTypeDev, (void*)CmdSetRasterizerDiscardEnableEXT}}, - {"vkCmdSetDepthBiasEnableEXT", {kFuncTypeDev, (void*)CmdSetDepthBiasEnableEXT}}, - {"vkCmdSetLogicOpEXT", {kFuncTypeDev, (void*)CmdSetLogicOpEXT}}, - {"vkCmdSetPrimitiveRestartEnableEXT", {kFuncTypeDev, (void*)CmdSetPrimitiveRestartEnableEXT}}, + {"vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI", {kFuncTypeDev, (void*)GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI}}, + {"vkCmdSubpassShadingHUAWEI", {kFuncTypeDev, (void*)CmdSubpassShadingHUAWEI}}, + {"vkCmdBindInvocationMaskHUAWEI", {kFuncTypeDev, (void*)CmdBindInvocationMaskHUAWEI}}, + {"vkGetMemoryRemoteAddressNV", {kFuncTypeDev, (void*)GetMemoryRemoteAddressNV}}, + {"vkGetPipelinePropertiesEXT", {kFuncTypeDev, (void*)GetPipelinePropertiesEXT}}, + {"vkCmdSetPatchControlPointsEXT", {kFuncTypeDev, (void*)CmdSetPatchControlPointsEXT}}, + {"vkCmdSetRasterizerDiscardEnableEXT", {kFuncTypeDev, (void*)CmdSetRasterizerDiscardEnableEXT}}, + {"vkCmdSetDepthBiasEnableEXT", {kFuncTypeDev, (void*)CmdSetDepthBiasEnableEXT}}, + {"vkCmdSetLogicOpEXT", {kFuncTypeDev, (void*)CmdSetLogicOpEXT}}, + {"vkCmdSetPrimitiveRestartEnableEXT", {kFuncTypeDev, (void*)CmdSetPrimitiveRestartEnableEXT}}, #ifdef VK_USE_PLATFORM_SCREEN_QNX - {"vkCreateScreenSurfaceQNX", {kFuncTypeInst, (void*)CreateScreenSurfaceQNX}}, - {"vkGetPhysicalDeviceScreenPresentationSupportQNX", {kFuncTypePdev, (void*)GetPhysicalDeviceScreenPresentationSupportQNX}}, + {"vkCreateScreenSurfaceQNX", {kFuncTypeInst, (void*)CreateScreenSurfaceQNX}}, + {"vkGetPhysicalDeviceScreenPresentationSupportQNX", {kFuncTypePdev, (void*)GetPhysicalDeviceScreenPresentationSupportQNX}}, #endif // VK_USE_PLATFORM_SCREEN_QNX - {"vkCmdSetColorWriteEnableEXT", {kFuncTypeDev, (void*)CmdSetColorWriteEnableEXT}}, - {"vkCmdDrawMultiEXT", {kFuncTypeDev, (void*)CmdDrawMultiEXT}}, - {"vkCmdDrawMultiIndexedEXT", {kFuncTypeDev, (void*)CmdDrawMultiIndexedEXT}}, - {"vkCreateMicromapEXT", {kFuncTypeDev, (void*)CreateMicromapEXT}}, - {"vkDestroyMicromapEXT", {kFuncTypeDev, (void*)DestroyMicromapEXT}}, - {"vkCmdBuildMicromapsEXT", {kFuncTypeDev, (void*)CmdBuildMicromapsEXT}}, - {"vkBuildMicromapsEXT", {kFuncTypeDev, (void*)BuildMicromapsEXT}}, - {"vkCopyMicromapEXT", {kFuncTypeDev, (void*)CopyMicromapEXT}}, - {"vkCopyMicromapToMemoryEXT", {kFuncTypeDev, (void*)CopyMicromapToMemoryEXT}}, - {"vkCopyMemoryToMicromapEXT", {kFuncTypeDev, (void*)CopyMemoryToMicromapEXT}}, - {"vkWriteMicromapsPropertiesEXT", {kFuncTypeDev, (void*)WriteMicromapsPropertiesEXT}}, - {"vkCmdCopyMicromapEXT", {kFuncTypeDev, (void*)CmdCopyMicromapEXT}}, - {"vkCmdCopyMicromapToMemoryEXT", {kFuncTypeDev, (void*)CmdCopyMicromapToMemoryEXT}}, - {"vkCmdCopyMemoryToMicromapEXT", {kFuncTypeDev, (void*)CmdCopyMemoryToMicromapEXT}}, - {"vkCmdWriteMicromapsPropertiesEXT", {kFuncTypeDev, (void*)CmdWriteMicromapsPropertiesEXT}}, - {"vkGetDeviceMicromapCompatibilityEXT", {kFuncTypeDev, (void*)GetDeviceMicromapCompatibilityEXT}}, - {"vkGetMicromapBuildSizesEXT", {kFuncTypeDev, (void*)GetMicromapBuildSizesEXT}}, - {"vkCmdDrawClusterHUAWEI", {kFuncTypeDev, (void*)CmdDrawClusterHUAWEI}}, - {"vkCmdDrawClusterIndirectHUAWEI", {kFuncTypeDev, (void*)CmdDrawClusterIndirectHUAWEI}}, - {"vkSetDeviceMemoryPriorityEXT", {kFuncTypeDev, (void*)SetDeviceMemoryPriorityEXT}}, - {"vkGetDescriptorSetLayoutHostMappingInfoVALVE", {kFuncTypeDev, (void*)GetDescriptorSetLayoutHostMappingInfoVALVE}}, - {"vkGetDescriptorSetHostMappingVALVE", {kFuncTypeDev, (void*)GetDescriptorSetHostMappingVALVE}}, - {"vkCmdCopyMemoryIndirectNV", {kFuncTypeDev, (void*)CmdCopyMemoryIndirectNV}}, - {"vkCmdCopyMemoryToImageIndirectNV", {kFuncTypeDev, (void*)CmdCopyMemoryToImageIndirectNV}}, - {"vkCmdDecompressMemoryNV", {kFuncTypeDev, (void*)CmdDecompressMemoryNV}}, - {"vkCmdDecompressMemoryIndirectCountNV", {kFuncTypeDev, (void*)CmdDecompressMemoryIndirectCountNV}}, - {"vkGetPipelineIndirectMemoryRequirementsNV", {kFuncTypeDev, (void*)GetPipelineIndirectMemoryRequirementsNV}}, - {"vkCmdUpdatePipelineIndirectBufferNV", {kFuncTypeDev, (void*)CmdUpdatePipelineIndirectBufferNV}}, - {"vkGetPipelineIndirectDeviceAddressNV", {kFuncTypeDev, (void*)GetPipelineIndirectDeviceAddressNV}}, - {"vkCmdSetDepthClampEnableEXT", {kFuncTypeDev, (void*)CmdSetDepthClampEnableEXT}}, - {"vkCmdSetPolygonModeEXT", {kFuncTypeDev, (void*)CmdSetPolygonModeEXT}}, - {"vkCmdSetRasterizationSamplesEXT", {kFuncTypeDev, (void*)CmdSetRasterizationSamplesEXT}}, - {"vkCmdSetSampleMaskEXT", {kFuncTypeDev, (void*)CmdSetSampleMaskEXT}}, - {"vkCmdSetAlphaToCoverageEnableEXT", {kFuncTypeDev, (void*)CmdSetAlphaToCoverageEnableEXT}}, - {"vkCmdSetAlphaToOneEnableEXT", {kFuncTypeDev, (void*)CmdSetAlphaToOneEnableEXT}}, - {"vkCmdSetLogicOpEnableEXT", {kFuncTypeDev, (void*)CmdSetLogicOpEnableEXT}}, - {"vkCmdSetColorBlendEnableEXT", {kFuncTypeDev, (void*)CmdSetColorBlendEnableEXT}}, - {"vkCmdSetColorBlendEquationEXT", {kFuncTypeDev, (void*)CmdSetColorBlendEquationEXT}}, - {"vkCmdSetColorWriteMaskEXT", {kFuncTypeDev, (void*)CmdSetColorWriteMaskEXT}}, - {"vkCmdSetTessellationDomainOriginEXT", {kFuncTypeDev, (void*)CmdSetTessellationDomainOriginEXT}}, - {"vkCmdSetRasterizationStreamEXT", {kFuncTypeDev, (void*)CmdSetRasterizationStreamEXT}}, - {"vkCmdSetConservativeRasterizationModeEXT", {kFuncTypeDev, (void*)CmdSetConservativeRasterizationModeEXT}}, - {"vkCmdSetExtraPrimitiveOverestimationSizeEXT", {kFuncTypeDev, (void*)CmdSetExtraPrimitiveOverestimationSizeEXT}}, - {"vkCmdSetDepthClipEnableEXT", {kFuncTypeDev, (void*)CmdSetDepthClipEnableEXT}}, - {"vkCmdSetSampleLocationsEnableEXT", {kFuncTypeDev, (void*)CmdSetSampleLocationsEnableEXT}}, - {"vkCmdSetColorBlendAdvancedEXT", {kFuncTypeDev, (void*)CmdSetColorBlendAdvancedEXT}}, - {"vkCmdSetProvokingVertexModeEXT", {kFuncTypeDev, (void*)CmdSetProvokingVertexModeEXT}}, - {"vkCmdSetLineRasterizationModeEXT", {kFuncTypeDev, (void*)CmdSetLineRasterizationModeEXT}}, - {"vkCmdSetLineStippleEnableEXT", {kFuncTypeDev, (void*)CmdSetLineStippleEnableEXT}}, - {"vkCmdSetDepthClipNegativeOneToOneEXT", {kFuncTypeDev, (void*)CmdSetDepthClipNegativeOneToOneEXT}}, - {"vkCmdSetViewportWScalingEnableNV", {kFuncTypeDev, (void*)CmdSetViewportWScalingEnableNV}}, - {"vkCmdSetViewportSwizzleNV", {kFuncTypeDev, (void*)CmdSetViewportSwizzleNV}}, - {"vkCmdSetCoverageToColorEnableNV", {kFuncTypeDev, (void*)CmdSetCoverageToColorEnableNV}}, - {"vkCmdSetCoverageToColorLocationNV", {kFuncTypeDev, (void*)CmdSetCoverageToColorLocationNV}}, - {"vkCmdSetCoverageModulationModeNV", {kFuncTypeDev, (void*)CmdSetCoverageModulationModeNV}}, - {"vkCmdSetCoverageModulationTableEnableNV", {kFuncTypeDev, (void*)CmdSetCoverageModulationTableEnableNV}}, - {"vkCmdSetCoverageModulationTableNV", {kFuncTypeDev, (void*)CmdSetCoverageModulationTableNV}}, - {"vkCmdSetShadingRateImageEnableNV", {kFuncTypeDev, (void*)CmdSetShadingRateImageEnableNV}}, - {"vkCmdSetRepresentativeFragmentTestEnableNV", {kFuncTypeDev, (void*)CmdSetRepresentativeFragmentTestEnableNV}}, - {"vkCmdSetCoverageReductionModeNV", {kFuncTypeDev, (void*)CmdSetCoverageReductionModeNV}}, - {"vkGetShaderModuleIdentifierEXT", {kFuncTypeDev, (void*)GetShaderModuleIdentifierEXT}}, - {"vkGetShaderModuleCreateInfoIdentifierEXT", {kFuncTypeDev, (void*)GetShaderModuleCreateInfoIdentifierEXT}}, - {"vkGetPhysicalDeviceOpticalFlowImageFormatsNV", {kFuncTypePdev, (void*)GetPhysicalDeviceOpticalFlowImageFormatsNV}}, - {"vkCreateOpticalFlowSessionNV", {kFuncTypeDev, (void*)CreateOpticalFlowSessionNV}}, - {"vkDestroyOpticalFlowSessionNV", {kFuncTypeDev, (void*)DestroyOpticalFlowSessionNV}}, - {"vkBindOpticalFlowSessionImageNV", {kFuncTypeDev, (void*)BindOpticalFlowSessionImageNV}}, - {"vkCmdOpticalFlowExecuteNV", {kFuncTypeDev, (void*)CmdOpticalFlowExecuteNV}}, - {"vkAntiLagUpdateAMD", {kFuncTypeDev, (void*)AntiLagUpdateAMD}}, - {"vkCreateShadersEXT", {kFuncTypeDev, (void*)CreateShadersEXT}}, - {"vkDestroyShaderEXT", {kFuncTypeDev, (void*)DestroyShaderEXT}}, - {"vkGetShaderBinaryDataEXT", {kFuncTypeDev, (void*)GetShaderBinaryDataEXT}}, - {"vkCmdBindShadersEXT", {kFuncTypeDev, (void*)CmdBindShadersEXT}}, - {"vkCmdSetDepthClampRangeEXT", {kFuncTypeDev, (void*)CmdSetDepthClampRangeEXT}}, - {"vkGetFramebufferTilePropertiesQCOM", {kFuncTypeDev, (void*)GetFramebufferTilePropertiesQCOM}}, - {"vkGetDynamicRenderingTilePropertiesQCOM", {kFuncTypeDev, (void*)GetDynamicRenderingTilePropertiesQCOM}}, - {"vkSetLatencySleepModeNV", {kFuncTypeDev, (void*)SetLatencySleepModeNV}}, - {"vkLatencySleepNV", {kFuncTypeDev, (void*)LatencySleepNV}}, - {"vkSetLatencyMarkerNV", {kFuncTypeDev, (void*)SetLatencyMarkerNV}}, - {"vkGetLatencyTimingsNV", {kFuncTypeDev, (void*)GetLatencyTimingsNV}}, - {"vkQueueNotifyOutOfBandNV", {kFuncTypeDev, (void*)QueueNotifyOutOfBandNV}}, - {"vkCmdSetAttachmentFeedbackLoopEnableEXT", {kFuncTypeDev, (void*)CmdSetAttachmentFeedbackLoopEnableEXT}}, + {"vkCmdSetColorWriteEnableEXT", {kFuncTypeDev, (void*)CmdSetColorWriteEnableEXT}}, + {"vkCmdDrawMultiEXT", {kFuncTypeDev, (void*)CmdDrawMultiEXT}}, + {"vkCmdDrawMultiIndexedEXT", {kFuncTypeDev, (void*)CmdDrawMultiIndexedEXT}}, + {"vkCreateMicromapEXT", {kFuncTypeDev, (void*)CreateMicromapEXT}}, + {"vkDestroyMicromapEXT", {kFuncTypeDev, (void*)DestroyMicromapEXT}}, + {"vkCmdBuildMicromapsEXT", {kFuncTypeDev, (void*)CmdBuildMicromapsEXT}}, + {"vkBuildMicromapsEXT", {kFuncTypeDev, (void*)BuildMicromapsEXT}}, + {"vkCopyMicromapEXT", {kFuncTypeDev, (void*)CopyMicromapEXT}}, + {"vkCopyMicromapToMemoryEXT", {kFuncTypeDev, (void*)CopyMicromapToMemoryEXT}}, + {"vkCopyMemoryToMicromapEXT", {kFuncTypeDev, (void*)CopyMemoryToMicromapEXT}}, + {"vkWriteMicromapsPropertiesEXT", {kFuncTypeDev, (void*)WriteMicromapsPropertiesEXT}}, + {"vkCmdCopyMicromapEXT", {kFuncTypeDev, (void*)CmdCopyMicromapEXT}}, + {"vkCmdCopyMicromapToMemoryEXT", {kFuncTypeDev, (void*)CmdCopyMicromapToMemoryEXT}}, + {"vkCmdCopyMemoryToMicromapEXT", {kFuncTypeDev, (void*)CmdCopyMemoryToMicromapEXT}}, + {"vkCmdWriteMicromapsPropertiesEXT", {kFuncTypeDev, (void*)CmdWriteMicromapsPropertiesEXT}}, + {"vkGetDeviceMicromapCompatibilityEXT", {kFuncTypeDev, (void*)GetDeviceMicromapCompatibilityEXT}}, + {"vkGetMicromapBuildSizesEXT", {kFuncTypeDev, (void*)GetMicromapBuildSizesEXT}}, + {"vkCmdDrawClusterHUAWEI", {kFuncTypeDev, (void*)CmdDrawClusterHUAWEI}}, + {"vkCmdDrawClusterIndirectHUAWEI", {kFuncTypeDev, (void*)CmdDrawClusterIndirectHUAWEI}}, + {"vkSetDeviceMemoryPriorityEXT", {kFuncTypeDev, (void*)SetDeviceMemoryPriorityEXT}}, + {"vkGetDescriptorSetLayoutHostMappingInfoVALVE", {kFuncTypeDev, (void*)GetDescriptorSetLayoutHostMappingInfoVALVE}}, + {"vkGetDescriptorSetHostMappingVALVE", {kFuncTypeDev, (void*)GetDescriptorSetHostMappingVALVE}}, + {"vkCmdCopyMemoryIndirectNV", {kFuncTypeDev, (void*)CmdCopyMemoryIndirectNV}}, + {"vkCmdCopyMemoryToImageIndirectNV", {kFuncTypeDev, (void*)CmdCopyMemoryToImageIndirectNV}}, + {"vkCmdDecompressMemoryNV", {kFuncTypeDev, (void*)CmdDecompressMemoryNV}}, + {"vkCmdDecompressMemoryIndirectCountNV", {kFuncTypeDev, (void*)CmdDecompressMemoryIndirectCountNV}}, + {"vkGetPipelineIndirectMemoryRequirementsNV", {kFuncTypeDev, (void*)GetPipelineIndirectMemoryRequirementsNV}}, + {"vkCmdUpdatePipelineIndirectBufferNV", {kFuncTypeDev, (void*)CmdUpdatePipelineIndirectBufferNV}}, + {"vkGetPipelineIndirectDeviceAddressNV", {kFuncTypeDev, (void*)GetPipelineIndirectDeviceAddressNV}}, + {"vkCmdSetDepthClampEnableEXT", {kFuncTypeDev, (void*)CmdSetDepthClampEnableEXT}}, + {"vkCmdSetPolygonModeEXT", {kFuncTypeDev, (void*)CmdSetPolygonModeEXT}}, + {"vkCmdSetRasterizationSamplesEXT", {kFuncTypeDev, (void*)CmdSetRasterizationSamplesEXT}}, + {"vkCmdSetSampleMaskEXT", {kFuncTypeDev, (void*)CmdSetSampleMaskEXT}}, + {"vkCmdSetAlphaToCoverageEnableEXT", {kFuncTypeDev, (void*)CmdSetAlphaToCoverageEnableEXT}}, + {"vkCmdSetAlphaToOneEnableEXT", {kFuncTypeDev, (void*)CmdSetAlphaToOneEnableEXT}}, + {"vkCmdSetLogicOpEnableEXT", {kFuncTypeDev, (void*)CmdSetLogicOpEnableEXT}}, + {"vkCmdSetColorBlendEnableEXT", {kFuncTypeDev, (void*)CmdSetColorBlendEnableEXT}}, + {"vkCmdSetColorBlendEquationEXT", {kFuncTypeDev, (void*)CmdSetColorBlendEquationEXT}}, + {"vkCmdSetColorWriteMaskEXT", {kFuncTypeDev, (void*)CmdSetColorWriteMaskEXT}}, + {"vkCmdSetTessellationDomainOriginEXT", {kFuncTypeDev, (void*)CmdSetTessellationDomainOriginEXT}}, + {"vkCmdSetRasterizationStreamEXT", {kFuncTypeDev, (void*)CmdSetRasterizationStreamEXT}}, + {"vkCmdSetConservativeRasterizationModeEXT", {kFuncTypeDev, (void*)CmdSetConservativeRasterizationModeEXT}}, + {"vkCmdSetExtraPrimitiveOverestimationSizeEXT", {kFuncTypeDev, (void*)CmdSetExtraPrimitiveOverestimationSizeEXT}}, + {"vkCmdSetDepthClipEnableEXT", {kFuncTypeDev, (void*)CmdSetDepthClipEnableEXT}}, + {"vkCmdSetSampleLocationsEnableEXT", {kFuncTypeDev, (void*)CmdSetSampleLocationsEnableEXT}}, + {"vkCmdSetColorBlendAdvancedEXT", {kFuncTypeDev, (void*)CmdSetColorBlendAdvancedEXT}}, + {"vkCmdSetProvokingVertexModeEXT", {kFuncTypeDev, (void*)CmdSetProvokingVertexModeEXT}}, + {"vkCmdSetLineRasterizationModeEXT", {kFuncTypeDev, (void*)CmdSetLineRasterizationModeEXT}}, + {"vkCmdSetLineStippleEnableEXT", {kFuncTypeDev, (void*)CmdSetLineStippleEnableEXT}}, + {"vkCmdSetDepthClipNegativeOneToOneEXT", {kFuncTypeDev, (void*)CmdSetDepthClipNegativeOneToOneEXT}}, + {"vkCmdSetViewportWScalingEnableNV", {kFuncTypeDev, (void*)CmdSetViewportWScalingEnableNV}}, + {"vkCmdSetViewportSwizzleNV", {kFuncTypeDev, (void*)CmdSetViewportSwizzleNV}}, + {"vkCmdSetCoverageToColorEnableNV", {kFuncTypeDev, (void*)CmdSetCoverageToColorEnableNV}}, + {"vkCmdSetCoverageToColorLocationNV", {kFuncTypeDev, (void*)CmdSetCoverageToColorLocationNV}}, + {"vkCmdSetCoverageModulationModeNV", {kFuncTypeDev, (void*)CmdSetCoverageModulationModeNV}}, + {"vkCmdSetCoverageModulationTableEnableNV", {kFuncTypeDev, (void*)CmdSetCoverageModulationTableEnableNV}}, + {"vkCmdSetCoverageModulationTableNV", {kFuncTypeDev, (void*)CmdSetCoverageModulationTableNV}}, + {"vkCmdSetShadingRateImageEnableNV", {kFuncTypeDev, (void*)CmdSetShadingRateImageEnableNV}}, + {"vkCmdSetRepresentativeFragmentTestEnableNV", {kFuncTypeDev, (void*)CmdSetRepresentativeFragmentTestEnableNV}}, + {"vkCmdSetCoverageReductionModeNV", {kFuncTypeDev, (void*)CmdSetCoverageReductionModeNV}}, + {"vkGetShaderModuleIdentifierEXT", {kFuncTypeDev, (void*)GetShaderModuleIdentifierEXT}}, + {"vkGetShaderModuleCreateInfoIdentifierEXT", {kFuncTypeDev, (void*)GetShaderModuleCreateInfoIdentifierEXT}}, + {"vkGetPhysicalDeviceOpticalFlowImageFormatsNV", {kFuncTypePdev, (void*)GetPhysicalDeviceOpticalFlowImageFormatsNV}}, + {"vkCreateOpticalFlowSessionNV", {kFuncTypeDev, (void*)CreateOpticalFlowSessionNV}}, + {"vkDestroyOpticalFlowSessionNV", {kFuncTypeDev, (void*)DestroyOpticalFlowSessionNV}}, + {"vkBindOpticalFlowSessionImageNV", {kFuncTypeDev, (void*)BindOpticalFlowSessionImageNV}}, + {"vkCmdOpticalFlowExecuteNV", {kFuncTypeDev, (void*)CmdOpticalFlowExecuteNV}}, + {"vkAntiLagUpdateAMD", {kFuncTypeDev, (void*)AntiLagUpdateAMD}}, + {"vkCreateShadersEXT", {kFuncTypeDev, (void*)CreateShadersEXT}}, + {"vkDestroyShaderEXT", {kFuncTypeDev, (void*)DestroyShaderEXT}}, + {"vkGetShaderBinaryDataEXT", {kFuncTypeDev, (void*)GetShaderBinaryDataEXT}}, + {"vkCmdBindShadersEXT", {kFuncTypeDev, (void*)CmdBindShadersEXT}}, + {"vkCmdSetDepthClampRangeEXT", {kFuncTypeDev, (void*)CmdSetDepthClampRangeEXT}}, + {"vkGetFramebufferTilePropertiesQCOM", {kFuncTypeDev, (void*)GetFramebufferTilePropertiesQCOM}}, + {"vkGetDynamicRenderingTilePropertiesQCOM", {kFuncTypeDev, (void*)GetDynamicRenderingTilePropertiesQCOM}}, + {"vkSetLatencySleepModeNV", {kFuncTypeDev, (void*)SetLatencySleepModeNV}}, + {"vkLatencySleepNV", {kFuncTypeDev, (void*)LatencySleepNV}}, + {"vkSetLatencyMarkerNV", {kFuncTypeDev, (void*)SetLatencyMarkerNV}}, + {"vkGetLatencyTimingsNV", {kFuncTypeDev, (void*)GetLatencyTimingsNV}}, + {"vkQueueNotifyOutOfBandNV", {kFuncTypeDev, (void*)QueueNotifyOutOfBandNV}}, + {"vkCmdSetAttachmentFeedbackLoopEnableEXT", {kFuncTypeDev, (void*)CmdSetAttachmentFeedbackLoopEnableEXT}}, #ifdef VK_USE_PLATFORM_SCREEN_QNX - {"vkGetScreenBufferPropertiesQNX", {kFuncTypeDev, (void*)GetScreenBufferPropertiesQNX}}, + {"vkGetScreenBufferPropertiesQNX", {kFuncTypeDev, (void*)GetScreenBufferPropertiesQNX}}, #endif // VK_USE_PLATFORM_SCREEN_QNX - {"vkGetGeneratedCommandsMemoryRequirementsEXT", {kFuncTypeDev, (void*)GetGeneratedCommandsMemoryRequirementsEXT}}, - {"vkCmdPreprocessGeneratedCommandsEXT", {kFuncTypeDev, (void*)CmdPreprocessGeneratedCommandsEXT}}, - {"vkCmdExecuteGeneratedCommandsEXT", {kFuncTypeDev, (void*)CmdExecuteGeneratedCommandsEXT}}, - {"vkCreateIndirectCommandsLayoutEXT", {kFuncTypeDev, (void*)CreateIndirectCommandsLayoutEXT}}, - {"vkDestroyIndirectCommandsLayoutEXT", {kFuncTypeDev, (void*)DestroyIndirectCommandsLayoutEXT}}, - {"vkCreateIndirectExecutionSetEXT", {kFuncTypeDev, (void*)CreateIndirectExecutionSetEXT}}, - {"vkDestroyIndirectExecutionSetEXT", {kFuncTypeDev, (void*)DestroyIndirectExecutionSetEXT}}, - {"vkUpdateIndirectExecutionSetPipelineEXT", {kFuncTypeDev, (void*)UpdateIndirectExecutionSetPipelineEXT}}, - {"vkUpdateIndirectExecutionSetShaderEXT", {kFuncTypeDev, (void*)UpdateIndirectExecutionSetShaderEXT}}, - {"vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV", {kFuncTypePdev, (void*)GetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV}}, - {"vkCreateAccelerationStructureKHR", {kFuncTypeDev, (void*)CreateAccelerationStructureKHR}}, - {"vkDestroyAccelerationStructureKHR", {kFuncTypeDev, (void*)DestroyAccelerationStructureKHR}}, - {"vkCmdBuildAccelerationStructuresKHR", {kFuncTypeDev, (void*)CmdBuildAccelerationStructuresKHR}}, - {"vkCmdBuildAccelerationStructuresIndirectKHR", {kFuncTypeDev, (void*)CmdBuildAccelerationStructuresIndirectKHR}}, - {"vkBuildAccelerationStructuresKHR", {kFuncTypeDev, (void*)BuildAccelerationStructuresKHR}}, - {"vkCopyAccelerationStructureKHR", {kFuncTypeDev, (void*)CopyAccelerationStructureKHR}}, - {"vkCopyAccelerationStructureToMemoryKHR", {kFuncTypeDev, (void*)CopyAccelerationStructureToMemoryKHR}}, - {"vkCopyMemoryToAccelerationStructureKHR", {kFuncTypeDev, (void*)CopyMemoryToAccelerationStructureKHR}}, - {"vkWriteAccelerationStructuresPropertiesKHR", {kFuncTypeDev, (void*)WriteAccelerationStructuresPropertiesKHR}}, - {"vkCmdCopyAccelerationStructureKHR", {kFuncTypeDev, (void*)CmdCopyAccelerationStructureKHR}}, - {"vkCmdCopyAccelerationStructureToMemoryKHR", {kFuncTypeDev, (void*)CmdCopyAccelerationStructureToMemoryKHR}}, - {"vkCmdCopyMemoryToAccelerationStructureKHR", {kFuncTypeDev, (void*)CmdCopyMemoryToAccelerationStructureKHR}}, - {"vkGetAccelerationStructureDeviceAddressKHR", {kFuncTypeDev, (void*)GetAccelerationStructureDeviceAddressKHR}}, - {"vkCmdWriteAccelerationStructuresPropertiesKHR", {kFuncTypeDev, (void*)CmdWriteAccelerationStructuresPropertiesKHR}}, - {"vkGetDeviceAccelerationStructureCompatibilityKHR", {kFuncTypeDev, (void*)GetDeviceAccelerationStructureCompatibilityKHR}}, - {"vkGetAccelerationStructureBuildSizesKHR", {kFuncTypeDev, (void*)GetAccelerationStructureBuildSizesKHR}}, - {"vkCmdTraceRaysKHR", {kFuncTypeDev, (void*)CmdTraceRaysKHR}}, - {"vkCreateRayTracingPipelinesKHR", {kFuncTypeDev, (void*)CreateRayTracingPipelinesKHR}}, - {"vkGetRayTracingCaptureReplayShaderGroupHandlesKHR", {kFuncTypeDev, (void*)GetRayTracingCaptureReplayShaderGroupHandlesKHR}}, - {"vkCmdTraceRaysIndirectKHR", {kFuncTypeDev, (void*)CmdTraceRaysIndirectKHR}}, - {"vkGetRayTracingShaderGroupStackSizeKHR", {kFuncTypeDev, (void*)GetRayTracingShaderGroupStackSizeKHR}}, - {"vkCmdSetRayTracingPipelineStackSizeKHR", {kFuncTypeDev, (void*)CmdSetRayTracingPipelineStackSizeKHR}}, - {"vkCmdDrawMeshTasksEXT", {kFuncTypeDev, (void*)CmdDrawMeshTasksEXT}}, - {"vkCmdDrawMeshTasksIndirectEXT", {kFuncTypeDev, (void*)CmdDrawMeshTasksIndirectEXT}}, - {"vkCmdDrawMeshTasksIndirectCountEXT", {kFuncTypeDev, (void*)CmdDrawMeshTasksIndirectCountEXT}}, -}; - return name_to_func_ptr_map; + {"vkGetGeneratedCommandsMemoryRequirementsEXT", {kFuncTypeDev, (void*)GetGeneratedCommandsMemoryRequirementsEXT}}, + {"vkCmdPreprocessGeneratedCommandsEXT", {kFuncTypeDev, (void*)CmdPreprocessGeneratedCommandsEXT}}, + {"vkCmdExecuteGeneratedCommandsEXT", {kFuncTypeDev, (void*)CmdExecuteGeneratedCommandsEXT}}, + {"vkCreateIndirectCommandsLayoutEXT", {kFuncTypeDev, (void*)CreateIndirectCommandsLayoutEXT}}, + {"vkDestroyIndirectCommandsLayoutEXT", {kFuncTypeDev, (void*)DestroyIndirectCommandsLayoutEXT}}, + {"vkCreateIndirectExecutionSetEXT", {kFuncTypeDev, (void*)CreateIndirectExecutionSetEXT}}, + {"vkDestroyIndirectExecutionSetEXT", {kFuncTypeDev, (void*)DestroyIndirectExecutionSetEXT}}, + {"vkUpdateIndirectExecutionSetPipelineEXT", {kFuncTypeDev, (void*)UpdateIndirectExecutionSetPipelineEXT}}, + {"vkUpdateIndirectExecutionSetShaderEXT", {kFuncTypeDev, (void*)UpdateIndirectExecutionSetShaderEXT}}, + {"vkGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV", + {kFuncTypePdev, (void*)GetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV}}, + {"vkCreateAccelerationStructureKHR", {kFuncTypeDev, (void*)CreateAccelerationStructureKHR}}, + {"vkDestroyAccelerationStructureKHR", {kFuncTypeDev, (void*)DestroyAccelerationStructureKHR}}, + {"vkCmdBuildAccelerationStructuresKHR", {kFuncTypeDev, (void*)CmdBuildAccelerationStructuresKHR}}, + {"vkCmdBuildAccelerationStructuresIndirectKHR", {kFuncTypeDev, (void*)CmdBuildAccelerationStructuresIndirectKHR}}, + {"vkBuildAccelerationStructuresKHR", {kFuncTypeDev, (void*)BuildAccelerationStructuresKHR}}, + {"vkCopyAccelerationStructureKHR", {kFuncTypeDev, (void*)CopyAccelerationStructureKHR}}, + {"vkCopyAccelerationStructureToMemoryKHR", {kFuncTypeDev, (void*)CopyAccelerationStructureToMemoryKHR}}, + {"vkCopyMemoryToAccelerationStructureKHR", {kFuncTypeDev, (void*)CopyMemoryToAccelerationStructureKHR}}, + {"vkWriteAccelerationStructuresPropertiesKHR", {kFuncTypeDev, (void*)WriteAccelerationStructuresPropertiesKHR}}, + {"vkCmdCopyAccelerationStructureKHR", {kFuncTypeDev, (void*)CmdCopyAccelerationStructureKHR}}, + {"vkCmdCopyAccelerationStructureToMemoryKHR", {kFuncTypeDev, (void*)CmdCopyAccelerationStructureToMemoryKHR}}, + {"vkCmdCopyMemoryToAccelerationStructureKHR", {kFuncTypeDev, (void*)CmdCopyMemoryToAccelerationStructureKHR}}, + {"vkGetAccelerationStructureDeviceAddressKHR", {kFuncTypeDev, (void*)GetAccelerationStructureDeviceAddressKHR}}, + {"vkCmdWriteAccelerationStructuresPropertiesKHR", {kFuncTypeDev, (void*)CmdWriteAccelerationStructuresPropertiesKHR}}, + {"vkGetDeviceAccelerationStructureCompatibilityKHR", {kFuncTypeDev, (void*)GetDeviceAccelerationStructureCompatibilityKHR}}, + {"vkGetAccelerationStructureBuildSizesKHR", {kFuncTypeDev, (void*)GetAccelerationStructureBuildSizesKHR}}, + {"vkCmdTraceRaysKHR", {kFuncTypeDev, (void*)CmdTraceRaysKHR}}, + {"vkCreateRayTracingPipelinesKHR", {kFuncTypeDev, (void*)CreateRayTracingPipelinesKHR}}, + {"vkGetRayTracingCaptureReplayShaderGroupHandlesKHR", + {kFuncTypeDev, (void*)GetRayTracingCaptureReplayShaderGroupHandlesKHR}}, + {"vkCmdTraceRaysIndirectKHR", {kFuncTypeDev, (void*)CmdTraceRaysIndirectKHR}}, + {"vkGetRayTracingShaderGroupStackSizeKHR", {kFuncTypeDev, (void*)GetRayTracingShaderGroupStackSizeKHR}}, + {"vkCmdSetRayTracingPipelineStackSizeKHR", {kFuncTypeDev, (void*)CmdSetRayTracingPipelineStackSizeKHR}}, + {"vkCmdDrawMeshTasksEXT", {kFuncTypeDev, (void*)CmdDrawMeshTasksEXT}}, + {"vkCmdDrawMeshTasksIndirectEXT", {kFuncTypeDev, (void*)CmdDrawMeshTasksIndirectEXT}}, + {"vkCmdDrawMeshTasksIndirectCountEXT", {kFuncTypeDev, (void*)CmdDrawMeshTasksIndirectCountEXT}}, + }; + return name_to_func_ptr_map; } -} // namespace vulkan_layer_chassis -// clang-format on +} // namespace vulkan_layer_chassis VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_layerGetPhysicalDeviceProcAddr(VkInstance instance, const char* funcName) { return vulkan_layer_chassis::GetPhysicalDeviceProcAddr(instance, funcName); diff --git a/layers/vulkan/generated/chassis.h b/layers/vulkan/generated/chassis.h deleted file mode 100644 index c51b3c99873..00000000000 --- a/layers/vulkan/generated/chassis.h +++ /dev/null @@ -1,4815 +0,0 @@ -// *** THIS FILE IS GENERATED - DO NOT EDIT *** -// See layer_chassis_generator.py for modifications - -/*************************************************************************** - * - * Copyright (c) 2015-2024 The Khronos Group Inc. - * Copyright (c) 2015-2024 Valve Corporation - * Copyright (c) 2015-2024 LunarG, Inc. - * Copyright (c) 2015-2024 Google Inc. - * Copyright (c) 2023-2024 RasterGrid Kft. - * - * 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. - ****************************************************************************/ - -// NOLINTBEGIN - -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include "utils/cast_utils.h" -#include "layer_options.h" -#include "containers/custom_containers.h" -#include "error_message/logging.h" -#include "error_message/error_location.h" -#include "error_message/record_object.h" -#include "error_message/log_message_type.h" -#include "utils/vk_layer_extension_utils.h" -#include "utils/vk_layer_utils.h" -#include "vk_dispatch_table_helper.h" -#include "vk_extension_helper.h" -#include "gpu/core/gpuav_settings.h" -#include "sync/sync_settings.h" - -extern std::atomic global_unique_id; - -// To avoid re-hashing unique ids on each use, we precompute the hash and store the -// hash's LSBs in the high 24 bits. -struct HashedUint64 { - static const int HASHED_UINT64_SHIFT = 40; - size_t operator()(const uint64_t& t) const { return t >> HASHED_UINT64_SHIFT; } - - static uint64_t hash(uint64_t id) { - uint64_t h = (uint64_t)vvl::hash()(id); - id |= h << HASHED_UINT64_SHIFT; - return id; - } -}; - -namespace chassis { -struct CreateGraphicsPipelines; -struct CreateComputePipelines; -struct CreateRayTracingPipelinesNV; -struct CreateRayTracingPipelinesKHR; -struct CreateShaderModule; -struct ShaderObject; -struct CreatePipelineLayout; -struct CreateBuffer; -} // namespace chassis - -namespace vvl { -struct AllocateDescriptorSetsData; -class Pipeline; -} // namespace vvl - -// Because of GPL, we currently create our Pipeline state objects before the PreCallValidate -// Each chassis layer will need to track its own state -using PipelineStates = std::vector>; - -extern vvl::concurrent_unordered_map unique_id_mapping; - -std::vector>& GetCustomStypeInfo(); - -VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetPhysicalDeviceProcAddr(VkInstance instance, const char* funcName); - -VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkInstance* pInstance); - -VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount, - VkPhysicalDevice* pPhysicalDevices); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, - VkFormatProperties* pFormatProperties); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, - VkImageType type, VkImageTiling tiling, - VkImageUsageFlags usage, VkImageCreateFlags flags, - VkImageFormatProperties* pImageFormatProperties); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, - uint32_t* pQueueFamilyPropertyCount, - VkQueueFamilyProperties* pQueueFamilyProperties); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, - VkPhysicalDeviceMemoryProperties* pMemoryProperties); - -VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetInstanceProcAddr(VkInstance instance, const char* pName); - -VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetDeviceProcAddr(VkDevice device, const char* pName); - -VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkDevice* pDevice); - -VKAPI_ATTR void VKAPI_CALL DestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL EnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pPropertyCount, - VkExtensionProperties* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, - uint32_t* pPropertyCount, VkExtensionProperties* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL EnumerateInstanceLayerProperties(uint32_t* pPropertyCount, VkLayerProperties* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, - VkLayerProperties* pProperties); - -VKAPI_ATTR void VKAPI_CALL GetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue); - -VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence); - -VKAPI_ATTR VkResult VKAPI_CALL QueueWaitIdle(VkQueue queue); - -VKAPI_ATTR VkResult VKAPI_CALL DeviceWaitIdle(VkDevice device); - -VKAPI_ATTR VkResult VKAPI_CALL AllocateMemory(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, - const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory); - -VKAPI_ATTR void VKAPI_CALL FreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL MapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, - VkMemoryMapFlags flags, void** ppData); - -VKAPI_ATTR void VKAPI_CALL UnmapMemory(VkDevice device, VkDeviceMemory memory); - -VKAPI_ATTR VkResult VKAPI_CALL FlushMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, - const VkMappedMemoryRange* pMemoryRanges); - -VKAPI_ATTR VkResult VKAPI_CALL InvalidateMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, - const VkMappedMemoryRange* pMemoryRanges); - -VKAPI_ATTR void VKAPI_CALL GetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes); - -VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset); - -VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset); - -VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements* pSparseMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, - VkImageType type, VkSampleCountFlagBits samples, - VkImageUsageFlags usage, VkImageTiling tiling, - uint32_t* pPropertyCount, - VkSparseImageFormatProperties* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL QueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, - VkFence fence); - -VKAPI_ATTR VkResult VKAPI_CALL CreateFence(VkDevice device, const VkFenceCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkFence* pFence); - -VKAPI_ATTR void VKAPI_CALL DestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL ResetFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences); - -VKAPI_ATTR VkResult VKAPI_CALL GetFenceStatus(VkDevice device, VkFence fence); - -VKAPI_ATTR VkResult VKAPI_CALL WaitForFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, - uint64_t timeout); - -VKAPI_ATTR VkResult VKAPI_CALL CreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore); - -VKAPI_ATTR void VKAPI_CALL DestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL CreateEvent(VkDevice device, const VkEventCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkEvent* pEvent); - -VKAPI_ATTR void VKAPI_CALL DestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL GetEventStatus(VkDevice device, VkEvent event); - -VKAPI_ATTR VkResult VKAPI_CALL SetEvent(VkDevice device, VkEvent event); - -VKAPI_ATTR VkResult VKAPI_CALL ResetEvent(VkDevice device, VkEvent event); - -VKAPI_ATTR VkResult VKAPI_CALL CreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool); - -VKAPI_ATTR void VKAPI_CALL DestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL GetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, - size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags); - -VKAPI_ATTR VkResult VKAPI_CALL CreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer); - -VKAPI_ATTR void VKAPI_CALL DestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL CreateBufferView(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkBufferView* pView); - -VKAPI_ATTR void VKAPI_CALL DestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL CreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkImage* pImage); - -VKAPI_ATTR void VKAPI_CALL DestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, - VkSubresourceLayout* pLayout); - -VKAPI_ATTR VkResult VKAPI_CALL CreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkImageView* pView); - -VKAPI_ATTR void VKAPI_CALL DestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL CreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule); - -VKAPI_ATTR void VKAPI_CALL DestroyShaderModule(VkDevice device, VkShaderModule shaderModule, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache); - -VKAPI_ATTR void VKAPI_CALL DestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL GetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData); - -VKAPI_ATTR VkResult VKAPI_CALL MergePipelineCaches(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, - const VkPipelineCache* pSrcCaches); - -VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, - const VkGraphicsPipelineCreateInfo* pCreateInfos, - const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); - -VKAPI_ATTR VkResult VKAPI_CALL CreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, - const VkComputePipelineCreateInfo* pCreateInfos, - const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); - -VKAPI_ATTR void VKAPI_CALL DestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout); - -VKAPI_ATTR void VKAPI_CALL DestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL CreateSampler(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSampler* pSampler); - -VKAPI_ATTR void VKAPI_CALL DestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkDescriptorSetLayout* pSetLayout); - -VKAPI_ATTR void VKAPI_CALL DestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool); - -VKAPI_ATTR void VKAPI_CALL DestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL ResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, - VkDescriptorPoolResetFlags flags); - -VKAPI_ATTR VkResult VKAPI_CALL AllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, - VkDescriptorSet* pDescriptorSets); - -VKAPI_ATTR VkResult VKAPI_CALL FreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, - const VkDescriptorSet* pDescriptorSets); - -VKAPI_ATTR void VKAPI_CALL UpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, - const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, - const VkCopyDescriptorSet* pDescriptorCopies); - -VKAPI_ATTR VkResult VKAPI_CALL CreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer); - -VKAPI_ATTR void VKAPI_CALL DestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass); - -VKAPI_ATTR void VKAPI_CALL DestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR void VKAPI_CALL GetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity); - -VKAPI_ATTR VkResult VKAPI_CALL CreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool); - -VKAPI_ATTR void VKAPI_CALL DestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL ResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags); - -VKAPI_ATTR VkResult VKAPI_CALL AllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, - VkCommandBuffer* pCommandBuffers); - -VKAPI_ATTR void VKAPI_CALL FreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, - const VkCommandBuffer* pCommandBuffers); - -VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo); - -VKAPI_ATTR VkResult VKAPI_CALL EndCommandBuffer(VkCommandBuffer commandBuffer); - -VKAPI_ATTR VkResult VKAPI_CALL ResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags); - -VKAPI_ATTR void VKAPI_CALL CmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, - VkPipeline pipeline); - -VKAPI_ATTR void VKAPI_CALL CmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, - const VkViewport* pViewports); - -VKAPI_ATTR void VKAPI_CALL CmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, - const VkRect2D* pScissors); - -VKAPI_ATTR void VKAPI_CALL CmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth); - -VKAPI_ATTR void VKAPI_CALL CmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, - float depthBiasSlopeFactor); - -VKAPI_ATTR void VKAPI_CALL CmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4]); - -VKAPI_ATTR void VKAPI_CALL CmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds); - -VKAPI_ATTR void VKAPI_CALL CmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, - uint32_t compareMask); - -VKAPI_ATTR void VKAPI_CALL CmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask); - -VKAPI_ATTR void VKAPI_CALL CmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference); - -VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, - VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, - const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, - const uint32_t* pDynamicOffsets); - -VKAPI_ATTR void VKAPI_CALL CmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, - VkIndexType indexType); - -VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, - const VkBuffer* pBuffers, const VkDeviceSize* pOffsets); - -VKAPI_ATTR void VKAPI_CALL CmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, - uint32_t firstVertex, uint32_t firstInstance); - -VKAPI_ATTR void VKAPI_CALL CmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, - uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance); - -VKAPI_ATTR void VKAPI_CALL CmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, - uint32_t stride); - -VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, - uint32_t drawCount, uint32_t stride); - -VKAPI_ATTR void VKAPI_CALL CmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, - uint32_t groupCountZ); - -VKAPI_ATTR void VKAPI_CALL CmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset); - -VKAPI_ATTR void VKAPI_CALL CmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, - uint32_t regionCount, const VkBufferCopy* pRegions); - -VKAPI_ATTR void VKAPI_CALL CmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, - VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, - const VkImageCopy* pRegions); - -VKAPI_ATTR void VKAPI_CALL CmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, - VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, - const VkImageBlit* pRegions, VkFilter filter); - -VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, - VkImageLayout dstImageLayout, uint32_t regionCount, - const VkBufferImageCopy* pRegions); - -VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, - VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions); - -VKAPI_ATTR void VKAPI_CALL CmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, - VkDeviceSize dataSize, const void* pData); - -VKAPI_ATTR void VKAPI_CALL CmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, - VkDeviceSize size, uint32_t data); - -VKAPI_ATTR void VKAPI_CALL CmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, - const VkClearColorValue* pColor, uint32_t rangeCount, - const VkImageSubresourceRange* pRanges); - -VKAPI_ATTR void VKAPI_CALL CmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, - const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, - const VkImageSubresourceRange* pRanges); - -VKAPI_ATTR void VKAPI_CALL CmdClearAttachments(VkCommandBuffer commandBuffer, uint32_t attachmentCount, - const VkClearAttachment* pAttachments, uint32_t rectCount, - const VkClearRect* pRects); - -VKAPI_ATTR void VKAPI_CALL CmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, - VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, - const VkImageResolve* pRegions); - -VKAPI_ATTR void VKAPI_CALL CmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask); - -VKAPI_ATTR void VKAPI_CALL CmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask); - -VKAPI_ATTR void VKAPI_CALL CmdWaitEvents(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); - -VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier(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); - -VKAPI_ATTR void VKAPI_CALL CmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, - VkQueryControlFlags flags); - -VKAPI_ATTR void VKAPI_CALL CmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query); - -VKAPI_ATTR void VKAPI_CALL CmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, - uint32_t queryCount); - -VKAPI_ATTR void VKAPI_CALL CmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, - VkQueryPool queryPool, uint32_t query); - -VKAPI_ATTR void VKAPI_CALL CmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, - uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, - VkDeviceSize stride, VkQueryResultFlags flags); - -VKAPI_ATTR void VKAPI_CALL CmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, - uint32_t offset, uint32_t size, const void* pValues); - -VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, - VkSubpassContents contents); - -VKAPI_ATTR void VKAPI_CALL CmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents); - -VKAPI_ATTR void VKAPI_CALL CmdEndRenderPass(VkCommandBuffer commandBuffer); - -VKAPI_ATTR void VKAPI_CALL CmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, - const VkCommandBuffer* pCommandBuffers); - -VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos); - -VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos); - -VKAPI_ATTR void VKAPI_CALL GetDeviceGroupPeerMemoryFeatures(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, - uint32_t remoteDeviceIndex, - VkPeerMemoryFeatureFlags* pPeerMemoryFeatures); - -VKAPI_ATTR void VKAPI_CALL CmdSetDeviceMask(VkCommandBuffer commandBuffer, uint32_t deviceMask); - -VKAPI_ATTR void VKAPI_CALL CmdDispatchBase(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, - uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); - -VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDeviceGroups(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, - VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties); - -VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements2(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, - VkMemoryRequirements2* pMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements2(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, - VkMemoryRequirements2* pMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements2(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, - uint32_t* pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFormatProperties2(VkPhysicalDevice physicalDevice, VkFormat format, - VkFormatProperties2* pFormatProperties); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, - VkImageFormatProperties2* pImageFormatProperties); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties2(VkPhysicalDevice physicalDevice, - uint32_t* pQueueFamilyPropertyCount, - VkQueueFamilyProperties2* pQueueFamilyProperties); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMemoryProperties2(VkPhysicalDevice physicalDevice, - VkPhysicalDeviceMemoryProperties2* pMemoryProperties); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceSparseImageFormatProperties2(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, - uint32_t* pPropertyCount, - VkSparseImageFormatProperties2* pProperties); - -VKAPI_ATTR void VKAPI_CALL TrimCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags); - -VKAPI_ATTR void VKAPI_CALL GetDeviceQueue2(VkDevice device, const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue); - -VKAPI_ATTR VkResult VKAPI_CALL CreateSamplerYcbcrConversion(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSamplerYcbcrConversion* pYcbcrConversion); - -VKAPI_ATTR void VKAPI_CALL DestroySamplerYcbcrConversion(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorUpdateTemplate(VkDevice device, - const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate); - -VKAPI_ATTR void VKAPI_CALL DestroyDescriptorUpdateTemplate(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR void VKAPI_CALL UpdateDescriptorSetWithTemplate(VkDevice device, VkDescriptorSet descriptorSet, - VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalBufferProperties(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, - VkExternalBufferProperties* pExternalBufferProperties); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalFenceProperties(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, - VkExternalFenceProperties* pExternalFenceProperties); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalSemaphoreProperties( - VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, - VkExternalSemaphoreProperties* pExternalSemaphoreProperties); - -VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutSupport(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, - VkDescriptorSetLayoutSupport* pSupport); - -VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, - VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, - uint32_t stride); - -VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, - VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, - uint32_t stride); - -VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass2(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass); - -VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass2(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, - const VkSubpassBeginInfo* pSubpassBeginInfo); - -VKAPI_ATTR void VKAPI_CALL CmdNextSubpass2(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, - const VkSubpassEndInfo* pSubpassEndInfo); - -VKAPI_ATTR void VKAPI_CALL CmdEndRenderPass2(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo); - -VKAPI_ATTR void VKAPI_CALL ResetQueryPool(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount); - -VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreCounterValue(VkDevice device, VkSemaphore semaphore, uint64_t* pValue); - -VKAPI_ATTR VkResult VKAPI_CALL WaitSemaphores(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout); - -VKAPI_ATTR VkResult VKAPI_CALL SignalSemaphore(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo); - -VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetBufferDeviceAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo); - -VKAPI_ATTR uint64_t VKAPI_CALL GetBufferOpaqueCaptureAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo); - -VKAPI_ATTR uint64_t VKAPI_CALL GetDeviceMemoryOpaqueCaptureAddress(VkDevice device, - const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceToolProperties(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, - VkPhysicalDeviceToolProperties* pToolProperties); - -VKAPI_ATTR VkResult VKAPI_CALL CreatePrivateDataSlot(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot); - -VKAPI_ATTR void VKAPI_CALL DestroyPrivateDataSlot(VkDevice device, VkPrivateDataSlot privateDataSlot, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL SetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, - VkPrivateDataSlot privateDataSlot, uint64_t data); - -VKAPI_ATTR void VKAPI_CALL GetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, - VkPrivateDataSlot privateDataSlot, uint64_t* pData); - -VKAPI_ATTR void VKAPI_CALL CmdSetEvent2(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo); - -VKAPI_ATTR void VKAPI_CALL CmdResetEvent2(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask); - -VKAPI_ATTR void VKAPI_CALL CmdWaitEvents2(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, - const VkDependencyInfo* pDependencyInfos); - -VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier2(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo); - -VKAPI_ATTR void VKAPI_CALL CmdWriteTimestamp2(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, - uint32_t query); - -VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit2(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence); - -VKAPI_ATTR void VKAPI_CALL CmdCopyBuffer2(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo); - -VKAPI_ATTR void VKAPI_CALL CmdCopyImage2(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo); - -VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage2(VkCommandBuffer commandBuffer, - const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo); - -VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, - const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo); - -VKAPI_ATTR void VKAPI_CALL CmdBlitImage2(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo); - -VKAPI_ATTR void VKAPI_CALL CmdResolveImage2(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo); - -VKAPI_ATTR void VKAPI_CALL CmdBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo); - -VKAPI_ATTR void VKAPI_CALL CmdEndRendering(VkCommandBuffer commandBuffer); - -VKAPI_ATTR void VKAPI_CALL CmdSetCullMode(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode); - -VKAPI_ATTR void VKAPI_CALL CmdSetFrontFace(VkCommandBuffer commandBuffer, VkFrontFace frontFace); - -VKAPI_ATTR void VKAPI_CALL CmdSetPrimitiveTopology(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology); - -VKAPI_ATTR void VKAPI_CALL CmdSetViewportWithCount(VkCommandBuffer commandBuffer, uint32_t viewportCount, - const VkViewport* pViewports); - -VKAPI_ATTR void VKAPI_CALL CmdSetScissorWithCount(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors); - -VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers2(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, - const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, - const VkDeviceSize* pStrides); - -VKAPI_ATTR void VKAPI_CALL CmdSetDepthTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetDepthWriteEnable(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetDepthCompareOp(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp); - -VKAPI_ATTR void VKAPI_CALL CmdSetDepthBoundsTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetStencilTestEnable(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetStencilOp(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, - VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp); - -VKAPI_ATTR void VKAPI_CALL CmdSetRasterizerDiscardEnable(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetDepthBiasEnable(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetPrimitiveRestartEnable(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable); - -VKAPI_ATTR void VKAPI_CALL GetDeviceBufferMemoryRequirements(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, - VkMemoryRequirements2* pMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL GetDeviceImageMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, - VkMemoryRequirements2* pMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL GetDeviceImageSparseMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, - uint32_t* pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL DestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, - VkSurfaceKHR surface, VkBool32* pSupported); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, - VkSurfaceCapabilitiesKHR* pSurfaceCapabilities); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, - uint32_t* pSurfaceFormatCount, - VkSurfaceFormatKHR* pSurfaceFormats); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, - uint32_t* pPresentModeCount, - VkPresentModeKHR* pPresentModes); - -VKAPI_ATTR VkResult VKAPI_CALL CreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain); - -VKAPI_ATTR void VKAPI_CALL DestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, - VkImage* pSwapchainImages); - -VKAPI_ATTR VkResult VKAPI_CALL AcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, - VkSemaphore semaphore, VkFence fence, uint32_t* pImageIndex); - -VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInfoKHR* pPresentInfo); - -VKAPI_ATTR VkResult VKAPI_CALL -GetDeviceGroupPresentCapabilitiesKHR(VkDevice device, VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities); - -VKAPI_ATTR VkResult VKAPI_CALL GetDeviceGroupSurfacePresentModesKHR(VkDevice device, VkSurfaceKHR surface, - VkDeviceGroupPresentModeFlagsKHR* pModes); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, - uint32_t* pRectCount, VkRect2D* pRects); - -VKAPI_ATTR VkResult VKAPI_CALL AcquireNextImage2KHR(VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, - uint32_t* pImageIndex); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, - VkDisplayPropertiesKHR* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, - VkDisplayPlanePropertiesKHR* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, uint32_t planeIndex, - uint32_t* pDisplayCount, VkDisplayKHR* pDisplays); - -VKAPI_ATTR VkResult VKAPI_CALL GetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, - uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL CreateDisplayModeKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, - const VkDisplayModeCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode); - -VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, - uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities); - -VKAPI_ATTR VkResult VKAPI_CALL CreateDisplayPlaneSurfaceKHR(VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); - -VKAPI_ATTR VkResult VKAPI_CALL CreateSharedSwapchainsKHR(VkDevice device, uint32_t swapchainCount, - const VkSwapchainCreateInfoKHR* pCreateInfos, - const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains); - -#ifdef VK_USE_PLATFORM_XLIB_KHR -VKAPI_ATTR VkResult VKAPI_CALL CreateXlibSurfaceKHR(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); - -VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex, Display* dpy, - VisualID visualID); - -#endif // VK_USE_PLATFORM_XLIB_KHR -#ifdef VK_USE_PLATFORM_XCB_KHR -VKAPI_ATTR VkResult VKAPI_CALL CreateXcbSurfaceKHR(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); - -VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceXcbPresentationSupportKHR(VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex, xcb_connection_t* connection, - xcb_visualid_t visual_id); - -#endif // VK_USE_PLATFORM_XCB_KHR -#ifdef VK_USE_PLATFORM_WAYLAND_KHR -VKAPI_ATTR VkResult VKAPI_CALL CreateWaylandSurfaceKHR(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); - -VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex, - struct wl_display* display); - -#endif // VK_USE_PLATFORM_WAYLAND_KHR -#ifdef VK_USE_PLATFORM_ANDROID_KHR -VKAPI_ATTR VkResult VKAPI_CALL CreateAndroidSurfaceKHR(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); - -#endif // VK_USE_PLATFORM_ANDROID_KHR -#ifdef VK_USE_PLATFORM_WIN32_KHR -VKAPI_ATTR VkResult VKAPI_CALL CreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); - -VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex); - -#endif // VK_USE_PLATFORM_WIN32_KHR -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceVideoCapabilitiesKHR(VkPhysicalDevice physicalDevice, - const VkVideoProfileInfoKHR* pVideoProfile, - VkVideoCapabilitiesKHR* pCapabilities); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceVideoFormatPropertiesKHR(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceVideoFormatInfoKHR* pVideoFormatInfo, - uint32_t* pVideoFormatPropertyCount, - VkVideoFormatPropertiesKHR* pVideoFormatProperties); - -VKAPI_ATTR VkResult VKAPI_CALL CreateVideoSessionKHR(VkDevice device, const VkVideoSessionCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkVideoSessionKHR* pVideoSession); - -VKAPI_ATTR void VKAPI_CALL DestroyVideoSessionKHR(VkDevice device, VkVideoSessionKHR videoSession, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL GetVideoSessionMemoryRequirementsKHR(VkDevice device, VkVideoSessionKHR videoSession, - uint32_t* pMemoryRequirementsCount, - VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements); - -VKAPI_ATTR VkResult VKAPI_CALL BindVideoSessionMemoryKHR(VkDevice device, VkVideoSessionKHR videoSession, - uint32_t bindSessionMemoryInfoCount, - const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos); - -VKAPI_ATTR VkResult VKAPI_CALL CreateVideoSessionParametersKHR(VkDevice device, - const VkVideoSessionParametersCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkVideoSessionParametersKHR* pVideoSessionParameters); - -VKAPI_ATTR VkResult VKAPI_CALL UpdateVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, - const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo); - -VKAPI_ATTR void VKAPI_CALL DestroyVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR void VKAPI_CALL CmdBeginVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoBeginCodingInfoKHR* pBeginInfo); - -VKAPI_ATTR void VKAPI_CALL CmdEndVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoEndCodingInfoKHR* pEndCodingInfo); - -VKAPI_ATTR void VKAPI_CALL CmdControlVideoCodingKHR(VkCommandBuffer commandBuffer, - const VkVideoCodingControlInfoKHR* pCodingControlInfo); - -VKAPI_ATTR void VKAPI_CALL CmdDecodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR* pDecodeInfo); - -VKAPI_ATTR void VKAPI_CALL CmdBeginRenderingKHR(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo); - -VKAPI_ATTR void VKAPI_CALL CmdEndRenderingKHR(VkCommandBuffer commandBuffer); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice, - VkPhysicalDeviceProperties2* pProperties); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFormatProperties2KHR(VkPhysicalDevice physicalDevice, VkFormat format, - VkFormatProperties2* pFormatProperties); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, - VkImageFormatProperties2* pImageFormatProperties); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice, - uint32_t* pQueueFamilyPropertyCount, - VkQueueFamilyProperties2* pQueueFamilyProperties); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMemoryProperties2KHR(VkPhysicalDevice physicalDevice, - VkPhysicalDeviceMemoryProperties2* pMemoryProperties); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceSparseImageFormatProperties2KHR( - VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, - VkSparseImageFormatProperties2* pProperties); - -VKAPI_ATTR void VKAPI_CALL GetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, - uint32_t remoteDeviceIndex, - VkPeerMemoryFeatureFlags* pPeerMemoryFeatures); - -VKAPI_ATTR void VKAPI_CALL CmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, uint32_t deviceMask); - -VKAPI_ATTR void VKAPI_CALL CmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, - uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, - uint32_t groupCountZ); - -VKAPI_ATTR void VKAPI_CALL TrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags); - -VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDeviceGroupsKHR(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, - VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalBufferPropertiesKHR( - VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, - VkExternalBufferProperties* pExternalBufferProperties); - -#ifdef VK_USE_PLATFORM_WIN32_KHR -VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandleKHR(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, - HANDLE* pHandle); - -VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandlePropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, - HANDLE handle, - VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties); - -#endif // VK_USE_PLATFORM_WIN32_KHR -VKAPI_ATTR VkResult VKAPI_CALL GetMemoryFdKHR(VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd); - -VKAPI_ATTR VkResult VKAPI_CALL GetMemoryFdPropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, - VkMemoryFdPropertiesKHR* pMemoryFdProperties); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalSemaphorePropertiesKHR( - VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, - VkExternalSemaphoreProperties* pExternalSemaphoreProperties); - -#ifdef VK_USE_PLATFORM_WIN32_KHR -VKAPI_ATTR VkResult VKAPI_CALL -ImportSemaphoreWin32HandleKHR(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo); - -VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreWin32HandleKHR(VkDevice device, - const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, - HANDLE* pHandle); - -#endif // VK_USE_PLATFORM_WIN32_KHR -VKAPI_ATTR VkResult VKAPI_CALL ImportSemaphoreFdKHR(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo); - -VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreFdKHR(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd); - -VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, - VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, - const VkWriteDescriptorSet* pDescriptorWrites); - -VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer, - VkDescriptorUpdateTemplate descriptorUpdateTemplate, - VkPipelineLayout layout, uint32_t set, const void* pData); - -VKAPI_ATTR VkResult VKAPI_CALL CreateDescriptorUpdateTemplateKHR(VkDevice device, - const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate); - -VKAPI_ATTR void VKAPI_CALL DestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR void VKAPI_CALL UpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, - VkDescriptorUpdateTemplate descriptorUpdateTemplate, - const void* pData); - -VKAPI_ATTR VkResult VKAPI_CALL CreateRenderPass2KHR(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass); - -VKAPI_ATTR void VKAPI_CALL CmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, - const VkSubpassBeginInfo* pSubpassBeginInfo); - -VKAPI_ATTR void VKAPI_CALL CmdNextSubpass2KHR(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, - const VkSubpassEndInfo* pSubpassEndInfo); - -VKAPI_ATTR void VKAPI_CALL CmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo); - -VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainStatusKHR(VkDevice device, VkSwapchainKHR swapchain); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalFencePropertiesKHR(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, - VkExternalFenceProperties* pExternalFenceProperties); - -#ifdef VK_USE_PLATFORM_WIN32_KHR -VKAPI_ATTR VkResult VKAPI_CALL ImportFenceWin32HandleKHR(VkDevice device, - const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo); - -VKAPI_ATTR VkResult VKAPI_CALL GetFenceWin32HandleKHR(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, - HANDLE* pHandle); - -#endif // VK_USE_PLATFORM_WIN32_KHR -VKAPI_ATTR VkResult VKAPI_CALL ImportFenceFdKHR(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo); - -VKAPI_ATTR VkResult VKAPI_CALL GetFenceFdKHR(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd); - -VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( - VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, uint32_t* pCounterCount, VkPerformanceCounterKHR* pCounters, - VkPerformanceCounterDescriptionKHR* pCounterDescriptions); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( - VkPhysicalDevice physicalDevice, const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, uint32_t* pNumPasses); - -VKAPI_ATTR VkResult VKAPI_CALL AcquireProfilingLockKHR(VkDevice device, const VkAcquireProfilingLockInfoKHR* pInfo); - -VKAPI_ATTR void VKAPI_CALL ReleaseProfilingLockKHR(VkDevice device); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, - VkSurfaceCapabilities2KHR* pSurfaceCapabilities); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, - uint32_t* pSurfaceFormatCount, - VkSurfaceFormat2KHR* pSurfaceFormats); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, - VkDisplayProperties2KHR* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPlaneProperties2KHR(VkPhysicalDevice physicalDevice, - uint32_t* pPropertyCount, - VkDisplayPlaneProperties2KHR* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL GetDisplayModeProperties2KHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, - uint32_t* pPropertyCount, VkDisplayModeProperties2KHR* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL GetDisplayPlaneCapabilities2KHR(VkPhysicalDevice physicalDevice, - const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, - VkDisplayPlaneCapabilities2KHR* pCapabilities); - -VKAPI_ATTR void VKAPI_CALL GetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, - VkMemoryRequirements2* pMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL GetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, - VkMemoryRequirements2* pMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL GetImageSparseMemoryRequirements2KHR(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, - uint32_t* pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); - -VKAPI_ATTR VkResult VKAPI_CALL CreateSamplerYcbcrConversionKHR(VkDevice device, - const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSamplerYcbcrConversion* pYcbcrConversion); - -VKAPI_ATTR void VKAPI_CALL DestroySamplerYcbcrConversionKHR(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL BindBufferMemory2KHR(VkDevice device, uint32_t bindInfoCount, - const VkBindBufferMemoryInfo* pBindInfos); - -VKAPI_ATTR VkResult VKAPI_CALL BindImageMemory2KHR(VkDevice device, uint32_t bindInfoCount, - const VkBindImageMemoryInfo* pBindInfos); - -VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutSupportKHR(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, - VkDescriptorSetLayoutSupport* pSupport); - -VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, - VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, - uint32_t stride); - -VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, - VkBuffer countBuffer, VkDeviceSize countBufferOffset, - uint32_t maxDrawCount, uint32_t stride); - -VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreCounterValueKHR(VkDevice device, VkSemaphore semaphore, uint64_t* pValue); - -VKAPI_ATTR VkResult VKAPI_CALL WaitSemaphoresKHR(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout); - -VKAPI_ATTR VkResult VKAPI_CALL SignalSemaphoreKHR(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo); - -VKAPI_ATTR VkResult VKAPI_CALL -GetPhysicalDeviceFragmentShadingRatesKHR(VkPhysicalDevice physicalDevice, uint32_t* pFragmentShadingRateCount, - VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates); - -VKAPI_ATTR void VKAPI_CALL CmdSetFragmentShadingRateKHR(VkCommandBuffer commandBuffer, const VkExtent2D* pFragmentSize, - const VkFragmentShadingRateCombinerOpKHR combinerOps[2]); - -VKAPI_ATTR void VKAPI_CALL CmdSetRenderingAttachmentLocationsKHR(VkCommandBuffer commandBuffer, - const VkRenderingAttachmentLocationInfoKHR* pLocationInfo); - -VKAPI_ATTR void VKAPI_CALL CmdSetRenderingInputAttachmentIndicesKHR( - VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfoKHR* pInputAttachmentIndexInfo); - -VKAPI_ATTR VkResult VKAPI_CALL WaitForPresentKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t presentId, uint64_t timeout); - -VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetBufferDeviceAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo); - -VKAPI_ATTR uint64_t VKAPI_CALL GetBufferOpaqueCaptureAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo); - -VKAPI_ATTR uint64_t VKAPI_CALL GetDeviceMemoryOpaqueCaptureAddressKHR(VkDevice device, - const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo); - -VKAPI_ATTR VkResult VKAPI_CALL CreateDeferredOperationKHR(VkDevice device, const VkAllocationCallbacks* pAllocator, - VkDeferredOperationKHR* pDeferredOperation); - -VKAPI_ATTR void VKAPI_CALL DestroyDeferredOperationKHR(VkDevice device, VkDeferredOperationKHR operation, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR uint32_t VKAPI_CALL GetDeferredOperationMaxConcurrencyKHR(VkDevice device, VkDeferredOperationKHR operation); - -VKAPI_ATTR VkResult VKAPI_CALL GetDeferredOperationResultKHR(VkDevice device, VkDeferredOperationKHR operation); - -VKAPI_ATTR VkResult VKAPI_CALL DeferredOperationJoinKHR(VkDevice device, VkDeferredOperationKHR operation); - -VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutablePropertiesKHR(VkDevice device, const VkPipelineInfoKHR* pPipelineInfo, - uint32_t* pExecutableCount, - VkPipelineExecutablePropertiesKHR* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutableStatisticsKHR(VkDevice device, - const VkPipelineExecutableInfoKHR* pExecutableInfo, - uint32_t* pStatisticCount, - VkPipelineExecutableStatisticKHR* pStatistics); - -VKAPI_ATTR VkResult VKAPI_CALL GetPipelineExecutableInternalRepresentationsKHR( - VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pInternalRepresentationCount, - VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations); - -VKAPI_ATTR VkResult VKAPI_CALL MapMemory2KHR(VkDevice device, const VkMemoryMapInfoKHR* pMemoryMapInfo, void** ppData); - -VKAPI_ATTR VkResult VKAPI_CALL UnmapMemory2KHR(VkDevice device, const VkMemoryUnmapInfoKHR* pMemoryUnmapInfo); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( - VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, - VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties); - -VKAPI_ATTR VkResult VKAPI_CALL -GetEncodedVideoSessionParametersKHR(VkDevice device, const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo, - VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, size_t* pDataSize, void* pData); - -VKAPI_ATTR void VKAPI_CALL CmdEncodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo); - -VKAPI_ATTR void VKAPI_CALL CmdSetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo); - -VKAPI_ATTR void VKAPI_CALL CmdResetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask); - -VKAPI_ATTR void VKAPI_CALL CmdWaitEvents2KHR(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, - const VkDependencyInfo* pDependencyInfos); - -VKAPI_ATTR void VKAPI_CALL CmdPipelineBarrier2KHR(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo); - -VKAPI_ATTR void VKAPI_CALL CmdWriteTimestamp2KHR(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, - uint32_t query); - -VKAPI_ATTR VkResult VKAPI_CALL QueueSubmit2KHR(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence); - -VKAPI_ATTR void VKAPI_CALL CmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo); - -VKAPI_ATTR void VKAPI_CALL CmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo); - -VKAPI_ATTR void VKAPI_CALL CmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffer, - const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo); - -VKAPI_ATTR void VKAPI_CALL CmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffer, - const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo); - -VKAPI_ATTR void VKAPI_CALL CmdBlitImage2KHR(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo); - -VKAPI_ATTR void VKAPI_CALL CmdResolveImage2KHR(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo); - -VKAPI_ATTR void VKAPI_CALL CmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress); - -VKAPI_ATTR void VKAPI_CALL GetDeviceBufferMemoryRequirementsKHR(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, - VkMemoryRequirements2* pMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL GetDeviceImageMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, - VkMemoryRequirements2* pMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL GetDeviceImageSparseMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, - uint32_t* pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL CmdBindIndexBuffer2KHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, - VkDeviceSize size, VkIndexType indexType); - -VKAPI_ATTR void VKAPI_CALL GetRenderingAreaGranularityKHR(VkDevice device, const VkRenderingAreaInfoKHR* pRenderingAreaInfo, - VkExtent2D* pGranularity); - -VKAPI_ATTR void VKAPI_CALL GetDeviceImageSubresourceLayoutKHR(VkDevice device, const VkDeviceImageSubresourceInfoKHR* pInfo, - VkSubresourceLayout2KHR* pLayout); - -VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout2KHR(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, - VkSubresourceLayout2KHR* pLayout); - -VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineBinariesKHR(VkDevice device, const VkPipelineBinaryCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkPipelineBinaryHandlesInfoKHR* pBinaries); - -VKAPI_ATTR void VKAPI_CALL DestroyPipelineBinaryKHR(VkDevice device, VkPipelineBinaryKHR pipelineBinary, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL GetPipelineKeyKHR(VkDevice device, const VkPipelineCreateInfoKHR* pPipelineCreateInfo, - VkPipelineBinaryKeyKHR* pPipelineKey); - -VKAPI_ATTR VkResult VKAPI_CALL GetPipelineBinaryDataKHR(VkDevice device, const VkPipelineBinaryDataInfoKHR* pInfo, - VkPipelineBinaryKeyKHR* pPipelineBinaryKey, size_t* pPipelineBinaryDataSize, - void* pPipelineBinaryData); - -VKAPI_ATTR VkResult VKAPI_CALL ReleaseCapturedPipelineDataKHR(VkDevice device, const VkReleaseCapturedPipelineDataInfoKHR* pInfo, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCooperativeMatrixPropertiesKHR(VkPhysicalDevice physicalDevice, - uint32_t* pPropertyCount, - VkCooperativeMatrixPropertiesKHR* pProperties); - -VKAPI_ATTR void VKAPI_CALL CmdSetLineStippleKHR(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, - uint16_t lineStipplePattern); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCalibrateableTimeDomainsKHR(VkPhysicalDevice physicalDevice, - uint32_t* pTimeDomainCount, - VkTimeDomainKHR* pTimeDomains); - -VKAPI_ATTR VkResult VKAPI_CALL GetCalibratedTimestampsKHR(VkDevice device, uint32_t timestampCount, - const VkCalibratedTimestampInfoKHR* pTimestampInfos, - uint64_t* pTimestamps, uint64_t* pMaxDeviation); - -VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorSets2KHR(VkCommandBuffer commandBuffer, - const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo); - -VKAPI_ATTR void VKAPI_CALL CmdPushConstants2KHR(VkCommandBuffer commandBuffer, const VkPushConstantsInfoKHR* pPushConstantsInfo); - -VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSet2KHR(VkCommandBuffer commandBuffer, - const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo); - -VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSetWithTemplate2KHR( - VkCommandBuffer commandBuffer, const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo); - -VKAPI_ATTR void VKAPI_CALL CmdSetDescriptorBufferOffsets2EXT( - VkCommandBuffer commandBuffer, const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo); - -VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorBufferEmbeddedSamplers2EXT( - VkCommandBuffer commandBuffer, const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo); - -VKAPI_ATTR VkResult VKAPI_CALL CreateDebugReportCallbackEXT(VkInstance instance, - const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkDebugReportCallbackEXT* pCallback); - -VKAPI_ATTR void VKAPI_CALL DestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT callback, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR void VKAPI_CALL DebugReportMessageEXT(VkInstance instance, VkDebugReportFlagsEXT flags, - VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, - int32_t messageCode, const char* pLayerPrefix, const char* pMessage); - -VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectTagEXT(VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo); - -VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectNameEXT(VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo); - -VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); - -VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerEndEXT(VkCommandBuffer commandBuffer); - -VKAPI_ATTR void VKAPI_CALL CmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); - -VKAPI_ATTR void VKAPI_CALL CmdBindTransformFeedbackBuffersEXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, - uint32_t bindingCount, const VkBuffer* pBuffers, - const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes); - -VKAPI_ATTR void VKAPI_CALL CmdBeginTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, - uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, - const VkDeviceSize* pCounterBufferOffsets); - -VKAPI_ATTR void VKAPI_CALL CmdEndTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, - uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, - const VkDeviceSize* pCounterBufferOffsets); - -VKAPI_ATTR void VKAPI_CALL CmdBeginQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, - VkQueryControlFlags flags, uint32_t index); - -VKAPI_ATTR void VKAPI_CALL CmdEndQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, - uint32_t index); - -VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectByteCountEXT(VkCommandBuffer commandBuffer, uint32_t instanceCount, - uint32_t firstInstance, VkBuffer counterBuffer, - VkDeviceSize counterBufferOffset, uint32_t counterOffset, - uint32_t vertexStride); - -VKAPI_ATTR VkResult VKAPI_CALL CreateCuModuleNVX(VkDevice device, const VkCuModuleCreateInfoNVX* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkCuModuleNVX* pModule); - -VKAPI_ATTR VkResult VKAPI_CALL CreateCuFunctionNVX(VkDevice device, const VkCuFunctionCreateInfoNVX* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkCuFunctionNVX* pFunction); - -VKAPI_ATTR void VKAPI_CALL DestroyCuModuleNVX(VkDevice device, VkCuModuleNVX module, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR void VKAPI_CALL DestroyCuFunctionNVX(VkDevice device, VkCuFunctionNVX function, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR void VKAPI_CALL CmdCuLaunchKernelNVX(VkCommandBuffer commandBuffer, const VkCuLaunchInfoNVX* pLaunchInfo); - -VKAPI_ATTR uint32_t VKAPI_CALL GetImageViewHandleNVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo); - -VKAPI_ATTR uint64_t VKAPI_CALL GetImageViewHandle64NVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo); - -VKAPI_ATTR VkResult VKAPI_CALL GetImageViewAddressNVX(VkDevice device, VkImageView imageView, - VkImageViewAddressPropertiesNVX* pProperties); - -VKAPI_ATTR void VKAPI_CALL CmdDrawIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, - VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, - uint32_t stride); - -VKAPI_ATTR void VKAPI_CALL CmdDrawIndexedIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, - VkBuffer countBuffer, VkDeviceSize countBufferOffset, - uint32_t maxDrawCount, uint32_t stride); - -VKAPI_ATTR VkResult VKAPI_CALL GetShaderInfoAMD(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, - VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo); - -#ifdef VK_USE_PLATFORM_GGP -VKAPI_ATTR VkResult VKAPI_CALL CreateStreamDescriptorSurfaceGGP(VkInstance instance, - const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); - -#endif // VK_USE_PLATFORM_GGP -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceExternalImageFormatPropertiesNV( - VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, - VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, - VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties); - -#ifdef VK_USE_PLATFORM_WIN32_KHR -VKAPI_ATTR VkResult VKAPI_CALL GetMemoryWin32HandleNV(VkDevice device, VkDeviceMemory memory, - VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle); - -#endif // VK_USE_PLATFORM_WIN32_KHR -#ifdef VK_USE_PLATFORM_VI_NN -VKAPI_ATTR VkResult VKAPI_CALL CreateViSurfaceNN(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); - -#endif // VK_USE_PLATFORM_VI_NN -VKAPI_ATTR void VKAPI_CALL CmdBeginConditionalRenderingEXT(VkCommandBuffer commandBuffer, - const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin); - -VKAPI_ATTR void VKAPI_CALL CmdEndConditionalRenderingEXT(VkCommandBuffer commandBuffer); - -VKAPI_ATTR void VKAPI_CALL CmdSetViewportWScalingNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, - const VkViewportWScalingNV* pViewportWScalings); - -VKAPI_ATTR VkResult VKAPI_CALL ReleaseDisplayEXT(VkPhysicalDevice physicalDevice, VkDisplayKHR display); - -#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT -VKAPI_ATTR VkResult VKAPI_CALL AcquireXlibDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display); - -VKAPI_ATTR VkResult VKAPI_CALL GetRandROutputDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, - VkDisplayKHR* pDisplay); - -#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfaceCapabilities2EXT(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, - VkSurfaceCapabilities2EXT* pSurfaceCapabilities); - -VKAPI_ATTR VkResult VKAPI_CALL DisplayPowerControlEXT(VkDevice device, VkDisplayKHR display, - const VkDisplayPowerInfoEXT* pDisplayPowerInfo); - -VKAPI_ATTR VkResult VKAPI_CALL RegisterDeviceEventEXT(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, - const VkAllocationCallbacks* pAllocator, VkFence* pFence); - -VKAPI_ATTR VkResult VKAPI_CALL RegisterDisplayEventEXT(VkDevice device, VkDisplayKHR display, - const VkDisplayEventInfoEXT* pDisplayEventInfo, - const VkAllocationCallbacks* pAllocator, VkFence* pFence); - -VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainCounterEXT(VkDevice device, VkSwapchainKHR swapchain, - VkSurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue); - -VKAPI_ATTR VkResult VKAPI_CALL GetRefreshCycleDurationGOOGLE(VkDevice device, VkSwapchainKHR swapchain, - VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties); - -VKAPI_ATTR VkResult VKAPI_CALL GetPastPresentationTimingGOOGLE(VkDevice device, VkSwapchainKHR swapchain, - uint32_t* pPresentationTimingCount, - VkPastPresentationTimingGOOGLE* pPresentationTimings); - -VKAPI_ATTR void VKAPI_CALL CmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, - uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles); - -VKAPI_ATTR void VKAPI_CALL CmdSetDiscardRectangleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 discardRectangleEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetDiscardRectangleModeEXT(VkCommandBuffer commandBuffer, - VkDiscardRectangleModeEXT discardRectangleMode); - -VKAPI_ATTR void VKAPI_CALL SetHdrMetadataEXT(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, - const VkHdrMetadataEXT* pMetadata); - -#ifdef VK_USE_PLATFORM_IOS_MVK -VKAPI_ATTR VkResult VKAPI_CALL CreateIOSSurfaceMVK(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); - -#endif // VK_USE_PLATFORM_IOS_MVK -#ifdef VK_USE_PLATFORM_MACOS_MVK -VKAPI_ATTR VkResult VKAPI_CALL CreateMacOSSurfaceMVK(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); - -#endif // VK_USE_PLATFORM_MACOS_MVK -VKAPI_ATTR VkResult VKAPI_CALL SetDebugUtilsObjectNameEXT(VkDevice device, const VkDebugUtilsObjectNameInfoEXT* pNameInfo); - -VKAPI_ATTR VkResult VKAPI_CALL SetDebugUtilsObjectTagEXT(VkDevice device, const VkDebugUtilsObjectTagInfoEXT* pTagInfo); - -VKAPI_ATTR void VKAPI_CALL QueueBeginDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo); - -VKAPI_ATTR void VKAPI_CALL QueueEndDebugUtilsLabelEXT(VkQueue queue); - -VKAPI_ATTR void VKAPI_CALL QueueInsertDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo); - -VKAPI_ATTR void VKAPI_CALL CmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo); - -VKAPI_ATTR void VKAPI_CALL CmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer); - -VKAPI_ATTR void VKAPI_CALL CmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo); - -VKAPI_ATTR VkResult VKAPI_CALL CreateDebugUtilsMessengerEXT(VkInstance instance, - const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkDebugUtilsMessengerEXT* pMessenger); - -VKAPI_ATTR void VKAPI_CALL DestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT messenger, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR void VKAPI_CALL SubmitDebugUtilsMessageEXT(VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, - VkDebugUtilsMessageTypeFlagsEXT messageTypes, - const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData); - -#ifdef VK_USE_PLATFORM_ANDROID_KHR -VKAPI_ATTR VkResult VKAPI_CALL GetAndroidHardwareBufferPropertiesANDROID(VkDevice device, const struct AHardwareBuffer* buffer, - VkAndroidHardwareBufferPropertiesANDROID* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL GetMemoryAndroidHardwareBufferANDROID(VkDevice device, - const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, - struct AHardwareBuffer** pBuffer); - -#endif // VK_USE_PLATFORM_ANDROID_KHR -#ifdef VK_ENABLE_BETA_EXTENSIONS -VKAPI_ATTR VkResult VKAPI_CALL CreateExecutionGraphPipelinesAMDX(VkDevice device, VkPipelineCache pipelineCache, - uint32_t createInfoCount, - const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos, - const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); - -VKAPI_ATTR VkResult VKAPI_CALL GetExecutionGraphPipelineScratchSizeAMDX(VkDevice device, VkPipeline executionGraph, - VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo); - -VKAPI_ATTR VkResult VKAPI_CALL GetExecutionGraphPipelineNodeIndexAMDX(VkDevice device, VkPipeline executionGraph, - const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo, - uint32_t* pNodeIndex); - -VKAPI_ATTR void VKAPI_CALL CmdInitializeGraphScratchMemoryAMDX(VkCommandBuffer commandBuffer, VkPipeline executionGraph, - VkDeviceAddress scratch, VkDeviceSize scratchSize); - -VKAPI_ATTR void VKAPI_CALL CmdDispatchGraphAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, - const VkDispatchGraphCountInfoAMDX* pCountInfo); - -VKAPI_ATTR void VKAPI_CALL CmdDispatchGraphIndirectAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, - VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX* pCountInfo); - -VKAPI_ATTR void VKAPI_CALL CmdDispatchGraphIndirectCountAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, - VkDeviceSize scratchSize, VkDeviceAddress countInfo); - -#endif // VK_ENABLE_BETA_EXTENSIONS -VKAPI_ATTR void VKAPI_CALL CmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, - const VkSampleLocationsInfoEXT* pSampleLocationsInfo); - -VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, - VkMultisamplePropertiesEXT* pMultisampleProperties); - -VKAPI_ATTR VkResult VKAPI_CALL GetImageDrmFormatModifierPropertiesEXT(VkDevice device, VkImage image, - VkImageDrmFormatModifierPropertiesEXT* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL CreateValidationCacheEXT(VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkValidationCacheEXT* pValidationCache); - -VKAPI_ATTR void VKAPI_CALL DestroyValidationCacheEXT(VkDevice device, VkValidationCacheEXT validationCache, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL MergeValidationCachesEXT(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, - const VkValidationCacheEXT* pSrcCaches); - -VKAPI_ATTR VkResult VKAPI_CALL GetValidationCacheDataEXT(VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, - void* pData); - -VKAPI_ATTR void VKAPI_CALL CmdBindShadingRateImageNV(VkCommandBuffer commandBuffer, VkImageView imageView, - VkImageLayout imageLayout); - -VKAPI_ATTR void VKAPI_CALL CmdSetViewportShadingRatePaletteNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, - uint32_t viewportCount, - const VkShadingRatePaletteNV* pShadingRatePalettes); - -VKAPI_ATTR void VKAPI_CALL CmdSetCoarseSampleOrderNV(VkCommandBuffer commandBuffer, VkCoarseSampleOrderTypeNV sampleOrderType, - uint32_t customSampleOrderCount, - const VkCoarseSampleOrderCustomNV* pCustomSampleOrders); - -VKAPI_ATTR VkResult VKAPI_CALL CreateAccelerationStructureNV(VkDevice device, - const VkAccelerationStructureCreateInfoNV* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkAccelerationStructureNV* pAccelerationStructure); - -VKAPI_ATTR void VKAPI_CALL DestroyAccelerationStructureNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR void VKAPI_CALL GetAccelerationStructureMemoryRequirementsNV( - VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements); - -VKAPI_ATTR VkResult VKAPI_CALL BindAccelerationStructureMemoryNV(VkDevice device, uint32_t bindInfoCount, - const VkBindAccelerationStructureMemoryInfoNV* pBindInfos); - -VKAPI_ATTR void VKAPI_CALL CmdBuildAccelerationStructureNV(VkCommandBuffer commandBuffer, - const VkAccelerationStructureInfoNV* pInfo, VkBuffer instanceData, - VkDeviceSize instanceOffset, VkBool32 update, - VkAccelerationStructureNV dst, VkAccelerationStructureNV src, - VkBuffer scratch, VkDeviceSize scratchOffset); - -VKAPI_ATTR void VKAPI_CALL CmdCopyAccelerationStructureNV(VkCommandBuffer commandBuffer, VkAccelerationStructureNV dst, - VkAccelerationStructureNV src, VkCopyAccelerationStructureModeKHR mode); - -VKAPI_ATTR void VKAPI_CALL CmdTraceRaysNV(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); - -VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, - const VkRayTracingPipelineCreateInfoNV* pCreateInfos, - const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); - -VKAPI_ATTR VkResult VKAPI_CALL GetRayTracingShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, - uint32_t groupCount, size_t dataSize, void* pData); - -VKAPI_ATTR VkResult VKAPI_CALL GetRayTracingShaderGroupHandlesNV(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, - uint32_t groupCount, size_t dataSize, void* pData); - -VKAPI_ATTR VkResult VKAPI_CALL GetAccelerationStructureHandleNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, - size_t dataSize, void* pData); - -VKAPI_ATTR void VKAPI_CALL CmdWriteAccelerationStructuresPropertiesNV(VkCommandBuffer commandBuffer, - uint32_t accelerationStructureCount, - const VkAccelerationStructureNV* pAccelerationStructures, - VkQueryType queryType, VkQueryPool queryPool, - uint32_t firstQuery); - -VKAPI_ATTR VkResult VKAPI_CALL CompileDeferredNV(VkDevice device, VkPipeline pipeline, uint32_t shader); - -VKAPI_ATTR VkResult VKAPI_CALL GetMemoryHostPointerPropertiesEXT(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, - const void* pHostPointer, - VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties); - -VKAPI_ATTR void VKAPI_CALL CmdWriteBufferMarkerAMD(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, - VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker); - -VKAPI_ATTR void VKAPI_CALL CmdWriteBufferMarker2AMD(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkBuffer dstBuffer, - VkDeviceSize dstOffset, uint32_t marker); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, - uint32_t* pTimeDomainCount, - VkTimeDomainKHR* pTimeDomains); - -VKAPI_ATTR VkResult VKAPI_CALL GetCalibratedTimestampsEXT(VkDevice device, uint32_t timestampCount, - const VkCalibratedTimestampInfoKHR* pTimestampInfos, - uint64_t* pTimestamps, uint64_t* pMaxDeviation); - -VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask); - -VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, - uint32_t drawCount, uint32_t stride); - -VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, - VkBuffer countBuffer, VkDeviceSize countBufferOffset, - uint32_t maxDrawCount, uint32_t stride); - -VKAPI_ATTR void VKAPI_CALL CmdSetExclusiveScissorEnableNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, - uint32_t exclusiveScissorCount, const VkBool32* pExclusiveScissorEnables); - -VKAPI_ATTR void VKAPI_CALL CmdSetExclusiveScissorNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, - uint32_t exclusiveScissorCount, const VkRect2D* pExclusiveScissors); - -VKAPI_ATTR void VKAPI_CALL CmdSetCheckpointNV(VkCommandBuffer commandBuffer, const void* pCheckpointMarker); - -VKAPI_ATTR void VKAPI_CALL GetQueueCheckpointDataNV(VkQueue queue, uint32_t* pCheckpointDataCount, - VkCheckpointDataNV* pCheckpointData); - -VKAPI_ATTR void VKAPI_CALL GetQueueCheckpointData2NV(VkQueue queue, uint32_t* pCheckpointDataCount, - VkCheckpointData2NV* pCheckpointData); - -VKAPI_ATTR VkResult VKAPI_CALL InitializePerformanceApiINTEL(VkDevice device, - const VkInitializePerformanceApiInfoINTEL* pInitializeInfo); - -VKAPI_ATTR void VKAPI_CALL UninitializePerformanceApiINTEL(VkDevice device); - -VKAPI_ATTR VkResult VKAPI_CALL CmdSetPerformanceMarkerINTEL(VkCommandBuffer commandBuffer, - const VkPerformanceMarkerInfoINTEL* pMarkerInfo); - -VKAPI_ATTR VkResult VKAPI_CALL CmdSetPerformanceStreamMarkerINTEL(VkCommandBuffer commandBuffer, - const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo); - -VKAPI_ATTR VkResult VKAPI_CALL CmdSetPerformanceOverrideINTEL(VkCommandBuffer commandBuffer, - const VkPerformanceOverrideInfoINTEL* pOverrideInfo); - -VKAPI_ATTR VkResult VKAPI_CALL AcquirePerformanceConfigurationINTEL(VkDevice device, - const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, - VkPerformanceConfigurationINTEL* pConfiguration); - -VKAPI_ATTR VkResult VKAPI_CALL ReleasePerformanceConfigurationINTEL(VkDevice device, VkPerformanceConfigurationINTEL configuration); - -VKAPI_ATTR VkResult VKAPI_CALL QueueSetPerformanceConfigurationINTEL(VkQueue queue, VkPerformanceConfigurationINTEL configuration); - -VKAPI_ATTR VkResult VKAPI_CALL GetPerformanceParameterINTEL(VkDevice device, VkPerformanceParameterTypeINTEL parameter, - VkPerformanceValueINTEL* pValue); - -VKAPI_ATTR void VKAPI_CALL SetLocalDimmingAMD(VkDevice device, VkSwapchainKHR swapChain, VkBool32 localDimmingEnable); - -#ifdef VK_USE_PLATFORM_FUCHSIA -VKAPI_ATTR VkResult VKAPI_CALL CreateImagePipeSurfaceFUCHSIA(VkInstance instance, - const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); - -#endif // VK_USE_PLATFORM_FUCHSIA -#ifdef VK_USE_PLATFORM_METAL_EXT -VKAPI_ATTR VkResult VKAPI_CALL CreateMetalSurfaceEXT(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); - -#endif // VK_USE_PLATFORM_METAL_EXT -VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetBufferDeviceAddressEXT(VkDevice device, const VkBufferDeviceAddressInfo* pInfo); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceToolPropertiesEXT(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, - VkPhysicalDeviceToolProperties* pToolProperties); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCooperativeMatrixPropertiesNV(VkPhysicalDevice physicalDevice, - uint32_t* pPropertyCount, - VkCooperativeMatrixPropertiesNV* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( - VkPhysicalDevice physicalDevice, uint32_t* pCombinationCount, VkFramebufferMixedSamplesCombinationNV* pCombinations); - -#ifdef VK_USE_PLATFORM_WIN32_KHR -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceSurfacePresentModes2EXT(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, - uint32_t* pPresentModeCount, - VkPresentModeKHR* pPresentModes); - -VKAPI_ATTR VkResult VKAPI_CALL AcquireFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain); - -VKAPI_ATTR VkResult VKAPI_CALL ReleaseFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain); - -VKAPI_ATTR VkResult VKAPI_CALL GetDeviceGroupSurfacePresentModes2EXT(VkDevice device, - const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, - VkDeviceGroupPresentModeFlagsKHR* pModes); - -#endif // VK_USE_PLATFORM_WIN32_KHR -VKAPI_ATTR VkResult VKAPI_CALL CreateHeadlessSurfaceEXT(VkInstance instance, const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); - -VKAPI_ATTR void VKAPI_CALL CmdSetLineStippleEXT(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, - uint16_t lineStipplePattern); - -VKAPI_ATTR void VKAPI_CALL ResetQueryPoolEXT(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount); - -VKAPI_ATTR void VKAPI_CALL CmdSetCullModeEXT(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode); - -VKAPI_ATTR void VKAPI_CALL CmdSetFrontFaceEXT(VkCommandBuffer commandBuffer, VkFrontFace frontFace); - -VKAPI_ATTR void VKAPI_CALL CmdSetPrimitiveTopologyEXT(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology); - -VKAPI_ATTR void VKAPI_CALL CmdSetViewportWithCountEXT(VkCommandBuffer commandBuffer, uint32_t viewportCount, - const VkViewport* pViewports); - -VKAPI_ATTR void VKAPI_CALL CmdSetScissorWithCountEXT(VkCommandBuffer commandBuffer, uint32_t scissorCount, - const VkRect2D* pScissors); - -VKAPI_ATTR void VKAPI_CALL CmdBindVertexBuffers2EXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, - const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, - const VkDeviceSize* pSizes, const VkDeviceSize* pStrides); - -VKAPI_ATTR void VKAPI_CALL CmdSetDepthTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetDepthWriteEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetDepthCompareOpEXT(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp); - -VKAPI_ATTR void VKAPI_CALL CmdSetDepthBoundsTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetStencilTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetStencilOpEXT(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, - VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp); - -VKAPI_ATTR VkResult VKAPI_CALL CopyMemoryToImageEXT(VkDevice device, const VkCopyMemoryToImageInfoEXT* pCopyMemoryToImageInfo); - -VKAPI_ATTR VkResult VKAPI_CALL CopyImageToMemoryEXT(VkDevice device, const VkCopyImageToMemoryInfoEXT* pCopyImageToMemoryInfo); - -VKAPI_ATTR VkResult VKAPI_CALL CopyImageToImageEXT(VkDevice device, const VkCopyImageToImageInfoEXT* pCopyImageToImageInfo); - -VKAPI_ATTR VkResult VKAPI_CALL TransitionImageLayoutEXT(VkDevice device, uint32_t transitionCount, - const VkHostImageLayoutTransitionInfoEXT* pTransitions); - -VKAPI_ATTR void VKAPI_CALL GetImageSubresourceLayout2EXT(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, - VkSubresourceLayout2KHR* pLayout); - -VKAPI_ATTR VkResult VKAPI_CALL ReleaseSwapchainImagesEXT(VkDevice device, const VkReleaseSwapchainImagesInfoEXT* pReleaseInfo); - -VKAPI_ATTR void VKAPI_CALL GetGeneratedCommandsMemoryRequirementsNV(VkDevice device, - const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo, - VkMemoryRequirements2* pMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL CmdPreprocessGeneratedCommandsNV(VkCommandBuffer commandBuffer, - const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo); - -VKAPI_ATTR void VKAPI_CALL CmdExecuteGeneratedCommandsNV(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, - const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo); - -VKAPI_ATTR void VKAPI_CALL CmdBindPipelineShaderGroupNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, - VkPipeline pipeline, uint32_t groupIndex); - -VKAPI_ATTR VkResult VKAPI_CALL CreateIndirectCommandsLayoutNV(VkDevice device, - const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkIndirectCommandsLayoutNV* pIndirectCommandsLayout); - -VKAPI_ATTR void VKAPI_CALL DestroyIndirectCommandsLayoutNV(VkDevice device, VkIndirectCommandsLayoutNV indirectCommandsLayout, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR void VKAPI_CALL CmdSetDepthBias2EXT(VkCommandBuffer commandBuffer, const VkDepthBiasInfoEXT* pDepthBiasInfo); - -VKAPI_ATTR VkResult VKAPI_CALL AcquireDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, VkDisplayKHR display); - -VKAPI_ATTR VkResult VKAPI_CALL GetDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, uint32_t connectorId, - VkDisplayKHR* display); - -VKAPI_ATTR VkResult VKAPI_CALL CreatePrivateDataSlotEXT(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkPrivateDataSlot* pPrivateDataSlot); - -VKAPI_ATTR void VKAPI_CALL DestroyPrivateDataSlotEXT(VkDevice device, VkPrivateDataSlot privateDataSlot, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL SetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, - VkPrivateDataSlot privateDataSlot, uint64_t data); - -VKAPI_ATTR void VKAPI_CALL GetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, - VkPrivateDataSlot privateDataSlot, uint64_t* pData); - -VKAPI_ATTR VkResult VKAPI_CALL CreateCudaModuleNV(VkDevice device, const VkCudaModuleCreateInfoNV* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkCudaModuleNV* pModule); - -VKAPI_ATTR VkResult VKAPI_CALL GetCudaModuleCacheNV(VkDevice device, VkCudaModuleNV module, size_t* pCacheSize, void* pCacheData); - -VKAPI_ATTR VkResult VKAPI_CALL CreateCudaFunctionNV(VkDevice device, const VkCudaFunctionCreateInfoNV* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkCudaFunctionNV* pFunction); - -VKAPI_ATTR void VKAPI_CALL DestroyCudaModuleNV(VkDevice device, VkCudaModuleNV module, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR void VKAPI_CALL DestroyCudaFunctionNV(VkDevice device, VkCudaFunctionNV function, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR void VKAPI_CALL CmdCudaLaunchKernelNV(VkCommandBuffer commandBuffer, const VkCudaLaunchInfoNV* pLaunchInfo); - -#ifdef VK_USE_PLATFORM_METAL_EXT -VKAPI_ATTR void VKAPI_CALL ExportMetalObjectsEXT(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo); - -#endif // VK_USE_PLATFORM_METAL_EXT -VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutSizeEXT(VkDevice device, VkDescriptorSetLayout layout, - VkDeviceSize* pLayoutSizeInBytes); - -VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutBindingOffsetEXT(VkDevice device, VkDescriptorSetLayout layout, uint32_t binding, - VkDeviceSize* pOffset); - -VKAPI_ATTR void VKAPI_CALL GetDescriptorEXT(VkDevice device, const VkDescriptorGetInfoEXT* pDescriptorInfo, size_t dataSize, - void* pDescriptor); - -VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorBuffersEXT(VkCommandBuffer commandBuffer, uint32_t bufferCount, - const VkDescriptorBufferBindingInfoEXT* pBindingInfos); - -VKAPI_ATTR void VKAPI_CALL CmdSetDescriptorBufferOffsetsEXT(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, - VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, - const uint32_t* pBufferIndices, const VkDeviceSize* pOffsets); - -VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorBufferEmbeddedSamplersEXT(VkCommandBuffer commandBuffer, - VkPipelineBindPoint pipelineBindPoint, - VkPipelineLayout layout, uint32_t set); - -VKAPI_ATTR VkResult VKAPI_CALL GetBufferOpaqueCaptureDescriptorDataEXT(VkDevice device, - const VkBufferCaptureDescriptorDataInfoEXT* pInfo, - void* pData); - -VKAPI_ATTR VkResult VKAPI_CALL GetImageOpaqueCaptureDescriptorDataEXT(VkDevice device, - const VkImageCaptureDescriptorDataInfoEXT* pInfo, - void* pData); - -VKAPI_ATTR VkResult VKAPI_CALL GetImageViewOpaqueCaptureDescriptorDataEXT(VkDevice device, - const VkImageViewCaptureDescriptorDataInfoEXT* pInfo, - void* pData); - -VKAPI_ATTR VkResult VKAPI_CALL GetSamplerOpaqueCaptureDescriptorDataEXT(VkDevice device, - const VkSamplerCaptureDescriptorDataInfoEXT* pInfo, - void* pData); - -VKAPI_ATTR VkResult VKAPI_CALL GetAccelerationStructureOpaqueCaptureDescriptorDataEXT( - VkDevice device, const VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfo, void* pData); - -VKAPI_ATTR void VKAPI_CALL CmdSetFragmentShadingRateEnumNV(VkCommandBuffer commandBuffer, VkFragmentShadingRateNV shadingRate, - const VkFragmentShadingRateCombinerOpKHR combinerOps[2]); - -VKAPI_ATTR VkResult VKAPI_CALL GetDeviceFaultInfoEXT(VkDevice device, VkDeviceFaultCountsEXT* pFaultCounts, - VkDeviceFaultInfoEXT* pFaultInfo); - -#ifdef VK_USE_PLATFORM_WIN32_KHR -VKAPI_ATTR VkResult VKAPI_CALL AcquireWinrtDisplayNV(VkPhysicalDevice physicalDevice, VkDisplayKHR display); - -VKAPI_ATTR VkResult VKAPI_CALL GetWinrtDisplayNV(VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, - VkDisplayKHR* pDisplay); - -#endif // VK_USE_PLATFORM_WIN32_KHR -#ifdef VK_USE_PLATFORM_DIRECTFB_EXT -VKAPI_ATTR VkResult VKAPI_CALL CreateDirectFBSurfaceEXT(VkInstance instance, const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); - -VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceDirectFBPresentationSupportEXT(VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex, IDirectFB* dfb); - -#endif // VK_USE_PLATFORM_DIRECTFB_EXT -VKAPI_ATTR void VKAPI_CALL CmdSetVertexInputEXT(VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, - const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, - uint32_t vertexAttributeDescriptionCount, - const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions); - -#ifdef VK_USE_PLATFORM_FUCHSIA -VKAPI_ATTR VkResult VKAPI_CALL GetMemoryZirconHandleFUCHSIA(VkDevice device, - const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, - zx_handle_t* pZirconHandle); - -VKAPI_ATTR VkResult VKAPI_CALL -GetMemoryZirconHandlePropertiesFUCHSIA(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, - VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties); - -VKAPI_ATTR VkResult VKAPI_CALL ImportSemaphoreZirconHandleFUCHSIA( - VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo); - -VKAPI_ATTR VkResult VKAPI_CALL GetSemaphoreZirconHandleFUCHSIA(VkDevice device, - const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, - zx_handle_t* pZirconHandle); - -VKAPI_ATTR VkResult VKAPI_CALL CreateBufferCollectionFUCHSIA(VkDevice device, - const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkBufferCollectionFUCHSIA* pCollection); - -VKAPI_ATTR VkResult VKAPI_CALL SetBufferCollectionImageConstraintsFUCHSIA( - VkDevice device, VkBufferCollectionFUCHSIA collection, const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo); - -VKAPI_ATTR VkResult VKAPI_CALL SetBufferCollectionBufferConstraintsFUCHSIA( - VkDevice device, VkBufferCollectionFUCHSIA collection, const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo); - -VKAPI_ATTR void VKAPI_CALL DestroyBufferCollectionFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL GetBufferCollectionPropertiesFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, - VkBufferCollectionPropertiesFUCHSIA* pProperties); - -#endif // VK_USE_PLATFORM_FUCHSIA -VKAPI_ATTR VkResult VKAPI_CALL GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(VkDevice device, VkRenderPass renderpass, - VkExtent2D* pMaxWorkgroupSize); - -VKAPI_ATTR void VKAPI_CALL CmdSubpassShadingHUAWEI(VkCommandBuffer commandBuffer); - -VKAPI_ATTR void VKAPI_CALL CmdBindInvocationMaskHUAWEI(VkCommandBuffer commandBuffer, VkImageView imageView, - VkImageLayout imageLayout); - -VKAPI_ATTR VkResult VKAPI_CALL GetMemoryRemoteAddressNV(VkDevice device, - const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo, - VkRemoteAddressNV* pAddress); - -VKAPI_ATTR VkResult VKAPI_CALL GetPipelinePropertiesEXT(VkDevice device, const VkPipelineInfoEXT* pPipelineInfo, - VkBaseOutStructure* pPipelineProperties); - -VKAPI_ATTR void VKAPI_CALL CmdSetPatchControlPointsEXT(VkCommandBuffer commandBuffer, uint32_t patchControlPoints); - -VKAPI_ATTR void VKAPI_CALL CmdSetRasterizerDiscardEnableEXT(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetDepthBiasEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetLogicOpEXT(VkCommandBuffer commandBuffer, VkLogicOp logicOp); - -VKAPI_ATTR void VKAPI_CALL CmdSetPrimitiveRestartEnableEXT(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable); - -#ifdef VK_USE_PLATFORM_SCREEN_QNX -VKAPI_ATTR VkResult VKAPI_CALL CreateScreenSurfaceQNX(VkInstance instance, const VkScreenSurfaceCreateInfoQNX* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); - -VKAPI_ATTR VkBool32 VKAPI_CALL GetPhysicalDeviceScreenPresentationSupportQNX(VkPhysicalDevice physicalDevice, - uint32_t queueFamilyIndex, - struct _screen_window* window); - -#endif // VK_USE_PLATFORM_SCREEN_QNX -VKAPI_ATTR void VKAPI_CALL CmdSetColorWriteEnableEXT(VkCommandBuffer commandBuffer, uint32_t attachmentCount, - const VkBool32* pColorWriteEnables); - -VKAPI_ATTR void VKAPI_CALL CmdDrawMultiEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawInfoEXT* pVertexInfo, - uint32_t instanceCount, uint32_t firstInstance, uint32_t stride); - -VKAPI_ATTR void VKAPI_CALL CmdDrawMultiIndexedEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, - const VkMultiDrawIndexedInfoEXT* pIndexInfo, uint32_t instanceCount, - uint32_t firstInstance, uint32_t stride, const int32_t* pVertexOffset); - -VKAPI_ATTR VkResult VKAPI_CALL CreateMicromapEXT(VkDevice device, const VkMicromapCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkMicromapEXT* pMicromap); - -VKAPI_ATTR void VKAPI_CALL DestroyMicromapEXT(VkDevice device, VkMicromapEXT micromap, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR void VKAPI_CALL CmdBuildMicromapsEXT(VkCommandBuffer commandBuffer, uint32_t infoCount, - const VkMicromapBuildInfoEXT* pInfos); - -VKAPI_ATTR VkResult VKAPI_CALL BuildMicromapsEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, - const VkMicromapBuildInfoEXT* pInfos); - -VKAPI_ATTR VkResult VKAPI_CALL CopyMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, - const VkCopyMicromapInfoEXT* pInfo); - -VKAPI_ATTR VkResult VKAPI_CALL CopyMicromapToMemoryEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, - const VkCopyMicromapToMemoryInfoEXT* pInfo); - -VKAPI_ATTR VkResult VKAPI_CALL CopyMemoryToMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, - const VkCopyMemoryToMicromapInfoEXT* pInfo); - -VKAPI_ATTR VkResult VKAPI_CALL WriteMicromapsPropertiesEXT(VkDevice device, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, - VkQueryType queryType, size_t dataSize, void* pData, size_t stride); - -VKAPI_ATTR void VKAPI_CALL CmdCopyMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT* pInfo); - -VKAPI_ATTR void VKAPI_CALL CmdCopyMicromapToMemoryEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT* pInfo); - -VKAPI_ATTR void VKAPI_CALL CmdCopyMemoryToMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT* pInfo); - -VKAPI_ATTR void VKAPI_CALL CmdWriteMicromapsPropertiesEXT(VkCommandBuffer commandBuffer, uint32_t micromapCount, - const VkMicromapEXT* pMicromaps, VkQueryType queryType, - VkQueryPool queryPool, uint32_t firstQuery); - -VKAPI_ATTR void VKAPI_CALL GetDeviceMicromapCompatibilityEXT(VkDevice device, const VkMicromapVersionInfoEXT* pVersionInfo, - VkAccelerationStructureCompatibilityKHR* pCompatibility); - -VKAPI_ATTR void VKAPI_CALL GetMicromapBuildSizesEXT(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, - const VkMicromapBuildInfoEXT* pBuildInfo, - VkMicromapBuildSizesInfoEXT* pSizeInfo); - -VKAPI_ATTR void VKAPI_CALL CmdDrawClusterHUAWEI(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, - uint32_t groupCountZ); - -VKAPI_ATTR void VKAPI_CALL CmdDrawClusterIndirectHUAWEI(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset); - -VKAPI_ATTR void VKAPI_CALL SetDeviceMemoryPriorityEXT(VkDevice device, VkDeviceMemory memory, float priority); - -VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutHostMappingInfoVALVE(VkDevice device, - const VkDescriptorSetBindingReferenceVALVE* pBindingReference, - VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping); - -VKAPI_ATTR void VKAPI_CALL GetDescriptorSetHostMappingVALVE(VkDevice device, VkDescriptorSet descriptorSet, void** ppData); - -VKAPI_ATTR void VKAPI_CALL CmdCopyMemoryIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, - uint32_t copyCount, uint32_t stride); - -VKAPI_ATTR void VKAPI_CALL CmdCopyMemoryToImageIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, - uint32_t copyCount, uint32_t stride, VkImage dstImage, - VkImageLayout dstImageLayout, - const VkImageSubresourceLayers* pImageSubresources); - -VKAPI_ATTR void VKAPI_CALL CmdDecompressMemoryNV(VkCommandBuffer commandBuffer, uint32_t decompressRegionCount, - const VkDecompressMemoryRegionNV* pDecompressMemoryRegions); - -VKAPI_ATTR void VKAPI_CALL CmdDecompressMemoryIndirectCountNV(VkCommandBuffer commandBuffer, - VkDeviceAddress indirectCommandsAddress, - VkDeviceAddress indirectCommandsCountAddress, uint32_t stride); - -VKAPI_ATTR void VKAPI_CALL GetPipelineIndirectMemoryRequirementsNV(VkDevice device, const VkComputePipelineCreateInfo* pCreateInfo, - VkMemoryRequirements2* pMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL CmdUpdatePipelineIndirectBufferNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, - VkPipeline pipeline); - -VKAPI_ATTR VkDeviceAddress VKAPI_CALL GetPipelineIndirectDeviceAddressNV(VkDevice device, - const VkPipelineIndirectDeviceAddressInfoNV* pInfo); - -VKAPI_ATTR void VKAPI_CALL CmdSetDepthClampEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClampEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetPolygonModeEXT(VkCommandBuffer commandBuffer, VkPolygonMode polygonMode); - -VKAPI_ATTR void VKAPI_CALL CmdSetRasterizationSamplesEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits rasterizationSamples); - -VKAPI_ATTR void VKAPI_CALL CmdSetSampleMaskEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits samples, - const VkSampleMask* pSampleMask); - -VKAPI_ATTR void VKAPI_CALL CmdSetAlphaToCoverageEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToCoverageEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetAlphaToOneEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToOneEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetLogicOpEnableEXT(VkCommandBuffer commandBuffer, VkBool32 logicOpEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetColorBlendEnableEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, - uint32_t attachmentCount, const VkBool32* pColorBlendEnables); - -VKAPI_ATTR void VKAPI_CALL CmdSetColorBlendEquationEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, - uint32_t attachmentCount, - const VkColorBlendEquationEXT* pColorBlendEquations); - -VKAPI_ATTR void VKAPI_CALL CmdSetColorWriteMaskEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, - uint32_t attachmentCount, const VkColorComponentFlags* pColorWriteMasks); - -VKAPI_ATTR void VKAPI_CALL CmdSetTessellationDomainOriginEXT(VkCommandBuffer commandBuffer, - VkTessellationDomainOrigin domainOrigin); - -VKAPI_ATTR void VKAPI_CALL CmdSetRasterizationStreamEXT(VkCommandBuffer commandBuffer, uint32_t rasterizationStream); - -VKAPI_ATTR void VKAPI_CALL CmdSetConservativeRasterizationModeEXT(VkCommandBuffer commandBuffer, - VkConservativeRasterizationModeEXT conservativeRasterizationMode); - -VKAPI_ATTR void VKAPI_CALL CmdSetExtraPrimitiveOverestimationSizeEXT(VkCommandBuffer commandBuffer, - float extraPrimitiveOverestimationSize); - -VKAPI_ATTR void VKAPI_CALL CmdSetDepthClipEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClipEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetSampleLocationsEnableEXT(VkCommandBuffer commandBuffer, VkBool32 sampleLocationsEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetColorBlendAdvancedEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, - uint32_t attachmentCount, - const VkColorBlendAdvancedEXT* pColorBlendAdvanced); - -VKAPI_ATTR void VKAPI_CALL CmdSetProvokingVertexModeEXT(VkCommandBuffer commandBuffer, - VkProvokingVertexModeEXT provokingVertexMode); - -VKAPI_ATTR void VKAPI_CALL CmdSetLineRasterizationModeEXT(VkCommandBuffer commandBuffer, - VkLineRasterizationModeEXT lineRasterizationMode); - -VKAPI_ATTR void VKAPI_CALL CmdSetLineStippleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stippledLineEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetDepthClipNegativeOneToOneEXT(VkCommandBuffer commandBuffer, VkBool32 negativeOneToOne); - -VKAPI_ATTR void VKAPI_CALL CmdSetViewportWScalingEnableNV(VkCommandBuffer commandBuffer, VkBool32 viewportWScalingEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetViewportSwizzleNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, - const VkViewportSwizzleNV* pViewportSwizzles); - -VKAPI_ATTR void VKAPI_CALL CmdSetCoverageToColorEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageToColorEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetCoverageToColorLocationNV(VkCommandBuffer commandBuffer, uint32_t coverageToColorLocation); - -VKAPI_ATTR void VKAPI_CALL CmdSetCoverageModulationModeNV(VkCommandBuffer commandBuffer, - VkCoverageModulationModeNV coverageModulationMode); - -VKAPI_ATTR void VKAPI_CALL CmdSetCoverageModulationTableEnableNV(VkCommandBuffer commandBuffer, - VkBool32 coverageModulationTableEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetCoverageModulationTableNV(VkCommandBuffer commandBuffer, uint32_t coverageModulationTableCount, - const float* pCoverageModulationTable); - -VKAPI_ATTR void VKAPI_CALL CmdSetShadingRateImageEnableNV(VkCommandBuffer commandBuffer, VkBool32 shadingRateImageEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetRepresentativeFragmentTestEnableNV(VkCommandBuffer commandBuffer, - VkBool32 representativeFragmentTestEnable); - -VKAPI_ATTR void VKAPI_CALL CmdSetCoverageReductionModeNV(VkCommandBuffer commandBuffer, - VkCoverageReductionModeNV coverageReductionMode); - -VKAPI_ATTR void VKAPI_CALL GetShaderModuleIdentifierEXT(VkDevice device, VkShaderModule shaderModule, - VkShaderModuleIdentifierEXT* pIdentifier); - -VKAPI_ATTR void VKAPI_CALL GetShaderModuleCreateInfoIdentifierEXT(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, - VkShaderModuleIdentifierEXT* pIdentifier); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceOpticalFlowImageFormatsNV( - VkPhysicalDevice physicalDevice, const VkOpticalFlowImageFormatInfoNV* pOpticalFlowImageFormatInfo, uint32_t* pFormatCount, - VkOpticalFlowImageFormatPropertiesNV* pImageFormatProperties); - -VKAPI_ATTR VkResult VKAPI_CALL CreateOpticalFlowSessionNV(VkDevice device, const VkOpticalFlowSessionCreateInfoNV* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkOpticalFlowSessionNV* pSession); - -VKAPI_ATTR void VKAPI_CALL DestroyOpticalFlowSessionNV(VkDevice device, VkOpticalFlowSessionNV session, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL BindOpticalFlowSessionImageNV(VkDevice device, VkOpticalFlowSessionNV session, - VkOpticalFlowSessionBindingPointNV bindingPoint, VkImageView view, - VkImageLayout layout); - -VKAPI_ATTR void VKAPI_CALL CmdOpticalFlowExecuteNV(VkCommandBuffer commandBuffer, VkOpticalFlowSessionNV session, - const VkOpticalFlowExecuteInfoNV* pExecuteInfo); - -VKAPI_ATTR void VKAPI_CALL AntiLagUpdateAMD(VkDevice device, const VkAntiLagDataAMD* pData); - -VKAPI_ATTR VkResult VKAPI_CALL CreateShadersEXT(VkDevice device, uint32_t createInfoCount, - const VkShaderCreateInfoEXT* pCreateInfos, const VkAllocationCallbacks* pAllocator, - VkShaderEXT* pShaders); - -VKAPI_ATTR void VKAPI_CALL DestroyShaderEXT(VkDevice device, VkShaderEXT shader, const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL GetShaderBinaryDataEXT(VkDevice device, VkShaderEXT shader, size_t* pDataSize, void* pData); - -VKAPI_ATTR void VKAPI_CALL CmdBindShadersEXT(VkCommandBuffer commandBuffer, uint32_t stageCount, - const VkShaderStageFlagBits* pStages, const VkShaderEXT* pShaders); - -VKAPI_ATTR void VKAPI_CALL CmdSetDepthClampRangeEXT(VkCommandBuffer commandBuffer, VkDepthClampModeEXT depthClampMode, - const VkDepthClampRangeEXT* pDepthClampRange); - -VKAPI_ATTR VkResult VKAPI_CALL GetFramebufferTilePropertiesQCOM(VkDevice device, VkFramebuffer framebuffer, - uint32_t* pPropertiesCount, VkTilePropertiesQCOM* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL GetDynamicRenderingTilePropertiesQCOM(VkDevice device, const VkRenderingInfo* pRenderingInfo, - VkTilePropertiesQCOM* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL SetLatencySleepModeNV(VkDevice device, VkSwapchainKHR swapchain, - const VkLatencySleepModeInfoNV* pSleepModeInfo); - -VKAPI_ATTR VkResult VKAPI_CALL LatencySleepNV(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepInfoNV* pSleepInfo); - -VKAPI_ATTR void VKAPI_CALL SetLatencyMarkerNV(VkDevice device, VkSwapchainKHR swapchain, - const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo); - -VKAPI_ATTR void VKAPI_CALL GetLatencyTimingsNV(VkDevice device, VkSwapchainKHR swapchain, - VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo); - -VKAPI_ATTR void VKAPI_CALL QueueNotifyOutOfBandNV(VkQueue queue, const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo); - -VKAPI_ATTR void VKAPI_CALL CmdSetAttachmentFeedbackLoopEnableEXT(VkCommandBuffer commandBuffer, VkImageAspectFlags aspectMask); - -#ifdef VK_USE_PLATFORM_SCREEN_QNX -VKAPI_ATTR VkResult VKAPI_CALL GetScreenBufferPropertiesQNX(VkDevice device, const struct _screen_buffer* buffer, - VkScreenBufferPropertiesQNX* pProperties); - -#endif // VK_USE_PLATFORM_SCREEN_QNX -VKAPI_ATTR void VKAPI_CALL GetGeneratedCommandsMemoryRequirementsEXT(VkDevice device, - const VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfo, - VkMemoryRequirements2* pMemoryRequirements); - -VKAPI_ATTR void VKAPI_CALL CmdPreprocessGeneratedCommandsEXT(VkCommandBuffer commandBuffer, - const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, - VkCommandBuffer stateCommandBuffer); - -VKAPI_ATTR void VKAPI_CALL CmdExecuteGeneratedCommandsEXT(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, - const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo); - -VKAPI_ATTR VkResult VKAPI_CALL CreateIndirectCommandsLayoutEXT(VkDevice device, - const VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkIndirectCommandsLayoutEXT* pIndirectCommandsLayout); - -VKAPI_ATTR void VKAPI_CALL DestroyIndirectCommandsLayoutEXT(VkDevice device, VkIndirectCommandsLayoutEXT indirectCommandsLayout, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR VkResult VKAPI_CALL CreateIndirectExecutionSetEXT(VkDevice device, - const VkIndirectExecutionSetCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkIndirectExecutionSetEXT* pIndirectExecutionSet); - -VKAPI_ATTR void VKAPI_CALL DestroyIndirectExecutionSetEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR void VKAPI_CALL UpdateIndirectExecutionSetPipelineEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, - uint32_t executionSetWriteCount, - const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites); - -VKAPI_ATTR void VKAPI_CALL UpdateIndirectExecutionSetShaderEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, - uint32_t executionSetWriteCount, - const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites); - -VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( - VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixFlexibleDimensionsPropertiesNV* pProperties); - -VKAPI_ATTR VkResult VKAPI_CALL CreateAccelerationStructureKHR(VkDevice device, - const VkAccelerationStructureCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkAccelerationStructureKHR* pAccelerationStructure); - -VKAPI_ATTR void VKAPI_CALL DestroyAccelerationStructureKHR(VkDevice device, VkAccelerationStructureKHR accelerationStructure, - const VkAllocationCallbacks* pAllocator); - -VKAPI_ATTR void VKAPI_CALL CmdBuildAccelerationStructuresKHR( - VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, - const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos); - -VKAPI_ATTR void VKAPI_CALL CmdBuildAccelerationStructuresIndirectKHR(VkCommandBuffer commandBuffer, uint32_t infoCount, - const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, - const VkDeviceAddress* pIndirectDeviceAddresses, - const uint32_t* pIndirectStrides, - const uint32_t* const* ppMaxPrimitiveCounts); - -VKAPI_ATTR VkResult VKAPI_CALL -BuildAccelerationStructuresKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, - const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, - const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos); - -VKAPI_ATTR VkResult VKAPI_CALL CopyAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, - const VkCopyAccelerationStructureInfoKHR* pInfo); - -VKAPI_ATTR VkResult VKAPI_CALL CopyAccelerationStructureToMemoryKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, - const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo); - -VKAPI_ATTR VkResult VKAPI_CALL CopyMemoryToAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, - const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo); - -VKAPI_ATTR VkResult VKAPI_CALL WriteAccelerationStructuresPropertiesKHR(VkDevice device, uint32_t accelerationStructureCount, - const VkAccelerationStructureKHR* pAccelerationStructures, - VkQueryType queryType, size_t dataSize, void* pData, - size_t stride); - -VKAPI_ATTR void VKAPI_CALL CmdCopyAccelerationStructureKHR(VkCommandBuffer commandBuffer, - const VkCopyAccelerationStructureInfoKHR* pInfo); - -VKAPI_ATTR void VKAPI_CALL CmdCopyAccelerationStructureToMemoryKHR(VkCommandBuffer commandBuffer, - const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo); - -VKAPI_ATTR void VKAPI_CALL CmdCopyMemoryToAccelerationStructureKHR(VkCommandBuffer commandBuffer, - const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo); - -VKAPI_ATTR VkDeviceAddress VKAPI_CALL -GetAccelerationStructureDeviceAddressKHR(VkDevice device, const VkAccelerationStructureDeviceAddressInfoKHR* pInfo); - -VKAPI_ATTR void VKAPI_CALL CmdWriteAccelerationStructuresPropertiesKHR(VkCommandBuffer commandBuffer, - uint32_t accelerationStructureCount, - const VkAccelerationStructureKHR* pAccelerationStructures, - VkQueryType queryType, VkQueryPool queryPool, - uint32_t firstQuery); - -VKAPI_ATTR void VKAPI_CALL GetDeviceAccelerationStructureCompatibilityKHR(VkDevice device, - const VkAccelerationStructureVersionInfoKHR* pVersionInfo, - VkAccelerationStructureCompatibilityKHR* pCompatibility); - -VKAPI_ATTR void VKAPI_CALL GetAccelerationStructureBuildSizesKHR(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, - const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo, - const uint32_t* pMaxPrimitiveCounts, - VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo); - -VKAPI_ATTR void VKAPI_CALL CmdTraceRaysKHR(VkCommandBuffer commandBuffer, - const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, - const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, - const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, - const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, uint32_t width, - uint32_t height, uint32_t depth); - -VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, - VkPipelineCache pipelineCache, uint32_t createInfoCount, - const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, - const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); - -VKAPI_ATTR VkResult VKAPI_CALL GetRayTracingCaptureReplayShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, - uint32_t firstGroup, uint32_t groupCount, - size_t dataSize, void* pData); - -VKAPI_ATTR void VKAPI_CALL CmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer, - const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, - const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, - const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, - const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, - VkDeviceAddress indirectDeviceAddress); - -VKAPI_ATTR VkDeviceSize VKAPI_CALL GetRayTracingShaderGroupStackSizeKHR(VkDevice device, VkPipeline pipeline, uint32_t group, - VkShaderGroupShaderKHR groupShader); - -VKAPI_ATTR void VKAPI_CALL CmdSetRayTracingPipelineStackSizeKHR(VkCommandBuffer commandBuffer, uint32_t pipelineStackSize); - -VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksEXT(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, - uint32_t groupCountZ); - -VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, - uint32_t drawCount, uint32_t stride); - -VKAPI_ATTR void VKAPI_CALL CmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, - VkBuffer countBuffer, VkDeviceSize countBufferOffset, - uint32_t maxDrawCount, uint32_t stride); - -// Layer object type identifiers -enum LayerObjectTypeId { - LayerObjectTypeThreading, // Instance or device threading layer object - LayerObjectTypeParameterValidation, // Instance or device parameter validation layer object - LayerObjectTypeObjectTracker, // Instance or device object tracker layer object - LayerObjectTypeCoreValidation, // Instance or device core validation layer object - LayerObjectTypeBestPractices, // Instance or device best practices layer object - LayerObjectTypeGpuAssisted, // Instance or device gpu assisted validation layer object - LayerObjectTypeSyncValidation, // Instance or device synchronization validation layer object - LayerObjectTypeMaxEnum, // Max enum count -}; - -struct TemplateState { - VkDescriptorUpdateTemplate desc_update_template; - vku::safe_VkDescriptorUpdateTemplateCreateInfo create_info; - bool destroyed; - - TemplateState(VkDescriptorUpdateTemplate update_template, vku::safe_VkDescriptorUpdateTemplateCreateInfo* pCreateInfo) - : desc_update_template(update_template), create_info(*pCreateInfo), destroyed(false) {} -}; - -// When testing for a valid value, allow a way to right away return how it might not be valid -enum class ValidValue { - Valid = 0, - NotFound, // example, trying to use a random int for an enum - NoExtension, // trying to use a proper value, but the extension is required -}; - -#if defined(__clang__) -#define DECORATE_PRINTF(_fmt_argnum, _first_param_num) __attribute__((format(printf, _fmt_argnum, _first_param_num))) -#elif defined(__GNUC__) -#define DECORATE_PRINTF(_fmt_argnum, _first_param_num) __attribute__((format(gnu_printf, _fmt_argnum, _first_param_num))) -#else -#define DECORATE_PRINTF(_fmt_num, _first_param_num) -#endif - -class ValidationObject; - -class DispatchObject { - public: - APIVersion api_version; - DebugReport* debug_report = nullptr; - VkInstance instance = VK_NULL_HANDLE; - VkPhysicalDevice physical_device = VK_NULL_HANDLE; - VkDevice device = VK_NULL_HANDLE; - - VkLayerInstanceDispatchTable instance_dispatch_table; - VkLayerDispatchTable device_dispatch_table; - - InstanceExtensions instance_extensions; - DeviceExtensions device_extensions = {}; - GlobalSettings global_settings = {}; - GpuAVSettings gpuav_settings = {}; - SyncValSettings syncval_settings = {}; - - CHECK_DISABLED disabled = {}; - CHECK_ENABLED enabled = {}; - - mutable std::vector> intercept_vectors; - mutable std::vector object_dispatch; - mutable std::vector aborted_object_dispatch; - - // Handle Wrapping Data - // Reverse map display handles - vvl::concurrent_unordered_map display_id_reverse_mapping; - // Wrapping Descriptor Template Update structures requires access to the template createinfo structs - vvl::unordered_map> desc_template_createinfo_map; - struct SubpassesUsageStates { - vvl::unordered_set subpasses_using_color_attachment; - vvl::unordered_set subpasses_using_depthstencil_attachment; - }; - // Uses unwrapped handles - vvl::unordered_map renderpasses_states; - // Map of wrapped swapchain handles to arrays of wrapped swapchain image IDs - // Each swapchain has an immutable list of wrapped swapchain image IDs -- always return these IDs if they exist - vvl::unordered_map> swapchain_wrapped_image_handle_map; - // Map of wrapped descriptor pools to set of wrapped descriptor sets allocated from each pool - vvl::unordered_map> pool_descriptor_sets_map; - - vvl::concurrent_unordered_map>, 0> deferred_operation_post_completion; - vvl::concurrent_unordered_map&)>>, 0> - deferred_operation_post_check; - vvl::concurrent_unordered_map, 0> deferred_operation_pipelines; - - void InitObjectDispatchVectors(); - void ReleaseDeviceValidationObject(LayerObjectTypeId type_id) const; - void ReleaseAllValidationObjects() const; - - ValidationObject* GetValidationObject(LayerObjectTypeId object_type) const; - - template - ValidationObjectType* GetValidationObject() const; - // Unwrap a handle. - template - HandleType Unwrap(HandleType wrapped_handle) { - if (wrapped_handle == (HandleType)VK_NULL_HANDLE) return wrapped_handle; - auto iter = unique_id_mapping.find(CastToUint64(wrapped_handle)); - if (iter == unique_id_mapping.end()) return (HandleType)0; - return (HandleType)iter->second; - } - - // Wrap a newly created handle with a new unique ID, and return the new ID. - template - HandleType WrapNew(HandleType new_created_handle) { - if (new_created_handle == (HandleType)VK_NULL_HANDLE) return new_created_handle; - auto unique_id = global_unique_id++; - unique_id = HashedUint64::hash(unique_id); - assert(unique_id != 0); // can't be 0, otherwise unwrap will apply special rule for VK_NULL_HANDLE - unique_id_mapping.insert_or_assign(unique_id, CastToUint64(new_created_handle)); - return (HandleType)unique_id; - } - - // VkDisplayKHR objects are statically created in the driver at VkCreateInstance. - // They live with the PhyiscalDevice and apps never created/destroy them. - // Apps needs will query for them and the first time we see it we wrap it - VkDisplayKHR MaybeWrapDisplay(VkDisplayKHR handle) { - // See if this display is already known - auto it = display_id_reverse_mapping.find(handle); - if (it != display_id_reverse_mapping.end()) return (VkDisplayKHR)it->second; - - // First time see this VkDisplayKHR, so wrap - const uint64_t unique_id = (uint64_t)WrapNew(handle); - display_id_reverse_mapping.insert_or_assign(handle, unique_id); - return (VkDisplayKHR)unique_id; - } - // Debug Logging Helpers - bool DECORATE_PRINTF(5, 6) - LogError(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kErrorBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - // Currently works like LogWarning, but allows developer to better categorize the warning - bool DECORATE_PRINTF(5, 6) LogUndefinedValue(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, - const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kWarningBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - bool DECORATE_PRINTF(5, 6) - LogWarning(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kWarningBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - bool DECORATE_PRINTF(5, 6) LogPerformanceWarning(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, - const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kPerformanceWarningBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - bool DECORATE_PRINTF(5, 6) - LogInfo(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kInformationBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - bool DECORATE_PRINTF(5, 6) - LogVerbose(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kVerboseBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - void LogInternalError(std::string_view failure_location, const LogObjectList& obj_list, const Location& loc, - std::string_view entrypoint, VkResult err) const { - const std::string_view err_string = string_VkResult(err); - std::string vuid = "INTERNAL-ERROR-"; - vuid += entrypoint; - LogError(vuid, obj_list, loc, "at %s: %s() was called in the Validation Layer state tracking and failed with result = %s.", - failure_location.data(), entrypoint.data(), err_string.data()); - } -}; - -// Layer chassis validation object base class definition -class ValidationObject { - public: - APIVersion api_version; - DebugReport* debug_report = nullptr; - template - std::string FormatHandle(T&& h) const { - return debug_report->FormatHandle(std::forward(h)); - } - DispatchObject* dispatch_{}; - - VkLayerInstanceDispatchTable instance_dispatch_table; - VkLayerDispatchTable device_dispatch_table; - - InstanceExtensions instance_extensions; - DeviceExtensions device_extensions = {}; - GlobalSettings global_settings = {}; - GpuAVSettings gpuav_settings = {}; - SyncValSettings syncval_settings = {}; - - CHECK_DISABLED disabled = {}; - CHECK_ENABLED enabled = {}; - - VkInstance instance = VK_NULL_HANDLE; - VkPhysicalDevice physical_device = VK_NULL_HANDLE; - VkDevice device = VK_NULL_HANDLE; - bool is_device_lost = false; - - LayerObjectTypeId container_type; - - std::string layer_name = "CHASSIS"; - - ValidationObject() {} - virtual ~ValidationObject() {} - - mutable std::shared_mutex validation_object_mutex; - virtual ReadLockGuard ReadLock() const { return ReadLockGuard(validation_object_mutex); } - virtual WriteLockGuard WriteLock() { return WriteLockGuard(validation_object_mutex); } - - // If the Record phase calls a function that blocks, we might need to release - // the lock that protects Record itself in order to avoid mutual waiting. - static thread_local WriteLockGuard* record_guard; - - // Should be used instead of WriteLock() if the Record phase wants to release - // its lock during the blocking operation. - struct BlockingOperationGuard { - WriteLockGuard lock; - ValidationObject* validation_object = nullptr; - - BlockingOperationGuard(ValidationObject* validation_object) : validation_object(validation_object) { - // This assert detects recursive calls. It is here mostly for documentation purposes - // because WriteLock() also triggers errors during recursion. - // Recursion is not allowed since record_guard is a thread-local variable and it can - // reference only one frame of the callstack. - assert(validation_object->record_guard == nullptr); - - lock = validation_object->WriteLock(); - - // Initialize record_guard only when Record is actually protected by the - // mutex. It's not the case when fine grained locking is enabled. - record_guard = lock.owns_lock() ? &lock : nullptr; - } - - ~BlockingOperationGuard() { validation_object->record_guard = nullptr; } - }; - - // The following Begin/End methods should be called during the Record phase - // around blocking operation that causes mutual waiting (deadlock). - void BeginBlockingOperation() { - if (record_guard) { - record_guard->unlock(); - } - } - void EndBlockingOperation() { - if (record_guard) { - record_guard->lock(); - } - } - - // Debug Logging Helpers - bool DECORATE_PRINTF(5, 6) - LogError(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kErrorBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - // Currently works like LogWarning, but allows developer to better categorize the warning - bool DECORATE_PRINTF(5, 6) LogUndefinedValue(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, - const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kWarningBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - bool DECORATE_PRINTF(5, 6) - LogWarning(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kWarningBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - bool DECORATE_PRINTF(5, 6) LogPerformanceWarning(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, - const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kPerformanceWarningBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - bool DECORATE_PRINTF(5, 6) - LogInfo(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kInformationBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - bool DECORATE_PRINTF(5, 6) - LogVerbose(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kVerboseBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - void LogInternalError(std::string_view failure_location, const LogObjectList& obj_list, const Location& loc, - std::string_view entrypoint, VkResult err) const { - const std::string_view err_string = string_VkResult(err); - std::string vuid = "INTERNAL-ERROR-"; - vuid += entrypoint; - LogError(vuid, obj_list, loc, "at %s: %s() was called in the Validation Layer state tracking and failed with result = %s.", - failure_location.data(), entrypoint.data(), err_string.data()); - } - // We make many internal dispatch calls to extended query functions which can depend on the API version - void DispatchGetPhysicalDeviceFeatures2Helper(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures) const; - void DispatchGetPhysicalDeviceProperties2Helper(VkPhysicalDevice physicalDevice, - VkPhysicalDeviceProperties2* pProperties) const; - void DispatchGetPhysicalDeviceFormatProperties2Helper(VkPhysicalDevice physicalDevice, VkFormat format, - VkFormatProperties2* pFormatProperties) const; - VkResult DispatchGetPhysicalDeviceImageFormatProperties2Helper(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, - VkImageFormatProperties2* pImageFormatProperties) const; - void DispatchGetPhysicalDeviceQueueFamilyProperties2Helper(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, - VkQueueFamilyProperties2* pQueueFamilyProperties) const; - void DispatchGetPhysicalDeviceMemoryProperties2Helper(VkPhysicalDevice physicalDevice, - VkPhysicalDeviceMemoryProperties2* pMemoryProperties) const; - void DispatchGetPhysicalDeviceSparseImageFormatProperties2Helper(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, - uint32_t* pPropertyCount, - VkSparseImageFormatProperties2* pProperties) const; - void DispatchGetPhysicalDeviceExternalSemaphorePropertiesHelper( - VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, - VkExternalSemaphoreProperties* pExternalSemaphoreProperties) const; - void DispatchGetPhysicalDeviceExternalFencePropertiesHelper(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, - VkExternalFenceProperties* pExternalFenceProperties) const; - void DispatchGetPhysicalDeviceExternalBufferPropertiesHelper(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, - VkExternalBufferProperties* pExternalBufferProperties) const; - - // clang-format off - // Pre/post hook point declarations - virtual bool PreCallValidateCreateInstance(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateInstance(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateInstance(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyInstance(VkInstance instance, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyInstance(VkInstance instance, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyInstance(VkInstance instance, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateEnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordEnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices, const RecordObject& record_obj) {} - virtual void PostCallRecordEnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties* pQueueFamilyProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties* pQueueFamilyProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties* pQueueFamilyProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetInstanceProcAddr(VkInstance instance, const char* pName, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetInstanceProcAddr(VkInstance instance, const char* pName, const RecordObject& record_obj) {} - virtual void PostCallRecordGetInstanceProcAddr(VkInstance instance, const char* pName, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeviceProcAddr(VkDevice device, const char* pName, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeviceProcAddr(VkDevice device, const char* pName, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeviceProcAddr(VkDevice device, const char* pName, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDevice* pDevice, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDevice* pDevice, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDevice* pDevice, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateEnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordEnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordEnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateEnumerateInstanceLayerProperties(uint32_t* pPropertyCount, VkLayerProperties* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordEnumerateInstanceLayerProperties(uint32_t* pPropertyCount, VkLayerProperties* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordEnumerateInstanceLayerProperties(uint32_t* pPropertyCount, VkLayerProperties* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkLayerProperties* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkLayerProperties* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkLayerProperties* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue, const RecordObject& record_obj) {} - virtual bool PreCallValidateQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence, const RecordObject& record_obj) {} - virtual void PostCallRecordQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence, const RecordObject& record_obj) {} - virtual bool PreCallValidateQueueWaitIdle(VkQueue queue, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordQueueWaitIdle(VkQueue queue, const RecordObject& record_obj) {} - virtual void PostCallRecordQueueWaitIdle(VkQueue queue, const RecordObject& record_obj) {} - virtual bool PreCallValidateDeviceWaitIdle(VkDevice device, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDeviceWaitIdle(VkDevice device, const RecordObject& record_obj) {} - virtual void PostCallRecordDeviceWaitIdle(VkDevice device, const RecordObject& record_obj) {} - virtual bool PreCallValidateAllocateMemory(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordAllocateMemory(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory, const RecordObject& record_obj) {} - virtual void PostCallRecordAllocateMemory(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory, const RecordObject& record_obj) {} - virtual bool PreCallValidateFreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordFreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordFreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData, const RecordObject& record_obj) {} - virtual void PostCallRecordMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData, const RecordObject& record_obj) {} - virtual bool PreCallValidateUnmapMemory(VkDevice device, VkDeviceMemory memory, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordUnmapMemory(VkDevice device, VkDeviceMemory memory, const RecordObject& record_obj) {} - virtual void PostCallRecordUnmapMemory(VkDevice device, VkDeviceMemory memory, const RecordObject& record_obj) {} - virtual bool PreCallValidateFlushMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordFlushMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges, const RecordObject& record_obj) {} - virtual void PostCallRecordFlushMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges, const RecordObject& record_obj) {} - virtual bool PreCallValidateInvalidateMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordInvalidateMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges, const RecordObject& record_obj) {} - virtual void PostCallRecordInvalidateMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes, const RecordObject& record_obj) {} - virtual bool PreCallValidateBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset, const RecordObject& record_obj) {} - virtual void PostCallRecordBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset, const RecordObject& record_obj) {} - virtual bool PreCallValidateBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset, const RecordObject& record_obj) {} - virtual void PostCallRecordBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements, const RecordObject& record_obj) {} - virtual void PostCallRecordGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements, const RecordObject& record_obj) {} - virtual void PostCallRecordGetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements, const RecordObject& record_obj) {} - virtual void PostCallRecordGetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateQueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordQueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence, const RecordObject& record_obj) {} - virtual void PostCallRecordQueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateFence(VkDevice device, const VkFenceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateFence(VkDevice device, const VkFenceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateFence(VkDevice device, const VkFenceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateResetFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordResetFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, const RecordObject& record_obj) {} - virtual void PostCallRecordResetFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetFenceStatus(VkDevice device, VkFence fence, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetFenceStatus(VkDevice device, VkFence fence, const RecordObject& record_obj) {} - virtual void PostCallRecordGetFenceStatus(VkDevice device, VkFence fence, const RecordObject& record_obj) {} - virtual bool PreCallValidateWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout, const RecordObject& record_obj) {} - virtual void PostCallRecordWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateEvent(VkDevice device, const VkEventCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkEvent* pEvent, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateEvent(VkDevice device, const VkEventCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkEvent* pEvent, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateEvent(VkDevice device, const VkEventCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkEvent* pEvent, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetEventStatus(VkDevice device, VkEvent event, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetEventStatus(VkDevice device, VkEvent event, const RecordObject& record_obj) {} - virtual void PostCallRecordGetEventStatus(VkDevice device, VkEvent event, const RecordObject& record_obj) {} - virtual bool PreCallValidateSetEvent(VkDevice device, VkEvent event, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordSetEvent(VkDevice device, VkEvent event, const RecordObject& record_obj) {} - virtual void PostCallRecordSetEvent(VkDevice device, VkEvent event, const RecordObject& record_obj) {} - virtual bool PreCallValidateResetEvent(VkDevice device, VkEvent event, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordResetEvent(VkDevice device, VkEvent event, const RecordObject& record_obj) {} - virtual void PostCallRecordResetEvent(VkDevice device, VkEvent event, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags, const RecordObject& record_obj) {} - virtual void PostCallRecordGetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateBufferView(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferView* pView, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateBufferView(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferView* pView, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateBufferView(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferView* pView, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout, const RecordObject& record_obj) {} - virtual void PostCallRecordGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImageView* pView, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImageView* pView, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImageView* pView, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache, const RecordObject& record_obj) {} - virtual void PostCallRecordCreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData, const RecordObject& record_obj) {} - virtual bool PreCallValidateMergePipelineCaches(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordMergePipelineCaches(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches, const RecordObject& record_obj) {} - virtual void PostCallRecordMergePipelineCaches(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout, const RecordObject& record_obj) {} - virtual void PostCallRecordCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateSampler(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSampler* pSampler, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateSampler(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSampler* pSampler, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateSampler(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSampler* pSampler, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags, const RecordObject& record_obj) {} - virtual void PostCallRecordResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags, const RecordObject& record_obj) {} - virtual bool PreCallValidateAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, VkDescriptorSet* pDescriptorSets, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, VkDescriptorSet* pDescriptorSets, const RecordObject& record_obj) {} - virtual void PostCallRecordAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, VkDescriptorSet* pDescriptorSets, const RecordObject& record_obj) {} - virtual bool PreCallValidateFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, const RecordObject& record_obj) {} - virtual void PostCallRecordFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, const RecordObject& record_obj) {} - virtual bool PreCallValidateUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies, const RecordObject& record_obj) {} - virtual void PostCallRecordUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity, const RecordObject& record_obj) {} - virtual void PostCallRecordGetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags, const RecordObject& record_obj) {} - virtual void PostCallRecordResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags, const RecordObject& record_obj) {} - virtual bool PreCallValidateAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers, const RecordObject& record_obj) {} - virtual void PostCallRecordAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers, const RecordObject& record_obj) {} - virtual bool PreCallValidateFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers, const RecordObject& record_obj) {} - virtual void PostCallRecordFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers, const RecordObject& record_obj) {} - virtual bool PreCallValidateBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateEndCommandBuffer(VkCommandBuffer commandBuffer, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordEndCommandBuffer(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} - virtual void PostCallRecordEndCommandBuffer(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} - virtual bool PreCallValidateResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags, const RecordObject& record_obj) {} - virtual void PostCallRecordResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4], const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4], const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4], const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdClearAttachments(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdClearAttachments(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdClearAttachments(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdWaitEvents(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, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdWaitEvents(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, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdWaitEvents(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, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdPipelineBarrier(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, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdPipelineBarrier(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, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdPipelineBarrier(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, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdEndRenderPass(VkCommandBuffer commandBuffer, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdEndRenderPass(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdEndRenderPass(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers, const RecordObject& record_obj) {} - virtual bool PreCallValidateBindBufferMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordBindBufferMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos, const RecordObject& record_obj) {} - virtual void PostCallRecordBindBufferMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos, const RecordObject& record_obj) {} - virtual bool PreCallValidateBindImageMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordBindImageMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos, const RecordObject& record_obj) {} - virtual void PostCallRecordBindImageMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeviceGroupPeerMemoryFeatures(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeviceGroupPeerMemoryFeatures(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeviceGroupPeerMemoryFeatures(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDeviceMask(VkCommandBuffer commandBuffer, uint32_t deviceMask, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDeviceMask(VkCommandBuffer commandBuffer, uint32_t deviceMask, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDeviceMask(VkCommandBuffer commandBuffer, uint32_t deviceMask, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDispatchBase(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDispatchBase(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDispatchBase(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, const RecordObject& record_obj) {} - virtual bool PreCallValidateEnumeratePhysicalDeviceGroups(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordEnumeratePhysicalDeviceGroups(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordEnumeratePhysicalDeviceGroups(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetImageMemoryRequirements2(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetImageMemoryRequirements2(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} - virtual void PostCallRecordGetImageMemoryRequirements2(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetBufferMemoryRequirements2(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetBufferMemoryRequirements2(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} - virtual void PostCallRecordGetBufferMemoryRequirements2(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetImageSparseMemoryRequirements2(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetImageSparseMemoryRequirements2(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, const RecordObject& record_obj) {} - virtual void PostCallRecordGetImageSparseMemoryRequirements2(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceFormatProperties2(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceFormatProperties2(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceFormatProperties2(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceQueueFamilyProperties2(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceQueueFamilyProperties2(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceQueueFamilyProperties2(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceMemoryProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceMemoryProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceMemoryProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceSparseImageFormatProperties2(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceSparseImageFormatProperties2(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceSparseImageFormatProperties2(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateTrimCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordTrimCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags, const RecordObject& record_obj) {} - virtual void PostCallRecordTrimCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeviceQueue2(VkDevice device, const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeviceQueue2(VkDevice device, const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeviceQueue2(VkDevice device, const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateSamplerYcbcrConversion(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateSamplerYcbcrConversion(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateSamplerYcbcrConversion(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroySamplerYcbcrConversion(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroySamplerYcbcrConversion(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroySamplerYcbcrConversion(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateDescriptorUpdateTemplate(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateDescriptorUpdateTemplate(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateDescriptorUpdateTemplate(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyDescriptorUpdateTemplate(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyDescriptorUpdateTemplate(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyDescriptorUpdateTemplate(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateUpdateDescriptorSetWithTemplate(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordUpdateDescriptorSetWithTemplate(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, const RecordObject& record_obj) {} - virtual void PostCallRecordUpdateDescriptorSetWithTemplate(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceExternalBufferProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceExternalBufferProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceExternalBufferProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceExternalFenceProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceExternalFenceProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceExternalFenceProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceExternalSemaphoreProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceExternalSemaphoreProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceExternalSemaphoreProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDescriptorSetLayoutSupport(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDescriptorSetLayoutSupport(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDescriptorSetLayoutSupport(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDrawIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDrawIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDrawIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateRenderPass2(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateRenderPass2(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateRenderPass2(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBeginRenderPass2(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBeginRenderPass2(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBeginRenderPass2(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdNextSubpass2(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdNextSubpass2(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdNextSubpass2(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdEndRenderPass2(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdEndRenderPass2(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdEndRenderPass2(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateResetQueryPool(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordResetQueryPool(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, const RecordObject& record_obj) {} - virtual void PostCallRecordResetQueryPool(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetSemaphoreCounterValue(VkDevice device, VkSemaphore semaphore, uint64_t* pValue, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetSemaphoreCounterValue(VkDevice device, VkSemaphore semaphore, uint64_t* pValue, const RecordObject& record_obj) {} - virtual void PostCallRecordGetSemaphoreCounterValue(VkDevice device, VkSemaphore semaphore, uint64_t* pValue, const RecordObject& record_obj) {} - virtual bool PreCallValidateWaitSemaphores(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordWaitSemaphores(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout, const RecordObject& record_obj) {} - virtual void PostCallRecordWaitSemaphores(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout, const RecordObject& record_obj) {} - virtual bool PreCallValidateSignalSemaphore(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordSignalSemaphore(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordSignalSemaphore(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetBufferDeviceAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetBufferDeviceAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordGetBufferDeviceAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetBufferOpaqueCaptureAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetBufferOpaqueCaptureAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordGetBufferOpaqueCaptureAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeviceMemoryOpaqueCaptureAddress(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeviceMemoryOpaqueCaptureAddress(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeviceMemoryOpaqueCaptureAddress(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceToolProperties(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, VkPhysicalDeviceToolProperties* pToolProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceToolProperties(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, VkPhysicalDeviceToolProperties* pToolProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceToolProperties(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, VkPhysicalDeviceToolProperties* pToolProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreatePrivateDataSlot(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreatePrivateDataSlot(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot, const RecordObject& record_obj) {} - virtual void PostCallRecordCreatePrivateDataSlot(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyPrivateDataSlot(VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyPrivateDataSlot(VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyPrivateDataSlot(VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateSetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t data, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordSetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t data, const RecordObject& record_obj) {} - virtual void PostCallRecordSetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t data, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t* pData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t* pData, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t* pData, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetEvent2(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetEvent2(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetEvent2(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdResetEvent2(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdResetEvent2(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdResetEvent2(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdWaitEvents2(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, const VkDependencyInfo* pDependencyInfos, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdWaitEvents2(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, const VkDependencyInfo* pDependencyInfos, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdWaitEvents2(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, const VkDependencyInfo* pDependencyInfos, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdPipelineBarrier2(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdPipelineBarrier2(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdPipelineBarrier2(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdWriteTimestamp2(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, uint32_t query, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdWriteTimestamp2(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, uint32_t query, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdWriteTimestamp2(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, uint32_t query, const RecordObject& record_obj) {} - virtual bool PreCallValidateQueueSubmit2(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordQueueSubmit2(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence, const RecordObject& record_obj) {} - virtual void PostCallRecordQueueSubmit2(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCopyBuffer2(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCopyBuffer2(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCopyBuffer2(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCopyImage2(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCopyImage2(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCopyImage2(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCopyBufferToImage2(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCopyBufferToImage2(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCopyBufferToImage2(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBlitImage2(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBlitImage2(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBlitImage2(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdResolveImage2(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdResolveImage2(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdResolveImage2(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdEndRendering(VkCommandBuffer commandBuffer, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdEndRendering(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdEndRendering(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetCullMode(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetCullMode(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetCullMode(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetFrontFace(VkCommandBuffer commandBuffer, VkFrontFace frontFace, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetFrontFace(VkCommandBuffer commandBuffer, VkFrontFace frontFace, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetFrontFace(VkCommandBuffer commandBuffer, VkFrontFace frontFace, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetPrimitiveTopology(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetPrimitiveTopology(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetPrimitiveTopology(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetViewportWithCount(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetViewportWithCount(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetViewportWithCount(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetScissorWithCount(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetScissorWithCount(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetScissorWithCount(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBindVertexBuffers2(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, const VkDeviceSize* pStrides, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBindVertexBuffers2(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, const VkDeviceSize* pStrides, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBindVertexBuffers2(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, const VkDeviceSize* pStrides, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDepthTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDepthTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDepthTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDepthWriteEnable(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDepthWriteEnable(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDepthWriteEnable(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDepthCompareOp(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDepthCompareOp(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDepthCompareOp(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDepthBoundsTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDepthBoundsTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDepthBoundsTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetStencilTestEnable(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetStencilTestEnable(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetStencilTestEnable(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetStencilOp(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetStencilOp(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetStencilOp(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetRasterizerDiscardEnable(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetRasterizerDiscardEnable(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetRasterizerDiscardEnable(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDepthBiasEnable(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDepthBiasEnable(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDepthBiasEnable(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetPrimitiveRestartEnable(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetPrimitiveRestartEnable(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetPrimitiveRestartEnable(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeviceBufferMemoryRequirements(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeviceBufferMemoryRequirements(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeviceBufferMemoryRequirements(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeviceImageMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeviceImageMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeviceImageMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeviceImageSparseMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeviceImageSparseMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeviceImageSparseMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32* pSupported, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32* pSupported, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32* pSupported, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, VkImage* pSwapchainImages, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, VkImage* pSwapchainImages, const RecordObject& record_obj) {} - virtual void PostCallRecordGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, VkImage* pSwapchainImages, const RecordObject& record_obj) {} - virtual bool PreCallValidateAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t* pImageIndex, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t* pImageIndex, const RecordObject& record_obj) {} - virtual void PostCallRecordAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t* pImageIndex, const RecordObject& record_obj) {} - virtual bool PreCallValidateQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR* pPresentInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR* pPresentInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR* pPresentInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeviceGroupPresentCapabilitiesKHR(VkDevice device, VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeviceGroupPresentCapabilitiesKHR(VkDevice device, VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeviceGroupPresentCapabilitiesKHR(VkDevice device, VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeviceGroupSurfacePresentModesKHR(VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR* pModes, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeviceGroupSurfacePresentModesKHR(VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR* pModes, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeviceGroupSurfacePresentModesKHR(VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR* pModes, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pRectCount, VkRect2D* pRects, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pRectCount, VkRect2D* pRects, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pRectCount, VkRect2D* pRects, const RecordObject& record_obj) {} - virtual bool PreCallValidateAcquireNextImage2KHR(VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordAcquireNextImage2KHR(VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex, const RecordObject& record_obj) {} - virtual void PostCallRecordAcquireNextImage2KHR(VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPropertiesKHR* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPropertiesKHR* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPropertiesKHR* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlanePropertiesKHR* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlanePropertiesKHR* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlanePropertiesKHR* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t* pDisplayCount, VkDisplayKHR* pDisplays, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t* pDisplayCount, VkDisplayKHR* pDisplays, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t* pDisplayCount, VkDisplayKHR* pDisplays, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateDisplayModeKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, const VkDisplayModeCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateDisplayModeKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, const VkDisplayModeCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateDisplayModeKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, const VkDisplayModeCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateDisplayPlaneSurfaceKHR(VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateDisplayPlaneSurfaceKHR(VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateDisplayPlaneSurfaceKHR(VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateSharedSwapchainsKHR(VkDevice device, uint32_t swapchainCount, const VkSwapchainCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateSharedSwapchainsKHR(VkDevice device, uint32_t swapchainCount, const VkSwapchainCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateSharedSwapchainsKHR(VkDevice device, uint32_t swapchainCount, const VkSwapchainCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains, const RecordObject& record_obj) {} -#ifdef VK_USE_PLATFORM_XLIB_KHR - virtual bool PreCallValidateCreateXlibSurfaceKHR(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateXlibSurfaceKHR(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateXlibSurfaceKHR(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_XLIB_KHR -#ifdef VK_USE_PLATFORM_XCB_KHR - virtual bool PreCallValidateCreateXcbSurfaceKHR(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateXcbSurfaceKHR(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateXcbSurfaceKHR(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceXcbPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceXcbPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceXcbPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_XCB_KHR -#ifdef VK_USE_PLATFORM_WAYLAND_KHR - virtual bool PreCallValidateCreateWaylandSurfaceKHR(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateWaylandSurfaceKHR(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateWaylandSurfaceKHR(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_WAYLAND_KHR -#ifdef VK_USE_PLATFORM_ANDROID_KHR - virtual bool PreCallValidateCreateAndroidSurfaceKHR(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateAndroidSurfaceKHR(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateAndroidSurfaceKHR(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_ANDROID_KHR -#ifdef VK_USE_PLATFORM_WIN32_KHR - virtual bool PreCallValidateCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_WIN32_KHR - virtual bool PreCallValidateGetPhysicalDeviceVideoCapabilitiesKHR(VkPhysicalDevice physicalDevice, const VkVideoProfileInfoKHR* pVideoProfile, VkVideoCapabilitiesKHR* pCapabilities, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceVideoCapabilitiesKHR(VkPhysicalDevice physicalDevice, const VkVideoProfileInfoKHR* pVideoProfile, VkVideoCapabilitiesKHR* pCapabilities, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceVideoCapabilitiesKHR(VkPhysicalDevice physicalDevice, const VkVideoProfileInfoKHR* pVideoProfile, VkVideoCapabilitiesKHR* pCapabilities, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceVideoFormatPropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoFormatInfoKHR* pVideoFormatInfo, uint32_t* pVideoFormatPropertyCount, VkVideoFormatPropertiesKHR* pVideoFormatProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceVideoFormatPropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoFormatInfoKHR* pVideoFormatInfo, uint32_t* pVideoFormatPropertyCount, VkVideoFormatPropertiesKHR* pVideoFormatProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceVideoFormatPropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoFormatInfoKHR* pVideoFormatInfo, uint32_t* pVideoFormatPropertyCount, VkVideoFormatPropertiesKHR* pVideoFormatProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateVideoSessionKHR(VkDevice device, const VkVideoSessionCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkVideoSessionKHR* pVideoSession, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateVideoSessionKHR(VkDevice device, const VkVideoSessionCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkVideoSessionKHR* pVideoSession, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateVideoSessionKHR(VkDevice device, const VkVideoSessionCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkVideoSessionKHR* pVideoSession, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyVideoSessionKHR(VkDevice device, VkVideoSessionKHR videoSession, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyVideoSessionKHR(VkDevice device, VkVideoSessionKHR videoSession, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyVideoSessionKHR(VkDevice device, VkVideoSessionKHR videoSession, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetVideoSessionMemoryRequirementsKHR(VkDevice device, VkVideoSessionKHR videoSession, uint32_t* pMemoryRequirementsCount, VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetVideoSessionMemoryRequirementsKHR(VkDevice device, VkVideoSessionKHR videoSession, uint32_t* pMemoryRequirementsCount, VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements, const RecordObject& record_obj) {} - virtual void PostCallRecordGetVideoSessionMemoryRequirementsKHR(VkDevice device, VkVideoSessionKHR videoSession, uint32_t* pMemoryRequirementsCount, VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements, const RecordObject& record_obj) {} - virtual bool PreCallValidateBindVideoSessionMemoryKHR(VkDevice device, VkVideoSessionKHR videoSession, uint32_t bindSessionMemoryInfoCount, const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordBindVideoSessionMemoryKHR(VkDevice device, VkVideoSessionKHR videoSession, uint32_t bindSessionMemoryInfoCount, const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos, const RecordObject& record_obj) {} - virtual void PostCallRecordBindVideoSessionMemoryKHR(VkDevice device, VkVideoSessionKHR videoSession, uint32_t bindSessionMemoryInfoCount, const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateVideoSessionParametersKHR(VkDevice device, const VkVideoSessionParametersCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkVideoSessionParametersKHR* pVideoSessionParameters, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateVideoSessionParametersKHR(VkDevice device, const VkVideoSessionParametersCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkVideoSessionParametersKHR* pVideoSessionParameters, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateVideoSessionParametersKHR(VkDevice device, const VkVideoSessionParametersCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkVideoSessionParametersKHR* pVideoSessionParameters, const RecordObject& record_obj) {} - virtual bool PreCallValidateUpdateVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordUpdateVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordUpdateVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBeginVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoBeginCodingInfoKHR* pBeginInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBeginVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoBeginCodingInfoKHR* pBeginInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBeginVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoBeginCodingInfoKHR* pBeginInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdEndVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoEndCodingInfoKHR* pEndCodingInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdEndVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoEndCodingInfoKHR* pEndCodingInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdEndVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoEndCodingInfoKHR* pEndCodingInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdControlVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoCodingControlInfoKHR* pCodingControlInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdControlVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoCodingControlInfoKHR* pCodingControlInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdControlVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoCodingControlInfoKHR* pCodingControlInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDecodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR* pDecodeInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDecodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR* pDecodeInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDecodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR* pDecodeInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBeginRenderingKHR(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBeginRenderingKHR(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBeginRenderingKHR(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdEndRenderingKHR(VkCommandBuffer commandBuffer, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdEndRenderingKHR(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdEndRenderingKHR(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceFormatProperties2KHR(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceFormatProperties2KHR(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceFormatProperties2KHR(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, VkImageFormatProperties2* pImageFormatProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceMemoryProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceMemoryProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceMemoryProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceSparseImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceSparseImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceSparseImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, uint32_t deviceMask, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, uint32_t deviceMask, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, uint32_t deviceMask, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, const RecordObject& record_obj) {} - virtual bool PreCallValidateTrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordTrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags, const RecordObject& record_obj) {} - virtual void PostCallRecordTrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags, const RecordObject& record_obj) {} - virtual bool PreCallValidateEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceExternalBufferPropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceExternalBufferPropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceExternalBufferPropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, VkExternalBufferProperties* pExternalBufferProperties, const RecordObject& record_obj) {} -#ifdef VK_USE_PLATFORM_WIN32_KHR - virtual bool PreCallValidateGetMemoryWin32HandleKHR(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetMemoryWin32HandleKHR(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, const RecordObject& record_obj) {} - virtual void PostCallRecordGetMemoryWin32HandleKHR(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetMemoryWin32HandlePropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetMemoryWin32HandlePropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetMemoryWin32HandlePropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_WIN32_KHR - virtual bool PreCallValidateGetMemoryFdKHR(VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetMemoryFdKHR(VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd, const RecordObject& record_obj) {} - virtual void PostCallRecordGetMemoryFdKHR(VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetMemoryFdPropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, VkMemoryFdPropertiesKHR* pMemoryFdProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetMemoryFdPropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, VkMemoryFdPropertiesKHR* pMemoryFdProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetMemoryFdPropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, VkMemoryFdPropertiesKHR* pMemoryFdProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceExternalSemaphorePropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceExternalSemaphorePropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceExternalSemaphorePropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, VkExternalSemaphoreProperties* pExternalSemaphoreProperties, const RecordObject& record_obj) {} -#ifdef VK_USE_PLATFORM_WIN32_KHR - virtual bool PreCallValidateImportSemaphoreWin32HandleKHR(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordImportSemaphoreWin32HandleKHR(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordImportSemaphoreWin32HandleKHR(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetSemaphoreWin32HandleKHR(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetSemaphoreWin32HandleKHR(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, const RecordObject& record_obj) {} - virtual void PostCallRecordGetSemaphoreWin32HandleKHR(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_WIN32_KHR - virtual bool PreCallValidateImportSemaphoreFdKHR(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordImportSemaphoreFdKHR(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordImportSemaphoreFdKHR(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetSemaphoreFdKHR(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetSemaphoreFdKHR(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd, const RecordObject& record_obj) {} - virtual void PostCallRecordGetSemaphoreFdKHR(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void* pData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void* pData, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void* pData, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateDescriptorUpdateTemplateKHR(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateDescriptorUpdateTemplateKHR(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateDescriptorUpdateTemplateKHR(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateUpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordUpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, const RecordObject& record_obj) {} - virtual void PostCallRecordUpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateRenderPass2KHR(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateRenderPass2KHR(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateRenderPass2KHR(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, const VkSubpassBeginInfo* pSubpassBeginInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdNextSubpass2KHR(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdNextSubpass2KHR(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdNextSubpass2KHR(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, const VkSubpassEndInfo* pSubpassEndInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetSwapchainStatusKHR(VkDevice device, VkSwapchainKHR swapchain, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetSwapchainStatusKHR(VkDevice device, VkSwapchainKHR swapchain, const RecordObject& record_obj) {} - virtual void PostCallRecordGetSwapchainStatusKHR(VkDevice device, VkSwapchainKHR swapchain, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceExternalFencePropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceExternalFencePropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceExternalFencePropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, VkExternalFenceProperties* pExternalFenceProperties, const RecordObject& record_obj) {} -#ifdef VK_USE_PLATFORM_WIN32_KHR - virtual bool PreCallValidateImportFenceWin32HandleKHR(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordImportFenceWin32HandleKHR(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordImportFenceWin32HandleKHR(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetFenceWin32HandleKHR(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetFenceWin32HandleKHR(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, const RecordObject& record_obj) {} - virtual void PostCallRecordGetFenceWin32HandleKHR(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_WIN32_KHR - virtual bool PreCallValidateImportFenceFdKHR(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordImportFenceFdKHR(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordImportFenceFdKHR(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetFenceFdKHR(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetFenceFdKHR(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd, const RecordObject& record_obj) {} - virtual void PostCallRecordGetFenceFdKHR(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd, const RecordObject& record_obj) {} - virtual bool PreCallValidateEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, uint32_t* pCounterCount, VkPerformanceCounterKHR* pCounters, VkPerformanceCounterDescriptionKHR* pCounterDescriptions, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, uint32_t* pCounterCount, VkPerformanceCounterKHR* pCounters, VkPerformanceCounterDescriptionKHR* pCounterDescriptions, const RecordObject& record_obj) {} - virtual void PostCallRecordEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, uint32_t* pCounterCount, VkPerformanceCounterKHR* pCounters, VkPerformanceCounterDescriptionKHR* pCounterDescriptions, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(VkPhysicalDevice physicalDevice, const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, uint32_t* pNumPasses, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(VkPhysicalDevice physicalDevice, const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, uint32_t* pNumPasses, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(VkPhysicalDevice physicalDevice, const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, uint32_t* pNumPasses, const RecordObject& record_obj) {} - virtual bool PreCallValidateAcquireProfilingLockKHR(VkDevice device, const VkAcquireProfilingLockInfoKHR* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordAcquireProfilingLockKHR(VkDevice device, const VkAcquireProfilingLockInfoKHR* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordAcquireProfilingLockKHR(VkDevice device, const VkAcquireProfilingLockInfoKHR* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateReleaseProfilingLockKHR(VkDevice device, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordReleaseProfilingLockKHR(VkDevice device, const RecordObject& record_obj) {} - virtual void PostCallRecordReleaseProfilingLockKHR(VkDevice device, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkSurfaceCapabilities2KHR* pSurfaceCapabilities, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkSurfaceCapabilities2KHR* pSurfaceCapabilities, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkSurfaceCapabilities2KHR* pSurfaceCapabilities, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceDisplayProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayProperties2KHR* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceDisplayProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayProperties2KHR* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceDisplayProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayProperties2KHR* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceDisplayPlaneProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlaneProperties2KHR* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceDisplayPlaneProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlaneProperties2KHR* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceDisplayPlaneProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlaneProperties2KHR* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDisplayModeProperties2KHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModeProperties2KHR* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDisplayModeProperties2KHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModeProperties2KHR* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDisplayModeProperties2KHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModeProperties2KHR* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDisplayPlaneCapabilities2KHR(VkPhysicalDevice physicalDevice, const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, VkDisplayPlaneCapabilities2KHR* pCapabilities, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDisplayPlaneCapabilities2KHR(VkPhysicalDevice physicalDevice, const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, VkDisplayPlaneCapabilities2KHR* pCapabilities, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDisplayPlaneCapabilities2KHR(VkPhysicalDevice physicalDevice, const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, VkDisplayPlaneCapabilities2KHR* pCapabilities, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} - virtual void PostCallRecordGetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} - virtual void PostCallRecordGetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetImageSparseMemoryRequirements2KHR(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetImageSparseMemoryRequirements2KHR(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, const RecordObject& record_obj) {} - virtual void PostCallRecordGetImageSparseMemoryRequirements2KHR(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateSamplerYcbcrConversionKHR(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateSamplerYcbcrConversionKHR(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateSamplerYcbcrConversionKHR(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroySamplerYcbcrConversionKHR(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroySamplerYcbcrConversionKHR(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroySamplerYcbcrConversionKHR(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateBindBufferMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordBindBufferMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos, const RecordObject& record_obj) {} - virtual void PostCallRecordBindBufferMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos, const RecordObject& record_obj) {} - virtual bool PreCallValidateBindImageMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordBindImageMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos, const RecordObject& record_obj) {} - virtual void PostCallRecordBindImageMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDescriptorSetLayoutSupportKHR(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDescriptorSetLayoutSupportKHR(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDescriptorSetLayoutSupportKHR(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayoutSupport* pSupport, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetSemaphoreCounterValueKHR(VkDevice device, VkSemaphore semaphore, uint64_t* pValue, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetSemaphoreCounterValueKHR(VkDevice device, VkSemaphore semaphore, uint64_t* pValue, const RecordObject& record_obj) {} - virtual void PostCallRecordGetSemaphoreCounterValueKHR(VkDevice device, VkSemaphore semaphore, uint64_t* pValue, const RecordObject& record_obj) {} - virtual bool PreCallValidateWaitSemaphoresKHR(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordWaitSemaphoresKHR(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout, const RecordObject& record_obj) {} - virtual void PostCallRecordWaitSemaphoresKHR(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout, const RecordObject& record_obj) {} - virtual bool PreCallValidateSignalSemaphoreKHR(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordSignalSemaphoreKHR(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordSignalSemaphoreKHR(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceFragmentShadingRatesKHR(VkPhysicalDevice physicalDevice, uint32_t* pFragmentShadingRateCount, VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceFragmentShadingRatesKHR(VkPhysicalDevice physicalDevice, uint32_t* pFragmentShadingRateCount, VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceFragmentShadingRatesKHR(VkPhysicalDevice physicalDevice, uint32_t* pFragmentShadingRateCount, VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetFragmentShadingRateKHR(VkCommandBuffer commandBuffer, const VkExtent2D* pFragmentSize, const VkFragmentShadingRateCombinerOpKHR combinerOps[2], const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetFragmentShadingRateKHR(VkCommandBuffer commandBuffer, const VkExtent2D* pFragmentSize, const VkFragmentShadingRateCombinerOpKHR combinerOps[2], const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetFragmentShadingRateKHR(VkCommandBuffer commandBuffer, const VkExtent2D* pFragmentSize, const VkFragmentShadingRateCombinerOpKHR combinerOps[2], const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetRenderingAttachmentLocationsKHR(VkCommandBuffer commandBuffer, const VkRenderingAttachmentLocationInfoKHR* pLocationInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetRenderingAttachmentLocationsKHR(VkCommandBuffer commandBuffer, const VkRenderingAttachmentLocationInfoKHR* pLocationInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetRenderingAttachmentLocationsKHR(VkCommandBuffer commandBuffer, const VkRenderingAttachmentLocationInfoKHR* pLocationInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetRenderingInputAttachmentIndicesKHR(VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfoKHR* pInputAttachmentIndexInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetRenderingInputAttachmentIndicesKHR(VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfoKHR* pInputAttachmentIndexInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetRenderingInputAttachmentIndicesKHR(VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfoKHR* pInputAttachmentIndexInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateWaitForPresentKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t presentId, uint64_t timeout, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordWaitForPresentKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t presentId, uint64_t timeout, const RecordObject& record_obj) {} - virtual void PostCallRecordWaitForPresentKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t presentId, uint64_t timeout, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetBufferDeviceAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetBufferDeviceAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordGetBufferDeviceAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetBufferOpaqueCaptureAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetBufferOpaqueCaptureAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordGetBufferOpaqueCaptureAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeviceMemoryOpaqueCaptureAddressKHR(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeviceMemoryOpaqueCaptureAddressKHR(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeviceMemoryOpaqueCaptureAddressKHR(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateDeferredOperationKHR(VkDevice device, const VkAllocationCallbacks* pAllocator, VkDeferredOperationKHR* pDeferredOperation, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateDeferredOperationKHR(VkDevice device, const VkAllocationCallbacks* pAllocator, VkDeferredOperationKHR* pDeferredOperation, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateDeferredOperationKHR(VkDevice device, const VkAllocationCallbacks* pAllocator, VkDeferredOperationKHR* pDeferredOperation, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyDeferredOperationKHR(VkDevice device, VkDeferredOperationKHR operation, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyDeferredOperationKHR(VkDevice device, VkDeferredOperationKHR operation, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyDeferredOperationKHR(VkDevice device, VkDeferredOperationKHR operation, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeferredOperationMaxConcurrencyKHR(VkDevice device, VkDeferredOperationKHR operation, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeferredOperationMaxConcurrencyKHR(VkDevice device, VkDeferredOperationKHR operation, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeferredOperationMaxConcurrencyKHR(VkDevice device, VkDeferredOperationKHR operation, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeferredOperationResultKHR(VkDevice device, VkDeferredOperationKHR operation, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeferredOperationResultKHR(VkDevice device, VkDeferredOperationKHR operation, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeferredOperationResultKHR(VkDevice device, VkDeferredOperationKHR operation, const RecordObject& record_obj) {} - virtual bool PreCallValidateDeferredOperationJoinKHR(VkDevice device, VkDeferredOperationKHR operation, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDeferredOperationJoinKHR(VkDevice device, VkDeferredOperationKHR operation, const RecordObject& record_obj) {} - virtual void PostCallRecordDeferredOperationJoinKHR(VkDevice device, VkDeferredOperationKHR operation, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPipelineExecutablePropertiesKHR(VkDevice device, const VkPipelineInfoKHR* pPipelineInfo, uint32_t* pExecutableCount, VkPipelineExecutablePropertiesKHR* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPipelineExecutablePropertiesKHR(VkDevice device, const VkPipelineInfoKHR* pPipelineInfo, uint32_t* pExecutableCount, VkPipelineExecutablePropertiesKHR* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPipelineExecutablePropertiesKHR(VkDevice device, const VkPipelineInfoKHR* pPipelineInfo, uint32_t* pExecutableCount, VkPipelineExecutablePropertiesKHR* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPipelineExecutableStatisticsKHR(VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pStatisticCount, VkPipelineExecutableStatisticKHR* pStatistics, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPipelineExecutableStatisticsKHR(VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pStatisticCount, VkPipelineExecutableStatisticKHR* pStatistics, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPipelineExecutableStatisticsKHR(VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pStatisticCount, VkPipelineExecutableStatisticKHR* pStatistics, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPipelineExecutableInternalRepresentationsKHR(VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pInternalRepresentationCount, VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPipelineExecutableInternalRepresentationsKHR(VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pInternalRepresentationCount, VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPipelineExecutableInternalRepresentationsKHR(VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pInternalRepresentationCount, VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations, const RecordObject& record_obj) {} - virtual bool PreCallValidateMapMemory2KHR(VkDevice device, const VkMemoryMapInfoKHR* pMemoryMapInfo, void** ppData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordMapMemory2KHR(VkDevice device, const VkMemoryMapInfoKHR* pMemoryMapInfo, void** ppData, const RecordObject& record_obj) {} - virtual void PostCallRecordMapMemory2KHR(VkDevice device, const VkMemoryMapInfoKHR* pMemoryMapInfo, void** ppData, const RecordObject& record_obj) {} - virtual bool PreCallValidateUnmapMemory2KHR(VkDevice device, const VkMemoryUnmapInfoKHR* pMemoryUnmapInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordUnmapMemory2KHR(VkDevice device, const VkMemoryUnmapInfoKHR* pMemoryUnmapInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordUnmapMemory2KHR(VkDevice device, const VkMemoryUnmapInfoKHR* pMemoryUnmapInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetEncodedVideoSessionParametersKHR(VkDevice device, const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo, VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, size_t* pDataSize, void* pData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetEncodedVideoSessionParametersKHR(VkDevice device, const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo, VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, size_t* pDataSize, void* pData, const RecordObject& record_obj) {} - virtual void PostCallRecordGetEncodedVideoSessionParametersKHR(VkDevice device, const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo, VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, size_t* pDataSize, void* pData, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdEncodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdEncodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdEncodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdResetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdResetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdResetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdWaitEvents2KHR(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, const VkDependencyInfo* pDependencyInfos, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdWaitEvents2KHR(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, const VkDependencyInfo* pDependencyInfos, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdWaitEvents2KHR(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, const VkDependencyInfo* pDependencyInfos, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdPipelineBarrier2KHR(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdPipelineBarrier2KHR(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdPipelineBarrier2KHR(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdWriteTimestamp2KHR(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, uint32_t query, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdWriteTimestamp2KHR(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, uint32_t query, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdWriteTimestamp2KHR(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, uint32_t query, const RecordObject& record_obj) {} - virtual bool PreCallValidateQueueSubmit2KHR(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordQueueSubmit2KHR(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence, const RecordObject& record_obj) {} - virtual void PostCallRecordQueueSubmit2KHR(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBlitImage2KHR(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBlitImage2KHR(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBlitImage2KHR(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdResolveImage2KHR(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdResolveImage2KHR(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdResolveImage2KHR(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeviceBufferMemoryRequirementsKHR(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeviceBufferMemoryRequirementsKHR(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeviceBufferMemoryRequirementsKHR(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeviceImageMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeviceImageMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeviceImageMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeviceImageSparseMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeviceImageSparseMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeviceImageSparseMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBindIndexBuffer2KHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkDeviceSize size, VkIndexType indexType, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBindIndexBuffer2KHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkDeviceSize size, VkIndexType indexType, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBindIndexBuffer2KHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkDeviceSize size, VkIndexType indexType, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetRenderingAreaGranularityKHR(VkDevice device, const VkRenderingAreaInfoKHR* pRenderingAreaInfo, VkExtent2D* pGranularity, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetRenderingAreaGranularityKHR(VkDevice device, const VkRenderingAreaInfoKHR* pRenderingAreaInfo, VkExtent2D* pGranularity, const RecordObject& record_obj) {} - virtual void PostCallRecordGetRenderingAreaGranularityKHR(VkDevice device, const VkRenderingAreaInfoKHR* pRenderingAreaInfo, VkExtent2D* pGranularity, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeviceImageSubresourceLayoutKHR(VkDevice device, const VkDeviceImageSubresourceInfoKHR* pInfo, VkSubresourceLayout2KHR* pLayout, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeviceImageSubresourceLayoutKHR(VkDevice device, const VkDeviceImageSubresourceInfoKHR* pInfo, VkSubresourceLayout2KHR* pLayout, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeviceImageSubresourceLayoutKHR(VkDevice device, const VkDeviceImageSubresourceInfoKHR* pInfo, VkSubresourceLayout2KHR* pLayout, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetImageSubresourceLayout2KHR(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, VkSubresourceLayout2KHR* pLayout, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetImageSubresourceLayout2KHR(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, VkSubresourceLayout2KHR* pLayout, const RecordObject& record_obj) {} - virtual void PostCallRecordGetImageSubresourceLayout2KHR(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, VkSubresourceLayout2KHR* pLayout, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreatePipelineBinariesKHR(VkDevice device, const VkPipelineBinaryCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineBinaryHandlesInfoKHR* pBinaries, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreatePipelineBinariesKHR(VkDevice device, const VkPipelineBinaryCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineBinaryHandlesInfoKHR* pBinaries, const RecordObject& record_obj) {} - virtual void PostCallRecordCreatePipelineBinariesKHR(VkDevice device, const VkPipelineBinaryCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineBinaryHandlesInfoKHR* pBinaries, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyPipelineBinaryKHR(VkDevice device, VkPipelineBinaryKHR pipelineBinary, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyPipelineBinaryKHR(VkDevice device, VkPipelineBinaryKHR pipelineBinary, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyPipelineBinaryKHR(VkDevice device, VkPipelineBinaryKHR pipelineBinary, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPipelineKeyKHR(VkDevice device, const VkPipelineCreateInfoKHR* pPipelineCreateInfo, VkPipelineBinaryKeyKHR* pPipelineKey, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPipelineKeyKHR(VkDevice device, const VkPipelineCreateInfoKHR* pPipelineCreateInfo, VkPipelineBinaryKeyKHR* pPipelineKey, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPipelineKeyKHR(VkDevice device, const VkPipelineCreateInfoKHR* pPipelineCreateInfo, VkPipelineBinaryKeyKHR* pPipelineKey, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPipelineBinaryDataKHR(VkDevice device, const VkPipelineBinaryDataInfoKHR* pInfo, VkPipelineBinaryKeyKHR* pPipelineBinaryKey, size_t* pPipelineBinaryDataSize, void* pPipelineBinaryData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPipelineBinaryDataKHR(VkDevice device, const VkPipelineBinaryDataInfoKHR* pInfo, VkPipelineBinaryKeyKHR* pPipelineBinaryKey, size_t* pPipelineBinaryDataSize, void* pPipelineBinaryData, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPipelineBinaryDataKHR(VkDevice device, const VkPipelineBinaryDataInfoKHR* pInfo, VkPipelineBinaryKeyKHR* pPipelineBinaryKey, size_t* pPipelineBinaryDataSize, void* pPipelineBinaryData, const RecordObject& record_obj) {} - virtual bool PreCallValidateReleaseCapturedPipelineDataKHR(VkDevice device, const VkReleaseCapturedPipelineDataInfoKHR* pInfo, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordReleaseCapturedPipelineDataKHR(VkDevice device, const VkReleaseCapturedPipelineDataInfoKHR* pInfo, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordReleaseCapturedPipelineDataKHR(VkDevice device, const VkReleaseCapturedPipelineDataInfoKHR* pInfo, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceCooperativeMatrixPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixPropertiesKHR* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceCooperativeMatrixPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixPropertiesKHR* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceCooperativeMatrixPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixPropertiesKHR* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetLineStippleKHR(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetLineStippleKHR(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetLineStippleKHR(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceCalibrateableTimeDomainsKHR(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, VkTimeDomainKHR* pTimeDomains, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceCalibrateableTimeDomainsKHR(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, VkTimeDomainKHR* pTimeDomains, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceCalibrateableTimeDomainsKHR(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, VkTimeDomainKHR* pTimeDomains, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetCalibratedTimestampsKHR(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetCalibratedTimestampsKHR(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation, const RecordObject& record_obj) {} - virtual void PostCallRecordGetCalibratedTimestampsKHR(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBindDescriptorSets2KHR(VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBindDescriptorSets2KHR(VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBindDescriptorSets2KHR(VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdPushConstants2KHR(VkCommandBuffer commandBuffer, const VkPushConstantsInfoKHR* pPushConstantsInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdPushConstants2KHR(VkCommandBuffer commandBuffer, const VkPushConstantsInfoKHR* pPushConstantsInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdPushConstants2KHR(VkCommandBuffer commandBuffer, const VkPushConstantsInfoKHR* pPushConstantsInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdPushDescriptorSet2KHR(VkCommandBuffer commandBuffer, const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdPushDescriptorSet2KHR(VkCommandBuffer commandBuffer, const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdPushDescriptorSet2KHR(VkCommandBuffer commandBuffer, const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdPushDescriptorSetWithTemplate2KHR(VkCommandBuffer commandBuffer, const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdPushDescriptorSetWithTemplate2KHR(VkCommandBuffer commandBuffer, const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdPushDescriptorSetWithTemplate2KHR(VkCommandBuffer commandBuffer, const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDescriptorBufferOffsets2EXT(VkCommandBuffer commandBuffer, const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDescriptorBufferOffsets2EXT(VkCommandBuffer commandBuffer, const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDescriptorBufferOffsets2EXT(VkCommandBuffer commandBuffer, const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBindDescriptorBufferEmbeddedSamplers2EXT(VkCommandBuffer commandBuffer, const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBindDescriptorBufferEmbeddedSamplers2EXT(VkCommandBuffer commandBuffer, const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBindDescriptorBufferEmbeddedSamplers2EXT(VkCommandBuffer commandBuffer, const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateDebugReportMessageEXT(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDebugReportMessageEXT(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, const RecordObject& record_obj) {} - virtual void PostCallRecordDebugReportMessageEXT(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, const RecordObject& record_obj) {} - virtual bool PreCallValidateDebugMarkerSetObjectTagEXT(VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDebugMarkerSetObjectTagEXT(VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordDebugMarkerSetObjectTagEXT(VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateDebugMarkerSetObjectNameEXT(VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDebugMarkerSetObjectNameEXT(VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordDebugMarkerSetObjectNameEXT(VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDebugMarkerEndEXT(VkCommandBuffer commandBuffer, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDebugMarkerEndEXT(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDebugMarkerEndEXT(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBindTransformFeedbackBuffersEXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBindTransformFeedbackBuffersEXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBindTransformFeedbackBuffersEXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBeginTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBeginTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBeginTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdEndTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdEndTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdEndTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBeginQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, uint32_t index, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBeginQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, uint32_t index, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBeginQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, uint32_t index, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdEndQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdEndQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdEndQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDrawIndirectByteCountEXT(VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDrawIndirectByteCountEXT(VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDrawIndirectByteCountEXT(VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateCuModuleNVX(VkDevice device, const VkCuModuleCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCuModuleNVX* pModule, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateCuModuleNVX(VkDevice device, const VkCuModuleCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCuModuleNVX* pModule, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateCuModuleNVX(VkDevice device, const VkCuModuleCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCuModuleNVX* pModule, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateCuFunctionNVX(VkDevice device, const VkCuFunctionCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCuFunctionNVX* pFunction, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateCuFunctionNVX(VkDevice device, const VkCuFunctionCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCuFunctionNVX* pFunction, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateCuFunctionNVX(VkDevice device, const VkCuFunctionCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCuFunctionNVX* pFunction, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyCuModuleNVX(VkDevice device, VkCuModuleNVX module, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyCuModuleNVX(VkDevice device, VkCuModuleNVX module, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyCuModuleNVX(VkDevice device, VkCuModuleNVX module, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyCuFunctionNVX(VkDevice device, VkCuFunctionNVX function, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyCuFunctionNVX(VkDevice device, VkCuFunctionNVX function, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyCuFunctionNVX(VkDevice device, VkCuFunctionNVX function, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCuLaunchKernelNVX(VkCommandBuffer commandBuffer, const VkCuLaunchInfoNVX* pLaunchInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCuLaunchKernelNVX(VkCommandBuffer commandBuffer, const VkCuLaunchInfoNVX* pLaunchInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCuLaunchKernelNVX(VkCommandBuffer commandBuffer, const VkCuLaunchInfoNVX* pLaunchInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetImageViewHandleNVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetImageViewHandleNVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordGetImageViewHandleNVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetImageViewHandle64NVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetImageViewHandle64NVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordGetImageViewHandle64NVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetImageViewAddressNVX(VkDevice device, VkImageView imageView, VkImageViewAddressPropertiesNVX* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetImageViewAddressNVX(VkDevice device, VkImageView imageView, VkImageViewAddressPropertiesNVX* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetImageViewAddressNVX(VkDevice device, VkImageView imageView, VkImageViewAddressPropertiesNVX* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDrawIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDrawIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDrawIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDrawIndexedIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDrawIndexedIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDrawIndexedIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetShaderInfoAMD(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetShaderInfoAMD(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordGetShaderInfoAMD(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo, const RecordObject& record_obj) {} -#ifdef VK_USE_PLATFORM_GGP - virtual bool PreCallValidateCreateStreamDescriptorSurfaceGGP(VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateStreamDescriptorSurfaceGGP(VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateStreamDescriptorSurfaceGGP(VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_GGP - virtual bool PreCallValidateGetPhysicalDeviceExternalImageFormatPropertiesNV(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceExternalImageFormatPropertiesNV(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceExternalImageFormatPropertiesNV(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties, const RecordObject& record_obj) {} -#ifdef VK_USE_PLATFORM_WIN32_KHR - virtual bool PreCallValidateGetMemoryWin32HandleNV(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetMemoryWin32HandleNV(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle, const RecordObject& record_obj) {} - virtual void PostCallRecordGetMemoryWin32HandleNV(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_WIN32_KHR -#ifdef VK_USE_PLATFORM_VI_NN - virtual bool PreCallValidateCreateViSurfaceNN(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateViSurfaceNN(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateViSurfaceNN(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_VI_NN - virtual bool PreCallValidateCmdBeginConditionalRenderingEXT(VkCommandBuffer commandBuffer, const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBeginConditionalRenderingEXT(VkCommandBuffer commandBuffer, const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBeginConditionalRenderingEXT(VkCommandBuffer commandBuffer, const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdEndConditionalRenderingEXT(VkCommandBuffer commandBuffer, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdEndConditionalRenderingEXT(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdEndConditionalRenderingEXT(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetViewportWScalingNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportWScalingNV* pViewportWScalings, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetViewportWScalingNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportWScalingNV* pViewportWScalings, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetViewportWScalingNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportWScalingNV* pViewportWScalings, const RecordObject& record_obj) {} - virtual bool PreCallValidateReleaseDisplayEXT(VkPhysicalDevice physicalDevice, VkDisplayKHR display, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordReleaseDisplayEXT(VkPhysicalDevice physicalDevice, VkDisplayKHR display, const RecordObject& record_obj) {} - virtual void PostCallRecordReleaseDisplayEXT(VkPhysicalDevice physicalDevice, VkDisplayKHR display, const RecordObject& record_obj) {} -#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - virtual bool PreCallValidateAcquireXlibDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordAcquireXlibDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display, const RecordObject& record_obj) {} - virtual void PostCallRecordAcquireXlibDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetRandROutputDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetRandROutputDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay, const RecordObject& record_obj) {} - virtual void PostCallRecordGetRandROutputDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT - virtual bool PreCallValidateGetPhysicalDeviceSurfaceCapabilities2EXT(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilities2EXT* pSurfaceCapabilities, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceSurfaceCapabilities2EXT(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilities2EXT* pSurfaceCapabilities, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceSurfaceCapabilities2EXT(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilities2EXT* pSurfaceCapabilities, const RecordObject& record_obj) {} - virtual bool PreCallValidateDisplayPowerControlEXT(VkDevice device, VkDisplayKHR display, const VkDisplayPowerInfoEXT* pDisplayPowerInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDisplayPowerControlEXT(VkDevice device, VkDisplayKHR display, const VkDisplayPowerInfoEXT* pDisplayPowerInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordDisplayPowerControlEXT(VkDevice device, VkDisplayKHR display, const VkDisplayPowerInfoEXT* pDisplayPowerInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateRegisterDeviceEventEXT(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordRegisterDeviceEventEXT(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence, const RecordObject& record_obj) {} - virtual void PostCallRecordRegisterDeviceEventEXT(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence, const RecordObject& record_obj) {} - virtual bool PreCallValidateRegisterDisplayEventEXT(VkDevice device, VkDisplayKHR display, const VkDisplayEventInfoEXT* pDisplayEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordRegisterDisplayEventEXT(VkDevice device, VkDisplayKHR display, const VkDisplayEventInfoEXT* pDisplayEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence, const RecordObject& record_obj) {} - virtual void PostCallRecordRegisterDisplayEventEXT(VkDevice device, VkDisplayKHR display, const VkDisplayEventInfoEXT* pDisplayEventInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetSwapchainCounterEXT(VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetSwapchainCounterEXT(VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue, const RecordObject& record_obj) {} - virtual void PostCallRecordGetSwapchainCounterEXT(VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetRefreshCycleDurationGOOGLE(VkDevice device, VkSwapchainKHR swapchain, VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetRefreshCycleDurationGOOGLE(VkDevice device, VkSwapchainKHR swapchain, VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetRefreshCycleDurationGOOGLE(VkDevice device, VkSwapchainKHR swapchain, VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPastPresentationTimingGOOGLE(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pPresentationTimingCount, VkPastPresentationTimingGOOGLE* pPresentationTimings, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPastPresentationTimingGOOGLE(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pPresentationTimingCount, VkPastPresentationTimingGOOGLE* pPresentationTimings, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPastPresentationTimingGOOGLE(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pPresentationTimingCount, VkPastPresentationTimingGOOGLE* pPresentationTimings, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDiscardRectangleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 discardRectangleEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDiscardRectangleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 discardRectangleEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDiscardRectangleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 discardRectangleEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDiscardRectangleModeEXT(VkCommandBuffer commandBuffer, VkDiscardRectangleModeEXT discardRectangleMode, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDiscardRectangleModeEXT(VkCommandBuffer commandBuffer, VkDiscardRectangleModeEXT discardRectangleMode, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDiscardRectangleModeEXT(VkCommandBuffer commandBuffer, VkDiscardRectangleModeEXT discardRectangleMode, const RecordObject& record_obj) {} - virtual bool PreCallValidateSetHdrMetadataEXT(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, const VkHdrMetadataEXT* pMetadata, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordSetHdrMetadataEXT(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, const VkHdrMetadataEXT* pMetadata, const RecordObject& record_obj) {} - virtual void PostCallRecordSetHdrMetadataEXT(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, const VkHdrMetadataEXT* pMetadata, const RecordObject& record_obj) {} -#ifdef VK_USE_PLATFORM_IOS_MVK - virtual bool PreCallValidateCreateIOSSurfaceMVK(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateIOSSurfaceMVK(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateIOSSurfaceMVK(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_IOS_MVK -#ifdef VK_USE_PLATFORM_MACOS_MVK - virtual bool PreCallValidateCreateMacOSSurfaceMVK(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateMacOSSurfaceMVK(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateMacOSSurfaceMVK(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_MACOS_MVK - virtual bool PreCallValidateSetDebugUtilsObjectNameEXT(VkDevice device, const VkDebugUtilsObjectNameInfoEXT* pNameInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordSetDebugUtilsObjectNameEXT(VkDevice device, const VkDebugUtilsObjectNameInfoEXT* pNameInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordSetDebugUtilsObjectNameEXT(VkDevice device, const VkDebugUtilsObjectNameInfoEXT* pNameInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateSetDebugUtilsObjectTagEXT(VkDevice device, const VkDebugUtilsObjectTagInfoEXT* pTagInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordSetDebugUtilsObjectTagEXT(VkDevice device, const VkDebugUtilsObjectTagInfoEXT* pTagInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordSetDebugUtilsObjectTagEXT(VkDevice device, const VkDebugUtilsObjectTagInfoEXT* pTagInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateQueueBeginDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordQueueBeginDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordQueueBeginDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateQueueEndDebugUtilsLabelEXT(VkQueue queue, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordQueueEndDebugUtilsLabelEXT(VkQueue queue, const RecordObject& record_obj) {} - virtual void PostCallRecordQueueEndDebugUtilsLabelEXT(VkQueue queue, const RecordObject& record_obj) {} - virtual bool PreCallValidateQueueInsertDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordQueueInsertDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordQueueInsertDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateDebugUtilsMessengerEXT(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugUtilsMessengerEXT* pMessenger, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateDebugUtilsMessengerEXT(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugUtilsMessengerEXT* pMessenger, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateDebugUtilsMessengerEXT(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugUtilsMessengerEXT* pMessenger, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT messenger, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT messenger, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT messenger, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateSubmitDebugUtilsMessageEXT(VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageTypes, const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordSubmitDebugUtilsMessageEXT(VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageTypes, const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData, const RecordObject& record_obj) {} - virtual void PostCallRecordSubmitDebugUtilsMessageEXT(VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, VkDebugUtilsMessageTypeFlagsEXT messageTypes, const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData, const RecordObject& record_obj) {} -#ifdef VK_USE_PLATFORM_ANDROID_KHR - virtual bool PreCallValidateGetAndroidHardwareBufferPropertiesANDROID(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetAndroidHardwareBufferPropertiesANDROID(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetAndroidHardwareBufferPropertiesANDROID(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetMemoryAndroidHardwareBufferANDROID(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetMemoryAndroidHardwareBufferANDROID(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer, const RecordObject& record_obj) {} - virtual void PostCallRecordGetMemoryAndroidHardwareBufferANDROID(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_ANDROID_KHR -#ifdef VK_ENABLE_BETA_EXTENSIONS - virtual bool PreCallValidateCreateExecutionGraphPipelinesAMDX(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateExecutionGraphPipelinesAMDX(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateExecutionGraphPipelinesAMDX(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetExecutionGraphPipelineScratchSizeAMDX(VkDevice device, VkPipeline executionGraph, VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetExecutionGraphPipelineScratchSizeAMDX(VkDevice device, VkPipeline executionGraph, VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordGetExecutionGraphPipelineScratchSizeAMDX(VkDevice device, VkPipeline executionGraph, VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetExecutionGraphPipelineNodeIndexAMDX(VkDevice device, VkPipeline executionGraph, const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo, uint32_t* pNodeIndex, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetExecutionGraphPipelineNodeIndexAMDX(VkDevice device, VkPipeline executionGraph, const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo, uint32_t* pNodeIndex, const RecordObject& record_obj) {} - virtual void PostCallRecordGetExecutionGraphPipelineNodeIndexAMDX(VkDevice device, VkPipeline executionGraph, const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo, uint32_t* pNodeIndex, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdInitializeGraphScratchMemoryAMDX(VkCommandBuffer commandBuffer, VkPipeline executionGraph, VkDeviceAddress scratch, VkDeviceSize scratchSize, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdInitializeGraphScratchMemoryAMDX(VkCommandBuffer commandBuffer, VkPipeline executionGraph, VkDeviceAddress scratch, VkDeviceSize scratchSize, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdInitializeGraphScratchMemoryAMDX(VkCommandBuffer commandBuffer, VkPipeline executionGraph, VkDeviceAddress scratch, VkDeviceSize scratchSize, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDispatchGraphAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX* pCountInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDispatchGraphAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX* pCountInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDispatchGraphAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX* pCountInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDispatchGraphIndirectAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX* pCountInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDispatchGraphIndirectAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX* pCountInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDispatchGraphIndirectAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX* pCountInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDispatchGraphIndirectCountAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, VkDeviceAddress countInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDispatchGraphIndirectCountAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, VkDeviceAddress countInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDispatchGraphIndirectCountAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, VkDeviceAddress countInfo, const RecordObject& record_obj) {} -#endif // VK_ENABLE_BETA_EXTENSIONS - virtual bool PreCallValidateCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, VkMultisamplePropertiesEXT* pMultisampleProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, VkMultisamplePropertiesEXT* pMultisampleProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, VkMultisamplePropertiesEXT* pMultisampleProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetImageDrmFormatModifierPropertiesEXT(VkDevice device, VkImage image, VkImageDrmFormatModifierPropertiesEXT* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetImageDrmFormatModifierPropertiesEXT(VkDevice device, VkImage image, VkImageDrmFormatModifierPropertiesEXT* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetImageDrmFormatModifierPropertiesEXT(VkDevice device, VkImage image, VkImageDrmFormatModifierPropertiesEXT* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBindShadingRateImageNV(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBindShadingRateImageNV(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBindShadingRateImageNV(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetViewportShadingRatePaletteNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkShadingRatePaletteNV* pShadingRatePalettes, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetViewportShadingRatePaletteNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkShadingRatePaletteNV* pShadingRatePalettes, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetViewportShadingRatePaletteNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkShadingRatePaletteNV* pShadingRatePalettes, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetCoarseSampleOrderNV(VkCommandBuffer commandBuffer, VkCoarseSampleOrderTypeNV sampleOrderType, uint32_t customSampleOrderCount, const VkCoarseSampleOrderCustomNV* pCustomSampleOrders, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetCoarseSampleOrderNV(VkCommandBuffer commandBuffer, VkCoarseSampleOrderTypeNV sampleOrderType, uint32_t customSampleOrderCount, const VkCoarseSampleOrderCustomNV* pCustomSampleOrders, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetCoarseSampleOrderNV(VkCommandBuffer commandBuffer, VkCoarseSampleOrderTypeNV sampleOrderType, uint32_t customSampleOrderCount, const VkCoarseSampleOrderCustomNV* pCustomSampleOrders, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateAccelerationStructureNV(VkDevice device, const VkAccelerationStructureCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkAccelerationStructureNV* pAccelerationStructure, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateAccelerationStructureNV(VkDevice device, const VkAccelerationStructureCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkAccelerationStructureNV* pAccelerationStructure, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateAccelerationStructureNV(VkDevice device, const VkAccelerationStructureCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkAccelerationStructureNV* pAccelerationStructure, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyAccelerationStructureNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyAccelerationStructureNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyAccelerationStructureNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetAccelerationStructureMemoryRequirementsNV(VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetAccelerationStructureMemoryRequirementsNV(VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements, const RecordObject& record_obj) {} - virtual void PostCallRecordGetAccelerationStructureMemoryRequirementsNV(VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements, const RecordObject& record_obj) {} - virtual bool PreCallValidateBindAccelerationStructureMemoryNV(VkDevice device, uint32_t bindInfoCount, const VkBindAccelerationStructureMemoryInfoNV* pBindInfos, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordBindAccelerationStructureMemoryNV(VkDevice device, uint32_t bindInfoCount, const VkBindAccelerationStructureMemoryInfoNV* pBindInfos, const RecordObject& record_obj) {} - virtual void PostCallRecordBindAccelerationStructureMemoryNV(VkDevice device, uint32_t bindInfoCount, const VkBindAccelerationStructureMemoryInfoNV* pBindInfos, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBuildAccelerationStructureNV(VkCommandBuffer commandBuffer, const VkAccelerationStructureInfoNV* pInfo, VkBuffer instanceData, VkDeviceSize instanceOffset, VkBool32 update, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkBuffer scratch, VkDeviceSize scratchOffset, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBuildAccelerationStructureNV(VkCommandBuffer commandBuffer, const VkAccelerationStructureInfoNV* pInfo, VkBuffer instanceData, VkDeviceSize instanceOffset, VkBool32 update, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkBuffer scratch, VkDeviceSize scratchOffset, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBuildAccelerationStructureNV(VkCommandBuffer commandBuffer, const VkAccelerationStructureInfoNV* pInfo, VkBuffer instanceData, VkDeviceSize instanceOffset, VkBool32 update, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkBuffer scratch, VkDeviceSize scratchOffset, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCopyAccelerationStructureNV(VkCommandBuffer commandBuffer, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkCopyAccelerationStructureModeKHR mode, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCopyAccelerationStructureNV(VkCommandBuffer commandBuffer, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkCopyAccelerationStructureModeKHR mode, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCopyAccelerationStructureNV(VkCommandBuffer commandBuffer, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkCopyAccelerationStructureModeKHR mode, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdTraceRaysNV(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, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdTraceRaysNV(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, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdTraceRaysNV(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, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoNV* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoNV* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoNV* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetRayTracingShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetRayTracingShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData, const RecordObject& record_obj) {} - virtual void PostCallRecordGetRayTracingShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetRayTracingShaderGroupHandlesNV(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetRayTracingShaderGroupHandlesNV(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData, const RecordObject& record_obj) {} - virtual void PostCallRecordGetRayTracingShaderGroupHandlesNV(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetAccelerationStructureHandleNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, size_t dataSize, void* pData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetAccelerationStructureHandleNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, size_t dataSize, void* pData, const RecordObject& record_obj) {} - virtual void PostCallRecordGetAccelerationStructureHandleNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, size_t dataSize, void* pData, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdWriteAccelerationStructuresPropertiesNV(VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, const VkAccelerationStructureNV* pAccelerationStructures, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdWriteAccelerationStructuresPropertiesNV(VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, const VkAccelerationStructureNV* pAccelerationStructures, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdWriteAccelerationStructuresPropertiesNV(VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, const VkAccelerationStructureNV* pAccelerationStructures, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery, const RecordObject& record_obj) {} - virtual bool PreCallValidateCompileDeferredNV(VkDevice device, VkPipeline pipeline, uint32_t shader, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCompileDeferredNV(VkDevice device, VkPipeline pipeline, uint32_t shader, const RecordObject& record_obj) {} - virtual void PostCallRecordCompileDeferredNV(VkDevice device, VkPipeline pipeline, uint32_t shader, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetMemoryHostPointerPropertiesEXT(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetMemoryHostPointerPropertiesEXT(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetMemoryHostPointerPropertiesEXT(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdWriteBufferMarkerAMD(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdWriteBufferMarkerAMD(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdWriteBufferMarkerAMD(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdWriteBufferMarker2AMD(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdWriteBufferMarker2AMD(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdWriteBufferMarker2AMD(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, VkTimeDomainKHR* pTimeDomains, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, VkTimeDomainKHR* pTimeDomains, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, VkTimeDomainKHR* pTimeDomains, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetCalibratedTimestampsEXT(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetCalibratedTimestampsEXT(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation, const RecordObject& record_obj) {} - virtual void PostCallRecordGetCalibratedTimestampsEXT(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, uint64_t* pMaxDeviation, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDrawMeshTasksIndirectNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDrawMeshTasksIndirectNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDrawMeshTasksIndirectNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetExclusiveScissorEnableNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VkBool32* pExclusiveScissorEnables, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetExclusiveScissorEnableNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VkBool32* pExclusiveScissorEnables, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetExclusiveScissorEnableNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VkBool32* pExclusiveScissorEnables, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetExclusiveScissorNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VkRect2D* pExclusiveScissors, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetExclusiveScissorNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VkRect2D* pExclusiveScissors, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetExclusiveScissorNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, const VkRect2D* pExclusiveScissors, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetCheckpointNV(VkCommandBuffer commandBuffer, const void* pCheckpointMarker, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetCheckpointNV(VkCommandBuffer commandBuffer, const void* pCheckpointMarker, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetCheckpointNV(VkCommandBuffer commandBuffer, const void* pCheckpointMarker, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetQueueCheckpointDataNV(VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointDataNV* pCheckpointData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetQueueCheckpointDataNV(VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointDataNV* pCheckpointData, const RecordObject& record_obj) {} - virtual void PostCallRecordGetQueueCheckpointDataNV(VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointDataNV* pCheckpointData, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetQueueCheckpointData2NV(VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointData2NV* pCheckpointData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetQueueCheckpointData2NV(VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointData2NV* pCheckpointData, const RecordObject& record_obj) {} - virtual void PostCallRecordGetQueueCheckpointData2NV(VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointData2NV* pCheckpointData, const RecordObject& record_obj) {} - virtual bool PreCallValidateInitializePerformanceApiINTEL(VkDevice device, const VkInitializePerformanceApiInfoINTEL* pInitializeInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordInitializePerformanceApiINTEL(VkDevice device, const VkInitializePerformanceApiInfoINTEL* pInitializeInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordInitializePerformanceApiINTEL(VkDevice device, const VkInitializePerformanceApiInfoINTEL* pInitializeInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateUninitializePerformanceApiINTEL(VkDevice device, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordUninitializePerformanceApiINTEL(VkDevice device, const RecordObject& record_obj) {} - virtual void PostCallRecordUninitializePerformanceApiINTEL(VkDevice device, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetPerformanceMarkerINTEL(VkCommandBuffer commandBuffer, const VkPerformanceMarkerInfoINTEL* pMarkerInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetPerformanceMarkerINTEL(VkCommandBuffer commandBuffer, const VkPerformanceMarkerInfoINTEL* pMarkerInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetPerformanceMarkerINTEL(VkCommandBuffer commandBuffer, const VkPerformanceMarkerInfoINTEL* pMarkerInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetPerformanceStreamMarkerINTEL(VkCommandBuffer commandBuffer, const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetPerformanceStreamMarkerINTEL(VkCommandBuffer commandBuffer, const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetPerformanceStreamMarkerINTEL(VkCommandBuffer commandBuffer, const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetPerformanceOverrideINTEL(VkCommandBuffer commandBuffer, const VkPerformanceOverrideInfoINTEL* pOverrideInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetPerformanceOverrideINTEL(VkCommandBuffer commandBuffer, const VkPerformanceOverrideInfoINTEL* pOverrideInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetPerformanceOverrideINTEL(VkCommandBuffer commandBuffer, const VkPerformanceOverrideInfoINTEL* pOverrideInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateAcquirePerformanceConfigurationINTEL(VkDevice device, const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, VkPerformanceConfigurationINTEL* pConfiguration, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordAcquirePerformanceConfigurationINTEL(VkDevice device, const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, VkPerformanceConfigurationINTEL* pConfiguration, const RecordObject& record_obj) {} - virtual void PostCallRecordAcquirePerformanceConfigurationINTEL(VkDevice device, const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, VkPerformanceConfigurationINTEL* pConfiguration, const RecordObject& record_obj) {} - virtual bool PreCallValidateReleasePerformanceConfigurationINTEL(VkDevice device, VkPerformanceConfigurationINTEL configuration, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordReleasePerformanceConfigurationINTEL(VkDevice device, VkPerformanceConfigurationINTEL configuration, const RecordObject& record_obj) {} - virtual void PostCallRecordReleasePerformanceConfigurationINTEL(VkDevice device, VkPerformanceConfigurationINTEL configuration, const RecordObject& record_obj) {} - virtual bool PreCallValidateQueueSetPerformanceConfigurationINTEL(VkQueue queue, VkPerformanceConfigurationINTEL configuration, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordQueueSetPerformanceConfigurationINTEL(VkQueue queue, VkPerformanceConfigurationINTEL configuration, const RecordObject& record_obj) {} - virtual void PostCallRecordQueueSetPerformanceConfigurationINTEL(VkQueue queue, VkPerformanceConfigurationINTEL configuration, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPerformanceParameterINTEL(VkDevice device, VkPerformanceParameterTypeINTEL parameter, VkPerformanceValueINTEL* pValue, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPerformanceParameterINTEL(VkDevice device, VkPerformanceParameterTypeINTEL parameter, VkPerformanceValueINTEL* pValue, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPerformanceParameterINTEL(VkDevice device, VkPerformanceParameterTypeINTEL parameter, VkPerformanceValueINTEL* pValue, const RecordObject& record_obj) {} - virtual bool PreCallValidateSetLocalDimmingAMD(VkDevice device, VkSwapchainKHR swapChain, VkBool32 localDimmingEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordSetLocalDimmingAMD(VkDevice device, VkSwapchainKHR swapChain, VkBool32 localDimmingEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordSetLocalDimmingAMD(VkDevice device, VkSwapchainKHR swapChain, VkBool32 localDimmingEnable, const RecordObject& record_obj) {} -#ifdef VK_USE_PLATFORM_FUCHSIA - virtual bool PreCallValidateCreateImagePipeSurfaceFUCHSIA(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateImagePipeSurfaceFUCHSIA(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateImagePipeSurfaceFUCHSIA(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_FUCHSIA -#ifdef VK_USE_PLATFORM_METAL_EXT - virtual bool PreCallValidateCreateMetalSurfaceEXT(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateMetalSurfaceEXT(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateMetalSurfaceEXT(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_METAL_EXT - virtual bool PreCallValidateGetBufferDeviceAddressEXT(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetBufferDeviceAddressEXT(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordGetBufferDeviceAddressEXT(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceToolPropertiesEXT(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, VkPhysicalDeviceToolProperties* pToolProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceToolPropertiesEXT(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, VkPhysicalDeviceToolProperties* pToolProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceToolPropertiesEXT(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, VkPhysicalDeviceToolProperties* pToolProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceCooperativeMatrixPropertiesNV(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixPropertiesNV* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceCooperativeMatrixPropertiesNV(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixPropertiesNV* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceCooperativeMatrixPropertiesNV(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixPropertiesNV* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(VkPhysicalDevice physicalDevice, uint32_t* pCombinationCount, VkFramebufferMixedSamplesCombinationNV* pCombinations, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(VkPhysicalDevice physicalDevice, uint32_t* pCombinationCount, VkFramebufferMixedSamplesCombinationNV* pCombinations, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(VkPhysicalDevice physicalDevice, uint32_t* pCombinationCount, VkFramebufferMixedSamplesCombinationNV* pCombinations, const RecordObject& record_obj) {} -#ifdef VK_USE_PLATFORM_WIN32_KHR - virtual bool PreCallValidateGetPhysicalDeviceSurfacePresentModes2EXT(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceSurfacePresentModes2EXT(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceSurfacePresentModes2EXT(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes, const RecordObject& record_obj) {} - virtual bool PreCallValidateAcquireFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordAcquireFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain, const RecordObject& record_obj) {} - virtual void PostCallRecordAcquireFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain, const RecordObject& record_obj) {} - virtual bool PreCallValidateReleaseFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordReleaseFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain, const RecordObject& record_obj) {} - virtual void PostCallRecordReleaseFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeviceGroupSurfacePresentModes2EXT(VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeviceGroupSurfacePresentModes2EXT(VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeviceGroupSurfacePresentModes2EXT(VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_WIN32_KHR - virtual bool PreCallValidateCreateHeadlessSurfaceEXT(VkInstance instance, const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateHeadlessSurfaceEXT(VkInstance instance, const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateHeadlessSurfaceEXT(VkInstance instance, const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetLineStippleEXT(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetLineStippleEXT(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetLineStippleEXT(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern, const RecordObject& record_obj) {} - virtual bool PreCallValidateResetQueryPoolEXT(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordResetQueryPoolEXT(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, const RecordObject& record_obj) {} - virtual void PostCallRecordResetQueryPoolEXT(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetCullModeEXT(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetCullModeEXT(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetCullModeEXT(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetFrontFaceEXT(VkCommandBuffer commandBuffer, VkFrontFace frontFace, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetFrontFaceEXT(VkCommandBuffer commandBuffer, VkFrontFace frontFace, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetFrontFaceEXT(VkCommandBuffer commandBuffer, VkFrontFace frontFace, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetPrimitiveTopologyEXT(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetPrimitiveTopologyEXT(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetPrimitiveTopologyEXT(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetViewportWithCountEXT(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetViewportWithCountEXT(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetViewportWithCountEXT(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetScissorWithCountEXT(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetScissorWithCountEXT(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetScissorWithCountEXT(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBindVertexBuffers2EXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, const VkDeviceSize* pStrides, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBindVertexBuffers2EXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, const VkDeviceSize* pStrides, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBindVertexBuffers2EXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, const VkDeviceSize* pStrides, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDepthTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDepthTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDepthTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDepthWriteEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDepthWriteEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDepthWriteEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDepthCompareOpEXT(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDepthCompareOpEXT(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDepthCompareOpEXT(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDepthBoundsTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDepthBoundsTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDepthBoundsTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetStencilTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetStencilTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetStencilTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetStencilOpEXT(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetStencilOpEXT(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetStencilOpEXT(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp, const RecordObject& record_obj) {} - virtual bool PreCallValidateCopyMemoryToImageEXT(VkDevice device, const VkCopyMemoryToImageInfoEXT* pCopyMemoryToImageInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCopyMemoryToImageEXT(VkDevice device, const VkCopyMemoryToImageInfoEXT* pCopyMemoryToImageInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCopyMemoryToImageEXT(VkDevice device, const VkCopyMemoryToImageInfoEXT* pCopyMemoryToImageInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCopyImageToMemoryEXT(VkDevice device, const VkCopyImageToMemoryInfoEXT* pCopyImageToMemoryInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCopyImageToMemoryEXT(VkDevice device, const VkCopyImageToMemoryInfoEXT* pCopyImageToMemoryInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCopyImageToMemoryEXT(VkDevice device, const VkCopyImageToMemoryInfoEXT* pCopyImageToMemoryInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCopyImageToImageEXT(VkDevice device, const VkCopyImageToImageInfoEXT* pCopyImageToImageInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCopyImageToImageEXT(VkDevice device, const VkCopyImageToImageInfoEXT* pCopyImageToImageInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCopyImageToImageEXT(VkDevice device, const VkCopyImageToImageInfoEXT* pCopyImageToImageInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateTransitionImageLayoutEXT(VkDevice device, uint32_t transitionCount, const VkHostImageLayoutTransitionInfoEXT* pTransitions, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordTransitionImageLayoutEXT(VkDevice device, uint32_t transitionCount, const VkHostImageLayoutTransitionInfoEXT* pTransitions, const RecordObject& record_obj) {} - virtual void PostCallRecordTransitionImageLayoutEXT(VkDevice device, uint32_t transitionCount, const VkHostImageLayoutTransitionInfoEXT* pTransitions, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetImageSubresourceLayout2EXT(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, VkSubresourceLayout2KHR* pLayout, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetImageSubresourceLayout2EXT(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, VkSubresourceLayout2KHR* pLayout, const RecordObject& record_obj) {} - virtual void PostCallRecordGetImageSubresourceLayout2EXT(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, VkSubresourceLayout2KHR* pLayout, const RecordObject& record_obj) {} - virtual bool PreCallValidateReleaseSwapchainImagesEXT(VkDevice device, const VkReleaseSwapchainImagesInfoEXT* pReleaseInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordReleaseSwapchainImagesEXT(VkDevice device, const VkReleaseSwapchainImagesInfoEXT* pReleaseInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordReleaseSwapchainImagesEXT(VkDevice device, const VkReleaseSwapchainImagesInfoEXT* pReleaseInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetGeneratedCommandsMemoryRequirementsNV(VkDevice device, const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2* pMemoryRequirements, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetGeneratedCommandsMemoryRequirementsNV(VkDevice device, const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} - virtual void PostCallRecordGetGeneratedCommandsMemoryRequirementsNV(VkDevice device, const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdPreprocessGeneratedCommandsNV(VkCommandBuffer commandBuffer, const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdPreprocessGeneratedCommandsNV(VkCommandBuffer commandBuffer, const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdPreprocessGeneratedCommandsNV(VkCommandBuffer commandBuffer, const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdExecuteGeneratedCommandsNV(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdExecuteGeneratedCommandsNV(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdExecuteGeneratedCommandsNV(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBindPipelineShaderGroupNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline, uint32_t groupIndex, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBindPipelineShaderGroupNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline, uint32_t groupIndex, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBindPipelineShaderGroupNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline, uint32_t groupIndex, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateIndirectCommandsLayoutNV(VkDevice device, const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutNV* pIndirectCommandsLayout, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateIndirectCommandsLayoutNV(VkDevice device, const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutNV* pIndirectCommandsLayout, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateIndirectCommandsLayoutNV(VkDevice device, const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutNV* pIndirectCommandsLayout, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyIndirectCommandsLayoutNV(VkDevice device, VkIndirectCommandsLayoutNV indirectCommandsLayout, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyIndirectCommandsLayoutNV(VkDevice device, VkIndirectCommandsLayoutNV indirectCommandsLayout, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyIndirectCommandsLayoutNV(VkDevice device, VkIndirectCommandsLayoutNV indirectCommandsLayout, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDepthBias2EXT(VkCommandBuffer commandBuffer, const VkDepthBiasInfoEXT* pDepthBiasInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDepthBias2EXT(VkCommandBuffer commandBuffer, const VkDepthBiasInfoEXT* pDepthBiasInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDepthBias2EXT(VkCommandBuffer commandBuffer, const VkDepthBiasInfoEXT* pDepthBiasInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateAcquireDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, VkDisplayKHR display, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordAcquireDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, VkDisplayKHR display, const RecordObject& record_obj) {} - virtual void PostCallRecordAcquireDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, VkDisplayKHR display, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, uint32_t connectorId, VkDisplayKHR* display, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, uint32_t connectorId, VkDisplayKHR* display, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, uint32_t connectorId, VkDisplayKHR* display, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreatePrivateDataSlotEXT(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreatePrivateDataSlotEXT(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot, const RecordObject& record_obj) {} - virtual void PostCallRecordCreatePrivateDataSlotEXT(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyPrivateDataSlotEXT(VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyPrivateDataSlotEXT(VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyPrivateDataSlotEXT(VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateSetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t data, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordSetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t data, const RecordObject& record_obj) {} - virtual void PostCallRecordSetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t data, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t* pData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t* pData, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, uint64_t* pData, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateCudaModuleNV(VkDevice device, const VkCudaModuleCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCudaModuleNV* pModule, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateCudaModuleNV(VkDevice device, const VkCudaModuleCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCudaModuleNV* pModule, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateCudaModuleNV(VkDevice device, const VkCudaModuleCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCudaModuleNV* pModule, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetCudaModuleCacheNV(VkDevice device, VkCudaModuleNV module, size_t* pCacheSize, void* pCacheData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetCudaModuleCacheNV(VkDevice device, VkCudaModuleNV module, size_t* pCacheSize, void* pCacheData, const RecordObject& record_obj) {} - virtual void PostCallRecordGetCudaModuleCacheNV(VkDevice device, VkCudaModuleNV module, size_t* pCacheSize, void* pCacheData, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateCudaFunctionNV(VkDevice device, const VkCudaFunctionCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCudaFunctionNV* pFunction, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateCudaFunctionNV(VkDevice device, const VkCudaFunctionCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCudaFunctionNV* pFunction, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateCudaFunctionNV(VkDevice device, const VkCudaFunctionCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCudaFunctionNV* pFunction, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyCudaModuleNV(VkDevice device, VkCudaModuleNV module, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyCudaModuleNV(VkDevice device, VkCudaModuleNV module, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyCudaModuleNV(VkDevice device, VkCudaModuleNV module, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyCudaFunctionNV(VkDevice device, VkCudaFunctionNV function, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyCudaFunctionNV(VkDevice device, VkCudaFunctionNV function, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyCudaFunctionNV(VkDevice device, VkCudaFunctionNV function, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCudaLaunchKernelNV(VkCommandBuffer commandBuffer, const VkCudaLaunchInfoNV* pLaunchInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCudaLaunchKernelNV(VkCommandBuffer commandBuffer, const VkCudaLaunchInfoNV* pLaunchInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCudaLaunchKernelNV(VkCommandBuffer commandBuffer, const VkCudaLaunchInfoNV* pLaunchInfo, const RecordObject& record_obj) {} -#ifdef VK_USE_PLATFORM_METAL_EXT - virtual bool PreCallValidateExportMetalObjectsEXT(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordExportMetalObjectsEXT(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordExportMetalObjectsEXT(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_METAL_EXT - virtual bool PreCallValidateGetDescriptorSetLayoutSizeEXT(VkDevice device, VkDescriptorSetLayout layout, VkDeviceSize* pLayoutSizeInBytes, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDescriptorSetLayoutSizeEXT(VkDevice device, VkDescriptorSetLayout layout, VkDeviceSize* pLayoutSizeInBytes, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDescriptorSetLayoutSizeEXT(VkDevice device, VkDescriptorSetLayout layout, VkDeviceSize* pLayoutSizeInBytes, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDescriptorSetLayoutBindingOffsetEXT(VkDevice device, VkDescriptorSetLayout layout, uint32_t binding, VkDeviceSize* pOffset, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDescriptorSetLayoutBindingOffsetEXT(VkDevice device, VkDescriptorSetLayout layout, uint32_t binding, VkDeviceSize* pOffset, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDescriptorSetLayoutBindingOffsetEXT(VkDevice device, VkDescriptorSetLayout layout, uint32_t binding, VkDeviceSize* pOffset, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDescriptorEXT(VkDevice device, const VkDescriptorGetInfoEXT* pDescriptorInfo, size_t dataSize, void* pDescriptor, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDescriptorEXT(VkDevice device, const VkDescriptorGetInfoEXT* pDescriptorInfo, size_t dataSize, void* pDescriptor, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDescriptorEXT(VkDevice device, const VkDescriptorGetInfoEXT* pDescriptorInfo, size_t dataSize, void* pDescriptor, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBindDescriptorBuffersEXT(VkCommandBuffer commandBuffer, uint32_t bufferCount, const VkDescriptorBufferBindingInfoEXT* pBindingInfos, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBindDescriptorBuffersEXT(VkCommandBuffer commandBuffer, uint32_t bufferCount, const VkDescriptorBufferBindingInfoEXT* pBindingInfos, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBindDescriptorBuffersEXT(VkCommandBuffer commandBuffer, uint32_t bufferCount, const VkDescriptorBufferBindingInfoEXT* pBindingInfos, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDescriptorBufferOffsetsEXT(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, const uint32_t* pBufferIndices, const VkDeviceSize* pOffsets, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDescriptorBufferOffsetsEXT(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, const uint32_t* pBufferIndices, const VkDeviceSize* pOffsets, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDescriptorBufferOffsetsEXT(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, const uint32_t* pBufferIndices, const VkDeviceSize* pOffsets, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBindDescriptorBufferEmbeddedSamplersEXT(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBindDescriptorBufferEmbeddedSamplersEXT(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBindDescriptorBufferEmbeddedSamplersEXT(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetBufferOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkBufferCaptureDescriptorDataInfoEXT* pInfo, void* pData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetBufferOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkBufferCaptureDescriptorDataInfoEXT* pInfo, void* pData, const RecordObject& record_obj) {} - virtual void PostCallRecordGetBufferOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkBufferCaptureDescriptorDataInfoEXT* pInfo, void* pData, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetImageOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkImageCaptureDescriptorDataInfoEXT* pInfo, void* pData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetImageOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkImageCaptureDescriptorDataInfoEXT* pInfo, void* pData, const RecordObject& record_obj) {} - virtual void PostCallRecordGetImageOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkImageCaptureDescriptorDataInfoEXT* pInfo, void* pData, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetImageViewOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkImageViewCaptureDescriptorDataInfoEXT* pInfo, void* pData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetImageViewOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkImageViewCaptureDescriptorDataInfoEXT* pInfo, void* pData, const RecordObject& record_obj) {} - virtual void PostCallRecordGetImageViewOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkImageViewCaptureDescriptorDataInfoEXT* pInfo, void* pData, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetSamplerOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkSamplerCaptureDescriptorDataInfoEXT* pInfo, void* pData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetSamplerOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkSamplerCaptureDescriptorDataInfoEXT* pInfo, void* pData, const RecordObject& record_obj) {} - virtual void PostCallRecordGetSamplerOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkSamplerCaptureDescriptorDataInfoEXT* pInfo, void* pData, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetAccelerationStructureOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfo, void* pData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetAccelerationStructureOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfo, void* pData, const RecordObject& record_obj) {} - virtual void PostCallRecordGetAccelerationStructureOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfo, void* pData, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetFragmentShadingRateEnumNV(VkCommandBuffer commandBuffer, VkFragmentShadingRateNV shadingRate, const VkFragmentShadingRateCombinerOpKHR combinerOps[2], const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetFragmentShadingRateEnumNV(VkCommandBuffer commandBuffer, VkFragmentShadingRateNV shadingRate, const VkFragmentShadingRateCombinerOpKHR combinerOps[2], const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetFragmentShadingRateEnumNV(VkCommandBuffer commandBuffer, VkFragmentShadingRateNV shadingRate, const VkFragmentShadingRateCombinerOpKHR combinerOps[2], const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeviceFaultInfoEXT(VkDevice device, VkDeviceFaultCountsEXT* pFaultCounts, VkDeviceFaultInfoEXT* pFaultInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeviceFaultInfoEXT(VkDevice device, VkDeviceFaultCountsEXT* pFaultCounts, VkDeviceFaultInfoEXT* pFaultInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeviceFaultInfoEXT(VkDevice device, VkDeviceFaultCountsEXT* pFaultCounts, VkDeviceFaultInfoEXT* pFaultInfo, const RecordObject& record_obj) {} -#ifdef VK_USE_PLATFORM_WIN32_KHR - virtual bool PreCallValidateAcquireWinrtDisplayNV(VkPhysicalDevice physicalDevice, VkDisplayKHR display, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordAcquireWinrtDisplayNV(VkPhysicalDevice physicalDevice, VkDisplayKHR display, const RecordObject& record_obj) {} - virtual void PostCallRecordAcquireWinrtDisplayNV(VkPhysicalDevice physicalDevice, VkDisplayKHR display, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetWinrtDisplayNV(VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR* pDisplay, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetWinrtDisplayNV(VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR* pDisplay, const RecordObject& record_obj) {} - virtual void PostCallRecordGetWinrtDisplayNV(VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR* pDisplay, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_WIN32_KHR -#ifdef VK_USE_PLATFORM_DIRECTFB_EXT - virtual bool PreCallValidateCreateDirectFBSurfaceEXT(VkInstance instance, const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateDirectFBSurfaceEXT(VkInstance instance, const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateDirectFBSurfaceEXT(VkInstance instance, const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceDirectFBPresentationSupportEXT(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, IDirectFB* dfb, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceDirectFBPresentationSupportEXT(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, IDirectFB* dfb, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceDirectFBPresentationSupportEXT(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, IDirectFB* dfb, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_DIRECTFB_EXT - virtual bool PreCallValidateCmdSetVertexInputEXT(VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, uint32_t vertexAttributeDescriptionCount, const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetVertexInputEXT(VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, uint32_t vertexAttributeDescriptionCount, const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetVertexInputEXT(VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, uint32_t vertexAttributeDescriptionCount, const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions, const RecordObject& record_obj) {} -#ifdef VK_USE_PLATFORM_FUCHSIA - virtual bool PreCallValidateGetMemoryZirconHandleFUCHSIA(VkDevice device, const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetMemoryZirconHandleFUCHSIA(VkDevice device, const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle, const RecordObject& record_obj) {} - virtual void PostCallRecordGetMemoryZirconHandleFUCHSIA(VkDevice device, const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetMemoryZirconHandlePropertiesFUCHSIA(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetMemoryZirconHandlePropertiesFUCHSIA(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetMemoryZirconHandlePropertiesFUCHSIA(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateImportSemaphoreZirconHandleFUCHSIA(VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordImportSemaphoreZirconHandleFUCHSIA(VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordImportSemaphoreZirconHandleFUCHSIA(VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetSemaphoreZirconHandleFUCHSIA(VkDevice device, const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetSemaphoreZirconHandleFUCHSIA(VkDevice device, const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle, const RecordObject& record_obj) {} - virtual void PostCallRecordGetSemaphoreZirconHandleFUCHSIA(VkDevice device, const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, zx_handle_t* pZirconHandle, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateBufferCollectionFUCHSIA(VkDevice device, const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferCollectionFUCHSIA* pCollection, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateBufferCollectionFUCHSIA(VkDevice device, const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferCollectionFUCHSIA* pCollection, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateBufferCollectionFUCHSIA(VkDevice device, const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferCollectionFUCHSIA* pCollection, const RecordObject& record_obj) {} - virtual bool PreCallValidateSetBufferCollectionImageConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordSetBufferCollectionImageConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordSetBufferCollectionImageConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateSetBufferCollectionBufferConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordSetBufferCollectionBufferConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordSetBufferCollectionBufferConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyBufferCollectionFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyBufferCollectionFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyBufferCollectionFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetBufferCollectionPropertiesFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, VkBufferCollectionPropertiesFUCHSIA* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetBufferCollectionPropertiesFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, VkBufferCollectionPropertiesFUCHSIA* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetBufferCollectionPropertiesFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, VkBufferCollectionPropertiesFUCHSIA* pProperties, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_FUCHSIA - virtual bool PreCallValidateGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(VkDevice device, VkRenderPass renderpass, VkExtent2D* pMaxWorkgroupSize, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(VkDevice device, VkRenderPass renderpass, VkExtent2D* pMaxWorkgroupSize, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(VkDevice device, VkRenderPass renderpass, VkExtent2D* pMaxWorkgroupSize, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSubpassShadingHUAWEI(VkCommandBuffer commandBuffer, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSubpassShadingHUAWEI(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSubpassShadingHUAWEI(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBindInvocationMaskHUAWEI(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBindInvocationMaskHUAWEI(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBindInvocationMaskHUAWEI(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetMemoryRemoteAddressNV(VkDevice device, const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo, VkRemoteAddressNV* pAddress, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetMemoryRemoteAddressNV(VkDevice device, const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo, VkRemoteAddressNV* pAddress, const RecordObject& record_obj) {} - virtual void PostCallRecordGetMemoryRemoteAddressNV(VkDevice device, const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo, VkRemoteAddressNV* pAddress, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPipelinePropertiesEXT(VkDevice device, const VkPipelineInfoEXT* pPipelineInfo, VkBaseOutStructure* pPipelineProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPipelinePropertiesEXT(VkDevice device, const VkPipelineInfoEXT* pPipelineInfo, VkBaseOutStructure* pPipelineProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPipelinePropertiesEXT(VkDevice device, const VkPipelineInfoEXT* pPipelineInfo, VkBaseOutStructure* pPipelineProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetPatchControlPointsEXT(VkCommandBuffer commandBuffer, uint32_t patchControlPoints, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetPatchControlPointsEXT(VkCommandBuffer commandBuffer, uint32_t patchControlPoints, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetPatchControlPointsEXT(VkCommandBuffer commandBuffer, uint32_t patchControlPoints, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetRasterizerDiscardEnableEXT(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetRasterizerDiscardEnableEXT(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetRasterizerDiscardEnableEXT(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDepthBiasEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDepthBiasEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDepthBiasEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetLogicOpEXT(VkCommandBuffer commandBuffer, VkLogicOp logicOp, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetLogicOpEXT(VkCommandBuffer commandBuffer, VkLogicOp logicOp, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetLogicOpEXT(VkCommandBuffer commandBuffer, VkLogicOp logicOp, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetPrimitiveRestartEnableEXT(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetPrimitiveRestartEnableEXT(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetPrimitiveRestartEnableEXT(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable, const RecordObject& record_obj) {} -#ifdef VK_USE_PLATFORM_SCREEN_QNX - virtual bool PreCallValidateCreateScreenSurfaceQNX(VkInstance instance, const VkScreenSurfaceCreateInfoQNX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateScreenSurfaceQNX(VkInstance instance, const VkScreenSurfaceCreateInfoQNX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateScreenSurfaceQNX(VkInstance instance, const VkScreenSurfaceCreateInfoQNX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceScreenPresentationSupportQNX(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct _screen_window* window, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceScreenPresentationSupportQNX(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct _screen_window* window, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceScreenPresentationSupportQNX(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct _screen_window* window, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_SCREEN_QNX - virtual bool PreCallValidateCmdSetColorWriteEnableEXT(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkBool32* pColorWriteEnables, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetColorWriteEnableEXT(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkBool32* pColorWriteEnables, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetColorWriteEnableEXT(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkBool32* pColorWriteEnables, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDrawMultiEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawInfoEXT* pVertexInfo, uint32_t instanceCount, uint32_t firstInstance, uint32_t stride, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDrawMultiEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawInfoEXT* pVertexInfo, uint32_t instanceCount, uint32_t firstInstance, uint32_t stride, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDrawMultiEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawInfoEXT* pVertexInfo, uint32_t instanceCount, uint32_t firstInstance, uint32_t stride, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDrawMultiIndexedEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawIndexedInfoEXT* pIndexInfo, uint32_t instanceCount, uint32_t firstInstance, uint32_t stride, const int32_t* pVertexOffset, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDrawMultiIndexedEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawIndexedInfoEXT* pIndexInfo, uint32_t instanceCount, uint32_t firstInstance, uint32_t stride, const int32_t* pVertexOffset, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDrawMultiIndexedEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawIndexedInfoEXT* pIndexInfo, uint32_t instanceCount, uint32_t firstInstance, uint32_t stride, const int32_t* pVertexOffset, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateMicromapEXT(VkDevice device, const VkMicromapCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkMicromapEXT* pMicromap, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateMicromapEXT(VkDevice device, const VkMicromapCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkMicromapEXT* pMicromap, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateMicromapEXT(VkDevice device, const VkMicromapCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkMicromapEXT* pMicromap, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyMicromapEXT(VkDevice device, VkMicromapEXT micromap, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyMicromapEXT(VkDevice device, VkMicromapEXT micromap, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyMicromapEXT(VkDevice device, VkMicromapEXT micromap, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBuildMicromapsEXT(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBuildMicromapsEXT(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBuildMicromapsEXT(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos, const RecordObject& record_obj) {} - virtual bool PreCallValidateBuildMicromapsEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordBuildMicromapsEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos, const RecordObject& record_obj) {} - virtual void PostCallRecordBuildMicromapsEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos, const RecordObject& record_obj) {} - virtual bool PreCallValidateCopyMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapInfoEXT* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCopyMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapInfoEXT* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCopyMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapInfoEXT* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCopyMicromapToMemoryEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapToMemoryInfoEXT* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCopyMicromapToMemoryEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapToMemoryInfoEXT* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCopyMicromapToMemoryEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapToMemoryInfoEXT* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCopyMemoryToMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToMicromapInfoEXT* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCopyMemoryToMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToMicromapInfoEXT* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCopyMemoryToMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToMicromapInfoEXT* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateWriteMicromapsPropertiesEXT(VkDevice device, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, VkQueryType queryType, size_t dataSize, void* pData, size_t stride, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordWriteMicromapsPropertiesEXT(VkDevice device, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, VkQueryType queryType, size_t dataSize, void* pData, size_t stride, const RecordObject& record_obj) {} - virtual void PostCallRecordWriteMicromapsPropertiesEXT(VkDevice device, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, VkQueryType queryType, size_t dataSize, void* pData, size_t stride, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCopyMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCopyMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCopyMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCopyMicromapToMemoryEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCopyMicromapToMemoryEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCopyMicromapToMemoryEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCopyMemoryToMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCopyMemoryToMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCopyMemoryToMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdWriteMicromapsPropertiesEXT(VkCommandBuffer commandBuffer, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdWriteMicromapsPropertiesEXT(VkCommandBuffer commandBuffer, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdWriteMicromapsPropertiesEXT(VkCommandBuffer commandBuffer, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeviceMicromapCompatibilityEXT(VkDevice device, const VkMicromapVersionInfoEXT* pVersionInfo, VkAccelerationStructureCompatibilityKHR* pCompatibility, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeviceMicromapCompatibilityEXT(VkDevice device, const VkMicromapVersionInfoEXT* pVersionInfo, VkAccelerationStructureCompatibilityKHR* pCompatibility, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeviceMicromapCompatibilityEXT(VkDevice device, const VkMicromapVersionInfoEXT* pVersionInfo, VkAccelerationStructureCompatibilityKHR* pCompatibility, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetMicromapBuildSizesEXT(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, const VkMicromapBuildInfoEXT* pBuildInfo, VkMicromapBuildSizesInfoEXT* pSizeInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetMicromapBuildSizesEXT(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, const VkMicromapBuildInfoEXT* pBuildInfo, VkMicromapBuildSizesInfoEXT* pSizeInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordGetMicromapBuildSizesEXT(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, const VkMicromapBuildInfoEXT* pBuildInfo, VkMicromapBuildSizesInfoEXT* pSizeInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDrawClusterHUAWEI(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDrawClusterHUAWEI(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDrawClusterHUAWEI(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDrawClusterIndirectHUAWEI(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDrawClusterIndirectHUAWEI(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDrawClusterIndirectHUAWEI(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, const RecordObject& record_obj) {} - virtual bool PreCallValidateSetDeviceMemoryPriorityEXT(VkDevice device, VkDeviceMemory memory, float priority, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordSetDeviceMemoryPriorityEXT(VkDevice device, VkDeviceMemory memory, float priority, const RecordObject& record_obj) {} - virtual void PostCallRecordSetDeviceMemoryPriorityEXT(VkDevice device, VkDeviceMemory memory, float priority, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDescriptorSetLayoutHostMappingInfoVALVE(VkDevice device, const VkDescriptorSetBindingReferenceVALVE* pBindingReference, VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDescriptorSetLayoutHostMappingInfoVALVE(VkDevice device, const VkDescriptorSetBindingReferenceVALVE* pBindingReference, VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDescriptorSetLayoutHostMappingInfoVALVE(VkDevice device, const VkDescriptorSetBindingReferenceVALVE* pBindingReference, VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDescriptorSetHostMappingVALVE(VkDevice device, VkDescriptorSet descriptorSet, void** ppData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDescriptorSetHostMappingVALVE(VkDevice device, VkDescriptorSet descriptorSet, void** ppData, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDescriptorSetHostMappingVALVE(VkDevice device, VkDescriptorSet descriptorSet, void** ppData, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCopyMemoryIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, uint32_t copyCount, uint32_t stride, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCopyMemoryIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, uint32_t copyCount, uint32_t stride, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCopyMemoryIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, uint32_t copyCount, uint32_t stride, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCopyMemoryToImageIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, uint32_t copyCount, uint32_t stride, VkImage dstImage, VkImageLayout dstImageLayout, const VkImageSubresourceLayers* pImageSubresources, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCopyMemoryToImageIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, uint32_t copyCount, uint32_t stride, VkImage dstImage, VkImageLayout dstImageLayout, const VkImageSubresourceLayers* pImageSubresources, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCopyMemoryToImageIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, uint32_t copyCount, uint32_t stride, VkImage dstImage, VkImageLayout dstImageLayout, const VkImageSubresourceLayers* pImageSubresources, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDecompressMemoryNV(VkCommandBuffer commandBuffer, uint32_t decompressRegionCount, const VkDecompressMemoryRegionNV* pDecompressMemoryRegions, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDecompressMemoryNV(VkCommandBuffer commandBuffer, uint32_t decompressRegionCount, const VkDecompressMemoryRegionNV* pDecompressMemoryRegions, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDecompressMemoryNV(VkCommandBuffer commandBuffer, uint32_t decompressRegionCount, const VkDecompressMemoryRegionNV* pDecompressMemoryRegions, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDecompressMemoryIndirectCountNV(VkCommandBuffer commandBuffer, VkDeviceAddress indirectCommandsAddress, VkDeviceAddress indirectCommandsCountAddress, uint32_t stride, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDecompressMemoryIndirectCountNV(VkCommandBuffer commandBuffer, VkDeviceAddress indirectCommandsAddress, VkDeviceAddress indirectCommandsCountAddress, uint32_t stride, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDecompressMemoryIndirectCountNV(VkCommandBuffer commandBuffer, VkDeviceAddress indirectCommandsAddress, VkDeviceAddress indirectCommandsCountAddress, uint32_t stride, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPipelineIndirectMemoryRequirementsNV(VkDevice device, const VkComputePipelineCreateInfo* pCreateInfo, VkMemoryRequirements2* pMemoryRequirements, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPipelineIndirectMemoryRequirementsNV(VkDevice device, const VkComputePipelineCreateInfo* pCreateInfo, VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPipelineIndirectMemoryRequirementsNV(VkDevice device, const VkComputePipelineCreateInfo* pCreateInfo, VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdUpdatePipelineIndirectBufferNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdUpdatePipelineIndirectBufferNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdUpdatePipelineIndirectBufferNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPipelineIndirectDeviceAddressNV(VkDevice device, const VkPipelineIndirectDeviceAddressInfoNV* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPipelineIndirectDeviceAddressNV(VkDevice device, const VkPipelineIndirectDeviceAddressInfoNV* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPipelineIndirectDeviceAddressNV(VkDevice device, const VkPipelineIndirectDeviceAddressInfoNV* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDepthClampEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClampEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDepthClampEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClampEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDepthClampEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClampEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetPolygonModeEXT(VkCommandBuffer commandBuffer, VkPolygonMode polygonMode, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetPolygonModeEXT(VkCommandBuffer commandBuffer, VkPolygonMode polygonMode, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetPolygonModeEXT(VkCommandBuffer commandBuffer, VkPolygonMode polygonMode, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetRasterizationSamplesEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits rasterizationSamples, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetRasterizationSamplesEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits rasterizationSamples, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetRasterizationSamplesEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits rasterizationSamples, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetSampleMaskEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits samples, const VkSampleMask* pSampleMask, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetSampleMaskEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits samples, const VkSampleMask* pSampleMask, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetSampleMaskEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits samples, const VkSampleMask* pSampleMask, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetAlphaToCoverageEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToCoverageEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetAlphaToCoverageEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToCoverageEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetAlphaToCoverageEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToCoverageEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetAlphaToOneEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToOneEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetAlphaToOneEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToOneEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetAlphaToOneEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToOneEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetLogicOpEnableEXT(VkCommandBuffer commandBuffer, VkBool32 logicOpEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetLogicOpEnableEXT(VkCommandBuffer commandBuffer, VkBool32 logicOpEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetLogicOpEnableEXT(VkCommandBuffer commandBuffer, VkBool32 logicOpEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetColorBlendEnableEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkBool32* pColorBlendEnables, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetColorBlendEnableEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkBool32* pColorBlendEnables, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetColorBlendEnableEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkBool32* pColorBlendEnables, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetColorBlendEquationEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorBlendEquationEXT* pColorBlendEquations, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetColorBlendEquationEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorBlendEquationEXT* pColorBlendEquations, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetColorBlendEquationEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorBlendEquationEXT* pColorBlendEquations, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetColorWriteMaskEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorComponentFlags* pColorWriteMasks, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetColorWriteMaskEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorComponentFlags* pColorWriteMasks, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetColorWriteMaskEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorComponentFlags* pColorWriteMasks, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetTessellationDomainOriginEXT(VkCommandBuffer commandBuffer, VkTessellationDomainOrigin domainOrigin, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetTessellationDomainOriginEXT(VkCommandBuffer commandBuffer, VkTessellationDomainOrigin domainOrigin, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetTessellationDomainOriginEXT(VkCommandBuffer commandBuffer, VkTessellationDomainOrigin domainOrigin, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetRasterizationStreamEXT(VkCommandBuffer commandBuffer, uint32_t rasterizationStream, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetRasterizationStreamEXT(VkCommandBuffer commandBuffer, uint32_t rasterizationStream, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetRasterizationStreamEXT(VkCommandBuffer commandBuffer, uint32_t rasterizationStream, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetConservativeRasterizationModeEXT(VkCommandBuffer commandBuffer, VkConservativeRasterizationModeEXT conservativeRasterizationMode, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetConservativeRasterizationModeEXT(VkCommandBuffer commandBuffer, VkConservativeRasterizationModeEXT conservativeRasterizationMode, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetConservativeRasterizationModeEXT(VkCommandBuffer commandBuffer, VkConservativeRasterizationModeEXT conservativeRasterizationMode, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetExtraPrimitiveOverestimationSizeEXT(VkCommandBuffer commandBuffer, float extraPrimitiveOverestimationSize, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetExtraPrimitiveOverestimationSizeEXT(VkCommandBuffer commandBuffer, float extraPrimitiveOverestimationSize, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetExtraPrimitiveOverestimationSizeEXT(VkCommandBuffer commandBuffer, float extraPrimitiveOverestimationSize, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDepthClipEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClipEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDepthClipEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClipEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDepthClipEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClipEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetSampleLocationsEnableEXT(VkCommandBuffer commandBuffer, VkBool32 sampleLocationsEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetSampleLocationsEnableEXT(VkCommandBuffer commandBuffer, VkBool32 sampleLocationsEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetSampleLocationsEnableEXT(VkCommandBuffer commandBuffer, VkBool32 sampleLocationsEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetColorBlendAdvancedEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorBlendAdvancedEXT* pColorBlendAdvanced, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetColorBlendAdvancedEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorBlendAdvancedEXT* pColorBlendAdvanced, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetColorBlendAdvancedEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorBlendAdvancedEXT* pColorBlendAdvanced, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetProvokingVertexModeEXT(VkCommandBuffer commandBuffer, VkProvokingVertexModeEXT provokingVertexMode, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetProvokingVertexModeEXT(VkCommandBuffer commandBuffer, VkProvokingVertexModeEXT provokingVertexMode, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetProvokingVertexModeEXT(VkCommandBuffer commandBuffer, VkProvokingVertexModeEXT provokingVertexMode, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetLineRasterizationModeEXT(VkCommandBuffer commandBuffer, VkLineRasterizationModeEXT lineRasterizationMode, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetLineRasterizationModeEXT(VkCommandBuffer commandBuffer, VkLineRasterizationModeEXT lineRasterizationMode, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetLineRasterizationModeEXT(VkCommandBuffer commandBuffer, VkLineRasterizationModeEXT lineRasterizationMode, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetLineStippleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stippledLineEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetLineStippleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stippledLineEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetLineStippleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stippledLineEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDepthClipNegativeOneToOneEXT(VkCommandBuffer commandBuffer, VkBool32 negativeOneToOne, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDepthClipNegativeOneToOneEXT(VkCommandBuffer commandBuffer, VkBool32 negativeOneToOne, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDepthClipNegativeOneToOneEXT(VkCommandBuffer commandBuffer, VkBool32 negativeOneToOne, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetViewportWScalingEnableNV(VkCommandBuffer commandBuffer, VkBool32 viewportWScalingEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetViewportWScalingEnableNV(VkCommandBuffer commandBuffer, VkBool32 viewportWScalingEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetViewportWScalingEnableNV(VkCommandBuffer commandBuffer, VkBool32 viewportWScalingEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetViewportSwizzleNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportSwizzleNV* pViewportSwizzles, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetViewportSwizzleNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportSwizzleNV* pViewportSwizzles, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetViewportSwizzleNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewportSwizzleNV* pViewportSwizzles, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetCoverageToColorEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageToColorEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetCoverageToColorEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageToColorEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetCoverageToColorEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageToColorEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetCoverageToColorLocationNV(VkCommandBuffer commandBuffer, uint32_t coverageToColorLocation, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetCoverageToColorLocationNV(VkCommandBuffer commandBuffer, uint32_t coverageToColorLocation, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetCoverageToColorLocationNV(VkCommandBuffer commandBuffer, uint32_t coverageToColorLocation, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetCoverageModulationModeNV(VkCommandBuffer commandBuffer, VkCoverageModulationModeNV coverageModulationMode, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetCoverageModulationModeNV(VkCommandBuffer commandBuffer, VkCoverageModulationModeNV coverageModulationMode, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetCoverageModulationModeNV(VkCommandBuffer commandBuffer, VkCoverageModulationModeNV coverageModulationMode, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetCoverageModulationTableEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageModulationTableEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetCoverageModulationTableEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageModulationTableEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetCoverageModulationTableEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageModulationTableEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetCoverageModulationTableNV(VkCommandBuffer commandBuffer, uint32_t coverageModulationTableCount, const float* pCoverageModulationTable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetCoverageModulationTableNV(VkCommandBuffer commandBuffer, uint32_t coverageModulationTableCount, const float* pCoverageModulationTable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetCoverageModulationTableNV(VkCommandBuffer commandBuffer, uint32_t coverageModulationTableCount, const float* pCoverageModulationTable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetShadingRateImageEnableNV(VkCommandBuffer commandBuffer, VkBool32 shadingRateImageEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetShadingRateImageEnableNV(VkCommandBuffer commandBuffer, VkBool32 shadingRateImageEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetShadingRateImageEnableNV(VkCommandBuffer commandBuffer, VkBool32 shadingRateImageEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetRepresentativeFragmentTestEnableNV(VkCommandBuffer commandBuffer, VkBool32 representativeFragmentTestEnable, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetRepresentativeFragmentTestEnableNV(VkCommandBuffer commandBuffer, VkBool32 representativeFragmentTestEnable, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetRepresentativeFragmentTestEnableNV(VkCommandBuffer commandBuffer, VkBool32 representativeFragmentTestEnable, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetCoverageReductionModeNV(VkCommandBuffer commandBuffer, VkCoverageReductionModeNV coverageReductionMode, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetCoverageReductionModeNV(VkCommandBuffer commandBuffer, VkCoverageReductionModeNV coverageReductionMode, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetCoverageReductionModeNV(VkCommandBuffer commandBuffer, VkCoverageReductionModeNV coverageReductionMode, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetShaderModuleIdentifierEXT(VkDevice device, VkShaderModule shaderModule, VkShaderModuleIdentifierEXT* pIdentifier, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetShaderModuleIdentifierEXT(VkDevice device, VkShaderModule shaderModule, VkShaderModuleIdentifierEXT* pIdentifier, const RecordObject& record_obj) {} - virtual void PostCallRecordGetShaderModuleIdentifierEXT(VkDevice device, VkShaderModule shaderModule, VkShaderModuleIdentifierEXT* pIdentifier, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetShaderModuleCreateInfoIdentifierEXT(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, VkShaderModuleIdentifierEXT* pIdentifier, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetShaderModuleCreateInfoIdentifierEXT(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, VkShaderModuleIdentifierEXT* pIdentifier, const RecordObject& record_obj) {} - virtual void PostCallRecordGetShaderModuleCreateInfoIdentifierEXT(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, VkShaderModuleIdentifierEXT* pIdentifier, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceOpticalFlowImageFormatsNV(VkPhysicalDevice physicalDevice, const VkOpticalFlowImageFormatInfoNV* pOpticalFlowImageFormatInfo, uint32_t* pFormatCount, VkOpticalFlowImageFormatPropertiesNV* pImageFormatProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceOpticalFlowImageFormatsNV(VkPhysicalDevice physicalDevice, const VkOpticalFlowImageFormatInfoNV* pOpticalFlowImageFormatInfo, uint32_t* pFormatCount, VkOpticalFlowImageFormatPropertiesNV* pImageFormatProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceOpticalFlowImageFormatsNV(VkPhysicalDevice physicalDevice, const VkOpticalFlowImageFormatInfoNV* pOpticalFlowImageFormatInfo, uint32_t* pFormatCount, VkOpticalFlowImageFormatPropertiesNV* pImageFormatProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateOpticalFlowSessionNV(VkDevice device, const VkOpticalFlowSessionCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkOpticalFlowSessionNV* pSession, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateOpticalFlowSessionNV(VkDevice device, const VkOpticalFlowSessionCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkOpticalFlowSessionNV* pSession, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateOpticalFlowSessionNV(VkDevice device, const VkOpticalFlowSessionCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkOpticalFlowSessionNV* pSession, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyOpticalFlowSessionNV(VkDevice device, VkOpticalFlowSessionNV session, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyOpticalFlowSessionNV(VkDevice device, VkOpticalFlowSessionNV session, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyOpticalFlowSessionNV(VkDevice device, VkOpticalFlowSessionNV session, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateBindOpticalFlowSessionImageNV(VkDevice device, VkOpticalFlowSessionNV session, VkOpticalFlowSessionBindingPointNV bindingPoint, VkImageView view, VkImageLayout layout, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordBindOpticalFlowSessionImageNV(VkDevice device, VkOpticalFlowSessionNV session, VkOpticalFlowSessionBindingPointNV bindingPoint, VkImageView view, VkImageLayout layout, const RecordObject& record_obj) {} - virtual void PostCallRecordBindOpticalFlowSessionImageNV(VkDevice device, VkOpticalFlowSessionNV session, VkOpticalFlowSessionBindingPointNV bindingPoint, VkImageView view, VkImageLayout layout, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdOpticalFlowExecuteNV(VkCommandBuffer commandBuffer, VkOpticalFlowSessionNV session, const VkOpticalFlowExecuteInfoNV* pExecuteInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdOpticalFlowExecuteNV(VkCommandBuffer commandBuffer, VkOpticalFlowSessionNV session, const VkOpticalFlowExecuteInfoNV* pExecuteInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdOpticalFlowExecuteNV(VkCommandBuffer commandBuffer, VkOpticalFlowSessionNV session, const VkOpticalFlowExecuteInfoNV* pExecuteInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateAntiLagUpdateAMD(VkDevice device, const VkAntiLagDataAMD* pData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordAntiLagUpdateAMD(VkDevice device, const VkAntiLagDataAMD* pData, const RecordObject& record_obj) {} - virtual void PostCallRecordAntiLagUpdateAMD(VkDevice device, const VkAntiLagDataAMD* pData, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateShadersEXT(VkDevice device, uint32_t createInfoCount, const VkShaderCreateInfoEXT* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkShaderEXT* pShaders, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateShadersEXT(VkDevice device, uint32_t createInfoCount, const VkShaderCreateInfoEXT* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkShaderEXT* pShaders, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateShadersEXT(VkDevice device, uint32_t createInfoCount, const VkShaderCreateInfoEXT* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkShaderEXT* pShaders, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyShaderEXT(VkDevice device, VkShaderEXT shader, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyShaderEXT(VkDevice device, VkShaderEXT shader, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyShaderEXT(VkDevice device, VkShaderEXT shader, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetShaderBinaryDataEXT(VkDevice device, VkShaderEXT shader, size_t* pDataSize, void* pData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetShaderBinaryDataEXT(VkDevice device, VkShaderEXT shader, size_t* pDataSize, void* pData, const RecordObject& record_obj) {} - virtual void PostCallRecordGetShaderBinaryDataEXT(VkDevice device, VkShaderEXT shader, size_t* pDataSize, void* pData, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBindShadersEXT(VkCommandBuffer commandBuffer, uint32_t stageCount, const VkShaderStageFlagBits* pStages, const VkShaderEXT* pShaders, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBindShadersEXT(VkCommandBuffer commandBuffer, uint32_t stageCount, const VkShaderStageFlagBits* pStages, const VkShaderEXT* pShaders, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBindShadersEXT(VkCommandBuffer commandBuffer, uint32_t stageCount, const VkShaderStageFlagBits* pStages, const VkShaderEXT* pShaders, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetDepthClampRangeEXT(VkCommandBuffer commandBuffer, VkDepthClampModeEXT depthClampMode, const VkDepthClampRangeEXT* pDepthClampRange, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetDepthClampRangeEXT(VkCommandBuffer commandBuffer, VkDepthClampModeEXT depthClampMode, const VkDepthClampRangeEXT* pDepthClampRange, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetDepthClampRangeEXT(VkCommandBuffer commandBuffer, VkDepthClampModeEXT depthClampMode, const VkDepthClampRangeEXT* pDepthClampRange, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetFramebufferTilePropertiesQCOM(VkDevice device, VkFramebuffer framebuffer, uint32_t* pPropertiesCount, VkTilePropertiesQCOM* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetFramebufferTilePropertiesQCOM(VkDevice device, VkFramebuffer framebuffer, uint32_t* pPropertiesCount, VkTilePropertiesQCOM* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetFramebufferTilePropertiesQCOM(VkDevice device, VkFramebuffer framebuffer, uint32_t* pPropertiesCount, VkTilePropertiesQCOM* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDynamicRenderingTilePropertiesQCOM(VkDevice device, const VkRenderingInfo* pRenderingInfo, VkTilePropertiesQCOM* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDynamicRenderingTilePropertiesQCOM(VkDevice device, const VkRenderingInfo* pRenderingInfo, VkTilePropertiesQCOM* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDynamicRenderingTilePropertiesQCOM(VkDevice device, const VkRenderingInfo* pRenderingInfo, VkTilePropertiesQCOM* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateSetLatencySleepModeNV(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepModeInfoNV* pSleepModeInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordSetLatencySleepModeNV(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepModeInfoNV* pSleepModeInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordSetLatencySleepModeNV(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepModeInfoNV* pSleepModeInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateLatencySleepNV(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepInfoNV* pSleepInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordLatencySleepNV(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepInfoNV* pSleepInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordLatencySleepNV(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepInfoNV* pSleepInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateSetLatencyMarkerNV(VkDevice device, VkSwapchainKHR swapchain, const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordSetLatencyMarkerNV(VkDevice device, VkSwapchainKHR swapchain, const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordSetLatencyMarkerNV(VkDevice device, VkSwapchainKHR swapchain, const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetLatencyTimingsNV(VkDevice device, VkSwapchainKHR swapchain, VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetLatencyTimingsNV(VkDevice device, VkSwapchainKHR swapchain, VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordGetLatencyTimingsNV(VkDevice device, VkSwapchainKHR swapchain, VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateQueueNotifyOutOfBandNV(VkQueue queue, const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordQueueNotifyOutOfBandNV(VkQueue queue, const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordQueueNotifyOutOfBandNV(VkQueue queue, const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetAttachmentFeedbackLoopEnableEXT(VkCommandBuffer commandBuffer, VkImageAspectFlags aspectMask, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetAttachmentFeedbackLoopEnableEXT(VkCommandBuffer commandBuffer, VkImageAspectFlags aspectMask, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetAttachmentFeedbackLoopEnableEXT(VkCommandBuffer commandBuffer, VkImageAspectFlags aspectMask, const RecordObject& record_obj) {} -#ifdef VK_USE_PLATFORM_SCREEN_QNX - virtual bool PreCallValidateGetScreenBufferPropertiesQNX(VkDevice device, const struct _screen_buffer* buffer, VkScreenBufferPropertiesQNX* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetScreenBufferPropertiesQNX(VkDevice device, const struct _screen_buffer* buffer, VkScreenBufferPropertiesQNX* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetScreenBufferPropertiesQNX(VkDevice device, const struct _screen_buffer* buffer, VkScreenBufferPropertiesQNX* pProperties, const RecordObject& record_obj) {} -#endif // VK_USE_PLATFORM_SCREEN_QNX - virtual bool PreCallValidateGetGeneratedCommandsMemoryRequirementsEXT(VkDevice device, const VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfo, VkMemoryRequirements2* pMemoryRequirements, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetGeneratedCommandsMemoryRequirementsEXT(VkDevice device, const VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfo, VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} - virtual void PostCallRecordGetGeneratedCommandsMemoryRequirementsEXT(VkDevice device, const VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfo, VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdPreprocessGeneratedCommandsEXT(VkCommandBuffer commandBuffer, const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, VkCommandBuffer stateCommandBuffer, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdPreprocessGeneratedCommandsEXT(VkCommandBuffer commandBuffer, const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, VkCommandBuffer stateCommandBuffer, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdPreprocessGeneratedCommandsEXT(VkCommandBuffer commandBuffer, const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, VkCommandBuffer stateCommandBuffer, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdExecuteGeneratedCommandsEXT(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdExecuteGeneratedCommandsEXT(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdExecuteGeneratedCommandsEXT(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateIndirectCommandsLayoutEXT(VkDevice device, const VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutEXT* pIndirectCommandsLayout, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateIndirectCommandsLayoutEXT(VkDevice device, const VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutEXT* pIndirectCommandsLayout, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateIndirectCommandsLayoutEXT(VkDevice device, const VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutEXT* pIndirectCommandsLayout, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyIndirectCommandsLayoutEXT(VkDevice device, VkIndirectCommandsLayoutEXT indirectCommandsLayout, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyIndirectCommandsLayoutEXT(VkDevice device, VkIndirectCommandsLayoutEXT indirectCommandsLayout, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyIndirectCommandsLayoutEXT(VkDevice device, VkIndirectCommandsLayoutEXT indirectCommandsLayout, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateIndirectExecutionSetEXT(VkDevice device, const VkIndirectExecutionSetCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectExecutionSetEXT* pIndirectExecutionSet, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateIndirectExecutionSetEXT(VkDevice device, const VkIndirectExecutionSetCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectExecutionSetEXT* pIndirectExecutionSet, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateIndirectExecutionSetEXT(VkDevice device, const VkIndirectExecutionSetCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectExecutionSetEXT* pIndirectExecutionSet, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyIndirectExecutionSetEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyIndirectExecutionSetEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyIndirectExecutionSetEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateUpdateIndirectExecutionSetPipelineEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, uint32_t executionSetWriteCount, const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordUpdateIndirectExecutionSetPipelineEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, uint32_t executionSetWriteCount, const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites, const RecordObject& record_obj) {} - virtual void PostCallRecordUpdateIndirectExecutionSetPipelineEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, uint32_t executionSetWriteCount, const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites, const RecordObject& record_obj) {} - virtual bool PreCallValidateUpdateIndirectExecutionSetShaderEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, uint32_t executionSetWriteCount, const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordUpdateIndirectExecutionSetShaderEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, uint32_t executionSetWriteCount, const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites, const RecordObject& record_obj) {} - virtual void PostCallRecordUpdateIndirectExecutionSetShaderEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, uint32_t executionSetWriteCount, const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixFlexibleDimensionsPropertiesNV* pProperties, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixFlexibleDimensionsPropertiesNV* pProperties, const RecordObject& record_obj) {} - virtual void PostCallRecordGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixFlexibleDimensionsPropertiesNV* pProperties, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateAccelerationStructureKHR(VkDevice device, const VkAccelerationStructureCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkAccelerationStructureKHR* pAccelerationStructure, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateAccelerationStructureKHR(VkDevice device, const VkAccelerationStructureCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkAccelerationStructureKHR* pAccelerationStructure, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateAccelerationStructureKHR(VkDevice device, const VkAccelerationStructureCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkAccelerationStructureKHR* pAccelerationStructure, const RecordObject& record_obj) {} - virtual bool PreCallValidateDestroyAccelerationStructureKHR(VkDevice device, VkAccelerationStructureKHR accelerationStructure, const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordDestroyAccelerationStructureKHR(VkDevice device, VkAccelerationStructureKHR accelerationStructure, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual void PostCallRecordDestroyAccelerationStructureKHR(VkDevice device, VkAccelerationStructureKHR accelerationStructure, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBuildAccelerationStructuresKHR(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBuildAccelerationStructuresKHR(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBuildAccelerationStructuresKHR(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdBuildAccelerationStructuresIndirectKHR(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkDeviceAddress* pIndirectDeviceAddresses, const uint32_t* pIndirectStrides, const uint32_t* const* ppMaxPrimitiveCounts, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdBuildAccelerationStructuresIndirectKHR(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkDeviceAddress* pIndirectDeviceAddresses, const uint32_t* pIndirectStrides, const uint32_t* const* ppMaxPrimitiveCounts, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdBuildAccelerationStructuresIndirectKHR(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkDeviceAddress* pIndirectDeviceAddresses, const uint32_t* pIndirectStrides, const uint32_t* const* ppMaxPrimitiveCounts, const RecordObject& record_obj) {} - virtual bool PreCallValidateBuildAccelerationStructuresKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordBuildAccelerationStructuresKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos, const RecordObject& record_obj) {} - virtual void PostCallRecordBuildAccelerationStructuresKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos, const RecordObject& record_obj) {} - virtual bool PreCallValidateCopyAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyAccelerationStructureInfoKHR* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCopyAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyAccelerationStructureInfoKHR* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCopyAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyAccelerationStructureInfoKHR* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCopyAccelerationStructureToMemoryKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCopyAccelerationStructureToMemoryKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCopyAccelerationStructureToMemoryKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCopyMemoryToAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCopyMemoryToAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCopyMemoryToAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateWriteAccelerationStructuresPropertiesKHR(VkDevice device, uint32_t accelerationStructureCount, const VkAccelerationStructureKHR* pAccelerationStructures, VkQueryType queryType, size_t dataSize, void* pData, size_t stride, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordWriteAccelerationStructuresPropertiesKHR(VkDevice device, uint32_t accelerationStructureCount, const VkAccelerationStructureKHR* pAccelerationStructures, VkQueryType queryType, size_t dataSize, void* pData, size_t stride, const RecordObject& record_obj) {} - virtual void PostCallRecordWriteAccelerationStructuresPropertiesKHR(VkDevice device, uint32_t accelerationStructureCount, const VkAccelerationStructureKHR* pAccelerationStructures, VkQueryType queryType, size_t dataSize, void* pData, size_t stride, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCopyAccelerationStructureKHR(VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureInfoKHR* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCopyAccelerationStructureKHR(VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureInfoKHR* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCopyAccelerationStructureKHR(VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureInfoKHR* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCopyAccelerationStructureToMemoryKHR(VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCopyAccelerationStructureToMemoryKHR(VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCopyAccelerationStructureToMemoryKHR(VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdCopyMemoryToAccelerationStructureKHR(VkCommandBuffer commandBuffer, const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdCopyMemoryToAccelerationStructureKHR(VkCommandBuffer commandBuffer, const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdCopyMemoryToAccelerationStructureKHR(VkCommandBuffer commandBuffer, const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetAccelerationStructureDeviceAddressKHR(VkDevice device, const VkAccelerationStructureDeviceAddressInfoKHR* pInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetAccelerationStructureDeviceAddressKHR(VkDevice device, const VkAccelerationStructureDeviceAddressInfoKHR* pInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordGetAccelerationStructureDeviceAddressKHR(VkDevice device, const VkAccelerationStructureDeviceAddressInfoKHR* pInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdWriteAccelerationStructuresPropertiesKHR(VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, const VkAccelerationStructureKHR* pAccelerationStructures, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdWriteAccelerationStructuresPropertiesKHR(VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, const VkAccelerationStructureKHR* pAccelerationStructures, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdWriteAccelerationStructuresPropertiesKHR(VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, const VkAccelerationStructureKHR* pAccelerationStructures, VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetDeviceAccelerationStructureCompatibilityKHR(VkDevice device, const VkAccelerationStructureVersionInfoKHR* pVersionInfo, VkAccelerationStructureCompatibilityKHR* pCompatibility, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetDeviceAccelerationStructureCompatibilityKHR(VkDevice device, const VkAccelerationStructureVersionInfoKHR* pVersionInfo, VkAccelerationStructureCompatibilityKHR* pCompatibility, const RecordObject& record_obj) {} - virtual void PostCallRecordGetDeviceAccelerationStructureCompatibilityKHR(VkDevice device, const VkAccelerationStructureVersionInfoKHR* pVersionInfo, VkAccelerationStructureCompatibilityKHR* pCompatibility, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetAccelerationStructureBuildSizesKHR(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo, const uint32_t* pMaxPrimitiveCounts, VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetAccelerationStructureBuildSizesKHR(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo, const uint32_t* pMaxPrimitiveCounts, VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo, const RecordObject& record_obj) {} - virtual void PostCallRecordGetAccelerationStructureBuildSizesKHR(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo, const uint32_t* pMaxPrimitiveCounts, VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdTraceRaysKHR(VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, uint32_t width, uint32_t height, uint32_t depth, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdTraceRaysKHR(VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, uint32_t width, uint32_t height, uint32_t depth, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdTraceRaysKHR(VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, uint32_t width, uint32_t height, uint32_t depth, const RecordObject& record_obj) {} - virtual bool PreCallValidateCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj) {} - virtual void PostCallRecordCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetRayTracingCaptureReplayShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetRayTracingCaptureReplayShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData, const RecordObject& record_obj) {} - virtual void PostCallRecordGetRayTracingCaptureReplayShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, VkDeviceAddress indirectDeviceAddress, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, VkDeviceAddress indirectDeviceAddress, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, VkDeviceAddress indirectDeviceAddress, const RecordObject& record_obj) {} - virtual bool PreCallValidateGetRayTracingShaderGroupStackSizeKHR(VkDevice device, VkPipeline pipeline, uint32_t group, VkShaderGroupShaderKHR groupShader, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordGetRayTracingShaderGroupStackSizeKHR(VkDevice device, VkPipeline pipeline, uint32_t group, VkShaderGroupShaderKHR groupShader, const RecordObject& record_obj) {} - virtual void PostCallRecordGetRayTracingShaderGroupStackSizeKHR(VkDevice device, VkPipeline pipeline, uint32_t group, VkShaderGroupShaderKHR groupShader, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdSetRayTracingPipelineStackSizeKHR(VkCommandBuffer commandBuffer, uint32_t pipelineStackSize, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdSetRayTracingPipelineStackSizeKHR(VkCommandBuffer commandBuffer, uint32_t pipelineStackSize, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdSetRayTracingPipelineStackSizeKHR(VkCommandBuffer commandBuffer, uint32_t pipelineStackSize, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDrawMeshTasksEXT(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDrawMeshTasksEXT(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDrawMeshTasksEXT(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDrawMeshTasksIndirectEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDrawMeshTasksIndirectEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDrawMeshTasksIndirectEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual bool PreCallValidateCmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const ErrorObject& error_obj) const { return false; } - virtual void PreCallRecordCmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) {} - virtual void PostCallRecordCmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) {} - - virtual void CoreLayerDestroyValidationCacheEXT(VkDevice device, VkValidationCacheEXT validationCache, const VkAllocationCallbacks* pAllocator) {} - virtual VkResult CoreLayerMergeValidationCachesEXT(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, const VkValidationCacheEXT* pSrcCaches) { return VK_SUCCESS; } - virtual VkResult CoreLayerGetValidationCacheDataEXT(VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, void* pData) { return VK_SUCCESS; } - - // Allow additional state parameter for CreateGraphicsPipelines - virtual bool PreCallValidateCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const ErrorObject& error_obj, PipelineStates& pipeline_states, chassis::CreateGraphicsPipelines& chassis_state) const { - return PreCallValidateCreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, error_obj); - } - virtual void PreCallRecordCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj, PipelineStates& pipeline_states, chassis::CreateGraphicsPipelines& chassis_state) { - PreCallRecordCreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, record_obj); - } - virtual void PostCallRecordCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj, PipelineStates& pipeline_states, chassis::CreateGraphicsPipelines& chassis_state) { - PostCallRecordCreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, record_obj); - } - - // Allow additional state parameter for CreateComputePipelines - virtual bool PreCallValidateCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const ErrorObject& error_obj, PipelineStates& pipeline_states, chassis::CreateComputePipelines& chassis_state) const { - return PreCallValidateCreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, error_obj); - } - virtual void PreCallRecordCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj, PipelineStates& pipeline_states, chassis::CreateComputePipelines& chassis_state) { - PreCallRecordCreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, record_obj); - } - virtual void PostCallRecordCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj, PipelineStates& pipeline_states, chassis::CreateComputePipelines& chassis_state) { - PostCallRecordCreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, record_obj); - } - - // Allow additional state parameter for CreateRayTracingPipelinesNV - virtual bool PreCallValidateCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoNV* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const ErrorObject& error_obj, PipelineStates& pipeline_states, chassis::CreateRayTracingPipelinesNV& chassis_state) const { - return PreCallValidateCreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, error_obj); - } - virtual void PreCallRecordCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoNV* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj, PipelineStates& pipeline_states, chassis::CreateRayTracingPipelinesNV& chassis_state) { - PreCallRecordCreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, record_obj); - } - virtual void PostCallRecordCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoNV* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj, PipelineStates& pipeline_states, chassis::CreateRayTracingPipelinesNV& chassis_state) { - PostCallRecordCreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, record_obj); - } - - // Allow additional state parameter for CreateRayTracingPipelinesKHR - virtual bool PreCallValidateCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const ErrorObject& error_obj, PipelineStates& pipeline_states, chassis::CreateRayTracingPipelinesKHR& chassis_state) const { - return PreCallValidateCreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, error_obj); - } - virtual void PreCallRecordCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj, PipelineStates& pipeline_states, chassis::CreateRayTracingPipelinesKHR& chassis_state) { - PreCallRecordCreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, record_obj); - } - virtual void PostCallRecordCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj, PipelineStates& pipeline_states, std::shared_ptr chassis_state) { - PostCallRecordCreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, record_obj); - } - - // Allow modification of a down-chain parameter for CreatePipelineLayout - virtual void PreCallRecordCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout, const RecordObject& record_obj, chassis::CreatePipelineLayout& chassis_state) { - PreCallRecordCreatePipelineLayout(device, pCreateInfo, pAllocator, pPipelineLayout, record_obj); - } - - // Enable the CreateShaderModule/CreateShaderEXT API to take an extra argument for state preservation and paramter modification - virtual void PreCallRecordCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule, const RecordObject& record_obj, chassis::CreateShaderModule& chassis_state) { - PreCallRecordCreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule, record_obj); - } - virtual void PostCallRecordCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule, const RecordObject& record_obj, chassis::CreateShaderModule& chassis_state) { - PostCallRecordCreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule, record_obj); - } - virtual void PreCallRecordCreateShadersEXT(VkDevice device, uint32_t createInfoCount, const VkShaderCreateInfoEXT* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkShaderEXT* pShaders, const RecordObject& record_obj, chassis::ShaderObject& chassis_state) { - PreCallRecordCreateShadersEXT(device, createInfoCount, pCreateInfos, pAllocator, pShaders, record_obj); - } - virtual void PostCallRecordCreateShadersEXT(VkDevice device, uint32_t createInfoCount, const VkShaderCreateInfoEXT* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkShaderEXT* pShaders, const RecordObject& record_obj, chassis::ShaderObject& chassis_state) { - PostCallRecordCreateShadersEXT(device, createInfoCount, pCreateInfos, pAllocator, pShaders, record_obj); - } - - // Allow AllocateDescriptorSets to use some local stack storage for performance purposes - virtual bool PreCallValidateAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, VkDescriptorSet* pDescriptorSets, const ErrorObject& error_obj, vvl::AllocateDescriptorSetsData& ads_state) const { - return PreCallValidateAllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets, error_obj); - } - virtual void PostCallRecordAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, VkDescriptorSet* pDescriptorSets, const RecordObject& record_obj, vvl::AllocateDescriptorSetsData& ads_state) { - PostCallRecordAllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets, record_obj); - } - - // Allow modification of a down-chain parameter for CreateBuffer - virtual void PreCallRecordCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer, const RecordObject& record_obj, chassis::CreateBuffer& chassis_state) { - PreCallRecordCreateBuffer(device, pCreateInfo, pAllocator, pBuffer, record_obj); - } - - // Modify a parameter to CreateDevice - virtual void PreCallRecordCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDevice* pDevice, const RecordObject& record_obj, vku::safe_VkDeviceCreateInfo *modified_create_info) { - PreCallRecordCreateDevice(physicalDevice, pCreateInfo, pAllocator, pDevice, record_obj); - } -}; -// clang-format on -extern small_unordered_map layer_data_map; -// NOLINTEND diff --git a/layers/vulkan/generated/dispatch_functions.h b/layers/vulkan/generated/dispatch_functions.h new file mode 100644 index 00000000000..59a260bd0bc --- /dev/null +++ b/layers/vulkan/generated/dispatch_functions.h @@ -0,0 +1,4301 @@ +// *** THIS FILE IS GENERATED - DO NOT EDIT *** +// See dispatch_object_generator.py for modifications + +/*************************************************************************** + * + * Copyright (c) 2015-2024 The Khronos Group Inc. + * Copyright (c) 2015-2024 Valve Corporation + * Copyright (c) 2015-2024 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. + ****************************************************************************/ + +// NOLINTBEGIN + +// This file contains contains convience functions for non-chassis code that needs to +// make vulkan calls. + +#include "chassis/dispatch_object.h" + +static inline VkResult DispatchCreateInstance(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkInstance* pInstance) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(pCreateInfo), layer_data_map); + return dispatch->CreateInstance(pCreateInfo, pAllocator, pInstance); +} + +static inline void DispatchDestroyInstance(VkInstance instance, const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + dispatch->DestroyInstance(instance, pAllocator); +} + +static inline VkResult DispatchEnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount, + VkPhysicalDevice* pPhysicalDevices) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + return dispatch->EnumeratePhysicalDevices(instance, pPhysicalDeviceCount, pPhysicalDevices); +} + +static inline void DispatchGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceFeatures(physicalDevice, pFeatures); +} + +static inline void DispatchGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, + VkFormatProperties* pFormatProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceFormatProperties(physicalDevice, format, pFormatProperties); +} + +static inline VkResult DispatchGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, + VkImageType type, VkImageTiling tiling, + VkImageUsageFlags usage, VkImageCreateFlags flags, + VkImageFormatProperties* pImageFormatProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, + pImageFormatProperties); +} + +static inline void DispatchGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceProperties(physicalDevice, pProperties); +} + +static inline void DispatchGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, + uint32_t* pQueueFamilyPropertyCount, + VkQueueFamilyProperties* pQueueFamilyProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); +} + +static inline void DispatchGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceMemoryProperties* pMemoryProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceMemoryProperties(physicalDevice, pMemoryProperties); +} + +static inline PFN_vkVoidFunction DispatchGetInstanceProcAddr(VkInstance instance, const char* pName) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + return dispatch->GetInstanceProcAddr(instance, pName); +} + +static inline PFN_vkVoidFunction DispatchGetDeviceProcAddr(VkDevice device, const char* pName) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetDeviceProcAddr(device, pName); +} + +static inline VkResult DispatchCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDevice* pDevice) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->CreateDevice(physicalDevice, pCreateInfo, pAllocator, pDevice); +} + +static inline void DispatchDestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyDevice(device, pAllocator); +} + +static inline VkResult DispatchEnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pPropertyCount, + VkExtensionProperties* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(pLayerName), layer_data_map); + return dispatch->EnumerateInstanceExtensionProperties(pLayerName, pPropertyCount, pProperties); +} + +static inline VkResult DispatchEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, + uint32_t* pPropertyCount, VkExtensionProperties* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->EnumerateDeviceExtensionProperties(physicalDevice, pLayerName, pPropertyCount, pProperties); +} + +static inline VkResult DispatchEnumerateInstanceLayerProperties(uint32_t* pPropertyCount, VkLayerProperties* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(pPropertyCount), layer_data_map); + return dispatch->EnumerateInstanceLayerProperties(pPropertyCount, pProperties); +} + +static inline VkResult DispatchEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkLayerProperties* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->EnumerateDeviceLayerProperties(physicalDevice, pPropertyCount, pProperties); +} + +static inline void DispatchGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetDeviceQueue(device, queueFamilyIndex, queueIndex, pQueue); +} + +static inline VkResult DispatchQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + return dispatch->QueueSubmit(queue, submitCount, pSubmits, fence); +} + +static inline VkResult DispatchQueueWaitIdle(VkQueue queue) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + return dispatch->QueueWaitIdle(queue); +} + +static inline VkResult DispatchDeviceWaitIdle(VkDevice device) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->DeviceWaitIdle(device); +} + +static inline VkResult DispatchAllocateMemory(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, + const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->AllocateMemory(device, pAllocateInfo, pAllocator, pMemory); +} + +static inline void DispatchFreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->FreeMemory(device, memory, pAllocator); +} + +static inline VkResult DispatchMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, + VkMemoryMapFlags flags, void** ppData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->MapMemory(device, memory, offset, size, flags, ppData); +} + +static inline void DispatchUnmapMemory(VkDevice device, VkDeviceMemory memory) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->UnmapMemory(device, memory); +} + +static inline VkResult DispatchFlushMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, + const VkMappedMemoryRange* pMemoryRanges) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->FlushMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges); +} + +static inline VkResult DispatchInvalidateMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, + const VkMappedMemoryRange* pMemoryRanges) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->InvalidateMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges); +} + +static inline void DispatchGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, + VkDeviceSize* pCommittedMemoryInBytes) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetDeviceMemoryCommitment(device, memory, pCommittedMemoryInBytes); +} + +static inline VkResult DispatchBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, + VkDeviceSize memoryOffset) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->BindBufferMemory(device, buffer, memory, memoryOffset); +} + +static inline VkResult DispatchBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->BindImageMemory(device, image, memory, memoryOffset); +} + +static inline void DispatchGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, + VkMemoryRequirements* pMemoryRequirements) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetBufferMemoryRequirements(device, buffer, pMemoryRequirements); +} + +static inline void DispatchGetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetImageMemoryRequirements(device, image, pMemoryRequirements); +} + +static inline void DispatchGetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements* pSparseMemoryRequirements) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetImageSparseMemoryRequirements(device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements); +} + +static inline void DispatchGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, + VkImageType type, VkSampleCountFlagBits samples, + VkImageUsageFlags usage, VkImageTiling tiling, + uint32_t* pPropertyCount, + VkSparseImageFormatProperties* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceSparseImageFormatProperties(physicalDevice, format, type, samples, usage, tiling, pPropertyCount, + pProperties); +} + +static inline VkResult DispatchQueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, + VkFence fence) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + return dispatch->QueueBindSparse(queue, bindInfoCount, pBindInfo, fence); +} + +static inline VkResult DispatchCreateFence(VkDevice device, const VkFenceCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkFence* pFence) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateFence(device, pCreateInfo, pAllocator, pFence); +} + +static inline void DispatchDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyFence(device, fence, pAllocator); +} + +static inline VkResult DispatchResetFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->ResetFences(device, fenceCount, pFences); +} + +static inline VkResult DispatchGetFenceStatus(VkDevice device, VkFence fence) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetFenceStatus(device, fence); +} + +static inline VkResult DispatchWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, + uint64_t timeout) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->WaitForFences(device, fenceCount, pFences, waitAll, timeout); +} + +static inline VkResult DispatchCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateSemaphore(device, pCreateInfo, pAllocator, pSemaphore); +} + +static inline void DispatchDestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroySemaphore(device, semaphore, pAllocator); +} + +static inline VkResult DispatchCreateEvent(VkDevice device, const VkEventCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkEvent* pEvent) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateEvent(device, pCreateInfo, pAllocator, pEvent); +} + +static inline void DispatchDestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyEvent(device, event, pAllocator); +} + +static inline VkResult DispatchGetEventStatus(VkDevice device, VkEvent event) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetEventStatus(device, event); +} + +static inline VkResult DispatchSetEvent(VkDevice device, VkEvent event) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->SetEvent(device, event); +} + +static inline VkResult DispatchResetEvent(VkDevice device, VkEvent event) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->ResetEvent(device, event); +} + +static inline VkResult DispatchCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateQueryPool(device, pCreateInfo, pAllocator, pQueryPool); +} + +static inline void DispatchDestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyQueryPool(device, queryPool, pAllocator); +} + +static inline VkResult DispatchGetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, + size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetQueryPoolResults(device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags); +} + +static inline VkResult DispatchCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateBuffer(device, pCreateInfo, pAllocator, pBuffer); +} + +static inline void DispatchDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyBuffer(device, buffer, pAllocator); +} + +static inline VkResult DispatchCreateBufferView(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkBufferView* pView) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateBufferView(device, pCreateInfo, pAllocator, pView); +} + +static inline void DispatchDestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyBufferView(device, bufferView, pAllocator); +} + +static inline VkResult DispatchCreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkImage* pImage) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateImage(device, pCreateInfo, pAllocator, pImage); +} + +static inline void DispatchDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyImage(device, image, pAllocator); +} + +static inline void DispatchGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, + VkSubresourceLayout* pLayout) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetImageSubresourceLayout(device, image, pSubresource, pLayout); +} + +static inline VkResult DispatchCreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkImageView* pView) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateImageView(device, pCreateInfo, pAllocator, pView); +} + +static inline void DispatchDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyImageView(device, imageView, pAllocator); +} + +static inline VkResult DispatchCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule); +} + +static inline void DispatchDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyShaderModule(device, shaderModule, pAllocator); +} + +static inline VkResult DispatchCreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreatePipelineCache(device, pCreateInfo, pAllocator, pPipelineCache); +} + +static inline void DispatchDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyPipelineCache(device, pipelineCache, pAllocator); +} + +static inline VkResult DispatchGetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, + void* pData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetPipelineCacheData(device, pipelineCache, pDataSize, pData); +} + +static inline VkResult DispatchMergePipelineCaches(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, + const VkPipelineCache* pSrcCaches) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->MergePipelineCaches(device, dstCache, srcCacheCount, pSrcCaches); +} + +static inline VkResult DispatchCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkGraphicsPipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); +} + +static inline VkResult DispatchCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkComputePipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); +} + +static inline void DispatchDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyPipeline(device, pipeline, pAllocator); +} + +static inline VkResult DispatchCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreatePipelineLayout(device, pCreateInfo, pAllocator, pPipelineLayout); +} + +static inline void DispatchDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyPipelineLayout(device, pipelineLayout, pAllocator); +} + +static inline VkResult DispatchCreateSampler(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSampler* pSampler) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateSampler(device, pCreateInfo, pAllocator, pSampler); +} + +static inline void DispatchDestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroySampler(device, sampler, pAllocator); +} + +static inline VkResult DispatchCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDescriptorSetLayout* pSetLayout) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateDescriptorSetLayout(device, pCreateInfo, pAllocator, pSetLayout); +} + +static inline void DispatchDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyDescriptorSetLayout(device, descriptorSetLayout, pAllocator); +} + +static inline VkResult DispatchCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateDescriptorPool(device, pCreateInfo, pAllocator, pDescriptorPool); +} + +static inline void DispatchDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyDescriptorPool(device, descriptorPool, pAllocator); +} + +static inline VkResult DispatchResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, + VkDescriptorPoolResetFlags flags) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->ResetDescriptorPool(device, descriptorPool, flags); +} + +static inline VkResult DispatchAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, + VkDescriptorSet* pDescriptorSets) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->AllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets); +} + +static inline VkResult DispatchFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, + const VkDescriptorSet* pDescriptorSets) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->FreeDescriptorSets(device, descriptorPool, descriptorSetCount, pDescriptorSets); +} + +static inline void DispatchUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, + const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, + const VkCopyDescriptorSet* pDescriptorCopies) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->UpdateDescriptorSets(device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies); +} + +static inline VkResult DispatchCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateFramebuffer(device, pCreateInfo, pAllocator, pFramebuffer); +} + +static inline void DispatchDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyFramebuffer(device, framebuffer, pAllocator); +} + +static inline VkResult DispatchCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateRenderPass(device, pCreateInfo, pAllocator, pRenderPass); +} + +static inline void DispatchDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyRenderPass(device, renderPass, pAllocator); +} + +static inline void DispatchGetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetRenderAreaGranularity(device, renderPass, pGranularity); +} + +static inline VkResult DispatchCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateCommandPool(device, pCreateInfo, pAllocator, pCommandPool); +} + +static inline void DispatchDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyCommandPool(device, commandPool, pAllocator); +} + +static inline VkResult DispatchResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->ResetCommandPool(device, commandPool, flags); +} + +static inline VkResult DispatchAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, + VkCommandBuffer* pCommandBuffers) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->AllocateCommandBuffers(device, pAllocateInfo, pCommandBuffers); +} + +static inline void DispatchFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, + const VkCommandBuffer* pCommandBuffers) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->FreeCommandBuffers(device, commandPool, commandBufferCount, pCommandBuffers); +} + +static inline VkResult DispatchBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + return dispatch->BeginCommandBuffer(commandBuffer, pBeginInfo); +} + +static inline VkResult DispatchEndCommandBuffer(VkCommandBuffer commandBuffer) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + return dispatch->EndCommandBuffer(commandBuffer); +} + +static inline VkResult DispatchResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + return dispatch->ResetCommandBuffer(commandBuffer, flags); +} + +static inline void DispatchCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipeline pipeline) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBindPipeline(commandBuffer, pipelineBindPoint, pipeline); +} + +static inline void DispatchCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, + const VkViewport* pViewports) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetViewport(commandBuffer, firstViewport, viewportCount, pViewports); +} + +static inline void DispatchCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, + const VkRect2D* pScissors) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetScissor(commandBuffer, firstScissor, scissorCount, pScissors); +} + +static inline void DispatchCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetLineWidth(commandBuffer, lineWidth); +} + +static inline void DispatchCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, + float depthBiasSlopeFactor) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDepthBias(commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor); +} + +static inline void DispatchCmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4]) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetBlendConstants(commandBuffer, blendConstants); +} + +static inline void DispatchCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDepthBounds(commandBuffer, minDepthBounds, maxDepthBounds); +} + +static inline void DispatchCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, + uint32_t compareMask) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetStencilCompareMask(commandBuffer, faceMask, compareMask); +} + +static inline void DispatchCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetStencilWriteMask(commandBuffer, faceMask, writeMask); +} + +static inline void DispatchCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetStencilReference(commandBuffer, faceMask, reference); +} + +static inline void DispatchCmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, + const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, + const uint32_t* pDynamicOffsets) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBindDescriptorSets(commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, pDescriptorSets, + dynamicOffsetCount, pDynamicOffsets); +} + +static inline void DispatchCmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkIndexType indexType) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBindIndexBuffer(commandBuffer, buffer, offset, indexType); +} + +static inline void DispatchCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, + const VkBuffer* pBuffers, const VkDeviceSize* pOffsets) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBindVertexBuffers(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets); +} + +static inline void DispatchCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, + uint32_t firstVertex, uint32_t firstInstance) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDraw(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance); +} + +static inline void DispatchCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, + uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDrawIndexed(commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance); +} + +static inline void DispatchCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, + uint32_t stride) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDrawIndirect(commandBuffer, buffer, offset, drawCount, stride); +} + +static inline void DispatchCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + uint32_t drawCount, uint32_t stride) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDrawIndexedIndirect(commandBuffer, buffer, offset, drawCount, stride); +} + +static inline void DispatchCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, + uint32_t groupCountZ) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDispatch(commandBuffer, groupCountX, groupCountY, groupCountZ); +} + +static inline void DispatchCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDispatchIndirect(commandBuffer, buffer, offset); +} + +static inline void DispatchCmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, + uint32_t regionCount, const VkBufferCopy* pRegions) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCopyBuffer(commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions); +} + +static inline void DispatchCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, + VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, + const VkImageCopy* pRegions) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCopyImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); +} + +static inline void DispatchCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, + VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, + const VkImageBlit* pRegions, VkFilter filter) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBlitImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter); +} + +static inline void DispatchCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, + VkImageLayout dstImageLayout, uint32_t regionCount, + const VkBufferImageCopy* pRegions) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCopyBufferToImage(commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions); +} + +static inline void DispatchCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, + VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCopyImageToBuffer(commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions); +} + +static inline void DispatchCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, + VkDeviceSize dataSize, const void* pData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, dataSize, pData); +} + +static inline void DispatchCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, + VkDeviceSize size, uint32_t data) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdFillBuffer(commandBuffer, dstBuffer, dstOffset, size, data); +} + +static inline void DispatchCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, + const VkClearColorValue* pColor, uint32_t rangeCount, + const VkImageSubresourceRange* pRanges) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdClearColorImage(commandBuffer, image, imageLayout, pColor, rangeCount, pRanges); +} + +static inline void DispatchCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, + const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, + const VkImageSubresourceRange* pRanges) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdClearDepthStencilImage(commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges); +} + +static inline void DispatchCmdClearAttachments(VkCommandBuffer commandBuffer, uint32_t attachmentCount, + const VkClearAttachment* pAttachments, uint32_t rectCount, + const VkClearRect* pRects) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdClearAttachments(commandBuffer, attachmentCount, pAttachments, rectCount, pRects); +} + +static inline void DispatchCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, + VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, + const VkImageResolve* pRegions) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdResolveImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); +} + +static inline void DispatchCmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetEvent(commandBuffer, event, stageMask); +} + +static inline void DispatchCmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdResetEvent(commandBuffer, event, stageMask); +} + +static inline void DispatchCmdWaitEvents(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) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdWaitEvents(commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, + bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); +} + +static inline void DispatchCmdPipelineBarrier(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) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdPipelineBarrier(commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, + bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); +} + +static inline void DispatchCmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, + VkQueryControlFlags flags) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBeginQuery(commandBuffer, queryPool, query, flags); +} + +static inline void DispatchCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdEndQuery(commandBuffer, queryPool, query); +} + +static inline void DispatchCmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, + uint32_t queryCount) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdResetQueryPool(commandBuffer, queryPool, firstQuery, queryCount); +} + +static inline void DispatchCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, + VkQueryPool queryPool, uint32_t query) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdWriteTimestamp(commandBuffer, pipelineStage, queryPool, query); +} + +static inline void DispatchCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, + uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, + VkDeviceSize stride, VkQueryResultFlags flags) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCopyQueryPoolResults(commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags); +} + +static inline void DispatchCmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, + uint32_t offset, uint32_t size, const void* pValues) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdPushConstants(commandBuffer, layout, stageFlags, offset, size, pValues); +} + +static inline void DispatchCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, + VkSubpassContents contents) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBeginRenderPass(commandBuffer, pRenderPassBegin, contents); +} + +static inline void DispatchCmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdNextSubpass(commandBuffer, contents); +} + +static inline void DispatchCmdEndRenderPass(VkCommandBuffer commandBuffer) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdEndRenderPass(commandBuffer); +} + +static inline void DispatchCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, + const VkCommandBuffer* pCommandBuffers) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdExecuteCommands(commandBuffer, commandBufferCount, pCommandBuffers); +} + +static inline VkResult DispatchEnumerateInstanceVersion(uint32_t* pApiVersion) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(pApiVersion), layer_data_map); + return dispatch->EnumerateInstanceVersion(pApiVersion); +} + +static inline VkResult DispatchBindBufferMemory2(VkDevice device, uint32_t bindInfoCount, + const VkBindBufferMemoryInfo* pBindInfos) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->BindBufferMemory2(device, bindInfoCount, pBindInfos); +} + +static inline VkResult DispatchBindImageMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->BindImageMemory2(device, bindInfoCount, pBindInfos); +} + +static inline void DispatchGetDeviceGroupPeerMemoryFeatures(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, + uint32_t remoteDeviceIndex, + VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetDeviceGroupPeerMemoryFeatures(device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures); +} + +static inline void DispatchCmdSetDeviceMask(VkCommandBuffer commandBuffer, uint32_t deviceMask) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDeviceMask(commandBuffer, deviceMask); +} + +static inline void DispatchCmdDispatchBase(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, + uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDispatchBase(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); +} + +static inline VkResult DispatchEnumeratePhysicalDeviceGroups(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, + VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + return dispatch->EnumeratePhysicalDeviceGroups(instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties); +} + +static inline void DispatchGetImageMemoryRequirements2(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetImageMemoryRequirements2(device, pInfo, pMemoryRequirements); +} + +static inline void DispatchGetBufferMemoryRequirements2(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetBufferMemoryRequirements2(device, pInfo, pMemoryRequirements); +} + +static inline void DispatchGetImageSparseMemoryRequirements2(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetImageSparseMemoryRequirements2(device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); +} + +static inline void DispatchGetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceFeatures2(physicalDevice, pFeatures); +} + +static inline void DispatchGetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceProperties2(physicalDevice, pProperties); +} + +static inline void DispatchGetPhysicalDeviceFormatProperties2(VkPhysicalDevice physicalDevice, VkFormat format, + VkFormatProperties2* pFormatProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceFormatProperties2(physicalDevice, format, pFormatProperties); +} + +static inline VkResult DispatchGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, + VkImageFormatProperties2* pImageFormatProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceImageFormatProperties2(physicalDevice, pImageFormatInfo, pImageFormatProperties); +} + +static inline void DispatchGetPhysicalDeviceQueueFamilyProperties2(VkPhysicalDevice physicalDevice, + uint32_t* pQueueFamilyPropertyCount, + VkQueueFamilyProperties2* pQueueFamilyProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceQueueFamilyProperties2(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); +} + +static inline void DispatchGetPhysicalDeviceMemoryProperties2(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceMemoryProperties2* pMemoryProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceMemoryProperties2(physicalDevice, pMemoryProperties); +} + +static inline void DispatchGetPhysicalDeviceSparseImageFormatProperties2(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, + uint32_t* pPropertyCount, + VkSparseImageFormatProperties2* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceSparseImageFormatProperties2(physicalDevice, pFormatInfo, pPropertyCount, pProperties); +} + +static inline void DispatchTrimCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->TrimCommandPool(device, commandPool, flags); +} + +static inline void DispatchGetDeviceQueue2(VkDevice device, const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetDeviceQueue2(device, pQueueInfo, pQueue); +} + +static inline VkResult DispatchCreateSamplerYcbcrConversion(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSamplerYcbcrConversion* pYcbcrConversion) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateSamplerYcbcrConversion(device, pCreateInfo, pAllocator, pYcbcrConversion); +} + +static inline void DispatchDestroySamplerYcbcrConversion(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroySamplerYcbcrConversion(device, ycbcrConversion, pAllocator); +} + +static inline VkResult DispatchCreateDescriptorUpdateTemplate(VkDevice device, + const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateDescriptorUpdateTemplate(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate); +} + +static inline void DispatchDestroyDescriptorUpdateTemplate(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyDescriptorUpdateTemplate(device, descriptorUpdateTemplate, pAllocator); +} + +static inline void DispatchUpdateDescriptorSetWithTemplate(VkDevice device, VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->UpdateDescriptorSetWithTemplate(device, descriptorSet, descriptorUpdateTemplate, pData); +} + +static inline void DispatchGetPhysicalDeviceExternalBufferProperties(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, + VkExternalBufferProperties* pExternalBufferProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceExternalBufferProperties(physicalDevice, pExternalBufferInfo, pExternalBufferProperties); +} + +static inline void DispatchGetPhysicalDeviceExternalFenceProperties(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, + VkExternalFenceProperties* pExternalFenceProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceExternalFenceProperties(physicalDevice, pExternalFenceInfo, pExternalFenceProperties); +} + +static inline void DispatchGetPhysicalDeviceExternalSemaphoreProperties( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, + VkExternalSemaphoreProperties* pExternalSemaphoreProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceExternalSemaphoreProperties(physicalDevice, pExternalSemaphoreInfo, pExternalSemaphoreProperties); +} + +static inline void DispatchGetDescriptorSetLayoutSupport(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, + VkDescriptorSetLayoutSupport* pSupport) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetDescriptorSetLayoutSupport(device, pCreateInfo, pSupport); +} + +static inline void DispatchCmdDrawIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDrawIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); +} + +static inline void DispatchCmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); +} + +static inline VkResult DispatchCreateRenderPass2(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateRenderPass2(device, pCreateInfo, pAllocator, pRenderPass); +} + +static inline void DispatchCmdBeginRenderPass2(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, + const VkSubpassBeginInfo* pSubpassBeginInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBeginRenderPass2(commandBuffer, pRenderPassBegin, pSubpassBeginInfo); +} + +static inline void DispatchCmdNextSubpass2(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, + const VkSubpassEndInfo* pSubpassEndInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdNextSubpass2(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo); +} + +static inline void DispatchCmdEndRenderPass2(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdEndRenderPass2(commandBuffer, pSubpassEndInfo); +} + +static inline void DispatchResetQueryPool(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->ResetQueryPool(device, queryPool, firstQuery, queryCount); +} + +static inline VkResult DispatchGetSemaphoreCounterValue(VkDevice device, VkSemaphore semaphore, uint64_t* pValue) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetSemaphoreCounterValue(device, semaphore, pValue); +} + +static inline VkResult DispatchWaitSemaphores(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->WaitSemaphores(device, pWaitInfo, timeout); +} + +static inline VkResult DispatchSignalSemaphore(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->SignalSemaphore(device, pSignalInfo); +} + +static inline VkDeviceAddress DispatchGetBufferDeviceAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetBufferDeviceAddress(device, pInfo); +} + +static inline uint64_t DispatchGetBufferOpaqueCaptureAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetBufferOpaqueCaptureAddress(device, pInfo); +} + +static inline uint64_t DispatchGetDeviceMemoryOpaqueCaptureAddress(VkDevice device, + const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetDeviceMemoryOpaqueCaptureAddress(device, pInfo); +} + +static inline VkResult DispatchGetPhysicalDeviceToolProperties(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, + VkPhysicalDeviceToolProperties* pToolProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceToolProperties(physicalDevice, pToolCount, pToolProperties); +} + +static inline VkResult DispatchCreatePrivateDataSlot(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreatePrivateDataSlot(device, pCreateInfo, pAllocator, pPrivateDataSlot); +} + +static inline void DispatchDestroyPrivateDataSlot(VkDevice device, VkPrivateDataSlot privateDataSlot, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyPrivateDataSlot(device, privateDataSlot, pAllocator); +} + +static inline VkResult DispatchSetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, + VkPrivateDataSlot privateDataSlot, uint64_t data) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->SetPrivateData(device, objectType, objectHandle, privateDataSlot, data); +} + +static inline void DispatchGetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, + VkPrivateDataSlot privateDataSlot, uint64_t* pData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetPrivateData(device, objectType, objectHandle, privateDataSlot, pData); +} + +static inline void DispatchCmdSetEvent2(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetEvent2(commandBuffer, event, pDependencyInfo); +} + +static inline void DispatchCmdResetEvent2(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdResetEvent2(commandBuffer, event, stageMask); +} + +static inline void DispatchCmdWaitEvents2(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, + const VkDependencyInfo* pDependencyInfos) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdWaitEvents2(commandBuffer, eventCount, pEvents, pDependencyInfos); +} + +static inline void DispatchCmdPipelineBarrier2(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdPipelineBarrier2(commandBuffer, pDependencyInfo); +} + +static inline void DispatchCmdWriteTimestamp2(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, + uint32_t query) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdWriteTimestamp2(commandBuffer, stage, queryPool, query); +} + +static inline VkResult DispatchQueueSubmit2(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + return dispatch->QueueSubmit2(queue, submitCount, pSubmits, fence); +} + +static inline void DispatchCmdCopyBuffer2(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCopyBuffer2(commandBuffer, pCopyBufferInfo); +} + +static inline void DispatchCmdCopyImage2(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCopyImage2(commandBuffer, pCopyImageInfo); +} + +static inline void DispatchCmdCopyBufferToImage2(VkCommandBuffer commandBuffer, + const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCopyBufferToImage2(commandBuffer, pCopyBufferToImageInfo); +} + +static inline void DispatchCmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, + const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCopyImageToBuffer2(commandBuffer, pCopyImageToBufferInfo); +} + +static inline void DispatchCmdBlitImage2(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBlitImage2(commandBuffer, pBlitImageInfo); +} + +static inline void DispatchCmdResolveImage2(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdResolveImage2(commandBuffer, pResolveImageInfo); +} + +static inline void DispatchCmdBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBeginRendering(commandBuffer, pRenderingInfo); +} + +static inline void DispatchCmdEndRendering(VkCommandBuffer commandBuffer) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdEndRendering(commandBuffer); +} + +static inline void DispatchCmdSetCullMode(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetCullMode(commandBuffer, cullMode); +} + +static inline void DispatchCmdSetFrontFace(VkCommandBuffer commandBuffer, VkFrontFace frontFace) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetFrontFace(commandBuffer, frontFace); +} + +static inline void DispatchCmdSetPrimitiveTopology(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetPrimitiveTopology(commandBuffer, primitiveTopology); +} + +static inline void DispatchCmdSetViewportWithCount(VkCommandBuffer commandBuffer, uint32_t viewportCount, + const VkViewport* pViewports) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetViewportWithCount(commandBuffer, viewportCount, pViewports); +} + +static inline void DispatchCmdSetScissorWithCount(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetScissorWithCount(commandBuffer, scissorCount, pScissors); +} + +static inline void DispatchCmdBindVertexBuffers2(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, + const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, + const VkDeviceSize* pStrides) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBindVertexBuffers2(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, pStrides); +} + +static inline void DispatchCmdSetDepthTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDepthTestEnable(commandBuffer, depthTestEnable); +} + +static inline void DispatchCmdSetDepthWriteEnable(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDepthWriteEnable(commandBuffer, depthWriteEnable); +} + +static inline void DispatchCmdSetDepthCompareOp(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDepthCompareOp(commandBuffer, depthCompareOp); +} + +static inline void DispatchCmdSetDepthBoundsTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDepthBoundsTestEnable(commandBuffer, depthBoundsTestEnable); +} + +static inline void DispatchCmdSetStencilTestEnable(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetStencilTestEnable(commandBuffer, stencilTestEnable); +} + +static inline void DispatchCmdSetStencilOp(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, + VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetStencilOp(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp); +} + +static inline void DispatchCmdSetRasterizerDiscardEnable(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetRasterizerDiscardEnable(commandBuffer, rasterizerDiscardEnable); +} + +static inline void DispatchCmdSetDepthBiasEnable(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDepthBiasEnable(commandBuffer, depthBiasEnable); +} + +static inline void DispatchCmdSetPrimitiveRestartEnable(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetPrimitiveRestartEnable(commandBuffer, primitiveRestartEnable); +} + +static inline void DispatchGetDeviceBufferMemoryRequirements(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetDeviceBufferMemoryRequirements(device, pInfo, pMemoryRequirements); +} + +static inline void DispatchGetDeviceImageMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetDeviceImageMemoryRequirements(device, pInfo, pMemoryRequirements); +} + +static inline void DispatchGetDeviceImageSparseMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetDeviceImageSparseMemoryRequirements(device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); +} + +static inline void DispatchDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + dispatch->DestroySurfaceKHR(instance, surface, pAllocator); +} + +static inline VkResult DispatchGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + VkSurfaceKHR surface, VkBool32* pSupported) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, surface, pSupported); +} + +static inline VkResult DispatchGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, surface, pSurfaceCapabilities); +} + +static inline VkResult DispatchGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + uint32_t* pSurfaceFormatCount, + VkSurfaceFormatKHR* pSurfaceFormats) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, pSurfaceFormatCount, pSurfaceFormats); +} + +static inline VkResult DispatchGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + uint32_t* pPresentModeCount, + VkPresentModeKHR* pPresentModes) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, surface, pPresentModeCount, pPresentModes); +} + +static inline VkResult DispatchCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateSwapchainKHR(device, pCreateInfo, pAllocator, pSwapchain); +} + +static inline void DispatchDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroySwapchainKHR(device, swapchain, pAllocator); +} + +static inline VkResult DispatchGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, + VkImage* pSwapchainImages) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages); +} + +static inline VkResult DispatchAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, + VkSemaphore semaphore, VkFence fence, uint32_t* pImageIndex) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->AcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, pImageIndex); +} + +static inline VkResult DispatchQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR* pPresentInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + return dispatch->QueuePresentKHR(queue, pPresentInfo); +} + +static inline VkResult DispatchGetDeviceGroupPresentCapabilitiesKHR( + VkDevice device, VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetDeviceGroupPresentCapabilitiesKHR(device, pDeviceGroupPresentCapabilities); +} + +static inline VkResult DispatchGetDeviceGroupSurfacePresentModesKHR(VkDevice device, VkSurfaceKHR surface, + VkDeviceGroupPresentModeFlagsKHR* pModes) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetDeviceGroupSurfacePresentModesKHR(device, surface, pModes); +} + +static inline VkResult DispatchGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + uint32_t* pRectCount, VkRect2D* pRects) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDevicePresentRectanglesKHR(physicalDevice, surface, pRectCount, pRects); +} + +static inline VkResult DispatchAcquireNextImage2KHR(VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, + uint32_t* pImageIndex) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->AcquireNextImage2KHR(device, pAcquireInfo, pImageIndex); +} + +static inline VkResult DispatchGetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkDisplayPropertiesKHR* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceDisplayPropertiesKHR(physicalDevice, pPropertyCount, pProperties); +} + +static inline VkResult DispatchGetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkDisplayPlanePropertiesKHR* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceDisplayPlanePropertiesKHR(physicalDevice, pPropertyCount, pProperties); +} + +static inline VkResult DispatchGetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, uint32_t planeIndex, + uint32_t* pDisplayCount, VkDisplayKHR* pDisplays) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetDisplayPlaneSupportedDisplaysKHR(physicalDevice, planeIndex, pDisplayCount, pDisplays); +} + +static inline VkResult DispatchGetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, + uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetDisplayModePropertiesKHR(physicalDevice, display, pPropertyCount, pProperties); +} + +static inline VkResult DispatchCreateDisplayModeKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, + const VkDisplayModeCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->CreateDisplayModeKHR(physicalDevice, display, pCreateInfo, pAllocator, pMode); +} + +static inline VkResult DispatchGetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, + uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetDisplayPlaneCapabilitiesKHR(physicalDevice, mode, planeIndex, pCapabilities); +} + +static inline VkResult DispatchCreateDisplayPlaneSurfaceKHR(VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + return dispatch->CreateDisplayPlaneSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); +} + +static inline VkResult DispatchCreateSharedSwapchainsKHR(VkDevice device, uint32_t swapchainCount, + const VkSwapchainCreateInfoKHR* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateSharedSwapchainsKHR(device, swapchainCount, pCreateInfos, pAllocator, pSwapchains); +} +#ifdef VK_USE_PLATFORM_XLIB_KHR + +static inline VkResult DispatchCreateXlibSurfaceKHR(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + return dispatch->CreateXlibSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); +} + +static inline VkBool32 DispatchGetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex, Display* dpy, + VisualID visualID) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceXlibPresentationSupportKHR(physicalDevice, queueFamilyIndex, dpy, visualID); +} +#endif // VK_USE_PLATFORM_XLIB_KHR +#ifdef VK_USE_PLATFORM_XCB_KHR + +static inline VkResult DispatchCreateXcbSurfaceKHR(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + return dispatch->CreateXcbSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); +} + +static inline VkBool32 DispatchGetPhysicalDeviceXcbPresentationSupportKHR(VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex, xcb_connection_t* connection, + xcb_visualid_t visual_id) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceXcbPresentationSupportKHR(physicalDevice, queueFamilyIndex, connection, visual_id); +} +#endif // VK_USE_PLATFORM_XCB_KHR +#ifdef VK_USE_PLATFORM_WAYLAND_KHR + +static inline VkResult DispatchCreateWaylandSurfaceKHR(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + return dispatch->CreateWaylandSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); +} + +static inline VkBool32 DispatchGetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex, + struct wl_display* display) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceWaylandPresentationSupportKHR(physicalDevice, queueFamilyIndex, display); +} +#endif // VK_USE_PLATFORM_WAYLAND_KHR +#ifdef VK_USE_PLATFORM_ANDROID_KHR + +static inline VkResult DispatchCreateAndroidSurfaceKHR(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + return dispatch->CreateAndroidSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); +} +#endif // VK_USE_PLATFORM_ANDROID_KHR +#ifdef VK_USE_PLATFORM_WIN32_KHR + +static inline VkResult DispatchCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + return dispatch->CreateWin32SurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); +} + +static inline VkBool32 DispatchGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceWin32PresentationSupportKHR(physicalDevice, queueFamilyIndex); +} +#endif // VK_USE_PLATFORM_WIN32_KHR + +static inline VkResult DispatchGetPhysicalDeviceVideoCapabilitiesKHR(VkPhysicalDevice physicalDevice, + const VkVideoProfileInfoKHR* pVideoProfile, + VkVideoCapabilitiesKHR* pCapabilities) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceVideoCapabilitiesKHR(physicalDevice, pVideoProfile, pCapabilities); +} + +static inline VkResult DispatchGetPhysicalDeviceVideoFormatPropertiesKHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceVideoFormatInfoKHR* pVideoFormatInfo, + uint32_t* pVideoFormatPropertyCount, + VkVideoFormatPropertiesKHR* pVideoFormatProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceVideoFormatPropertiesKHR(physicalDevice, pVideoFormatInfo, pVideoFormatPropertyCount, + pVideoFormatProperties); +} + +static inline VkResult DispatchCreateVideoSessionKHR(VkDevice device, const VkVideoSessionCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkVideoSessionKHR* pVideoSession) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateVideoSessionKHR(device, pCreateInfo, pAllocator, pVideoSession); +} + +static inline void DispatchDestroyVideoSessionKHR(VkDevice device, VkVideoSessionKHR videoSession, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyVideoSessionKHR(device, videoSession, pAllocator); +} + +static inline VkResult DispatchGetVideoSessionMemoryRequirementsKHR(VkDevice device, VkVideoSessionKHR videoSession, + uint32_t* pMemoryRequirementsCount, + VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetVideoSessionMemoryRequirementsKHR(device, videoSession, pMemoryRequirementsCount, pMemoryRequirements); +} + +static inline VkResult DispatchBindVideoSessionMemoryKHR(VkDevice device, VkVideoSessionKHR videoSession, + uint32_t bindSessionMemoryInfoCount, + const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->BindVideoSessionMemoryKHR(device, videoSession, bindSessionMemoryInfoCount, pBindSessionMemoryInfos); +} + +static inline VkResult DispatchCreateVideoSessionParametersKHR(VkDevice device, + const VkVideoSessionParametersCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkVideoSessionParametersKHR* pVideoSessionParameters) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateVideoSessionParametersKHR(device, pCreateInfo, pAllocator, pVideoSessionParameters); +} + +static inline VkResult DispatchUpdateVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, + const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->UpdateVideoSessionParametersKHR(device, videoSessionParameters, pUpdateInfo); +} + +static inline void DispatchDestroyVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyVideoSessionParametersKHR(device, videoSessionParameters, pAllocator); +} + +static inline void DispatchCmdBeginVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoBeginCodingInfoKHR* pBeginInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBeginVideoCodingKHR(commandBuffer, pBeginInfo); +} + +static inline void DispatchCmdEndVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoEndCodingInfoKHR* pEndCodingInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdEndVideoCodingKHR(commandBuffer, pEndCodingInfo); +} + +static inline void DispatchCmdControlVideoCodingKHR(VkCommandBuffer commandBuffer, + const VkVideoCodingControlInfoKHR* pCodingControlInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdControlVideoCodingKHR(commandBuffer, pCodingControlInfo); +} + +static inline void DispatchCmdDecodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR* pDecodeInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDecodeVideoKHR(commandBuffer, pDecodeInfo); +} + +static inline void DispatchCmdBeginRenderingKHR(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBeginRenderingKHR(commandBuffer, pRenderingInfo); +} + +static inline void DispatchCmdEndRenderingKHR(VkCommandBuffer commandBuffer) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdEndRenderingKHR(commandBuffer); +} + +static inline void DispatchGetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceFeatures2KHR(physicalDevice, pFeatures); +} + +static inline void DispatchGetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceProperties2* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceProperties2KHR(physicalDevice, pProperties); +} + +static inline void DispatchGetPhysicalDeviceFormatProperties2KHR(VkPhysicalDevice physicalDevice, VkFormat format, + VkFormatProperties2* pFormatProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceFormatProperties2KHR(physicalDevice, format, pFormatProperties); +} + +static inline VkResult DispatchGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, + VkImageFormatProperties2* pImageFormatProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceImageFormatProperties2KHR(physicalDevice, pImageFormatInfo, pImageFormatProperties); +} + +static inline void DispatchGetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice, + uint32_t* pQueueFamilyPropertyCount, + VkQueueFamilyProperties2* pQueueFamilyProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceQueueFamilyProperties2KHR(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); +} + +static inline void DispatchGetPhysicalDeviceMemoryProperties2KHR(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceMemoryProperties2* pMemoryProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceMemoryProperties2KHR(physicalDevice, pMemoryProperties); +} + +static inline void DispatchGetPhysicalDeviceSparseImageFormatProperties2KHR( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, + VkSparseImageFormatProperties2* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceSparseImageFormatProperties2KHR(physicalDevice, pFormatInfo, pPropertyCount, pProperties); +} + +static inline void DispatchGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, + uint32_t remoteDeviceIndex, + VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetDeviceGroupPeerMemoryFeaturesKHR(device, heapIndex, localDeviceIndex, remoteDeviceIndex, pPeerMemoryFeatures); +} + +static inline void DispatchCmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, uint32_t deviceMask) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDeviceMaskKHR(commandBuffer, deviceMask); +} + +static inline void DispatchCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, + uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, + uint32_t groupCountZ) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDispatchBaseKHR(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); +} + +static inline void DispatchTrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->TrimCommandPoolKHR(device, commandPool, flags); +} + +static inline VkResult DispatchEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, + VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + return dispatch->EnumeratePhysicalDeviceGroupsKHR(instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties); +} + +static inline void DispatchGetPhysicalDeviceExternalBufferPropertiesKHR( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, + VkExternalBufferProperties* pExternalBufferProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceExternalBufferPropertiesKHR(physicalDevice, pExternalBufferInfo, pExternalBufferProperties); +} +#ifdef VK_USE_PLATFORM_WIN32_KHR + +static inline VkResult DispatchGetMemoryWin32HandleKHR(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, + HANDLE* pHandle) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetMemoryWin32HandleKHR(device, pGetWin32HandleInfo, pHandle); +} + +static inline VkResult DispatchGetMemoryWin32HandlePropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, + HANDLE handle, + VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetMemoryWin32HandlePropertiesKHR(device, handleType, handle, pMemoryWin32HandleProperties); +} +#endif // VK_USE_PLATFORM_WIN32_KHR + +static inline VkResult DispatchGetMemoryFdKHR(VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetMemoryFdKHR(device, pGetFdInfo, pFd); +} + +static inline VkResult DispatchGetMemoryFdPropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, + VkMemoryFdPropertiesKHR* pMemoryFdProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetMemoryFdPropertiesKHR(device, handleType, fd, pMemoryFdProperties); +} + +static inline void DispatchGetPhysicalDeviceExternalSemaphorePropertiesKHR( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, + VkExternalSemaphoreProperties* pExternalSemaphoreProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceExternalSemaphorePropertiesKHR(physicalDevice, pExternalSemaphoreInfo, pExternalSemaphoreProperties); +} +#ifdef VK_USE_PLATFORM_WIN32_KHR + +static inline VkResult DispatchImportSemaphoreWin32HandleKHR( + VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->ImportSemaphoreWin32HandleKHR(device, pImportSemaphoreWin32HandleInfo); +} + +static inline VkResult DispatchGetSemaphoreWin32HandleKHR(VkDevice device, + const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, + HANDLE* pHandle) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetSemaphoreWin32HandleKHR(device, pGetWin32HandleInfo, pHandle); +} +#endif // VK_USE_PLATFORM_WIN32_KHR + +static inline VkResult DispatchImportSemaphoreFdKHR(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->ImportSemaphoreFdKHR(device, pImportSemaphoreFdInfo); +} + +static inline VkResult DispatchGetSemaphoreFdKHR(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetSemaphoreFdKHR(device, pGetFdInfo, pFd); +} + +static inline void DispatchCmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, + const VkWriteDescriptorSet* pDescriptorWrites) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdPushDescriptorSetKHR(commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, pDescriptorWrites); +} + +static inline void DispatchCmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, + VkPipelineLayout layout, uint32_t set, const void* pData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdPushDescriptorSetWithTemplateKHR(commandBuffer, descriptorUpdateTemplate, layout, set, pData); +} + +static inline VkResult DispatchCreateDescriptorUpdateTemplateKHR(VkDevice device, + const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateDescriptorUpdateTemplateKHR(device, pCreateInfo, pAllocator, pDescriptorUpdateTemplate); +} + +static inline void DispatchDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyDescriptorUpdateTemplateKHR(device, descriptorUpdateTemplate, pAllocator); +} + +static inline void DispatchUpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, + const void* pData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->UpdateDescriptorSetWithTemplateKHR(device, descriptorSet, descriptorUpdateTemplate, pData); +} + +static inline VkResult DispatchCreateRenderPass2KHR(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateRenderPass2KHR(device, pCreateInfo, pAllocator, pRenderPass); +} + +static inline void DispatchCmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, + const VkSubpassBeginInfo* pSubpassBeginInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBeginRenderPass2KHR(commandBuffer, pRenderPassBegin, pSubpassBeginInfo); +} + +static inline void DispatchCmdNextSubpass2KHR(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, + const VkSubpassEndInfo* pSubpassEndInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdNextSubpass2KHR(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo); +} + +static inline void DispatchCmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdEndRenderPass2KHR(commandBuffer, pSubpassEndInfo); +} + +static inline VkResult DispatchGetSwapchainStatusKHR(VkDevice device, VkSwapchainKHR swapchain) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetSwapchainStatusKHR(device, swapchain); +} + +static inline void DispatchGetPhysicalDeviceExternalFencePropertiesKHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, + VkExternalFenceProperties* pExternalFenceProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceExternalFencePropertiesKHR(physicalDevice, pExternalFenceInfo, pExternalFenceProperties); +} +#ifdef VK_USE_PLATFORM_WIN32_KHR + +static inline VkResult DispatchImportFenceWin32HandleKHR(VkDevice device, + const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->ImportFenceWin32HandleKHR(device, pImportFenceWin32HandleInfo); +} + +static inline VkResult DispatchGetFenceWin32HandleKHR(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, + HANDLE* pHandle) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetFenceWin32HandleKHR(device, pGetWin32HandleInfo, pHandle); +} +#endif // VK_USE_PLATFORM_WIN32_KHR + +static inline VkResult DispatchImportFenceFdKHR(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->ImportFenceFdKHR(device, pImportFenceFdInfo); +} + +static inline VkResult DispatchGetFenceFdKHR(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetFenceFdKHR(device, pGetFdInfo, pFd); +} + +static inline VkResult DispatchEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, uint32_t* pCounterCount, VkPerformanceCounterKHR* pCounters, + VkPerformanceCounterDescriptionKHR* pCounterDescriptions) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(physicalDevice, queueFamilyIndex, pCounterCount, + pCounters, pCounterDescriptions); +} + +static inline void DispatchGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( + VkPhysicalDevice physicalDevice, const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, uint32_t* pNumPasses) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(physicalDevice, pPerformanceQueryCreateInfo, pNumPasses); +} + +static inline VkResult DispatchAcquireProfilingLockKHR(VkDevice device, const VkAcquireProfilingLockInfoKHR* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->AcquireProfilingLockKHR(device, pInfo); +} + +static inline void DispatchReleaseProfilingLockKHR(VkDevice device) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->ReleaseProfilingLockKHR(device); +} + +static inline VkResult DispatchGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + VkSurfaceCapabilities2KHR* pSurfaceCapabilities) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceSurfaceCapabilities2KHR(physicalDevice, pSurfaceInfo, pSurfaceCapabilities); +} + +static inline VkResult DispatchGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + uint32_t* pSurfaceFormatCount, + VkSurfaceFormat2KHR* pSurfaceFormats) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceSurfaceFormats2KHR(physicalDevice, pSurfaceInfo, pSurfaceFormatCount, pSurfaceFormats); +} + +static inline VkResult DispatchGetPhysicalDeviceDisplayProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkDisplayProperties2KHR* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceDisplayProperties2KHR(physicalDevice, pPropertyCount, pProperties); +} + +static inline VkResult DispatchGetPhysicalDeviceDisplayPlaneProperties2KHR(VkPhysicalDevice physicalDevice, + uint32_t* pPropertyCount, + VkDisplayPlaneProperties2KHR* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceDisplayPlaneProperties2KHR(physicalDevice, pPropertyCount, pProperties); +} + +static inline VkResult DispatchGetDisplayModeProperties2KHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, + uint32_t* pPropertyCount, VkDisplayModeProperties2KHR* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetDisplayModeProperties2KHR(physicalDevice, display, pPropertyCount, pProperties); +} + +static inline VkResult DispatchGetDisplayPlaneCapabilities2KHR(VkPhysicalDevice physicalDevice, + const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, + VkDisplayPlaneCapabilities2KHR* pCapabilities) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetDisplayPlaneCapabilities2KHR(physicalDevice, pDisplayPlaneInfo, pCapabilities); +} + +static inline void DispatchGetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetImageMemoryRequirements2KHR(device, pInfo, pMemoryRequirements); +} + +static inline void DispatchGetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetBufferMemoryRequirements2KHR(device, pInfo, pMemoryRequirements); +} + +static inline void DispatchGetImageSparseMemoryRequirements2KHR(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetImageSparseMemoryRequirements2KHR(device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); +} + +static inline VkResult DispatchCreateSamplerYcbcrConversionKHR(VkDevice device, + const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSamplerYcbcrConversion* pYcbcrConversion) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateSamplerYcbcrConversionKHR(device, pCreateInfo, pAllocator, pYcbcrConversion); +} + +static inline void DispatchDestroySamplerYcbcrConversionKHR(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroySamplerYcbcrConversionKHR(device, ycbcrConversion, pAllocator); +} + +static inline VkResult DispatchBindBufferMemory2KHR(VkDevice device, uint32_t bindInfoCount, + const VkBindBufferMemoryInfo* pBindInfos) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->BindBufferMemory2KHR(device, bindInfoCount, pBindInfos); +} + +static inline VkResult DispatchBindImageMemory2KHR(VkDevice device, uint32_t bindInfoCount, + const VkBindImageMemoryInfo* pBindInfos) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->BindImageMemory2KHR(device, bindInfoCount, pBindInfos); +} + +static inline void DispatchGetDescriptorSetLayoutSupportKHR(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, + VkDescriptorSetLayoutSupport* pSupport) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetDescriptorSetLayoutSupportKHR(device, pCreateInfo, pSupport); +} + +static inline void DispatchCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDrawIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); +} + +static inline void DispatchCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, uint32_t stride) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDrawIndexedIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); +} + +static inline VkResult DispatchGetSemaphoreCounterValueKHR(VkDevice device, VkSemaphore semaphore, uint64_t* pValue) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetSemaphoreCounterValueKHR(device, semaphore, pValue); +} + +static inline VkResult DispatchWaitSemaphoresKHR(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->WaitSemaphoresKHR(device, pWaitInfo, timeout); +} + +static inline VkResult DispatchSignalSemaphoreKHR(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->SignalSemaphoreKHR(device, pSignalInfo); +} + +static inline VkResult DispatchGetPhysicalDeviceFragmentShadingRatesKHR( + VkPhysicalDevice physicalDevice, uint32_t* pFragmentShadingRateCount, + VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceFragmentShadingRatesKHR(physicalDevice, pFragmentShadingRateCount, pFragmentShadingRates); +} + +static inline void DispatchCmdSetFragmentShadingRateKHR(VkCommandBuffer commandBuffer, const VkExtent2D* pFragmentSize, + const VkFragmentShadingRateCombinerOpKHR combinerOps[2]) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetFragmentShadingRateKHR(commandBuffer, pFragmentSize, combinerOps); +} + +static inline void DispatchCmdSetRenderingAttachmentLocationsKHR(VkCommandBuffer commandBuffer, + const VkRenderingAttachmentLocationInfoKHR* pLocationInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetRenderingAttachmentLocationsKHR(commandBuffer, pLocationInfo); +} + +static inline void DispatchCmdSetRenderingInputAttachmentIndicesKHR( + VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfoKHR* pInputAttachmentIndexInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetRenderingInputAttachmentIndicesKHR(commandBuffer, pInputAttachmentIndexInfo); +} + +static inline VkResult DispatchWaitForPresentKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t presentId, uint64_t timeout) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->WaitForPresentKHR(device, swapchain, presentId, timeout); +} + +static inline VkDeviceAddress DispatchGetBufferDeviceAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetBufferDeviceAddressKHR(device, pInfo); +} + +static inline uint64_t DispatchGetBufferOpaqueCaptureAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetBufferOpaqueCaptureAddressKHR(device, pInfo); +} + +static inline uint64_t DispatchGetDeviceMemoryOpaqueCaptureAddressKHR(VkDevice device, + const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetDeviceMemoryOpaqueCaptureAddressKHR(device, pInfo); +} + +static inline VkResult DispatchCreateDeferredOperationKHR(VkDevice device, const VkAllocationCallbacks* pAllocator, + VkDeferredOperationKHR* pDeferredOperation) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateDeferredOperationKHR(device, pAllocator, pDeferredOperation); +} + +static inline void DispatchDestroyDeferredOperationKHR(VkDevice device, VkDeferredOperationKHR operation, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyDeferredOperationKHR(device, operation, pAllocator); +} + +static inline uint32_t DispatchGetDeferredOperationMaxConcurrencyKHR(VkDevice device, VkDeferredOperationKHR operation) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetDeferredOperationMaxConcurrencyKHR(device, operation); +} + +static inline VkResult DispatchGetDeferredOperationResultKHR(VkDevice device, VkDeferredOperationKHR operation) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetDeferredOperationResultKHR(device, operation); +} + +static inline VkResult DispatchDeferredOperationJoinKHR(VkDevice device, VkDeferredOperationKHR operation) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->DeferredOperationJoinKHR(device, operation); +} + +static inline VkResult DispatchGetPipelineExecutablePropertiesKHR(VkDevice device, const VkPipelineInfoKHR* pPipelineInfo, + uint32_t* pExecutableCount, + VkPipelineExecutablePropertiesKHR* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetPipelineExecutablePropertiesKHR(device, pPipelineInfo, pExecutableCount, pProperties); +} + +static inline VkResult DispatchGetPipelineExecutableStatisticsKHR(VkDevice device, + const VkPipelineExecutableInfoKHR* pExecutableInfo, + uint32_t* pStatisticCount, + VkPipelineExecutableStatisticKHR* pStatistics) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetPipelineExecutableStatisticsKHR(device, pExecutableInfo, pStatisticCount, pStatistics); +} + +static inline VkResult DispatchGetPipelineExecutableInternalRepresentationsKHR( + VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pInternalRepresentationCount, + VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetPipelineExecutableInternalRepresentationsKHR(device, pExecutableInfo, pInternalRepresentationCount, + pInternalRepresentations); +} + +static inline VkResult DispatchMapMemory2KHR(VkDevice device, const VkMemoryMapInfoKHR* pMemoryMapInfo, void** ppData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->MapMemory2KHR(device, pMemoryMapInfo, ppData); +} + +static inline VkResult DispatchUnmapMemory2KHR(VkDevice device, const VkMemoryUnmapInfoKHR* pMemoryUnmapInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->UnmapMemory2KHR(device, pMemoryUnmapInfo); +} + +static inline VkResult DispatchGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, + VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(physicalDevice, pQualityLevelInfo, + pQualityLevelProperties); +} + +static inline VkResult DispatchGetEncodedVideoSessionParametersKHR( + VkDevice device, const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo, + VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, size_t* pDataSize, void* pData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetEncodedVideoSessionParametersKHR(device, pVideoSessionParametersInfo, pFeedbackInfo, pDataSize, pData); +} + +static inline void DispatchCmdEncodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdEncodeVideoKHR(commandBuffer, pEncodeInfo); +} + +static inline void DispatchCmdSetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetEvent2KHR(commandBuffer, event, pDependencyInfo); +} + +static inline void DispatchCmdResetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdResetEvent2KHR(commandBuffer, event, stageMask); +} + +static inline void DispatchCmdWaitEvents2KHR(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, + const VkDependencyInfo* pDependencyInfos) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdWaitEvents2KHR(commandBuffer, eventCount, pEvents, pDependencyInfos); +} + +static inline void DispatchCmdPipelineBarrier2KHR(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdPipelineBarrier2KHR(commandBuffer, pDependencyInfo); +} + +static inline void DispatchCmdWriteTimestamp2KHR(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, + uint32_t query) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdWriteTimestamp2KHR(commandBuffer, stage, queryPool, query); +} + +static inline VkResult DispatchQueueSubmit2KHR(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + return dispatch->QueueSubmit2KHR(queue, submitCount, pSubmits, fence); +} + +static inline void DispatchCmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCopyBuffer2KHR(commandBuffer, pCopyBufferInfo); +} + +static inline void DispatchCmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCopyImage2KHR(commandBuffer, pCopyImageInfo); +} + +static inline void DispatchCmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffer, + const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCopyBufferToImage2KHR(commandBuffer, pCopyBufferToImageInfo); +} + +static inline void DispatchCmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffer, + const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCopyImageToBuffer2KHR(commandBuffer, pCopyImageToBufferInfo); +} + +static inline void DispatchCmdBlitImage2KHR(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBlitImage2KHR(commandBuffer, pBlitImageInfo); +} + +static inline void DispatchCmdResolveImage2KHR(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdResolveImage2KHR(commandBuffer, pResolveImageInfo); +} + +static inline void DispatchCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdTraceRaysIndirect2KHR(commandBuffer, indirectDeviceAddress); +} + +static inline void DispatchGetDeviceBufferMemoryRequirementsKHR(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetDeviceBufferMemoryRequirementsKHR(device, pInfo, pMemoryRequirements); +} + +static inline void DispatchGetDeviceImageMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetDeviceImageMemoryRequirementsKHR(device, pInfo, pMemoryRequirements); +} + +static inline void DispatchGetDeviceImageSparseMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetDeviceImageSparseMemoryRequirementsKHR(device, pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); +} + +static inline void DispatchCmdBindIndexBuffer2KHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkDeviceSize size, VkIndexType indexType) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBindIndexBuffer2KHR(commandBuffer, buffer, offset, size, indexType); +} + +static inline void DispatchGetRenderingAreaGranularityKHR(VkDevice device, const VkRenderingAreaInfoKHR* pRenderingAreaInfo, + VkExtent2D* pGranularity) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetRenderingAreaGranularityKHR(device, pRenderingAreaInfo, pGranularity); +} + +static inline void DispatchGetDeviceImageSubresourceLayoutKHR(VkDevice device, const VkDeviceImageSubresourceInfoKHR* pInfo, + VkSubresourceLayout2KHR* pLayout) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetDeviceImageSubresourceLayoutKHR(device, pInfo, pLayout); +} + +static inline void DispatchGetImageSubresourceLayout2KHR(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, + VkSubresourceLayout2KHR* pLayout) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetImageSubresourceLayout2KHR(device, image, pSubresource, pLayout); +} + +static inline VkResult DispatchCreatePipelineBinariesKHR(VkDevice device, const VkPipelineBinaryCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkPipelineBinaryHandlesInfoKHR* pBinaries) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreatePipelineBinariesKHR(device, pCreateInfo, pAllocator, pBinaries); +} + +static inline void DispatchDestroyPipelineBinaryKHR(VkDevice device, VkPipelineBinaryKHR pipelineBinary, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyPipelineBinaryKHR(device, pipelineBinary, pAllocator); +} + +static inline VkResult DispatchGetPipelineKeyKHR(VkDevice device, const VkPipelineCreateInfoKHR* pPipelineCreateInfo, + VkPipelineBinaryKeyKHR* pPipelineKey) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetPipelineKeyKHR(device, pPipelineCreateInfo, pPipelineKey); +} + +static inline VkResult DispatchGetPipelineBinaryDataKHR(VkDevice device, const VkPipelineBinaryDataInfoKHR* pInfo, + VkPipelineBinaryKeyKHR* pPipelineBinaryKey, size_t* pPipelineBinaryDataSize, + void* pPipelineBinaryData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetPipelineBinaryDataKHR(device, pInfo, pPipelineBinaryKey, pPipelineBinaryDataSize, pPipelineBinaryData); +} + +static inline VkResult DispatchReleaseCapturedPipelineDataKHR(VkDevice device, const VkReleaseCapturedPipelineDataInfoKHR* pInfo, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->ReleaseCapturedPipelineDataKHR(device, pInfo, pAllocator); +} + +static inline VkResult DispatchGetPhysicalDeviceCooperativeMatrixPropertiesKHR(VkPhysicalDevice physicalDevice, + uint32_t* pPropertyCount, + VkCooperativeMatrixPropertiesKHR* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceCooperativeMatrixPropertiesKHR(physicalDevice, pPropertyCount, pProperties); +} + +static inline void DispatchCmdSetLineStippleKHR(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, + uint16_t lineStipplePattern) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetLineStippleKHR(commandBuffer, lineStippleFactor, lineStipplePattern); +} + +static inline VkResult DispatchGetPhysicalDeviceCalibrateableTimeDomainsKHR(VkPhysicalDevice physicalDevice, + uint32_t* pTimeDomainCount, + VkTimeDomainKHR* pTimeDomains) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceCalibrateableTimeDomainsKHR(physicalDevice, pTimeDomainCount, pTimeDomains); +} + +static inline VkResult DispatchGetCalibratedTimestampsKHR(VkDevice device, uint32_t timestampCount, + const VkCalibratedTimestampInfoKHR* pTimestampInfos, + uint64_t* pTimestamps, uint64_t* pMaxDeviation) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetCalibratedTimestampsKHR(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation); +} + +static inline void DispatchCmdBindDescriptorSets2KHR(VkCommandBuffer commandBuffer, + const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBindDescriptorSets2KHR(commandBuffer, pBindDescriptorSetsInfo); +} + +static inline void DispatchCmdPushConstants2KHR(VkCommandBuffer commandBuffer, const VkPushConstantsInfoKHR* pPushConstantsInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdPushConstants2KHR(commandBuffer, pPushConstantsInfo); +} + +static inline void DispatchCmdPushDescriptorSet2KHR(VkCommandBuffer commandBuffer, + const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdPushDescriptorSet2KHR(commandBuffer, pPushDescriptorSetInfo); +} + +static inline void DispatchCmdPushDescriptorSetWithTemplate2KHR( + VkCommandBuffer commandBuffer, const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdPushDescriptorSetWithTemplate2KHR(commandBuffer, pPushDescriptorSetWithTemplateInfo); +} + +static inline void DispatchCmdSetDescriptorBufferOffsets2EXT( + VkCommandBuffer commandBuffer, const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDescriptorBufferOffsets2EXT(commandBuffer, pSetDescriptorBufferOffsetsInfo); +} + +static inline void DispatchCmdBindDescriptorBufferEmbeddedSamplers2EXT( + VkCommandBuffer commandBuffer, const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBindDescriptorBufferEmbeddedSamplers2EXT(commandBuffer, pBindDescriptorBufferEmbeddedSamplersInfo); +} + +static inline VkResult DispatchCreateDebugReportCallbackEXT(VkInstance instance, + const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDebugReportCallbackEXT* pCallback) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + return dispatch->CreateDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, pCallback); +} + +static inline void DispatchDestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT callback, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + dispatch->DestroyDebugReportCallbackEXT(instance, callback, pAllocator); +} + +static inline void DispatchDebugReportMessageEXT(VkInstance instance, VkDebugReportFlagsEXT flags, + VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, + int32_t messageCode, const char* pLayerPrefix, const char* pMessage) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + dispatch->DebugReportMessageEXT(instance, flags, objectType, object, location, messageCode, pLayerPrefix, pMessage); +} + +static inline VkResult DispatchDebugMarkerSetObjectTagEXT(VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->DebugMarkerSetObjectTagEXT(device, pTagInfo); +} + +static inline VkResult DispatchDebugMarkerSetObjectNameEXT(VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->DebugMarkerSetObjectNameEXT(device, pNameInfo); +} + +static inline void DispatchCmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDebugMarkerBeginEXT(commandBuffer, pMarkerInfo); +} + +static inline void DispatchCmdDebugMarkerEndEXT(VkCommandBuffer commandBuffer) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDebugMarkerEndEXT(commandBuffer); +} + +static inline void DispatchCmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDebugMarkerInsertEXT(commandBuffer, pMarkerInfo); +} + +static inline void DispatchCmdBindTransformFeedbackBuffersEXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, + uint32_t bindingCount, const VkBuffer* pBuffers, + const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBindTransformFeedbackBuffersEXT(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes); +} + +static inline void DispatchCmdBeginTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, + uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, + const VkDeviceSize* pCounterBufferOffsets) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBeginTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, + pCounterBufferOffsets); +} + +static inline void DispatchCmdEndTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, + uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, + const VkDeviceSize* pCounterBufferOffsets) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdEndTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, pCounterBuffers, + pCounterBufferOffsets); +} + +static inline void DispatchCmdBeginQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, + VkQueryControlFlags flags, uint32_t index) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBeginQueryIndexedEXT(commandBuffer, queryPool, query, flags, index); +} + +static inline void DispatchCmdEndQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, + uint32_t index) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdEndQueryIndexedEXT(commandBuffer, queryPool, query, index); +} + +static inline void DispatchCmdDrawIndirectByteCountEXT(VkCommandBuffer commandBuffer, uint32_t instanceCount, + uint32_t firstInstance, VkBuffer counterBuffer, + VkDeviceSize counterBufferOffset, uint32_t counterOffset, + uint32_t vertexStride) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDrawIndirectByteCountEXT(commandBuffer, instanceCount, firstInstance, counterBuffer, counterBufferOffset, + counterOffset, vertexStride); +} + +static inline VkResult DispatchCreateCuModuleNVX(VkDevice device, const VkCuModuleCreateInfoNVX* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCuModuleNVX* pModule) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateCuModuleNVX(device, pCreateInfo, pAllocator, pModule); +} + +static inline VkResult DispatchCreateCuFunctionNVX(VkDevice device, const VkCuFunctionCreateInfoNVX* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCuFunctionNVX* pFunction) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateCuFunctionNVX(device, pCreateInfo, pAllocator, pFunction); +} + +static inline void DispatchDestroyCuModuleNVX(VkDevice device, VkCuModuleNVX module, const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyCuModuleNVX(device, module, pAllocator); +} + +static inline void DispatchDestroyCuFunctionNVX(VkDevice device, VkCuFunctionNVX function, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyCuFunctionNVX(device, function, pAllocator); +} + +static inline void DispatchCmdCuLaunchKernelNVX(VkCommandBuffer commandBuffer, const VkCuLaunchInfoNVX* pLaunchInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCuLaunchKernelNVX(commandBuffer, pLaunchInfo); +} + +static inline uint32_t DispatchGetImageViewHandleNVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetImageViewHandleNVX(device, pInfo); +} + +static inline uint64_t DispatchGetImageViewHandle64NVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetImageViewHandle64NVX(device, pInfo); +} + +static inline VkResult DispatchGetImageViewAddressNVX(VkDevice device, VkImageView imageView, + VkImageViewAddressPropertiesNVX* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetImageViewAddressNVX(device, imageView, pProperties); +} + +static inline void DispatchCmdDrawIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDrawIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); +} + +static inline void DispatchCmdDrawIndexedIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, uint32_t stride) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDrawIndexedIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); +} + +static inline VkResult DispatchGetShaderInfoAMD(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, + VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetShaderInfoAMD(device, pipeline, shaderStage, infoType, pInfoSize, pInfo); +} +#ifdef VK_USE_PLATFORM_GGP + +static inline VkResult DispatchCreateStreamDescriptorSurfaceGGP(VkInstance instance, + const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + return dispatch->CreateStreamDescriptorSurfaceGGP(instance, pCreateInfo, pAllocator, pSurface); +} +#endif // VK_USE_PLATFORM_GGP + +static inline VkResult DispatchGetPhysicalDeviceExternalImageFormatPropertiesNV( + VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, + VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, + VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceExternalImageFormatPropertiesNV(physicalDevice, format, type, tiling, usage, flags, + externalHandleType, pExternalImageFormatProperties); +} +#ifdef VK_USE_PLATFORM_WIN32_KHR + +static inline VkResult DispatchGetMemoryWin32HandleNV(VkDevice device, VkDeviceMemory memory, + VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetMemoryWin32HandleNV(device, memory, handleType, pHandle); +} +#endif // VK_USE_PLATFORM_WIN32_KHR +#ifdef VK_USE_PLATFORM_VI_NN + +static inline VkResult DispatchCreateViSurfaceNN(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + return dispatch->CreateViSurfaceNN(instance, pCreateInfo, pAllocator, pSurface); +} +#endif // VK_USE_PLATFORM_VI_NN + +static inline void DispatchCmdBeginConditionalRenderingEXT(VkCommandBuffer commandBuffer, + const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBeginConditionalRenderingEXT(commandBuffer, pConditionalRenderingBegin); +} + +static inline void DispatchCmdEndConditionalRenderingEXT(VkCommandBuffer commandBuffer) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdEndConditionalRenderingEXT(commandBuffer); +} + +static inline void DispatchCmdSetViewportWScalingNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, + const VkViewportWScalingNV* pViewportWScalings) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetViewportWScalingNV(commandBuffer, firstViewport, viewportCount, pViewportWScalings); +} + +static inline VkResult DispatchReleaseDisplayEXT(VkPhysicalDevice physicalDevice, VkDisplayKHR display) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->ReleaseDisplayEXT(physicalDevice, display); +} +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT + +static inline VkResult DispatchAcquireXlibDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->AcquireXlibDisplayEXT(physicalDevice, dpy, display); +} + +static inline VkResult DispatchGetRandROutputDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, + VkDisplayKHR* pDisplay) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetRandROutputDisplayEXT(physicalDevice, dpy, rrOutput, pDisplay); +} +#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT + +static inline VkResult DispatchGetPhysicalDeviceSurfaceCapabilities2EXT(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + VkSurfaceCapabilities2EXT* pSurfaceCapabilities) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceSurfaceCapabilities2EXT(physicalDevice, surface, pSurfaceCapabilities); +} + +static inline VkResult DispatchDisplayPowerControlEXT(VkDevice device, VkDisplayKHR display, + const VkDisplayPowerInfoEXT* pDisplayPowerInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->DisplayPowerControlEXT(device, display, pDisplayPowerInfo); +} + +static inline VkResult DispatchRegisterDeviceEventEXT(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, + const VkAllocationCallbacks* pAllocator, VkFence* pFence) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->RegisterDeviceEventEXT(device, pDeviceEventInfo, pAllocator, pFence); +} + +static inline VkResult DispatchRegisterDisplayEventEXT(VkDevice device, VkDisplayKHR display, + const VkDisplayEventInfoEXT* pDisplayEventInfo, + const VkAllocationCallbacks* pAllocator, VkFence* pFence) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->RegisterDisplayEventEXT(device, display, pDisplayEventInfo, pAllocator, pFence); +} + +static inline VkResult DispatchGetSwapchainCounterEXT(VkDevice device, VkSwapchainKHR swapchain, + VkSurfaceCounterFlagBitsEXT counter, uint64_t* pCounterValue) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetSwapchainCounterEXT(device, swapchain, counter, pCounterValue); +} + +static inline VkResult DispatchGetRefreshCycleDurationGOOGLE(VkDevice device, VkSwapchainKHR swapchain, + VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetRefreshCycleDurationGOOGLE(device, swapchain, pDisplayTimingProperties); +} + +static inline VkResult DispatchGetPastPresentationTimingGOOGLE(VkDevice device, VkSwapchainKHR swapchain, + uint32_t* pPresentationTimingCount, + VkPastPresentationTimingGOOGLE* pPresentationTimings) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetPastPresentationTimingGOOGLE(device, swapchain, pPresentationTimingCount, pPresentationTimings); +} + +static inline void DispatchCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, + uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDiscardRectangleEXT(commandBuffer, firstDiscardRectangle, discardRectangleCount, pDiscardRectangles); +} + +static inline void DispatchCmdSetDiscardRectangleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 discardRectangleEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDiscardRectangleEnableEXT(commandBuffer, discardRectangleEnable); +} + +static inline void DispatchCmdSetDiscardRectangleModeEXT(VkCommandBuffer commandBuffer, + VkDiscardRectangleModeEXT discardRectangleMode) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDiscardRectangleModeEXT(commandBuffer, discardRectangleMode); +} + +static inline void DispatchSetHdrMetadataEXT(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, + const VkHdrMetadataEXT* pMetadata) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->SetHdrMetadataEXT(device, swapchainCount, pSwapchains, pMetadata); +} +#ifdef VK_USE_PLATFORM_IOS_MVK + +static inline VkResult DispatchCreateIOSSurfaceMVK(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + return dispatch->CreateIOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); +} +#endif // VK_USE_PLATFORM_IOS_MVK +#ifdef VK_USE_PLATFORM_MACOS_MVK + +static inline VkResult DispatchCreateMacOSSurfaceMVK(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + return dispatch->CreateMacOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); +} +#endif // VK_USE_PLATFORM_MACOS_MVK + +static inline VkResult DispatchSetDebugUtilsObjectNameEXT(VkDevice device, const VkDebugUtilsObjectNameInfoEXT* pNameInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->SetDebugUtilsObjectNameEXT(device, pNameInfo); +} + +static inline VkResult DispatchSetDebugUtilsObjectTagEXT(VkDevice device, const VkDebugUtilsObjectTagInfoEXT* pTagInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->SetDebugUtilsObjectTagEXT(device, pTagInfo); +} + +static inline void DispatchQueueBeginDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + dispatch->QueueBeginDebugUtilsLabelEXT(queue, pLabelInfo); +} + +static inline void DispatchQueueEndDebugUtilsLabelEXT(VkQueue queue) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + dispatch->QueueEndDebugUtilsLabelEXT(queue); +} + +static inline void DispatchQueueInsertDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + dispatch->QueueInsertDebugUtilsLabelEXT(queue, pLabelInfo); +} + +static inline void DispatchCmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBeginDebugUtilsLabelEXT(commandBuffer, pLabelInfo); +} + +static inline void DispatchCmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdEndDebugUtilsLabelEXT(commandBuffer); +} + +static inline void DispatchCmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdInsertDebugUtilsLabelEXT(commandBuffer, pLabelInfo); +} + +static inline VkResult DispatchCreateDebugUtilsMessengerEXT(VkInstance instance, + const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDebugUtilsMessengerEXT* pMessenger) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + return dispatch->CreateDebugUtilsMessengerEXT(instance, pCreateInfo, pAllocator, pMessenger); +} + +static inline void DispatchDestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT messenger, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + dispatch->DestroyDebugUtilsMessengerEXT(instance, messenger, pAllocator); +} + +static inline void DispatchSubmitDebugUtilsMessageEXT(VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, + VkDebugUtilsMessageTypeFlagsEXT messageTypes, + const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + dispatch->SubmitDebugUtilsMessageEXT(instance, messageSeverity, messageTypes, pCallbackData); +} +#ifdef VK_USE_PLATFORM_ANDROID_KHR + +static inline VkResult DispatchGetAndroidHardwareBufferPropertiesANDROID(VkDevice device, const struct AHardwareBuffer* buffer, + VkAndroidHardwareBufferPropertiesANDROID* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetAndroidHardwareBufferPropertiesANDROID(device, buffer, pProperties); +} + +static inline VkResult DispatchGetMemoryAndroidHardwareBufferANDROID(VkDevice device, + const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, + struct AHardwareBuffer** pBuffer) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetMemoryAndroidHardwareBufferANDROID(device, pInfo, pBuffer); +} +#endif // VK_USE_PLATFORM_ANDROID_KHR +#ifdef VK_ENABLE_BETA_EXTENSIONS + +static inline VkResult DispatchCreateExecutionGraphPipelinesAMDX(VkDevice device, VkPipelineCache pipelineCache, + uint32_t createInfoCount, + const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateExecutionGraphPipelinesAMDX(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, + pPipelines); +} + +static inline VkResult DispatchGetExecutionGraphPipelineScratchSizeAMDX(VkDevice device, VkPipeline executionGraph, + VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetExecutionGraphPipelineScratchSizeAMDX(device, executionGraph, pSizeInfo); +} + +static inline VkResult DispatchGetExecutionGraphPipelineNodeIndexAMDX(VkDevice device, VkPipeline executionGraph, + const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo, + uint32_t* pNodeIndex) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetExecutionGraphPipelineNodeIndexAMDX(device, executionGraph, pNodeInfo, pNodeIndex); +} + +static inline void DispatchCmdInitializeGraphScratchMemoryAMDX(VkCommandBuffer commandBuffer, VkPipeline executionGraph, + VkDeviceAddress scratch, VkDeviceSize scratchSize) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdInitializeGraphScratchMemoryAMDX(commandBuffer, executionGraph, scratch, scratchSize); +} + +static inline void DispatchCmdDispatchGraphAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, + const VkDispatchGraphCountInfoAMDX* pCountInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDispatchGraphAMDX(commandBuffer, scratch, scratchSize, pCountInfo); +} + +static inline void DispatchCmdDispatchGraphIndirectAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, + VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX* pCountInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDispatchGraphIndirectAMDX(commandBuffer, scratch, scratchSize, pCountInfo); +} + +static inline void DispatchCmdDispatchGraphIndirectCountAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, + VkDeviceSize scratchSize, VkDeviceAddress countInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDispatchGraphIndirectCountAMDX(commandBuffer, scratch, scratchSize, countInfo); +} +#endif // VK_ENABLE_BETA_EXTENSIONS + +static inline void DispatchCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, + const VkSampleLocationsInfoEXT* pSampleLocationsInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetSampleLocationsEXT(commandBuffer, pSampleLocationsInfo); +} + +static inline void DispatchGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, + VkMultisamplePropertiesEXT* pMultisampleProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + dispatch->GetPhysicalDeviceMultisamplePropertiesEXT(physicalDevice, samples, pMultisampleProperties); +} + +static inline VkResult DispatchGetImageDrmFormatModifierPropertiesEXT(VkDevice device, VkImage image, + VkImageDrmFormatModifierPropertiesEXT* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetImageDrmFormatModifierPropertiesEXT(device, image, pProperties); +} + +static inline VkResult DispatchCreateValidationCacheEXT(VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkValidationCacheEXT* pValidationCache) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateValidationCacheEXT(device, pCreateInfo, pAllocator, pValidationCache); +} + +static inline void DispatchDestroyValidationCacheEXT(VkDevice device, VkValidationCacheEXT validationCache, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyValidationCacheEXT(device, validationCache, pAllocator); +} + +static inline VkResult DispatchMergeValidationCachesEXT(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, + const VkValidationCacheEXT* pSrcCaches) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->MergeValidationCachesEXT(device, dstCache, srcCacheCount, pSrcCaches); +} + +static inline VkResult DispatchGetValidationCacheDataEXT(VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, + void* pData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetValidationCacheDataEXT(device, validationCache, pDataSize, pData); +} + +static inline void DispatchCmdBindShadingRateImageNV(VkCommandBuffer commandBuffer, VkImageView imageView, + VkImageLayout imageLayout) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBindShadingRateImageNV(commandBuffer, imageView, imageLayout); +} + +static inline void DispatchCmdSetViewportShadingRatePaletteNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, + uint32_t viewportCount, + const VkShadingRatePaletteNV* pShadingRatePalettes) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetViewportShadingRatePaletteNV(commandBuffer, firstViewport, viewportCount, pShadingRatePalettes); +} + +static inline void DispatchCmdSetCoarseSampleOrderNV(VkCommandBuffer commandBuffer, VkCoarseSampleOrderTypeNV sampleOrderType, + uint32_t customSampleOrderCount, + const VkCoarseSampleOrderCustomNV* pCustomSampleOrders) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetCoarseSampleOrderNV(commandBuffer, sampleOrderType, customSampleOrderCount, pCustomSampleOrders); +} + +static inline VkResult DispatchCreateAccelerationStructureNV(VkDevice device, + const VkAccelerationStructureCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkAccelerationStructureNV* pAccelerationStructure) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateAccelerationStructureNV(device, pCreateInfo, pAllocator, pAccelerationStructure); +} + +static inline void DispatchDestroyAccelerationStructureNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyAccelerationStructureNV(device, accelerationStructure, pAllocator); +} + +static inline void DispatchGetAccelerationStructureMemoryRequirementsNV( + VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetAccelerationStructureMemoryRequirementsNV(device, pInfo, pMemoryRequirements); +} + +static inline VkResult DispatchBindAccelerationStructureMemoryNV(VkDevice device, uint32_t bindInfoCount, + const VkBindAccelerationStructureMemoryInfoNV* pBindInfos) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->BindAccelerationStructureMemoryNV(device, bindInfoCount, pBindInfos); +} + +static inline void DispatchCmdBuildAccelerationStructureNV(VkCommandBuffer commandBuffer, + const VkAccelerationStructureInfoNV* pInfo, VkBuffer instanceData, + VkDeviceSize instanceOffset, VkBool32 update, + VkAccelerationStructureNV dst, VkAccelerationStructureNV src, + VkBuffer scratch, VkDeviceSize scratchOffset) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBuildAccelerationStructureNV(commandBuffer, pInfo, instanceData, instanceOffset, update, dst, src, scratch, + scratchOffset); +} + +static inline void DispatchCmdCopyAccelerationStructureNV(VkCommandBuffer commandBuffer, VkAccelerationStructureNV dst, + VkAccelerationStructureNV src, VkCopyAccelerationStructureModeKHR mode) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCopyAccelerationStructureNV(commandBuffer, dst, src, mode); +} + +static inline void DispatchCmdTraceRaysNV(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) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdTraceRaysNV(commandBuffer, raygenShaderBindingTableBuffer, raygenShaderBindingOffset, missShaderBindingTableBuffer, + missShaderBindingOffset, missShaderBindingStride, hitShaderBindingTableBuffer, hitShaderBindingOffset, + hitShaderBindingStride, callableShaderBindingTableBuffer, callableShaderBindingOffset, + callableShaderBindingStride, width, height, depth); +} + +static inline VkResult DispatchCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoNV* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); +} + +static inline VkResult DispatchGetRayTracingShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, + uint32_t groupCount, size_t dataSize, void* pData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetRayTracingShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, dataSize, pData); +} + +static inline VkResult DispatchGetRayTracingShaderGroupHandlesNV(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, + uint32_t groupCount, size_t dataSize, void* pData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetRayTracingShaderGroupHandlesNV(device, pipeline, firstGroup, groupCount, dataSize, pData); +} + +static inline VkResult DispatchGetAccelerationStructureHandleNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, + size_t dataSize, void* pData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetAccelerationStructureHandleNV(device, accelerationStructure, dataSize, pData); +} + +static inline void DispatchCmdWriteAccelerationStructuresPropertiesNV(VkCommandBuffer commandBuffer, + uint32_t accelerationStructureCount, + const VkAccelerationStructureNV* pAccelerationStructures, + VkQueryType queryType, VkQueryPool queryPool, + uint32_t firstQuery) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdWriteAccelerationStructuresPropertiesNV(commandBuffer, accelerationStructureCount, pAccelerationStructures, + queryType, queryPool, firstQuery); +} + +static inline VkResult DispatchCompileDeferredNV(VkDevice device, VkPipeline pipeline, uint32_t shader) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CompileDeferredNV(device, pipeline, shader); +} + +static inline VkResult DispatchGetMemoryHostPointerPropertiesEXT(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, + const void* pHostPointer, + VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetMemoryHostPointerPropertiesEXT(device, handleType, pHostPointer, pMemoryHostPointerProperties); +} + +static inline void DispatchCmdWriteBufferMarkerAMD(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, + VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdWriteBufferMarkerAMD(commandBuffer, pipelineStage, dstBuffer, dstOffset, marker); +} + +static inline void DispatchCmdWriteBufferMarker2AMD(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkBuffer dstBuffer, + VkDeviceSize dstOffset, uint32_t marker) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdWriteBufferMarker2AMD(commandBuffer, stage, dstBuffer, dstOffset, marker); +} + +static inline VkResult DispatchGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, + uint32_t* pTimeDomainCount, + VkTimeDomainKHR* pTimeDomains) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceCalibrateableTimeDomainsEXT(physicalDevice, pTimeDomainCount, pTimeDomains); +} + +static inline VkResult DispatchGetCalibratedTimestampsEXT(VkDevice device, uint32_t timestampCount, + const VkCalibratedTimestampInfoKHR* pTimestampInfos, + uint64_t* pTimestamps, uint64_t* pMaxDeviation) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetCalibratedTimestampsEXT(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation); +} + +static inline void DispatchCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDrawMeshTasksNV(commandBuffer, taskCount, firstTask); +} + +static inline void DispatchCmdDrawMeshTasksIndirectNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + uint32_t drawCount, uint32_t stride) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDrawMeshTasksIndirectNV(commandBuffer, buffer, offset, drawCount, stride); +} + +static inline void DispatchCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, uint32_t stride) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDrawMeshTasksIndirectCountNV(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); +} + +static inline void DispatchCmdSetExclusiveScissorEnableNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, + uint32_t exclusiveScissorCount, + const VkBool32* pExclusiveScissorEnables) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetExclusiveScissorEnableNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, pExclusiveScissorEnables); +} + +static inline void DispatchCmdSetExclusiveScissorNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, + uint32_t exclusiveScissorCount, const VkRect2D* pExclusiveScissors) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetExclusiveScissorNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, pExclusiveScissors); +} + +static inline void DispatchCmdSetCheckpointNV(VkCommandBuffer commandBuffer, const void* pCheckpointMarker) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetCheckpointNV(commandBuffer, pCheckpointMarker); +} + +static inline void DispatchGetQueueCheckpointDataNV(VkQueue queue, uint32_t* pCheckpointDataCount, + VkCheckpointDataNV* pCheckpointData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + dispatch->GetQueueCheckpointDataNV(queue, pCheckpointDataCount, pCheckpointData); +} + +static inline void DispatchGetQueueCheckpointData2NV(VkQueue queue, uint32_t* pCheckpointDataCount, + VkCheckpointData2NV* pCheckpointData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + dispatch->GetQueueCheckpointData2NV(queue, pCheckpointDataCount, pCheckpointData); +} + +static inline VkResult DispatchInitializePerformanceApiINTEL(VkDevice device, + const VkInitializePerformanceApiInfoINTEL* pInitializeInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->InitializePerformanceApiINTEL(device, pInitializeInfo); +} + +static inline void DispatchUninitializePerformanceApiINTEL(VkDevice device) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->UninitializePerformanceApiINTEL(device); +} + +static inline VkResult DispatchCmdSetPerformanceMarkerINTEL(VkCommandBuffer commandBuffer, + const VkPerformanceMarkerInfoINTEL* pMarkerInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + return dispatch->CmdSetPerformanceMarkerINTEL(commandBuffer, pMarkerInfo); +} + +static inline VkResult DispatchCmdSetPerformanceStreamMarkerINTEL(VkCommandBuffer commandBuffer, + const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + return dispatch->CmdSetPerformanceStreamMarkerINTEL(commandBuffer, pMarkerInfo); +} + +static inline VkResult DispatchCmdSetPerformanceOverrideINTEL(VkCommandBuffer commandBuffer, + const VkPerformanceOverrideInfoINTEL* pOverrideInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + return dispatch->CmdSetPerformanceOverrideINTEL(commandBuffer, pOverrideInfo); +} + +static inline VkResult DispatchAcquirePerformanceConfigurationINTEL(VkDevice device, + const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, + VkPerformanceConfigurationINTEL* pConfiguration) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->AcquirePerformanceConfigurationINTEL(device, pAcquireInfo, pConfiguration); +} + +static inline VkResult DispatchReleasePerformanceConfigurationINTEL(VkDevice device, + VkPerformanceConfigurationINTEL configuration) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->ReleasePerformanceConfigurationINTEL(device, configuration); +} + +static inline VkResult DispatchQueueSetPerformanceConfigurationINTEL(VkQueue queue, VkPerformanceConfigurationINTEL configuration) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + return dispatch->QueueSetPerformanceConfigurationINTEL(queue, configuration); +} + +static inline VkResult DispatchGetPerformanceParameterINTEL(VkDevice device, VkPerformanceParameterTypeINTEL parameter, + VkPerformanceValueINTEL* pValue) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetPerformanceParameterINTEL(device, parameter, pValue); +} + +static inline void DispatchSetLocalDimmingAMD(VkDevice device, VkSwapchainKHR swapChain, VkBool32 localDimmingEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->SetLocalDimmingAMD(device, swapChain, localDimmingEnable); +} +#ifdef VK_USE_PLATFORM_FUCHSIA + +static inline VkResult DispatchCreateImagePipeSurfaceFUCHSIA(VkInstance instance, + const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + return dispatch->CreateImagePipeSurfaceFUCHSIA(instance, pCreateInfo, pAllocator, pSurface); +} +#endif // VK_USE_PLATFORM_FUCHSIA +#ifdef VK_USE_PLATFORM_METAL_EXT + +static inline VkResult DispatchCreateMetalSurfaceEXT(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + return dispatch->CreateMetalSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); +} +#endif // VK_USE_PLATFORM_METAL_EXT + +static inline VkDeviceAddress DispatchGetBufferDeviceAddressEXT(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetBufferDeviceAddressEXT(device, pInfo); +} + +static inline VkResult DispatchGetPhysicalDeviceToolPropertiesEXT(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, + VkPhysicalDeviceToolProperties* pToolProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceToolPropertiesEXT(physicalDevice, pToolCount, pToolProperties); +} + +static inline VkResult DispatchGetPhysicalDeviceCooperativeMatrixPropertiesNV(VkPhysicalDevice physicalDevice, + uint32_t* pPropertyCount, + VkCooperativeMatrixPropertiesNV* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceCooperativeMatrixPropertiesNV(physicalDevice, pPropertyCount, pProperties); +} + +static inline VkResult DispatchGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( + VkPhysicalDevice physicalDevice, uint32_t* pCombinationCount, VkFramebufferMixedSamplesCombinationNV* pCombinations) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(physicalDevice, pCombinationCount, + pCombinations); +} +#ifdef VK_USE_PLATFORM_WIN32_KHR + +static inline VkResult DispatchGetPhysicalDeviceSurfacePresentModes2EXT(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + uint32_t* pPresentModeCount, + VkPresentModeKHR* pPresentModes) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceSurfacePresentModes2EXT(physicalDevice, pSurfaceInfo, pPresentModeCount, pPresentModes); +} + +static inline VkResult DispatchAcquireFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->AcquireFullScreenExclusiveModeEXT(device, swapchain); +} + +static inline VkResult DispatchReleaseFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->ReleaseFullScreenExclusiveModeEXT(device, swapchain); +} + +static inline VkResult DispatchGetDeviceGroupSurfacePresentModes2EXT(VkDevice device, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + VkDeviceGroupPresentModeFlagsKHR* pModes) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetDeviceGroupSurfacePresentModes2EXT(device, pSurfaceInfo, pModes); +} +#endif // VK_USE_PLATFORM_WIN32_KHR + +static inline VkResult DispatchCreateHeadlessSurfaceEXT(VkInstance instance, const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + return dispatch->CreateHeadlessSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); +} + +static inline void DispatchCmdSetLineStippleEXT(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, + uint16_t lineStipplePattern) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetLineStippleEXT(commandBuffer, lineStippleFactor, lineStipplePattern); +} + +static inline void DispatchResetQueryPoolEXT(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->ResetQueryPoolEXT(device, queryPool, firstQuery, queryCount); +} + +static inline void DispatchCmdSetCullModeEXT(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetCullModeEXT(commandBuffer, cullMode); +} + +static inline void DispatchCmdSetFrontFaceEXT(VkCommandBuffer commandBuffer, VkFrontFace frontFace) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetFrontFaceEXT(commandBuffer, frontFace); +} + +static inline void DispatchCmdSetPrimitiveTopologyEXT(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetPrimitiveTopologyEXT(commandBuffer, primitiveTopology); +} + +static inline void DispatchCmdSetViewportWithCountEXT(VkCommandBuffer commandBuffer, uint32_t viewportCount, + const VkViewport* pViewports) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetViewportWithCountEXT(commandBuffer, viewportCount, pViewports); +} + +static inline void DispatchCmdSetScissorWithCountEXT(VkCommandBuffer commandBuffer, uint32_t scissorCount, + const VkRect2D* pScissors) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetScissorWithCountEXT(commandBuffer, scissorCount, pScissors); +} + +static inline void DispatchCmdBindVertexBuffers2EXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, + const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, + const VkDeviceSize* pSizes, const VkDeviceSize* pStrides) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBindVertexBuffers2EXT(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, pStrides); +} + +static inline void DispatchCmdSetDepthTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDepthTestEnableEXT(commandBuffer, depthTestEnable); +} + +static inline void DispatchCmdSetDepthWriteEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDepthWriteEnableEXT(commandBuffer, depthWriteEnable); +} + +static inline void DispatchCmdSetDepthCompareOpEXT(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDepthCompareOpEXT(commandBuffer, depthCompareOp); +} + +static inline void DispatchCmdSetDepthBoundsTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDepthBoundsTestEnableEXT(commandBuffer, depthBoundsTestEnable); +} + +static inline void DispatchCmdSetStencilTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetStencilTestEnableEXT(commandBuffer, stencilTestEnable); +} + +static inline void DispatchCmdSetStencilOpEXT(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, + VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetStencilOpEXT(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp); +} + +static inline VkResult DispatchCopyMemoryToImageEXT(VkDevice device, const VkCopyMemoryToImageInfoEXT* pCopyMemoryToImageInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CopyMemoryToImageEXT(device, pCopyMemoryToImageInfo); +} + +static inline VkResult DispatchCopyImageToMemoryEXT(VkDevice device, const VkCopyImageToMemoryInfoEXT* pCopyImageToMemoryInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CopyImageToMemoryEXT(device, pCopyImageToMemoryInfo); +} + +static inline VkResult DispatchCopyImageToImageEXT(VkDevice device, const VkCopyImageToImageInfoEXT* pCopyImageToImageInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CopyImageToImageEXT(device, pCopyImageToImageInfo); +} + +static inline VkResult DispatchTransitionImageLayoutEXT(VkDevice device, uint32_t transitionCount, + const VkHostImageLayoutTransitionInfoEXT* pTransitions) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->TransitionImageLayoutEXT(device, transitionCount, pTransitions); +} + +static inline void DispatchGetImageSubresourceLayout2EXT(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, + VkSubresourceLayout2KHR* pLayout) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetImageSubresourceLayout2EXT(device, image, pSubresource, pLayout); +} + +static inline VkResult DispatchReleaseSwapchainImagesEXT(VkDevice device, const VkReleaseSwapchainImagesInfoEXT* pReleaseInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->ReleaseSwapchainImagesEXT(device, pReleaseInfo); +} + +static inline void DispatchGetGeneratedCommandsMemoryRequirementsNV(VkDevice device, + const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo, + VkMemoryRequirements2* pMemoryRequirements) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetGeneratedCommandsMemoryRequirementsNV(device, pInfo, pMemoryRequirements); +} + +static inline void DispatchCmdPreprocessGeneratedCommandsNV(VkCommandBuffer commandBuffer, + const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdPreprocessGeneratedCommandsNV(commandBuffer, pGeneratedCommandsInfo); +} + +static inline void DispatchCmdExecuteGeneratedCommandsNV(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, + const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdExecuteGeneratedCommandsNV(commandBuffer, isPreprocessed, pGeneratedCommandsInfo); +} + +static inline void DispatchCmdBindPipelineShaderGroupNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipeline pipeline, uint32_t groupIndex) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBindPipelineShaderGroupNV(commandBuffer, pipelineBindPoint, pipeline, groupIndex); +} + +static inline VkResult DispatchCreateIndirectCommandsLayoutNV(VkDevice device, + const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkIndirectCommandsLayoutNV* pIndirectCommandsLayout) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateIndirectCommandsLayoutNV(device, pCreateInfo, pAllocator, pIndirectCommandsLayout); +} + +static inline void DispatchDestroyIndirectCommandsLayoutNV(VkDevice device, VkIndirectCommandsLayoutNV indirectCommandsLayout, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyIndirectCommandsLayoutNV(device, indirectCommandsLayout, pAllocator); +} + +static inline void DispatchCmdSetDepthBias2EXT(VkCommandBuffer commandBuffer, const VkDepthBiasInfoEXT* pDepthBiasInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDepthBias2EXT(commandBuffer, pDepthBiasInfo); +} + +static inline VkResult DispatchAcquireDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, VkDisplayKHR display) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->AcquireDrmDisplayEXT(physicalDevice, drmFd, display); +} + +static inline VkResult DispatchGetDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, uint32_t connectorId, + VkDisplayKHR* display) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetDrmDisplayEXT(physicalDevice, drmFd, connectorId, display); +} + +static inline VkResult DispatchCreatePrivateDataSlotEXT(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkPrivateDataSlot* pPrivateDataSlot) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreatePrivateDataSlotEXT(device, pCreateInfo, pAllocator, pPrivateDataSlot); +} + +static inline void DispatchDestroyPrivateDataSlotEXT(VkDevice device, VkPrivateDataSlot privateDataSlot, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyPrivateDataSlotEXT(device, privateDataSlot, pAllocator); +} + +static inline VkResult DispatchSetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, + VkPrivateDataSlot privateDataSlot, uint64_t data) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->SetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, data); +} + +static inline void DispatchGetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, + VkPrivateDataSlot privateDataSlot, uint64_t* pData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, pData); +} + +static inline VkResult DispatchCreateCudaModuleNV(VkDevice device, const VkCudaModuleCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCudaModuleNV* pModule) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateCudaModuleNV(device, pCreateInfo, pAllocator, pModule); +} + +static inline VkResult DispatchGetCudaModuleCacheNV(VkDevice device, VkCudaModuleNV module, size_t* pCacheSize, void* pCacheData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetCudaModuleCacheNV(device, module, pCacheSize, pCacheData); +} + +static inline VkResult DispatchCreateCudaFunctionNV(VkDevice device, const VkCudaFunctionCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCudaFunctionNV* pFunction) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateCudaFunctionNV(device, pCreateInfo, pAllocator, pFunction); +} + +static inline void DispatchDestroyCudaModuleNV(VkDevice device, VkCudaModuleNV module, const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyCudaModuleNV(device, module, pAllocator); +} + +static inline void DispatchDestroyCudaFunctionNV(VkDevice device, VkCudaFunctionNV function, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyCudaFunctionNV(device, function, pAllocator); +} + +static inline void DispatchCmdCudaLaunchKernelNV(VkCommandBuffer commandBuffer, const VkCudaLaunchInfoNV* pLaunchInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCudaLaunchKernelNV(commandBuffer, pLaunchInfo); +} +#ifdef VK_USE_PLATFORM_METAL_EXT + +static inline void DispatchExportMetalObjectsEXT(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->ExportMetalObjectsEXT(device, pMetalObjectsInfo); +} +#endif // VK_USE_PLATFORM_METAL_EXT + +static inline void DispatchGetDescriptorSetLayoutSizeEXT(VkDevice device, VkDescriptorSetLayout layout, + VkDeviceSize* pLayoutSizeInBytes) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetDescriptorSetLayoutSizeEXT(device, layout, pLayoutSizeInBytes); +} + +static inline void DispatchGetDescriptorSetLayoutBindingOffsetEXT(VkDevice device, VkDescriptorSetLayout layout, uint32_t binding, + VkDeviceSize* pOffset) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetDescriptorSetLayoutBindingOffsetEXT(device, layout, binding, pOffset); +} + +static inline void DispatchGetDescriptorEXT(VkDevice device, const VkDescriptorGetInfoEXT* pDescriptorInfo, size_t dataSize, + void* pDescriptor) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetDescriptorEXT(device, pDescriptorInfo, dataSize, pDescriptor); +} + +static inline void DispatchCmdBindDescriptorBuffersEXT(VkCommandBuffer commandBuffer, uint32_t bufferCount, + const VkDescriptorBufferBindingInfoEXT* pBindingInfos) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBindDescriptorBuffersEXT(commandBuffer, bufferCount, pBindingInfos); +} + +static inline void DispatchCmdSetDescriptorBufferOffsetsEXT(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, + const uint32_t* pBufferIndices, const VkDeviceSize* pOffsets) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDescriptorBufferOffsetsEXT(commandBuffer, pipelineBindPoint, layout, firstSet, setCount, pBufferIndices, + pOffsets); +} + +static inline void DispatchCmdBindDescriptorBufferEmbeddedSamplersEXT(VkCommandBuffer commandBuffer, + VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, uint32_t set) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBindDescriptorBufferEmbeddedSamplersEXT(commandBuffer, pipelineBindPoint, layout, set); +} + +static inline VkResult DispatchGetBufferOpaqueCaptureDescriptorDataEXT(VkDevice device, + const VkBufferCaptureDescriptorDataInfoEXT* pInfo, + void* pData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetBufferOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); +} + +static inline VkResult DispatchGetImageOpaqueCaptureDescriptorDataEXT(VkDevice device, + const VkImageCaptureDescriptorDataInfoEXT* pInfo, + void* pData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetImageOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); +} + +static inline VkResult DispatchGetImageViewOpaqueCaptureDescriptorDataEXT(VkDevice device, + const VkImageViewCaptureDescriptorDataInfoEXT* pInfo, + void* pData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetImageViewOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); +} + +static inline VkResult DispatchGetSamplerOpaqueCaptureDescriptorDataEXT(VkDevice device, + const VkSamplerCaptureDescriptorDataInfoEXT* pInfo, + void* pData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetSamplerOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); +} + +static inline VkResult DispatchGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( + VkDevice device, const VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfo, void* pData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetAccelerationStructureOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); +} + +static inline void DispatchCmdSetFragmentShadingRateEnumNV(VkCommandBuffer commandBuffer, VkFragmentShadingRateNV shadingRate, + const VkFragmentShadingRateCombinerOpKHR combinerOps[2]) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetFragmentShadingRateEnumNV(commandBuffer, shadingRate, combinerOps); +} + +static inline VkResult DispatchGetDeviceFaultInfoEXT(VkDevice device, VkDeviceFaultCountsEXT* pFaultCounts, + VkDeviceFaultInfoEXT* pFaultInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetDeviceFaultInfoEXT(device, pFaultCounts, pFaultInfo); +} +#ifdef VK_USE_PLATFORM_WIN32_KHR + +static inline VkResult DispatchAcquireWinrtDisplayNV(VkPhysicalDevice physicalDevice, VkDisplayKHR display) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->AcquireWinrtDisplayNV(physicalDevice, display); +} + +static inline VkResult DispatchGetWinrtDisplayNV(VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, + VkDisplayKHR* pDisplay) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetWinrtDisplayNV(physicalDevice, deviceRelativeId, pDisplay); +} +#endif // VK_USE_PLATFORM_WIN32_KHR +#ifdef VK_USE_PLATFORM_DIRECTFB_EXT + +static inline VkResult DispatchCreateDirectFBSurfaceEXT(VkInstance instance, const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + return dispatch->CreateDirectFBSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); +} + +static inline VkBool32 DispatchGetPhysicalDeviceDirectFBPresentationSupportEXT(VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex, IDirectFB* dfb) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceDirectFBPresentationSupportEXT(physicalDevice, queueFamilyIndex, dfb); +} +#endif // VK_USE_PLATFORM_DIRECTFB_EXT + +static inline void DispatchCmdSetVertexInputEXT(VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, + const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, + uint32_t vertexAttributeDescriptionCount, + const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetVertexInputEXT(commandBuffer, vertexBindingDescriptionCount, pVertexBindingDescriptions, + vertexAttributeDescriptionCount, pVertexAttributeDescriptions); +} +#ifdef VK_USE_PLATFORM_FUCHSIA + +static inline VkResult DispatchGetMemoryZirconHandleFUCHSIA(VkDevice device, + const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, + zx_handle_t* pZirconHandle) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetMemoryZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle); +} + +static inline VkResult DispatchGetMemoryZirconHandlePropertiesFUCHSIA( + VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, + VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetMemoryZirconHandlePropertiesFUCHSIA(device, handleType, zirconHandle, pMemoryZirconHandleProperties); +} + +static inline VkResult DispatchImportSemaphoreZirconHandleFUCHSIA( + VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->ImportSemaphoreZirconHandleFUCHSIA(device, pImportSemaphoreZirconHandleInfo); +} + +static inline VkResult DispatchGetSemaphoreZirconHandleFUCHSIA(VkDevice device, + const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, + zx_handle_t* pZirconHandle) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetSemaphoreZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle); +} + +static inline VkResult DispatchCreateBufferCollectionFUCHSIA(VkDevice device, + const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkBufferCollectionFUCHSIA* pCollection) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateBufferCollectionFUCHSIA(device, pCreateInfo, pAllocator, pCollection); +} + +static inline VkResult DispatchSetBufferCollectionImageConstraintsFUCHSIA( + VkDevice device, VkBufferCollectionFUCHSIA collection, const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->SetBufferCollectionImageConstraintsFUCHSIA(device, collection, pImageConstraintsInfo); +} + +static inline VkResult DispatchSetBufferCollectionBufferConstraintsFUCHSIA( + VkDevice device, VkBufferCollectionFUCHSIA collection, const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->SetBufferCollectionBufferConstraintsFUCHSIA(device, collection, pBufferConstraintsInfo); +} + +static inline void DispatchDestroyBufferCollectionFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyBufferCollectionFUCHSIA(device, collection, pAllocator); +} + +static inline VkResult DispatchGetBufferCollectionPropertiesFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, + VkBufferCollectionPropertiesFUCHSIA* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetBufferCollectionPropertiesFUCHSIA(device, collection, pProperties); +} +#endif // VK_USE_PLATFORM_FUCHSIA + +static inline VkResult DispatchGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(VkDevice device, VkRenderPass renderpass, + VkExtent2D* pMaxWorkgroupSize) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(device, renderpass, pMaxWorkgroupSize); +} + +static inline void DispatchCmdSubpassShadingHUAWEI(VkCommandBuffer commandBuffer) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSubpassShadingHUAWEI(commandBuffer); +} + +static inline void DispatchCmdBindInvocationMaskHUAWEI(VkCommandBuffer commandBuffer, VkImageView imageView, + VkImageLayout imageLayout) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBindInvocationMaskHUAWEI(commandBuffer, imageView, imageLayout); +} + +static inline VkResult DispatchGetMemoryRemoteAddressNV(VkDevice device, + const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo, + VkRemoteAddressNV* pAddress) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetMemoryRemoteAddressNV(device, pMemoryGetRemoteAddressInfo, pAddress); +} + +static inline VkResult DispatchGetPipelinePropertiesEXT(VkDevice device, const VkPipelineInfoEXT* pPipelineInfo, + VkBaseOutStructure* pPipelineProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetPipelinePropertiesEXT(device, pPipelineInfo, pPipelineProperties); +} + +static inline void DispatchCmdSetPatchControlPointsEXT(VkCommandBuffer commandBuffer, uint32_t patchControlPoints) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetPatchControlPointsEXT(commandBuffer, patchControlPoints); +} + +static inline void DispatchCmdSetRasterizerDiscardEnableEXT(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetRasterizerDiscardEnableEXT(commandBuffer, rasterizerDiscardEnable); +} + +static inline void DispatchCmdSetDepthBiasEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDepthBiasEnableEXT(commandBuffer, depthBiasEnable); +} + +static inline void DispatchCmdSetLogicOpEXT(VkCommandBuffer commandBuffer, VkLogicOp logicOp) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetLogicOpEXT(commandBuffer, logicOp); +} + +static inline void DispatchCmdSetPrimitiveRestartEnableEXT(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetPrimitiveRestartEnableEXT(commandBuffer, primitiveRestartEnable); +} +#ifdef VK_USE_PLATFORM_SCREEN_QNX + +static inline VkResult DispatchCreateScreenSurfaceQNX(VkInstance instance, const VkScreenSurfaceCreateInfoQNX* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); + return dispatch->CreateScreenSurfaceQNX(instance, pCreateInfo, pAllocator, pSurface); +} + +static inline VkBool32 DispatchGetPhysicalDeviceScreenPresentationSupportQNX(VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex, + struct _screen_window* window) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceScreenPresentationSupportQNX(physicalDevice, queueFamilyIndex, window); +} +#endif // VK_USE_PLATFORM_SCREEN_QNX + +static inline void DispatchCmdSetColorWriteEnableEXT(VkCommandBuffer commandBuffer, uint32_t attachmentCount, + const VkBool32* pColorWriteEnables) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetColorWriteEnableEXT(commandBuffer, attachmentCount, pColorWriteEnables); +} + +static inline void DispatchCmdDrawMultiEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawInfoEXT* pVertexInfo, + uint32_t instanceCount, uint32_t firstInstance, uint32_t stride) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDrawMultiEXT(commandBuffer, drawCount, pVertexInfo, instanceCount, firstInstance, stride); +} + +static inline void DispatchCmdDrawMultiIndexedEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, + const VkMultiDrawIndexedInfoEXT* pIndexInfo, uint32_t instanceCount, + uint32_t firstInstance, uint32_t stride, const int32_t* pVertexOffset) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDrawMultiIndexedEXT(commandBuffer, drawCount, pIndexInfo, instanceCount, firstInstance, stride, pVertexOffset); +} + +static inline VkResult DispatchCreateMicromapEXT(VkDevice device, const VkMicromapCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkMicromapEXT* pMicromap) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateMicromapEXT(device, pCreateInfo, pAllocator, pMicromap); +} + +static inline void DispatchDestroyMicromapEXT(VkDevice device, VkMicromapEXT micromap, const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyMicromapEXT(device, micromap, pAllocator); +} + +static inline void DispatchCmdBuildMicromapsEXT(VkCommandBuffer commandBuffer, uint32_t infoCount, + const VkMicromapBuildInfoEXT* pInfos) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBuildMicromapsEXT(commandBuffer, infoCount, pInfos); +} + +static inline VkResult DispatchBuildMicromapsEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, + const VkMicromapBuildInfoEXT* pInfos) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->BuildMicromapsEXT(device, deferredOperation, infoCount, pInfos); +} + +static inline VkResult DispatchCopyMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMicromapInfoEXT* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CopyMicromapEXT(device, deferredOperation, pInfo); +} + +static inline VkResult DispatchCopyMicromapToMemoryEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMicromapToMemoryInfoEXT* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CopyMicromapToMemoryEXT(device, deferredOperation, pInfo); +} + +static inline VkResult DispatchCopyMemoryToMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMemoryToMicromapInfoEXT* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CopyMemoryToMicromapEXT(device, deferredOperation, pInfo); +} + +static inline VkResult DispatchWriteMicromapsPropertiesEXT(VkDevice device, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, + VkQueryType queryType, size_t dataSize, void* pData, size_t stride) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->WriteMicromapsPropertiesEXT(device, micromapCount, pMicromaps, queryType, dataSize, pData, stride); +} + +static inline void DispatchCmdCopyMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCopyMicromapEXT(commandBuffer, pInfo); +} + +static inline void DispatchCmdCopyMicromapToMemoryEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCopyMicromapToMemoryEXT(commandBuffer, pInfo); +} + +static inline void DispatchCmdCopyMemoryToMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCopyMemoryToMicromapEXT(commandBuffer, pInfo); +} + +static inline void DispatchCmdWriteMicromapsPropertiesEXT(VkCommandBuffer commandBuffer, uint32_t micromapCount, + const VkMicromapEXT* pMicromaps, VkQueryType queryType, + VkQueryPool queryPool, uint32_t firstQuery) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdWriteMicromapsPropertiesEXT(commandBuffer, micromapCount, pMicromaps, queryType, queryPool, firstQuery); +} + +static inline void DispatchGetDeviceMicromapCompatibilityEXT(VkDevice device, const VkMicromapVersionInfoEXT* pVersionInfo, + VkAccelerationStructureCompatibilityKHR* pCompatibility) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetDeviceMicromapCompatibilityEXT(device, pVersionInfo, pCompatibility); +} + +static inline void DispatchGetMicromapBuildSizesEXT(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, + const VkMicromapBuildInfoEXT* pBuildInfo, + VkMicromapBuildSizesInfoEXT* pSizeInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetMicromapBuildSizesEXT(device, buildType, pBuildInfo, pSizeInfo); +} + +static inline void DispatchCmdDrawClusterHUAWEI(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, + uint32_t groupCountZ) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDrawClusterHUAWEI(commandBuffer, groupCountX, groupCountY, groupCountZ); +} + +static inline void DispatchCmdDrawClusterIndirectHUAWEI(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDrawClusterIndirectHUAWEI(commandBuffer, buffer, offset); +} + +static inline void DispatchSetDeviceMemoryPriorityEXT(VkDevice device, VkDeviceMemory memory, float priority) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->SetDeviceMemoryPriorityEXT(device, memory, priority); +} + +static inline void DispatchGetDescriptorSetLayoutHostMappingInfoVALVE(VkDevice device, + const VkDescriptorSetBindingReferenceVALVE* pBindingReference, + VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetDescriptorSetLayoutHostMappingInfoVALVE(device, pBindingReference, pHostMapping); +} + +static inline void DispatchGetDescriptorSetHostMappingVALVE(VkDevice device, VkDescriptorSet descriptorSet, void** ppData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetDescriptorSetHostMappingVALVE(device, descriptorSet, ppData); +} + +static inline void DispatchCmdCopyMemoryIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, + uint32_t copyCount, uint32_t stride) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCopyMemoryIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride); +} + +static inline void DispatchCmdCopyMemoryToImageIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, + uint32_t copyCount, uint32_t stride, VkImage dstImage, + VkImageLayout dstImageLayout, + const VkImageSubresourceLayers* pImageSubresources) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCopyMemoryToImageIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride, dstImage, dstImageLayout, + pImageSubresources); +} + +static inline void DispatchCmdDecompressMemoryNV(VkCommandBuffer commandBuffer, uint32_t decompressRegionCount, + const VkDecompressMemoryRegionNV* pDecompressMemoryRegions) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDecompressMemoryNV(commandBuffer, decompressRegionCount, pDecompressMemoryRegions); +} + +static inline void DispatchCmdDecompressMemoryIndirectCountNV(VkCommandBuffer commandBuffer, + VkDeviceAddress indirectCommandsAddress, + VkDeviceAddress indirectCommandsCountAddress, uint32_t stride) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDecompressMemoryIndirectCountNV(commandBuffer, indirectCommandsAddress, indirectCommandsCountAddress, stride); +} + +static inline void DispatchGetPipelineIndirectMemoryRequirementsNV(VkDevice device, const VkComputePipelineCreateInfo* pCreateInfo, + VkMemoryRequirements2* pMemoryRequirements) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetPipelineIndirectMemoryRequirementsNV(device, pCreateInfo, pMemoryRequirements); +} + +static inline void DispatchCmdUpdatePipelineIndirectBufferNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipeline pipeline) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdUpdatePipelineIndirectBufferNV(commandBuffer, pipelineBindPoint, pipeline); +} + +static inline VkDeviceAddress DispatchGetPipelineIndirectDeviceAddressNV(VkDevice device, + const VkPipelineIndirectDeviceAddressInfoNV* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetPipelineIndirectDeviceAddressNV(device, pInfo); +} + +static inline void DispatchCmdSetDepthClampEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClampEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDepthClampEnableEXT(commandBuffer, depthClampEnable); +} + +static inline void DispatchCmdSetPolygonModeEXT(VkCommandBuffer commandBuffer, VkPolygonMode polygonMode) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetPolygonModeEXT(commandBuffer, polygonMode); +} + +static inline void DispatchCmdSetRasterizationSamplesEXT(VkCommandBuffer commandBuffer, + VkSampleCountFlagBits rasterizationSamples) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetRasterizationSamplesEXT(commandBuffer, rasterizationSamples); +} + +static inline void DispatchCmdSetSampleMaskEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits samples, + const VkSampleMask* pSampleMask) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetSampleMaskEXT(commandBuffer, samples, pSampleMask); +} + +static inline void DispatchCmdSetAlphaToCoverageEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToCoverageEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetAlphaToCoverageEnableEXT(commandBuffer, alphaToCoverageEnable); +} + +static inline void DispatchCmdSetAlphaToOneEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToOneEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetAlphaToOneEnableEXT(commandBuffer, alphaToOneEnable); +} + +static inline void DispatchCmdSetLogicOpEnableEXT(VkCommandBuffer commandBuffer, VkBool32 logicOpEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetLogicOpEnableEXT(commandBuffer, logicOpEnable); +} + +static inline void DispatchCmdSetColorBlendEnableEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, + uint32_t attachmentCount, const VkBool32* pColorBlendEnables) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetColorBlendEnableEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendEnables); +} + +static inline void DispatchCmdSetColorBlendEquationEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, + uint32_t attachmentCount, + const VkColorBlendEquationEXT* pColorBlendEquations) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetColorBlendEquationEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendEquations); +} + +static inline void DispatchCmdSetColorWriteMaskEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, + uint32_t attachmentCount, const VkColorComponentFlags* pColorWriteMasks) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetColorWriteMaskEXT(commandBuffer, firstAttachment, attachmentCount, pColorWriteMasks); +} + +static inline void DispatchCmdSetTessellationDomainOriginEXT(VkCommandBuffer commandBuffer, + VkTessellationDomainOrigin domainOrigin) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetTessellationDomainOriginEXT(commandBuffer, domainOrigin); +} + +static inline void DispatchCmdSetRasterizationStreamEXT(VkCommandBuffer commandBuffer, uint32_t rasterizationStream) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetRasterizationStreamEXT(commandBuffer, rasterizationStream); +} + +static inline void DispatchCmdSetConservativeRasterizationModeEXT( + VkCommandBuffer commandBuffer, VkConservativeRasterizationModeEXT conservativeRasterizationMode) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetConservativeRasterizationModeEXT(commandBuffer, conservativeRasterizationMode); +} + +static inline void DispatchCmdSetExtraPrimitiveOverestimationSizeEXT(VkCommandBuffer commandBuffer, + float extraPrimitiveOverestimationSize) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetExtraPrimitiveOverestimationSizeEXT(commandBuffer, extraPrimitiveOverestimationSize); +} + +static inline void DispatchCmdSetDepthClipEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClipEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDepthClipEnableEXT(commandBuffer, depthClipEnable); +} + +static inline void DispatchCmdSetSampleLocationsEnableEXT(VkCommandBuffer commandBuffer, VkBool32 sampleLocationsEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetSampleLocationsEnableEXT(commandBuffer, sampleLocationsEnable); +} + +static inline void DispatchCmdSetColorBlendAdvancedEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, + uint32_t attachmentCount, + const VkColorBlendAdvancedEXT* pColorBlendAdvanced) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetColorBlendAdvancedEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendAdvanced); +} + +static inline void DispatchCmdSetProvokingVertexModeEXT(VkCommandBuffer commandBuffer, + VkProvokingVertexModeEXT provokingVertexMode) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetProvokingVertexModeEXT(commandBuffer, provokingVertexMode); +} + +static inline void DispatchCmdSetLineRasterizationModeEXT(VkCommandBuffer commandBuffer, + VkLineRasterizationModeEXT lineRasterizationMode) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetLineRasterizationModeEXT(commandBuffer, lineRasterizationMode); +} + +static inline void DispatchCmdSetLineStippleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stippledLineEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetLineStippleEnableEXT(commandBuffer, stippledLineEnable); +} + +static inline void DispatchCmdSetDepthClipNegativeOneToOneEXT(VkCommandBuffer commandBuffer, VkBool32 negativeOneToOne) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDepthClipNegativeOneToOneEXT(commandBuffer, negativeOneToOne); +} + +static inline void DispatchCmdSetViewportWScalingEnableNV(VkCommandBuffer commandBuffer, VkBool32 viewportWScalingEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetViewportWScalingEnableNV(commandBuffer, viewportWScalingEnable); +} + +static inline void DispatchCmdSetViewportSwizzleNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, + const VkViewportSwizzleNV* pViewportSwizzles) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetViewportSwizzleNV(commandBuffer, firstViewport, viewportCount, pViewportSwizzles); +} + +static inline void DispatchCmdSetCoverageToColorEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageToColorEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetCoverageToColorEnableNV(commandBuffer, coverageToColorEnable); +} + +static inline void DispatchCmdSetCoverageToColorLocationNV(VkCommandBuffer commandBuffer, uint32_t coverageToColorLocation) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetCoverageToColorLocationNV(commandBuffer, coverageToColorLocation); +} + +static inline void DispatchCmdSetCoverageModulationModeNV(VkCommandBuffer commandBuffer, + VkCoverageModulationModeNV coverageModulationMode) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetCoverageModulationModeNV(commandBuffer, coverageModulationMode); +} + +static inline void DispatchCmdSetCoverageModulationTableEnableNV(VkCommandBuffer commandBuffer, + VkBool32 coverageModulationTableEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetCoverageModulationTableEnableNV(commandBuffer, coverageModulationTableEnable); +} + +static inline void DispatchCmdSetCoverageModulationTableNV(VkCommandBuffer commandBuffer, uint32_t coverageModulationTableCount, + const float* pCoverageModulationTable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetCoverageModulationTableNV(commandBuffer, coverageModulationTableCount, pCoverageModulationTable); +} + +static inline void DispatchCmdSetShadingRateImageEnableNV(VkCommandBuffer commandBuffer, VkBool32 shadingRateImageEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetShadingRateImageEnableNV(commandBuffer, shadingRateImageEnable); +} + +static inline void DispatchCmdSetRepresentativeFragmentTestEnableNV(VkCommandBuffer commandBuffer, + VkBool32 representativeFragmentTestEnable) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetRepresentativeFragmentTestEnableNV(commandBuffer, representativeFragmentTestEnable); +} + +static inline void DispatchCmdSetCoverageReductionModeNV(VkCommandBuffer commandBuffer, + VkCoverageReductionModeNV coverageReductionMode) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetCoverageReductionModeNV(commandBuffer, coverageReductionMode); +} + +static inline void DispatchGetShaderModuleIdentifierEXT(VkDevice device, VkShaderModule shaderModule, + VkShaderModuleIdentifierEXT* pIdentifier) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetShaderModuleIdentifierEXT(device, shaderModule, pIdentifier); +} + +static inline void DispatchGetShaderModuleCreateInfoIdentifierEXT(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, + VkShaderModuleIdentifierEXT* pIdentifier) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetShaderModuleCreateInfoIdentifierEXT(device, pCreateInfo, pIdentifier); +} + +static inline VkResult DispatchGetPhysicalDeviceOpticalFlowImageFormatsNV( + VkPhysicalDevice physicalDevice, const VkOpticalFlowImageFormatInfoNV* pOpticalFlowImageFormatInfo, uint32_t* pFormatCount, + VkOpticalFlowImageFormatPropertiesNV* pImageFormatProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceOpticalFlowImageFormatsNV(physicalDevice, pOpticalFlowImageFormatInfo, pFormatCount, + pImageFormatProperties); +} + +static inline VkResult DispatchCreateOpticalFlowSessionNV(VkDevice device, const VkOpticalFlowSessionCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkOpticalFlowSessionNV* pSession) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateOpticalFlowSessionNV(device, pCreateInfo, pAllocator, pSession); +} + +static inline void DispatchDestroyOpticalFlowSessionNV(VkDevice device, VkOpticalFlowSessionNV session, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyOpticalFlowSessionNV(device, session, pAllocator); +} + +static inline VkResult DispatchBindOpticalFlowSessionImageNV(VkDevice device, VkOpticalFlowSessionNV session, + VkOpticalFlowSessionBindingPointNV bindingPoint, VkImageView view, + VkImageLayout layout) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->BindOpticalFlowSessionImageNV(device, session, bindingPoint, view, layout); +} + +static inline void DispatchCmdOpticalFlowExecuteNV(VkCommandBuffer commandBuffer, VkOpticalFlowSessionNV session, + const VkOpticalFlowExecuteInfoNV* pExecuteInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdOpticalFlowExecuteNV(commandBuffer, session, pExecuteInfo); +} + +static inline void DispatchAntiLagUpdateAMD(VkDevice device, const VkAntiLagDataAMD* pData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->AntiLagUpdateAMD(device, pData); +} + +static inline VkResult DispatchCreateShadersEXT(VkDevice device, uint32_t createInfoCount, + const VkShaderCreateInfoEXT* pCreateInfos, const VkAllocationCallbacks* pAllocator, + VkShaderEXT* pShaders) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateShadersEXT(device, createInfoCount, pCreateInfos, pAllocator, pShaders); +} + +static inline void DispatchDestroyShaderEXT(VkDevice device, VkShaderEXT shader, const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyShaderEXT(device, shader, pAllocator); +} + +static inline VkResult DispatchGetShaderBinaryDataEXT(VkDevice device, VkShaderEXT shader, size_t* pDataSize, void* pData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetShaderBinaryDataEXT(device, shader, pDataSize, pData); +} + +static inline void DispatchCmdBindShadersEXT(VkCommandBuffer commandBuffer, uint32_t stageCount, + const VkShaderStageFlagBits* pStages, const VkShaderEXT* pShaders) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBindShadersEXT(commandBuffer, stageCount, pStages, pShaders); +} + +static inline void DispatchCmdSetDepthClampRangeEXT(VkCommandBuffer commandBuffer, VkDepthClampModeEXT depthClampMode, + const VkDepthClampRangeEXT* pDepthClampRange) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetDepthClampRangeEXT(commandBuffer, depthClampMode, pDepthClampRange); +} + +static inline VkResult DispatchGetFramebufferTilePropertiesQCOM(VkDevice device, VkFramebuffer framebuffer, + uint32_t* pPropertiesCount, VkTilePropertiesQCOM* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetFramebufferTilePropertiesQCOM(device, framebuffer, pPropertiesCount, pProperties); +} + +static inline VkResult DispatchGetDynamicRenderingTilePropertiesQCOM(VkDevice device, const VkRenderingInfo* pRenderingInfo, + VkTilePropertiesQCOM* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetDynamicRenderingTilePropertiesQCOM(device, pRenderingInfo, pProperties); +} + +static inline VkResult DispatchSetLatencySleepModeNV(VkDevice device, VkSwapchainKHR swapchain, + const VkLatencySleepModeInfoNV* pSleepModeInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->SetLatencySleepModeNV(device, swapchain, pSleepModeInfo); +} + +static inline VkResult DispatchLatencySleepNV(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepInfoNV* pSleepInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->LatencySleepNV(device, swapchain, pSleepInfo); +} + +static inline void DispatchSetLatencyMarkerNV(VkDevice device, VkSwapchainKHR swapchain, + const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->SetLatencyMarkerNV(device, swapchain, pLatencyMarkerInfo); +} + +static inline void DispatchGetLatencyTimingsNV(VkDevice device, VkSwapchainKHR swapchain, + VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetLatencyTimingsNV(device, swapchain, pLatencyMarkerInfo); +} + +static inline void DispatchQueueNotifyOutOfBandNV(VkQueue queue, const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); + dispatch->QueueNotifyOutOfBandNV(queue, pQueueTypeInfo); +} + +static inline void DispatchCmdSetAttachmentFeedbackLoopEnableEXT(VkCommandBuffer commandBuffer, VkImageAspectFlags aspectMask) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetAttachmentFeedbackLoopEnableEXT(commandBuffer, aspectMask); +} +#ifdef VK_USE_PLATFORM_SCREEN_QNX + +static inline VkResult DispatchGetScreenBufferPropertiesQNX(VkDevice device, const struct _screen_buffer* buffer, + VkScreenBufferPropertiesQNX* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetScreenBufferPropertiesQNX(device, buffer, pProperties); +} +#endif // VK_USE_PLATFORM_SCREEN_QNX + +static inline void DispatchGetGeneratedCommandsMemoryRequirementsEXT(VkDevice device, + const VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfo, + VkMemoryRequirements2* pMemoryRequirements) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetGeneratedCommandsMemoryRequirementsEXT(device, pInfo, pMemoryRequirements); +} + +static inline void DispatchCmdPreprocessGeneratedCommandsEXT(VkCommandBuffer commandBuffer, + const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, + VkCommandBuffer stateCommandBuffer) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdPreprocessGeneratedCommandsEXT(commandBuffer, pGeneratedCommandsInfo, stateCommandBuffer); +} + +static inline void DispatchCmdExecuteGeneratedCommandsEXT(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, + const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdExecuteGeneratedCommandsEXT(commandBuffer, isPreprocessed, pGeneratedCommandsInfo); +} + +static inline VkResult DispatchCreateIndirectCommandsLayoutEXT(VkDevice device, + const VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkIndirectCommandsLayoutEXT* pIndirectCommandsLayout) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateIndirectCommandsLayoutEXT(device, pCreateInfo, pAllocator, pIndirectCommandsLayout); +} + +static inline void DispatchDestroyIndirectCommandsLayoutEXT(VkDevice device, VkIndirectCommandsLayoutEXT indirectCommandsLayout, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyIndirectCommandsLayoutEXT(device, indirectCommandsLayout, pAllocator); +} + +static inline VkResult DispatchCreateIndirectExecutionSetEXT(VkDevice device, + const VkIndirectExecutionSetCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkIndirectExecutionSetEXT* pIndirectExecutionSet) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateIndirectExecutionSetEXT(device, pCreateInfo, pAllocator, pIndirectExecutionSet); +} + +static inline void DispatchDestroyIndirectExecutionSetEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyIndirectExecutionSetEXT(device, indirectExecutionSet, pAllocator); +} + +static inline void DispatchUpdateIndirectExecutionSetPipelineEXT( + VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, uint32_t executionSetWriteCount, + const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->UpdateIndirectExecutionSetPipelineEXT(device, indirectExecutionSet, executionSetWriteCount, pExecutionSetWrites); +} + +static inline void DispatchUpdateIndirectExecutionSetShaderEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, + uint32_t executionSetWriteCount, + const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->UpdateIndirectExecutionSetShaderEXT(device, indirectExecutionSet, executionSetWriteCount, pExecutionSetWrites); +} + +static inline VkResult DispatchGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( + VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixFlexibleDimensionsPropertiesNV* pProperties) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return dispatch->GetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV(physicalDevice, pPropertyCount, pProperties); +} + +static inline VkResult DispatchCreateAccelerationStructureKHR(VkDevice device, + const VkAccelerationStructureCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkAccelerationStructureKHR* pAccelerationStructure) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateAccelerationStructureKHR(device, pCreateInfo, pAllocator, pAccelerationStructure); +} + +static inline void DispatchDestroyAccelerationStructureKHR(VkDevice device, VkAccelerationStructureKHR accelerationStructure, + const VkAllocationCallbacks* pAllocator) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->DestroyAccelerationStructureKHR(device, accelerationStructure, pAllocator); +} + +static inline void DispatchCmdBuildAccelerationStructuresKHR( + VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, + const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBuildAccelerationStructuresKHR(commandBuffer, infoCount, pInfos, ppBuildRangeInfos); +} + +static inline void DispatchCmdBuildAccelerationStructuresIndirectKHR(VkCommandBuffer commandBuffer, uint32_t infoCount, + const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, + const VkDeviceAddress* pIndirectDeviceAddresses, + const uint32_t* pIndirectStrides, + const uint32_t* const* ppMaxPrimitiveCounts) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdBuildAccelerationStructuresIndirectKHR(commandBuffer, infoCount, pInfos, pIndirectDeviceAddresses, + pIndirectStrides, ppMaxPrimitiveCounts); +} + +static inline VkResult DispatchBuildAccelerationStructuresKHR( + VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, + const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, + const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->BuildAccelerationStructuresKHR(device, deferredOperation, infoCount, pInfos, ppBuildRangeInfos); +} + +static inline VkResult DispatchCopyAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyAccelerationStructureInfoKHR* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CopyAccelerationStructureKHR(device, deferredOperation, pInfo); +} + +static inline VkResult DispatchCopyAccelerationStructureToMemoryKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CopyAccelerationStructureToMemoryKHR(device, deferredOperation, pInfo); +} + +static inline VkResult DispatchCopyMemoryToAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CopyMemoryToAccelerationStructureKHR(device, deferredOperation, pInfo); +} + +static inline VkResult DispatchWriteAccelerationStructuresPropertiesKHR(VkDevice device, uint32_t accelerationStructureCount, + const VkAccelerationStructureKHR* pAccelerationStructures, + VkQueryType queryType, size_t dataSize, void* pData, + size_t stride) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->WriteAccelerationStructuresPropertiesKHR(device, accelerationStructureCount, pAccelerationStructures, + queryType, dataSize, pData, stride); +} + +static inline void DispatchCmdCopyAccelerationStructureKHR(VkCommandBuffer commandBuffer, + const VkCopyAccelerationStructureInfoKHR* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCopyAccelerationStructureKHR(commandBuffer, pInfo); +} + +static inline void DispatchCmdCopyAccelerationStructureToMemoryKHR(VkCommandBuffer commandBuffer, + const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCopyAccelerationStructureToMemoryKHR(commandBuffer, pInfo); +} + +static inline void DispatchCmdCopyMemoryToAccelerationStructureKHR(VkCommandBuffer commandBuffer, + const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdCopyMemoryToAccelerationStructureKHR(commandBuffer, pInfo); +} + +static inline VkDeviceAddress DispatchGetAccelerationStructureDeviceAddressKHR( + VkDevice device, const VkAccelerationStructureDeviceAddressInfoKHR* pInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetAccelerationStructureDeviceAddressKHR(device, pInfo); +} + +static inline void DispatchCmdWriteAccelerationStructuresPropertiesKHR(VkCommandBuffer commandBuffer, + uint32_t accelerationStructureCount, + const VkAccelerationStructureKHR* pAccelerationStructures, + VkQueryType queryType, VkQueryPool queryPool, + uint32_t firstQuery) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdWriteAccelerationStructuresPropertiesKHR(commandBuffer, accelerationStructureCount, pAccelerationStructures, + queryType, queryPool, firstQuery); +} + +static inline void DispatchGetDeviceAccelerationStructureCompatibilityKHR(VkDevice device, + const VkAccelerationStructureVersionInfoKHR* pVersionInfo, + VkAccelerationStructureCompatibilityKHR* pCompatibility) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetDeviceAccelerationStructureCompatibilityKHR(device, pVersionInfo, pCompatibility); +} + +static inline void DispatchGetAccelerationStructureBuildSizesKHR(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, + const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo, + const uint32_t* pMaxPrimitiveCounts, + VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + dispatch->GetAccelerationStructureBuildSizesKHR(device, buildType, pBuildInfo, pMaxPrimitiveCounts, pSizeInfo); +} + +static inline void DispatchCmdTraceRaysKHR(VkCommandBuffer commandBuffer, + const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, uint32_t width, + uint32_t height, uint32_t depth) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdTraceRaysKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, pHitShaderBindingTable, + pCallableShaderBindingTable, width, height, depth); +} + +static inline VkResult DispatchCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->CreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, + pAllocator, pPipelines); +} + +static inline VkResult DispatchGetRayTracingCaptureReplayShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, + uint32_t firstGroup, uint32_t groupCount, + size_t dataSize, void* pData) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetRayTracingCaptureReplayShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, dataSize, pData); +} + +static inline void DispatchCmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer, + const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, + VkDeviceAddress indirectDeviceAddress) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdTraceRaysIndirectKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, pHitShaderBindingTable, + pCallableShaderBindingTable, indirectDeviceAddress); +} + +static inline VkDeviceSize DispatchGetRayTracingShaderGroupStackSizeKHR(VkDevice device, VkPipeline pipeline, uint32_t group, + VkShaderGroupShaderKHR groupShader) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); + return dispatch->GetRayTracingShaderGroupStackSizeKHR(device, pipeline, group, groupShader); +} + +static inline void DispatchCmdSetRayTracingPipelineStackSizeKHR(VkCommandBuffer commandBuffer, uint32_t pipelineStackSize) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdSetRayTracingPipelineStackSizeKHR(commandBuffer, pipelineStackSize); +} + +static inline void DispatchCmdDrawMeshTasksEXT(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, + uint32_t groupCountZ) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDrawMeshTasksEXT(commandBuffer, groupCountX, groupCountY, groupCountZ); +} + +static inline void DispatchCmdDrawMeshTasksIndirectEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + uint32_t drawCount, uint32_t stride) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDrawMeshTasksIndirectEXT(commandBuffer, buffer, offset, drawCount, stride); +} + +static inline void DispatchCmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, uint32_t stride) { + auto dispatch = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); + dispatch->CmdDrawMeshTasksIndirectCountEXT(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); +} + +// NOLINTEND diff --git a/layers/vulkan/generated/dispatch_object.cpp b/layers/vulkan/generated/dispatch_object.cpp new file mode 100644 index 00000000000..4533faebed1 --- /dev/null +++ b/layers/vulkan/generated/dispatch_object.cpp @@ -0,0 +1,8782 @@ +// *** THIS FILE IS GENERATED - DO NOT EDIT *** +// See dispatch_object_generator.py for modifications + +/*************************************************************************** + * + * Copyright (c) 2015-2024 The Khronos Group Inc. + * Copyright (c) 2015-2024 Valve Corporation + * Copyright (c) 2015-2024 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. + ****************************************************************************/ + +// NOLINTBEGIN + +#include "chassis/dispatch_object.h" +#include "utils/cast_utils.h" +#include +#include "state_tracker/pipeline_state.h" +#include "containers/custom_containers.h" +#include "thread_tracker/thread_safety_validation.h" +#include "stateless/stateless_validation.h" +#include "object_tracker/object_lifetime_validation.h" +#include "core_checks/core_validation.h" +#include "best_practices/best_practices_validation.h" +#include "gpu/core/gpuav.h" +#include "sync/sync_validation.h" + +#define DISPATCH_MAX_STACK_ALLOCATIONS 32 + +std::atomic DispatchObject::global_unique_id{1}; +vvl::concurrent_unordered_map DispatchObject::unique_id_mapping; +bool DispatchObject::wrap_handles{true}; + +void DispatchObject::InitInstanceValidationObjects() { + // Note that this DEFINES THE ORDER IN WHICH THE LAYER VALIDATION OBJECTS ARE CALLED + + if (!disabled[thread_safety]) { + object_dispatch.emplace_back(new ThreadSafety(nullptr)); + } + if (!disabled[stateless_checks]) { + object_dispatch.emplace_back(new StatelessValidation); + } + if (!disabled[object_tracking]) { + object_dispatch.emplace_back(new ObjectLifetimes); + } + if (!disabled[core_checks]) { + object_dispatch.emplace_back(new CoreChecks); + } + if (enabled[best_practices]) { + object_dispatch.emplace_back(new BestPractices); + } + if (enabled[gpu_validation] || enabled[debug_printf_validation]) { + object_dispatch.emplace_back(new gpuav::Validator); + } + if (enabled[sync_validation]) { + object_dispatch.emplace_back(new SyncValidator); + } +} + +void DispatchObject::InitDeviceValidationObjects(DispatchObject* instance_dispatch) { + // Note that this DEFINES THE ORDER IN WHICH THE LAYER VALIDATION OBJECTS ARE CALLED + + if (!disabled[thread_safety]) { + object_dispatch.emplace_back( + new ThreadSafety(static_cast(instance_dispatch->GetValidationObject(LayerObjectTypeThreading)))); + } + if (!disabled[stateless_checks]) { + object_dispatch.emplace_back(new StatelessValidation); + } + if (!disabled[object_tracking]) { + object_dispatch.emplace_back(new ObjectLifetimes); + } + if (!disabled[core_checks]) { + object_dispatch.emplace_back(new CoreChecks); + } + if (enabled[best_practices]) { + object_dispatch.emplace_back(new BestPractices); + } + if (enabled[gpu_validation] || enabled[debug_printf_validation]) { + object_dispatch.emplace_back(new gpuav::Validator); + } + if (enabled[sync_validation]) { + object_dispatch.emplace_back(new SyncValidator); + } +} + +// Unique Objects pNext extension handling function +void DispatchObject::UnwrapPnextChainHandles(const void* pNext) { + void* cur_pnext = const_cast(pNext); + while (cur_pnext != nullptr) { + VkBaseOutStructure* header = reinterpret_cast(cur_pnext); + + switch (header->sType) { + case VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->stage.module) { + safe_struct->stage.module = Unwrap(safe_struct->stage.module); + } + UnwrapPnextChainHandles(safe_struct->stage.pNext); + + if (safe_struct->layout) { + safe_struct->layout = Unwrap(safe_struct->layout); + } + if (safe_struct->basePipelineHandle) { + safe_struct->basePipelineHandle = Unwrap(safe_struct->basePipelineHandle); + } + } break; + case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO: { + auto* safe_struct = reinterpret_cast(cur_pnext); + if (safe_struct->pStages) { + for (uint32_t index0 = 0; index0 < safe_struct->stageCount; ++index0) { + UnwrapPnextChainHandles(safe_struct->pStages[index0].pNext); + + if (safe_struct->pStages[index0].module) { + safe_struct->pStages[index0].module = Unwrap(safe_struct->pStages[index0].module); + } + } + } + + if (safe_struct->layout) { + safe_struct->layout = Unwrap(safe_struct->layout); + } + if (safe_struct->renderPass) { + safe_struct->renderPass = Unwrap(safe_struct->renderPass); + } + if (safe_struct->basePipelineHandle) { + safe_struct->basePipelineHandle = Unwrap(safe_struct->basePipelineHandle); + } + } break; + case VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR: { + auto* safe_struct = reinterpret_cast(cur_pnext); + if (safe_struct->pStages) { + for (uint32_t index0 = 0; index0 < safe_struct->stageCount; ++index0) { + UnwrapPnextChainHandles(safe_struct->pStages[index0].pNext); + + if (safe_struct->pStages[index0].module) { + safe_struct->pStages[index0].module = Unwrap(safe_struct->pStages[index0].module); + } + } + } + if (safe_struct->pLibraryInfo) { + if (safe_struct->pLibraryInfo->pLibraries) { + for (uint32_t index1 = 0; index1 < safe_struct->pLibraryInfo->libraryCount; ++index1) { + safe_struct->pLibraryInfo->pLibraries[index1] = Unwrap(safe_struct->pLibraryInfo->pLibraries[index1]); + } + } + } + + if (safe_struct->layout) { + safe_struct->layout = Unwrap(safe_struct->layout); + } + if (safe_struct->basePipelineHandle) { + safe_struct->basePipelineHandle = Unwrap(safe_struct->basePipelineHandle); + } + } break; +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_EXECUTION_GRAPH_PIPELINE_CREATE_INFO_AMDX: { + auto* safe_struct = reinterpret_cast(cur_pnext); + if (safe_struct->pStages) { + for (uint32_t index0 = 0; index0 < safe_struct->stageCount; ++index0) { + UnwrapPnextChainHandles(safe_struct->pStages[index0].pNext); + + if (safe_struct->pStages[index0].module) { + safe_struct->pStages[index0].module = Unwrap(safe_struct->pStages[index0].module); + } + } + } + if (safe_struct->pLibraryInfo) { + if (safe_struct->pLibraryInfo->pLibraries) { + for (uint32_t index1 = 0; index1 < safe_struct->pLibraryInfo->libraryCount; ++index1) { + safe_struct->pLibraryInfo->pLibraries[index1] = Unwrap(safe_struct->pLibraryInfo->pLibraries[index1]); + } + } + } + + if (safe_struct->layout) { + safe_struct->layout = Unwrap(safe_struct->layout); + } + if (safe_struct->basePipelineHandle) { + safe_struct->basePipelineHandle = Unwrap(safe_struct->basePipelineHandle); + } + } break; +#endif // VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_FRAME_BOUNDARY_EXT: { + auto* safe_struct = reinterpret_cast(cur_pnext); + if (safe_struct->pImages) { + for (uint32_t index0 = 0; index0 < safe_struct->imageCount; ++index0) { + safe_struct->pImages[index0] = Unwrap(safe_struct->pImages[index0]); + } + } + if (safe_struct->pBuffers) { + for (uint32_t index0 = 0; index0 < safe_struct->bufferCount; ++index0) { + safe_struct->pBuffers[index0] = Unwrap(safe_struct->pBuffers[index0]); + } + } + } break; +#ifdef VK_USE_PLATFORM_WIN32_KHR + case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR: { + auto* safe_struct = reinterpret_cast(cur_pnext); + if (safe_struct->pAcquireSyncs) { + for (uint32_t index0 = 0; index0 < safe_struct->acquireCount; ++index0) { + safe_struct->pAcquireSyncs[index0] = Unwrap(safe_struct->pAcquireSyncs[index0]); + } + } + if (safe_struct->pReleaseSyncs) { + for (uint32_t index0 = 0; index0 < safe_struct->releaseCount; ++index0) { + safe_struct->pReleaseSyncs[index0] = Unwrap(safe_struct->pReleaseSyncs[index0]); + } + } + } break; + case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV: { + auto* safe_struct = reinterpret_cast(cur_pnext); + if (safe_struct->pAcquireSyncs) { + for (uint32_t index0 = 0; index0 < safe_struct->acquireCount; ++index0) { + safe_struct->pAcquireSyncs[index0] = Unwrap(safe_struct->pAcquireSyncs[index0]); + } + } + if (safe_struct->pReleaseSyncs) { + for (uint32_t index0 = 0; index0 < safe_struct->releaseCount; ++index0) { + safe_struct->pReleaseSyncs[index0] = Unwrap(safe_struct->pReleaseSyncs[index0]); + } + } + } break; +#endif // VK_USE_PLATFORM_WIN32_KHR + case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->image) { + safe_struct->image = Unwrap(safe_struct->image); + } + if (safe_struct->buffer) { + safe_struct->buffer = Unwrap(safe_struct->buffer); + } + } break; +#ifdef VK_USE_PLATFORM_FUCHSIA + case VK_STRUCTURE_TYPE_IMPORT_MEMORY_BUFFER_COLLECTION_FUCHSIA: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->collection) { + safe_struct->collection = Unwrap(safe_struct->collection); + } + } break; +#endif // VK_USE_PLATFORM_FUCHSIA + case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->image) { + safe_struct->image = Unwrap(safe_struct->image); + } + if (safe_struct->buffer) { + safe_struct->buffer = Unwrap(safe_struct->buffer); + } + } break; +#ifdef VK_USE_PLATFORM_FUCHSIA + case VK_STRUCTURE_TYPE_BUFFER_COLLECTION_BUFFER_CREATE_INFO_FUCHSIA: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->collection) { + safe_struct->collection = Unwrap(safe_struct->collection); + } + } break; + case VK_STRUCTURE_TYPE_BUFFER_COLLECTION_IMAGE_CREATE_INFO_FUCHSIA: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->collection) { + safe_struct->collection = Unwrap(safe_struct->collection); + } + } break; +#endif // VK_USE_PLATFORM_FUCHSIA + case VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->swapchain) { + safe_struct->swapchain = Unwrap(safe_struct->swapchain); + } + } break; + case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->conversion) { + safe_struct->conversion = Unwrap(safe_struct->conversion); + } + } break; + case VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->validationCache) { + safe_struct->validationCache = Unwrap(safe_struct->validationCache); + } + } break; + case VK_STRUCTURE_TYPE_PIPELINE_BINARY_INFO_KHR: { + auto* safe_struct = reinterpret_cast(cur_pnext); + if (safe_struct->pPipelineBinaries) { + for (uint32_t index0 = 0; index0 < safe_struct->binaryCount; ++index0) { + safe_struct->pPipelineBinaries[index0] = Unwrap(safe_struct->pPipelineBinaries[index0]); + } + } + } break; + case VK_STRUCTURE_TYPE_SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->renderPass) { + safe_struct->renderPass = Unwrap(safe_struct->renderPass); + } + } break; + case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV: { + auto* safe_struct = reinterpret_cast(cur_pnext); + if (safe_struct->pGroups) { + for (uint32_t index0 = 0; index0 < safe_struct->groupCount; ++index0) { + if (safe_struct->pGroups[index0].pStages) { + for (uint32_t index1 = 0; index1 < safe_struct->pGroups[index0].stageCount; ++index1) { + UnwrapPnextChainHandles(safe_struct->pGroups[index0].pStages[index1].pNext); + + if (safe_struct->pGroups[index0].pStages[index1].module) { + safe_struct->pGroups[index0].pStages[index1].module = + Unwrap(safe_struct->pGroups[index0].pStages[index1].module); + } + } + } + } + } + if (safe_struct->pPipelines) { + for (uint32_t index0 = 0; index0 < safe_struct->pipelineCount; ++index0) { + safe_struct->pPipelines[index0] = Unwrap(safe_struct->pPipelines[index0]); + } + } + } break; + case VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR: { + auto* safe_struct = reinterpret_cast(cur_pnext); + if (safe_struct->pLibraries) { + for (uint32_t index0 = 0; index0 < safe_struct->libraryCount; ++index0) { + safe_struct->pLibraries[index0] = Unwrap(safe_struct->pLibraries[index0]); + } + } + } break; + case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR: { + auto* safe_struct = reinterpret_cast(cur_pnext); + if (safe_struct->pAccelerationStructures) { + for (uint32_t index0 = 0; index0 < safe_struct->accelerationStructureCount; ++index0) { + safe_struct->pAccelerationStructures[index0] = Unwrap(safe_struct->pAccelerationStructures[index0]); + } + } + } break; + case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV: { + auto* safe_struct = reinterpret_cast(cur_pnext); + if (safe_struct->pAccelerationStructures) { + for (uint32_t index0 = 0; index0 < safe_struct->accelerationStructureCount; ++index0) { + safe_struct->pAccelerationStructures[index0] = Unwrap(safe_struct->pAccelerationStructures[index0]); + } + } + } break; + case VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO: { + auto* safe_struct = reinterpret_cast(cur_pnext); + if (safe_struct->pAttachments) { + for (uint32_t index0 = 0; index0 < safe_struct->attachmentCount; ++index0) { + safe_struct->pAttachments[index0] = Unwrap(safe_struct->pAttachments[index0]); + } + } + } break; + case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->swapchain) { + safe_struct->swapchain = Unwrap(safe_struct->swapchain); + } + } break; + case VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_SUBMIT_INFO_ARM: { + auto* safe_struct = reinterpret_cast(cur_pnext); + if (safe_struct->pStripeSemaphoreInfos) { + for (uint32_t index0 = 0; index0 < safe_struct->stripeSemaphoreInfoCount; ++index0) { + if (safe_struct->pStripeSemaphoreInfos[index0].semaphore) { + safe_struct->pStripeSemaphoreInfos[index0].semaphore = + Unwrap(safe_struct->pStripeSemaphoreInfos[index0].semaphore); + } + } + } + } break; + case VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->imageView) { + safe_struct->imageView = Unwrap(safe_struct->imageView); + } + } break; + case VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->imageView) { + safe_struct->imageView = Unwrap(safe_struct->imageView); + } + } break; + case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_FENCE_INFO_EXT: { + auto* safe_struct = reinterpret_cast(cur_pnext); + if (safe_struct->pFences) { + for (uint32_t index0 = 0; index0 < safe_struct->swapchainCount; ++index0) { + safe_struct->pFences[index0] = Unwrap(safe_struct->pFences[index0]); + } + } + } break; + case VK_STRUCTURE_TYPE_VIDEO_INLINE_QUERY_INFO_KHR: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->queryPool) { + safe_struct->queryPool = Unwrap(safe_struct->queryPool); + } + } break; + case VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_INFO_KHR: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->quantizationMap) { + safe_struct->quantizationMap = Unwrap(safe_struct->quantizationMap); + } + } break; + case VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO: { + auto* safe_struct = reinterpret_cast(cur_pnext); + if (safe_struct->pSetLayouts) { + for (uint32_t index0 = 0; index0 < safe_struct->setLayoutCount; ++index0) { + safe_struct->pSetLayouts[index0] = Unwrap(safe_struct->pSetLayouts[index0]); + } + } + } break; +#ifdef VK_USE_PLATFORM_METAL_EXT + case VK_STRUCTURE_TYPE_EXPORT_METAL_BUFFER_INFO_EXT: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->memory) { + safe_struct->memory = Unwrap(safe_struct->memory); + } + } break; + case VK_STRUCTURE_TYPE_EXPORT_METAL_IO_SURFACE_INFO_EXT: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->image) { + safe_struct->image = Unwrap(safe_struct->image); + } + } break; + case VK_STRUCTURE_TYPE_EXPORT_METAL_SHARED_EVENT_INFO_EXT: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->semaphore) { + safe_struct->semaphore = Unwrap(safe_struct->semaphore); + } + if (safe_struct->event) { + safe_struct->event = Unwrap(safe_struct->event); + } + } break; + case VK_STRUCTURE_TYPE_EXPORT_METAL_TEXTURE_INFO_EXT: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->image) { + safe_struct->image = Unwrap(safe_struct->image); + } + if (safe_struct->imageView) { + safe_struct->imageView = Unwrap(safe_struct->imageView); + } + if (safe_struct->bufferView) { + safe_struct->bufferView = Unwrap(safe_struct->bufferView); + } + } break; +#endif // VK_USE_PLATFORM_METAL_EXT + case VK_STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->buffer) { + safe_struct->buffer = Unwrap(safe_struct->buffer); + } + } break; + case VK_STRUCTURE_TYPE_GENERATED_COMMANDS_PIPELINE_INFO_EXT: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->pipeline) { + safe_struct->pipeline = Unwrap(safe_struct->pipeline); + } + } break; + case VK_STRUCTURE_TYPE_GENERATED_COMMANDS_SHADER_INFO_EXT: { + auto* safe_struct = reinterpret_cast(cur_pnext); + if (safe_struct->pShaders) { + for (uint32_t index0 = 0; index0 < safe_struct->shaderCount; ++index0) { + safe_struct->pShaders[index0] = Unwrap(safe_struct->pShaders[index0]); + } + } + } break; +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_DISPLACEMENT_MICROMAP_NV: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->micromap) { + safe_struct->micromap = Unwrap(safe_struct->micromap); + } + } break; +#endif // VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT: { + auto* safe_struct = reinterpret_cast(cur_pnext); + + if (safe_struct->micromap) { + safe_struct->micromap = Unwrap(safe_struct->micromap); + } + } break; + + default: + break; + } + + // Process the next structure in the chain + cur_pnext = header->pNext; + } +} + +[[maybe_unused]] static bool NotDispatchableHandle(VkObjectType object_type) { + switch (object_type) { + case VK_OBJECT_TYPE_INSTANCE: + case VK_OBJECT_TYPE_PHYSICAL_DEVICE: + case VK_OBJECT_TYPE_DEVICE: + case VK_OBJECT_TYPE_QUEUE: + case VK_OBJECT_TYPE_COMMAND_BUFFER: + return false; + default: + return true; + } +} + +VkResult DispatchObject::EnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount, + VkPhysicalDevice* pPhysicalDevices) { + VkResult result = instance_dispatch_table.EnumeratePhysicalDevices(instance, pPhysicalDeviceCount, pPhysicalDevices); + + return result; +} + +void DispatchObject::GetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures) { + instance_dispatch_table.GetPhysicalDeviceFeatures(physicalDevice, pFeatures); +} + +void DispatchObject::GetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, + VkFormatProperties* pFormatProperties) { + instance_dispatch_table.GetPhysicalDeviceFormatProperties(physicalDevice, format, pFormatProperties); +} + +VkResult DispatchObject::GetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, + VkImageTiling tiling, VkImageUsageFlags usage, + VkImageCreateFlags flags, + VkImageFormatProperties* pImageFormatProperties) { + VkResult result = instance_dispatch_table.GetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, + flags, pImageFormatProperties); + + return result; +} + +void DispatchObject::GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties) { + instance_dispatch_table.GetPhysicalDeviceProperties(physicalDevice, pProperties); +} + +void DispatchObject::GetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, + VkQueueFamilyProperties* pQueueFamilyProperties) { + instance_dispatch_table.GetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, + pQueueFamilyProperties); +} + +void DispatchObject::GetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceMemoryProperties* pMemoryProperties) { + instance_dispatch_table.GetPhysicalDeviceMemoryProperties(physicalDevice, pMemoryProperties); +} + +PFN_vkVoidFunction DispatchObject::GetInstanceProcAddr(VkInstance instance, const char* pName) { + PFN_vkVoidFunction result = instance_dispatch_table.GetInstanceProcAddr(instance, pName); + + return result; +} + +PFN_vkVoidFunction DispatchObject::GetDeviceProcAddr(VkDevice device, const char* pName) { + PFN_vkVoidFunction result = device_dispatch_table.GetDeviceProcAddr(device, pName); + + return result; +} + +VkResult DispatchObject::EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, + uint32_t* pPropertyCount, VkExtensionProperties* pProperties) { + VkResult result = + instance_dispatch_table.EnumerateDeviceExtensionProperties(physicalDevice, pLayerName, pPropertyCount, pProperties); + + return result; +} + +void DispatchObject::GetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue) { + device_dispatch_table.GetDeviceQueue(device, queueFamilyIndex, queueIndex, pQueue); +} + +VkResult DispatchObject::QueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence) { + if (!wrap_handles) return device_dispatch_table.QueueSubmit(queue, submitCount, pSubmits, fence); + small_vector var_local_pSubmits; + vku::safe_VkSubmitInfo* local_pSubmits = nullptr; + { + if (pSubmits) { + var_local_pSubmits.resize(submitCount); + local_pSubmits = var_local_pSubmits.data(); + for (uint32_t index0 = 0; index0 < submitCount; ++index0) { + local_pSubmits[index0].initialize(&pSubmits[index0]); + UnwrapPnextChainHandles(local_pSubmits[index0].pNext); + if (local_pSubmits[index0].pWaitSemaphores) { + for (uint32_t index1 = 0; index1 < local_pSubmits[index0].waitSemaphoreCount; ++index1) { + local_pSubmits[index0].pWaitSemaphores[index1] = Unwrap(local_pSubmits[index0].pWaitSemaphores[index1]); + } + } + if (local_pSubmits[index0].pSignalSemaphores) { + for (uint32_t index1 = 0; index1 < local_pSubmits[index0].signalSemaphoreCount; ++index1) { + local_pSubmits[index0].pSignalSemaphores[index1] = Unwrap(local_pSubmits[index0].pSignalSemaphores[index1]); + } + } + } + } + fence = Unwrap(fence); + } + VkResult result = device_dispatch_table.QueueSubmit(queue, submitCount, (const VkSubmitInfo*)local_pSubmits, fence); + + return result; +} + +VkResult DispatchObject::QueueWaitIdle(VkQueue queue) { + VkResult result = device_dispatch_table.QueueWaitIdle(queue); + + return result; +} + +VkResult DispatchObject::DeviceWaitIdle(VkDevice device) { + VkResult result = device_dispatch_table.DeviceWaitIdle(device); + + return result; +} + +VkResult DispatchObject::AllocateMemory(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, + const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory) { + if (!wrap_handles) return device_dispatch_table.AllocateMemory(device, pAllocateInfo, pAllocator, pMemory); + vku::safe_VkMemoryAllocateInfo var_local_pAllocateInfo; + vku::safe_VkMemoryAllocateInfo* local_pAllocateInfo = nullptr; + { + if (pAllocateInfo) { + local_pAllocateInfo = &var_local_pAllocateInfo; + local_pAllocateInfo->initialize(pAllocateInfo); + UnwrapPnextChainHandles(local_pAllocateInfo->pNext); + } + } + VkResult result = + device_dispatch_table.AllocateMemory(device, (const VkMemoryAllocateInfo*)local_pAllocateInfo, pAllocator, pMemory); + if (VK_SUCCESS == result) { + *pMemory = WrapNew(*pMemory); + } + return result; +} + +void DispatchObject::FreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.FreeMemory(device, memory, pAllocator); + + uint64_t memory_id = CastToUint64(memory); + auto iter = unique_id_mapping.pop(memory_id); + if (iter != unique_id_mapping.end()) { + memory = (VkDeviceMemory)iter->second; + } else { + memory = (VkDeviceMemory)0; + } + device_dispatch_table.FreeMemory(device, memory, pAllocator); +} + +VkResult DispatchObject::MapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, + VkMemoryMapFlags flags, void** ppData) { + if (!wrap_handles) return device_dispatch_table.MapMemory(device, memory, offset, size, flags, ppData); + { memory = Unwrap(memory); } + VkResult result = device_dispatch_table.MapMemory(device, memory, offset, size, flags, ppData); + + return result; +} + +void DispatchObject::UnmapMemory(VkDevice device, VkDeviceMemory memory) { + if (!wrap_handles) return device_dispatch_table.UnmapMemory(device, memory); + { memory = Unwrap(memory); } + device_dispatch_table.UnmapMemory(device, memory); +} + +VkResult DispatchObject::FlushMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, + const VkMappedMemoryRange* pMemoryRanges) { + if (!wrap_handles) return device_dispatch_table.FlushMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges); + small_vector var_local_pMemoryRanges; + vku::safe_VkMappedMemoryRange* local_pMemoryRanges = nullptr; + { + if (pMemoryRanges) { + var_local_pMemoryRanges.resize(memoryRangeCount); + local_pMemoryRanges = var_local_pMemoryRanges.data(); + for (uint32_t index0 = 0; index0 < memoryRangeCount; ++index0) { + local_pMemoryRanges[index0].initialize(&pMemoryRanges[index0]); + + if (pMemoryRanges[index0].memory) { + local_pMemoryRanges[index0].memory = Unwrap(pMemoryRanges[index0].memory); + } + } + } + } + VkResult result = + device_dispatch_table.FlushMappedMemoryRanges(device, memoryRangeCount, (const VkMappedMemoryRange*)local_pMemoryRanges); + + return result; +} + +VkResult DispatchObject::InvalidateMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, + const VkMappedMemoryRange* pMemoryRanges) { + if (!wrap_handles) return device_dispatch_table.InvalidateMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges); + small_vector var_local_pMemoryRanges; + vku::safe_VkMappedMemoryRange* local_pMemoryRanges = nullptr; + { + if (pMemoryRanges) { + var_local_pMemoryRanges.resize(memoryRangeCount); + local_pMemoryRanges = var_local_pMemoryRanges.data(); + for (uint32_t index0 = 0; index0 < memoryRangeCount; ++index0) { + local_pMemoryRanges[index0].initialize(&pMemoryRanges[index0]); + + if (pMemoryRanges[index0].memory) { + local_pMemoryRanges[index0].memory = Unwrap(pMemoryRanges[index0].memory); + } + } + } + } + VkResult result = device_dispatch_table.InvalidateMappedMemoryRanges(device, memoryRangeCount, + (const VkMappedMemoryRange*)local_pMemoryRanges); + + return result; +} + +void DispatchObject::GetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes) { + if (!wrap_handles) return device_dispatch_table.GetDeviceMemoryCommitment(device, memory, pCommittedMemoryInBytes); + { memory = Unwrap(memory); } + device_dispatch_table.GetDeviceMemoryCommitment(device, memory, pCommittedMemoryInBytes); +} + +VkResult DispatchObject::BindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset) { + if (!wrap_handles) return device_dispatch_table.BindBufferMemory(device, buffer, memory, memoryOffset); + { + buffer = Unwrap(buffer); + memory = Unwrap(memory); + } + VkResult result = device_dispatch_table.BindBufferMemory(device, buffer, memory, memoryOffset); + + return result; +} + +VkResult DispatchObject::BindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset) { + if (!wrap_handles) return device_dispatch_table.BindImageMemory(device, image, memory, memoryOffset); + { + image = Unwrap(image); + memory = Unwrap(memory); + } + VkResult result = device_dispatch_table.BindImageMemory(device, image, memory, memoryOffset); + + return result; +} + +void DispatchObject::GetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements) { + if (!wrap_handles) return device_dispatch_table.GetBufferMemoryRequirements(device, buffer, pMemoryRequirements); + { buffer = Unwrap(buffer); } + device_dispatch_table.GetBufferMemoryRequirements(device, buffer, pMemoryRequirements); +} + +void DispatchObject::GetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements) { + if (!wrap_handles) return device_dispatch_table.GetImageMemoryRequirements(device, image, pMemoryRequirements); + { image = Unwrap(image); } + device_dispatch_table.GetImageMemoryRequirements(device, image, pMemoryRequirements); +} + +void DispatchObject::GetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements* pSparseMemoryRequirements) { + if (!wrap_handles) + return device_dispatch_table.GetImageSparseMemoryRequirements(device, image, pSparseMemoryRequirementCount, + pSparseMemoryRequirements); + { image = Unwrap(image); } + device_dispatch_table.GetImageSparseMemoryRequirements(device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements); +} + +void DispatchObject::GetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, + VkImageType type, VkSampleCountFlagBits samples, + VkImageUsageFlags usage, VkImageTiling tiling, + uint32_t* pPropertyCount, + VkSparseImageFormatProperties* pProperties) { + instance_dispatch_table.GetPhysicalDeviceSparseImageFormatProperties(physicalDevice, format, type, samples, usage, tiling, + pPropertyCount, pProperties); +} + +VkResult DispatchObject::QueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence) { + if (!wrap_handles) return device_dispatch_table.QueueBindSparse(queue, bindInfoCount, pBindInfo, fence); + small_vector var_local_pBindInfo; + vku::safe_VkBindSparseInfo* local_pBindInfo = nullptr; + { + if (pBindInfo) { + var_local_pBindInfo.resize(bindInfoCount); + local_pBindInfo = var_local_pBindInfo.data(); + for (uint32_t index0 = 0; index0 < bindInfoCount; ++index0) { + local_pBindInfo[index0].initialize(&pBindInfo[index0]); + UnwrapPnextChainHandles(local_pBindInfo[index0].pNext); + if (local_pBindInfo[index0].pWaitSemaphores) { + for (uint32_t index1 = 0; index1 < local_pBindInfo[index0].waitSemaphoreCount; ++index1) { + local_pBindInfo[index0].pWaitSemaphores[index1] = Unwrap(local_pBindInfo[index0].pWaitSemaphores[index1]); + } + } + if (local_pBindInfo[index0].pBufferBinds) { + for (uint32_t index1 = 0; index1 < local_pBindInfo[index0].bufferBindCount; ++index1) { + if (pBindInfo[index0].pBufferBinds[index1].buffer) { + local_pBindInfo[index0].pBufferBinds[index1].buffer = + Unwrap(pBindInfo[index0].pBufferBinds[index1].buffer); + } + if (local_pBindInfo[index0].pBufferBinds[index1].pBinds) { + for (uint32_t index2 = 0; index2 < local_pBindInfo[index0].pBufferBinds[index1].bindCount; ++index2) { + if (pBindInfo[index0].pBufferBinds[index1].pBinds[index2].memory) { + local_pBindInfo[index0].pBufferBinds[index1].pBinds[index2].memory = + Unwrap(pBindInfo[index0].pBufferBinds[index1].pBinds[index2].memory); + } + } + } + } + } + if (local_pBindInfo[index0].pImageOpaqueBinds) { + for (uint32_t index1 = 0; index1 < local_pBindInfo[index0].imageOpaqueBindCount; ++index1) { + if (pBindInfo[index0].pImageOpaqueBinds[index1].image) { + local_pBindInfo[index0].pImageOpaqueBinds[index1].image = + Unwrap(pBindInfo[index0].pImageOpaqueBinds[index1].image); + } + if (local_pBindInfo[index0].pImageOpaqueBinds[index1].pBinds) { + for (uint32_t index2 = 0; index2 < local_pBindInfo[index0].pImageOpaqueBinds[index1].bindCount; + ++index2) { + if (pBindInfo[index0].pImageOpaqueBinds[index1].pBinds[index2].memory) { + local_pBindInfo[index0].pImageOpaqueBinds[index1].pBinds[index2].memory = + Unwrap(pBindInfo[index0].pImageOpaqueBinds[index1].pBinds[index2].memory); + } + } + } + } + } + if (local_pBindInfo[index0].pImageBinds) { + for (uint32_t index1 = 0; index1 < local_pBindInfo[index0].imageBindCount; ++index1) { + if (pBindInfo[index0].pImageBinds[index1].image) { + local_pBindInfo[index0].pImageBinds[index1].image = Unwrap(pBindInfo[index0].pImageBinds[index1].image); + } + if (local_pBindInfo[index0].pImageBinds[index1].pBinds) { + for (uint32_t index2 = 0; index2 < local_pBindInfo[index0].pImageBinds[index1].bindCount; ++index2) { + if (pBindInfo[index0].pImageBinds[index1].pBinds[index2].memory) { + local_pBindInfo[index0].pImageBinds[index1].pBinds[index2].memory = + Unwrap(pBindInfo[index0].pImageBinds[index1].pBinds[index2].memory); + } + } + } + } + } + if (local_pBindInfo[index0].pSignalSemaphores) { + for (uint32_t index1 = 0; index1 < local_pBindInfo[index0].signalSemaphoreCount; ++index1) { + local_pBindInfo[index0].pSignalSemaphores[index1] = + Unwrap(local_pBindInfo[index0].pSignalSemaphores[index1]); + } + } + } + } + fence = Unwrap(fence); + } + VkResult result = device_dispatch_table.QueueBindSparse(queue, bindInfoCount, (const VkBindSparseInfo*)local_pBindInfo, fence); + + return result; +} + +VkResult DispatchObject::CreateFence(VkDevice device, const VkFenceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkFence* pFence) { + if (!wrap_handles) return device_dispatch_table.CreateFence(device, pCreateInfo, pAllocator, pFence); + + VkResult result = device_dispatch_table.CreateFence(device, pCreateInfo, pAllocator, pFence); + if (VK_SUCCESS == result) { + *pFence = WrapNew(*pFence); + } + return result; +} + +void DispatchObject::DestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyFence(device, fence, pAllocator); + + uint64_t fence_id = CastToUint64(fence); + auto iter = unique_id_mapping.pop(fence_id); + if (iter != unique_id_mapping.end()) { + fence = (VkFence)iter->second; + } else { + fence = (VkFence)0; + } + device_dispatch_table.DestroyFence(device, fence, pAllocator); +} + +VkResult DispatchObject::ResetFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences) { + if (!wrap_handles) return device_dispatch_table.ResetFences(device, fenceCount, pFences); + small_vector var_local_pFences; + VkFence* local_pFences = nullptr; + { + if (pFences) { + var_local_pFences.resize(fenceCount); + local_pFences = var_local_pFences.data(); + for (uint32_t index0 = 0; index0 < fenceCount; ++index0) { + local_pFences[index0] = Unwrap(pFences[index0]); + } + } + } + VkResult result = device_dispatch_table.ResetFences(device, fenceCount, (const VkFence*)local_pFences); + + return result; +} + +VkResult DispatchObject::GetFenceStatus(VkDevice device, VkFence fence) { + if (!wrap_handles) return device_dispatch_table.GetFenceStatus(device, fence); + { fence = Unwrap(fence); } + VkResult result = device_dispatch_table.GetFenceStatus(device, fence); + + return result; +} + +VkResult DispatchObject::WaitForFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, + uint64_t timeout) { + if (!wrap_handles) return device_dispatch_table.WaitForFences(device, fenceCount, pFences, waitAll, timeout); + small_vector var_local_pFences; + VkFence* local_pFences = nullptr; + { + if (pFences) { + var_local_pFences.resize(fenceCount); + local_pFences = var_local_pFences.data(); + for (uint32_t index0 = 0; index0 < fenceCount; ++index0) { + local_pFences[index0] = Unwrap(pFences[index0]); + } + } + } + VkResult result = device_dispatch_table.WaitForFences(device, fenceCount, (const VkFence*)local_pFences, waitAll, timeout); + + return result; +} + +VkResult DispatchObject::CreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore) { + if (!wrap_handles) return device_dispatch_table.CreateSemaphore(device, pCreateInfo, pAllocator, pSemaphore); + + VkResult result = device_dispatch_table.CreateSemaphore(device, pCreateInfo, pAllocator, pSemaphore); + if (VK_SUCCESS == result) { + *pSemaphore = WrapNew(*pSemaphore); + } + return result; +} + +void DispatchObject::DestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroySemaphore(device, semaphore, pAllocator); + + uint64_t semaphore_id = CastToUint64(semaphore); + auto iter = unique_id_mapping.pop(semaphore_id); + if (iter != unique_id_mapping.end()) { + semaphore = (VkSemaphore)iter->second; + } else { + semaphore = (VkSemaphore)0; + } + device_dispatch_table.DestroySemaphore(device, semaphore, pAllocator); +} + +VkResult DispatchObject::CreateEvent(VkDevice device, const VkEventCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkEvent* pEvent) { + if (!wrap_handles) return device_dispatch_table.CreateEvent(device, pCreateInfo, pAllocator, pEvent); + + VkResult result = device_dispatch_table.CreateEvent(device, pCreateInfo, pAllocator, pEvent); + if (VK_SUCCESS == result) { + *pEvent = WrapNew(*pEvent); + } + return result; +} + +void DispatchObject::DestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyEvent(device, event, pAllocator); + + uint64_t event_id = CastToUint64(event); + auto iter = unique_id_mapping.pop(event_id); + if (iter != unique_id_mapping.end()) { + event = (VkEvent)iter->second; + } else { + event = (VkEvent)0; + } + device_dispatch_table.DestroyEvent(device, event, pAllocator); +} + +VkResult DispatchObject::GetEventStatus(VkDevice device, VkEvent event) { + if (!wrap_handles) return device_dispatch_table.GetEventStatus(device, event); + { event = Unwrap(event); } + VkResult result = device_dispatch_table.GetEventStatus(device, event); + + return result; +} + +VkResult DispatchObject::SetEvent(VkDevice device, VkEvent event) { + if (!wrap_handles) return device_dispatch_table.SetEvent(device, event); + { event = Unwrap(event); } + VkResult result = device_dispatch_table.SetEvent(device, event); + + return result; +} + +VkResult DispatchObject::ResetEvent(VkDevice device, VkEvent event) { + if (!wrap_handles) return device_dispatch_table.ResetEvent(device, event); + { event = Unwrap(event); } + VkResult result = device_dispatch_table.ResetEvent(device, event); + + return result; +} + +VkResult DispatchObject::CreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool) { + if (!wrap_handles) return device_dispatch_table.CreateQueryPool(device, pCreateInfo, pAllocator, pQueryPool); + + VkResult result = device_dispatch_table.CreateQueryPool(device, pCreateInfo, pAllocator, pQueryPool); + if (VK_SUCCESS == result) { + *pQueryPool = WrapNew(*pQueryPool); + } + return result; +} + +void DispatchObject::DestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyQueryPool(device, queryPool, pAllocator); + + uint64_t queryPool_id = CastToUint64(queryPool); + auto iter = unique_id_mapping.pop(queryPool_id); + if (iter != unique_id_mapping.end()) { + queryPool = (VkQueryPool)iter->second; + } else { + queryPool = (VkQueryPool)0; + } + device_dispatch_table.DestroyQueryPool(device, queryPool, pAllocator); +} + +VkResult DispatchObject::GetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, + size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags) { + if (!wrap_handles) + return device_dispatch_table.GetQueryPoolResults(device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags); + { queryPool = Unwrap(queryPool); } + VkResult result = + device_dispatch_table.GetQueryPoolResults(device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags); + + return result; +} + +VkResult DispatchObject::CreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer) { + if (!wrap_handles) return device_dispatch_table.CreateBuffer(device, pCreateInfo, pAllocator, pBuffer); + vku::safe_VkBufferCreateInfo var_local_pCreateInfo; + vku::safe_VkBufferCreateInfo* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + UnwrapPnextChainHandles(local_pCreateInfo->pNext); + } + } + VkResult result = device_dispatch_table.CreateBuffer(device, (const VkBufferCreateInfo*)local_pCreateInfo, pAllocator, pBuffer); + if (VK_SUCCESS == result) { + *pBuffer = WrapNew(*pBuffer); + } + return result; +} + +void DispatchObject::DestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyBuffer(device, buffer, pAllocator); + + uint64_t buffer_id = CastToUint64(buffer); + auto iter = unique_id_mapping.pop(buffer_id); + if (iter != unique_id_mapping.end()) { + buffer = (VkBuffer)iter->second; + } else { + buffer = (VkBuffer)0; + } + device_dispatch_table.DestroyBuffer(device, buffer, pAllocator); +} + +VkResult DispatchObject::CreateBufferView(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkBufferView* pView) { + if (!wrap_handles) return device_dispatch_table.CreateBufferView(device, pCreateInfo, pAllocator, pView); + vku::safe_VkBufferViewCreateInfo var_local_pCreateInfo; + vku::safe_VkBufferViewCreateInfo* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + + if (pCreateInfo->buffer) { + local_pCreateInfo->buffer = Unwrap(pCreateInfo->buffer); + } + } + } + VkResult result = + device_dispatch_table.CreateBufferView(device, (const VkBufferViewCreateInfo*)local_pCreateInfo, pAllocator, pView); + if (VK_SUCCESS == result) { + *pView = WrapNew(*pView); + } + return result; +} + +void DispatchObject::DestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyBufferView(device, bufferView, pAllocator); + + uint64_t bufferView_id = CastToUint64(bufferView); + auto iter = unique_id_mapping.pop(bufferView_id); + if (iter != unique_id_mapping.end()) { + bufferView = (VkBufferView)iter->second; + } else { + bufferView = (VkBufferView)0; + } + device_dispatch_table.DestroyBufferView(device, bufferView, pAllocator); +} + +VkResult DispatchObject::CreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkImage* pImage) { + if (!wrap_handles) return device_dispatch_table.CreateImage(device, pCreateInfo, pAllocator, pImage); + vku::safe_VkImageCreateInfo var_local_pCreateInfo; + vku::safe_VkImageCreateInfo* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + UnwrapPnextChainHandles(local_pCreateInfo->pNext); + } + } + VkResult result = device_dispatch_table.CreateImage(device, (const VkImageCreateInfo*)local_pCreateInfo, pAllocator, pImage); + if (VK_SUCCESS == result) { + *pImage = WrapNew(*pImage); + } + return result; +} + +void DispatchObject::DestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyImage(device, image, pAllocator); + + uint64_t image_id = CastToUint64(image); + auto iter = unique_id_mapping.pop(image_id); + if (iter != unique_id_mapping.end()) { + image = (VkImage)iter->second; + } else { + image = (VkImage)0; + } + device_dispatch_table.DestroyImage(device, image, pAllocator); +} + +void DispatchObject::GetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, + VkSubresourceLayout* pLayout) { + if (!wrap_handles) return device_dispatch_table.GetImageSubresourceLayout(device, image, pSubresource, pLayout); + { image = Unwrap(image); } + device_dispatch_table.GetImageSubresourceLayout(device, image, pSubresource, pLayout); +} + +VkResult DispatchObject::CreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkImageView* pView) { + if (!wrap_handles) return device_dispatch_table.CreateImageView(device, pCreateInfo, pAllocator, pView); + vku::safe_VkImageViewCreateInfo var_local_pCreateInfo; + vku::safe_VkImageViewCreateInfo* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + + if (pCreateInfo->image) { + local_pCreateInfo->image = Unwrap(pCreateInfo->image); + } + UnwrapPnextChainHandles(local_pCreateInfo->pNext); + } + } + VkResult result = + device_dispatch_table.CreateImageView(device, (const VkImageViewCreateInfo*)local_pCreateInfo, pAllocator, pView); + if (VK_SUCCESS == result) { + *pView = WrapNew(*pView); + } + return result; +} + +void DispatchObject::DestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyImageView(device, imageView, pAllocator); + + uint64_t imageView_id = CastToUint64(imageView); + auto iter = unique_id_mapping.pop(imageView_id); + if (iter != unique_id_mapping.end()) { + imageView = (VkImageView)iter->second; + } else { + imageView = (VkImageView)0; + } + device_dispatch_table.DestroyImageView(device, imageView, pAllocator); +} + +VkResult DispatchObject::CreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule) { + if (!wrap_handles) return device_dispatch_table.CreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule); + vku::safe_VkShaderModuleCreateInfo var_local_pCreateInfo; + vku::safe_VkShaderModuleCreateInfo* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + UnwrapPnextChainHandles(local_pCreateInfo->pNext); + } + } + VkResult result = device_dispatch_table.CreateShaderModule(device, (const VkShaderModuleCreateInfo*)local_pCreateInfo, + pAllocator, pShaderModule); + if (VK_SUCCESS == result) { + *pShaderModule = WrapNew(*pShaderModule); + } + return result; +} + +void DispatchObject::DestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyShaderModule(device, shaderModule, pAllocator); + + uint64_t shaderModule_id = CastToUint64(shaderModule); + auto iter = unique_id_mapping.pop(shaderModule_id); + if (iter != unique_id_mapping.end()) { + shaderModule = (VkShaderModule)iter->second; + } else { + shaderModule = (VkShaderModule)0; + } + device_dispatch_table.DestroyShaderModule(device, shaderModule, pAllocator); +} + +VkResult DispatchObject::CreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache) { + if (!wrap_handles) return device_dispatch_table.CreatePipelineCache(device, pCreateInfo, pAllocator, pPipelineCache); + + VkResult result = device_dispatch_table.CreatePipelineCache(device, pCreateInfo, pAllocator, pPipelineCache); + if (VK_SUCCESS == result) { + *pPipelineCache = WrapNew(*pPipelineCache); + } + return result; +} + +void DispatchObject::DestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyPipelineCache(device, pipelineCache, pAllocator); + + uint64_t pipelineCache_id = CastToUint64(pipelineCache); + auto iter = unique_id_mapping.pop(pipelineCache_id); + if (iter != unique_id_mapping.end()) { + pipelineCache = (VkPipelineCache)iter->second; + } else { + pipelineCache = (VkPipelineCache)0; + } + device_dispatch_table.DestroyPipelineCache(device, pipelineCache, pAllocator); +} + +VkResult DispatchObject::GetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData) { + if (!wrap_handles) return device_dispatch_table.GetPipelineCacheData(device, pipelineCache, pDataSize, pData); + { pipelineCache = Unwrap(pipelineCache); } + VkResult result = device_dispatch_table.GetPipelineCacheData(device, pipelineCache, pDataSize, pData); + + return result; +} + +VkResult DispatchObject::MergePipelineCaches(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, + const VkPipelineCache* pSrcCaches) { + if (!wrap_handles) return device_dispatch_table.MergePipelineCaches(device, dstCache, srcCacheCount, pSrcCaches); + small_vector var_local_pSrcCaches; + VkPipelineCache* local_pSrcCaches = nullptr; + { + dstCache = Unwrap(dstCache); + if (pSrcCaches) { + var_local_pSrcCaches.resize(srcCacheCount); + local_pSrcCaches = var_local_pSrcCaches.data(); + for (uint32_t index0 = 0; index0 < srcCacheCount; ++index0) { + local_pSrcCaches[index0] = Unwrap(pSrcCaches[index0]); + } + } + } + VkResult result = + device_dispatch_table.MergePipelineCaches(device, dstCache, srcCacheCount, (const VkPipelineCache*)local_pSrcCaches); + + return result; +} + +void DispatchObject::DestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyPipeline(device, pipeline, pAllocator); + + uint64_t pipeline_id = CastToUint64(pipeline); + auto iter = unique_id_mapping.pop(pipeline_id); + if (iter != unique_id_mapping.end()) { + pipeline = (VkPipeline)iter->second; + } else { + pipeline = (VkPipeline)0; + } + device_dispatch_table.DestroyPipeline(device, pipeline, pAllocator); +} + +VkResult DispatchObject::CreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout) { + if (!wrap_handles) return device_dispatch_table.CreatePipelineLayout(device, pCreateInfo, pAllocator, pPipelineLayout); + vku::safe_VkPipelineLayoutCreateInfo var_local_pCreateInfo; + vku::safe_VkPipelineLayoutCreateInfo* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + if (local_pCreateInfo->pSetLayouts) { + for (uint32_t index1 = 0; index1 < local_pCreateInfo->setLayoutCount; ++index1) { + local_pCreateInfo->pSetLayouts[index1] = Unwrap(local_pCreateInfo->pSetLayouts[index1]); + } + } + } + } + VkResult result = device_dispatch_table.CreatePipelineLayout(device, (const VkPipelineLayoutCreateInfo*)local_pCreateInfo, + pAllocator, pPipelineLayout); + if (VK_SUCCESS == result) { + *pPipelineLayout = WrapNew(*pPipelineLayout); + } + return result; +} + +void DispatchObject::DestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout, + const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyPipelineLayout(device, pipelineLayout, pAllocator); + + uint64_t pipelineLayout_id = CastToUint64(pipelineLayout); + auto iter = unique_id_mapping.pop(pipelineLayout_id); + if (iter != unique_id_mapping.end()) { + pipelineLayout = (VkPipelineLayout)iter->second; + } else { + pipelineLayout = (VkPipelineLayout)0; + } + device_dispatch_table.DestroyPipelineLayout(device, pipelineLayout, pAllocator); +} + +VkResult DispatchObject::CreateSampler(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSampler* pSampler) { + if (!wrap_handles) return device_dispatch_table.CreateSampler(device, pCreateInfo, pAllocator, pSampler); + vku::safe_VkSamplerCreateInfo var_local_pCreateInfo; + vku::safe_VkSamplerCreateInfo* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + UnwrapPnextChainHandles(local_pCreateInfo->pNext); + } + } + VkResult result = + device_dispatch_table.CreateSampler(device, (const VkSamplerCreateInfo*)local_pCreateInfo, pAllocator, pSampler); + if (VK_SUCCESS == result) { + *pSampler = WrapNew(*pSampler); + } + return result; +} + +void DispatchObject::DestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroySampler(device, sampler, pAllocator); + + uint64_t sampler_id = CastToUint64(sampler); + auto iter = unique_id_mapping.pop(sampler_id); + if (iter != unique_id_mapping.end()) { + sampler = (VkSampler)iter->second; + } else { + sampler = (VkSampler)0; + } + device_dispatch_table.DestroySampler(device, sampler, pAllocator); +} + +VkResult DispatchObject::CreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout) { + if (!wrap_handles) return device_dispatch_table.CreateDescriptorSetLayout(device, pCreateInfo, pAllocator, pSetLayout); + vku::safe_VkDescriptorSetLayoutCreateInfo var_local_pCreateInfo; + vku::safe_VkDescriptorSetLayoutCreateInfo* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + if (local_pCreateInfo->pBindings) { + for (uint32_t index1 = 0; index1 < local_pCreateInfo->bindingCount; ++index1) { + if (local_pCreateInfo->pBindings[index1].pImmutableSamplers) { + for (uint32_t index2 = 0; index2 < local_pCreateInfo->pBindings[index1].descriptorCount; ++index2) { + local_pCreateInfo->pBindings[index1].pImmutableSamplers[index2] = + Unwrap(local_pCreateInfo->pBindings[index1].pImmutableSamplers[index2]); + } + } + } + } + } + } + VkResult result = device_dispatch_table.CreateDescriptorSetLayout( + device, (const VkDescriptorSetLayoutCreateInfo*)local_pCreateInfo, pAllocator, pSetLayout); + if (VK_SUCCESS == result) { + *pSetLayout = WrapNew(*pSetLayout); + } + return result; +} + +void DispatchObject::DestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, + const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyDescriptorSetLayout(device, descriptorSetLayout, pAllocator); + + uint64_t descriptorSetLayout_id = CastToUint64(descriptorSetLayout); + auto iter = unique_id_mapping.pop(descriptorSetLayout_id); + if (iter != unique_id_mapping.end()) { + descriptorSetLayout = (VkDescriptorSetLayout)iter->second; + } else { + descriptorSetLayout = (VkDescriptorSetLayout)0; + } + device_dispatch_table.DestroyDescriptorSetLayout(device, descriptorSetLayout, pAllocator); +} + +VkResult DispatchObject::CreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool) { + if (!wrap_handles) return device_dispatch_table.CreateDescriptorPool(device, pCreateInfo, pAllocator, pDescriptorPool); + + VkResult result = device_dispatch_table.CreateDescriptorPool(device, pCreateInfo, pAllocator, pDescriptorPool); + if (VK_SUCCESS == result) { + *pDescriptorPool = WrapNew(*pDescriptorPool); + } + return result; +} + +void DispatchObject::UpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, + const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, + const VkCopyDescriptorSet* pDescriptorCopies) { + if (!wrap_handles) + return device_dispatch_table.UpdateDescriptorSets(device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, + pDescriptorCopies); + small_vector var_local_pDescriptorWrites; + vku::safe_VkWriteDescriptorSet* local_pDescriptorWrites = nullptr; + small_vector var_local_pDescriptorCopies; + vku::safe_VkCopyDescriptorSet* local_pDescriptorCopies = nullptr; + { + if (pDescriptorWrites) { + var_local_pDescriptorWrites.resize(descriptorWriteCount); + local_pDescriptorWrites = var_local_pDescriptorWrites.data(); + for (uint32_t index0 = 0; index0 < descriptorWriteCount; ++index0) { + local_pDescriptorWrites[index0].initialize(&pDescriptorWrites[index0]); + UnwrapPnextChainHandles(local_pDescriptorWrites[index0].pNext); + + if (pDescriptorWrites[index0].dstSet) { + local_pDescriptorWrites[index0].dstSet = Unwrap(pDescriptorWrites[index0].dstSet); + } + if (local_pDescriptorWrites[index0].pImageInfo) { + for (uint32_t index1 = 0; index1 < local_pDescriptorWrites[index0].descriptorCount; ++index1) { + if (pDescriptorWrites[index0].pImageInfo[index1].sampler) { + local_pDescriptorWrites[index0].pImageInfo[index1].sampler = + Unwrap(pDescriptorWrites[index0].pImageInfo[index1].sampler); + } + if (pDescriptorWrites[index0].pImageInfo[index1].imageView) { + local_pDescriptorWrites[index0].pImageInfo[index1].imageView = + Unwrap(pDescriptorWrites[index0].pImageInfo[index1].imageView); + } + } + } + if (local_pDescriptorWrites[index0].pBufferInfo) { + for (uint32_t index1 = 0; index1 < local_pDescriptorWrites[index0].descriptorCount; ++index1) { + if (pDescriptorWrites[index0].pBufferInfo[index1].buffer) { + local_pDescriptorWrites[index0].pBufferInfo[index1].buffer = + Unwrap(pDescriptorWrites[index0].pBufferInfo[index1].buffer); + } + } + } + if (local_pDescriptorWrites[index0].pTexelBufferView) { + for (uint32_t index1 = 0; index1 < local_pDescriptorWrites[index0].descriptorCount; ++index1) { + local_pDescriptorWrites[index0].pTexelBufferView[index1] = + Unwrap(local_pDescriptorWrites[index0].pTexelBufferView[index1]); + } + } + } + } + if (pDescriptorCopies) { + var_local_pDescriptorCopies.resize(descriptorCopyCount); + local_pDescriptorCopies = var_local_pDescriptorCopies.data(); + for (uint32_t index0 = 0; index0 < descriptorCopyCount; ++index0) { + local_pDescriptorCopies[index0].initialize(&pDescriptorCopies[index0]); + + if (pDescriptorCopies[index0].srcSet) { + local_pDescriptorCopies[index0].srcSet = Unwrap(pDescriptorCopies[index0].srcSet); + } + if (pDescriptorCopies[index0].dstSet) { + local_pDescriptorCopies[index0].dstSet = Unwrap(pDescriptorCopies[index0].dstSet); + } + } + } + } + device_dispatch_table.UpdateDescriptorSets(device, descriptorWriteCount, (const VkWriteDescriptorSet*)local_pDescriptorWrites, + descriptorCopyCount, (const VkCopyDescriptorSet*)local_pDescriptorCopies); +} + +VkResult DispatchObject::CreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer) { + if (!wrap_handles) return device_dispatch_table.CreateFramebuffer(device, pCreateInfo, pAllocator, pFramebuffer); + vku::safe_VkFramebufferCreateInfo var_local_pCreateInfo; + vku::safe_VkFramebufferCreateInfo* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + + if (pCreateInfo->renderPass) { + local_pCreateInfo->renderPass = Unwrap(pCreateInfo->renderPass); + } + if (local_pCreateInfo->pAttachments) { + for (uint32_t index1 = 0; index1 < local_pCreateInfo->attachmentCount; ++index1) { + local_pCreateInfo->pAttachments[index1] = Unwrap(local_pCreateInfo->pAttachments[index1]); + } + } + } + } + VkResult result = device_dispatch_table.CreateFramebuffer(device, (const VkFramebufferCreateInfo*)local_pCreateInfo, pAllocator, + pFramebuffer); + if (VK_SUCCESS == result) { + *pFramebuffer = WrapNew(*pFramebuffer); + } + return result; +} + +void DispatchObject::DestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyFramebuffer(device, framebuffer, pAllocator); + + uint64_t framebuffer_id = CastToUint64(framebuffer); + auto iter = unique_id_mapping.pop(framebuffer_id); + if (iter != unique_id_mapping.end()) { + framebuffer = (VkFramebuffer)iter->second; + } else { + framebuffer = (VkFramebuffer)0; + } + device_dispatch_table.DestroyFramebuffer(device, framebuffer, pAllocator); +} + +void DispatchObject::GetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity) { + if (!wrap_handles) return device_dispatch_table.GetRenderAreaGranularity(device, renderPass, pGranularity); + { renderPass = Unwrap(renderPass); } + device_dispatch_table.GetRenderAreaGranularity(device, renderPass, pGranularity); +} + +VkResult DispatchObject::CreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool) { + if (!wrap_handles) return device_dispatch_table.CreateCommandPool(device, pCreateInfo, pAllocator, pCommandPool); + + VkResult result = device_dispatch_table.CreateCommandPool(device, pCreateInfo, pAllocator, pCommandPool); + if (VK_SUCCESS == result) { + *pCommandPool = WrapNew(*pCommandPool); + } + return result; +} + +VkResult DispatchObject::ResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags) { + if (!wrap_handles) return device_dispatch_table.ResetCommandPool(device, commandPool, flags); + { commandPool = Unwrap(commandPool); } + VkResult result = device_dispatch_table.ResetCommandPool(device, commandPool, flags); + + return result; +} + +VkResult DispatchObject::EndCommandBuffer(VkCommandBuffer commandBuffer) { + VkResult result = device_dispatch_table.EndCommandBuffer(commandBuffer); + + return result; +} + +VkResult DispatchObject::ResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags) { + VkResult result = device_dispatch_table.ResetCommandBuffer(commandBuffer, flags); + + return result; +} + +void DispatchObject::CmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) { + if (!wrap_handles) return device_dispatch_table.CmdBindPipeline(commandBuffer, pipelineBindPoint, pipeline); + { pipeline = Unwrap(pipeline); } + device_dispatch_table.CmdBindPipeline(commandBuffer, pipelineBindPoint, pipeline); +} + +void DispatchObject::CmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, + const VkViewport* pViewports) { + device_dispatch_table.CmdSetViewport(commandBuffer, firstViewport, viewportCount, pViewports); +} + +void DispatchObject::CmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, + const VkRect2D* pScissors) { + device_dispatch_table.CmdSetScissor(commandBuffer, firstScissor, scissorCount, pScissors); +} + +void DispatchObject::CmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth) { + device_dispatch_table.CmdSetLineWidth(commandBuffer, lineWidth); +} + +void DispatchObject::CmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, + float depthBiasSlopeFactor) { + device_dispatch_table.CmdSetDepthBias(commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor); +} + +void DispatchObject::CmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4]) { + device_dispatch_table.CmdSetBlendConstants(commandBuffer, blendConstants); +} + +void DispatchObject::CmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds) { + device_dispatch_table.CmdSetDepthBounds(commandBuffer, minDepthBounds, maxDepthBounds); +} + +void DispatchObject::CmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask) { + device_dispatch_table.CmdSetStencilCompareMask(commandBuffer, faceMask, compareMask); +} + +void DispatchObject::CmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask) { + device_dispatch_table.CmdSetStencilWriteMask(commandBuffer, faceMask, writeMask); +} + +void DispatchObject::CmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference) { + device_dispatch_table.CmdSetStencilReference(commandBuffer, faceMask, reference); +} + +void DispatchObject::CmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, + const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, + const uint32_t* pDynamicOffsets) { + if (!wrap_handles) + return device_dispatch_table.CmdBindDescriptorSets(commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, + pDescriptorSets, dynamicOffsetCount, pDynamicOffsets); + small_vector var_local_pDescriptorSets; + VkDescriptorSet* local_pDescriptorSets = nullptr; + { + layout = Unwrap(layout); + if (pDescriptorSets) { + var_local_pDescriptorSets.resize(descriptorSetCount); + local_pDescriptorSets = var_local_pDescriptorSets.data(); + for (uint32_t index0 = 0; index0 < descriptorSetCount; ++index0) { + local_pDescriptorSets[index0] = Unwrap(pDescriptorSets[index0]); + } + } + } + device_dispatch_table.CmdBindDescriptorSets(commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, + (const VkDescriptorSet*)local_pDescriptorSets, dynamicOffsetCount, pDynamicOffsets); +} + +void DispatchObject::CmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkIndexType indexType) { + if (!wrap_handles) return device_dispatch_table.CmdBindIndexBuffer(commandBuffer, buffer, offset, indexType); + { buffer = Unwrap(buffer); } + device_dispatch_table.CmdBindIndexBuffer(commandBuffer, buffer, offset, indexType); +} + +void DispatchObject::CmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, + const VkBuffer* pBuffers, const VkDeviceSize* pOffsets) { + if (!wrap_handles) + return device_dispatch_table.CmdBindVertexBuffers(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets); + small_vector var_local_pBuffers; + VkBuffer* local_pBuffers = nullptr; + { + if (pBuffers) { + var_local_pBuffers.resize(bindingCount); + local_pBuffers = var_local_pBuffers.data(); + for (uint32_t index0 = 0; index0 < bindingCount; ++index0) { + local_pBuffers[index0] = Unwrap(pBuffers[index0]); + } + } + } + device_dispatch_table.CmdBindVertexBuffers(commandBuffer, firstBinding, bindingCount, (const VkBuffer*)local_pBuffers, + pOffsets); +} + +void DispatchObject::CmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, + uint32_t firstInstance) { + device_dispatch_table.CmdDraw(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance); +} + +void DispatchObject::CmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, + int32_t vertexOffset, uint32_t firstInstance) { + device_dispatch_table.CmdDrawIndexed(commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance); +} + +void DispatchObject::CmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, + uint32_t stride) { + if (!wrap_handles) return device_dispatch_table.CmdDrawIndirect(commandBuffer, buffer, offset, drawCount, stride); + { buffer = Unwrap(buffer); } + device_dispatch_table.CmdDrawIndirect(commandBuffer, buffer, offset, drawCount, stride); +} + +void DispatchObject::CmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, + uint32_t stride) { + if (!wrap_handles) return device_dispatch_table.CmdDrawIndexedIndirect(commandBuffer, buffer, offset, drawCount, stride); + { buffer = Unwrap(buffer); } + device_dispatch_table.CmdDrawIndexedIndirect(commandBuffer, buffer, offset, drawCount, stride); +} + +void DispatchObject::CmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) { + device_dispatch_table.CmdDispatch(commandBuffer, groupCountX, groupCountY, groupCountZ); +} + +void DispatchObject::CmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset) { + if (!wrap_handles) return device_dispatch_table.CmdDispatchIndirect(commandBuffer, buffer, offset); + { buffer = Unwrap(buffer); } + device_dispatch_table.CmdDispatchIndirect(commandBuffer, buffer, offset); +} + +void DispatchObject::CmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, + const VkBufferCopy* pRegions) { + if (!wrap_handles) return device_dispatch_table.CmdCopyBuffer(commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions); + { + srcBuffer = Unwrap(srcBuffer); + dstBuffer = Unwrap(dstBuffer); + } + device_dispatch_table.CmdCopyBuffer(commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions); +} + +void DispatchObject::CmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, + VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions) { + if (!wrap_handles) + return device_dispatch_table.CmdCopyImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, + pRegions); + { + srcImage = Unwrap(srcImage); + dstImage = Unwrap(dstImage); + } + device_dispatch_table.CmdCopyImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); +} + +void DispatchObject::CmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, + VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, + VkFilter filter) { + if (!wrap_handles) + return device_dispatch_table.CmdBlitImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, + pRegions, filter); + { + srcImage = Unwrap(srcImage); + dstImage = Unwrap(dstImage); + } + device_dispatch_table.CmdBlitImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, + filter); +} + +void DispatchObject::CmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, + VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions) { + if (!wrap_handles) + return device_dispatch_table.CmdCopyBufferToImage(commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, + pRegions); + { + srcBuffer = Unwrap(srcBuffer); + dstImage = Unwrap(dstImage); + } + device_dispatch_table.CmdCopyBufferToImage(commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions); +} + +void DispatchObject::CmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, + VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions) { + if (!wrap_handles) + return device_dispatch_table.CmdCopyImageToBuffer(commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, + pRegions); + { + srcImage = Unwrap(srcImage); + dstBuffer = Unwrap(dstBuffer); + } + device_dispatch_table.CmdCopyImageToBuffer(commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions); +} + +void DispatchObject::CmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, + VkDeviceSize dataSize, const void* pData) { + if (!wrap_handles) return device_dispatch_table.CmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, dataSize, pData); + { dstBuffer = Unwrap(dstBuffer); } + device_dispatch_table.CmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, dataSize, pData); +} + +void DispatchObject::CmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, + uint32_t data) { + if (!wrap_handles) return device_dispatch_table.CmdFillBuffer(commandBuffer, dstBuffer, dstOffset, size, data); + { dstBuffer = Unwrap(dstBuffer); } + device_dispatch_table.CmdFillBuffer(commandBuffer, dstBuffer, dstOffset, size, data); +} + +void DispatchObject::CmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, + const VkClearColorValue* pColor, uint32_t rangeCount, + const VkImageSubresourceRange* pRanges) { + if (!wrap_handles) + return device_dispatch_table.CmdClearColorImage(commandBuffer, image, imageLayout, pColor, rangeCount, pRanges); + { image = Unwrap(image); } + device_dispatch_table.CmdClearColorImage(commandBuffer, image, imageLayout, pColor, rangeCount, pRanges); +} + +void DispatchObject::CmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, + const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, + const VkImageSubresourceRange* pRanges) { + if (!wrap_handles) + return device_dispatch_table.CmdClearDepthStencilImage(commandBuffer, image, imageLayout, pDepthStencil, rangeCount, + pRanges); + { image = Unwrap(image); } + device_dispatch_table.CmdClearDepthStencilImage(commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges); +} + +void DispatchObject::CmdClearAttachments(VkCommandBuffer commandBuffer, uint32_t attachmentCount, + const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects) { + device_dispatch_table.CmdClearAttachments(commandBuffer, attachmentCount, pAttachments, rectCount, pRects); +} + +void DispatchObject::CmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, + VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, + const VkImageResolve* pRegions) { + if (!wrap_handles) + return device_dispatch_table.CmdResolveImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, + pRegions); + { + srcImage = Unwrap(srcImage); + dstImage = Unwrap(dstImage); + } + device_dispatch_table.CmdResolveImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); +} + +void DispatchObject::CmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) { + if (!wrap_handles) return device_dispatch_table.CmdSetEvent(commandBuffer, event, stageMask); + { event = Unwrap(event); } + device_dispatch_table.CmdSetEvent(commandBuffer, event, stageMask); +} + +void DispatchObject::CmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) { + if (!wrap_handles) return device_dispatch_table.CmdResetEvent(commandBuffer, event, stageMask); + { event = Unwrap(event); } + device_dispatch_table.CmdResetEvent(commandBuffer, event, stageMask); +} + +void DispatchObject::CmdWaitEvents(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) { + if (!wrap_handles) + return device_dispatch_table.CmdWaitEvents(commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, + memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, + pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); + small_vector var_local_pEvents; + VkEvent* local_pEvents = nullptr; + small_vector var_local_pBufferMemoryBarriers; + vku::safe_VkBufferMemoryBarrier* local_pBufferMemoryBarriers = nullptr; + small_vector var_local_pImageMemoryBarriers; + vku::safe_VkImageMemoryBarrier* local_pImageMemoryBarriers = nullptr; + { + if (pEvents) { + var_local_pEvents.resize(eventCount); + local_pEvents = var_local_pEvents.data(); + for (uint32_t index0 = 0; index0 < eventCount; ++index0) { + local_pEvents[index0] = Unwrap(pEvents[index0]); + } + } + if (pBufferMemoryBarriers) { + var_local_pBufferMemoryBarriers.resize(bufferMemoryBarrierCount); + local_pBufferMemoryBarriers = var_local_pBufferMemoryBarriers.data(); + for (uint32_t index0 = 0; index0 < bufferMemoryBarrierCount; ++index0) { + local_pBufferMemoryBarriers[index0].initialize(&pBufferMemoryBarriers[index0]); + + if (pBufferMemoryBarriers[index0].buffer) { + local_pBufferMemoryBarriers[index0].buffer = Unwrap(pBufferMemoryBarriers[index0].buffer); + } + } + } + if (pImageMemoryBarriers) { + var_local_pImageMemoryBarriers.resize(imageMemoryBarrierCount); + local_pImageMemoryBarriers = var_local_pImageMemoryBarriers.data(); + for (uint32_t index0 = 0; index0 < imageMemoryBarrierCount; ++index0) { + local_pImageMemoryBarriers[index0].initialize(&pImageMemoryBarriers[index0]); + + if (pImageMemoryBarriers[index0].image) { + local_pImageMemoryBarriers[index0].image = Unwrap(pImageMemoryBarriers[index0].image); + } + } + } + } + device_dispatch_table.CmdWaitEvents(commandBuffer, eventCount, (const VkEvent*)local_pEvents, srcStageMask, dstStageMask, + memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, + (const VkBufferMemoryBarrier*)local_pBufferMemoryBarriers, imageMemoryBarrierCount, + (const VkImageMemoryBarrier*)local_pImageMemoryBarriers); +} + +void DispatchObject::CmdPipelineBarrier(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) { + if (!wrap_handles) + return device_dispatch_table.CmdPipelineBarrier(commandBuffer, srcStageMask, dstStageMask, dependencyFlags, + memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, + pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); + small_vector var_local_pBufferMemoryBarriers; + vku::safe_VkBufferMemoryBarrier* local_pBufferMemoryBarriers = nullptr; + small_vector var_local_pImageMemoryBarriers; + vku::safe_VkImageMemoryBarrier* local_pImageMemoryBarriers = nullptr; + { + if (pBufferMemoryBarriers) { + var_local_pBufferMemoryBarriers.resize(bufferMemoryBarrierCount); + local_pBufferMemoryBarriers = var_local_pBufferMemoryBarriers.data(); + for (uint32_t index0 = 0; index0 < bufferMemoryBarrierCount; ++index0) { + local_pBufferMemoryBarriers[index0].initialize(&pBufferMemoryBarriers[index0]); + + if (pBufferMemoryBarriers[index0].buffer) { + local_pBufferMemoryBarriers[index0].buffer = Unwrap(pBufferMemoryBarriers[index0].buffer); + } + } + } + if (pImageMemoryBarriers) { + var_local_pImageMemoryBarriers.resize(imageMemoryBarrierCount); + local_pImageMemoryBarriers = var_local_pImageMemoryBarriers.data(); + for (uint32_t index0 = 0; index0 < imageMemoryBarrierCount; ++index0) { + local_pImageMemoryBarriers[index0].initialize(&pImageMemoryBarriers[index0]); + + if (pImageMemoryBarriers[index0].image) { + local_pImageMemoryBarriers[index0].image = Unwrap(pImageMemoryBarriers[index0].image); + } + } + } + } + device_dispatch_table.CmdPipelineBarrier(commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, + pMemoryBarriers, bufferMemoryBarrierCount, + (const VkBufferMemoryBarrier*)local_pBufferMemoryBarriers, imageMemoryBarrierCount, + (const VkImageMemoryBarrier*)local_pImageMemoryBarriers); +} + +void DispatchObject::CmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, + VkQueryControlFlags flags) { + if (!wrap_handles) return device_dispatch_table.CmdBeginQuery(commandBuffer, queryPool, query, flags); + { queryPool = Unwrap(queryPool); } + device_dispatch_table.CmdBeginQuery(commandBuffer, queryPool, query, flags); +} + +void DispatchObject::CmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query) { + if (!wrap_handles) return device_dispatch_table.CmdEndQuery(commandBuffer, queryPool, query); + { queryPool = Unwrap(queryPool); } + device_dispatch_table.CmdEndQuery(commandBuffer, queryPool, query); +} + +void DispatchObject::CmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, + uint32_t queryCount) { + if (!wrap_handles) return device_dispatch_table.CmdResetQueryPool(commandBuffer, queryPool, firstQuery, queryCount); + { queryPool = Unwrap(queryPool); } + device_dispatch_table.CmdResetQueryPool(commandBuffer, queryPool, firstQuery, queryCount); +} + +void DispatchObject::CmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, + uint32_t query) { + if (!wrap_handles) return device_dispatch_table.CmdWriteTimestamp(commandBuffer, pipelineStage, queryPool, query); + { queryPool = Unwrap(queryPool); } + device_dispatch_table.CmdWriteTimestamp(commandBuffer, pipelineStage, queryPool, query); +} + +void DispatchObject::CmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, + uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, + VkQueryResultFlags flags) { + if (!wrap_handles) + return device_dispatch_table.CmdCopyQueryPoolResults(commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, + stride, flags); + { + queryPool = Unwrap(queryPool); + dstBuffer = Unwrap(dstBuffer); + } + device_dispatch_table.CmdCopyQueryPoolResults(commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, + flags); +} + +void DispatchObject::CmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, + uint32_t offset, uint32_t size, const void* pValues) { + if (!wrap_handles) return device_dispatch_table.CmdPushConstants(commandBuffer, layout, stageFlags, offset, size, pValues); + { layout = Unwrap(layout); } + device_dispatch_table.CmdPushConstants(commandBuffer, layout, stageFlags, offset, size, pValues); +} + +void DispatchObject::CmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, + VkSubpassContents contents) { + if (!wrap_handles) return device_dispatch_table.CmdBeginRenderPass(commandBuffer, pRenderPassBegin, contents); + vku::safe_VkRenderPassBeginInfo var_local_pRenderPassBegin; + vku::safe_VkRenderPassBeginInfo* local_pRenderPassBegin = nullptr; + { + if (pRenderPassBegin) { + local_pRenderPassBegin = &var_local_pRenderPassBegin; + local_pRenderPassBegin->initialize(pRenderPassBegin); + + if (pRenderPassBegin->renderPass) { + local_pRenderPassBegin->renderPass = Unwrap(pRenderPassBegin->renderPass); + } + if (pRenderPassBegin->framebuffer) { + local_pRenderPassBegin->framebuffer = Unwrap(pRenderPassBegin->framebuffer); + } + UnwrapPnextChainHandles(local_pRenderPassBegin->pNext); + } + } + device_dispatch_table.CmdBeginRenderPass(commandBuffer, (const VkRenderPassBeginInfo*)local_pRenderPassBegin, contents); +} + +void DispatchObject::CmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents) { + device_dispatch_table.CmdNextSubpass(commandBuffer, contents); +} + +void DispatchObject::CmdEndRenderPass(VkCommandBuffer commandBuffer) { device_dispatch_table.CmdEndRenderPass(commandBuffer); } + +void DispatchObject::CmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, + const VkCommandBuffer* pCommandBuffers) { + device_dispatch_table.CmdExecuteCommands(commandBuffer, commandBufferCount, pCommandBuffers); +} + +VkResult DispatchObject::BindBufferMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos) { + if (!wrap_handles) return device_dispatch_table.BindBufferMemory2(device, bindInfoCount, pBindInfos); + small_vector var_local_pBindInfos; + vku::safe_VkBindBufferMemoryInfo* local_pBindInfos = nullptr; + { + if (pBindInfos) { + var_local_pBindInfos.resize(bindInfoCount); + local_pBindInfos = var_local_pBindInfos.data(); + for (uint32_t index0 = 0; index0 < bindInfoCount; ++index0) { + local_pBindInfos[index0].initialize(&pBindInfos[index0]); + + if (pBindInfos[index0].buffer) { + local_pBindInfos[index0].buffer = Unwrap(pBindInfos[index0].buffer); + } + if (pBindInfos[index0].memory) { + local_pBindInfos[index0].memory = Unwrap(pBindInfos[index0].memory); + } + } + } + } + VkResult result = + device_dispatch_table.BindBufferMemory2(device, bindInfoCount, (const VkBindBufferMemoryInfo*)local_pBindInfos); + + return result; +} + +VkResult DispatchObject::BindImageMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos) { + if (!wrap_handles) return device_dispatch_table.BindImageMemory2(device, bindInfoCount, pBindInfos); + small_vector var_local_pBindInfos; + vku::safe_VkBindImageMemoryInfo* local_pBindInfos = nullptr; + { + if (pBindInfos) { + var_local_pBindInfos.resize(bindInfoCount); + local_pBindInfos = var_local_pBindInfos.data(); + for (uint32_t index0 = 0; index0 < bindInfoCount; ++index0) { + local_pBindInfos[index0].initialize(&pBindInfos[index0]); + UnwrapPnextChainHandles(local_pBindInfos[index0].pNext); + + if (pBindInfos[index0].image) { + local_pBindInfos[index0].image = Unwrap(pBindInfos[index0].image); + } + if (pBindInfos[index0].memory) { + local_pBindInfos[index0].memory = Unwrap(pBindInfos[index0].memory); + } + } + } + } + VkResult result = device_dispatch_table.BindImageMemory2(device, bindInfoCount, (const VkBindImageMemoryInfo*)local_pBindInfos); + + return result; +} + +void DispatchObject::GetDeviceGroupPeerMemoryFeatures(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, + uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) { + device_dispatch_table.GetDeviceGroupPeerMemoryFeatures(device, heapIndex, localDeviceIndex, remoteDeviceIndex, + pPeerMemoryFeatures); +} + +void DispatchObject::CmdSetDeviceMask(VkCommandBuffer commandBuffer, uint32_t deviceMask) { + device_dispatch_table.CmdSetDeviceMask(commandBuffer, deviceMask); +} + +void DispatchObject::CmdDispatchBase(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, + uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) { + device_dispatch_table.CmdDispatchBase(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, groupCountZ); +} + +VkResult DispatchObject::EnumeratePhysicalDeviceGroups(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, + VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) { + VkResult result = + instance_dispatch_table.EnumeratePhysicalDeviceGroups(instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties); + + return result; +} + +void DispatchObject::GetImageMemoryRequirements2(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements) { + if (!wrap_handles) return device_dispatch_table.GetImageMemoryRequirements2(device, pInfo, pMemoryRequirements); + vku::safe_VkImageMemoryRequirementsInfo2 var_local_pInfo; + vku::safe_VkImageMemoryRequirementsInfo2* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->image) { + local_pInfo->image = Unwrap(pInfo->image); + } + } + } + device_dispatch_table.GetImageMemoryRequirements2(device, (const VkImageMemoryRequirementsInfo2*)local_pInfo, + pMemoryRequirements); +} + +void DispatchObject::GetBufferMemoryRequirements2(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements) { + if (!wrap_handles) return device_dispatch_table.GetBufferMemoryRequirements2(device, pInfo, pMemoryRequirements); + vku::safe_VkBufferMemoryRequirementsInfo2 var_local_pInfo; + vku::safe_VkBufferMemoryRequirementsInfo2* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->buffer) { + local_pInfo->buffer = Unwrap(pInfo->buffer); + } + } + } + device_dispatch_table.GetBufferMemoryRequirements2(device, (const VkBufferMemoryRequirementsInfo2*)local_pInfo, + pMemoryRequirements); +} + +void DispatchObject::GetImageSparseMemoryRequirements2(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { + if (!wrap_handles) + return device_dispatch_table.GetImageSparseMemoryRequirements2(device, pInfo, pSparseMemoryRequirementCount, + pSparseMemoryRequirements); + vku::safe_VkImageSparseMemoryRequirementsInfo2 var_local_pInfo; + vku::safe_VkImageSparseMemoryRequirementsInfo2* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->image) { + local_pInfo->image = Unwrap(pInfo->image); + } + } + } + device_dispatch_table.GetImageSparseMemoryRequirements2(device, (const VkImageSparseMemoryRequirementsInfo2*)local_pInfo, + pSparseMemoryRequirementCount, pSparseMemoryRequirements); +} + +void DispatchObject::GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures) { + instance_dispatch_table.GetPhysicalDeviceFeatures2(physicalDevice, pFeatures); +} + +void DispatchObject::GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties) { + instance_dispatch_table.GetPhysicalDeviceProperties2(physicalDevice, pProperties); +} + +void DispatchObject::GetPhysicalDeviceFormatProperties2(VkPhysicalDevice physicalDevice, VkFormat format, + VkFormatProperties2* pFormatProperties) { + instance_dispatch_table.GetPhysicalDeviceFormatProperties2(physicalDevice, format, pFormatProperties); +} + +VkResult DispatchObject::GetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, + VkImageFormatProperties2* pImageFormatProperties) { + VkResult result = + instance_dispatch_table.GetPhysicalDeviceImageFormatProperties2(physicalDevice, pImageFormatInfo, pImageFormatProperties); + + return result; +} + +void DispatchObject::GetPhysicalDeviceQueueFamilyProperties2(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, + VkQueueFamilyProperties2* pQueueFamilyProperties) { + instance_dispatch_table.GetPhysicalDeviceQueueFamilyProperties2(physicalDevice, pQueueFamilyPropertyCount, + pQueueFamilyProperties); +} + +void DispatchObject::GetPhysicalDeviceMemoryProperties2(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceMemoryProperties2* pMemoryProperties) { + instance_dispatch_table.GetPhysicalDeviceMemoryProperties2(physicalDevice, pMemoryProperties); +} + +void DispatchObject::GetPhysicalDeviceSparseImageFormatProperties2(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, + uint32_t* pPropertyCount, + VkSparseImageFormatProperties2* pProperties) { + instance_dispatch_table.GetPhysicalDeviceSparseImageFormatProperties2(physicalDevice, pFormatInfo, pPropertyCount, pProperties); +} + +void DispatchObject::TrimCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags) { + if (!wrap_handles) return device_dispatch_table.TrimCommandPool(device, commandPool, flags); + { commandPool = Unwrap(commandPool); } + device_dispatch_table.TrimCommandPool(device, commandPool, flags); +} + +void DispatchObject::GetDeviceQueue2(VkDevice device, const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue) { + device_dispatch_table.GetDeviceQueue2(device, pQueueInfo, pQueue); +} + +VkResult DispatchObject::CreateSamplerYcbcrConversion(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSamplerYcbcrConversion* pYcbcrConversion) { + if (!wrap_handles) return device_dispatch_table.CreateSamplerYcbcrConversion(device, pCreateInfo, pAllocator, pYcbcrConversion); + + VkResult result = device_dispatch_table.CreateSamplerYcbcrConversion(device, pCreateInfo, pAllocator, pYcbcrConversion); + if (VK_SUCCESS == result) { + *pYcbcrConversion = WrapNew(*pYcbcrConversion); + } + return result; +} + +void DispatchObject::DestroySamplerYcbcrConversion(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, + const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroySamplerYcbcrConversion(device, ycbcrConversion, pAllocator); + + uint64_t ycbcrConversion_id = CastToUint64(ycbcrConversion); + auto iter = unique_id_mapping.pop(ycbcrConversion_id); + if (iter != unique_id_mapping.end()) { + ycbcrConversion = (VkSamplerYcbcrConversion)iter->second; + } else { + ycbcrConversion = (VkSamplerYcbcrConversion)0; + } + device_dispatch_table.DestroySamplerYcbcrConversion(device, ycbcrConversion, pAllocator); +} + +void DispatchObject::GetPhysicalDeviceExternalBufferProperties(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, + VkExternalBufferProperties* pExternalBufferProperties) { + instance_dispatch_table.GetPhysicalDeviceExternalBufferProperties(physicalDevice, pExternalBufferInfo, + pExternalBufferProperties); +} + +void DispatchObject::GetPhysicalDeviceExternalFenceProperties(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, + VkExternalFenceProperties* pExternalFenceProperties) { + instance_dispatch_table.GetPhysicalDeviceExternalFenceProperties(physicalDevice, pExternalFenceInfo, pExternalFenceProperties); +} + +void DispatchObject::GetPhysicalDeviceExternalSemaphoreProperties( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, + VkExternalSemaphoreProperties* pExternalSemaphoreProperties) { + instance_dispatch_table.GetPhysicalDeviceExternalSemaphoreProperties(physicalDevice, pExternalSemaphoreInfo, + pExternalSemaphoreProperties); +} + +void DispatchObject::GetDescriptorSetLayoutSupport(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, + VkDescriptorSetLayoutSupport* pSupport) { + if (!wrap_handles) return device_dispatch_table.GetDescriptorSetLayoutSupport(device, pCreateInfo, pSupport); + vku::safe_VkDescriptorSetLayoutCreateInfo var_local_pCreateInfo; + vku::safe_VkDescriptorSetLayoutCreateInfo* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + if (local_pCreateInfo->pBindings) { + for (uint32_t index1 = 0; index1 < local_pCreateInfo->bindingCount; ++index1) { + if (local_pCreateInfo->pBindings[index1].pImmutableSamplers) { + for (uint32_t index2 = 0; index2 < local_pCreateInfo->pBindings[index1].descriptorCount; ++index2) { + local_pCreateInfo->pBindings[index1].pImmutableSamplers[index2] = + Unwrap(local_pCreateInfo->pBindings[index1].pImmutableSamplers[index2]); + } + } + } + } + } + } + device_dispatch_table.GetDescriptorSetLayoutSupport(device, (const VkDescriptorSetLayoutCreateInfo*)local_pCreateInfo, + pSupport); +} + +void DispatchObject::CmdDrawIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, + VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) { + if (!wrap_handles) + return device_dispatch_table.CmdDrawIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride); + { + buffer = Unwrap(buffer); + countBuffer = Unwrap(countBuffer); + } + device_dispatch_table.CmdDrawIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, stride); +} + +void DispatchObject::CmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride) { + if (!wrap_handles) + return device_dispatch_table.CmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride); + { + buffer = Unwrap(buffer); + countBuffer = Unwrap(countBuffer); + } + device_dispatch_table.CmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, + stride); +} + +void DispatchObject::CmdBeginRenderPass2(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, + const VkSubpassBeginInfo* pSubpassBeginInfo) { + if (!wrap_handles) return device_dispatch_table.CmdBeginRenderPass2(commandBuffer, pRenderPassBegin, pSubpassBeginInfo); + vku::safe_VkRenderPassBeginInfo var_local_pRenderPassBegin; + vku::safe_VkRenderPassBeginInfo* local_pRenderPassBegin = nullptr; + { + if (pRenderPassBegin) { + local_pRenderPassBegin = &var_local_pRenderPassBegin; + local_pRenderPassBegin->initialize(pRenderPassBegin); + + if (pRenderPassBegin->renderPass) { + local_pRenderPassBegin->renderPass = Unwrap(pRenderPassBegin->renderPass); + } + if (pRenderPassBegin->framebuffer) { + local_pRenderPassBegin->framebuffer = Unwrap(pRenderPassBegin->framebuffer); + } + UnwrapPnextChainHandles(local_pRenderPassBegin->pNext); + } + } + device_dispatch_table.CmdBeginRenderPass2(commandBuffer, (const VkRenderPassBeginInfo*)local_pRenderPassBegin, + pSubpassBeginInfo); +} + +void DispatchObject::CmdNextSubpass2(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, + const VkSubpassEndInfo* pSubpassEndInfo) { + device_dispatch_table.CmdNextSubpass2(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo); +} + +void DispatchObject::CmdEndRenderPass2(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo) { + device_dispatch_table.CmdEndRenderPass2(commandBuffer, pSubpassEndInfo); +} + +void DispatchObject::ResetQueryPool(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) { + if (!wrap_handles) return device_dispatch_table.ResetQueryPool(device, queryPool, firstQuery, queryCount); + { queryPool = Unwrap(queryPool); } + device_dispatch_table.ResetQueryPool(device, queryPool, firstQuery, queryCount); +} + +VkResult DispatchObject::GetSemaphoreCounterValue(VkDevice device, VkSemaphore semaphore, uint64_t* pValue) { + if (!wrap_handles) return device_dispatch_table.GetSemaphoreCounterValue(device, semaphore, pValue); + { semaphore = Unwrap(semaphore); } + VkResult result = device_dispatch_table.GetSemaphoreCounterValue(device, semaphore, pValue); + + return result; +} + +VkResult DispatchObject::WaitSemaphores(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout) { + if (!wrap_handles) return device_dispatch_table.WaitSemaphores(device, pWaitInfo, timeout); + vku::safe_VkSemaphoreWaitInfo var_local_pWaitInfo; + vku::safe_VkSemaphoreWaitInfo* local_pWaitInfo = nullptr; + { + if (pWaitInfo) { + local_pWaitInfo = &var_local_pWaitInfo; + local_pWaitInfo->initialize(pWaitInfo); + if (local_pWaitInfo->pSemaphores) { + for (uint32_t index1 = 0; index1 < local_pWaitInfo->semaphoreCount; ++index1) { + local_pWaitInfo->pSemaphores[index1] = Unwrap(local_pWaitInfo->pSemaphores[index1]); + } + } + } + } + VkResult result = device_dispatch_table.WaitSemaphores(device, (const VkSemaphoreWaitInfo*)local_pWaitInfo, timeout); + + return result; +} + +VkResult DispatchObject::SignalSemaphore(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo) { + if (!wrap_handles) return device_dispatch_table.SignalSemaphore(device, pSignalInfo); + vku::safe_VkSemaphoreSignalInfo var_local_pSignalInfo; + vku::safe_VkSemaphoreSignalInfo* local_pSignalInfo = nullptr; + { + if (pSignalInfo) { + local_pSignalInfo = &var_local_pSignalInfo; + local_pSignalInfo->initialize(pSignalInfo); + + if (pSignalInfo->semaphore) { + local_pSignalInfo->semaphore = Unwrap(pSignalInfo->semaphore); + } + } + } + VkResult result = device_dispatch_table.SignalSemaphore(device, (const VkSemaphoreSignalInfo*)local_pSignalInfo); + + return result; +} + +VkDeviceAddress DispatchObject::GetBufferDeviceAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { + if (!wrap_handles) return device_dispatch_table.GetBufferDeviceAddress(device, pInfo); + vku::safe_VkBufferDeviceAddressInfo var_local_pInfo; + vku::safe_VkBufferDeviceAddressInfo* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->buffer) { + local_pInfo->buffer = Unwrap(pInfo->buffer); + } + } + } + VkDeviceAddress result = device_dispatch_table.GetBufferDeviceAddress(device, (const VkBufferDeviceAddressInfo*)local_pInfo); + + return result; +} + +uint64_t DispatchObject::GetBufferOpaqueCaptureAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { + if (!wrap_handles) return device_dispatch_table.GetBufferOpaqueCaptureAddress(device, pInfo); + vku::safe_VkBufferDeviceAddressInfo var_local_pInfo; + vku::safe_VkBufferDeviceAddressInfo* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->buffer) { + local_pInfo->buffer = Unwrap(pInfo->buffer); + } + } + } + uint64_t result = device_dispatch_table.GetBufferOpaqueCaptureAddress(device, (const VkBufferDeviceAddressInfo*)local_pInfo); + + return result; +} + +uint64_t DispatchObject::GetDeviceMemoryOpaqueCaptureAddress(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) { + if (!wrap_handles) return device_dispatch_table.GetDeviceMemoryOpaqueCaptureAddress(device, pInfo); + vku::safe_VkDeviceMemoryOpaqueCaptureAddressInfo var_local_pInfo; + vku::safe_VkDeviceMemoryOpaqueCaptureAddressInfo* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->memory) { + local_pInfo->memory = Unwrap(pInfo->memory); + } + } + } + uint64_t result = device_dispatch_table.GetDeviceMemoryOpaqueCaptureAddress( + device, (const VkDeviceMemoryOpaqueCaptureAddressInfo*)local_pInfo); + + return result; +} + +VkResult DispatchObject::CreatePrivateDataSlot(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot) { + if (!wrap_handles) return device_dispatch_table.CreatePrivateDataSlot(device, pCreateInfo, pAllocator, pPrivateDataSlot); + + VkResult result = device_dispatch_table.CreatePrivateDataSlot(device, pCreateInfo, pAllocator, pPrivateDataSlot); + if (VK_SUCCESS == result) { + *pPrivateDataSlot = WrapNew(*pPrivateDataSlot); + } + return result; +} + +void DispatchObject::DestroyPrivateDataSlot(VkDevice device, VkPrivateDataSlot privateDataSlot, + const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyPrivateDataSlot(device, privateDataSlot, pAllocator); + + uint64_t privateDataSlot_id = CastToUint64(privateDataSlot); + auto iter = unique_id_mapping.pop(privateDataSlot_id); + if (iter != unique_id_mapping.end()) { + privateDataSlot = (VkPrivateDataSlot)iter->second; + } else { + privateDataSlot = (VkPrivateDataSlot)0; + } + device_dispatch_table.DestroyPrivateDataSlot(device, privateDataSlot, pAllocator); +} + +VkResult DispatchObject::SetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, + VkPrivateDataSlot privateDataSlot, uint64_t data) { + if (!wrap_handles) return device_dispatch_table.SetPrivateData(device, objectType, objectHandle, privateDataSlot, data); + { + if (NotDispatchableHandle(objectType)) { + objectHandle = Unwrap(objectHandle); + } + privateDataSlot = Unwrap(privateDataSlot); + } + VkResult result = device_dispatch_table.SetPrivateData(device, objectType, objectHandle, privateDataSlot, data); + + return result; +} + +void DispatchObject::GetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, + VkPrivateDataSlot privateDataSlot, uint64_t* pData) { + if (!wrap_handles) return device_dispatch_table.GetPrivateData(device, objectType, objectHandle, privateDataSlot, pData); + { + if (NotDispatchableHandle(objectType)) { + objectHandle = Unwrap(objectHandle); + } + privateDataSlot = Unwrap(privateDataSlot); + } + device_dispatch_table.GetPrivateData(device, objectType, objectHandle, privateDataSlot, pData); +} + +void DispatchObject::CmdSetEvent2(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo) { + if (!wrap_handles) return device_dispatch_table.CmdSetEvent2(commandBuffer, event, pDependencyInfo); + vku::safe_VkDependencyInfo var_local_pDependencyInfo; + vku::safe_VkDependencyInfo* local_pDependencyInfo = nullptr; + { + event = Unwrap(event); + if (pDependencyInfo) { + local_pDependencyInfo = &var_local_pDependencyInfo; + local_pDependencyInfo->initialize(pDependencyInfo); + if (local_pDependencyInfo->pBufferMemoryBarriers) { + for (uint32_t index1 = 0; index1 < local_pDependencyInfo->bufferMemoryBarrierCount; ++index1) { + if (pDependencyInfo->pBufferMemoryBarriers[index1].buffer) { + local_pDependencyInfo->pBufferMemoryBarriers[index1].buffer = + Unwrap(pDependencyInfo->pBufferMemoryBarriers[index1].buffer); + } + } + } + if (local_pDependencyInfo->pImageMemoryBarriers) { + for (uint32_t index1 = 0; index1 < local_pDependencyInfo->imageMemoryBarrierCount; ++index1) { + if (pDependencyInfo->pImageMemoryBarriers[index1].image) { + local_pDependencyInfo->pImageMemoryBarriers[index1].image = + Unwrap(pDependencyInfo->pImageMemoryBarriers[index1].image); + } + } + } + } + } + device_dispatch_table.CmdSetEvent2(commandBuffer, event, (const VkDependencyInfo*)local_pDependencyInfo); +} + +void DispatchObject::CmdResetEvent2(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask) { + if (!wrap_handles) return device_dispatch_table.CmdResetEvent2(commandBuffer, event, stageMask); + { event = Unwrap(event); } + device_dispatch_table.CmdResetEvent2(commandBuffer, event, stageMask); +} + +void DispatchObject::CmdWaitEvents2(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, + const VkDependencyInfo* pDependencyInfos) { + if (!wrap_handles) return device_dispatch_table.CmdWaitEvents2(commandBuffer, eventCount, pEvents, pDependencyInfos); + small_vector var_local_pEvents; + VkEvent* local_pEvents = nullptr; + small_vector var_local_pDependencyInfos; + vku::safe_VkDependencyInfo* local_pDependencyInfos = nullptr; + { + if (pEvents) { + var_local_pEvents.resize(eventCount); + local_pEvents = var_local_pEvents.data(); + for (uint32_t index0 = 0; index0 < eventCount; ++index0) { + local_pEvents[index0] = Unwrap(pEvents[index0]); + } + } + if (pDependencyInfos) { + var_local_pDependencyInfos.resize(eventCount); + local_pDependencyInfos = var_local_pDependencyInfos.data(); + for (uint32_t index0 = 0; index0 < eventCount; ++index0) { + local_pDependencyInfos[index0].initialize(&pDependencyInfos[index0]); + if (local_pDependencyInfos[index0].pBufferMemoryBarriers) { + for (uint32_t index1 = 0; index1 < local_pDependencyInfos[index0].bufferMemoryBarrierCount; ++index1) { + if (pDependencyInfos[index0].pBufferMemoryBarriers[index1].buffer) { + local_pDependencyInfos[index0].pBufferMemoryBarriers[index1].buffer = + Unwrap(pDependencyInfos[index0].pBufferMemoryBarriers[index1].buffer); + } + } + } + if (local_pDependencyInfos[index0].pImageMemoryBarriers) { + for (uint32_t index1 = 0; index1 < local_pDependencyInfos[index0].imageMemoryBarrierCount; ++index1) { + if (pDependencyInfos[index0].pImageMemoryBarriers[index1].image) { + local_pDependencyInfos[index0].pImageMemoryBarriers[index1].image = + Unwrap(pDependencyInfos[index0].pImageMemoryBarriers[index1].image); + } + } + } + } + } + } + device_dispatch_table.CmdWaitEvents2(commandBuffer, eventCount, (const VkEvent*)local_pEvents, + (const VkDependencyInfo*)local_pDependencyInfos); +} + +void DispatchObject::CmdPipelineBarrier2(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo) { + if (!wrap_handles) return device_dispatch_table.CmdPipelineBarrier2(commandBuffer, pDependencyInfo); + vku::safe_VkDependencyInfo var_local_pDependencyInfo; + vku::safe_VkDependencyInfo* local_pDependencyInfo = nullptr; + { + if (pDependencyInfo) { + local_pDependencyInfo = &var_local_pDependencyInfo; + local_pDependencyInfo->initialize(pDependencyInfo); + if (local_pDependencyInfo->pBufferMemoryBarriers) { + for (uint32_t index1 = 0; index1 < local_pDependencyInfo->bufferMemoryBarrierCount; ++index1) { + if (pDependencyInfo->pBufferMemoryBarriers[index1].buffer) { + local_pDependencyInfo->pBufferMemoryBarriers[index1].buffer = + Unwrap(pDependencyInfo->pBufferMemoryBarriers[index1].buffer); + } + } + } + if (local_pDependencyInfo->pImageMemoryBarriers) { + for (uint32_t index1 = 0; index1 < local_pDependencyInfo->imageMemoryBarrierCount; ++index1) { + if (pDependencyInfo->pImageMemoryBarriers[index1].image) { + local_pDependencyInfo->pImageMemoryBarriers[index1].image = + Unwrap(pDependencyInfo->pImageMemoryBarriers[index1].image); + } + } + } + } + } + device_dispatch_table.CmdPipelineBarrier2(commandBuffer, (const VkDependencyInfo*)local_pDependencyInfo); +} + +void DispatchObject::CmdWriteTimestamp2(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, + uint32_t query) { + if (!wrap_handles) return device_dispatch_table.CmdWriteTimestamp2(commandBuffer, stage, queryPool, query); + { queryPool = Unwrap(queryPool); } + device_dispatch_table.CmdWriteTimestamp2(commandBuffer, stage, queryPool, query); +} + +VkResult DispatchObject::QueueSubmit2(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence) { + if (!wrap_handles) return device_dispatch_table.QueueSubmit2(queue, submitCount, pSubmits, fence); + small_vector var_local_pSubmits; + vku::safe_VkSubmitInfo2* local_pSubmits = nullptr; + { + if (pSubmits) { + var_local_pSubmits.resize(submitCount); + local_pSubmits = var_local_pSubmits.data(); + for (uint32_t index0 = 0; index0 < submitCount; ++index0) { + local_pSubmits[index0].initialize(&pSubmits[index0]); + UnwrapPnextChainHandles(local_pSubmits[index0].pNext); + if (local_pSubmits[index0].pWaitSemaphoreInfos) { + for (uint32_t index1 = 0; index1 < local_pSubmits[index0].waitSemaphoreInfoCount; ++index1) { + if (pSubmits[index0].pWaitSemaphoreInfos[index1].semaphore) { + local_pSubmits[index0].pWaitSemaphoreInfos[index1].semaphore = + Unwrap(pSubmits[index0].pWaitSemaphoreInfos[index1].semaphore); + } + } + } + if (local_pSubmits[index0].pCommandBufferInfos) { + for (uint32_t index1 = 0; index1 < local_pSubmits[index0].commandBufferInfoCount; ++index1) { + UnwrapPnextChainHandles(local_pSubmits[index0].pCommandBufferInfos[index1].pNext); + } + } + if (local_pSubmits[index0].pSignalSemaphoreInfos) { + for (uint32_t index1 = 0; index1 < local_pSubmits[index0].signalSemaphoreInfoCount; ++index1) { + if (pSubmits[index0].pSignalSemaphoreInfos[index1].semaphore) { + local_pSubmits[index0].pSignalSemaphoreInfos[index1].semaphore = + Unwrap(pSubmits[index0].pSignalSemaphoreInfos[index1].semaphore); + } + } + } + } + } + fence = Unwrap(fence); + } + VkResult result = device_dispatch_table.QueueSubmit2(queue, submitCount, (const VkSubmitInfo2*)local_pSubmits, fence); + + return result; +} + +void DispatchObject::CmdCopyBuffer2(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) { + if (!wrap_handles) return device_dispatch_table.CmdCopyBuffer2(commandBuffer, pCopyBufferInfo); + vku::safe_VkCopyBufferInfo2 var_local_pCopyBufferInfo; + vku::safe_VkCopyBufferInfo2* local_pCopyBufferInfo = nullptr; + { + if (pCopyBufferInfo) { + local_pCopyBufferInfo = &var_local_pCopyBufferInfo; + local_pCopyBufferInfo->initialize(pCopyBufferInfo); + + if (pCopyBufferInfo->srcBuffer) { + local_pCopyBufferInfo->srcBuffer = Unwrap(pCopyBufferInfo->srcBuffer); + } + if (pCopyBufferInfo->dstBuffer) { + local_pCopyBufferInfo->dstBuffer = Unwrap(pCopyBufferInfo->dstBuffer); + } + } + } + device_dispatch_table.CmdCopyBuffer2(commandBuffer, (const VkCopyBufferInfo2*)local_pCopyBufferInfo); +} + +void DispatchObject::CmdCopyImage2(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo) { + if (!wrap_handles) return device_dispatch_table.CmdCopyImage2(commandBuffer, pCopyImageInfo); + vku::safe_VkCopyImageInfo2 var_local_pCopyImageInfo; + vku::safe_VkCopyImageInfo2* local_pCopyImageInfo = nullptr; + { + if (pCopyImageInfo) { + local_pCopyImageInfo = &var_local_pCopyImageInfo; + local_pCopyImageInfo->initialize(pCopyImageInfo); + + if (pCopyImageInfo->srcImage) { + local_pCopyImageInfo->srcImage = Unwrap(pCopyImageInfo->srcImage); + } + if (pCopyImageInfo->dstImage) { + local_pCopyImageInfo->dstImage = Unwrap(pCopyImageInfo->dstImage); + } + } + } + device_dispatch_table.CmdCopyImage2(commandBuffer, (const VkCopyImageInfo2*)local_pCopyImageInfo); +} + +void DispatchObject::CmdCopyBufferToImage2(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) { + if (!wrap_handles) return device_dispatch_table.CmdCopyBufferToImage2(commandBuffer, pCopyBufferToImageInfo); + vku::safe_VkCopyBufferToImageInfo2 var_local_pCopyBufferToImageInfo; + vku::safe_VkCopyBufferToImageInfo2* local_pCopyBufferToImageInfo = nullptr; + { + if (pCopyBufferToImageInfo) { + local_pCopyBufferToImageInfo = &var_local_pCopyBufferToImageInfo; + local_pCopyBufferToImageInfo->initialize(pCopyBufferToImageInfo); + + if (pCopyBufferToImageInfo->srcBuffer) { + local_pCopyBufferToImageInfo->srcBuffer = Unwrap(pCopyBufferToImageInfo->srcBuffer); + } + if (pCopyBufferToImageInfo->dstImage) { + local_pCopyBufferToImageInfo->dstImage = Unwrap(pCopyBufferToImageInfo->dstImage); + } + } + } + device_dispatch_table.CmdCopyBufferToImage2(commandBuffer, (const VkCopyBufferToImageInfo2*)local_pCopyBufferToImageInfo); +} + +void DispatchObject::CmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) { + if (!wrap_handles) return device_dispatch_table.CmdCopyImageToBuffer2(commandBuffer, pCopyImageToBufferInfo); + vku::safe_VkCopyImageToBufferInfo2 var_local_pCopyImageToBufferInfo; + vku::safe_VkCopyImageToBufferInfo2* local_pCopyImageToBufferInfo = nullptr; + { + if (pCopyImageToBufferInfo) { + local_pCopyImageToBufferInfo = &var_local_pCopyImageToBufferInfo; + local_pCopyImageToBufferInfo->initialize(pCopyImageToBufferInfo); + + if (pCopyImageToBufferInfo->srcImage) { + local_pCopyImageToBufferInfo->srcImage = Unwrap(pCopyImageToBufferInfo->srcImage); + } + if (pCopyImageToBufferInfo->dstBuffer) { + local_pCopyImageToBufferInfo->dstBuffer = Unwrap(pCopyImageToBufferInfo->dstBuffer); + } + } + } + device_dispatch_table.CmdCopyImageToBuffer2(commandBuffer, (const VkCopyImageToBufferInfo2*)local_pCopyImageToBufferInfo); +} + +void DispatchObject::CmdBlitImage2(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo) { + if (!wrap_handles) return device_dispatch_table.CmdBlitImage2(commandBuffer, pBlitImageInfo); + vku::safe_VkBlitImageInfo2 var_local_pBlitImageInfo; + vku::safe_VkBlitImageInfo2* local_pBlitImageInfo = nullptr; + { + if (pBlitImageInfo) { + local_pBlitImageInfo = &var_local_pBlitImageInfo; + local_pBlitImageInfo->initialize(pBlitImageInfo); + + if (pBlitImageInfo->srcImage) { + local_pBlitImageInfo->srcImage = Unwrap(pBlitImageInfo->srcImage); + } + if (pBlitImageInfo->dstImage) { + local_pBlitImageInfo->dstImage = Unwrap(pBlitImageInfo->dstImage); + } + } + } + device_dispatch_table.CmdBlitImage2(commandBuffer, (const VkBlitImageInfo2*)local_pBlitImageInfo); +} + +void DispatchObject::CmdResolveImage2(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo) { + if (!wrap_handles) return device_dispatch_table.CmdResolveImage2(commandBuffer, pResolveImageInfo); + vku::safe_VkResolveImageInfo2 var_local_pResolveImageInfo; + vku::safe_VkResolveImageInfo2* local_pResolveImageInfo = nullptr; + { + if (pResolveImageInfo) { + local_pResolveImageInfo = &var_local_pResolveImageInfo; + local_pResolveImageInfo->initialize(pResolveImageInfo); + + if (pResolveImageInfo->srcImage) { + local_pResolveImageInfo->srcImage = Unwrap(pResolveImageInfo->srcImage); + } + if (pResolveImageInfo->dstImage) { + local_pResolveImageInfo->dstImage = Unwrap(pResolveImageInfo->dstImage); + } + } + } + device_dispatch_table.CmdResolveImage2(commandBuffer, (const VkResolveImageInfo2*)local_pResolveImageInfo); +} + +void DispatchObject::CmdBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo) { + if (!wrap_handles) return device_dispatch_table.CmdBeginRendering(commandBuffer, pRenderingInfo); + vku::safe_VkRenderingInfo var_local_pRenderingInfo; + vku::safe_VkRenderingInfo* local_pRenderingInfo = nullptr; + { + if (pRenderingInfo) { + local_pRenderingInfo = &var_local_pRenderingInfo; + local_pRenderingInfo->initialize(pRenderingInfo); + if (local_pRenderingInfo->pColorAttachments) { + for (uint32_t index1 = 0; index1 < local_pRenderingInfo->colorAttachmentCount; ++index1) { + if (pRenderingInfo->pColorAttachments[index1].imageView) { + local_pRenderingInfo->pColorAttachments[index1].imageView = + Unwrap(pRenderingInfo->pColorAttachments[index1].imageView); + } + if (pRenderingInfo->pColorAttachments[index1].resolveImageView) { + local_pRenderingInfo->pColorAttachments[index1].resolveImageView = + Unwrap(pRenderingInfo->pColorAttachments[index1].resolveImageView); + } + } + } + if (local_pRenderingInfo->pDepthAttachment) { + if (pRenderingInfo->pDepthAttachment->imageView) { + local_pRenderingInfo->pDepthAttachment->imageView = Unwrap(pRenderingInfo->pDepthAttachment->imageView); + } + if (pRenderingInfo->pDepthAttachment->resolveImageView) { + local_pRenderingInfo->pDepthAttachment->resolveImageView = + Unwrap(pRenderingInfo->pDepthAttachment->resolveImageView); + } + } + if (local_pRenderingInfo->pStencilAttachment) { + if (pRenderingInfo->pStencilAttachment->imageView) { + local_pRenderingInfo->pStencilAttachment->imageView = Unwrap(pRenderingInfo->pStencilAttachment->imageView); + } + if (pRenderingInfo->pStencilAttachment->resolveImageView) { + local_pRenderingInfo->pStencilAttachment->resolveImageView = + Unwrap(pRenderingInfo->pStencilAttachment->resolveImageView); + } + } + UnwrapPnextChainHandles(local_pRenderingInfo->pNext); + } + } + device_dispatch_table.CmdBeginRendering(commandBuffer, (const VkRenderingInfo*)local_pRenderingInfo); +} + +void DispatchObject::CmdEndRendering(VkCommandBuffer commandBuffer) { device_dispatch_table.CmdEndRendering(commandBuffer); } + +void DispatchObject::CmdSetCullMode(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode) { + device_dispatch_table.CmdSetCullMode(commandBuffer, cullMode); +} + +void DispatchObject::CmdSetFrontFace(VkCommandBuffer commandBuffer, VkFrontFace frontFace) { + device_dispatch_table.CmdSetFrontFace(commandBuffer, frontFace); +} + +void DispatchObject::CmdSetPrimitiveTopology(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology) { + device_dispatch_table.CmdSetPrimitiveTopology(commandBuffer, primitiveTopology); +} + +void DispatchObject::CmdSetViewportWithCount(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports) { + device_dispatch_table.CmdSetViewportWithCount(commandBuffer, viewportCount, pViewports); +} + +void DispatchObject::CmdSetScissorWithCount(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors) { + device_dispatch_table.CmdSetScissorWithCount(commandBuffer, scissorCount, pScissors); +} + +void DispatchObject::CmdBindVertexBuffers2(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, + const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, + const VkDeviceSize* pStrides) { + if (!wrap_handles) + return device_dispatch_table.CmdBindVertexBuffers2(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, + pStrides); + small_vector var_local_pBuffers; + VkBuffer* local_pBuffers = nullptr; + { + if (pBuffers) { + var_local_pBuffers.resize(bindingCount); + local_pBuffers = var_local_pBuffers.data(); + for (uint32_t index0 = 0; index0 < bindingCount; ++index0) { + local_pBuffers[index0] = Unwrap(pBuffers[index0]); + } + } + } + device_dispatch_table.CmdBindVertexBuffers2(commandBuffer, firstBinding, bindingCount, (const VkBuffer*)local_pBuffers, + pOffsets, pSizes, pStrides); +} + +void DispatchObject::CmdSetDepthTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable) { + device_dispatch_table.CmdSetDepthTestEnable(commandBuffer, depthTestEnable); +} + +void DispatchObject::CmdSetDepthWriteEnable(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable) { + device_dispatch_table.CmdSetDepthWriteEnable(commandBuffer, depthWriteEnable); +} + +void DispatchObject::CmdSetDepthCompareOp(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp) { + device_dispatch_table.CmdSetDepthCompareOp(commandBuffer, depthCompareOp); +} + +void DispatchObject::CmdSetDepthBoundsTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable) { + device_dispatch_table.CmdSetDepthBoundsTestEnable(commandBuffer, depthBoundsTestEnable); +} + +void DispatchObject::CmdSetStencilTestEnable(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable) { + device_dispatch_table.CmdSetStencilTestEnable(commandBuffer, stencilTestEnable); +} + +void DispatchObject::CmdSetStencilOp(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, + VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp) { + device_dispatch_table.CmdSetStencilOp(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp); +} + +void DispatchObject::CmdSetRasterizerDiscardEnable(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable) { + device_dispatch_table.CmdSetRasterizerDiscardEnable(commandBuffer, rasterizerDiscardEnable); +} + +void DispatchObject::CmdSetDepthBiasEnable(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable) { + device_dispatch_table.CmdSetDepthBiasEnable(commandBuffer, depthBiasEnable); +} + +void DispatchObject::CmdSetPrimitiveRestartEnable(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable) { + device_dispatch_table.CmdSetPrimitiveRestartEnable(commandBuffer, primitiveRestartEnable); +} + +void DispatchObject::GetDeviceBufferMemoryRequirements(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements) { + device_dispatch_table.GetDeviceBufferMemoryRequirements(device, pInfo, pMemoryRequirements); +} + +void DispatchObject::GetDeviceImageMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements) { + device_dispatch_table.GetDeviceImageMemoryRequirements(device, pInfo, pMemoryRequirements); +} + +void DispatchObject::GetDeviceImageSparseMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { + device_dispatch_table.GetDeviceImageSparseMemoryRequirements(device, pInfo, pSparseMemoryRequirementCount, + pSparseMemoryRequirements); +} + +void DispatchObject::DestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return instance_dispatch_table.DestroySurfaceKHR(instance, surface, pAllocator); + + uint64_t surface_id = CastToUint64(surface); + auto iter = unique_id_mapping.pop(surface_id); + if (iter != unique_id_mapping.end()) { + surface = (VkSurfaceKHR)iter->second; + } else { + surface = (VkSurfaceKHR)0; + } + instance_dispatch_table.DestroySurfaceKHR(instance, surface, pAllocator); +} + +VkResult DispatchObject::GetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + VkSurfaceKHR surface, VkBool32* pSupported) { + if (!wrap_handles) + return instance_dispatch_table.GetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, surface, pSupported); + { surface = Unwrap(surface); } + VkResult result = + instance_dispatch_table.GetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, surface, pSupported); + + return result; +} + +VkResult DispatchObject::GetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) { + if (!wrap_handles) + return instance_dispatch_table.GetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, surface, pSurfaceCapabilities); + { surface = Unwrap(surface); } + VkResult result = + instance_dispatch_table.GetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, surface, pSurfaceCapabilities); + + return result; +} + +VkResult DispatchObject::GetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats) { + if (!wrap_handles) + return instance_dispatch_table.GetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, pSurfaceFormatCount, + pSurfaceFormats); + { surface = Unwrap(surface); } + VkResult result = + instance_dispatch_table.GetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, pSurfaceFormatCount, pSurfaceFormats); + + return result; +} + +VkResult DispatchObject::GetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes) { + if (!wrap_handles) + return instance_dispatch_table.GetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, surface, pPresentModeCount, + pPresentModes); + { surface = Unwrap(surface); } + VkResult result = + instance_dispatch_table.GetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, surface, pPresentModeCount, pPresentModes); + + return result; +} + +VkResult DispatchObject::CreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain) { + if (!wrap_handles) return device_dispatch_table.CreateSwapchainKHR(device, pCreateInfo, pAllocator, pSwapchain); + vku::safe_VkSwapchainCreateInfoKHR var_local_pCreateInfo; + vku::safe_VkSwapchainCreateInfoKHR* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + + if (pCreateInfo->surface) { + local_pCreateInfo->surface = Unwrap(pCreateInfo->surface); + } + if (pCreateInfo->oldSwapchain) { + local_pCreateInfo->oldSwapchain = Unwrap(pCreateInfo->oldSwapchain); + } + } + } + VkResult result = device_dispatch_table.CreateSwapchainKHR(device, (const VkSwapchainCreateInfoKHR*)local_pCreateInfo, + pAllocator, pSwapchain); + if (VK_SUCCESS == result) { + *pSwapchain = WrapNew(*pSwapchain); + } + return result; +} + +VkResult DispatchObject::AcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, + VkFence fence, uint32_t* pImageIndex) { + if (!wrap_handles) return device_dispatch_table.AcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, pImageIndex); + { + swapchain = Unwrap(swapchain); + semaphore = Unwrap(semaphore); + fence = Unwrap(fence); + } + VkResult result = device_dispatch_table.AcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, pImageIndex); + + return result; +} + +VkResult DispatchObject::GetDeviceGroupPresentCapabilitiesKHR( + VkDevice device, VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities) { + VkResult result = device_dispatch_table.GetDeviceGroupPresentCapabilitiesKHR(device, pDeviceGroupPresentCapabilities); + + return result; +} + +VkResult DispatchObject::GetDeviceGroupSurfacePresentModesKHR(VkDevice device, VkSurfaceKHR surface, + VkDeviceGroupPresentModeFlagsKHR* pModes) { + if (!wrap_handles) return device_dispatch_table.GetDeviceGroupSurfacePresentModesKHR(device, surface, pModes); + { surface = Unwrap(surface); } + VkResult result = device_dispatch_table.GetDeviceGroupSurfacePresentModesKHR(device, surface, pModes); + + return result; +} + +VkResult DispatchObject::GetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + uint32_t* pRectCount, VkRect2D* pRects) { + if (!wrap_handles) + return instance_dispatch_table.GetPhysicalDevicePresentRectanglesKHR(physicalDevice, surface, pRectCount, pRects); + { surface = Unwrap(surface); } + VkResult result = instance_dispatch_table.GetPhysicalDevicePresentRectanglesKHR(physicalDevice, surface, pRectCount, pRects); + + return result; +} + +VkResult DispatchObject::AcquireNextImage2KHR(VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, + uint32_t* pImageIndex) { + if (!wrap_handles) return device_dispatch_table.AcquireNextImage2KHR(device, pAcquireInfo, pImageIndex); + vku::safe_VkAcquireNextImageInfoKHR var_local_pAcquireInfo; + vku::safe_VkAcquireNextImageInfoKHR* local_pAcquireInfo = nullptr; + { + if (pAcquireInfo) { + local_pAcquireInfo = &var_local_pAcquireInfo; + local_pAcquireInfo->initialize(pAcquireInfo); + + if (pAcquireInfo->swapchain) { + local_pAcquireInfo->swapchain = Unwrap(pAcquireInfo->swapchain); + } + if (pAcquireInfo->semaphore) { + local_pAcquireInfo->semaphore = Unwrap(pAcquireInfo->semaphore); + } + if (pAcquireInfo->fence) { + local_pAcquireInfo->fence = Unwrap(pAcquireInfo->fence); + } + } + } + VkResult result = + device_dispatch_table.AcquireNextImage2KHR(device, (const VkAcquireNextImageInfoKHR*)local_pAcquireInfo, pImageIndex); + + return result; +} + +VkResult DispatchObject::CreateDisplayModeKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, + const VkDisplayModeCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode) { + if (!wrap_handles) return instance_dispatch_table.CreateDisplayModeKHR(physicalDevice, display, pCreateInfo, pAllocator, pMode); + { display = Unwrap(display); } + VkResult result = instance_dispatch_table.CreateDisplayModeKHR(physicalDevice, display, pCreateInfo, pAllocator, pMode); + if (VK_SUCCESS == result) { + *pMode = WrapNew(*pMode); + } + return result; +} + +VkResult DispatchObject::GetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex, + VkDisplayPlaneCapabilitiesKHR* pCapabilities) { + if (!wrap_handles) + return instance_dispatch_table.GetDisplayPlaneCapabilitiesKHR(physicalDevice, mode, planeIndex, pCapabilities); + { mode = Unwrap(mode); } + VkResult result = instance_dispatch_table.GetDisplayPlaneCapabilitiesKHR(physicalDevice, mode, planeIndex, pCapabilities); + + return result; +} + +VkResult DispatchObject::CreateDisplayPlaneSurfaceKHR(VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + if (!wrap_handles) return instance_dispatch_table.CreateDisplayPlaneSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + vku::safe_VkDisplaySurfaceCreateInfoKHR var_local_pCreateInfo; + vku::safe_VkDisplaySurfaceCreateInfoKHR* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + + if (pCreateInfo->displayMode) { + local_pCreateInfo->displayMode = Unwrap(pCreateInfo->displayMode); + } + } + } + VkResult result = instance_dispatch_table.CreateDisplayPlaneSurfaceKHR( + instance, (const VkDisplaySurfaceCreateInfoKHR*)local_pCreateInfo, pAllocator, pSurface); + if (VK_SUCCESS == result) { + *pSurface = WrapNew(*pSurface); + } + return result; +} + +VkResult DispatchObject::CreateSharedSwapchainsKHR(VkDevice device, uint32_t swapchainCount, + const VkSwapchainCreateInfoKHR* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains) { + if (!wrap_handles) + return device_dispatch_table.CreateSharedSwapchainsKHR(device, swapchainCount, pCreateInfos, pAllocator, pSwapchains); + small_vector var_local_pCreateInfos; + vku::safe_VkSwapchainCreateInfoKHR* local_pCreateInfos = nullptr; + { + if (pCreateInfos) { + var_local_pCreateInfos.resize(swapchainCount); + local_pCreateInfos = var_local_pCreateInfos.data(); + for (uint32_t index0 = 0; index0 < swapchainCount; ++index0) { + local_pCreateInfos[index0].initialize(&pCreateInfos[index0]); + + if (pCreateInfos[index0].surface) { + local_pCreateInfos[index0].surface = Unwrap(pCreateInfos[index0].surface); + } + if (pCreateInfos[index0].oldSwapchain) { + local_pCreateInfos[index0].oldSwapchain = Unwrap(pCreateInfos[index0].oldSwapchain); + } + } + } + } + VkResult result = device_dispatch_table.CreateSharedSwapchainsKHR( + device, swapchainCount, (const VkSwapchainCreateInfoKHR*)local_pCreateInfos, pAllocator, pSwapchains); + if (VK_SUCCESS == result) { + for (uint32_t index0 = 0; index0 < swapchainCount; index0++) { + pSwapchains[index0] = WrapNew(pSwapchains[index0]); + } + } + return result; +} +#ifdef VK_USE_PLATFORM_XLIB_KHR + +VkResult DispatchObject::CreateXlibSurfaceKHR(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + if (!wrap_handles) return instance_dispatch_table.CreateXlibSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + + VkResult result = instance_dispatch_table.CreateXlibSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + if (VK_SUCCESS == result) { + *pSurface = WrapNew(*pSurface); + } + return result; +} + +VkBool32 DispatchObject::GetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + Display* dpy, VisualID visualID) { + VkBool32 result = + instance_dispatch_table.GetPhysicalDeviceXlibPresentationSupportKHR(physicalDevice, queueFamilyIndex, dpy, visualID); + + return result; +} +#endif // VK_USE_PLATFORM_XLIB_KHR +#ifdef VK_USE_PLATFORM_XCB_KHR + +VkResult DispatchObject::CreateXcbSurfaceKHR(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + if (!wrap_handles) return instance_dispatch_table.CreateXcbSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + + VkResult result = instance_dispatch_table.CreateXcbSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + if (VK_SUCCESS == result) { + *pSurface = WrapNew(*pSurface); + } + return result; +} + +VkBool32 DispatchObject::GetPhysicalDeviceXcbPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + xcb_connection_t* connection, xcb_visualid_t visual_id) { + VkBool32 result = + instance_dispatch_table.GetPhysicalDeviceXcbPresentationSupportKHR(physicalDevice, queueFamilyIndex, connection, visual_id); + + return result; +} +#endif // VK_USE_PLATFORM_XCB_KHR +#ifdef VK_USE_PLATFORM_WAYLAND_KHR + +VkResult DispatchObject::CreateWaylandSurfaceKHR(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + if (!wrap_handles) return instance_dispatch_table.CreateWaylandSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + + VkResult result = instance_dispatch_table.CreateWaylandSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + if (VK_SUCCESS == result) { + *pSurface = WrapNew(*pSurface); + } + return result; +} + +VkBool32 DispatchObject::GetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + struct wl_display* display) { + VkBool32 result = + instance_dispatch_table.GetPhysicalDeviceWaylandPresentationSupportKHR(physicalDevice, queueFamilyIndex, display); + + return result; +} +#endif // VK_USE_PLATFORM_WAYLAND_KHR +#ifdef VK_USE_PLATFORM_ANDROID_KHR + +VkResult DispatchObject::CreateAndroidSurfaceKHR(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + if (!wrap_handles) return instance_dispatch_table.CreateAndroidSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + + VkResult result = instance_dispatch_table.CreateAndroidSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + if (VK_SUCCESS == result) { + *pSurface = WrapNew(*pSurface); + } + return result; +} +#endif // VK_USE_PLATFORM_ANDROID_KHR +#ifdef VK_USE_PLATFORM_WIN32_KHR + +VkResult DispatchObject::CreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + if (!wrap_handles) return instance_dispatch_table.CreateWin32SurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + + VkResult result = instance_dispatch_table.CreateWin32SurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); + if (VK_SUCCESS == result) { + *pSurface = WrapNew(*pSurface); + } + return result; +} + +VkBool32 DispatchObject::GetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex) { + VkBool32 result = instance_dispatch_table.GetPhysicalDeviceWin32PresentationSupportKHR(physicalDevice, queueFamilyIndex); + + return result; +} +#endif // VK_USE_PLATFORM_WIN32_KHR + +VkResult DispatchObject::GetPhysicalDeviceVideoCapabilitiesKHR(VkPhysicalDevice physicalDevice, + const VkVideoProfileInfoKHR* pVideoProfile, + VkVideoCapabilitiesKHR* pCapabilities) { + VkResult result = instance_dispatch_table.GetPhysicalDeviceVideoCapabilitiesKHR(physicalDevice, pVideoProfile, pCapabilities); + + return result; +} + +VkResult DispatchObject::GetPhysicalDeviceVideoFormatPropertiesKHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceVideoFormatInfoKHR* pVideoFormatInfo, + uint32_t* pVideoFormatPropertyCount, + VkVideoFormatPropertiesKHR* pVideoFormatProperties) { + VkResult result = instance_dispatch_table.GetPhysicalDeviceVideoFormatPropertiesKHR( + physicalDevice, pVideoFormatInfo, pVideoFormatPropertyCount, pVideoFormatProperties); + + return result; +} + +VkResult DispatchObject::CreateVideoSessionKHR(VkDevice device, const VkVideoSessionCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkVideoSessionKHR* pVideoSession) { + if (!wrap_handles) return device_dispatch_table.CreateVideoSessionKHR(device, pCreateInfo, pAllocator, pVideoSession); + + VkResult result = device_dispatch_table.CreateVideoSessionKHR(device, pCreateInfo, pAllocator, pVideoSession); + if (VK_SUCCESS == result) { + *pVideoSession = WrapNew(*pVideoSession); + } + return result; +} + +void DispatchObject::DestroyVideoSessionKHR(VkDevice device, VkVideoSessionKHR videoSession, + const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyVideoSessionKHR(device, videoSession, pAllocator); + + uint64_t videoSession_id = CastToUint64(videoSession); + auto iter = unique_id_mapping.pop(videoSession_id); + if (iter != unique_id_mapping.end()) { + videoSession = (VkVideoSessionKHR)iter->second; + } else { + videoSession = (VkVideoSessionKHR)0; + } + device_dispatch_table.DestroyVideoSessionKHR(device, videoSession, pAllocator); +} + +VkResult DispatchObject::GetVideoSessionMemoryRequirementsKHR(VkDevice device, VkVideoSessionKHR videoSession, + uint32_t* pMemoryRequirementsCount, + VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements) { + if (!wrap_handles) + return device_dispatch_table.GetVideoSessionMemoryRequirementsKHR(device, videoSession, pMemoryRequirementsCount, + pMemoryRequirements); + { videoSession = Unwrap(videoSession); } + VkResult result = device_dispatch_table.GetVideoSessionMemoryRequirementsKHR(device, videoSession, pMemoryRequirementsCount, + pMemoryRequirements); + + return result; +} + +VkResult DispatchObject::BindVideoSessionMemoryKHR(VkDevice device, VkVideoSessionKHR videoSession, + uint32_t bindSessionMemoryInfoCount, + const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos) { + if (!wrap_handles) + return device_dispatch_table.BindVideoSessionMemoryKHR(device, videoSession, bindSessionMemoryInfoCount, + pBindSessionMemoryInfos); + small_vector var_local_pBindSessionMemoryInfos; + vku::safe_VkBindVideoSessionMemoryInfoKHR* local_pBindSessionMemoryInfos = nullptr; + { + videoSession = Unwrap(videoSession); + if (pBindSessionMemoryInfos) { + var_local_pBindSessionMemoryInfos.resize(bindSessionMemoryInfoCount); + local_pBindSessionMemoryInfos = var_local_pBindSessionMemoryInfos.data(); + for (uint32_t index0 = 0; index0 < bindSessionMemoryInfoCount; ++index0) { + local_pBindSessionMemoryInfos[index0].initialize(&pBindSessionMemoryInfos[index0]); + + if (pBindSessionMemoryInfos[index0].memory) { + local_pBindSessionMemoryInfos[index0].memory = Unwrap(pBindSessionMemoryInfos[index0].memory); + } + } + } + } + VkResult result = device_dispatch_table.BindVideoSessionMemoryKHR( + device, videoSession, bindSessionMemoryInfoCount, (const VkBindVideoSessionMemoryInfoKHR*)local_pBindSessionMemoryInfos); + + return result; +} + +VkResult DispatchObject::CreateVideoSessionParametersKHR(VkDevice device, const VkVideoSessionParametersCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkVideoSessionParametersKHR* pVideoSessionParameters) { + if (!wrap_handles) + return device_dispatch_table.CreateVideoSessionParametersKHR(device, pCreateInfo, pAllocator, pVideoSessionParameters); + vku::safe_VkVideoSessionParametersCreateInfoKHR var_local_pCreateInfo; + vku::safe_VkVideoSessionParametersCreateInfoKHR* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + + if (pCreateInfo->videoSessionParametersTemplate) { + local_pCreateInfo->videoSessionParametersTemplate = Unwrap(pCreateInfo->videoSessionParametersTemplate); + } + if (pCreateInfo->videoSession) { + local_pCreateInfo->videoSession = Unwrap(pCreateInfo->videoSession); + } + } + } + VkResult result = device_dispatch_table.CreateVideoSessionParametersKHR( + device, (const VkVideoSessionParametersCreateInfoKHR*)local_pCreateInfo, pAllocator, pVideoSessionParameters); + if (VK_SUCCESS == result) { + *pVideoSessionParameters = WrapNew(*pVideoSessionParameters); + } + return result; +} + +VkResult DispatchObject::UpdateVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, + const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo) { + if (!wrap_handles) return device_dispatch_table.UpdateVideoSessionParametersKHR(device, videoSessionParameters, pUpdateInfo); + { videoSessionParameters = Unwrap(videoSessionParameters); } + VkResult result = device_dispatch_table.UpdateVideoSessionParametersKHR(device, videoSessionParameters, pUpdateInfo); + + return result; +} + +void DispatchObject::DestroyVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, + const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyVideoSessionParametersKHR(device, videoSessionParameters, pAllocator); + + uint64_t videoSessionParameters_id = CastToUint64(videoSessionParameters); + auto iter = unique_id_mapping.pop(videoSessionParameters_id); + if (iter != unique_id_mapping.end()) { + videoSessionParameters = (VkVideoSessionParametersKHR)iter->second; + } else { + videoSessionParameters = (VkVideoSessionParametersKHR)0; + } + device_dispatch_table.DestroyVideoSessionParametersKHR(device, videoSessionParameters, pAllocator); +} + +void DispatchObject::CmdBeginVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoBeginCodingInfoKHR* pBeginInfo) { + if (!wrap_handles) return device_dispatch_table.CmdBeginVideoCodingKHR(commandBuffer, pBeginInfo); + vku::safe_VkVideoBeginCodingInfoKHR var_local_pBeginInfo; + vku::safe_VkVideoBeginCodingInfoKHR* local_pBeginInfo = nullptr; + { + if (pBeginInfo) { + local_pBeginInfo = &var_local_pBeginInfo; + local_pBeginInfo->initialize(pBeginInfo); + + if (pBeginInfo->videoSession) { + local_pBeginInfo->videoSession = Unwrap(pBeginInfo->videoSession); + } + if (pBeginInfo->videoSessionParameters) { + local_pBeginInfo->videoSessionParameters = Unwrap(pBeginInfo->videoSessionParameters); + } + if (local_pBeginInfo->pReferenceSlots) { + for (uint32_t index1 = 0; index1 < local_pBeginInfo->referenceSlotCount; ++index1) { + if (local_pBeginInfo->pReferenceSlots[index1].pPictureResource) { + if (pBeginInfo->pReferenceSlots[index1].pPictureResource->imageViewBinding) { + local_pBeginInfo->pReferenceSlots[index1].pPictureResource->imageViewBinding = + Unwrap(pBeginInfo->pReferenceSlots[index1].pPictureResource->imageViewBinding); + } + } + } + } + } + } + device_dispatch_table.CmdBeginVideoCodingKHR(commandBuffer, (const VkVideoBeginCodingInfoKHR*)local_pBeginInfo); +} + +void DispatchObject::CmdEndVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoEndCodingInfoKHR* pEndCodingInfo) { + device_dispatch_table.CmdEndVideoCodingKHR(commandBuffer, pEndCodingInfo); +} + +void DispatchObject::CmdControlVideoCodingKHR(VkCommandBuffer commandBuffer, + const VkVideoCodingControlInfoKHR* pCodingControlInfo) { + device_dispatch_table.CmdControlVideoCodingKHR(commandBuffer, pCodingControlInfo); +} + +void DispatchObject::CmdDecodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR* pDecodeInfo) { + if (!wrap_handles) return device_dispatch_table.CmdDecodeVideoKHR(commandBuffer, pDecodeInfo); + vku::safe_VkVideoDecodeInfoKHR var_local_pDecodeInfo; + vku::safe_VkVideoDecodeInfoKHR* local_pDecodeInfo = nullptr; + { + if (pDecodeInfo) { + local_pDecodeInfo = &var_local_pDecodeInfo; + local_pDecodeInfo->initialize(pDecodeInfo); + + if (pDecodeInfo->srcBuffer) { + local_pDecodeInfo->srcBuffer = Unwrap(pDecodeInfo->srcBuffer); + } + if (pDecodeInfo->dstPictureResource.imageViewBinding) { + local_pDecodeInfo->dstPictureResource.imageViewBinding = Unwrap(pDecodeInfo->dstPictureResource.imageViewBinding); + } + if (local_pDecodeInfo->pSetupReferenceSlot) { + if (local_pDecodeInfo->pSetupReferenceSlot->pPictureResource) { + if (pDecodeInfo->pSetupReferenceSlot->pPictureResource->imageViewBinding) { + local_pDecodeInfo->pSetupReferenceSlot->pPictureResource->imageViewBinding = + Unwrap(pDecodeInfo->pSetupReferenceSlot->pPictureResource->imageViewBinding); + } + } + } + if (local_pDecodeInfo->pReferenceSlots) { + for (uint32_t index1 = 0; index1 < local_pDecodeInfo->referenceSlotCount; ++index1) { + if (local_pDecodeInfo->pReferenceSlots[index1].pPictureResource) { + if (pDecodeInfo->pReferenceSlots[index1].pPictureResource->imageViewBinding) { + local_pDecodeInfo->pReferenceSlots[index1].pPictureResource->imageViewBinding = + Unwrap(pDecodeInfo->pReferenceSlots[index1].pPictureResource->imageViewBinding); + } + } + } + } + UnwrapPnextChainHandles(local_pDecodeInfo->pNext); + } + } + device_dispatch_table.CmdDecodeVideoKHR(commandBuffer, (const VkVideoDecodeInfoKHR*)local_pDecodeInfo); +} + +void DispatchObject::CmdBeginRenderingKHR(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo) { + if (!wrap_handles) return device_dispatch_table.CmdBeginRenderingKHR(commandBuffer, pRenderingInfo); + vku::safe_VkRenderingInfo var_local_pRenderingInfo; + vku::safe_VkRenderingInfo* local_pRenderingInfo = nullptr; + { + if (pRenderingInfo) { + local_pRenderingInfo = &var_local_pRenderingInfo; + local_pRenderingInfo->initialize(pRenderingInfo); + if (local_pRenderingInfo->pColorAttachments) { + for (uint32_t index1 = 0; index1 < local_pRenderingInfo->colorAttachmentCount; ++index1) { + if (pRenderingInfo->pColorAttachments[index1].imageView) { + local_pRenderingInfo->pColorAttachments[index1].imageView = + Unwrap(pRenderingInfo->pColorAttachments[index1].imageView); + } + if (pRenderingInfo->pColorAttachments[index1].resolveImageView) { + local_pRenderingInfo->pColorAttachments[index1].resolveImageView = + Unwrap(pRenderingInfo->pColorAttachments[index1].resolveImageView); + } + } + } + if (local_pRenderingInfo->pDepthAttachment) { + if (pRenderingInfo->pDepthAttachment->imageView) { + local_pRenderingInfo->pDepthAttachment->imageView = Unwrap(pRenderingInfo->pDepthAttachment->imageView); + } + if (pRenderingInfo->pDepthAttachment->resolveImageView) { + local_pRenderingInfo->pDepthAttachment->resolveImageView = + Unwrap(pRenderingInfo->pDepthAttachment->resolveImageView); + } + } + if (local_pRenderingInfo->pStencilAttachment) { + if (pRenderingInfo->pStencilAttachment->imageView) { + local_pRenderingInfo->pStencilAttachment->imageView = Unwrap(pRenderingInfo->pStencilAttachment->imageView); + } + if (pRenderingInfo->pStencilAttachment->resolveImageView) { + local_pRenderingInfo->pStencilAttachment->resolveImageView = + Unwrap(pRenderingInfo->pStencilAttachment->resolveImageView); + } + } + UnwrapPnextChainHandles(local_pRenderingInfo->pNext); + } + } + device_dispatch_table.CmdBeginRenderingKHR(commandBuffer, (const VkRenderingInfo*)local_pRenderingInfo); +} + +void DispatchObject::CmdEndRenderingKHR(VkCommandBuffer commandBuffer) { device_dispatch_table.CmdEndRenderingKHR(commandBuffer); } + +void DispatchObject::GetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures) { + instance_dispatch_table.GetPhysicalDeviceFeatures2KHR(physicalDevice, pFeatures); +} + +void DispatchObject::GetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties) { + instance_dispatch_table.GetPhysicalDeviceProperties2KHR(physicalDevice, pProperties); +} + +void DispatchObject::GetPhysicalDeviceFormatProperties2KHR(VkPhysicalDevice physicalDevice, VkFormat format, + VkFormatProperties2* pFormatProperties) { + instance_dispatch_table.GetPhysicalDeviceFormatProperties2KHR(physicalDevice, format, pFormatProperties); +} + +VkResult DispatchObject::GetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, + VkImageFormatProperties2* pImageFormatProperties) { + VkResult result = instance_dispatch_table.GetPhysicalDeviceImageFormatProperties2KHR(physicalDevice, pImageFormatInfo, + pImageFormatProperties); + + return result; +} + +void DispatchObject::GetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice, + uint32_t* pQueueFamilyPropertyCount, + VkQueueFamilyProperties2* pQueueFamilyProperties) { + instance_dispatch_table.GetPhysicalDeviceQueueFamilyProperties2KHR(physicalDevice, pQueueFamilyPropertyCount, + pQueueFamilyProperties); +} + +void DispatchObject::GetPhysicalDeviceMemoryProperties2KHR(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceMemoryProperties2* pMemoryProperties) { + instance_dispatch_table.GetPhysicalDeviceMemoryProperties2KHR(physicalDevice, pMemoryProperties); +} + +void DispatchObject::GetPhysicalDeviceSparseImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, + uint32_t* pPropertyCount, + VkSparseImageFormatProperties2* pProperties) { + instance_dispatch_table.GetPhysicalDeviceSparseImageFormatProperties2KHR(physicalDevice, pFormatInfo, pPropertyCount, + pProperties); +} + +void DispatchObject::GetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, + uint32_t remoteDeviceIndex, + VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) { + device_dispatch_table.GetDeviceGroupPeerMemoryFeaturesKHR(device, heapIndex, localDeviceIndex, remoteDeviceIndex, + pPeerMemoryFeatures); +} + +void DispatchObject::CmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, uint32_t deviceMask) { + device_dispatch_table.CmdSetDeviceMaskKHR(commandBuffer, deviceMask); +} + +void DispatchObject::CmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, + uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) { + device_dispatch_table.CmdDispatchBaseKHR(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, + groupCountZ); +} + +void DispatchObject::TrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags) { + if (!wrap_handles) return device_dispatch_table.TrimCommandPoolKHR(device, commandPool, flags); + { commandPool = Unwrap(commandPool); } + device_dispatch_table.TrimCommandPoolKHR(device, commandPool, flags); +} + +VkResult DispatchObject::EnumeratePhysicalDeviceGroupsKHR(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, + VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) { + VkResult result = instance_dispatch_table.EnumeratePhysicalDeviceGroupsKHR(instance, pPhysicalDeviceGroupCount, + pPhysicalDeviceGroupProperties); + + return result; +} + +void DispatchObject::GetPhysicalDeviceExternalBufferPropertiesKHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, + VkExternalBufferProperties* pExternalBufferProperties) { + instance_dispatch_table.GetPhysicalDeviceExternalBufferPropertiesKHR(physicalDevice, pExternalBufferInfo, + pExternalBufferProperties); +} +#ifdef VK_USE_PLATFORM_WIN32_KHR + +VkResult DispatchObject::GetMemoryWin32HandleKHR(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, + HANDLE* pHandle) { + if (!wrap_handles) return device_dispatch_table.GetMemoryWin32HandleKHR(device, pGetWin32HandleInfo, pHandle); + vku::safe_VkMemoryGetWin32HandleInfoKHR var_local_pGetWin32HandleInfo; + vku::safe_VkMemoryGetWin32HandleInfoKHR* local_pGetWin32HandleInfo = nullptr; + { + if (pGetWin32HandleInfo) { + local_pGetWin32HandleInfo = &var_local_pGetWin32HandleInfo; + local_pGetWin32HandleInfo->initialize(pGetWin32HandleInfo); + + if (pGetWin32HandleInfo->memory) { + local_pGetWin32HandleInfo->memory = Unwrap(pGetWin32HandleInfo->memory); + } + } + } + VkResult result = device_dispatch_table.GetMemoryWin32HandleKHR( + device, (const VkMemoryGetWin32HandleInfoKHR*)local_pGetWin32HandleInfo, pHandle); + + return result; +} + +VkResult DispatchObject::GetMemoryWin32HandlePropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, + HANDLE handle, + VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties) { + VkResult result = + device_dispatch_table.GetMemoryWin32HandlePropertiesKHR(device, handleType, handle, pMemoryWin32HandleProperties); + + return result; +} +#endif // VK_USE_PLATFORM_WIN32_KHR + +VkResult DispatchObject::GetMemoryFdKHR(VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd) { + if (!wrap_handles) return device_dispatch_table.GetMemoryFdKHR(device, pGetFdInfo, pFd); + vku::safe_VkMemoryGetFdInfoKHR var_local_pGetFdInfo; + vku::safe_VkMemoryGetFdInfoKHR* local_pGetFdInfo = nullptr; + { + if (pGetFdInfo) { + local_pGetFdInfo = &var_local_pGetFdInfo; + local_pGetFdInfo->initialize(pGetFdInfo); + + if (pGetFdInfo->memory) { + local_pGetFdInfo->memory = Unwrap(pGetFdInfo->memory); + } + } + } + VkResult result = device_dispatch_table.GetMemoryFdKHR(device, (const VkMemoryGetFdInfoKHR*)local_pGetFdInfo, pFd); + + return result; +} + +VkResult DispatchObject::GetMemoryFdPropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, + VkMemoryFdPropertiesKHR* pMemoryFdProperties) { + VkResult result = device_dispatch_table.GetMemoryFdPropertiesKHR(device, handleType, fd, pMemoryFdProperties); + + return result; +} + +void DispatchObject::GetPhysicalDeviceExternalSemaphorePropertiesKHR( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, + VkExternalSemaphoreProperties* pExternalSemaphoreProperties) { + instance_dispatch_table.GetPhysicalDeviceExternalSemaphorePropertiesKHR(physicalDevice, pExternalSemaphoreInfo, + pExternalSemaphoreProperties); +} +#ifdef VK_USE_PLATFORM_WIN32_KHR + +VkResult DispatchObject::ImportSemaphoreWin32HandleKHR(VkDevice device, + const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo) { + if (!wrap_handles) return device_dispatch_table.ImportSemaphoreWin32HandleKHR(device, pImportSemaphoreWin32HandleInfo); + vku::safe_VkImportSemaphoreWin32HandleInfoKHR var_local_pImportSemaphoreWin32HandleInfo; + vku::safe_VkImportSemaphoreWin32HandleInfoKHR* local_pImportSemaphoreWin32HandleInfo = nullptr; + { + if (pImportSemaphoreWin32HandleInfo) { + local_pImportSemaphoreWin32HandleInfo = &var_local_pImportSemaphoreWin32HandleInfo; + local_pImportSemaphoreWin32HandleInfo->initialize(pImportSemaphoreWin32HandleInfo); + + if (pImportSemaphoreWin32HandleInfo->semaphore) { + local_pImportSemaphoreWin32HandleInfo->semaphore = Unwrap(pImportSemaphoreWin32HandleInfo->semaphore); + } + } + } + VkResult result = device_dispatch_table.ImportSemaphoreWin32HandleKHR( + device, (const VkImportSemaphoreWin32HandleInfoKHR*)local_pImportSemaphoreWin32HandleInfo); + + return result; +} + +VkResult DispatchObject::GetSemaphoreWin32HandleKHR(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, + HANDLE* pHandle) { + if (!wrap_handles) return device_dispatch_table.GetSemaphoreWin32HandleKHR(device, pGetWin32HandleInfo, pHandle); + vku::safe_VkSemaphoreGetWin32HandleInfoKHR var_local_pGetWin32HandleInfo; + vku::safe_VkSemaphoreGetWin32HandleInfoKHR* local_pGetWin32HandleInfo = nullptr; + { + if (pGetWin32HandleInfo) { + local_pGetWin32HandleInfo = &var_local_pGetWin32HandleInfo; + local_pGetWin32HandleInfo->initialize(pGetWin32HandleInfo); + + if (pGetWin32HandleInfo->semaphore) { + local_pGetWin32HandleInfo->semaphore = Unwrap(pGetWin32HandleInfo->semaphore); + } + } + } + VkResult result = device_dispatch_table.GetSemaphoreWin32HandleKHR( + device, (const VkSemaphoreGetWin32HandleInfoKHR*)local_pGetWin32HandleInfo, pHandle); + + return result; +} +#endif // VK_USE_PLATFORM_WIN32_KHR + +VkResult DispatchObject::ImportSemaphoreFdKHR(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo) { + if (!wrap_handles) return device_dispatch_table.ImportSemaphoreFdKHR(device, pImportSemaphoreFdInfo); + vku::safe_VkImportSemaphoreFdInfoKHR var_local_pImportSemaphoreFdInfo; + vku::safe_VkImportSemaphoreFdInfoKHR* local_pImportSemaphoreFdInfo = nullptr; + { + if (pImportSemaphoreFdInfo) { + local_pImportSemaphoreFdInfo = &var_local_pImportSemaphoreFdInfo; + local_pImportSemaphoreFdInfo->initialize(pImportSemaphoreFdInfo); + + if (pImportSemaphoreFdInfo->semaphore) { + local_pImportSemaphoreFdInfo->semaphore = Unwrap(pImportSemaphoreFdInfo->semaphore); + } + } + } + VkResult result = + device_dispatch_table.ImportSemaphoreFdKHR(device, (const VkImportSemaphoreFdInfoKHR*)local_pImportSemaphoreFdInfo); + + return result; +} + +VkResult DispatchObject::GetSemaphoreFdKHR(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd) { + if (!wrap_handles) return device_dispatch_table.GetSemaphoreFdKHR(device, pGetFdInfo, pFd); + vku::safe_VkSemaphoreGetFdInfoKHR var_local_pGetFdInfo; + vku::safe_VkSemaphoreGetFdInfoKHR* local_pGetFdInfo = nullptr; + { + if (pGetFdInfo) { + local_pGetFdInfo = &var_local_pGetFdInfo; + local_pGetFdInfo->initialize(pGetFdInfo); + + if (pGetFdInfo->semaphore) { + local_pGetFdInfo->semaphore = Unwrap(pGetFdInfo->semaphore); + } + } + } + VkResult result = device_dispatch_table.GetSemaphoreFdKHR(device, (const VkSemaphoreGetFdInfoKHR*)local_pGetFdInfo, pFd); + + return result; +} + +void DispatchObject::CmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, + const VkWriteDescriptorSet* pDescriptorWrites) { + if (!wrap_handles) + return device_dispatch_table.CmdPushDescriptorSetKHR(commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, + pDescriptorWrites); + small_vector var_local_pDescriptorWrites; + vku::safe_VkWriteDescriptorSet* local_pDescriptorWrites = nullptr; + { + layout = Unwrap(layout); + if (pDescriptorWrites) { + var_local_pDescriptorWrites.resize(descriptorWriteCount); + local_pDescriptorWrites = var_local_pDescriptorWrites.data(); + for (uint32_t index0 = 0; index0 < descriptorWriteCount; ++index0) { + local_pDescriptorWrites[index0].initialize(&pDescriptorWrites[index0]); + UnwrapPnextChainHandles(local_pDescriptorWrites[index0].pNext); + + if (pDescriptorWrites[index0].dstSet) { + local_pDescriptorWrites[index0].dstSet = Unwrap(pDescriptorWrites[index0].dstSet); + } + if (local_pDescriptorWrites[index0].pImageInfo) { + for (uint32_t index1 = 0; index1 < local_pDescriptorWrites[index0].descriptorCount; ++index1) { + if (pDescriptorWrites[index0].pImageInfo[index1].sampler) { + local_pDescriptorWrites[index0].pImageInfo[index1].sampler = + Unwrap(pDescriptorWrites[index0].pImageInfo[index1].sampler); + } + if (pDescriptorWrites[index0].pImageInfo[index1].imageView) { + local_pDescriptorWrites[index0].pImageInfo[index1].imageView = + Unwrap(pDescriptorWrites[index0].pImageInfo[index1].imageView); + } + } + } + if (local_pDescriptorWrites[index0].pBufferInfo) { + for (uint32_t index1 = 0; index1 < local_pDescriptorWrites[index0].descriptorCount; ++index1) { + if (pDescriptorWrites[index0].pBufferInfo[index1].buffer) { + local_pDescriptorWrites[index0].pBufferInfo[index1].buffer = + Unwrap(pDescriptorWrites[index0].pBufferInfo[index1].buffer); + } + } + } + if (local_pDescriptorWrites[index0].pTexelBufferView) { + for (uint32_t index1 = 0; index1 < local_pDescriptorWrites[index0].descriptorCount; ++index1) { + local_pDescriptorWrites[index0].pTexelBufferView[index1] = + Unwrap(local_pDescriptorWrites[index0].pTexelBufferView[index1]); + } + } + } + } + } + device_dispatch_table.CmdPushDescriptorSetKHR(commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, + (const VkWriteDescriptorSet*)local_pDescriptorWrites); +} + +void DispatchObject::CmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, + const VkSubpassBeginInfo* pSubpassBeginInfo) { + if (!wrap_handles) return device_dispatch_table.CmdBeginRenderPass2KHR(commandBuffer, pRenderPassBegin, pSubpassBeginInfo); + vku::safe_VkRenderPassBeginInfo var_local_pRenderPassBegin; + vku::safe_VkRenderPassBeginInfo* local_pRenderPassBegin = nullptr; + { + if (pRenderPassBegin) { + local_pRenderPassBegin = &var_local_pRenderPassBegin; + local_pRenderPassBegin->initialize(pRenderPassBegin); + + if (pRenderPassBegin->renderPass) { + local_pRenderPassBegin->renderPass = Unwrap(pRenderPassBegin->renderPass); + } + if (pRenderPassBegin->framebuffer) { + local_pRenderPassBegin->framebuffer = Unwrap(pRenderPassBegin->framebuffer); + } + UnwrapPnextChainHandles(local_pRenderPassBegin->pNext); + } + } + device_dispatch_table.CmdBeginRenderPass2KHR(commandBuffer, (const VkRenderPassBeginInfo*)local_pRenderPassBegin, + pSubpassBeginInfo); +} + +void DispatchObject::CmdNextSubpass2KHR(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, + const VkSubpassEndInfo* pSubpassEndInfo) { + device_dispatch_table.CmdNextSubpass2KHR(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo); +} + +void DispatchObject::CmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo) { + device_dispatch_table.CmdEndRenderPass2KHR(commandBuffer, pSubpassEndInfo); +} + +VkResult DispatchObject::GetSwapchainStatusKHR(VkDevice device, VkSwapchainKHR swapchain) { + if (!wrap_handles) return device_dispatch_table.GetSwapchainStatusKHR(device, swapchain); + { swapchain = Unwrap(swapchain); } + VkResult result = device_dispatch_table.GetSwapchainStatusKHR(device, swapchain); + + return result; +} + +void DispatchObject::GetPhysicalDeviceExternalFencePropertiesKHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, + VkExternalFenceProperties* pExternalFenceProperties) { + instance_dispatch_table.GetPhysicalDeviceExternalFencePropertiesKHR(physicalDevice, pExternalFenceInfo, + pExternalFenceProperties); +} +#ifdef VK_USE_PLATFORM_WIN32_KHR + +VkResult DispatchObject::ImportFenceWin32HandleKHR(VkDevice device, + const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo) { + if (!wrap_handles) return device_dispatch_table.ImportFenceWin32HandleKHR(device, pImportFenceWin32HandleInfo); + vku::safe_VkImportFenceWin32HandleInfoKHR var_local_pImportFenceWin32HandleInfo; + vku::safe_VkImportFenceWin32HandleInfoKHR* local_pImportFenceWin32HandleInfo = nullptr; + { + if (pImportFenceWin32HandleInfo) { + local_pImportFenceWin32HandleInfo = &var_local_pImportFenceWin32HandleInfo; + local_pImportFenceWin32HandleInfo->initialize(pImportFenceWin32HandleInfo); + + if (pImportFenceWin32HandleInfo->fence) { + local_pImportFenceWin32HandleInfo->fence = Unwrap(pImportFenceWin32HandleInfo->fence); + } + } + } + VkResult result = device_dispatch_table.ImportFenceWin32HandleKHR( + device, (const VkImportFenceWin32HandleInfoKHR*)local_pImportFenceWin32HandleInfo); + + return result; +} + +VkResult DispatchObject::GetFenceWin32HandleKHR(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, + HANDLE* pHandle) { + if (!wrap_handles) return device_dispatch_table.GetFenceWin32HandleKHR(device, pGetWin32HandleInfo, pHandle); + vku::safe_VkFenceGetWin32HandleInfoKHR var_local_pGetWin32HandleInfo; + vku::safe_VkFenceGetWin32HandleInfoKHR* local_pGetWin32HandleInfo = nullptr; + { + if (pGetWin32HandleInfo) { + local_pGetWin32HandleInfo = &var_local_pGetWin32HandleInfo; + local_pGetWin32HandleInfo->initialize(pGetWin32HandleInfo); + + if (pGetWin32HandleInfo->fence) { + local_pGetWin32HandleInfo->fence = Unwrap(pGetWin32HandleInfo->fence); + } + } + } + VkResult result = device_dispatch_table.GetFenceWin32HandleKHR( + device, (const VkFenceGetWin32HandleInfoKHR*)local_pGetWin32HandleInfo, pHandle); + + return result; +} +#endif // VK_USE_PLATFORM_WIN32_KHR + +VkResult DispatchObject::ImportFenceFdKHR(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo) { + if (!wrap_handles) return device_dispatch_table.ImportFenceFdKHR(device, pImportFenceFdInfo); + vku::safe_VkImportFenceFdInfoKHR var_local_pImportFenceFdInfo; + vku::safe_VkImportFenceFdInfoKHR* local_pImportFenceFdInfo = nullptr; + { + if (pImportFenceFdInfo) { + local_pImportFenceFdInfo = &var_local_pImportFenceFdInfo; + local_pImportFenceFdInfo->initialize(pImportFenceFdInfo); + + if (pImportFenceFdInfo->fence) { + local_pImportFenceFdInfo->fence = Unwrap(pImportFenceFdInfo->fence); + } + } + } + VkResult result = device_dispatch_table.ImportFenceFdKHR(device, (const VkImportFenceFdInfoKHR*)local_pImportFenceFdInfo); + + return result; +} + +VkResult DispatchObject::GetFenceFdKHR(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd) { + if (!wrap_handles) return device_dispatch_table.GetFenceFdKHR(device, pGetFdInfo, pFd); + vku::safe_VkFenceGetFdInfoKHR var_local_pGetFdInfo; + vku::safe_VkFenceGetFdInfoKHR* local_pGetFdInfo = nullptr; + { + if (pGetFdInfo) { + local_pGetFdInfo = &var_local_pGetFdInfo; + local_pGetFdInfo->initialize(pGetFdInfo); + + if (pGetFdInfo->fence) { + local_pGetFdInfo->fence = Unwrap(pGetFdInfo->fence); + } + } + } + VkResult result = device_dispatch_table.GetFenceFdKHR(device, (const VkFenceGetFdInfoKHR*)local_pGetFdInfo, pFd); + + return result; +} + +VkResult DispatchObject::EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, uint32_t* pCounterCount, VkPerformanceCounterKHR* pCounters, + VkPerformanceCounterDescriptionKHR* pCounterDescriptions) { + VkResult result = instance_dispatch_table.EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + physicalDevice, queueFamilyIndex, pCounterCount, pCounters, pCounterDescriptions); + + return result; +} + +void DispatchObject::GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( + VkPhysicalDevice physicalDevice, const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, uint32_t* pNumPasses) { + instance_dispatch_table.GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(physicalDevice, pPerformanceQueryCreateInfo, + pNumPasses); +} + +VkResult DispatchObject::AcquireProfilingLockKHR(VkDevice device, const VkAcquireProfilingLockInfoKHR* pInfo) { + VkResult result = device_dispatch_table.AcquireProfilingLockKHR(device, pInfo); + + return result; +} + +void DispatchObject::ReleaseProfilingLockKHR(VkDevice device) { device_dispatch_table.ReleaseProfilingLockKHR(device); } + +VkResult DispatchObject::GetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + VkSurfaceCapabilities2KHR* pSurfaceCapabilities) { + if (!wrap_handles) + return instance_dispatch_table.GetPhysicalDeviceSurfaceCapabilities2KHR(physicalDevice, pSurfaceInfo, pSurfaceCapabilities); + vku::safe_VkPhysicalDeviceSurfaceInfo2KHR var_local_pSurfaceInfo; + vku::safe_VkPhysicalDeviceSurfaceInfo2KHR* local_pSurfaceInfo = nullptr; + { + if (pSurfaceInfo) { + local_pSurfaceInfo = &var_local_pSurfaceInfo; + local_pSurfaceInfo->initialize(pSurfaceInfo); + + if (pSurfaceInfo->surface) { + local_pSurfaceInfo->surface = Unwrap(pSurfaceInfo->surface); + } + } + } + VkResult result = instance_dispatch_table.GetPhysicalDeviceSurfaceCapabilities2KHR( + physicalDevice, (const VkPhysicalDeviceSurfaceInfo2KHR*)local_pSurfaceInfo, pSurfaceCapabilities); + + return result; +} + +VkResult DispatchObject::GetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats) { + if (!wrap_handles) + return instance_dispatch_table.GetPhysicalDeviceSurfaceFormats2KHR(physicalDevice, pSurfaceInfo, pSurfaceFormatCount, + pSurfaceFormats); + vku::safe_VkPhysicalDeviceSurfaceInfo2KHR var_local_pSurfaceInfo; + vku::safe_VkPhysicalDeviceSurfaceInfo2KHR* local_pSurfaceInfo = nullptr; + { + if (pSurfaceInfo) { + local_pSurfaceInfo = &var_local_pSurfaceInfo; + local_pSurfaceInfo->initialize(pSurfaceInfo); + + if (pSurfaceInfo->surface) { + local_pSurfaceInfo->surface = Unwrap(pSurfaceInfo->surface); + } + } + } + VkResult result = instance_dispatch_table.GetPhysicalDeviceSurfaceFormats2KHR( + physicalDevice, (const VkPhysicalDeviceSurfaceInfo2KHR*)local_pSurfaceInfo, pSurfaceFormatCount, pSurfaceFormats); + + return result; +} + +VkResult DispatchObject::GetDisplayPlaneCapabilities2KHR(VkPhysicalDevice physicalDevice, + const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, + VkDisplayPlaneCapabilities2KHR* pCapabilities) { + if (!wrap_handles) + return instance_dispatch_table.GetDisplayPlaneCapabilities2KHR(physicalDevice, pDisplayPlaneInfo, pCapabilities); + vku::safe_VkDisplayPlaneInfo2KHR var_local_pDisplayPlaneInfo; + vku::safe_VkDisplayPlaneInfo2KHR* local_pDisplayPlaneInfo = nullptr; + { + if (pDisplayPlaneInfo) { + local_pDisplayPlaneInfo = &var_local_pDisplayPlaneInfo; + local_pDisplayPlaneInfo->initialize(pDisplayPlaneInfo); + + if (pDisplayPlaneInfo->mode) { + local_pDisplayPlaneInfo->mode = Unwrap(pDisplayPlaneInfo->mode); + } + } + } + VkResult result = instance_dispatch_table.GetDisplayPlaneCapabilities2KHR( + physicalDevice, (const VkDisplayPlaneInfo2KHR*)local_pDisplayPlaneInfo, pCapabilities); + + return result; +} + +void DispatchObject::GetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements) { + if (!wrap_handles) return device_dispatch_table.GetImageMemoryRequirements2KHR(device, pInfo, pMemoryRequirements); + vku::safe_VkImageMemoryRequirementsInfo2 var_local_pInfo; + vku::safe_VkImageMemoryRequirementsInfo2* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->image) { + local_pInfo->image = Unwrap(pInfo->image); + } + } + } + device_dispatch_table.GetImageMemoryRequirements2KHR(device, (const VkImageMemoryRequirementsInfo2*)local_pInfo, + pMemoryRequirements); +} + +void DispatchObject::GetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements) { + if (!wrap_handles) return device_dispatch_table.GetBufferMemoryRequirements2KHR(device, pInfo, pMemoryRequirements); + vku::safe_VkBufferMemoryRequirementsInfo2 var_local_pInfo; + vku::safe_VkBufferMemoryRequirementsInfo2* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->buffer) { + local_pInfo->buffer = Unwrap(pInfo->buffer); + } + } + } + device_dispatch_table.GetBufferMemoryRequirements2KHR(device, (const VkBufferMemoryRequirementsInfo2*)local_pInfo, + pMemoryRequirements); +} + +void DispatchObject::GetImageSparseMemoryRequirements2KHR(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { + if (!wrap_handles) + return device_dispatch_table.GetImageSparseMemoryRequirements2KHR(device, pInfo, pSparseMemoryRequirementCount, + pSparseMemoryRequirements); + vku::safe_VkImageSparseMemoryRequirementsInfo2 var_local_pInfo; + vku::safe_VkImageSparseMemoryRequirementsInfo2* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->image) { + local_pInfo->image = Unwrap(pInfo->image); + } + } + } + device_dispatch_table.GetImageSparseMemoryRequirements2KHR(device, (const VkImageSparseMemoryRequirementsInfo2*)local_pInfo, + pSparseMemoryRequirementCount, pSparseMemoryRequirements); +} + +VkResult DispatchObject::CreateSamplerYcbcrConversionKHR(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSamplerYcbcrConversion* pYcbcrConversion) { + if (!wrap_handles) + return device_dispatch_table.CreateSamplerYcbcrConversionKHR(device, pCreateInfo, pAllocator, pYcbcrConversion); + + VkResult result = device_dispatch_table.CreateSamplerYcbcrConversionKHR(device, pCreateInfo, pAllocator, pYcbcrConversion); + if (VK_SUCCESS == result) { + *pYcbcrConversion = WrapNew(*pYcbcrConversion); + } + return result; +} + +void DispatchObject::DestroySamplerYcbcrConversionKHR(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, + const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroySamplerYcbcrConversionKHR(device, ycbcrConversion, pAllocator); + + uint64_t ycbcrConversion_id = CastToUint64(ycbcrConversion); + auto iter = unique_id_mapping.pop(ycbcrConversion_id); + if (iter != unique_id_mapping.end()) { + ycbcrConversion = (VkSamplerYcbcrConversion)iter->second; + } else { + ycbcrConversion = (VkSamplerYcbcrConversion)0; + } + device_dispatch_table.DestroySamplerYcbcrConversionKHR(device, ycbcrConversion, pAllocator); +} + +VkResult DispatchObject::BindBufferMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos) { + if (!wrap_handles) return device_dispatch_table.BindBufferMemory2KHR(device, bindInfoCount, pBindInfos); + small_vector var_local_pBindInfos; + vku::safe_VkBindBufferMemoryInfo* local_pBindInfos = nullptr; + { + if (pBindInfos) { + var_local_pBindInfos.resize(bindInfoCount); + local_pBindInfos = var_local_pBindInfos.data(); + for (uint32_t index0 = 0; index0 < bindInfoCount; ++index0) { + local_pBindInfos[index0].initialize(&pBindInfos[index0]); + + if (pBindInfos[index0].buffer) { + local_pBindInfos[index0].buffer = Unwrap(pBindInfos[index0].buffer); + } + if (pBindInfos[index0].memory) { + local_pBindInfos[index0].memory = Unwrap(pBindInfos[index0].memory); + } + } + } + } + VkResult result = + device_dispatch_table.BindBufferMemory2KHR(device, bindInfoCount, (const VkBindBufferMemoryInfo*)local_pBindInfos); + + return result; +} + +VkResult DispatchObject::BindImageMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos) { + if (!wrap_handles) return device_dispatch_table.BindImageMemory2KHR(device, bindInfoCount, pBindInfos); + small_vector var_local_pBindInfos; + vku::safe_VkBindImageMemoryInfo* local_pBindInfos = nullptr; + { + if (pBindInfos) { + var_local_pBindInfos.resize(bindInfoCount); + local_pBindInfos = var_local_pBindInfos.data(); + for (uint32_t index0 = 0; index0 < bindInfoCount; ++index0) { + local_pBindInfos[index0].initialize(&pBindInfos[index0]); + UnwrapPnextChainHandles(local_pBindInfos[index0].pNext); + + if (pBindInfos[index0].image) { + local_pBindInfos[index0].image = Unwrap(pBindInfos[index0].image); + } + if (pBindInfos[index0].memory) { + local_pBindInfos[index0].memory = Unwrap(pBindInfos[index0].memory); + } + } + } + } + VkResult result = + device_dispatch_table.BindImageMemory2KHR(device, bindInfoCount, (const VkBindImageMemoryInfo*)local_pBindInfos); + + return result; +} + +void DispatchObject::GetDescriptorSetLayoutSupportKHR(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, + VkDescriptorSetLayoutSupport* pSupport) { + if (!wrap_handles) return device_dispatch_table.GetDescriptorSetLayoutSupportKHR(device, pCreateInfo, pSupport); + vku::safe_VkDescriptorSetLayoutCreateInfo var_local_pCreateInfo; + vku::safe_VkDescriptorSetLayoutCreateInfo* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + if (local_pCreateInfo->pBindings) { + for (uint32_t index1 = 0; index1 < local_pCreateInfo->bindingCount; ++index1) { + if (local_pCreateInfo->pBindings[index1].pImmutableSamplers) { + for (uint32_t index2 = 0; index2 < local_pCreateInfo->pBindings[index1].descriptorCount; ++index2) { + local_pCreateInfo->pBindings[index1].pImmutableSamplers[index2] = + Unwrap(local_pCreateInfo->pBindings[index1].pImmutableSamplers[index2]); + } + } + } + } + } + } + device_dispatch_table.GetDescriptorSetLayoutSupportKHR(device, (const VkDescriptorSetLayoutCreateInfo*)local_pCreateInfo, + pSupport); +} + +void DispatchObject::CmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride) { + if (!wrap_handles) + return device_dispatch_table.CmdDrawIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride); + { + buffer = Unwrap(buffer); + countBuffer = Unwrap(countBuffer); + } + device_dispatch_table.CmdDrawIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, + stride); +} + +void DispatchObject::CmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride) { + if (!wrap_handles) + return device_dispatch_table.CmdDrawIndexedIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride); + { + buffer = Unwrap(buffer); + countBuffer = Unwrap(countBuffer); + } + device_dispatch_table.CmdDrawIndexedIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride); +} + +VkResult DispatchObject::GetSemaphoreCounterValueKHR(VkDevice device, VkSemaphore semaphore, uint64_t* pValue) { + if (!wrap_handles) return device_dispatch_table.GetSemaphoreCounterValueKHR(device, semaphore, pValue); + { semaphore = Unwrap(semaphore); } + VkResult result = device_dispatch_table.GetSemaphoreCounterValueKHR(device, semaphore, pValue); + + return result; +} + +VkResult DispatchObject::WaitSemaphoresKHR(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout) { + if (!wrap_handles) return device_dispatch_table.WaitSemaphoresKHR(device, pWaitInfo, timeout); + vku::safe_VkSemaphoreWaitInfo var_local_pWaitInfo; + vku::safe_VkSemaphoreWaitInfo* local_pWaitInfo = nullptr; + { + if (pWaitInfo) { + local_pWaitInfo = &var_local_pWaitInfo; + local_pWaitInfo->initialize(pWaitInfo); + if (local_pWaitInfo->pSemaphores) { + for (uint32_t index1 = 0; index1 < local_pWaitInfo->semaphoreCount; ++index1) { + local_pWaitInfo->pSemaphores[index1] = Unwrap(local_pWaitInfo->pSemaphores[index1]); + } + } + } + } + VkResult result = device_dispatch_table.WaitSemaphoresKHR(device, (const VkSemaphoreWaitInfo*)local_pWaitInfo, timeout); + + return result; +} + +VkResult DispatchObject::SignalSemaphoreKHR(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo) { + if (!wrap_handles) return device_dispatch_table.SignalSemaphoreKHR(device, pSignalInfo); + vku::safe_VkSemaphoreSignalInfo var_local_pSignalInfo; + vku::safe_VkSemaphoreSignalInfo* local_pSignalInfo = nullptr; + { + if (pSignalInfo) { + local_pSignalInfo = &var_local_pSignalInfo; + local_pSignalInfo->initialize(pSignalInfo); + + if (pSignalInfo->semaphore) { + local_pSignalInfo->semaphore = Unwrap(pSignalInfo->semaphore); + } + } + } + VkResult result = device_dispatch_table.SignalSemaphoreKHR(device, (const VkSemaphoreSignalInfo*)local_pSignalInfo); + + return result; +} + +VkResult DispatchObject::GetPhysicalDeviceFragmentShadingRatesKHR(VkPhysicalDevice physicalDevice, + uint32_t* pFragmentShadingRateCount, + VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates) { + VkResult result = instance_dispatch_table.GetPhysicalDeviceFragmentShadingRatesKHR(physicalDevice, pFragmentShadingRateCount, + pFragmentShadingRates); + + return result; +} + +void DispatchObject::CmdSetFragmentShadingRateKHR(VkCommandBuffer commandBuffer, const VkExtent2D* pFragmentSize, + const VkFragmentShadingRateCombinerOpKHR combinerOps[2]) { + device_dispatch_table.CmdSetFragmentShadingRateKHR(commandBuffer, pFragmentSize, combinerOps); +} + +void DispatchObject::CmdSetRenderingAttachmentLocationsKHR(VkCommandBuffer commandBuffer, + const VkRenderingAttachmentLocationInfoKHR* pLocationInfo) { + device_dispatch_table.CmdSetRenderingAttachmentLocationsKHR(commandBuffer, pLocationInfo); +} + +void DispatchObject::CmdSetRenderingInputAttachmentIndicesKHR( + VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfoKHR* pInputAttachmentIndexInfo) { + device_dispatch_table.CmdSetRenderingInputAttachmentIndicesKHR(commandBuffer, pInputAttachmentIndexInfo); +} + +VkResult DispatchObject::WaitForPresentKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t presentId, uint64_t timeout) { + if (!wrap_handles) return device_dispatch_table.WaitForPresentKHR(device, swapchain, presentId, timeout); + { swapchain = Unwrap(swapchain); } + VkResult result = device_dispatch_table.WaitForPresentKHR(device, swapchain, presentId, timeout); + + return result; +} + +VkDeviceAddress DispatchObject::GetBufferDeviceAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { + if (!wrap_handles) return device_dispatch_table.GetBufferDeviceAddressKHR(device, pInfo); + vku::safe_VkBufferDeviceAddressInfo var_local_pInfo; + vku::safe_VkBufferDeviceAddressInfo* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->buffer) { + local_pInfo->buffer = Unwrap(pInfo->buffer); + } + } + } + VkDeviceAddress result = device_dispatch_table.GetBufferDeviceAddressKHR(device, (const VkBufferDeviceAddressInfo*)local_pInfo); + + return result; +} + +uint64_t DispatchObject::GetBufferOpaqueCaptureAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { + if (!wrap_handles) return device_dispatch_table.GetBufferOpaqueCaptureAddressKHR(device, pInfo); + vku::safe_VkBufferDeviceAddressInfo var_local_pInfo; + vku::safe_VkBufferDeviceAddressInfo* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->buffer) { + local_pInfo->buffer = Unwrap(pInfo->buffer); + } + } + } + uint64_t result = device_dispatch_table.GetBufferOpaqueCaptureAddressKHR(device, (const VkBufferDeviceAddressInfo*)local_pInfo); + + return result; +} + +uint64_t DispatchObject::GetDeviceMemoryOpaqueCaptureAddressKHR(VkDevice device, + const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) { + if (!wrap_handles) return device_dispatch_table.GetDeviceMemoryOpaqueCaptureAddressKHR(device, pInfo); + vku::safe_VkDeviceMemoryOpaqueCaptureAddressInfo var_local_pInfo; + vku::safe_VkDeviceMemoryOpaqueCaptureAddressInfo* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->memory) { + local_pInfo->memory = Unwrap(pInfo->memory); + } + } + } + uint64_t result = device_dispatch_table.GetDeviceMemoryOpaqueCaptureAddressKHR( + device, (const VkDeviceMemoryOpaqueCaptureAddressInfo*)local_pInfo); + + return result; +} + +VkResult DispatchObject::CreateDeferredOperationKHR(VkDevice device, const VkAllocationCallbacks* pAllocator, + VkDeferredOperationKHR* pDeferredOperation) { + if (!wrap_handles) return device_dispatch_table.CreateDeferredOperationKHR(device, pAllocator, pDeferredOperation); + + VkResult result = device_dispatch_table.CreateDeferredOperationKHR(device, pAllocator, pDeferredOperation); + if (VK_SUCCESS == result) { + *pDeferredOperation = WrapNew(*pDeferredOperation); + } + return result; +} + +void DispatchObject::DestroyDeferredOperationKHR(VkDevice device, VkDeferredOperationKHR operation, + const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyDeferredOperationKHR(device, operation, pAllocator); + + uint64_t operation_id = CastToUint64(operation); + auto iter = unique_id_mapping.pop(operation_id); + if (iter != unique_id_mapping.end()) { + operation = (VkDeferredOperationKHR)iter->second; + } else { + operation = (VkDeferredOperationKHR)0; + } + device_dispatch_table.DestroyDeferredOperationKHR(device, operation, pAllocator); +} + +uint32_t DispatchObject::GetDeferredOperationMaxConcurrencyKHR(VkDevice device, VkDeferredOperationKHR operation) { + if (!wrap_handles) return device_dispatch_table.GetDeferredOperationMaxConcurrencyKHR(device, operation); + { operation = Unwrap(operation); } + uint32_t result = device_dispatch_table.GetDeferredOperationMaxConcurrencyKHR(device, operation); + + return result; +} + +VkResult DispatchObject::GetPipelineExecutablePropertiesKHR(VkDevice device, const VkPipelineInfoKHR* pPipelineInfo, + uint32_t* pExecutableCount, + VkPipelineExecutablePropertiesKHR* pProperties) { + if (!wrap_handles) + return device_dispatch_table.GetPipelineExecutablePropertiesKHR(device, pPipelineInfo, pExecutableCount, pProperties); + vku::safe_VkPipelineInfoKHR var_local_pPipelineInfo; + vku::safe_VkPipelineInfoKHR* local_pPipelineInfo = nullptr; + { + if (pPipelineInfo) { + local_pPipelineInfo = &var_local_pPipelineInfo; + local_pPipelineInfo->initialize(pPipelineInfo); + + if (pPipelineInfo->pipeline) { + local_pPipelineInfo->pipeline = Unwrap(pPipelineInfo->pipeline); + } + } + } + VkResult result = device_dispatch_table.GetPipelineExecutablePropertiesKHR( + device, (const VkPipelineInfoKHR*)local_pPipelineInfo, pExecutableCount, pProperties); + + return result; +} + +VkResult DispatchObject::GetPipelineExecutableStatisticsKHR(VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, + uint32_t* pStatisticCount, + VkPipelineExecutableStatisticKHR* pStatistics) { + if (!wrap_handles) + return device_dispatch_table.GetPipelineExecutableStatisticsKHR(device, pExecutableInfo, pStatisticCount, pStatistics); + vku::safe_VkPipelineExecutableInfoKHR var_local_pExecutableInfo; + vku::safe_VkPipelineExecutableInfoKHR* local_pExecutableInfo = nullptr; + { + if (pExecutableInfo) { + local_pExecutableInfo = &var_local_pExecutableInfo; + local_pExecutableInfo->initialize(pExecutableInfo); + + if (pExecutableInfo->pipeline) { + local_pExecutableInfo->pipeline = Unwrap(pExecutableInfo->pipeline); + } + } + } + VkResult result = device_dispatch_table.GetPipelineExecutableStatisticsKHR( + device, (const VkPipelineExecutableInfoKHR*)local_pExecutableInfo, pStatisticCount, pStatistics); + + return result; +} + +VkResult DispatchObject::GetPipelineExecutableInternalRepresentationsKHR( + VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pInternalRepresentationCount, + VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations) { + if (!wrap_handles) + return device_dispatch_table.GetPipelineExecutableInternalRepresentationsKHR( + device, pExecutableInfo, pInternalRepresentationCount, pInternalRepresentations); + vku::safe_VkPipelineExecutableInfoKHR var_local_pExecutableInfo; + vku::safe_VkPipelineExecutableInfoKHR* local_pExecutableInfo = nullptr; + { + if (pExecutableInfo) { + local_pExecutableInfo = &var_local_pExecutableInfo; + local_pExecutableInfo->initialize(pExecutableInfo); + + if (pExecutableInfo->pipeline) { + local_pExecutableInfo->pipeline = Unwrap(pExecutableInfo->pipeline); + } + } + } + VkResult result = device_dispatch_table.GetPipelineExecutableInternalRepresentationsKHR( + device, (const VkPipelineExecutableInfoKHR*)local_pExecutableInfo, pInternalRepresentationCount, pInternalRepresentations); + + return result; +} + +VkResult DispatchObject::MapMemory2KHR(VkDevice device, const VkMemoryMapInfoKHR* pMemoryMapInfo, void** ppData) { + if (!wrap_handles) return device_dispatch_table.MapMemory2KHR(device, pMemoryMapInfo, ppData); + vku::safe_VkMemoryMapInfoKHR var_local_pMemoryMapInfo; + vku::safe_VkMemoryMapInfoKHR* local_pMemoryMapInfo = nullptr; + { + if (pMemoryMapInfo) { + local_pMemoryMapInfo = &var_local_pMemoryMapInfo; + local_pMemoryMapInfo->initialize(pMemoryMapInfo); + + if (pMemoryMapInfo->memory) { + local_pMemoryMapInfo->memory = Unwrap(pMemoryMapInfo->memory); + } + } + } + VkResult result = device_dispatch_table.MapMemory2KHR(device, (const VkMemoryMapInfoKHR*)local_pMemoryMapInfo, ppData); + + return result; +} + +VkResult DispatchObject::UnmapMemory2KHR(VkDevice device, const VkMemoryUnmapInfoKHR* pMemoryUnmapInfo) { + if (!wrap_handles) return device_dispatch_table.UnmapMemory2KHR(device, pMemoryUnmapInfo); + vku::safe_VkMemoryUnmapInfoKHR var_local_pMemoryUnmapInfo; + vku::safe_VkMemoryUnmapInfoKHR* local_pMemoryUnmapInfo = nullptr; + { + if (pMemoryUnmapInfo) { + local_pMemoryUnmapInfo = &var_local_pMemoryUnmapInfo; + local_pMemoryUnmapInfo->initialize(pMemoryUnmapInfo); + + if (pMemoryUnmapInfo->memory) { + local_pMemoryUnmapInfo->memory = Unwrap(pMemoryUnmapInfo->memory); + } + } + } + VkResult result = device_dispatch_table.UnmapMemory2KHR(device, (const VkMemoryUnmapInfoKHR*)local_pMemoryUnmapInfo); + + return result; +} + +VkResult DispatchObject::GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, + VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties) { + VkResult result = instance_dispatch_table.GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( + physicalDevice, pQualityLevelInfo, pQualityLevelProperties); + + return result; +} + +VkResult DispatchObject::GetEncodedVideoSessionParametersKHR( + VkDevice device, const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo, + VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, size_t* pDataSize, void* pData) { + if (!wrap_handles) + return device_dispatch_table.GetEncodedVideoSessionParametersKHR(device, pVideoSessionParametersInfo, pFeedbackInfo, + pDataSize, pData); + vku::safe_VkVideoEncodeSessionParametersGetInfoKHR var_local_pVideoSessionParametersInfo; + vku::safe_VkVideoEncodeSessionParametersGetInfoKHR* local_pVideoSessionParametersInfo = nullptr; + { + if (pVideoSessionParametersInfo) { + local_pVideoSessionParametersInfo = &var_local_pVideoSessionParametersInfo; + local_pVideoSessionParametersInfo->initialize(pVideoSessionParametersInfo); + + if (pVideoSessionParametersInfo->videoSessionParameters) { + local_pVideoSessionParametersInfo->videoSessionParameters = + Unwrap(pVideoSessionParametersInfo->videoSessionParameters); + } + } + } + VkResult result = device_dispatch_table.GetEncodedVideoSessionParametersKHR( + device, (const VkVideoEncodeSessionParametersGetInfoKHR*)local_pVideoSessionParametersInfo, pFeedbackInfo, pDataSize, + pData); + + return result; +} + +void DispatchObject::CmdEncodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo) { + if (!wrap_handles) return device_dispatch_table.CmdEncodeVideoKHR(commandBuffer, pEncodeInfo); + vku::safe_VkVideoEncodeInfoKHR var_local_pEncodeInfo; + vku::safe_VkVideoEncodeInfoKHR* local_pEncodeInfo = nullptr; + { + if (pEncodeInfo) { + local_pEncodeInfo = &var_local_pEncodeInfo; + local_pEncodeInfo->initialize(pEncodeInfo); + + if (pEncodeInfo->dstBuffer) { + local_pEncodeInfo->dstBuffer = Unwrap(pEncodeInfo->dstBuffer); + } + if (pEncodeInfo->srcPictureResource.imageViewBinding) { + local_pEncodeInfo->srcPictureResource.imageViewBinding = Unwrap(pEncodeInfo->srcPictureResource.imageViewBinding); + } + if (local_pEncodeInfo->pSetupReferenceSlot) { + if (local_pEncodeInfo->pSetupReferenceSlot->pPictureResource) { + if (pEncodeInfo->pSetupReferenceSlot->pPictureResource->imageViewBinding) { + local_pEncodeInfo->pSetupReferenceSlot->pPictureResource->imageViewBinding = + Unwrap(pEncodeInfo->pSetupReferenceSlot->pPictureResource->imageViewBinding); + } + } + } + if (local_pEncodeInfo->pReferenceSlots) { + for (uint32_t index1 = 0; index1 < local_pEncodeInfo->referenceSlotCount; ++index1) { + if (local_pEncodeInfo->pReferenceSlots[index1].pPictureResource) { + if (pEncodeInfo->pReferenceSlots[index1].pPictureResource->imageViewBinding) { + local_pEncodeInfo->pReferenceSlots[index1].pPictureResource->imageViewBinding = + Unwrap(pEncodeInfo->pReferenceSlots[index1].pPictureResource->imageViewBinding); + } + } + } + } + UnwrapPnextChainHandles(local_pEncodeInfo->pNext); + } + } + device_dispatch_table.CmdEncodeVideoKHR(commandBuffer, (const VkVideoEncodeInfoKHR*)local_pEncodeInfo); +} + +void DispatchObject::CmdSetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo) { + if (!wrap_handles) return device_dispatch_table.CmdSetEvent2KHR(commandBuffer, event, pDependencyInfo); + vku::safe_VkDependencyInfo var_local_pDependencyInfo; + vku::safe_VkDependencyInfo* local_pDependencyInfo = nullptr; + { + event = Unwrap(event); + if (pDependencyInfo) { + local_pDependencyInfo = &var_local_pDependencyInfo; + local_pDependencyInfo->initialize(pDependencyInfo); + if (local_pDependencyInfo->pBufferMemoryBarriers) { + for (uint32_t index1 = 0; index1 < local_pDependencyInfo->bufferMemoryBarrierCount; ++index1) { + if (pDependencyInfo->pBufferMemoryBarriers[index1].buffer) { + local_pDependencyInfo->pBufferMemoryBarriers[index1].buffer = + Unwrap(pDependencyInfo->pBufferMemoryBarriers[index1].buffer); + } + } + } + if (local_pDependencyInfo->pImageMemoryBarriers) { + for (uint32_t index1 = 0; index1 < local_pDependencyInfo->imageMemoryBarrierCount; ++index1) { + if (pDependencyInfo->pImageMemoryBarriers[index1].image) { + local_pDependencyInfo->pImageMemoryBarriers[index1].image = + Unwrap(pDependencyInfo->pImageMemoryBarriers[index1].image); + } + } + } + } + } + device_dispatch_table.CmdSetEvent2KHR(commandBuffer, event, (const VkDependencyInfo*)local_pDependencyInfo); +} + +void DispatchObject::CmdResetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask) { + if (!wrap_handles) return device_dispatch_table.CmdResetEvent2KHR(commandBuffer, event, stageMask); + { event = Unwrap(event); } + device_dispatch_table.CmdResetEvent2KHR(commandBuffer, event, stageMask); +} + +void DispatchObject::CmdWaitEvents2KHR(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, + const VkDependencyInfo* pDependencyInfos) { + if (!wrap_handles) return device_dispatch_table.CmdWaitEvents2KHR(commandBuffer, eventCount, pEvents, pDependencyInfos); + small_vector var_local_pEvents; + VkEvent* local_pEvents = nullptr; + small_vector var_local_pDependencyInfos; + vku::safe_VkDependencyInfo* local_pDependencyInfos = nullptr; + { + if (pEvents) { + var_local_pEvents.resize(eventCount); + local_pEvents = var_local_pEvents.data(); + for (uint32_t index0 = 0; index0 < eventCount; ++index0) { + local_pEvents[index0] = Unwrap(pEvents[index0]); + } + } + if (pDependencyInfos) { + var_local_pDependencyInfos.resize(eventCount); + local_pDependencyInfos = var_local_pDependencyInfos.data(); + for (uint32_t index0 = 0; index0 < eventCount; ++index0) { + local_pDependencyInfos[index0].initialize(&pDependencyInfos[index0]); + if (local_pDependencyInfos[index0].pBufferMemoryBarriers) { + for (uint32_t index1 = 0; index1 < local_pDependencyInfos[index0].bufferMemoryBarrierCount; ++index1) { + if (pDependencyInfos[index0].pBufferMemoryBarriers[index1].buffer) { + local_pDependencyInfos[index0].pBufferMemoryBarriers[index1].buffer = + Unwrap(pDependencyInfos[index0].pBufferMemoryBarriers[index1].buffer); + } + } + } + if (local_pDependencyInfos[index0].pImageMemoryBarriers) { + for (uint32_t index1 = 0; index1 < local_pDependencyInfos[index0].imageMemoryBarrierCount; ++index1) { + if (pDependencyInfos[index0].pImageMemoryBarriers[index1].image) { + local_pDependencyInfos[index0].pImageMemoryBarriers[index1].image = + Unwrap(pDependencyInfos[index0].pImageMemoryBarriers[index1].image); + } + } + } + } + } + } + device_dispatch_table.CmdWaitEvents2KHR(commandBuffer, eventCount, (const VkEvent*)local_pEvents, + (const VkDependencyInfo*)local_pDependencyInfos); +} + +void DispatchObject::CmdPipelineBarrier2KHR(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo) { + if (!wrap_handles) return device_dispatch_table.CmdPipelineBarrier2KHR(commandBuffer, pDependencyInfo); + vku::safe_VkDependencyInfo var_local_pDependencyInfo; + vku::safe_VkDependencyInfo* local_pDependencyInfo = nullptr; + { + if (pDependencyInfo) { + local_pDependencyInfo = &var_local_pDependencyInfo; + local_pDependencyInfo->initialize(pDependencyInfo); + if (local_pDependencyInfo->pBufferMemoryBarriers) { + for (uint32_t index1 = 0; index1 < local_pDependencyInfo->bufferMemoryBarrierCount; ++index1) { + if (pDependencyInfo->pBufferMemoryBarriers[index1].buffer) { + local_pDependencyInfo->pBufferMemoryBarriers[index1].buffer = + Unwrap(pDependencyInfo->pBufferMemoryBarriers[index1].buffer); + } + } + } + if (local_pDependencyInfo->pImageMemoryBarriers) { + for (uint32_t index1 = 0; index1 < local_pDependencyInfo->imageMemoryBarrierCount; ++index1) { + if (pDependencyInfo->pImageMemoryBarriers[index1].image) { + local_pDependencyInfo->pImageMemoryBarriers[index1].image = + Unwrap(pDependencyInfo->pImageMemoryBarriers[index1].image); + } + } + } + } + } + device_dispatch_table.CmdPipelineBarrier2KHR(commandBuffer, (const VkDependencyInfo*)local_pDependencyInfo); +} + +void DispatchObject::CmdWriteTimestamp2KHR(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, + uint32_t query) { + if (!wrap_handles) return device_dispatch_table.CmdWriteTimestamp2KHR(commandBuffer, stage, queryPool, query); + { queryPool = Unwrap(queryPool); } + device_dispatch_table.CmdWriteTimestamp2KHR(commandBuffer, stage, queryPool, query); +} + +VkResult DispatchObject::QueueSubmit2KHR(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence) { + if (!wrap_handles) return device_dispatch_table.QueueSubmit2KHR(queue, submitCount, pSubmits, fence); + small_vector var_local_pSubmits; + vku::safe_VkSubmitInfo2* local_pSubmits = nullptr; + { + if (pSubmits) { + var_local_pSubmits.resize(submitCount); + local_pSubmits = var_local_pSubmits.data(); + for (uint32_t index0 = 0; index0 < submitCount; ++index0) { + local_pSubmits[index0].initialize(&pSubmits[index0]); + UnwrapPnextChainHandles(local_pSubmits[index0].pNext); + if (local_pSubmits[index0].pWaitSemaphoreInfos) { + for (uint32_t index1 = 0; index1 < local_pSubmits[index0].waitSemaphoreInfoCount; ++index1) { + if (pSubmits[index0].pWaitSemaphoreInfos[index1].semaphore) { + local_pSubmits[index0].pWaitSemaphoreInfos[index1].semaphore = + Unwrap(pSubmits[index0].pWaitSemaphoreInfos[index1].semaphore); + } + } + } + if (local_pSubmits[index0].pCommandBufferInfos) { + for (uint32_t index1 = 0; index1 < local_pSubmits[index0].commandBufferInfoCount; ++index1) { + UnwrapPnextChainHandles(local_pSubmits[index0].pCommandBufferInfos[index1].pNext); + } + } + if (local_pSubmits[index0].pSignalSemaphoreInfos) { + for (uint32_t index1 = 0; index1 < local_pSubmits[index0].signalSemaphoreInfoCount; ++index1) { + if (pSubmits[index0].pSignalSemaphoreInfos[index1].semaphore) { + local_pSubmits[index0].pSignalSemaphoreInfos[index1].semaphore = + Unwrap(pSubmits[index0].pSignalSemaphoreInfos[index1].semaphore); + } + } + } + } + } + fence = Unwrap(fence); + } + VkResult result = device_dispatch_table.QueueSubmit2KHR(queue, submitCount, (const VkSubmitInfo2*)local_pSubmits, fence); + + return result; +} + +void DispatchObject::CmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) { + if (!wrap_handles) return device_dispatch_table.CmdCopyBuffer2KHR(commandBuffer, pCopyBufferInfo); + vku::safe_VkCopyBufferInfo2 var_local_pCopyBufferInfo; + vku::safe_VkCopyBufferInfo2* local_pCopyBufferInfo = nullptr; + { + if (pCopyBufferInfo) { + local_pCopyBufferInfo = &var_local_pCopyBufferInfo; + local_pCopyBufferInfo->initialize(pCopyBufferInfo); + + if (pCopyBufferInfo->srcBuffer) { + local_pCopyBufferInfo->srcBuffer = Unwrap(pCopyBufferInfo->srcBuffer); + } + if (pCopyBufferInfo->dstBuffer) { + local_pCopyBufferInfo->dstBuffer = Unwrap(pCopyBufferInfo->dstBuffer); + } + } + } + device_dispatch_table.CmdCopyBuffer2KHR(commandBuffer, (const VkCopyBufferInfo2*)local_pCopyBufferInfo); +} + +void DispatchObject::CmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo) { + if (!wrap_handles) return device_dispatch_table.CmdCopyImage2KHR(commandBuffer, pCopyImageInfo); + vku::safe_VkCopyImageInfo2 var_local_pCopyImageInfo; + vku::safe_VkCopyImageInfo2* local_pCopyImageInfo = nullptr; + { + if (pCopyImageInfo) { + local_pCopyImageInfo = &var_local_pCopyImageInfo; + local_pCopyImageInfo->initialize(pCopyImageInfo); + + if (pCopyImageInfo->srcImage) { + local_pCopyImageInfo->srcImage = Unwrap(pCopyImageInfo->srcImage); + } + if (pCopyImageInfo->dstImage) { + local_pCopyImageInfo->dstImage = Unwrap(pCopyImageInfo->dstImage); + } + } + } + device_dispatch_table.CmdCopyImage2KHR(commandBuffer, (const VkCopyImageInfo2*)local_pCopyImageInfo); +} + +void DispatchObject::CmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffer, + const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) { + if (!wrap_handles) return device_dispatch_table.CmdCopyBufferToImage2KHR(commandBuffer, pCopyBufferToImageInfo); + vku::safe_VkCopyBufferToImageInfo2 var_local_pCopyBufferToImageInfo; + vku::safe_VkCopyBufferToImageInfo2* local_pCopyBufferToImageInfo = nullptr; + { + if (pCopyBufferToImageInfo) { + local_pCopyBufferToImageInfo = &var_local_pCopyBufferToImageInfo; + local_pCopyBufferToImageInfo->initialize(pCopyBufferToImageInfo); + + if (pCopyBufferToImageInfo->srcBuffer) { + local_pCopyBufferToImageInfo->srcBuffer = Unwrap(pCopyBufferToImageInfo->srcBuffer); + } + if (pCopyBufferToImageInfo->dstImage) { + local_pCopyBufferToImageInfo->dstImage = Unwrap(pCopyBufferToImageInfo->dstImage); + } + } + } + device_dispatch_table.CmdCopyBufferToImage2KHR(commandBuffer, (const VkCopyBufferToImageInfo2*)local_pCopyBufferToImageInfo); +} + +void DispatchObject::CmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffer, + const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) { + if (!wrap_handles) return device_dispatch_table.CmdCopyImageToBuffer2KHR(commandBuffer, pCopyImageToBufferInfo); + vku::safe_VkCopyImageToBufferInfo2 var_local_pCopyImageToBufferInfo; + vku::safe_VkCopyImageToBufferInfo2* local_pCopyImageToBufferInfo = nullptr; + { + if (pCopyImageToBufferInfo) { + local_pCopyImageToBufferInfo = &var_local_pCopyImageToBufferInfo; + local_pCopyImageToBufferInfo->initialize(pCopyImageToBufferInfo); + + if (pCopyImageToBufferInfo->srcImage) { + local_pCopyImageToBufferInfo->srcImage = Unwrap(pCopyImageToBufferInfo->srcImage); + } + if (pCopyImageToBufferInfo->dstBuffer) { + local_pCopyImageToBufferInfo->dstBuffer = Unwrap(pCopyImageToBufferInfo->dstBuffer); + } + } + } + device_dispatch_table.CmdCopyImageToBuffer2KHR(commandBuffer, (const VkCopyImageToBufferInfo2*)local_pCopyImageToBufferInfo); +} + +void DispatchObject::CmdBlitImage2KHR(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo) { + if (!wrap_handles) return device_dispatch_table.CmdBlitImage2KHR(commandBuffer, pBlitImageInfo); + vku::safe_VkBlitImageInfo2 var_local_pBlitImageInfo; + vku::safe_VkBlitImageInfo2* local_pBlitImageInfo = nullptr; + { + if (pBlitImageInfo) { + local_pBlitImageInfo = &var_local_pBlitImageInfo; + local_pBlitImageInfo->initialize(pBlitImageInfo); + + if (pBlitImageInfo->srcImage) { + local_pBlitImageInfo->srcImage = Unwrap(pBlitImageInfo->srcImage); + } + if (pBlitImageInfo->dstImage) { + local_pBlitImageInfo->dstImage = Unwrap(pBlitImageInfo->dstImage); + } + } + } + device_dispatch_table.CmdBlitImage2KHR(commandBuffer, (const VkBlitImageInfo2*)local_pBlitImageInfo); +} + +void DispatchObject::CmdResolveImage2KHR(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo) { + if (!wrap_handles) return device_dispatch_table.CmdResolveImage2KHR(commandBuffer, pResolveImageInfo); + vku::safe_VkResolveImageInfo2 var_local_pResolveImageInfo; + vku::safe_VkResolveImageInfo2* local_pResolveImageInfo = nullptr; + { + if (pResolveImageInfo) { + local_pResolveImageInfo = &var_local_pResolveImageInfo; + local_pResolveImageInfo->initialize(pResolveImageInfo); + + if (pResolveImageInfo->srcImage) { + local_pResolveImageInfo->srcImage = Unwrap(pResolveImageInfo->srcImage); + } + if (pResolveImageInfo->dstImage) { + local_pResolveImageInfo->dstImage = Unwrap(pResolveImageInfo->dstImage); + } + } + } + device_dispatch_table.CmdResolveImage2KHR(commandBuffer, (const VkResolveImageInfo2*)local_pResolveImageInfo); +} + +void DispatchObject::CmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress) { + device_dispatch_table.CmdTraceRaysIndirect2KHR(commandBuffer, indirectDeviceAddress); +} + +void DispatchObject::GetDeviceBufferMemoryRequirementsKHR(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements) { + device_dispatch_table.GetDeviceBufferMemoryRequirementsKHR(device, pInfo, pMemoryRequirements); +} + +void DispatchObject::GetDeviceImageMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements) { + device_dispatch_table.GetDeviceImageMemoryRequirementsKHR(device, pInfo, pMemoryRequirements); +} + +void DispatchObject::GetDeviceImageSparseMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { + device_dispatch_table.GetDeviceImageSparseMemoryRequirementsKHR(device, pInfo, pSparseMemoryRequirementCount, + pSparseMemoryRequirements); +} + +void DispatchObject::CmdBindIndexBuffer2KHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkDeviceSize size, + VkIndexType indexType) { + if (!wrap_handles) return device_dispatch_table.CmdBindIndexBuffer2KHR(commandBuffer, buffer, offset, size, indexType); + { buffer = Unwrap(buffer); } + device_dispatch_table.CmdBindIndexBuffer2KHR(commandBuffer, buffer, offset, size, indexType); +} + +void DispatchObject::GetRenderingAreaGranularityKHR(VkDevice device, const VkRenderingAreaInfoKHR* pRenderingAreaInfo, + VkExtent2D* pGranularity) { + device_dispatch_table.GetRenderingAreaGranularityKHR(device, pRenderingAreaInfo, pGranularity); +} + +void DispatchObject::GetDeviceImageSubresourceLayoutKHR(VkDevice device, const VkDeviceImageSubresourceInfoKHR* pInfo, + VkSubresourceLayout2KHR* pLayout) { + device_dispatch_table.GetDeviceImageSubresourceLayoutKHR(device, pInfo, pLayout); +} + +void DispatchObject::GetImageSubresourceLayout2KHR(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, + VkSubresourceLayout2KHR* pLayout) { + if (!wrap_handles) return device_dispatch_table.GetImageSubresourceLayout2KHR(device, image, pSubresource, pLayout); + { image = Unwrap(image); } + device_dispatch_table.GetImageSubresourceLayout2KHR(device, image, pSubresource, pLayout); +} + +void DispatchObject::DestroyPipelineBinaryKHR(VkDevice device, VkPipelineBinaryKHR pipelineBinary, + const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyPipelineBinaryKHR(device, pipelineBinary, pAllocator); + + uint64_t pipelineBinary_id = CastToUint64(pipelineBinary); + auto iter = unique_id_mapping.pop(pipelineBinary_id); + if (iter != unique_id_mapping.end()) { + pipelineBinary = (VkPipelineBinaryKHR)iter->second; + } else { + pipelineBinary = (VkPipelineBinaryKHR)0; + } + device_dispatch_table.DestroyPipelineBinaryKHR(device, pipelineBinary, pAllocator); +} + +VkResult DispatchObject::GetPipelineBinaryDataKHR(VkDevice device, const VkPipelineBinaryDataInfoKHR* pInfo, + VkPipelineBinaryKeyKHR* pPipelineBinaryKey, size_t* pPipelineBinaryDataSize, + void* pPipelineBinaryData) { + if (!wrap_handles) + return device_dispatch_table.GetPipelineBinaryDataKHR(device, pInfo, pPipelineBinaryKey, pPipelineBinaryDataSize, + pPipelineBinaryData); + vku::safe_VkPipelineBinaryDataInfoKHR var_local_pInfo; + vku::safe_VkPipelineBinaryDataInfoKHR* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->pipelineBinary) { + local_pInfo->pipelineBinary = Unwrap(pInfo->pipelineBinary); + } + } + } + VkResult result = device_dispatch_table.GetPipelineBinaryDataKHR( + device, (const VkPipelineBinaryDataInfoKHR*)local_pInfo, pPipelineBinaryKey, pPipelineBinaryDataSize, pPipelineBinaryData); + + return result; +} + +VkResult DispatchObject::ReleaseCapturedPipelineDataKHR(VkDevice device, const VkReleaseCapturedPipelineDataInfoKHR* pInfo, + const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.ReleaseCapturedPipelineDataKHR(device, pInfo, pAllocator); + vku::safe_VkReleaseCapturedPipelineDataInfoKHR var_local_pInfo; + vku::safe_VkReleaseCapturedPipelineDataInfoKHR* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->pipeline) { + local_pInfo->pipeline = Unwrap(pInfo->pipeline); + } + } + } + VkResult result = device_dispatch_table.ReleaseCapturedPipelineDataKHR( + device, (const VkReleaseCapturedPipelineDataInfoKHR*)local_pInfo, pAllocator); + + return result; +} + +VkResult DispatchObject::GetPhysicalDeviceCooperativeMatrixPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkCooperativeMatrixPropertiesKHR* pProperties) { + VkResult result = + instance_dispatch_table.GetPhysicalDeviceCooperativeMatrixPropertiesKHR(physicalDevice, pPropertyCount, pProperties); + + return result; +} + +void DispatchObject::CmdSetLineStippleKHR(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern) { + device_dispatch_table.CmdSetLineStippleKHR(commandBuffer, lineStippleFactor, lineStipplePattern); +} + +VkResult DispatchObject::GetPhysicalDeviceCalibrateableTimeDomainsKHR(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, + VkTimeDomainKHR* pTimeDomains) { + VkResult result = + instance_dispatch_table.GetPhysicalDeviceCalibrateableTimeDomainsKHR(physicalDevice, pTimeDomainCount, pTimeDomains); + + return result; +} + +VkResult DispatchObject::GetCalibratedTimestampsKHR(VkDevice device, uint32_t timestampCount, + const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, + uint64_t* pMaxDeviation) { + VkResult result = + device_dispatch_table.GetCalibratedTimestampsKHR(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation); + + return result; +} + +void DispatchObject::CmdBindDescriptorSets2KHR(VkCommandBuffer commandBuffer, + const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo) { + if (!wrap_handles) return device_dispatch_table.CmdBindDescriptorSets2KHR(commandBuffer, pBindDescriptorSetsInfo); + vku::safe_VkBindDescriptorSetsInfoKHR var_local_pBindDescriptorSetsInfo; + vku::safe_VkBindDescriptorSetsInfoKHR* local_pBindDescriptorSetsInfo = nullptr; + { + if (pBindDescriptorSetsInfo) { + local_pBindDescriptorSetsInfo = &var_local_pBindDescriptorSetsInfo; + local_pBindDescriptorSetsInfo->initialize(pBindDescriptorSetsInfo); + + if (pBindDescriptorSetsInfo->layout) { + local_pBindDescriptorSetsInfo->layout = Unwrap(pBindDescriptorSetsInfo->layout); + } + if (local_pBindDescriptorSetsInfo->pDescriptorSets) { + for (uint32_t index1 = 0; index1 < local_pBindDescriptorSetsInfo->descriptorSetCount; ++index1) { + local_pBindDescriptorSetsInfo->pDescriptorSets[index1] = + Unwrap(local_pBindDescriptorSetsInfo->pDescriptorSets[index1]); + } + } + UnwrapPnextChainHandles(local_pBindDescriptorSetsInfo->pNext); + } + } + device_dispatch_table.CmdBindDescriptorSets2KHR(commandBuffer, + (const VkBindDescriptorSetsInfoKHR*)local_pBindDescriptorSetsInfo); +} + +void DispatchObject::CmdPushConstants2KHR(VkCommandBuffer commandBuffer, const VkPushConstantsInfoKHR* pPushConstantsInfo) { + if (!wrap_handles) return device_dispatch_table.CmdPushConstants2KHR(commandBuffer, pPushConstantsInfo); + vku::safe_VkPushConstantsInfoKHR var_local_pPushConstantsInfo; + vku::safe_VkPushConstantsInfoKHR* local_pPushConstantsInfo = nullptr; + { + if (pPushConstantsInfo) { + local_pPushConstantsInfo = &var_local_pPushConstantsInfo; + local_pPushConstantsInfo->initialize(pPushConstantsInfo); + + if (pPushConstantsInfo->layout) { + local_pPushConstantsInfo->layout = Unwrap(pPushConstantsInfo->layout); + } + UnwrapPnextChainHandles(local_pPushConstantsInfo->pNext); + } + } + device_dispatch_table.CmdPushConstants2KHR(commandBuffer, (const VkPushConstantsInfoKHR*)local_pPushConstantsInfo); +} + +void DispatchObject::CmdPushDescriptorSet2KHR(VkCommandBuffer commandBuffer, + const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo) { + if (!wrap_handles) return device_dispatch_table.CmdPushDescriptorSet2KHR(commandBuffer, pPushDescriptorSetInfo); + vku::safe_VkPushDescriptorSetInfoKHR var_local_pPushDescriptorSetInfo; + vku::safe_VkPushDescriptorSetInfoKHR* local_pPushDescriptorSetInfo = nullptr; + { + if (pPushDescriptorSetInfo) { + local_pPushDescriptorSetInfo = &var_local_pPushDescriptorSetInfo; + local_pPushDescriptorSetInfo->initialize(pPushDescriptorSetInfo); + + if (pPushDescriptorSetInfo->layout) { + local_pPushDescriptorSetInfo->layout = Unwrap(pPushDescriptorSetInfo->layout); + } + if (local_pPushDescriptorSetInfo->pDescriptorWrites) { + for (uint32_t index1 = 0; index1 < local_pPushDescriptorSetInfo->descriptorWriteCount; ++index1) { + UnwrapPnextChainHandles(local_pPushDescriptorSetInfo->pDescriptorWrites[index1].pNext); + + if (pPushDescriptorSetInfo->pDescriptorWrites[index1].dstSet) { + local_pPushDescriptorSetInfo->pDescriptorWrites[index1].dstSet = + Unwrap(pPushDescriptorSetInfo->pDescriptorWrites[index1].dstSet); + } + if (local_pPushDescriptorSetInfo->pDescriptorWrites[index1].pImageInfo) { + for (uint32_t index2 = 0; index2 < local_pPushDescriptorSetInfo->pDescriptorWrites[index1].descriptorCount; + ++index2) { + if (pPushDescriptorSetInfo->pDescriptorWrites[index1].pImageInfo[index2].sampler) { + local_pPushDescriptorSetInfo->pDescriptorWrites[index1].pImageInfo[index2].sampler = + Unwrap(pPushDescriptorSetInfo->pDescriptorWrites[index1].pImageInfo[index2].sampler); + } + if (pPushDescriptorSetInfo->pDescriptorWrites[index1].pImageInfo[index2].imageView) { + local_pPushDescriptorSetInfo->pDescriptorWrites[index1].pImageInfo[index2].imageView = + Unwrap(pPushDescriptorSetInfo->pDescriptorWrites[index1].pImageInfo[index2].imageView); + } + } + } + if (local_pPushDescriptorSetInfo->pDescriptorWrites[index1].pBufferInfo) { + for (uint32_t index2 = 0; index2 < local_pPushDescriptorSetInfo->pDescriptorWrites[index1].descriptorCount; + ++index2) { + if (pPushDescriptorSetInfo->pDescriptorWrites[index1].pBufferInfo[index2].buffer) { + local_pPushDescriptorSetInfo->pDescriptorWrites[index1].pBufferInfo[index2].buffer = + Unwrap(pPushDescriptorSetInfo->pDescriptorWrites[index1].pBufferInfo[index2].buffer); + } + } + } + if (local_pPushDescriptorSetInfo->pDescriptorWrites[index1].pTexelBufferView) { + for (uint32_t index2 = 0; index2 < local_pPushDescriptorSetInfo->pDescriptorWrites[index1].descriptorCount; + ++index2) { + local_pPushDescriptorSetInfo->pDescriptorWrites[index1].pTexelBufferView[index2] = + Unwrap(local_pPushDescriptorSetInfo->pDescriptorWrites[index1].pTexelBufferView[index2]); + } + } + } + } + UnwrapPnextChainHandles(local_pPushDescriptorSetInfo->pNext); + } + } + device_dispatch_table.CmdPushDescriptorSet2KHR(commandBuffer, (const VkPushDescriptorSetInfoKHR*)local_pPushDescriptorSetInfo); +} + +void DispatchObject::CmdSetDescriptorBufferOffsets2EXT(VkCommandBuffer commandBuffer, + const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo) { + if (!wrap_handles) + return device_dispatch_table.CmdSetDescriptorBufferOffsets2EXT(commandBuffer, pSetDescriptorBufferOffsetsInfo); + vku::safe_VkSetDescriptorBufferOffsetsInfoEXT var_local_pSetDescriptorBufferOffsetsInfo; + vku::safe_VkSetDescriptorBufferOffsetsInfoEXT* local_pSetDescriptorBufferOffsetsInfo = nullptr; + { + if (pSetDescriptorBufferOffsetsInfo) { + local_pSetDescriptorBufferOffsetsInfo = &var_local_pSetDescriptorBufferOffsetsInfo; + local_pSetDescriptorBufferOffsetsInfo->initialize(pSetDescriptorBufferOffsetsInfo); + + if (pSetDescriptorBufferOffsetsInfo->layout) { + local_pSetDescriptorBufferOffsetsInfo->layout = Unwrap(pSetDescriptorBufferOffsetsInfo->layout); + } + UnwrapPnextChainHandles(local_pSetDescriptorBufferOffsetsInfo->pNext); + } + } + device_dispatch_table.CmdSetDescriptorBufferOffsets2EXT( + commandBuffer, (const VkSetDescriptorBufferOffsetsInfoEXT*)local_pSetDescriptorBufferOffsetsInfo); +} + +void DispatchObject::CmdBindDescriptorBufferEmbeddedSamplers2EXT( + VkCommandBuffer commandBuffer, const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo) { + if (!wrap_handles) + return device_dispatch_table.CmdBindDescriptorBufferEmbeddedSamplers2EXT(commandBuffer, + pBindDescriptorBufferEmbeddedSamplersInfo); + vku::safe_VkBindDescriptorBufferEmbeddedSamplersInfoEXT var_local_pBindDescriptorBufferEmbeddedSamplersInfo; + vku::safe_VkBindDescriptorBufferEmbeddedSamplersInfoEXT* local_pBindDescriptorBufferEmbeddedSamplersInfo = nullptr; + { + if (pBindDescriptorBufferEmbeddedSamplersInfo) { + local_pBindDescriptorBufferEmbeddedSamplersInfo = &var_local_pBindDescriptorBufferEmbeddedSamplersInfo; + local_pBindDescriptorBufferEmbeddedSamplersInfo->initialize(pBindDescriptorBufferEmbeddedSamplersInfo); + + if (pBindDescriptorBufferEmbeddedSamplersInfo->layout) { + local_pBindDescriptorBufferEmbeddedSamplersInfo->layout = Unwrap(pBindDescriptorBufferEmbeddedSamplersInfo->layout); + } + UnwrapPnextChainHandles(local_pBindDescriptorBufferEmbeddedSamplersInfo->pNext); + } + } + device_dispatch_table.CmdBindDescriptorBufferEmbeddedSamplers2EXT( + commandBuffer, (const VkBindDescriptorBufferEmbeddedSamplersInfoEXT*)local_pBindDescriptorBufferEmbeddedSamplersInfo); +} + +VkResult DispatchObject::CreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDebugReportCallbackEXT* pCallback) { + if (!wrap_handles) return instance_dispatch_table.CreateDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, pCallback); + + VkResult result = instance_dispatch_table.CreateDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, pCallback); + if (VK_SUCCESS == result) { + *pCallback = WrapNew(*pCallback); + } + return result; +} + +void DispatchObject::DestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT callback, + const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return instance_dispatch_table.DestroyDebugReportCallbackEXT(instance, callback, pAllocator); + + uint64_t callback_id = CastToUint64(callback); + auto iter = unique_id_mapping.pop(callback_id); + if (iter != unique_id_mapping.end()) { + callback = (VkDebugReportCallbackEXT)iter->second; + } else { + callback = (VkDebugReportCallbackEXT)0; + } + instance_dispatch_table.DestroyDebugReportCallbackEXT(instance, callback, pAllocator); +} + +void DispatchObject::DebugReportMessageEXT(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, + uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, + const char* pMessage) { + instance_dispatch_table.DebugReportMessageEXT(instance, flags, objectType, object, location, messageCode, pLayerPrefix, + pMessage); +} + +void DispatchObject::CmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { + device_dispatch_table.CmdDebugMarkerBeginEXT(commandBuffer, pMarkerInfo); +} + +void DispatchObject::CmdDebugMarkerEndEXT(VkCommandBuffer commandBuffer) { + device_dispatch_table.CmdDebugMarkerEndEXT(commandBuffer); +} + +void DispatchObject::CmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { + device_dispatch_table.CmdDebugMarkerInsertEXT(commandBuffer, pMarkerInfo); +} + +void DispatchObject::CmdBindTransformFeedbackBuffersEXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, + const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, + const VkDeviceSize* pSizes) { + if (!wrap_handles) + return device_dispatch_table.CmdBindTransformFeedbackBuffersEXT(commandBuffer, firstBinding, bindingCount, pBuffers, + pOffsets, pSizes); + small_vector var_local_pBuffers; + VkBuffer* local_pBuffers = nullptr; + { + if (pBuffers) { + var_local_pBuffers.resize(bindingCount); + local_pBuffers = var_local_pBuffers.data(); + for (uint32_t index0 = 0; index0 < bindingCount; ++index0) { + local_pBuffers[index0] = Unwrap(pBuffers[index0]); + } + } + } + device_dispatch_table.CmdBindTransformFeedbackBuffersEXT(commandBuffer, firstBinding, bindingCount, + (const VkBuffer*)local_pBuffers, pOffsets, pSizes); +} + +void DispatchObject::CmdBeginTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, + uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, + const VkDeviceSize* pCounterBufferOffsets) { + if (!wrap_handles) + return device_dispatch_table.CmdBeginTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, + pCounterBuffers, pCounterBufferOffsets); + small_vector var_local_pCounterBuffers; + VkBuffer* local_pCounterBuffers = nullptr; + { + if (pCounterBuffers) { + var_local_pCounterBuffers.resize(counterBufferCount); + local_pCounterBuffers = var_local_pCounterBuffers.data(); + for (uint32_t index0 = 0; index0 < counterBufferCount; ++index0) { + local_pCounterBuffers[index0] = Unwrap(pCounterBuffers[index0]); + } + } + } + device_dispatch_table.CmdBeginTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, + (const VkBuffer*)local_pCounterBuffers, pCounterBufferOffsets); +} + +void DispatchObject::CmdEndTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, + uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, + const VkDeviceSize* pCounterBufferOffsets) { + if (!wrap_handles) + return device_dispatch_table.CmdEndTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, + pCounterBuffers, pCounterBufferOffsets); + small_vector var_local_pCounterBuffers; + VkBuffer* local_pCounterBuffers = nullptr; + { + if (pCounterBuffers) { + var_local_pCounterBuffers.resize(counterBufferCount); + local_pCounterBuffers = var_local_pCounterBuffers.data(); + for (uint32_t index0 = 0; index0 < counterBufferCount; ++index0) { + local_pCounterBuffers[index0] = Unwrap(pCounterBuffers[index0]); + } + } + } + device_dispatch_table.CmdEndTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, + (const VkBuffer*)local_pCounterBuffers, pCounterBufferOffsets); +} + +void DispatchObject::CmdBeginQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, + VkQueryControlFlags flags, uint32_t index) { + if (!wrap_handles) return device_dispatch_table.CmdBeginQueryIndexedEXT(commandBuffer, queryPool, query, flags, index); + { queryPool = Unwrap(queryPool); } + device_dispatch_table.CmdBeginQueryIndexedEXT(commandBuffer, queryPool, query, flags, index); +} + +void DispatchObject::CmdEndQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index) { + if (!wrap_handles) return device_dispatch_table.CmdEndQueryIndexedEXT(commandBuffer, queryPool, query, index); + { queryPool = Unwrap(queryPool); } + device_dispatch_table.CmdEndQueryIndexedEXT(commandBuffer, queryPool, query, index); +} + +void DispatchObject::CmdDrawIndirectByteCountEXT(VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, + VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, + uint32_t vertexStride) { + if (!wrap_handles) + return device_dispatch_table.CmdDrawIndirectByteCountEXT(commandBuffer, instanceCount, firstInstance, counterBuffer, + counterBufferOffset, counterOffset, vertexStride); + { counterBuffer = Unwrap(counterBuffer); } + device_dispatch_table.CmdDrawIndirectByteCountEXT(commandBuffer, instanceCount, firstInstance, counterBuffer, + counterBufferOffset, counterOffset, vertexStride); +} + +VkResult DispatchObject::CreateCuModuleNVX(VkDevice device, const VkCuModuleCreateInfoNVX* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCuModuleNVX* pModule) { + if (!wrap_handles) return device_dispatch_table.CreateCuModuleNVX(device, pCreateInfo, pAllocator, pModule); + + VkResult result = device_dispatch_table.CreateCuModuleNVX(device, pCreateInfo, pAllocator, pModule); + if (VK_SUCCESS == result) { + *pModule = WrapNew(*pModule); + } + return result; +} + +VkResult DispatchObject::CreateCuFunctionNVX(VkDevice device, const VkCuFunctionCreateInfoNVX* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCuFunctionNVX* pFunction) { + if (!wrap_handles) return device_dispatch_table.CreateCuFunctionNVX(device, pCreateInfo, pAllocator, pFunction); + vku::safe_VkCuFunctionCreateInfoNVX var_local_pCreateInfo; + vku::safe_VkCuFunctionCreateInfoNVX* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + + if (pCreateInfo->module) { + local_pCreateInfo->module = Unwrap(pCreateInfo->module); + } + } + } + VkResult result = device_dispatch_table.CreateCuFunctionNVX(device, (const VkCuFunctionCreateInfoNVX*)local_pCreateInfo, + pAllocator, pFunction); + if (VK_SUCCESS == result) { + *pFunction = WrapNew(*pFunction); + } + return result; +} + +void DispatchObject::DestroyCuModuleNVX(VkDevice device, VkCuModuleNVX module, const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyCuModuleNVX(device, module, pAllocator); + + uint64_t module_id = CastToUint64(module); + auto iter = unique_id_mapping.pop(module_id); + if (iter != unique_id_mapping.end()) { + module = (VkCuModuleNVX)iter->second; + } else { + module = (VkCuModuleNVX)0; + } + device_dispatch_table.DestroyCuModuleNVX(device, module, pAllocator); +} + +void DispatchObject::DestroyCuFunctionNVX(VkDevice device, VkCuFunctionNVX function, const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyCuFunctionNVX(device, function, pAllocator); + + uint64_t function_id = CastToUint64(function); + auto iter = unique_id_mapping.pop(function_id); + if (iter != unique_id_mapping.end()) { + function = (VkCuFunctionNVX)iter->second; + } else { + function = (VkCuFunctionNVX)0; + } + device_dispatch_table.DestroyCuFunctionNVX(device, function, pAllocator); +} + +void DispatchObject::CmdCuLaunchKernelNVX(VkCommandBuffer commandBuffer, const VkCuLaunchInfoNVX* pLaunchInfo) { + if (!wrap_handles) return device_dispatch_table.CmdCuLaunchKernelNVX(commandBuffer, pLaunchInfo); + vku::safe_VkCuLaunchInfoNVX var_local_pLaunchInfo; + vku::safe_VkCuLaunchInfoNVX* local_pLaunchInfo = nullptr; + { + if (pLaunchInfo) { + local_pLaunchInfo = &var_local_pLaunchInfo; + local_pLaunchInfo->initialize(pLaunchInfo); + + if (pLaunchInfo->function) { + local_pLaunchInfo->function = Unwrap(pLaunchInfo->function); + } + } + } + device_dispatch_table.CmdCuLaunchKernelNVX(commandBuffer, (const VkCuLaunchInfoNVX*)local_pLaunchInfo); +} + +uint32_t DispatchObject::GetImageViewHandleNVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo) { + if (!wrap_handles) return device_dispatch_table.GetImageViewHandleNVX(device, pInfo); + vku::safe_VkImageViewHandleInfoNVX var_local_pInfo; + vku::safe_VkImageViewHandleInfoNVX* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->imageView) { + local_pInfo->imageView = Unwrap(pInfo->imageView); + } + if (pInfo->sampler) { + local_pInfo->sampler = Unwrap(pInfo->sampler); + } + } + } + uint32_t result = device_dispatch_table.GetImageViewHandleNVX(device, (const VkImageViewHandleInfoNVX*)local_pInfo); + + return result; +} + +uint64_t DispatchObject::GetImageViewHandle64NVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo) { + if (!wrap_handles) return device_dispatch_table.GetImageViewHandle64NVX(device, pInfo); + vku::safe_VkImageViewHandleInfoNVX var_local_pInfo; + vku::safe_VkImageViewHandleInfoNVX* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->imageView) { + local_pInfo->imageView = Unwrap(pInfo->imageView); + } + if (pInfo->sampler) { + local_pInfo->sampler = Unwrap(pInfo->sampler); + } + } + } + uint64_t result = device_dispatch_table.GetImageViewHandle64NVX(device, (const VkImageViewHandleInfoNVX*)local_pInfo); + + return result; +} + +VkResult DispatchObject::GetImageViewAddressNVX(VkDevice device, VkImageView imageView, + VkImageViewAddressPropertiesNVX* pProperties) { + if (!wrap_handles) return device_dispatch_table.GetImageViewAddressNVX(device, imageView, pProperties); + { imageView = Unwrap(imageView); } + VkResult result = device_dispatch_table.GetImageViewAddressNVX(device, imageView, pProperties); + + return result; +} + +void DispatchObject::CmdDrawIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride) { + if (!wrap_handles) + return device_dispatch_table.CmdDrawIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride); + { + buffer = Unwrap(buffer); + countBuffer = Unwrap(countBuffer); + } + device_dispatch_table.CmdDrawIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, maxDrawCount, + stride); +} + +void DispatchObject::CmdDrawIndexedIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride) { + if (!wrap_handles) + return device_dispatch_table.CmdDrawIndexedIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride); + { + buffer = Unwrap(buffer); + countBuffer = Unwrap(countBuffer); + } + device_dispatch_table.CmdDrawIndexedIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride); +} + +VkResult DispatchObject::GetShaderInfoAMD(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, + VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo) { + if (!wrap_handles) return device_dispatch_table.GetShaderInfoAMD(device, pipeline, shaderStage, infoType, pInfoSize, pInfo); + { pipeline = Unwrap(pipeline); } + VkResult result = device_dispatch_table.GetShaderInfoAMD(device, pipeline, shaderStage, infoType, pInfoSize, pInfo); + + return result; +} +#ifdef VK_USE_PLATFORM_GGP + +VkResult DispatchObject::CreateStreamDescriptorSurfaceGGP(VkInstance instance, + const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + if (!wrap_handles) return instance_dispatch_table.CreateStreamDescriptorSurfaceGGP(instance, pCreateInfo, pAllocator, pSurface); + + VkResult result = instance_dispatch_table.CreateStreamDescriptorSurfaceGGP(instance, pCreateInfo, pAllocator, pSurface); + if (VK_SUCCESS == result) { + *pSurface = WrapNew(*pSurface); + } + return result; +} +#endif // VK_USE_PLATFORM_GGP + +VkResult DispatchObject::GetPhysicalDeviceExternalImageFormatPropertiesNV( + VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, + VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, + VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) { + VkResult result = instance_dispatch_table.GetPhysicalDeviceExternalImageFormatPropertiesNV( + physicalDevice, format, type, tiling, usage, flags, externalHandleType, pExternalImageFormatProperties); + + return result; +} +#ifdef VK_USE_PLATFORM_WIN32_KHR + +VkResult DispatchObject::GetMemoryWin32HandleNV(VkDevice device, VkDeviceMemory memory, + VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle) { + if (!wrap_handles) return device_dispatch_table.GetMemoryWin32HandleNV(device, memory, handleType, pHandle); + { memory = Unwrap(memory); } + VkResult result = device_dispatch_table.GetMemoryWin32HandleNV(device, memory, handleType, pHandle); + + return result; +} +#endif // VK_USE_PLATFORM_WIN32_KHR +#ifdef VK_USE_PLATFORM_VI_NN + +VkResult DispatchObject::CreateViSurfaceNN(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + if (!wrap_handles) return instance_dispatch_table.CreateViSurfaceNN(instance, pCreateInfo, pAllocator, pSurface); + + VkResult result = instance_dispatch_table.CreateViSurfaceNN(instance, pCreateInfo, pAllocator, pSurface); + if (VK_SUCCESS == result) { + *pSurface = WrapNew(*pSurface); + } + return result; +} +#endif // VK_USE_PLATFORM_VI_NN + +void DispatchObject::CmdBeginConditionalRenderingEXT(VkCommandBuffer commandBuffer, + const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin) { + if (!wrap_handles) return device_dispatch_table.CmdBeginConditionalRenderingEXT(commandBuffer, pConditionalRenderingBegin); + vku::safe_VkConditionalRenderingBeginInfoEXT var_local_pConditionalRenderingBegin; + vku::safe_VkConditionalRenderingBeginInfoEXT* local_pConditionalRenderingBegin = nullptr; + { + if (pConditionalRenderingBegin) { + local_pConditionalRenderingBegin = &var_local_pConditionalRenderingBegin; + local_pConditionalRenderingBegin->initialize(pConditionalRenderingBegin); + + if (pConditionalRenderingBegin->buffer) { + local_pConditionalRenderingBegin->buffer = Unwrap(pConditionalRenderingBegin->buffer); + } + } + } + device_dispatch_table.CmdBeginConditionalRenderingEXT( + commandBuffer, (const VkConditionalRenderingBeginInfoEXT*)local_pConditionalRenderingBegin); +} + +void DispatchObject::CmdEndConditionalRenderingEXT(VkCommandBuffer commandBuffer) { + device_dispatch_table.CmdEndConditionalRenderingEXT(commandBuffer); +} + +void DispatchObject::CmdSetViewportWScalingNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, + const VkViewportWScalingNV* pViewportWScalings) { + device_dispatch_table.CmdSetViewportWScalingNV(commandBuffer, firstViewport, viewportCount, pViewportWScalings); +} + +VkResult DispatchObject::ReleaseDisplayEXT(VkPhysicalDevice physicalDevice, VkDisplayKHR display) { + if (!wrap_handles) return instance_dispatch_table.ReleaseDisplayEXT(physicalDevice, display); + { display = Unwrap(display); } + VkResult result = instance_dispatch_table.ReleaseDisplayEXT(physicalDevice, display); + + return result; +} +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT + +VkResult DispatchObject::AcquireXlibDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display) { + if (!wrap_handles) return instance_dispatch_table.AcquireXlibDisplayEXT(physicalDevice, dpy, display); + { display = Unwrap(display); } + VkResult result = instance_dispatch_table.AcquireXlibDisplayEXT(physicalDevice, dpy, display); + + return result; +} + +VkResult DispatchObject::GetRandROutputDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, + VkDisplayKHR* pDisplay) { + if (!wrap_handles) return instance_dispatch_table.GetRandROutputDisplayEXT(physicalDevice, dpy, rrOutput, pDisplay); + + VkResult result = instance_dispatch_table.GetRandROutputDisplayEXT(physicalDevice, dpy, rrOutput, pDisplay); + if (VK_SUCCESS == result) { + *pDisplay = MaybeWrapDisplay(*pDisplay); + } + return result; +} +#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT + +VkResult DispatchObject::GetPhysicalDeviceSurfaceCapabilities2EXT(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + VkSurfaceCapabilities2EXT* pSurfaceCapabilities) { + if (!wrap_handles) + return instance_dispatch_table.GetPhysicalDeviceSurfaceCapabilities2EXT(physicalDevice, surface, pSurfaceCapabilities); + { surface = Unwrap(surface); } + VkResult result = + instance_dispatch_table.GetPhysicalDeviceSurfaceCapabilities2EXT(physicalDevice, surface, pSurfaceCapabilities); + + return result; +} + +VkResult DispatchObject::DisplayPowerControlEXT(VkDevice device, VkDisplayKHR display, + const VkDisplayPowerInfoEXT* pDisplayPowerInfo) { + if (!wrap_handles) return device_dispatch_table.DisplayPowerControlEXT(device, display, pDisplayPowerInfo); + { display = Unwrap(display); } + VkResult result = device_dispatch_table.DisplayPowerControlEXT(device, display, pDisplayPowerInfo); + + return result; +} + +VkResult DispatchObject::RegisterDeviceEventEXT(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, + const VkAllocationCallbacks* pAllocator, VkFence* pFence) { + if (!wrap_handles) return device_dispatch_table.RegisterDeviceEventEXT(device, pDeviceEventInfo, pAllocator, pFence); + + VkResult result = device_dispatch_table.RegisterDeviceEventEXT(device, pDeviceEventInfo, pAllocator, pFence); + if (VK_SUCCESS == result) { + *pFence = WrapNew(*pFence); + } + return result; +} + +VkResult DispatchObject::RegisterDisplayEventEXT(VkDevice device, VkDisplayKHR display, + const VkDisplayEventInfoEXT* pDisplayEventInfo, + const VkAllocationCallbacks* pAllocator, VkFence* pFence) { + if (!wrap_handles) return device_dispatch_table.RegisterDisplayEventEXT(device, display, pDisplayEventInfo, pAllocator, pFence); + { display = Unwrap(display); } + VkResult result = device_dispatch_table.RegisterDisplayEventEXT(device, display, pDisplayEventInfo, pAllocator, pFence); + if (VK_SUCCESS == result) { + *pFence = WrapNew(*pFence); + } + return result; +} + +VkResult DispatchObject::GetSwapchainCounterEXT(VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, + uint64_t* pCounterValue) { + if (!wrap_handles) return device_dispatch_table.GetSwapchainCounterEXT(device, swapchain, counter, pCounterValue); + { swapchain = Unwrap(swapchain); } + VkResult result = device_dispatch_table.GetSwapchainCounterEXT(device, swapchain, counter, pCounterValue); + + return result; +} + +VkResult DispatchObject::GetRefreshCycleDurationGOOGLE(VkDevice device, VkSwapchainKHR swapchain, + VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) { + if (!wrap_handles) return device_dispatch_table.GetRefreshCycleDurationGOOGLE(device, swapchain, pDisplayTimingProperties); + { swapchain = Unwrap(swapchain); } + VkResult result = device_dispatch_table.GetRefreshCycleDurationGOOGLE(device, swapchain, pDisplayTimingProperties); + + return result; +} + +VkResult DispatchObject::GetPastPresentationTimingGOOGLE(VkDevice device, VkSwapchainKHR swapchain, + uint32_t* pPresentationTimingCount, + VkPastPresentationTimingGOOGLE* pPresentationTimings) { + if (!wrap_handles) + return device_dispatch_table.GetPastPresentationTimingGOOGLE(device, swapchain, pPresentationTimingCount, + pPresentationTimings); + { swapchain = Unwrap(swapchain); } + VkResult result = + device_dispatch_table.GetPastPresentationTimingGOOGLE(device, swapchain, pPresentationTimingCount, pPresentationTimings); + + return result; +} + +void DispatchObject::CmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, + uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles) { + device_dispatch_table.CmdSetDiscardRectangleEXT(commandBuffer, firstDiscardRectangle, discardRectangleCount, + pDiscardRectangles); +} + +void DispatchObject::CmdSetDiscardRectangleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 discardRectangleEnable) { + device_dispatch_table.CmdSetDiscardRectangleEnableEXT(commandBuffer, discardRectangleEnable); +} + +void DispatchObject::CmdSetDiscardRectangleModeEXT(VkCommandBuffer commandBuffer, VkDiscardRectangleModeEXT discardRectangleMode) { + device_dispatch_table.CmdSetDiscardRectangleModeEXT(commandBuffer, discardRectangleMode); +} + +void DispatchObject::SetHdrMetadataEXT(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, + const VkHdrMetadataEXT* pMetadata) { + if (!wrap_handles) return device_dispatch_table.SetHdrMetadataEXT(device, swapchainCount, pSwapchains, pMetadata); + small_vector var_local_pSwapchains; + VkSwapchainKHR* local_pSwapchains = nullptr; + { + if (pSwapchains) { + var_local_pSwapchains.resize(swapchainCount); + local_pSwapchains = var_local_pSwapchains.data(); + for (uint32_t index0 = 0; index0 < swapchainCount; ++index0) { + local_pSwapchains[index0] = Unwrap(pSwapchains[index0]); + } + } + } + device_dispatch_table.SetHdrMetadataEXT(device, swapchainCount, (const VkSwapchainKHR*)local_pSwapchains, pMetadata); +} +#ifdef VK_USE_PLATFORM_IOS_MVK + +VkResult DispatchObject::CreateIOSSurfaceMVK(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + if (!wrap_handles) return instance_dispatch_table.CreateIOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); + + VkResult result = instance_dispatch_table.CreateIOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); + if (VK_SUCCESS == result) { + *pSurface = WrapNew(*pSurface); + } + return result; +} +#endif // VK_USE_PLATFORM_IOS_MVK +#ifdef VK_USE_PLATFORM_MACOS_MVK + +VkResult DispatchObject::CreateMacOSSurfaceMVK(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + if (!wrap_handles) return instance_dispatch_table.CreateMacOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); + + VkResult result = instance_dispatch_table.CreateMacOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); + if (VK_SUCCESS == result) { + *pSurface = WrapNew(*pSurface); + } + return result; +} +#endif // VK_USE_PLATFORM_MACOS_MVK + +void DispatchObject::QueueBeginDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo) { + device_dispatch_table.QueueBeginDebugUtilsLabelEXT(queue, pLabelInfo); +} + +void DispatchObject::QueueEndDebugUtilsLabelEXT(VkQueue queue) { device_dispatch_table.QueueEndDebugUtilsLabelEXT(queue); } + +void DispatchObject::QueueInsertDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo) { + device_dispatch_table.QueueInsertDebugUtilsLabelEXT(queue, pLabelInfo); +} + +void DispatchObject::CmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo) { + device_dispatch_table.CmdBeginDebugUtilsLabelEXT(commandBuffer, pLabelInfo); +} + +void DispatchObject::CmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer) { + device_dispatch_table.CmdEndDebugUtilsLabelEXT(commandBuffer); +} + +void DispatchObject::CmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo) { + device_dispatch_table.CmdInsertDebugUtilsLabelEXT(commandBuffer, pLabelInfo); +} + +VkResult DispatchObject::CreateDebugUtilsMessengerEXT(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDebugUtilsMessengerEXT* pMessenger) { + if (!wrap_handles) return instance_dispatch_table.CreateDebugUtilsMessengerEXT(instance, pCreateInfo, pAllocator, pMessenger); + + VkResult result = instance_dispatch_table.CreateDebugUtilsMessengerEXT(instance, pCreateInfo, pAllocator, pMessenger); + if (VK_SUCCESS == result) { + *pMessenger = WrapNew(*pMessenger); + } + return result; +} + +void DispatchObject::DestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT messenger, + const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return instance_dispatch_table.DestroyDebugUtilsMessengerEXT(instance, messenger, pAllocator); + + uint64_t messenger_id = CastToUint64(messenger); + auto iter = unique_id_mapping.pop(messenger_id); + if (iter != unique_id_mapping.end()) { + messenger = (VkDebugUtilsMessengerEXT)iter->second; + } else { + messenger = (VkDebugUtilsMessengerEXT)0; + } + instance_dispatch_table.DestroyDebugUtilsMessengerEXT(instance, messenger, pAllocator); +} + +void DispatchObject::SubmitDebugUtilsMessageEXT(VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, + VkDebugUtilsMessageTypeFlagsEXT messageTypes, + const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData) { + instance_dispatch_table.SubmitDebugUtilsMessageEXT(instance, messageSeverity, messageTypes, pCallbackData); +} +#ifdef VK_USE_PLATFORM_ANDROID_KHR + +VkResult DispatchObject::GetAndroidHardwareBufferPropertiesANDROID(VkDevice device, const struct AHardwareBuffer* buffer, + VkAndroidHardwareBufferPropertiesANDROID* pProperties) { + VkResult result = device_dispatch_table.GetAndroidHardwareBufferPropertiesANDROID(device, buffer, pProperties); + + return result; +} + +VkResult DispatchObject::GetMemoryAndroidHardwareBufferANDROID(VkDevice device, + const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, + struct AHardwareBuffer** pBuffer) { + if (!wrap_handles) return device_dispatch_table.GetMemoryAndroidHardwareBufferANDROID(device, pInfo, pBuffer); + vku::safe_VkMemoryGetAndroidHardwareBufferInfoANDROID var_local_pInfo; + vku::safe_VkMemoryGetAndroidHardwareBufferInfoANDROID* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->memory) { + local_pInfo->memory = Unwrap(pInfo->memory); + } + } + } + VkResult result = device_dispatch_table.GetMemoryAndroidHardwareBufferANDROID( + device, (const VkMemoryGetAndroidHardwareBufferInfoANDROID*)local_pInfo, pBuffer); + + return result; +} +#endif // VK_USE_PLATFORM_ANDROID_KHR +#ifdef VK_ENABLE_BETA_EXTENSIONS + +VkResult DispatchObject::CreateExecutionGraphPipelinesAMDX(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { + if (!wrap_handles) + return device_dispatch_table.CreateExecutionGraphPipelinesAMDX(device, pipelineCache, createInfoCount, pCreateInfos, + pAllocator, pPipelines); + small_vector var_local_pCreateInfos; + vku::safe_VkExecutionGraphPipelineCreateInfoAMDX* local_pCreateInfos = nullptr; + { + pipelineCache = Unwrap(pipelineCache); + if (pCreateInfos) { + var_local_pCreateInfos.resize(createInfoCount); + local_pCreateInfos = var_local_pCreateInfos.data(); + for (uint32_t index0 = 0; index0 < createInfoCount; ++index0) { + local_pCreateInfos[index0].initialize(&pCreateInfos[index0]); + if (local_pCreateInfos[index0].pStages) { + for (uint32_t index1 = 0; index1 < local_pCreateInfos[index0].stageCount; ++index1) { + UnwrapPnextChainHandles(local_pCreateInfos[index0].pStages[index1].pNext); + + if (pCreateInfos[index0].pStages[index1].module) { + local_pCreateInfos[index0].pStages[index1].module = Unwrap(pCreateInfos[index0].pStages[index1].module); + } + } + } + if (local_pCreateInfos[index0].pLibraryInfo) { + if (local_pCreateInfos[index0].pLibraryInfo->pLibraries) { + for (uint32_t index2 = 0; index2 < local_pCreateInfos[index0].pLibraryInfo->libraryCount; ++index2) { + local_pCreateInfos[index0].pLibraryInfo->pLibraries[index2] = + Unwrap(local_pCreateInfos[index0].pLibraryInfo->pLibraries[index2]); + } + } + } + + if (pCreateInfos[index0].layout) { + local_pCreateInfos[index0].layout = Unwrap(pCreateInfos[index0].layout); + } + if (pCreateInfos[index0].basePipelineHandle) { + local_pCreateInfos[index0].basePipelineHandle = Unwrap(pCreateInfos[index0].basePipelineHandle); + } + } + } + } + VkResult result = device_dispatch_table.CreateExecutionGraphPipelinesAMDX( + device, pipelineCache, createInfoCount, (const VkExecutionGraphPipelineCreateInfoAMDX*)local_pCreateInfos, pAllocator, + pPipelines); + if (VK_SUCCESS == result) { + for (uint32_t index0 = 0; index0 < createInfoCount; index0++) { + pPipelines[index0] = WrapNew(pPipelines[index0]); + } + } + return result; +} + +VkResult DispatchObject::GetExecutionGraphPipelineScratchSizeAMDX(VkDevice device, VkPipeline executionGraph, + VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo) { + if (!wrap_handles) return device_dispatch_table.GetExecutionGraphPipelineScratchSizeAMDX(device, executionGraph, pSizeInfo); + { executionGraph = Unwrap(executionGraph); } + VkResult result = device_dispatch_table.GetExecutionGraphPipelineScratchSizeAMDX(device, executionGraph, pSizeInfo); + + return result; +} + +VkResult DispatchObject::GetExecutionGraphPipelineNodeIndexAMDX(VkDevice device, VkPipeline executionGraph, + const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo, + uint32_t* pNodeIndex) { + if (!wrap_handles) + return device_dispatch_table.GetExecutionGraphPipelineNodeIndexAMDX(device, executionGraph, pNodeInfo, pNodeIndex); + { executionGraph = Unwrap(executionGraph); } + VkResult result = device_dispatch_table.GetExecutionGraphPipelineNodeIndexAMDX(device, executionGraph, pNodeInfo, pNodeIndex); + + return result; +} + +void DispatchObject::CmdInitializeGraphScratchMemoryAMDX(VkCommandBuffer commandBuffer, VkPipeline executionGraph, + VkDeviceAddress scratch, VkDeviceSize scratchSize) { + if (!wrap_handles) + return device_dispatch_table.CmdInitializeGraphScratchMemoryAMDX(commandBuffer, executionGraph, scratch, scratchSize); + { executionGraph = Unwrap(executionGraph); } + device_dispatch_table.CmdInitializeGraphScratchMemoryAMDX(commandBuffer, executionGraph, scratch, scratchSize); +} + +void DispatchObject::CmdDispatchGraphAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, + const VkDispatchGraphCountInfoAMDX* pCountInfo) { + device_dispatch_table.CmdDispatchGraphAMDX(commandBuffer, scratch, scratchSize, pCountInfo); +} + +void DispatchObject::CmdDispatchGraphIndirectAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, + const VkDispatchGraphCountInfoAMDX* pCountInfo) { + device_dispatch_table.CmdDispatchGraphIndirectAMDX(commandBuffer, scratch, scratchSize, pCountInfo); +} + +void DispatchObject::CmdDispatchGraphIndirectCountAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, + VkDeviceSize scratchSize, VkDeviceAddress countInfo) { + device_dispatch_table.CmdDispatchGraphIndirectCountAMDX(commandBuffer, scratch, scratchSize, countInfo); +} +#endif // VK_ENABLE_BETA_EXTENSIONS + +void DispatchObject::CmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo) { + device_dispatch_table.CmdSetSampleLocationsEXT(commandBuffer, pSampleLocationsInfo); +} + +void DispatchObject::GetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, + VkMultisamplePropertiesEXT* pMultisampleProperties) { + instance_dispatch_table.GetPhysicalDeviceMultisamplePropertiesEXT(physicalDevice, samples, pMultisampleProperties); +} + +VkResult DispatchObject::GetImageDrmFormatModifierPropertiesEXT(VkDevice device, VkImage image, + VkImageDrmFormatModifierPropertiesEXT* pProperties) { + if (!wrap_handles) return device_dispatch_table.GetImageDrmFormatModifierPropertiesEXT(device, image, pProperties); + { image = Unwrap(image); } + VkResult result = device_dispatch_table.GetImageDrmFormatModifierPropertiesEXT(device, image, pProperties); + + return result; +} + +VkResult DispatchObject::CreateValidationCacheEXT(VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkValidationCacheEXT* pValidationCache) { + if (!wrap_handles) return device_dispatch_table.CreateValidationCacheEXT(device, pCreateInfo, pAllocator, pValidationCache); + + VkResult result = device_dispatch_table.CreateValidationCacheEXT(device, pCreateInfo, pAllocator, pValidationCache); + if (VK_SUCCESS == result) { + *pValidationCache = WrapNew(*pValidationCache); + } + return result; +} + +void DispatchObject::DestroyValidationCacheEXT(VkDevice device, VkValidationCacheEXT validationCache, + const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyValidationCacheEXT(device, validationCache, pAllocator); + + uint64_t validationCache_id = CastToUint64(validationCache); + auto iter = unique_id_mapping.pop(validationCache_id); + if (iter != unique_id_mapping.end()) { + validationCache = (VkValidationCacheEXT)iter->second; + } else { + validationCache = (VkValidationCacheEXT)0; + } + device_dispatch_table.DestroyValidationCacheEXT(device, validationCache, pAllocator); +} + +VkResult DispatchObject::MergeValidationCachesEXT(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, + const VkValidationCacheEXT* pSrcCaches) { + if (!wrap_handles) return device_dispatch_table.MergeValidationCachesEXT(device, dstCache, srcCacheCount, pSrcCaches); + small_vector var_local_pSrcCaches; + VkValidationCacheEXT* local_pSrcCaches = nullptr; + { + dstCache = Unwrap(dstCache); + if (pSrcCaches) { + var_local_pSrcCaches.resize(srcCacheCount); + local_pSrcCaches = var_local_pSrcCaches.data(); + for (uint32_t index0 = 0; index0 < srcCacheCount; ++index0) { + local_pSrcCaches[index0] = Unwrap(pSrcCaches[index0]); + } + } + } + VkResult result = device_dispatch_table.MergeValidationCachesEXT(device, dstCache, srcCacheCount, + (const VkValidationCacheEXT*)local_pSrcCaches); + + return result; +} + +VkResult DispatchObject::GetValidationCacheDataEXT(VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, + void* pData) { + if (!wrap_handles) return device_dispatch_table.GetValidationCacheDataEXT(device, validationCache, pDataSize, pData); + { validationCache = Unwrap(validationCache); } + VkResult result = device_dispatch_table.GetValidationCacheDataEXT(device, validationCache, pDataSize, pData); + + return result; +} + +void DispatchObject::CmdBindShadingRateImageNV(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout) { + if (!wrap_handles) return device_dispatch_table.CmdBindShadingRateImageNV(commandBuffer, imageView, imageLayout); + { imageView = Unwrap(imageView); } + device_dispatch_table.CmdBindShadingRateImageNV(commandBuffer, imageView, imageLayout); +} + +void DispatchObject::CmdSetViewportShadingRatePaletteNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, + uint32_t viewportCount, + const VkShadingRatePaletteNV* pShadingRatePalettes) { + device_dispatch_table.CmdSetViewportShadingRatePaletteNV(commandBuffer, firstViewport, viewportCount, pShadingRatePalettes); +} + +void DispatchObject::CmdSetCoarseSampleOrderNV(VkCommandBuffer commandBuffer, VkCoarseSampleOrderTypeNV sampleOrderType, + uint32_t customSampleOrderCount, + const VkCoarseSampleOrderCustomNV* pCustomSampleOrders) { + device_dispatch_table.CmdSetCoarseSampleOrderNV(commandBuffer, sampleOrderType, customSampleOrderCount, pCustomSampleOrders); +} + +VkResult DispatchObject::CreateAccelerationStructureNV(VkDevice device, const VkAccelerationStructureCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkAccelerationStructureNV* pAccelerationStructure) { + if (!wrap_handles) + return device_dispatch_table.CreateAccelerationStructureNV(device, pCreateInfo, pAllocator, pAccelerationStructure); + vku::safe_VkAccelerationStructureCreateInfoNV var_local_pCreateInfo; + vku::safe_VkAccelerationStructureCreateInfoNV* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + if (local_pCreateInfo->info.pGeometries) { + for (uint32_t index2 = 0; index2 < local_pCreateInfo->info.geometryCount; ++index2) { + if (pCreateInfo->info.pGeometries[index2].geometry.triangles.vertexData) { + local_pCreateInfo->info.pGeometries[index2].geometry.triangles.vertexData = + Unwrap(pCreateInfo->info.pGeometries[index2].geometry.triangles.vertexData); + } + if (pCreateInfo->info.pGeometries[index2].geometry.triangles.indexData) { + local_pCreateInfo->info.pGeometries[index2].geometry.triangles.indexData = + Unwrap(pCreateInfo->info.pGeometries[index2].geometry.triangles.indexData); + } + if (pCreateInfo->info.pGeometries[index2].geometry.triangles.transformData) { + local_pCreateInfo->info.pGeometries[index2].geometry.triangles.transformData = + Unwrap(pCreateInfo->info.pGeometries[index2].geometry.triangles.transformData); + } + if (pCreateInfo->info.pGeometries[index2].geometry.aabbs.aabbData) { + local_pCreateInfo->info.pGeometries[index2].geometry.aabbs.aabbData = + Unwrap(pCreateInfo->info.pGeometries[index2].geometry.aabbs.aabbData); + } + } + } + } + } + VkResult result = device_dispatch_table.CreateAccelerationStructureNV( + device, (const VkAccelerationStructureCreateInfoNV*)local_pCreateInfo, pAllocator, pAccelerationStructure); + if (VK_SUCCESS == result) { + *pAccelerationStructure = WrapNew(*pAccelerationStructure); + } + return result; +} + +void DispatchObject::DestroyAccelerationStructureNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, + const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyAccelerationStructureNV(device, accelerationStructure, pAllocator); + + uint64_t accelerationStructure_id = CastToUint64(accelerationStructure); + auto iter = unique_id_mapping.pop(accelerationStructure_id); + if (iter != unique_id_mapping.end()) { + accelerationStructure = (VkAccelerationStructureNV)iter->second; + } else { + accelerationStructure = (VkAccelerationStructureNV)0; + } + device_dispatch_table.DestroyAccelerationStructureNV(device, accelerationStructure, pAllocator); +} + +void DispatchObject::GetAccelerationStructureMemoryRequirementsNV(VkDevice device, + const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, + VkMemoryRequirements2KHR* pMemoryRequirements) { + if (!wrap_handles) + return device_dispatch_table.GetAccelerationStructureMemoryRequirementsNV(device, pInfo, pMemoryRequirements); + vku::safe_VkAccelerationStructureMemoryRequirementsInfoNV var_local_pInfo; + vku::safe_VkAccelerationStructureMemoryRequirementsInfoNV* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->accelerationStructure) { + local_pInfo->accelerationStructure = Unwrap(pInfo->accelerationStructure); + } + } + } + device_dispatch_table.GetAccelerationStructureMemoryRequirementsNV( + device, (const VkAccelerationStructureMemoryRequirementsInfoNV*)local_pInfo, pMemoryRequirements); +} + +VkResult DispatchObject::BindAccelerationStructureMemoryNV(VkDevice device, uint32_t bindInfoCount, + const VkBindAccelerationStructureMemoryInfoNV* pBindInfos) { + if (!wrap_handles) return device_dispatch_table.BindAccelerationStructureMemoryNV(device, bindInfoCount, pBindInfos); + small_vector var_local_pBindInfos; + vku::safe_VkBindAccelerationStructureMemoryInfoNV* local_pBindInfos = nullptr; + { + if (pBindInfos) { + var_local_pBindInfos.resize(bindInfoCount); + local_pBindInfos = var_local_pBindInfos.data(); + for (uint32_t index0 = 0; index0 < bindInfoCount; ++index0) { + local_pBindInfos[index0].initialize(&pBindInfos[index0]); + + if (pBindInfos[index0].accelerationStructure) { + local_pBindInfos[index0].accelerationStructure = Unwrap(pBindInfos[index0].accelerationStructure); + } + if (pBindInfos[index0].memory) { + local_pBindInfos[index0].memory = Unwrap(pBindInfos[index0].memory); + } + } + } + } + VkResult result = device_dispatch_table.BindAccelerationStructureMemoryNV( + device, bindInfoCount, (const VkBindAccelerationStructureMemoryInfoNV*)local_pBindInfos); + + return result; +} + +void DispatchObject::CmdBuildAccelerationStructureNV(VkCommandBuffer commandBuffer, const VkAccelerationStructureInfoNV* pInfo, + VkBuffer instanceData, VkDeviceSize instanceOffset, VkBool32 update, + VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkBuffer scratch, + VkDeviceSize scratchOffset) { + if (!wrap_handles) + return device_dispatch_table.CmdBuildAccelerationStructureNV(commandBuffer, pInfo, instanceData, instanceOffset, update, + dst, src, scratch, scratchOffset); + vku::safe_VkAccelerationStructureInfoNV var_local_pInfo; + vku::safe_VkAccelerationStructureInfoNV* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + if (local_pInfo->pGeometries) { + for (uint32_t index1 = 0; index1 < local_pInfo->geometryCount; ++index1) { + if (pInfo->pGeometries[index1].geometry.triangles.vertexData) { + local_pInfo->pGeometries[index1].geometry.triangles.vertexData = + Unwrap(pInfo->pGeometries[index1].geometry.triangles.vertexData); + } + if (pInfo->pGeometries[index1].geometry.triangles.indexData) { + local_pInfo->pGeometries[index1].geometry.triangles.indexData = + Unwrap(pInfo->pGeometries[index1].geometry.triangles.indexData); + } + if (pInfo->pGeometries[index1].geometry.triangles.transformData) { + local_pInfo->pGeometries[index1].geometry.triangles.transformData = + Unwrap(pInfo->pGeometries[index1].geometry.triangles.transformData); + } + if (pInfo->pGeometries[index1].geometry.aabbs.aabbData) { + local_pInfo->pGeometries[index1].geometry.aabbs.aabbData = + Unwrap(pInfo->pGeometries[index1].geometry.aabbs.aabbData); + } + } + } + } + instanceData = Unwrap(instanceData); + dst = Unwrap(dst); + src = Unwrap(src); + scratch = Unwrap(scratch); + } + device_dispatch_table.CmdBuildAccelerationStructureNV(commandBuffer, (const VkAccelerationStructureInfoNV*)local_pInfo, + instanceData, instanceOffset, update, dst, src, scratch, scratchOffset); +} + +void DispatchObject::CmdCopyAccelerationStructureNV(VkCommandBuffer commandBuffer, VkAccelerationStructureNV dst, + VkAccelerationStructureNV src, VkCopyAccelerationStructureModeKHR mode) { + if (!wrap_handles) return device_dispatch_table.CmdCopyAccelerationStructureNV(commandBuffer, dst, src, mode); + { + dst = Unwrap(dst); + src = Unwrap(src); + } + device_dispatch_table.CmdCopyAccelerationStructureNV(commandBuffer, dst, src, mode); +} + +void DispatchObject::CmdTraceRaysNV(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) { + if (!wrap_handles) + return device_dispatch_table.CmdTraceRaysNV(commandBuffer, raygenShaderBindingTableBuffer, raygenShaderBindingOffset, + missShaderBindingTableBuffer, missShaderBindingOffset, missShaderBindingStride, + hitShaderBindingTableBuffer, hitShaderBindingOffset, hitShaderBindingStride, + callableShaderBindingTableBuffer, callableShaderBindingOffset, + callableShaderBindingStride, width, height, depth); + { + raygenShaderBindingTableBuffer = Unwrap(raygenShaderBindingTableBuffer); + missShaderBindingTableBuffer = Unwrap(missShaderBindingTableBuffer); + hitShaderBindingTableBuffer = Unwrap(hitShaderBindingTableBuffer); + callableShaderBindingTableBuffer = Unwrap(callableShaderBindingTableBuffer); + } + device_dispatch_table.CmdTraceRaysNV(commandBuffer, raygenShaderBindingTableBuffer, raygenShaderBindingOffset, + missShaderBindingTableBuffer, missShaderBindingOffset, missShaderBindingStride, + hitShaderBindingTableBuffer, hitShaderBindingOffset, hitShaderBindingStride, + callableShaderBindingTableBuffer, callableShaderBindingOffset, callableShaderBindingStride, + width, height, depth); +} + +VkResult DispatchObject::GetRayTracingShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, + uint32_t groupCount, size_t dataSize, void* pData) { + if (!wrap_handles) + return device_dispatch_table.GetRayTracingShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, dataSize, pData); + { pipeline = Unwrap(pipeline); } + VkResult result = + device_dispatch_table.GetRayTracingShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, dataSize, pData); + + return result; +} + +VkResult DispatchObject::GetRayTracingShaderGroupHandlesNV(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, + uint32_t groupCount, size_t dataSize, void* pData) { + if (!wrap_handles) + return device_dispatch_table.GetRayTracingShaderGroupHandlesNV(device, pipeline, firstGroup, groupCount, dataSize, pData); + { pipeline = Unwrap(pipeline); } + VkResult result = + device_dispatch_table.GetRayTracingShaderGroupHandlesNV(device, pipeline, firstGroup, groupCount, dataSize, pData); + + return result; +} + +VkResult DispatchObject::GetAccelerationStructureHandleNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, + size_t dataSize, void* pData) { + if (!wrap_handles) + return device_dispatch_table.GetAccelerationStructureHandleNV(device, accelerationStructure, dataSize, pData); + { accelerationStructure = Unwrap(accelerationStructure); } + VkResult result = device_dispatch_table.GetAccelerationStructureHandleNV(device, accelerationStructure, dataSize, pData); + + return result; +} + +void DispatchObject::CmdWriteAccelerationStructuresPropertiesNV(VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, + const VkAccelerationStructureNV* pAccelerationStructures, + VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery) { + if (!wrap_handles) + return device_dispatch_table.CmdWriteAccelerationStructuresPropertiesNV( + commandBuffer, accelerationStructureCount, pAccelerationStructures, queryType, queryPool, firstQuery); + small_vector var_local_pAccelerationStructures; + VkAccelerationStructureNV* local_pAccelerationStructures = nullptr; + { + if (pAccelerationStructures) { + var_local_pAccelerationStructures.resize(accelerationStructureCount); + local_pAccelerationStructures = var_local_pAccelerationStructures.data(); + for (uint32_t index0 = 0; index0 < accelerationStructureCount; ++index0) { + local_pAccelerationStructures[index0] = Unwrap(pAccelerationStructures[index0]); + } + } + queryPool = Unwrap(queryPool); + } + device_dispatch_table.CmdWriteAccelerationStructuresPropertiesNV( + commandBuffer, accelerationStructureCount, (const VkAccelerationStructureNV*)local_pAccelerationStructures, queryType, + queryPool, firstQuery); +} + +VkResult DispatchObject::CompileDeferredNV(VkDevice device, VkPipeline pipeline, uint32_t shader) { + if (!wrap_handles) return device_dispatch_table.CompileDeferredNV(device, pipeline, shader); + { pipeline = Unwrap(pipeline); } + VkResult result = device_dispatch_table.CompileDeferredNV(device, pipeline, shader); + + return result; +} + +VkResult DispatchObject::GetMemoryHostPointerPropertiesEXT(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, + const void* pHostPointer, + VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties) { + VkResult result = + device_dispatch_table.GetMemoryHostPointerPropertiesEXT(device, handleType, pHostPointer, pMemoryHostPointerProperties); + + return result; +} + +void DispatchObject::CmdWriteBufferMarkerAMD(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, + VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker) { + if (!wrap_handles) + return device_dispatch_table.CmdWriteBufferMarkerAMD(commandBuffer, pipelineStage, dstBuffer, dstOffset, marker); + { dstBuffer = Unwrap(dstBuffer); } + device_dispatch_table.CmdWriteBufferMarkerAMD(commandBuffer, pipelineStage, dstBuffer, dstOffset, marker); +} + +void DispatchObject::CmdWriteBufferMarker2AMD(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkBuffer dstBuffer, + VkDeviceSize dstOffset, uint32_t marker) { + if (!wrap_handles) return device_dispatch_table.CmdWriteBufferMarker2AMD(commandBuffer, stage, dstBuffer, dstOffset, marker); + { dstBuffer = Unwrap(dstBuffer); } + device_dispatch_table.CmdWriteBufferMarker2AMD(commandBuffer, stage, dstBuffer, dstOffset, marker); +} + +VkResult DispatchObject::GetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, + VkTimeDomainKHR* pTimeDomains) { + VkResult result = + instance_dispatch_table.GetPhysicalDeviceCalibrateableTimeDomainsEXT(physicalDevice, pTimeDomainCount, pTimeDomains); + + return result; +} + +VkResult DispatchObject::GetCalibratedTimestampsEXT(VkDevice device, uint32_t timestampCount, + const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, + uint64_t* pMaxDeviation) { + VkResult result = + device_dispatch_table.GetCalibratedTimestampsEXT(device, timestampCount, pTimestampInfos, pTimestamps, pMaxDeviation); + + return result; +} + +void DispatchObject::CmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask) { + device_dispatch_table.CmdDrawMeshTasksNV(commandBuffer, taskCount, firstTask); +} + +void DispatchObject::CmdDrawMeshTasksIndirectNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + uint32_t drawCount, uint32_t stride) { + if (!wrap_handles) return device_dispatch_table.CmdDrawMeshTasksIndirectNV(commandBuffer, buffer, offset, drawCount, stride); + { buffer = Unwrap(buffer); } + device_dispatch_table.CmdDrawMeshTasksIndirectNV(commandBuffer, buffer, offset, drawCount, stride); +} + +void DispatchObject::CmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride) { + if (!wrap_handles) + return device_dispatch_table.CmdDrawMeshTasksIndirectCountNV(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride); + { + buffer = Unwrap(buffer); + countBuffer = Unwrap(countBuffer); + } + device_dispatch_table.CmdDrawMeshTasksIndirectCountNV(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride); +} + +void DispatchObject::CmdSetExclusiveScissorEnableNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, + uint32_t exclusiveScissorCount, const VkBool32* pExclusiveScissorEnables) { + device_dispatch_table.CmdSetExclusiveScissorEnableNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, + pExclusiveScissorEnables); +} + +void DispatchObject::CmdSetExclusiveScissorNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, + uint32_t exclusiveScissorCount, const VkRect2D* pExclusiveScissors) { + device_dispatch_table.CmdSetExclusiveScissorNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, pExclusiveScissors); +} + +void DispatchObject::CmdSetCheckpointNV(VkCommandBuffer commandBuffer, const void* pCheckpointMarker) { + device_dispatch_table.CmdSetCheckpointNV(commandBuffer, pCheckpointMarker); +} + +void DispatchObject::GetQueueCheckpointDataNV(VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointDataNV* pCheckpointData) { + device_dispatch_table.GetQueueCheckpointDataNV(queue, pCheckpointDataCount, pCheckpointData); +} + +void DispatchObject::GetQueueCheckpointData2NV(VkQueue queue, uint32_t* pCheckpointDataCount, + VkCheckpointData2NV* pCheckpointData) { + device_dispatch_table.GetQueueCheckpointData2NV(queue, pCheckpointDataCount, pCheckpointData); +} + +VkResult DispatchObject::InitializePerformanceApiINTEL(VkDevice device, + const VkInitializePerformanceApiInfoINTEL* pInitializeInfo) { + VkResult result = device_dispatch_table.InitializePerformanceApiINTEL(device, pInitializeInfo); + + return result; +} + +void DispatchObject::UninitializePerformanceApiINTEL(VkDevice device) { + device_dispatch_table.UninitializePerformanceApiINTEL(device); +} + +VkResult DispatchObject::CmdSetPerformanceMarkerINTEL(VkCommandBuffer commandBuffer, + const VkPerformanceMarkerInfoINTEL* pMarkerInfo) { + VkResult result = device_dispatch_table.CmdSetPerformanceMarkerINTEL(commandBuffer, pMarkerInfo); + + return result; +} + +VkResult DispatchObject::CmdSetPerformanceStreamMarkerINTEL(VkCommandBuffer commandBuffer, + const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo) { + VkResult result = device_dispatch_table.CmdSetPerformanceStreamMarkerINTEL(commandBuffer, pMarkerInfo); + + return result; +} + +VkResult DispatchObject::CmdSetPerformanceOverrideINTEL(VkCommandBuffer commandBuffer, + const VkPerformanceOverrideInfoINTEL* pOverrideInfo) { + VkResult result = device_dispatch_table.CmdSetPerformanceOverrideINTEL(commandBuffer, pOverrideInfo); + + return result; +} + +VkResult DispatchObject::AcquirePerformanceConfigurationINTEL(VkDevice device, + const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, + VkPerformanceConfigurationINTEL* pConfiguration) { + if (!wrap_handles) return device_dispatch_table.AcquirePerformanceConfigurationINTEL(device, pAcquireInfo, pConfiguration); + + VkResult result = device_dispatch_table.AcquirePerformanceConfigurationINTEL(device, pAcquireInfo, pConfiguration); + if (VK_SUCCESS == result) { + *pConfiguration = WrapNew(*pConfiguration); + } + return result; +} + +VkResult DispatchObject::QueueSetPerformanceConfigurationINTEL(VkQueue queue, VkPerformanceConfigurationINTEL configuration) { + if (!wrap_handles) return device_dispatch_table.QueueSetPerformanceConfigurationINTEL(queue, configuration); + { configuration = Unwrap(configuration); } + VkResult result = device_dispatch_table.QueueSetPerformanceConfigurationINTEL(queue, configuration); + + return result; +} + +VkResult DispatchObject::GetPerformanceParameterINTEL(VkDevice device, VkPerformanceParameterTypeINTEL parameter, + VkPerformanceValueINTEL* pValue) { + VkResult result = device_dispatch_table.GetPerformanceParameterINTEL(device, parameter, pValue); + + return result; +} + +void DispatchObject::SetLocalDimmingAMD(VkDevice device, VkSwapchainKHR swapChain, VkBool32 localDimmingEnable) { + if (!wrap_handles) return device_dispatch_table.SetLocalDimmingAMD(device, swapChain, localDimmingEnable); + { swapChain = Unwrap(swapChain); } + device_dispatch_table.SetLocalDimmingAMD(device, swapChain, localDimmingEnable); +} +#ifdef VK_USE_PLATFORM_FUCHSIA + +VkResult DispatchObject::CreateImagePipeSurfaceFUCHSIA(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + if (!wrap_handles) return instance_dispatch_table.CreateImagePipeSurfaceFUCHSIA(instance, pCreateInfo, pAllocator, pSurface); + + VkResult result = instance_dispatch_table.CreateImagePipeSurfaceFUCHSIA(instance, pCreateInfo, pAllocator, pSurface); + if (VK_SUCCESS == result) { + *pSurface = WrapNew(*pSurface); + } + return result; +} +#endif // VK_USE_PLATFORM_FUCHSIA +#ifdef VK_USE_PLATFORM_METAL_EXT + +VkResult DispatchObject::CreateMetalSurfaceEXT(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + if (!wrap_handles) return instance_dispatch_table.CreateMetalSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); + + VkResult result = instance_dispatch_table.CreateMetalSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); + if (VK_SUCCESS == result) { + *pSurface = WrapNew(*pSurface); + } + return result; +} +#endif // VK_USE_PLATFORM_METAL_EXT + +VkDeviceAddress DispatchObject::GetBufferDeviceAddressEXT(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { + if (!wrap_handles) return device_dispatch_table.GetBufferDeviceAddressEXT(device, pInfo); + vku::safe_VkBufferDeviceAddressInfo var_local_pInfo; + vku::safe_VkBufferDeviceAddressInfo* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->buffer) { + local_pInfo->buffer = Unwrap(pInfo->buffer); + } + } + } + VkDeviceAddress result = device_dispatch_table.GetBufferDeviceAddressEXT(device, (const VkBufferDeviceAddressInfo*)local_pInfo); + + return result; +} + +VkResult DispatchObject::GetPhysicalDeviceCooperativeMatrixPropertiesNV(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkCooperativeMatrixPropertiesNV* pProperties) { + VkResult result = + instance_dispatch_table.GetPhysicalDeviceCooperativeMatrixPropertiesNV(physicalDevice, pPropertyCount, pProperties); + + return result; +} + +VkResult DispatchObject::GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( + VkPhysicalDevice physicalDevice, uint32_t* pCombinationCount, VkFramebufferMixedSamplesCombinationNV* pCombinations) { + VkResult result = instance_dispatch_table.GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( + physicalDevice, pCombinationCount, pCombinations); + + return result; +} +#ifdef VK_USE_PLATFORM_WIN32_KHR + +VkResult DispatchObject::GetPhysicalDeviceSurfacePresentModes2EXT(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes) { + if (!wrap_handles) + return instance_dispatch_table.GetPhysicalDeviceSurfacePresentModes2EXT(physicalDevice, pSurfaceInfo, pPresentModeCount, + pPresentModes); + vku::safe_VkPhysicalDeviceSurfaceInfo2KHR var_local_pSurfaceInfo; + vku::safe_VkPhysicalDeviceSurfaceInfo2KHR* local_pSurfaceInfo = nullptr; + { + if (pSurfaceInfo) { + local_pSurfaceInfo = &var_local_pSurfaceInfo; + local_pSurfaceInfo->initialize(pSurfaceInfo); + + if (pSurfaceInfo->surface) { + local_pSurfaceInfo->surface = Unwrap(pSurfaceInfo->surface); + } + } + } + VkResult result = instance_dispatch_table.GetPhysicalDeviceSurfacePresentModes2EXT( + physicalDevice, (const VkPhysicalDeviceSurfaceInfo2KHR*)local_pSurfaceInfo, pPresentModeCount, pPresentModes); + + return result; +} + +VkResult DispatchObject::AcquireFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain) { + if (!wrap_handles) return device_dispatch_table.AcquireFullScreenExclusiveModeEXT(device, swapchain); + { swapchain = Unwrap(swapchain); } + VkResult result = device_dispatch_table.AcquireFullScreenExclusiveModeEXT(device, swapchain); + + return result; +} + +VkResult DispatchObject::ReleaseFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain) { + if (!wrap_handles) return device_dispatch_table.ReleaseFullScreenExclusiveModeEXT(device, swapchain); + { swapchain = Unwrap(swapchain); } + VkResult result = device_dispatch_table.ReleaseFullScreenExclusiveModeEXT(device, swapchain); + + return result; +} + +VkResult DispatchObject::GetDeviceGroupSurfacePresentModes2EXT(VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + VkDeviceGroupPresentModeFlagsKHR* pModes) { + if (!wrap_handles) return device_dispatch_table.GetDeviceGroupSurfacePresentModes2EXT(device, pSurfaceInfo, pModes); + vku::safe_VkPhysicalDeviceSurfaceInfo2KHR var_local_pSurfaceInfo; + vku::safe_VkPhysicalDeviceSurfaceInfo2KHR* local_pSurfaceInfo = nullptr; + { + if (pSurfaceInfo) { + local_pSurfaceInfo = &var_local_pSurfaceInfo; + local_pSurfaceInfo->initialize(pSurfaceInfo); + + if (pSurfaceInfo->surface) { + local_pSurfaceInfo->surface = Unwrap(pSurfaceInfo->surface); + } + } + } + VkResult result = device_dispatch_table.GetDeviceGroupSurfacePresentModes2EXT( + device, (const VkPhysicalDeviceSurfaceInfo2KHR*)local_pSurfaceInfo, pModes); + + return result; +} +#endif // VK_USE_PLATFORM_WIN32_KHR + +VkResult DispatchObject::CreateHeadlessSurfaceEXT(VkInstance instance, const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + if (!wrap_handles) return instance_dispatch_table.CreateHeadlessSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); + + VkResult result = instance_dispatch_table.CreateHeadlessSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); + if (VK_SUCCESS == result) { + *pSurface = WrapNew(*pSurface); + } + return result; +} + +void DispatchObject::CmdSetLineStippleEXT(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern) { + device_dispatch_table.CmdSetLineStippleEXT(commandBuffer, lineStippleFactor, lineStipplePattern); +} + +void DispatchObject::ResetQueryPoolEXT(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) { + if (!wrap_handles) return device_dispatch_table.ResetQueryPoolEXT(device, queryPool, firstQuery, queryCount); + { queryPool = Unwrap(queryPool); } + device_dispatch_table.ResetQueryPoolEXT(device, queryPool, firstQuery, queryCount); +} + +void DispatchObject::CmdSetCullModeEXT(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode) { + device_dispatch_table.CmdSetCullModeEXT(commandBuffer, cullMode); +} + +void DispatchObject::CmdSetFrontFaceEXT(VkCommandBuffer commandBuffer, VkFrontFace frontFace) { + device_dispatch_table.CmdSetFrontFaceEXT(commandBuffer, frontFace); +} + +void DispatchObject::CmdSetPrimitiveTopologyEXT(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology) { + device_dispatch_table.CmdSetPrimitiveTopologyEXT(commandBuffer, primitiveTopology); +} + +void DispatchObject::CmdSetViewportWithCountEXT(VkCommandBuffer commandBuffer, uint32_t viewportCount, + const VkViewport* pViewports) { + device_dispatch_table.CmdSetViewportWithCountEXT(commandBuffer, viewportCount, pViewports); +} + +void DispatchObject::CmdSetScissorWithCountEXT(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors) { + device_dispatch_table.CmdSetScissorWithCountEXT(commandBuffer, scissorCount, pScissors); +} + +void DispatchObject::CmdBindVertexBuffers2EXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, + const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, + const VkDeviceSize* pStrides) { + if (!wrap_handles) + return device_dispatch_table.CmdBindVertexBuffers2EXT(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets, pSizes, + pStrides); + small_vector var_local_pBuffers; + VkBuffer* local_pBuffers = nullptr; + { + if (pBuffers) { + var_local_pBuffers.resize(bindingCount); + local_pBuffers = var_local_pBuffers.data(); + for (uint32_t index0 = 0; index0 < bindingCount; ++index0) { + local_pBuffers[index0] = Unwrap(pBuffers[index0]); + } + } + } + device_dispatch_table.CmdBindVertexBuffers2EXT(commandBuffer, firstBinding, bindingCount, (const VkBuffer*)local_pBuffers, + pOffsets, pSizes, pStrides); +} + +void DispatchObject::CmdSetDepthTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable) { + device_dispatch_table.CmdSetDepthTestEnableEXT(commandBuffer, depthTestEnable); +} + +void DispatchObject::CmdSetDepthWriteEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable) { + device_dispatch_table.CmdSetDepthWriteEnableEXT(commandBuffer, depthWriteEnable); +} + +void DispatchObject::CmdSetDepthCompareOpEXT(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp) { + device_dispatch_table.CmdSetDepthCompareOpEXT(commandBuffer, depthCompareOp); +} + +void DispatchObject::CmdSetDepthBoundsTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable) { + device_dispatch_table.CmdSetDepthBoundsTestEnableEXT(commandBuffer, depthBoundsTestEnable); +} + +void DispatchObject::CmdSetStencilTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable) { + device_dispatch_table.CmdSetStencilTestEnableEXT(commandBuffer, stencilTestEnable); +} + +void DispatchObject::CmdSetStencilOpEXT(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, + VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp) { + device_dispatch_table.CmdSetStencilOpEXT(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp); +} + +VkResult DispatchObject::CopyMemoryToImageEXT(VkDevice device, const VkCopyMemoryToImageInfoEXT* pCopyMemoryToImageInfo) { + if (!wrap_handles) return device_dispatch_table.CopyMemoryToImageEXT(device, pCopyMemoryToImageInfo); + vku::safe_VkCopyMemoryToImageInfoEXT var_local_pCopyMemoryToImageInfo; + vku::safe_VkCopyMemoryToImageInfoEXT* local_pCopyMemoryToImageInfo = nullptr; + { + if (pCopyMemoryToImageInfo) { + local_pCopyMemoryToImageInfo = &var_local_pCopyMemoryToImageInfo; + local_pCopyMemoryToImageInfo->initialize(pCopyMemoryToImageInfo); + + if (pCopyMemoryToImageInfo->dstImage) { + local_pCopyMemoryToImageInfo->dstImage = Unwrap(pCopyMemoryToImageInfo->dstImage); + } + } + } + VkResult result = + device_dispatch_table.CopyMemoryToImageEXT(device, (const VkCopyMemoryToImageInfoEXT*)local_pCopyMemoryToImageInfo); + + return result; +} + +VkResult DispatchObject::CopyImageToMemoryEXT(VkDevice device, const VkCopyImageToMemoryInfoEXT* pCopyImageToMemoryInfo) { + if (!wrap_handles) return device_dispatch_table.CopyImageToMemoryEXT(device, pCopyImageToMemoryInfo); + vku::safe_VkCopyImageToMemoryInfoEXT var_local_pCopyImageToMemoryInfo; + vku::safe_VkCopyImageToMemoryInfoEXT* local_pCopyImageToMemoryInfo = nullptr; + { + if (pCopyImageToMemoryInfo) { + local_pCopyImageToMemoryInfo = &var_local_pCopyImageToMemoryInfo; + local_pCopyImageToMemoryInfo->initialize(pCopyImageToMemoryInfo); + + if (pCopyImageToMemoryInfo->srcImage) { + local_pCopyImageToMemoryInfo->srcImage = Unwrap(pCopyImageToMemoryInfo->srcImage); + } + } + } + VkResult result = + device_dispatch_table.CopyImageToMemoryEXT(device, (const VkCopyImageToMemoryInfoEXT*)local_pCopyImageToMemoryInfo); + + return result; +} + +VkResult DispatchObject::CopyImageToImageEXT(VkDevice device, const VkCopyImageToImageInfoEXT* pCopyImageToImageInfo) { + if (!wrap_handles) return device_dispatch_table.CopyImageToImageEXT(device, pCopyImageToImageInfo); + vku::safe_VkCopyImageToImageInfoEXT var_local_pCopyImageToImageInfo; + vku::safe_VkCopyImageToImageInfoEXT* local_pCopyImageToImageInfo = nullptr; + { + if (pCopyImageToImageInfo) { + local_pCopyImageToImageInfo = &var_local_pCopyImageToImageInfo; + local_pCopyImageToImageInfo->initialize(pCopyImageToImageInfo); + + if (pCopyImageToImageInfo->srcImage) { + local_pCopyImageToImageInfo->srcImage = Unwrap(pCopyImageToImageInfo->srcImage); + } + if (pCopyImageToImageInfo->dstImage) { + local_pCopyImageToImageInfo->dstImage = Unwrap(pCopyImageToImageInfo->dstImage); + } + } + } + VkResult result = + device_dispatch_table.CopyImageToImageEXT(device, (const VkCopyImageToImageInfoEXT*)local_pCopyImageToImageInfo); + + return result; +} + +VkResult DispatchObject::TransitionImageLayoutEXT(VkDevice device, uint32_t transitionCount, + const VkHostImageLayoutTransitionInfoEXT* pTransitions) { + if (!wrap_handles) return device_dispatch_table.TransitionImageLayoutEXT(device, transitionCount, pTransitions); + small_vector var_local_pTransitions; + vku::safe_VkHostImageLayoutTransitionInfoEXT* local_pTransitions = nullptr; + { + if (pTransitions) { + var_local_pTransitions.resize(transitionCount); + local_pTransitions = var_local_pTransitions.data(); + for (uint32_t index0 = 0; index0 < transitionCount; ++index0) { + local_pTransitions[index0].initialize(&pTransitions[index0]); + + if (pTransitions[index0].image) { + local_pTransitions[index0].image = Unwrap(pTransitions[index0].image); + } + } + } + } + VkResult result = device_dispatch_table.TransitionImageLayoutEXT(device, transitionCount, + (const VkHostImageLayoutTransitionInfoEXT*)local_pTransitions); + + return result; +} + +void DispatchObject::GetImageSubresourceLayout2EXT(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, + VkSubresourceLayout2KHR* pLayout) { + if (!wrap_handles) return device_dispatch_table.GetImageSubresourceLayout2EXT(device, image, pSubresource, pLayout); + { image = Unwrap(image); } + device_dispatch_table.GetImageSubresourceLayout2EXT(device, image, pSubresource, pLayout); +} + +VkResult DispatchObject::ReleaseSwapchainImagesEXT(VkDevice device, const VkReleaseSwapchainImagesInfoEXT* pReleaseInfo) { + if (!wrap_handles) return device_dispatch_table.ReleaseSwapchainImagesEXT(device, pReleaseInfo); + vku::safe_VkReleaseSwapchainImagesInfoEXT var_local_pReleaseInfo; + vku::safe_VkReleaseSwapchainImagesInfoEXT* local_pReleaseInfo = nullptr; + { + if (pReleaseInfo) { + local_pReleaseInfo = &var_local_pReleaseInfo; + local_pReleaseInfo->initialize(pReleaseInfo); + + if (pReleaseInfo->swapchain) { + local_pReleaseInfo->swapchain = Unwrap(pReleaseInfo->swapchain); + } + } + } + VkResult result = + device_dispatch_table.ReleaseSwapchainImagesEXT(device, (const VkReleaseSwapchainImagesInfoEXT*)local_pReleaseInfo); + + return result; +} + +void DispatchObject::GetGeneratedCommandsMemoryRequirementsNV(VkDevice device, + const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo, + VkMemoryRequirements2* pMemoryRequirements) { + if (!wrap_handles) return device_dispatch_table.GetGeneratedCommandsMemoryRequirementsNV(device, pInfo, pMemoryRequirements); + vku::safe_VkGeneratedCommandsMemoryRequirementsInfoNV var_local_pInfo; + vku::safe_VkGeneratedCommandsMemoryRequirementsInfoNV* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->pipeline) { + local_pInfo->pipeline = Unwrap(pInfo->pipeline); + } + if (pInfo->indirectCommandsLayout) { + local_pInfo->indirectCommandsLayout = Unwrap(pInfo->indirectCommandsLayout); + } + } + } + device_dispatch_table.GetGeneratedCommandsMemoryRequirementsNV( + device, (const VkGeneratedCommandsMemoryRequirementsInfoNV*)local_pInfo, pMemoryRequirements); +} + +void DispatchObject::CmdPreprocessGeneratedCommandsNV(VkCommandBuffer commandBuffer, + const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo) { + if (!wrap_handles) return device_dispatch_table.CmdPreprocessGeneratedCommandsNV(commandBuffer, pGeneratedCommandsInfo); + vku::safe_VkGeneratedCommandsInfoNV var_local_pGeneratedCommandsInfo; + vku::safe_VkGeneratedCommandsInfoNV* local_pGeneratedCommandsInfo = nullptr; + { + if (pGeneratedCommandsInfo) { + local_pGeneratedCommandsInfo = &var_local_pGeneratedCommandsInfo; + local_pGeneratedCommandsInfo->initialize(pGeneratedCommandsInfo); + + if (pGeneratedCommandsInfo->pipeline) { + local_pGeneratedCommandsInfo->pipeline = Unwrap(pGeneratedCommandsInfo->pipeline); + } + if (pGeneratedCommandsInfo->indirectCommandsLayout) { + local_pGeneratedCommandsInfo->indirectCommandsLayout = Unwrap(pGeneratedCommandsInfo->indirectCommandsLayout); + } + if (local_pGeneratedCommandsInfo->pStreams) { + for (uint32_t index1 = 0; index1 < local_pGeneratedCommandsInfo->streamCount; ++index1) { + if (pGeneratedCommandsInfo->pStreams[index1].buffer) { + local_pGeneratedCommandsInfo->pStreams[index1].buffer = + Unwrap(pGeneratedCommandsInfo->pStreams[index1].buffer); + } + } + } + + if (pGeneratedCommandsInfo->preprocessBuffer) { + local_pGeneratedCommandsInfo->preprocessBuffer = Unwrap(pGeneratedCommandsInfo->preprocessBuffer); + } + if (pGeneratedCommandsInfo->sequencesCountBuffer) { + local_pGeneratedCommandsInfo->sequencesCountBuffer = Unwrap(pGeneratedCommandsInfo->sequencesCountBuffer); + } + if (pGeneratedCommandsInfo->sequencesIndexBuffer) { + local_pGeneratedCommandsInfo->sequencesIndexBuffer = Unwrap(pGeneratedCommandsInfo->sequencesIndexBuffer); + } + } + } + device_dispatch_table.CmdPreprocessGeneratedCommandsNV(commandBuffer, + (const VkGeneratedCommandsInfoNV*)local_pGeneratedCommandsInfo); +} + +void DispatchObject::CmdExecuteGeneratedCommandsNV(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, + const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo) { + if (!wrap_handles) + return device_dispatch_table.CmdExecuteGeneratedCommandsNV(commandBuffer, isPreprocessed, pGeneratedCommandsInfo); + vku::safe_VkGeneratedCommandsInfoNV var_local_pGeneratedCommandsInfo; + vku::safe_VkGeneratedCommandsInfoNV* local_pGeneratedCommandsInfo = nullptr; + { + if (pGeneratedCommandsInfo) { + local_pGeneratedCommandsInfo = &var_local_pGeneratedCommandsInfo; + local_pGeneratedCommandsInfo->initialize(pGeneratedCommandsInfo); + + if (pGeneratedCommandsInfo->pipeline) { + local_pGeneratedCommandsInfo->pipeline = Unwrap(pGeneratedCommandsInfo->pipeline); + } + if (pGeneratedCommandsInfo->indirectCommandsLayout) { + local_pGeneratedCommandsInfo->indirectCommandsLayout = Unwrap(pGeneratedCommandsInfo->indirectCommandsLayout); + } + if (local_pGeneratedCommandsInfo->pStreams) { + for (uint32_t index1 = 0; index1 < local_pGeneratedCommandsInfo->streamCount; ++index1) { + if (pGeneratedCommandsInfo->pStreams[index1].buffer) { + local_pGeneratedCommandsInfo->pStreams[index1].buffer = + Unwrap(pGeneratedCommandsInfo->pStreams[index1].buffer); + } + } + } + + if (pGeneratedCommandsInfo->preprocessBuffer) { + local_pGeneratedCommandsInfo->preprocessBuffer = Unwrap(pGeneratedCommandsInfo->preprocessBuffer); + } + if (pGeneratedCommandsInfo->sequencesCountBuffer) { + local_pGeneratedCommandsInfo->sequencesCountBuffer = Unwrap(pGeneratedCommandsInfo->sequencesCountBuffer); + } + if (pGeneratedCommandsInfo->sequencesIndexBuffer) { + local_pGeneratedCommandsInfo->sequencesIndexBuffer = Unwrap(pGeneratedCommandsInfo->sequencesIndexBuffer); + } + } + } + device_dispatch_table.CmdExecuteGeneratedCommandsNV(commandBuffer, isPreprocessed, + (const VkGeneratedCommandsInfoNV*)local_pGeneratedCommandsInfo); +} + +void DispatchObject::CmdBindPipelineShaderGroupNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipeline pipeline, uint32_t groupIndex) { + if (!wrap_handles) + return device_dispatch_table.CmdBindPipelineShaderGroupNV(commandBuffer, pipelineBindPoint, pipeline, groupIndex); + { pipeline = Unwrap(pipeline); } + device_dispatch_table.CmdBindPipelineShaderGroupNV(commandBuffer, pipelineBindPoint, pipeline, groupIndex); +} + +VkResult DispatchObject::CreateIndirectCommandsLayoutNV(VkDevice device, const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkIndirectCommandsLayoutNV* pIndirectCommandsLayout) { + if (!wrap_handles) + return device_dispatch_table.CreateIndirectCommandsLayoutNV(device, pCreateInfo, pAllocator, pIndirectCommandsLayout); + vku::safe_VkIndirectCommandsLayoutCreateInfoNV var_local_pCreateInfo; + vku::safe_VkIndirectCommandsLayoutCreateInfoNV* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + if (local_pCreateInfo->pTokens) { + for (uint32_t index1 = 0; index1 < local_pCreateInfo->tokenCount; ++index1) { + if (pCreateInfo->pTokens[index1].pushconstantPipelineLayout) { + local_pCreateInfo->pTokens[index1].pushconstantPipelineLayout = + Unwrap(pCreateInfo->pTokens[index1].pushconstantPipelineLayout); + } + } + } + } + } + VkResult result = device_dispatch_table.CreateIndirectCommandsLayoutNV( + device, (const VkIndirectCommandsLayoutCreateInfoNV*)local_pCreateInfo, pAllocator, pIndirectCommandsLayout); + if (VK_SUCCESS == result) { + *pIndirectCommandsLayout = WrapNew(*pIndirectCommandsLayout); + } + return result; +} + +void DispatchObject::DestroyIndirectCommandsLayoutNV(VkDevice device, VkIndirectCommandsLayoutNV indirectCommandsLayout, + const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyIndirectCommandsLayoutNV(device, indirectCommandsLayout, pAllocator); + + uint64_t indirectCommandsLayout_id = CastToUint64(indirectCommandsLayout); + auto iter = unique_id_mapping.pop(indirectCommandsLayout_id); + if (iter != unique_id_mapping.end()) { + indirectCommandsLayout = (VkIndirectCommandsLayoutNV)iter->second; + } else { + indirectCommandsLayout = (VkIndirectCommandsLayoutNV)0; + } + device_dispatch_table.DestroyIndirectCommandsLayoutNV(device, indirectCommandsLayout, pAllocator); +} + +void DispatchObject::CmdSetDepthBias2EXT(VkCommandBuffer commandBuffer, const VkDepthBiasInfoEXT* pDepthBiasInfo) { + device_dispatch_table.CmdSetDepthBias2EXT(commandBuffer, pDepthBiasInfo); +} + +VkResult DispatchObject::AcquireDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, VkDisplayKHR display) { + if (!wrap_handles) return instance_dispatch_table.AcquireDrmDisplayEXT(physicalDevice, drmFd, display); + { display = Unwrap(display); } + VkResult result = instance_dispatch_table.AcquireDrmDisplayEXT(physicalDevice, drmFd, display); + + return result; +} + +VkResult DispatchObject::GetDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, uint32_t connectorId, + VkDisplayKHR* display) { + if (!wrap_handles) return instance_dispatch_table.GetDrmDisplayEXT(physicalDevice, drmFd, connectorId, display); + + VkResult result = instance_dispatch_table.GetDrmDisplayEXT(physicalDevice, drmFd, connectorId, display); + if (VK_SUCCESS == result) { + *display = MaybeWrapDisplay(*display); + } + return result; +} + +VkResult DispatchObject::CreatePrivateDataSlotEXT(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot) { + if (!wrap_handles) return device_dispatch_table.CreatePrivateDataSlotEXT(device, pCreateInfo, pAllocator, pPrivateDataSlot); + + VkResult result = device_dispatch_table.CreatePrivateDataSlotEXT(device, pCreateInfo, pAllocator, pPrivateDataSlot); + if (VK_SUCCESS == result) { + *pPrivateDataSlot = WrapNew(*pPrivateDataSlot); + } + return result; +} + +void DispatchObject::DestroyPrivateDataSlotEXT(VkDevice device, VkPrivateDataSlot privateDataSlot, + const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyPrivateDataSlotEXT(device, privateDataSlot, pAllocator); + + uint64_t privateDataSlot_id = CastToUint64(privateDataSlot); + auto iter = unique_id_mapping.pop(privateDataSlot_id); + if (iter != unique_id_mapping.end()) { + privateDataSlot = (VkPrivateDataSlot)iter->second; + } else { + privateDataSlot = (VkPrivateDataSlot)0; + } + device_dispatch_table.DestroyPrivateDataSlotEXT(device, privateDataSlot, pAllocator); +} + +VkResult DispatchObject::SetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, + VkPrivateDataSlot privateDataSlot, uint64_t data) { + if (!wrap_handles) return device_dispatch_table.SetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, data); + { + if (NotDispatchableHandle(objectType)) { + objectHandle = Unwrap(objectHandle); + } + privateDataSlot = Unwrap(privateDataSlot); + } + VkResult result = device_dispatch_table.SetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, data); + + return result; +} + +void DispatchObject::GetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, + VkPrivateDataSlot privateDataSlot, uint64_t* pData) { + if (!wrap_handles) return device_dispatch_table.GetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, pData); + { + if (NotDispatchableHandle(objectType)) { + objectHandle = Unwrap(objectHandle); + } + privateDataSlot = Unwrap(privateDataSlot); + } + device_dispatch_table.GetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, pData); +} + +VkResult DispatchObject::CreateCudaModuleNV(VkDevice device, const VkCudaModuleCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCudaModuleNV* pModule) { + if (!wrap_handles) return device_dispatch_table.CreateCudaModuleNV(device, pCreateInfo, pAllocator, pModule); + + VkResult result = device_dispatch_table.CreateCudaModuleNV(device, pCreateInfo, pAllocator, pModule); + if (VK_SUCCESS == result) { + *pModule = WrapNew(*pModule); + } + return result; +} + +VkResult DispatchObject::GetCudaModuleCacheNV(VkDevice device, VkCudaModuleNV module, size_t* pCacheSize, void* pCacheData) { + if (!wrap_handles) return device_dispatch_table.GetCudaModuleCacheNV(device, module, pCacheSize, pCacheData); + { module = Unwrap(module); } + VkResult result = device_dispatch_table.GetCudaModuleCacheNV(device, module, pCacheSize, pCacheData); + + return result; +} + +VkResult DispatchObject::CreateCudaFunctionNV(VkDevice device, const VkCudaFunctionCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCudaFunctionNV* pFunction) { + if (!wrap_handles) return device_dispatch_table.CreateCudaFunctionNV(device, pCreateInfo, pAllocator, pFunction); + vku::safe_VkCudaFunctionCreateInfoNV var_local_pCreateInfo; + vku::safe_VkCudaFunctionCreateInfoNV* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + + if (pCreateInfo->module) { + local_pCreateInfo->module = Unwrap(pCreateInfo->module); + } + } + } + VkResult result = device_dispatch_table.CreateCudaFunctionNV(device, (const VkCudaFunctionCreateInfoNV*)local_pCreateInfo, + pAllocator, pFunction); + if (VK_SUCCESS == result) { + *pFunction = WrapNew(*pFunction); + } + return result; +} + +void DispatchObject::DestroyCudaModuleNV(VkDevice device, VkCudaModuleNV module, const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyCudaModuleNV(device, module, pAllocator); + + uint64_t module_id = CastToUint64(module); + auto iter = unique_id_mapping.pop(module_id); + if (iter != unique_id_mapping.end()) { + module = (VkCudaModuleNV)iter->second; + } else { + module = (VkCudaModuleNV)0; + } + device_dispatch_table.DestroyCudaModuleNV(device, module, pAllocator); +} + +void DispatchObject::DestroyCudaFunctionNV(VkDevice device, VkCudaFunctionNV function, const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyCudaFunctionNV(device, function, pAllocator); + + uint64_t function_id = CastToUint64(function); + auto iter = unique_id_mapping.pop(function_id); + if (iter != unique_id_mapping.end()) { + function = (VkCudaFunctionNV)iter->second; + } else { + function = (VkCudaFunctionNV)0; + } + device_dispatch_table.DestroyCudaFunctionNV(device, function, pAllocator); +} + +void DispatchObject::CmdCudaLaunchKernelNV(VkCommandBuffer commandBuffer, const VkCudaLaunchInfoNV* pLaunchInfo) { + if (!wrap_handles) return device_dispatch_table.CmdCudaLaunchKernelNV(commandBuffer, pLaunchInfo); + vku::safe_VkCudaLaunchInfoNV var_local_pLaunchInfo; + vku::safe_VkCudaLaunchInfoNV* local_pLaunchInfo = nullptr; + { + if (pLaunchInfo) { + local_pLaunchInfo = &var_local_pLaunchInfo; + local_pLaunchInfo->initialize(pLaunchInfo); + + if (pLaunchInfo->function) { + local_pLaunchInfo->function = Unwrap(pLaunchInfo->function); + } + } + } + device_dispatch_table.CmdCudaLaunchKernelNV(commandBuffer, (const VkCudaLaunchInfoNV*)local_pLaunchInfo); +} + +void DispatchObject::GetDescriptorSetLayoutSizeEXT(VkDevice device, VkDescriptorSetLayout layout, + VkDeviceSize* pLayoutSizeInBytes) { + if (!wrap_handles) return device_dispatch_table.GetDescriptorSetLayoutSizeEXT(device, layout, pLayoutSizeInBytes); + { layout = Unwrap(layout); } + device_dispatch_table.GetDescriptorSetLayoutSizeEXT(device, layout, pLayoutSizeInBytes); +} + +void DispatchObject::GetDescriptorSetLayoutBindingOffsetEXT(VkDevice device, VkDescriptorSetLayout layout, uint32_t binding, + VkDeviceSize* pOffset) { + if (!wrap_handles) return device_dispatch_table.GetDescriptorSetLayoutBindingOffsetEXT(device, layout, binding, pOffset); + { layout = Unwrap(layout); } + device_dispatch_table.GetDescriptorSetLayoutBindingOffsetEXT(device, layout, binding, pOffset); +} + +void DispatchObject::CmdBindDescriptorBuffersEXT(VkCommandBuffer commandBuffer, uint32_t bufferCount, + const VkDescriptorBufferBindingInfoEXT* pBindingInfos) { + if (!wrap_handles) return device_dispatch_table.CmdBindDescriptorBuffersEXT(commandBuffer, bufferCount, pBindingInfos); + small_vector var_local_pBindingInfos; + vku::safe_VkDescriptorBufferBindingInfoEXT* local_pBindingInfos = nullptr; + { + if (pBindingInfos) { + var_local_pBindingInfos.resize(bufferCount); + local_pBindingInfos = var_local_pBindingInfos.data(); + for (uint32_t index0 = 0; index0 < bufferCount; ++index0) { + local_pBindingInfos[index0].initialize(&pBindingInfos[index0]); + UnwrapPnextChainHandles(local_pBindingInfos[index0].pNext); + } + } + } + device_dispatch_table.CmdBindDescriptorBuffersEXT(commandBuffer, bufferCount, + (const VkDescriptorBufferBindingInfoEXT*)local_pBindingInfos); +} + +void DispatchObject::CmdSetDescriptorBufferOffsetsEXT(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, + const uint32_t* pBufferIndices, const VkDeviceSize* pOffsets) { + if (!wrap_handles) + return device_dispatch_table.CmdSetDescriptorBufferOffsetsEXT(commandBuffer, pipelineBindPoint, layout, firstSet, setCount, + pBufferIndices, pOffsets); + { layout = Unwrap(layout); } + device_dispatch_table.CmdSetDescriptorBufferOffsetsEXT(commandBuffer, pipelineBindPoint, layout, firstSet, setCount, + pBufferIndices, pOffsets); +} + +void DispatchObject::CmdBindDescriptorBufferEmbeddedSamplersEXT(VkCommandBuffer commandBuffer, + VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, + uint32_t set) { + if (!wrap_handles) + return device_dispatch_table.CmdBindDescriptorBufferEmbeddedSamplersEXT(commandBuffer, pipelineBindPoint, layout, set); + { layout = Unwrap(layout); } + device_dispatch_table.CmdBindDescriptorBufferEmbeddedSamplersEXT(commandBuffer, pipelineBindPoint, layout, set); +} + +VkResult DispatchObject::GetBufferOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkBufferCaptureDescriptorDataInfoEXT* pInfo, + void* pData) { + if (!wrap_handles) return device_dispatch_table.GetBufferOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); + vku::safe_VkBufferCaptureDescriptorDataInfoEXT var_local_pInfo; + vku::safe_VkBufferCaptureDescriptorDataInfoEXT* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->buffer) { + local_pInfo->buffer = Unwrap(pInfo->buffer); + } + } + } + VkResult result = device_dispatch_table.GetBufferOpaqueCaptureDescriptorDataEXT( + device, (const VkBufferCaptureDescriptorDataInfoEXT*)local_pInfo, pData); + + return result; +} + +VkResult DispatchObject::GetImageOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkImageCaptureDescriptorDataInfoEXT* pInfo, + void* pData) { + if (!wrap_handles) return device_dispatch_table.GetImageOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); + vku::safe_VkImageCaptureDescriptorDataInfoEXT var_local_pInfo; + vku::safe_VkImageCaptureDescriptorDataInfoEXT* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->image) { + local_pInfo->image = Unwrap(pInfo->image); + } + } + } + VkResult result = device_dispatch_table.GetImageOpaqueCaptureDescriptorDataEXT( + device, (const VkImageCaptureDescriptorDataInfoEXT*)local_pInfo, pData); + + return result; +} + +VkResult DispatchObject::GetImageViewOpaqueCaptureDescriptorDataEXT(VkDevice device, + const VkImageViewCaptureDescriptorDataInfoEXT* pInfo, + void* pData) { + if (!wrap_handles) return device_dispatch_table.GetImageViewOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); + vku::safe_VkImageViewCaptureDescriptorDataInfoEXT var_local_pInfo; + vku::safe_VkImageViewCaptureDescriptorDataInfoEXT* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->imageView) { + local_pInfo->imageView = Unwrap(pInfo->imageView); + } + } + } + VkResult result = device_dispatch_table.GetImageViewOpaqueCaptureDescriptorDataEXT( + device, (const VkImageViewCaptureDescriptorDataInfoEXT*)local_pInfo, pData); + + return result; +} + +VkResult DispatchObject::GetSamplerOpaqueCaptureDescriptorDataEXT(VkDevice device, + const VkSamplerCaptureDescriptorDataInfoEXT* pInfo, void* pData) { + if (!wrap_handles) return device_dispatch_table.GetSamplerOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); + vku::safe_VkSamplerCaptureDescriptorDataInfoEXT var_local_pInfo; + vku::safe_VkSamplerCaptureDescriptorDataInfoEXT* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->sampler) { + local_pInfo->sampler = Unwrap(pInfo->sampler); + } + } + } + VkResult result = device_dispatch_table.GetSamplerOpaqueCaptureDescriptorDataEXT( + device, (const VkSamplerCaptureDescriptorDataInfoEXT*)local_pInfo, pData); + + return result; +} + +VkResult DispatchObject::GetAccelerationStructureOpaqueCaptureDescriptorDataEXT( + VkDevice device, const VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfo, void* pData) { + if (!wrap_handles) return device_dispatch_table.GetAccelerationStructureOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); + vku::safe_VkAccelerationStructureCaptureDescriptorDataInfoEXT var_local_pInfo; + vku::safe_VkAccelerationStructureCaptureDescriptorDataInfoEXT* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->accelerationStructure) { + local_pInfo->accelerationStructure = Unwrap(pInfo->accelerationStructure); + } + if (pInfo->accelerationStructureNV) { + local_pInfo->accelerationStructureNV = Unwrap(pInfo->accelerationStructureNV); + } + } + } + VkResult result = device_dispatch_table.GetAccelerationStructureOpaqueCaptureDescriptorDataEXT( + device, (const VkAccelerationStructureCaptureDescriptorDataInfoEXT*)local_pInfo, pData); + + return result; +} + +void DispatchObject::CmdSetFragmentShadingRateEnumNV(VkCommandBuffer commandBuffer, VkFragmentShadingRateNV shadingRate, + const VkFragmentShadingRateCombinerOpKHR combinerOps[2]) { + device_dispatch_table.CmdSetFragmentShadingRateEnumNV(commandBuffer, shadingRate, combinerOps); +} + +VkResult DispatchObject::GetDeviceFaultInfoEXT(VkDevice device, VkDeviceFaultCountsEXT* pFaultCounts, + VkDeviceFaultInfoEXT* pFaultInfo) { + VkResult result = device_dispatch_table.GetDeviceFaultInfoEXT(device, pFaultCounts, pFaultInfo); + + return result; +} +#ifdef VK_USE_PLATFORM_WIN32_KHR + +VkResult DispatchObject::AcquireWinrtDisplayNV(VkPhysicalDevice physicalDevice, VkDisplayKHR display) { + if (!wrap_handles) return instance_dispatch_table.AcquireWinrtDisplayNV(physicalDevice, display); + { display = Unwrap(display); } + VkResult result = instance_dispatch_table.AcquireWinrtDisplayNV(physicalDevice, display); + + return result; +} + +VkResult DispatchObject::GetWinrtDisplayNV(VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR* pDisplay) { + if (!wrap_handles) return instance_dispatch_table.GetWinrtDisplayNV(physicalDevice, deviceRelativeId, pDisplay); + + VkResult result = instance_dispatch_table.GetWinrtDisplayNV(physicalDevice, deviceRelativeId, pDisplay); + if (VK_SUCCESS == result) { + *pDisplay = MaybeWrapDisplay(*pDisplay); + } + return result; +} +#endif // VK_USE_PLATFORM_WIN32_KHR +#ifdef VK_USE_PLATFORM_DIRECTFB_EXT + +VkResult DispatchObject::CreateDirectFBSurfaceEXT(VkInstance instance, const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + if (!wrap_handles) return instance_dispatch_table.CreateDirectFBSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); + + VkResult result = instance_dispatch_table.CreateDirectFBSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); + if (VK_SUCCESS == result) { + *pSurface = WrapNew(*pSurface); + } + return result; +} + +VkBool32 DispatchObject::GetPhysicalDeviceDirectFBPresentationSupportEXT(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + IDirectFB* dfb) { + VkBool32 result = + instance_dispatch_table.GetPhysicalDeviceDirectFBPresentationSupportEXT(physicalDevice, queueFamilyIndex, dfb); + + return result; +} +#endif // VK_USE_PLATFORM_DIRECTFB_EXT + +void DispatchObject::CmdSetVertexInputEXT(VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, + const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, + uint32_t vertexAttributeDescriptionCount, + const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions) { + device_dispatch_table.CmdSetVertexInputEXT(commandBuffer, vertexBindingDescriptionCount, pVertexBindingDescriptions, + vertexAttributeDescriptionCount, pVertexAttributeDescriptions); +} +#ifdef VK_USE_PLATFORM_FUCHSIA + +VkResult DispatchObject::GetMemoryZirconHandleFUCHSIA(VkDevice device, + const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, + zx_handle_t* pZirconHandle) { + if (!wrap_handles) return device_dispatch_table.GetMemoryZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle); + vku::safe_VkMemoryGetZirconHandleInfoFUCHSIA var_local_pGetZirconHandleInfo; + vku::safe_VkMemoryGetZirconHandleInfoFUCHSIA* local_pGetZirconHandleInfo = nullptr; + { + if (pGetZirconHandleInfo) { + local_pGetZirconHandleInfo = &var_local_pGetZirconHandleInfo; + local_pGetZirconHandleInfo->initialize(pGetZirconHandleInfo); + + if (pGetZirconHandleInfo->memory) { + local_pGetZirconHandleInfo->memory = Unwrap(pGetZirconHandleInfo->memory); + } + } + } + VkResult result = device_dispatch_table.GetMemoryZirconHandleFUCHSIA( + device, (const VkMemoryGetZirconHandleInfoFUCHSIA*)local_pGetZirconHandleInfo, pZirconHandle); + + return result; +} + +VkResult DispatchObject::GetMemoryZirconHandlePropertiesFUCHSIA( + VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, + VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties) { + VkResult result = device_dispatch_table.GetMemoryZirconHandlePropertiesFUCHSIA(device, handleType, zirconHandle, + pMemoryZirconHandleProperties); + + return result; +} + +VkResult DispatchObject::ImportSemaphoreZirconHandleFUCHSIA( + VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo) { + if (!wrap_handles) return device_dispatch_table.ImportSemaphoreZirconHandleFUCHSIA(device, pImportSemaphoreZirconHandleInfo); + vku::safe_VkImportSemaphoreZirconHandleInfoFUCHSIA var_local_pImportSemaphoreZirconHandleInfo; + vku::safe_VkImportSemaphoreZirconHandleInfoFUCHSIA* local_pImportSemaphoreZirconHandleInfo = nullptr; + { + if (pImportSemaphoreZirconHandleInfo) { + local_pImportSemaphoreZirconHandleInfo = &var_local_pImportSemaphoreZirconHandleInfo; + local_pImportSemaphoreZirconHandleInfo->initialize(pImportSemaphoreZirconHandleInfo); + + if (pImportSemaphoreZirconHandleInfo->semaphore) { + local_pImportSemaphoreZirconHandleInfo->semaphore = Unwrap(pImportSemaphoreZirconHandleInfo->semaphore); + } + } + } + VkResult result = device_dispatch_table.ImportSemaphoreZirconHandleFUCHSIA( + device, (const VkImportSemaphoreZirconHandleInfoFUCHSIA*)local_pImportSemaphoreZirconHandleInfo); + + return result; +} + +VkResult DispatchObject::GetSemaphoreZirconHandleFUCHSIA(VkDevice device, + const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, + zx_handle_t* pZirconHandle) { + if (!wrap_handles) return device_dispatch_table.GetSemaphoreZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle); + vku::safe_VkSemaphoreGetZirconHandleInfoFUCHSIA var_local_pGetZirconHandleInfo; + vku::safe_VkSemaphoreGetZirconHandleInfoFUCHSIA* local_pGetZirconHandleInfo = nullptr; + { + if (pGetZirconHandleInfo) { + local_pGetZirconHandleInfo = &var_local_pGetZirconHandleInfo; + local_pGetZirconHandleInfo->initialize(pGetZirconHandleInfo); + + if (pGetZirconHandleInfo->semaphore) { + local_pGetZirconHandleInfo->semaphore = Unwrap(pGetZirconHandleInfo->semaphore); + } + } + } + VkResult result = device_dispatch_table.GetSemaphoreZirconHandleFUCHSIA( + device, (const VkSemaphoreGetZirconHandleInfoFUCHSIA*)local_pGetZirconHandleInfo, pZirconHandle); + + return result; +} + +VkResult DispatchObject::CreateBufferCollectionFUCHSIA(VkDevice device, const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkBufferCollectionFUCHSIA* pCollection) { + if (!wrap_handles) return device_dispatch_table.CreateBufferCollectionFUCHSIA(device, pCreateInfo, pAllocator, pCollection); + + VkResult result = device_dispatch_table.CreateBufferCollectionFUCHSIA(device, pCreateInfo, pAllocator, pCollection); + if (VK_SUCCESS == result) { + *pCollection = WrapNew(*pCollection); + } + return result; +} + +VkResult DispatchObject::SetBufferCollectionImageConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, + const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo) { + if (!wrap_handles) + return device_dispatch_table.SetBufferCollectionImageConstraintsFUCHSIA(device, collection, pImageConstraintsInfo); + { collection = Unwrap(collection); } + VkResult result = device_dispatch_table.SetBufferCollectionImageConstraintsFUCHSIA(device, collection, pImageConstraintsInfo); + + return result; +} + +VkResult DispatchObject::SetBufferCollectionBufferConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, + const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo) { + if (!wrap_handles) + return device_dispatch_table.SetBufferCollectionBufferConstraintsFUCHSIA(device, collection, pBufferConstraintsInfo); + { collection = Unwrap(collection); } + VkResult result = device_dispatch_table.SetBufferCollectionBufferConstraintsFUCHSIA(device, collection, pBufferConstraintsInfo); + + return result; +} + +void DispatchObject::DestroyBufferCollectionFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, + const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyBufferCollectionFUCHSIA(device, collection, pAllocator); + + uint64_t collection_id = CastToUint64(collection); + auto iter = unique_id_mapping.pop(collection_id); + if (iter != unique_id_mapping.end()) { + collection = (VkBufferCollectionFUCHSIA)iter->second; + } else { + collection = (VkBufferCollectionFUCHSIA)0; + } + device_dispatch_table.DestroyBufferCollectionFUCHSIA(device, collection, pAllocator); +} + +VkResult DispatchObject::GetBufferCollectionPropertiesFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, + VkBufferCollectionPropertiesFUCHSIA* pProperties) { + if (!wrap_handles) return device_dispatch_table.GetBufferCollectionPropertiesFUCHSIA(device, collection, pProperties); + { collection = Unwrap(collection); } + VkResult result = device_dispatch_table.GetBufferCollectionPropertiesFUCHSIA(device, collection, pProperties); + + return result; +} +#endif // VK_USE_PLATFORM_FUCHSIA + +VkResult DispatchObject::GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(VkDevice device, VkRenderPass renderpass, + VkExtent2D* pMaxWorkgroupSize) { + if (!wrap_handles) + return device_dispatch_table.GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(device, renderpass, pMaxWorkgroupSize); + { renderpass = Unwrap(renderpass); } + VkResult result = device_dispatch_table.GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(device, renderpass, pMaxWorkgroupSize); + + return result; +} + +void DispatchObject::CmdSubpassShadingHUAWEI(VkCommandBuffer commandBuffer) { + device_dispatch_table.CmdSubpassShadingHUAWEI(commandBuffer); +} + +void DispatchObject::CmdBindInvocationMaskHUAWEI(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout) { + if (!wrap_handles) return device_dispatch_table.CmdBindInvocationMaskHUAWEI(commandBuffer, imageView, imageLayout); + { imageView = Unwrap(imageView); } + device_dispatch_table.CmdBindInvocationMaskHUAWEI(commandBuffer, imageView, imageLayout); +} + +VkResult DispatchObject::GetMemoryRemoteAddressNV(VkDevice device, + const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo, + VkRemoteAddressNV* pAddress) { + if (!wrap_handles) return device_dispatch_table.GetMemoryRemoteAddressNV(device, pMemoryGetRemoteAddressInfo, pAddress); + vku::safe_VkMemoryGetRemoteAddressInfoNV var_local_pMemoryGetRemoteAddressInfo; + vku::safe_VkMemoryGetRemoteAddressInfoNV* local_pMemoryGetRemoteAddressInfo = nullptr; + { + if (pMemoryGetRemoteAddressInfo) { + local_pMemoryGetRemoteAddressInfo = &var_local_pMemoryGetRemoteAddressInfo; + local_pMemoryGetRemoteAddressInfo->initialize(pMemoryGetRemoteAddressInfo); + + if (pMemoryGetRemoteAddressInfo->memory) { + local_pMemoryGetRemoteAddressInfo->memory = Unwrap(pMemoryGetRemoteAddressInfo->memory); + } + } + } + VkResult result = device_dispatch_table.GetMemoryRemoteAddressNV( + device, (const VkMemoryGetRemoteAddressInfoNV*)local_pMemoryGetRemoteAddressInfo, pAddress); + + return result; +} + +VkResult DispatchObject::GetPipelinePropertiesEXT(VkDevice device, const VkPipelineInfoEXT* pPipelineInfo, + VkBaseOutStructure* pPipelineProperties) { + VkResult result = device_dispatch_table.GetPipelinePropertiesEXT(device, pPipelineInfo, pPipelineProperties); + + return result; +} + +void DispatchObject::CmdSetPatchControlPointsEXT(VkCommandBuffer commandBuffer, uint32_t patchControlPoints) { + device_dispatch_table.CmdSetPatchControlPointsEXT(commandBuffer, patchControlPoints); +} + +void DispatchObject::CmdSetRasterizerDiscardEnableEXT(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable) { + device_dispatch_table.CmdSetRasterizerDiscardEnableEXT(commandBuffer, rasterizerDiscardEnable); +} + +void DispatchObject::CmdSetDepthBiasEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable) { + device_dispatch_table.CmdSetDepthBiasEnableEXT(commandBuffer, depthBiasEnable); +} + +void DispatchObject::CmdSetLogicOpEXT(VkCommandBuffer commandBuffer, VkLogicOp logicOp) { + device_dispatch_table.CmdSetLogicOpEXT(commandBuffer, logicOp); +} + +void DispatchObject::CmdSetPrimitiveRestartEnableEXT(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable) { + device_dispatch_table.CmdSetPrimitiveRestartEnableEXT(commandBuffer, primitiveRestartEnable); +} +#ifdef VK_USE_PLATFORM_SCREEN_QNX + +VkResult DispatchObject::CreateScreenSurfaceQNX(VkInstance instance, const VkScreenSurfaceCreateInfoQNX* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { + if (!wrap_handles) return instance_dispatch_table.CreateScreenSurfaceQNX(instance, pCreateInfo, pAllocator, pSurface); + + VkResult result = instance_dispatch_table.CreateScreenSurfaceQNX(instance, pCreateInfo, pAllocator, pSurface); + if (VK_SUCCESS == result) { + *pSurface = WrapNew(*pSurface); + } + return result; +} + +VkBool32 DispatchObject::GetPhysicalDeviceScreenPresentationSupportQNX(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + struct _screen_window* window) { + VkBool32 result = + instance_dispatch_table.GetPhysicalDeviceScreenPresentationSupportQNX(physicalDevice, queueFamilyIndex, window); + + return result; +} +#endif // VK_USE_PLATFORM_SCREEN_QNX + +void DispatchObject::CmdSetColorWriteEnableEXT(VkCommandBuffer commandBuffer, uint32_t attachmentCount, + const VkBool32* pColorWriteEnables) { + device_dispatch_table.CmdSetColorWriteEnableEXT(commandBuffer, attachmentCount, pColorWriteEnables); +} + +void DispatchObject::CmdDrawMultiEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawInfoEXT* pVertexInfo, + uint32_t instanceCount, uint32_t firstInstance, uint32_t stride) { + device_dispatch_table.CmdDrawMultiEXT(commandBuffer, drawCount, pVertexInfo, instanceCount, firstInstance, stride); +} + +void DispatchObject::CmdDrawMultiIndexedEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, + const VkMultiDrawIndexedInfoEXT* pIndexInfo, uint32_t instanceCount, + uint32_t firstInstance, uint32_t stride, const int32_t* pVertexOffset) { + device_dispatch_table.CmdDrawMultiIndexedEXT(commandBuffer, drawCount, pIndexInfo, instanceCount, firstInstance, stride, + pVertexOffset); +} + +VkResult DispatchObject::CreateMicromapEXT(VkDevice device, const VkMicromapCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkMicromapEXT* pMicromap) { + if (!wrap_handles) return device_dispatch_table.CreateMicromapEXT(device, pCreateInfo, pAllocator, pMicromap); + vku::safe_VkMicromapCreateInfoEXT var_local_pCreateInfo; + vku::safe_VkMicromapCreateInfoEXT* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + + if (pCreateInfo->buffer) { + local_pCreateInfo->buffer = Unwrap(pCreateInfo->buffer); + } + } + } + VkResult result = + device_dispatch_table.CreateMicromapEXT(device, (const VkMicromapCreateInfoEXT*)local_pCreateInfo, pAllocator, pMicromap); + if (VK_SUCCESS == result) { + *pMicromap = WrapNew(*pMicromap); + } + return result; +} + +void DispatchObject::DestroyMicromapEXT(VkDevice device, VkMicromapEXT micromap, const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyMicromapEXT(device, micromap, pAllocator); + + uint64_t micromap_id = CastToUint64(micromap); + auto iter = unique_id_mapping.pop(micromap_id); + if (iter != unique_id_mapping.end()) { + micromap = (VkMicromapEXT)iter->second; + } else { + micromap = (VkMicromapEXT)0; + } + device_dispatch_table.DestroyMicromapEXT(device, micromap, pAllocator); +} + +void DispatchObject::CmdBuildMicromapsEXT(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos) { + if (!wrap_handles) return device_dispatch_table.CmdBuildMicromapsEXT(commandBuffer, infoCount, pInfos); + small_vector var_local_pInfos; + vku::safe_VkMicromapBuildInfoEXT* local_pInfos = nullptr; + { + if (pInfos) { + var_local_pInfos.resize(infoCount); + local_pInfos = var_local_pInfos.data(); + for (uint32_t index0 = 0; index0 < infoCount; ++index0) { + local_pInfos[index0].initialize(&pInfos[index0]); + + if (pInfos[index0].dstMicromap) { + local_pInfos[index0].dstMicromap = Unwrap(pInfos[index0].dstMicromap); + } + } + } + } + device_dispatch_table.CmdBuildMicromapsEXT(commandBuffer, infoCount, (const VkMicromapBuildInfoEXT*)local_pInfos); +} + +VkResult DispatchObject::BuildMicromapsEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, + const VkMicromapBuildInfoEXT* pInfos) { + if (!wrap_handles) return device_dispatch_table.BuildMicromapsEXT(device, deferredOperation, infoCount, pInfos); + vku::safe_VkMicromapBuildInfoEXT* local_pInfos = nullptr; + { + deferredOperation = Unwrap(deferredOperation); + if (pInfos) { + local_pInfos = new vku::safe_VkMicromapBuildInfoEXT[infoCount]; + for (uint32_t index0 = 0; index0 < infoCount; ++index0) { + local_pInfos[index0].initialize(&pInfos[index0]); + + if (pInfos[index0].dstMicromap) { + local_pInfos[index0].dstMicromap = Unwrap(pInfos[index0].dstMicromap); + } + } + } + } + VkResult result = + device_dispatch_table.BuildMicromapsEXT(device, deferredOperation, infoCount, (const VkMicromapBuildInfoEXT*)local_pInfos); + if (local_pInfos) { + // Fix check for deferred ray tracing pipeline creation + // https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5817 + const bool is_operation_deferred = (deferredOperation != VK_NULL_HANDLE) && (result == VK_OPERATION_DEFERRED_KHR); + if (is_operation_deferred) { + std::vector> cleanup{[local_pInfos]() { delete[] local_pInfos; }}; + deferred_operation_post_completion.insert(deferredOperation, cleanup); + } else { + delete[] local_pInfos; + } + } + return result; +} + +VkResult DispatchObject::CopyMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMicromapInfoEXT* pInfo) { + if (!wrap_handles) return device_dispatch_table.CopyMicromapEXT(device, deferredOperation, pInfo); + vku::safe_VkCopyMicromapInfoEXT* local_pInfo = nullptr; + { + deferredOperation = Unwrap(deferredOperation); + if (pInfo) { + local_pInfo = new vku::safe_VkCopyMicromapInfoEXT; + local_pInfo->initialize(pInfo); + + if (pInfo->src) { + local_pInfo->src = Unwrap(pInfo->src); + } + if (pInfo->dst) { + local_pInfo->dst = Unwrap(pInfo->dst); + } + } + } + VkResult result = device_dispatch_table.CopyMicromapEXT(device, deferredOperation, (const VkCopyMicromapInfoEXT*)local_pInfo); + if (local_pInfo) { + // Fix check for deferred ray tracing pipeline creation + // https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5817 + const bool is_operation_deferred = (deferredOperation != VK_NULL_HANDLE) && (result == VK_OPERATION_DEFERRED_KHR); + if (is_operation_deferred) { + std::vector> cleanup{[local_pInfo]() { delete local_pInfo; }}; + deferred_operation_post_completion.insert(deferredOperation, cleanup); + } else { + delete local_pInfo; + } + } + return result; +} + +VkResult DispatchObject::CopyMicromapToMemoryEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMicromapToMemoryInfoEXT* pInfo) { + if (!wrap_handles) return device_dispatch_table.CopyMicromapToMemoryEXT(device, deferredOperation, pInfo); + vku::safe_VkCopyMicromapToMemoryInfoEXT* local_pInfo = nullptr; + { + deferredOperation = Unwrap(deferredOperation); + if (pInfo) { + local_pInfo = new vku::safe_VkCopyMicromapToMemoryInfoEXT; + local_pInfo->initialize(pInfo); + + if (pInfo->src) { + local_pInfo->src = Unwrap(pInfo->src); + } + } + } + VkResult result = + device_dispatch_table.CopyMicromapToMemoryEXT(device, deferredOperation, (const VkCopyMicromapToMemoryInfoEXT*)local_pInfo); + if (local_pInfo) { + // Fix check for deferred ray tracing pipeline creation + // https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5817 + const bool is_operation_deferred = (deferredOperation != VK_NULL_HANDLE) && (result == VK_OPERATION_DEFERRED_KHR); + if (is_operation_deferred) { + std::vector> cleanup{[local_pInfo]() { delete local_pInfo; }}; + deferred_operation_post_completion.insert(deferredOperation, cleanup); + } else { + delete local_pInfo; + } + } + return result; +} + +VkResult DispatchObject::CopyMemoryToMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMemoryToMicromapInfoEXT* pInfo) { + if (!wrap_handles) return device_dispatch_table.CopyMemoryToMicromapEXT(device, deferredOperation, pInfo); + vku::safe_VkCopyMemoryToMicromapInfoEXT* local_pInfo = nullptr; + { + deferredOperation = Unwrap(deferredOperation); + if (pInfo) { + local_pInfo = new vku::safe_VkCopyMemoryToMicromapInfoEXT; + local_pInfo->initialize(pInfo); + + if (pInfo->dst) { + local_pInfo->dst = Unwrap(pInfo->dst); + } + } + } + VkResult result = + device_dispatch_table.CopyMemoryToMicromapEXT(device, deferredOperation, (const VkCopyMemoryToMicromapInfoEXT*)local_pInfo); + if (local_pInfo) { + // Fix check for deferred ray tracing pipeline creation + // https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5817 + const bool is_operation_deferred = (deferredOperation != VK_NULL_HANDLE) && (result == VK_OPERATION_DEFERRED_KHR); + if (is_operation_deferred) { + std::vector> cleanup{[local_pInfo]() { delete local_pInfo; }}; + deferred_operation_post_completion.insert(deferredOperation, cleanup); + } else { + delete local_pInfo; + } + } + return result; +} + +VkResult DispatchObject::WriteMicromapsPropertiesEXT(VkDevice device, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, + VkQueryType queryType, size_t dataSize, void* pData, size_t stride) { + if (!wrap_handles) + return device_dispatch_table.WriteMicromapsPropertiesEXT(device, micromapCount, pMicromaps, queryType, dataSize, pData, + stride); + small_vector var_local_pMicromaps; + VkMicromapEXT* local_pMicromaps = nullptr; + { + if (pMicromaps) { + var_local_pMicromaps.resize(micromapCount); + local_pMicromaps = var_local_pMicromaps.data(); + for (uint32_t index0 = 0; index0 < micromapCount; ++index0) { + local_pMicromaps[index0] = Unwrap(pMicromaps[index0]); + } + } + } + VkResult result = device_dispatch_table.WriteMicromapsPropertiesEXT( + device, micromapCount, (const VkMicromapEXT*)local_pMicromaps, queryType, dataSize, pData, stride); + + return result; +} + +void DispatchObject::CmdCopyMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT* pInfo) { + if (!wrap_handles) return device_dispatch_table.CmdCopyMicromapEXT(commandBuffer, pInfo); + vku::safe_VkCopyMicromapInfoEXT var_local_pInfo; + vku::safe_VkCopyMicromapInfoEXT* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->src) { + local_pInfo->src = Unwrap(pInfo->src); + } + if (pInfo->dst) { + local_pInfo->dst = Unwrap(pInfo->dst); + } + } + } + device_dispatch_table.CmdCopyMicromapEXT(commandBuffer, (const VkCopyMicromapInfoEXT*)local_pInfo); +} + +void DispatchObject::CmdCopyMicromapToMemoryEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT* pInfo) { + if (!wrap_handles) return device_dispatch_table.CmdCopyMicromapToMemoryEXT(commandBuffer, pInfo); + vku::safe_VkCopyMicromapToMemoryInfoEXT var_local_pInfo; + vku::safe_VkCopyMicromapToMemoryInfoEXT* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->src) { + local_pInfo->src = Unwrap(pInfo->src); + } + } + } + device_dispatch_table.CmdCopyMicromapToMemoryEXT(commandBuffer, (const VkCopyMicromapToMemoryInfoEXT*)local_pInfo); +} + +void DispatchObject::CmdCopyMemoryToMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT* pInfo) { + if (!wrap_handles) return device_dispatch_table.CmdCopyMemoryToMicromapEXT(commandBuffer, pInfo); + vku::safe_VkCopyMemoryToMicromapInfoEXT var_local_pInfo; + vku::safe_VkCopyMemoryToMicromapInfoEXT* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->dst) { + local_pInfo->dst = Unwrap(pInfo->dst); + } + } + } + device_dispatch_table.CmdCopyMemoryToMicromapEXT(commandBuffer, (const VkCopyMemoryToMicromapInfoEXT*)local_pInfo); +} + +void DispatchObject::CmdWriteMicromapsPropertiesEXT(VkCommandBuffer commandBuffer, uint32_t micromapCount, + const VkMicromapEXT* pMicromaps, VkQueryType queryType, VkQueryPool queryPool, + uint32_t firstQuery) { + if (!wrap_handles) + return device_dispatch_table.CmdWriteMicromapsPropertiesEXT(commandBuffer, micromapCount, pMicromaps, queryType, queryPool, + firstQuery); + small_vector var_local_pMicromaps; + VkMicromapEXT* local_pMicromaps = nullptr; + { + if (pMicromaps) { + var_local_pMicromaps.resize(micromapCount); + local_pMicromaps = var_local_pMicromaps.data(); + for (uint32_t index0 = 0; index0 < micromapCount; ++index0) { + local_pMicromaps[index0] = Unwrap(pMicromaps[index0]); + } + } + queryPool = Unwrap(queryPool); + } + device_dispatch_table.CmdWriteMicromapsPropertiesEXT(commandBuffer, micromapCount, (const VkMicromapEXT*)local_pMicromaps, + queryType, queryPool, firstQuery); +} + +void DispatchObject::GetDeviceMicromapCompatibilityEXT(VkDevice device, const VkMicromapVersionInfoEXT* pVersionInfo, + VkAccelerationStructureCompatibilityKHR* pCompatibility) { + device_dispatch_table.GetDeviceMicromapCompatibilityEXT(device, pVersionInfo, pCompatibility); +} + +void DispatchObject::GetMicromapBuildSizesEXT(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, + const VkMicromapBuildInfoEXT* pBuildInfo, VkMicromapBuildSizesInfoEXT* pSizeInfo) { + if (!wrap_handles) return device_dispatch_table.GetMicromapBuildSizesEXT(device, buildType, pBuildInfo, pSizeInfo); + vku::safe_VkMicromapBuildInfoEXT var_local_pBuildInfo; + vku::safe_VkMicromapBuildInfoEXT* local_pBuildInfo = nullptr; + { + if (pBuildInfo) { + local_pBuildInfo = &var_local_pBuildInfo; + local_pBuildInfo->initialize(pBuildInfo); + + if (pBuildInfo->dstMicromap) { + local_pBuildInfo->dstMicromap = Unwrap(pBuildInfo->dstMicromap); + } + } + } + device_dispatch_table.GetMicromapBuildSizesEXT(device, buildType, (const VkMicromapBuildInfoEXT*)local_pBuildInfo, pSizeInfo); +} + +void DispatchObject::CmdDrawClusterHUAWEI(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, + uint32_t groupCountZ) { + device_dispatch_table.CmdDrawClusterHUAWEI(commandBuffer, groupCountX, groupCountY, groupCountZ); +} + +void DispatchObject::CmdDrawClusterIndirectHUAWEI(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset) { + if (!wrap_handles) return device_dispatch_table.CmdDrawClusterIndirectHUAWEI(commandBuffer, buffer, offset); + { buffer = Unwrap(buffer); } + device_dispatch_table.CmdDrawClusterIndirectHUAWEI(commandBuffer, buffer, offset); +} + +void DispatchObject::SetDeviceMemoryPriorityEXT(VkDevice device, VkDeviceMemory memory, float priority) { + if (!wrap_handles) return device_dispatch_table.SetDeviceMemoryPriorityEXT(device, memory, priority); + { memory = Unwrap(memory); } + device_dispatch_table.SetDeviceMemoryPriorityEXT(device, memory, priority); +} + +void DispatchObject::GetDescriptorSetLayoutHostMappingInfoVALVE(VkDevice device, + const VkDescriptorSetBindingReferenceVALVE* pBindingReference, + VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping) { + if (!wrap_handles) + return device_dispatch_table.GetDescriptorSetLayoutHostMappingInfoVALVE(device, pBindingReference, pHostMapping); + vku::safe_VkDescriptorSetBindingReferenceVALVE var_local_pBindingReference; + vku::safe_VkDescriptorSetBindingReferenceVALVE* local_pBindingReference = nullptr; + { + if (pBindingReference) { + local_pBindingReference = &var_local_pBindingReference; + local_pBindingReference->initialize(pBindingReference); + + if (pBindingReference->descriptorSetLayout) { + local_pBindingReference->descriptorSetLayout = Unwrap(pBindingReference->descriptorSetLayout); + } + } + } + device_dispatch_table.GetDescriptorSetLayoutHostMappingInfoVALVE( + device, (const VkDescriptorSetBindingReferenceVALVE*)local_pBindingReference, pHostMapping); +} + +void DispatchObject::GetDescriptorSetHostMappingVALVE(VkDevice device, VkDescriptorSet descriptorSet, void** ppData) { + if (!wrap_handles) return device_dispatch_table.GetDescriptorSetHostMappingVALVE(device, descriptorSet, ppData); + { descriptorSet = Unwrap(descriptorSet); } + device_dispatch_table.GetDescriptorSetHostMappingVALVE(device, descriptorSet, ppData); +} + +void DispatchObject::CmdCopyMemoryIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, uint32_t copyCount, + uint32_t stride) { + device_dispatch_table.CmdCopyMemoryIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride); +} + +void DispatchObject::CmdCopyMemoryToImageIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, + uint32_t copyCount, uint32_t stride, VkImage dstImage, + VkImageLayout dstImageLayout, + const VkImageSubresourceLayers* pImageSubresources) { + if (!wrap_handles) + return device_dispatch_table.CmdCopyMemoryToImageIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride, dstImage, + dstImageLayout, pImageSubresources); + { dstImage = Unwrap(dstImage); } + device_dispatch_table.CmdCopyMemoryToImageIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride, dstImage, + dstImageLayout, pImageSubresources); +} + +void DispatchObject::CmdDecompressMemoryNV(VkCommandBuffer commandBuffer, uint32_t decompressRegionCount, + const VkDecompressMemoryRegionNV* pDecompressMemoryRegions) { + device_dispatch_table.CmdDecompressMemoryNV(commandBuffer, decompressRegionCount, pDecompressMemoryRegions); +} + +void DispatchObject::CmdDecompressMemoryIndirectCountNV(VkCommandBuffer commandBuffer, VkDeviceAddress indirectCommandsAddress, + VkDeviceAddress indirectCommandsCountAddress, uint32_t stride) { + device_dispatch_table.CmdDecompressMemoryIndirectCountNV(commandBuffer, indirectCommandsAddress, indirectCommandsCountAddress, + stride); +} + +void DispatchObject::GetPipelineIndirectMemoryRequirementsNV(VkDevice device, const VkComputePipelineCreateInfo* pCreateInfo, + VkMemoryRequirements2* pMemoryRequirements) { + if (!wrap_handles) + return device_dispatch_table.GetPipelineIndirectMemoryRequirementsNV(device, pCreateInfo, pMemoryRequirements); + vku::safe_VkComputePipelineCreateInfo var_local_pCreateInfo; + vku::safe_VkComputePipelineCreateInfo* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + + if (pCreateInfo->stage.module) { + local_pCreateInfo->stage.module = Unwrap(pCreateInfo->stage.module); + } + UnwrapPnextChainHandles(local_pCreateInfo->stage.pNext); + + if (pCreateInfo->layout) { + local_pCreateInfo->layout = Unwrap(pCreateInfo->layout); + } + if (pCreateInfo->basePipelineHandle) { + local_pCreateInfo->basePipelineHandle = Unwrap(pCreateInfo->basePipelineHandle); + } + UnwrapPnextChainHandles(local_pCreateInfo->pNext); + } + } + device_dispatch_table.GetPipelineIndirectMemoryRequirementsNV(device, (const VkComputePipelineCreateInfo*)local_pCreateInfo, + pMemoryRequirements); +} + +void DispatchObject::CmdUpdatePipelineIndirectBufferNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipeline pipeline) { + if (!wrap_handles) return device_dispatch_table.CmdUpdatePipelineIndirectBufferNV(commandBuffer, pipelineBindPoint, pipeline); + { pipeline = Unwrap(pipeline); } + device_dispatch_table.CmdUpdatePipelineIndirectBufferNV(commandBuffer, pipelineBindPoint, pipeline); +} + +VkDeviceAddress DispatchObject::GetPipelineIndirectDeviceAddressNV(VkDevice device, + const VkPipelineIndirectDeviceAddressInfoNV* pInfo) { + if (!wrap_handles) return device_dispatch_table.GetPipelineIndirectDeviceAddressNV(device, pInfo); + vku::safe_VkPipelineIndirectDeviceAddressInfoNV var_local_pInfo; + vku::safe_VkPipelineIndirectDeviceAddressInfoNV* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->pipeline) { + local_pInfo->pipeline = Unwrap(pInfo->pipeline); + } + } + } + VkDeviceAddress result = + device_dispatch_table.GetPipelineIndirectDeviceAddressNV(device, (const VkPipelineIndirectDeviceAddressInfoNV*)local_pInfo); + + return result; +} + +void DispatchObject::CmdSetDepthClampEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClampEnable) { + device_dispatch_table.CmdSetDepthClampEnableEXT(commandBuffer, depthClampEnable); +} + +void DispatchObject::CmdSetPolygonModeEXT(VkCommandBuffer commandBuffer, VkPolygonMode polygonMode) { + device_dispatch_table.CmdSetPolygonModeEXT(commandBuffer, polygonMode); +} + +void DispatchObject::CmdSetRasterizationSamplesEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits rasterizationSamples) { + device_dispatch_table.CmdSetRasterizationSamplesEXT(commandBuffer, rasterizationSamples); +} + +void DispatchObject::CmdSetSampleMaskEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits samples, + const VkSampleMask* pSampleMask) { + device_dispatch_table.CmdSetSampleMaskEXT(commandBuffer, samples, pSampleMask); +} + +void DispatchObject::CmdSetAlphaToCoverageEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToCoverageEnable) { + device_dispatch_table.CmdSetAlphaToCoverageEnableEXT(commandBuffer, alphaToCoverageEnable); +} + +void DispatchObject::CmdSetAlphaToOneEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToOneEnable) { + device_dispatch_table.CmdSetAlphaToOneEnableEXT(commandBuffer, alphaToOneEnable); +} + +void DispatchObject::CmdSetLogicOpEnableEXT(VkCommandBuffer commandBuffer, VkBool32 logicOpEnable) { + device_dispatch_table.CmdSetLogicOpEnableEXT(commandBuffer, logicOpEnable); +} + +void DispatchObject::CmdSetColorBlendEnableEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, + const VkBool32* pColorBlendEnables) { + device_dispatch_table.CmdSetColorBlendEnableEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendEnables); +} + +void DispatchObject::CmdSetColorBlendEquationEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, + const VkColorBlendEquationEXT* pColorBlendEquations) { + device_dispatch_table.CmdSetColorBlendEquationEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendEquations); +} + +void DispatchObject::CmdSetColorWriteMaskEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, + const VkColorComponentFlags* pColorWriteMasks) { + device_dispatch_table.CmdSetColorWriteMaskEXT(commandBuffer, firstAttachment, attachmentCount, pColorWriteMasks); +} + +void DispatchObject::CmdSetTessellationDomainOriginEXT(VkCommandBuffer commandBuffer, VkTessellationDomainOrigin domainOrigin) { + device_dispatch_table.CmdSetTessellationDomainOriginEXT(commandBuffer, domainOrigin); +} + +void DispatchObject::CmdSetRasterizationStreamEXT(VkCommandBuffer commandBuffer, uint32_t rasterizationStream) { + device_dispatch_table.CmdSetRasterizationStreamEXT(commandBuffer, rasterizationStream); +} + +void DispatchObject::CmdSetConservativeRasterizationModeEXT(VkCommandBuffer commandBuffer, + VkConservativeRasterizationModeEXT conservativeRasterizationMode) { + device_dispatch_table.CmdSetConservativeRasterizationModeEXT(commandBuffer, conservativeRasterizationMode); +} + +void DispatchObject::CmdSetExtraPrimitiveOverestimationSizeEXT(VkCommandBuffer commandBuffer, + float extraPrimitiveOverestimationSize) { + device_dispatch_table.CmdSetExtraPrimitiveOverestimationSizeEXT(commandBuffer, extraPrimitiveOverestimationSize); +} + +void DispatchObject::CmdSetDepthClipEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClipEnable) { + device_dispatch_table.CmdSetDepthClipEnableEXT(commandBuffer, depthClipEnable); +} + +void DispatchObject::CmdSetSampleLocationsEnableEXT(VkCommandBuffer commandBuffer, VkBool32 sampleLocationsEnable) { + device_dispatch_table.CmdSetSampleLocationsEnableEXT(commandBuffer, sampleLocationsEnable); +} + +void DispatchObject::CmdSetColorBlendAdvancedEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, + const VkColorBlendAdvancedEXT* pColorBlendAdvanced) { + device_dispatch_table.CmdSetColorBlendAdvancedEXT(commandBuffer, firstAttachment, attachmentCount, pColorBlendAdvanced); +} + +void DispatchObject::CmdSetProvokingVertexModeEXT(VkCommandBuffer commandBuffer, VkProvokingVertexModeEXT provokingVertexMode) { + device_dispatch_table.CmdSetProvokingVertexModeEXT(commandBuffer, provokingVertexMode); +} + +void DispatchObject::CmdSetLineRasterizationModeEXT(VkCommandBuffer commandBuffer, + VkLineRasterizationModeEXT lineRasterizationMode) { + device_dispatch_table.CmdSetLineRasterizationModeEXT(commandBuffer, lineRasterizationMode); +} + +void DispatchObject::CmdSetLineStippleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stippledLineEnable) { + device_dispatch_table.CmdSetLineStippleEnableEXT(commandBuffer, stippledLineEnable); +} + +void DispatchObject::CmdSetDepthClipNegativeOneToOneEXT(VkCommandBuffer commandBuffer, VkBool32 negativeOneToOne) { + device_dispatch_table.CmdSetDepthClipNegativeOneToOneEXT(commandBuffer, negativeOneToOne); +} + +void DispatchObject::CmdSetViewportWScalingEnableNV(VkCommandBuffer commandBuffer, VkBool32 viewportWScalingEnable) { + device_dispatch_table.CmdSetViewportWScalingEnableNV(commandBuffer, viewportWScalingEnable); +} + +void DispatchObject::CmdSetViewportSwizzleNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, + const VkViewportSwizzleNV* pViewportSwizzles) { + device_dispatch_table.CmdSetViewportSwizzleNV(commandBuffer, firstViewport, viewportCount, pViewportSwizzles); +} + +void DispatchObject::CmdSetCoverageToColorEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageToColorEnable) { + device_dispatch_table.CmdSetCoverageToColorEnableNV(commandBuffer, coverageToColorEnable); +} + +void DispatchObject::CmdSetCoverageToColorLocationNV(VkCommandBuffer commandBuffer, uint32_t coverageToColorLocation) { + device_dispatch_table.CmdSetCoverageToColorLocationNV(commandBuffer, coverageToColorLocation); +} + +void DispatchObject::CmdSetCoverageModulationModeNV(VkCommandBuffer commandBuffer, + VkCoverageModulationModeNV coverageModulationMode) { + device_dispatch_table.CmdSetCoverageModulationModeNV(commandBuffer, coverageModulationMode); +} + +void DispatchObject::CmdSetCoverageModulationTableEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageModulationTableEnable) { + device_dispatch_table.CmdSetCoverageModulationTableEnableNV(commandBuffer, coverageModulationTableEnable); +} + +void DispatchObject::CmdSetCoverageModulationTableNV(VkCommandBuffer commandBuffer, uint32_t coverageModulationTableCount, + const float* pCoverageModulationTable) { + device_dispatch_table.CmdSetCoverageModulationTableNV(commandBuffer, coverageModulationTableCount, pCoverageModulationTable); +} + +void DispatchObject::CmdSetShadingRateImageEnableNV(VkCommandBuffer commandBuffer, VkBool32 shadingRateImageEnable) { + device_dispatch_table.CmdSetShadingRateImageEnableNV(commandBuffer, shadingRateImageEnable); +} + +void DispatchObject::CmdSetRepresentativeFragmentTestEnableNV(VkCommandBuffer commandBuffer, + VkBool32 representativeFragmentTestEnable) { + device_dispatch_table.CmdSetRepresentativeFragmentTestEnableNV(commandBuffer, representativeFragmentTestEnable); +} + +void DispatchObject::CmdSetCoverageReductionModeNV(VkCommandBuffer commandBuffer, VkCoverageReductionModeNV coverageReductionMode) { + device_dispatch_table.CmdSetCoverageReductionModeNV(commandBuffer, coverageReductionMode); +} + +void DispatchObject::GetShaderModuleIdentifierEXT(VkDevice device, VkShaderModule shaderModule, + VkShaderModuleIdentifierEXT* pIdentifier) { + if (!wrap_handles) return device_dispatch_table.GetShaderModuleIdentifierEXT(device, shaderModule, pIdentifier); + { shaderModule = Unwrap(shaderModule); } + device_dispatch_table.GetShaderModuleIdentifierEXT(device, shaderModule, pIdentifier); +} + +void DispatchObject::GetShaderModuleCreateInfoIdentifierEXT(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, + VkShaderModuleIdentifierEXT* pIdentifier) { + if (!wrap_handles) return device_dispatch_table.GetShaderModuleCreateInfoIdentifierEXT(device, pCreateInfo, pIdentifier); + vku::safe_VkShaderModuleCreateInfo var_local_pCreateInfo; + vku::safe_VkShaderModuleCreateInfo* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + UnwrapPnextChainHandles(local_pCreateInfo->pNext); + } + } + device_dispatch_table.GetShaderModuleCreateInfoIdentifierEXT(device, (const VkShaderModuleCreateInfo*)local_pCreateInfo, + pIdentifier); +} + +VkResult DispatchObject::GetPhysicalDeviceOpticalFlowImageFormatsNV( + VkPhysicalDevice physicalDevice, const VkOpticalFlowImageFormatInfoNV* pOpticalFlowImageFormatInfo, uint32_t* pFormatCount, + VkOpticalFlowImageFormatPropertiesNV* pImageFormatProperties) { + VkResult result = instance_dispatch_table.GetPhysicalDeviceOpticalFlowImageFormatsNV( + physicalDevice, pOpticalFlowImageFormatInfo, pFormatCount, pImageFormatProperties); + + return result; +} + +VkResult DispatchObject::CreateOpticalFlowSessionNV(VkDevice device, const VkOpticalFlowSessionCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkOpticalFlowSessionNV* pSession) { + if (!wrap_handles) return device_dispatch_table.CreateOpticalFlowSessionNV(device, pCreateInfo, pAllocator, pSession); + + VkResult result = device_dispatch_table.CreateOpticalFlowSessionNV(device, pCreateInfo, pAllocator, pSession); + if (VK_SUCCESS == result) { + *pSession = WrapNew(*pSession); + } + return result; +} + +void DispatchObject::DestroyOpticalFlowSessionNV(VkDevice device, VkOpticalFlowSessionNV session, + const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyOpticalFlowSessionNV(device, session, pAllocator); + + uint64_t session_id = CastToUint64(session); + auto iter = unique_id_mapping.pop(session_id); + if (iter != unique_id_mapping.end()) { + session = (VkOpticalFlowSessionNV)iter->second; + } else { + session = (VkOpticalFlowSessionNV)0; + } + device_dispatch_table.DestroyOpticalFlowSessionNV(device, session, pAllocator); +} + +VkResult DispatchObject::BindOpticalFlowSessionImageNV(VkDevice device, VkOpticalFlowSessionNV session, + VkOpticalFlowSessionBindingPointNV bindingPoint, VkImageView view, + VkImageLayout layout) { + if (!wrap_handles) return device_dispatch_table.BindOpticalFlowSessionImageNV(device, session, bindingPoint, view, layout); + { + session = Unwrap(session); + view = Unwrap(view); + } + VkResult result = device_dispatch_table.BindOpticalFlowSessionImageNV(device, session, bindingPoint, view, layout); + + return result; +} + +void DispatchObject::CmdOpticalFlowExecuteNV(VkCommandBuffer commandBuffer, VkOpticalFlowSessionNV session, + const VkOpticalFlowExecuteInfoNV* pExecuteInfo) { + if (!wrap_handles) return device_dispatch_table.CmdOpticalFlowExecuteNV(commandBuffer, session, pExecuteInfo); + { session = Unwrap(session); } + device_dispatch_table.CmdOpticalFlowExecuteNV(commandBuffer, session, pExecuteInfo); +} + +void DispatchObject::AntiLagUpdateAMD(VkDevice device, const VkAntiLagDataAMD* pData) { + device_dispatch_table.AntiLagUpdateAMD(device, pData); +} + +VkResult DispatchObject::CreateShadersEXT(VkDevice device, uint32_t createInfoCount, const VkShaderCreateInfoEXT* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkShaderEXT* pShaders) { + if (!wrap_handles) return device_dispatch_table.CreateShadersEXT(device, createInfoCount, pCreateInfos, pAllocator, pShaders); + small_vector var_local_pCreateInfos; + vku::safe_VkShaderCreateInfoEXT* local_pCreateInfos = nullptr; + { + if (pCreateInfos) { + var_local_pCreateInfos.resize(createInfoCount); + local_pCreateInfos = var_local_pCreateInfos.data(); + for (uint32_t index0 = 0; index0 < createInfoCount; ++index0) { + local_pCreateInfos[index0].initialize(&pCreateInfos[index0]); + if (local_pCreateInfos[index0].pSetLayouts) { + for (uint32_t index1 = 0; index1 < local_pCreateInfos[index0].setLayoutCount; ++index1) { + local_pCreateInfos[index0].pSetLayouts[index1] = Unwrap(local_pCreateInfos[index0].pSetLayouts[index1]); + } + } + } + } + } + VkResult result = device_dispatch_table.CreateShadersEXT( + device, createInfoCount, (const VkShaderCreateInfoEXT*)local_pCreateInfos, pAllocator, pShaders); + if (VK_SUCCESS == result) { + for (uint32_t index0 = 0; index0 < createInfoCount; index0++) { + pShaders[index0] = WrapNew(pShaders[index0]); + } + } + return result; +} + +void DispatchObject::DestroyShaderEXT(VkDevice device, VkShaderEXT shader, const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyShaderEXT(device, shader, pAllocator); + + uint64_t shader_id = CastToUint64(shader); + auto iter = unique_id_mapping.pop(shader_id); + if (iter != unique_id_mapping.end()) { + shader = (VkShaderEXT)iter->second; + } else { + shader = (VkShaderEXT)0; + } + device_dispatch_table.DestroyShaderEXT(device, shader, pAllocator); +} + +VkResult DispatchObject::GetShaderBinaryDataEXT(VkDevice device, VkShaderEXT shader, size_t* pDataSize, void* pData) { + if (!wrap_handles) return device_dispatch_table.GetShaderBinaryDataEXT(device, shader, pDataSize, pData); + { shader = Unwrap(shader); } + VkResult result = device_dispatch_table.GetShaderBinaryDataEXT(device, shader, pDataSize, pData); + + return result; +} + +void DispatchObject::CmdBindShadersEXT(VkCommandBuffer commandBuffer, uint32_t stageCount, const VkShaderStageFlagBits* pStages, + const VkShaderEXT* pShaders) { + if (!wrap_handles) return device_dispatch_table.CmdBindShadersEXT(commandBuffer, stageCount, pStages, pShaders); + small_vector var_local_pShaders; + VkShaderEXT* local_pShaders = nullptr; + { + if (pShaders) { + var_local_pShaders.resize(stageCount); + local_pShaders = var_local_pShaders.data(); + for (uint32_t index0 = 0; index0 < stageCount; ++index0) { + local_pShaders[index0] = Unwrap(pShaders[index0]); + } + } + } + device_dispatch_table.CmdBindShadersEXT(commandBuffer, stageCount, pStages, (const VkShaderEXT*)local_pShaders); +} + +void DispatchObject::CmdSetDepthClampRangeEXT(VkCommandBuffer commandBuffer, VkDepthClampModeEXT depthClampMode, + const VkDepthClampRangeEXT* pDepthClampRange) { + device_dispatch_table.CmdSetDepthClampRangeEXT(commandBuffer, depthClampMode, pDepthClampRange); +} + +VkResult DispatchObject::GetFramebufferTilePropertiesQCOM(VkDevice device, VkFramebuffer framebuffer, uint32_t* pPropertiesCount, + VkTilePropertiesQCOM* pProperties) { + if (!wrap_handles) + return device_dispatch_table.GetFramebufferTilePropertiesQCOM(device, framebuffer, pPropertiesCount, pProperties); + { framebuffer = Unwrap(framebuffer); } + VkResult result = device_dispatch_table.GetFramebufferTilePropertiesQCOM(device, framebuffer, pPropertiesCount, pProperties); + + return result; +} + +VkResult DispatchObject::GetDynamicRenderingTilePropertiesQCOM(VkDevice device, const VkRenderingInfo* pRenderingInfo, + VkTilePropertiesQCOM* pProperties) { + if (!wrap_handles) return device_dispatch_table.GetDynamicRenderingTilePropertiesQCOM(device, pRenderingInfo, pProperties); + vku::safe_VkRenderingInfo var_local_pRenderingInfo; + vku::safe_VkRenderingInfo* local_pRenderingInfo = nullptr; + { + if (pRenderingInfo) { + local_pRenderingInfo = &var_local_pRenderingInfo; + local_pRenderingInfo->initialize(pRenderingInfo); + if (local_pRenderingInfo->pColorAttachments) { + for (uint32_t index1 = 0; index1 < local_pRenderingInfo->colorAttachmentCount; ++index1) { + if (pRenderingInfo->pColorAttachments[index1].imageView) { + local_pRenderingInfo->pColorAttachments[index1].imageView = + Unwrap(pRenderingInfo->pColorAttachments[index1].imageView); + } + if (pRenderingInfo->pColorAttachments[index1].resolveImageView) { + local_pRenderingInfo->pColorAttachments[index1].resolveImageView = + Unwrap(pRenderingInfo->pColorAttachments[index1].resolveImageView); + } + } + } + if (local_pRenderingInfo->pDepthAttachment) { + if (pRenderingInfo->pDepthAttachment->imageView) { + local_pRenderingInfo->pDepthAttachment->imageView = Unwrap(pRenderingInfo->pDepthAttachment->imageView); + } + if (pRenderingInfo->pDepthAttachment->resolveImageView) { + local_pRenderingInfo->pDepthAttachment->resolveImageView = + Unwrap(pRenderingInfo->pDepthAttachment->resolveImageView); + } + } + if (local_pRenderingInfo->pStencilAttachment) { + if (pRenderingInfo->pStencilAttachment->imageView) { + local_pRenderingInfo->pStencilAttachment->imageView = Unwrap(pRenderingInfo->pStencilAttachment->imageView); + } + if (pRenderingInfo->pStencilAttachment->resolveImageView) { + local_pRenderingInfo->pStencilAttachment->resolveImageView = + Unwrap(pRenderingInfo->pStencilAttachment->resolveImageView); + } + } + UnwrapPnextChainHandles(local_pRenderingInfo->pNext); + } + } + VkResult result = device_dispatch_table.GetDynamicRenderingTilePropertiesQCOM( + device, (const VkRenderingInfo*)local_pRenderingInfo, pProperties); + + return result; +} + +VkResult DispatchObject::SetLatencySleepModeNV(VkDevice device, VkSwapchainKHR swapchain, + const VkLatencySleepModeInfoNV* pSleepModeInfo) { + if (!wrap_handles) return device_dispatch_table.SetLatencySleepModeNV(device, swapchain, pSleepModeInfo); + { swapchain = Unwrap(swapchain); } + VkResult result = device_dispatch_table.SetLatencySleepModeNV(device, swapchain, pSleepModeInfo); + + return result; +} + +VkResult DispatchObject::LatencySleepNV(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepInfoNV* pSleepInfo) { + if (!wrap_handles) return device_dispatch_table.LatencySleepNV(device, swapchain, pSleepInfo); + vku::safe_VkLatencySleepInfoNV var_local_pSleepInfo; + vku::safe_VkLatencySleepInfoNV* local_pSleepInfo = nullptr; + { + swapchain = Unwrap(swapchain); + if (pSleepInfo) { + local_pSleepInfo = &var_local_pSleepInfo; + local_pSleepInfo->initialize(pSleepInfo); + + if (pSleepInfo->signalSemaphore) { + local_pSleepInfo->signalSemaphore = Unwrap(pSleepInfo->signalSemaphore); + } + } + } + VkResult result = device_dispatch_table.LatencySleepNV(device, swapchain, (const VkLatencySleepInfoNV*)local_pSleepInfo); + + return result; +} + +void DispatchObject::SetLatencyMarkerNV(VkDevice device, VkSwapchainKHR swapchain, + const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo) { + if (!wrap_handles) return device_dispatch_table.SetLatencyMarkerNV(device, swapchain, pLatencyMarkerInfo); + { swapchain = Unwrap(swapchain); } + device_dispatch_table.SetLatencyMarkerNV(device, swapchain, pLatencyMarkerInfo); +} + +void DispatchObject::GetLatencyTimingsNV(VkDevice device, VkSwapchainKHR swapchain, VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo) { + if (!wrap_handles) return device_dispatch_table.GetLatencyTimingsNV(device, swapchain, pLatencyMarkerInfo); + { swapchain = Unwrap(swapchain); } + device_dispatch_table.GetLatencyTimingsNV(device, swapchain, pLatencyMarkerInfo); +} + +void DispatchObject::QueueNotifyOutOfBandNV(VkQueue queue, const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo) { + device_dispatch_table.QueueNotifyOutOfBandNV(queue, pQueueTypeInfo); +} + +void DispatchObject::CmdSetAttachmentFeedbackLoopEnableEXT(VkCommandBuffer commandBuffer, VkImageAspectFlags aspectMask) { + device_dispatch_table.CmdSetAttachmentFeedbackLoopEnableEXT(commandBuffer, aspectMask); +} +#ifdef VK_USE_PLATFORM_SCREEN_QNX + +VkResult DispatchObject::GetScreenBufferPropertiesQNX(VkDevice device, const struct _screen_buffer* buffer, + VkScreenBufferPropertiesQNX* pProperties) { + VkResult result = device_dispatch_table.GetScreenBufferPropertiesQNX(device, buffer, pProperties); + + return result; +} +#endif // VK_USE_PLATFORM_SCREEN_QNX + +void DispatchObject::GetGeneratedCommandsMemoryRequirementsEXT(VkDevice device, + const VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfo, + VkMemoryRequirements2* pMemoryRequirements) { + if (!wrap_handles) return device_dispatch_table.GetGeneratedCommandsMemoryRequirementsEXT(device, pInfo, pMemoryRequirements); + vku::safe_VkGeneratedCommandsMemoryRequirementsInfoEXT var_local_pInfo; + vku::safe_VkGeneratedCommandsMemoryRequirementsInfoEXT* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->indirectExecutionSet) { + local_pInfo->indirectExecutionSet = Unwrap(pInfo->indirectExecutionSet); + } + if (pInfo->indirectCommandsLayout) { + local_pInfo->indirectCommandsLayout = Unwrap(pInfo->indirectCommandsLayout); + } + UnwrapPnextChainHandles(local_pInfo->pNext); + } + } + device_dispatch_table.GetGeneratedCommandsMemoryRequirementsEXT( + device, (const VkGeneratedCommandsMemoryRequirementsInfoEXT*)local_pInfo, pMemoryRequirements); +} + +void DispatchObject::CmdPreprocessGeneratedCommandsEXT(VkCommandBuffer commandBuffer, + const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, + VkCommandBuffer stateCommandBuffer) { + if (!wrap_handles) + return device_dispatch_table.CmdPreprocessGeneratedCommandsEXT(commandBuffer, pGeneratedCommandsInfo, stateCommandBuffer); + vku::safe_VkGeneratedCommandsInfoEXT var_local_pGeneratedCommandsInfo; + vku::safe_VkGeneratedCommandsInfoEXT* local_pGeneratedCommandsInfo = nullptr; + { + if (pGeneratedCommandsInfo) { + local_pGeneratedCommandsInfo = &var_local_pGeneratedCommandsInfo; + local_pGeneratedCommandsInfo->initialize(pGeneratedCommandsInfo); + + if (pGeneratedCommandsInfo->indirectExecutionSet) { + local_pGeneratedCommandsInfo->indirectExecutionSet = Unwrap(pGeneratedCommandsInfo->indirectExecutionSet); + } + if (pGeneratedCommandsInfo->indirectCommandsLayout) { + local_pGeneratedCommandsInfo->indirectCommandsLayout = Unwrap(pGeneratedCommandsInfo->indirectCommandsLayout); + } + UnwrapPnextChainHandles(local_pGeneratedCommandsInfo->pNext); + } + } + device_dispatch_table.CmdPreprocessGeneratedCommandsEXT( + commandBuffer, (const VkGeneratedCommandsInfoEXT*)local_pGeneratedCommandsInfo, stateCommandBuffer); +} + +void DispatchObject::CmdExecuteGeneratedCommandsEXT(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, + const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo) { + if (!wrap_handles) + return device_dispatch_table.CmdExecuteGeneratedCommandsEXT(commandBuffer, isPreprocessed, pGeneratedCommandsInfo); + vku::safe_VkGeneratedCommandsInfoEXT var_local_pGeneratedCommandsInfo; + vku::safe_VkGeneratedCommandsInfoEXT* local_pGeneratedCommandsInfo = nullptr; + { + if (pGeneratedCommandsInfo) { + local_pGeneratedCommandsInfo = &var_local_pGeneratedCommandsInfo; + local_pGeneratedCommandsInfo->initialize(pGeneratedCommandsInfo); + + if (pGeneratedCommandsInfo->indirectExecutionSet) { + local_pGeneratedCommandsInfo->indirectExecutionSet = Unwrap(pGeneratedCommandsInfo->indirectExecutionSet); + } + if (pGeneratedCommandsInfo->indirectCommandsLayout) { + local_pGeneratedCommandsInfo->indirectCommandsLayout = Unwrap(pGeneratedCommandsInfo->indirectCommandsLayout); + } + UnwrapPnextChainHandles(local_pGeneratedCommandsInfo->pNext); + } + } + device_dispatch_table.CmdExecuteGeneratedCommandsEXT(commandBuffer, isPreprocessed, + (const VkGeneratedCommandsInfoEXT*)local_pGeneratedCommandsInfo); +} + +VkResult DispatchObject::CreateIndirectCommandsLayoutEXT(VkDevice device, const VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkIndirectCommandsLayoutEXT* pIndirectCommandsLayout) { + if (!wrap_handles) + return device_dispatch_table.CreateIndirectCommandsLayoutEXT(device, pCreateInfo, pAllocator, pIndirectCommandsLayout); + vku::safe_VkIndirectCommandsLayoutCreateInfoEXT var_local_pCreateInfo; + vku::safe_VkIndirectCommandsLayoutCreateInfoEXT* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + + if (pCreateInfo->pipelineLayout) { + local_pCreateInfo->pipelineLayout = Unwrap(pCreateInfo->pipelineLayout); + } + UnwrapPnextChainHandles(local_pCreateInfo->pNext); + } + } + VkResult result = device_dispatch_table.CreateIndirectCommandsLayoutEXT( + device, (const VkIndirectCommandsLayoutCreateInfoEXT*)local_pCreateInfo, pAllocator, pIndirectCommandsLayout); + if (VK_SUCCESS == result) { + *pIndirectCommandsLayout = WrapNew(*pIndirectCommandsLayout); + } + return result; +} + +void DispatchObject::DestroyIndirectCommandsLayoutEXT(VkDevice device, VkIndirectCommandsLayoutEXT indirectCommandsLayout, + const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyIndirectCommandsLayoutEXT(device, indirectCommandsLayout, pAllocator); + + uint64_t indirectCommandsLayout_id = CastToUint64(indirectCommandsLayout); + auto iter = unique_id_mapping.pop(indirectCommandsLayout_id); + if (iter != unique_id_mapping.end()) { + indirectCommandsLayout = (VkIndirectCommandsLayoutEXT)iter->second; + } else { + indirectCommandsLayout = (VkIndirectCommandsLayoutEXT)0; + } + device_dispatch_table.DestroyIndirectCommandsLayoutEXT(device, indirectCommandsLayout, pAllocator); +} + +void DispatchObject::DestroyIndirectExecutionSetEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, + const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyIndirectExecutionSetEXT(device, indirectExecutionSet, pAllocator); + + uint64_t indirectExecutionSet_id = CastToUint64(indirectExecutionSet); + auto iter = unique_id_mapping.pop(indirectExecutionSet_id); + if (iter != unique_id_mapping.end()) { + indirectExecutionSet = (VkIndirectExecutionSetEXT)iter->second; + } else { + indirectExecutionSet = (VkIndirectExecutionSetEXT)0; + } + device_dispatch_table.DestroyIndirectExecutionSetEXT(device, indirectExecutionSet, pAllocator); +} + +void DispatchObject::UpdateIndirectExecutionSetPipelineEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, + uint32_t executionSetWriteCount, + const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites) { + if (!wrap_handles) + return device_dispatch_table.UpdateIndirectExecutionSetPipelineEXT(device, indirectExecutionSet, executionSetWriteCount, + pExecutionSetWrites); + small_vector var_local_pExecutionSetWrites; + vku::safe_VkWriteIndirectExecutionSetPipelineEXT* local_pExecutionSetWrites = nullptr; + { + indirectExecutionSet = Unwrap(indirectExecutionSet); + if (pExecutionSetWrites) { + var_local_pExecutionSetWrites.resize(executionSetWriteCount); + local_pExecutionSetWrites = var_local_pExecutionSetWrites.data(); + for (uint32_t index0 = 0; index0 < executionSetWriteCount; ++index0) { + local_pExecutionSetWrites[index0].initialize(&pExecutionSetWrites[index0]); + + if (pExecutionSetWrites[index0].pipeline) { + local_pExecutionSetWrites[index0].pipeline = Unwrap(pExecutionSetWrites[index0].pipeline); + } + } + } + } + device_dispatch_table.UpdateIndirectExecutionSetPipelineEXT( + device, indirectExecutionSet, executionSetWriteCount, + (const VkWriteIndirectExecutionSetPipelineEXT*)local_pExecutionSetWrites); +} + +void DispatchObject::UpdateIndirectExecutionSetShaderEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, + uint32_t executionSetWriteCount, + const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites) { + if (!wrap_handles) + return device_dispatch_table.UpdateIndirectExecutionSetShaderEXT(device, indirectExecutionSet, executionSetWriteCount, + pExecutionSetWrites); + small_vector var_local_pExecutionSetWrites; + vku::safe_VkWriteIndirectExecutionSetShaderEXT* local_pExecutionSetWrites = nullptr; + { + indirectExecutionSet = Unwrap(indirectExecutionSet); + if (pExecutionSetWrites) { + var_local_pExecutionSetWrites.resize(executionSetWriteCount); + local_pExecutionSetWrites = var_local_pExecutionSetWrites.data(); + for (uint32_t index0 = 0; index0 < executionSetWriteCount; ++index0) { + local_pExecutionSetWrites[index0].initialize(&pExecutionSetWrites[index0]); + + if (pExecutionSetWrites[index0].shader) { + local_pExecutionSetWrites[index0].shader = Unwrap(pExecutionSetWrites[index0].shader); + } + } + } + } + device_dispatch_table.UpdateIndirectExecutionSetShaderEXT( + device, indirectExecutionSet, executionSetWriteCount, + (const VkWriteIndirectExecutionSetShaderEXT*)local_pExecutionSetWrites); +} + +VkResult DispatchObject::GetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( + VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixFlexibleDimensionsPropertiesNV* pProperties) { + VkResult result = instance_dispatch_table.GetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( + physicalDevice, pPropertyCount, pProperties); + + return result; +} + +VkResult DispatchObject::CreateAccelerationStructureKHR(VkDevice device, const VkAccelerationStructureCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkAccelerationStructureKHR* pAccelerationStructure) { + if (!wrap_handles) + return device_dispatch_table.CreateAccelerationStructureKHR(device, pCreateInfo, pAllocator, pAccelerationStructure); + vku::safe_VkAccelerationStructureCreateInfoKHR var_local_pCreateInfo; + vku::safe_VkAccelerationStructureCreateInfoKHR* local_pCreateInfo = nullptr; + { + if (pCreateInfo) { + local_pCreateInfo = &var_local_pCreateInfo; + local_pCreateInfo->initialize(pCreateInfo); + + if (pCreateInfo->buffer) { + local_pCreateInfo->buffer = Unwrap(pCreateInfo->buffer); + } + } + } + VkResult result = device_dispatch_table.CreateAccelerationStructureKHR( + device, (const VkAccelerationStructureCreateInfoKHR*)local_pCreateInfo, pAllocator, pAccelerationStructure); + if (VK_SUCCESS == result) { + *pAccelerationStructure = WrapNew(*pAccelerationStructure); + } + return result; +} + +void DispatchObject::DestroyAccelerationStructureKHR(VkDevice device, VkAccelerationStructureKHR accelerationStructure, + const VkAllocationCallbacks* pAllocator) { + if (!wrap_handles) return device_dispatch_table.DestroyAccelerationStructureKHR(device, accelerationStructure, pAllocator); + + uint64_t accelerationStructure_id = CastToUint64(accelerationStructure); + auto iter = unique_id_mapping.pop(accelerationStructure_id); + if (iter != unique_id_mapping.end()) { + accelerationStructure = (VkAccelerationStructureKHR)iter->second; + } else { + accelerationStructure = (VkAccelerationStructureKHR)0; + } + device_dispatch_table.DestroyAccelerationStructureKHR(device, accelerationStructure, pAllocator); +} + +void DispatchObject::CmdBuildAccelerationStructuresIndirectKHR(VkCommandBuffer commandBuffer, uint32_t infoCount, + const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, + const VkDeviceAddress* pIndirectDeviceAddresses, + const uint32_t* pIndirectStrides, + const uint32_t* const* ppMaxPrimitiveCounts) { + if (!wrap_handles) + return device_dispatch_table.CmdBuildAccelerationStructuresIndirectKHR( + commandBuffer, infoCount, pInfos, pIndirectDeviceAddresses, pIndirectStrides, ppMaxPrimitiveCounts); + small_vector var_local_pInfos; + vku::safe_VkAccelerationStructureBuildGeometryInfoKHR* local_pInfos = nullptr; + { + if (pInfos) { + var_local_pInfos.resize(infoCount); + local_pInfos = var_local_pInfos.data(); + for (uint32_t index0 = 0; index0 < infoCount; ++index0) { + local_pInfos[index0].initialize(&pInfos[index0], false, nullptr); + + if (pInfos[index0].srcAccelerationStructure) { + local_pInfos[index0].srcAccelerationStructure = Unwrap(pInfos[index0].srcAccelerationStructure); + } + if (pInfos[index0].dstAccelerationStructure) { + local_pInfos[index0].dstAccelerationStructure = Unwrap(pInfos[index0].dstAccelerationStructure); + } + } + } + } + device_dispatch_table.CmdBuildAccelerationStructuresIndirectKHR( + commandBuffer, infoCount, (const VkAccelerationStructureBuildGeometryInfoKHR*)local_pInfos, pIndirectDeviceAddresses, + pIndirectStrides, ppMaxPrimitiveCounts); +} + +VkResult DispatchObject::CopyAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyAccelerationStructureInfoKHR* pInfo) { + if (!wrap_handles) return device_dispatch_table.CopyAccelerationStructureKHR(device, deferredOperation, pInfo); + vku::safe_VkCopyAccelerationStructureInfoKHR* local_pInfo = nullptr; + { + deferredOperation = Unwrap(deferredOperation); + if (pInfo) { + local_pInfo = new vku::safe_VkCopyAccelerationStructureInfoKHR; + local_pInfo->initialize(pInfo); + + if (pInfo->src) { + local_pInfo->src = Unwrap(pInfo->src); + } + if (pInfo->dst) { + local_pInfo->dst = Unwrap(pInfo->dst); + } + } + } + VkResult result = device_dispatch_table.CopyAccelerationStructureKHR(device, deferredOperation, + (const VkCopyAccelerationStructureInfoKHR*)local_pInfo); + if (local_pInfo) { + // Fix check for deferred ray tracing pipeline creation + // https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5817 + const bool is_operation_deferred = (deferredOperation != VK_NULL_HANDLE) && (result == VK_OPERATION_DEFERRED_KHR); + if (is_operation_deferred) { + std::vector> cleanup{[local_pInfo]() { delete local_pInfo; }}; + deferred_operation_post_completion.insert(deferredOperation, cleanup); + } else { + delete local_pInfo; + } + } + return result; +} + +VkResult DispatchObject::CopyAccelerationStructureToMemoryKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo) { + if (!wrap_handles) return device_dispatch_table.CopyAccelerationStructureToMemoryKHR(device, deferredOperation, pInfo); + vku::safe_VkCopyAccelerationStructureToMemoryInfoKHR* local_pInfo = nullptr; + { + deferredOperation = Unwrap(deferredOperation); + if (pInfo) { + local_pInfo = new vku::safe_VkCopyAccelerationStructureToMemoryInfoKHR; + local_pInfo->initialize(pInfo); + + if (pInfo->src) { + local_pInfo->src = Unwrap(pInfo->src); + } + } + } + VkResult result = device_dispatch_table.CopyAccelerationStructureToMemoryKHR( + device, deferredOperation, (const VkCopyAccelerationStructureToMemoryInfoKHR*)local_pInfo); + if (local_pInfo) { + // Fix check for deferred ray tracing pipeline creation + // https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5817 + const bool is_operation_deferred = (deferredOperation != VK_NULL_HANDLE) && (result == VK_OPERATION_DEFERRED_KHR); + if (is_operation_deferred) { + std::vector> cleanup{[local_pInfo]() { delete local_pInfo; }}; + deferred_operation_post_completion.insert(deferredOperation, cleanup); + } else { + delete local_pInfo; + } + } + return result; +} + +VkResult DispatchObject::CopyMemoryToAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo) { + if (!wrap_handles) return device_dispatch_table.CopyMemoryToAccelerationStructureKHR(device, deferredOperation, pInfo); + vku::safe_VkCopyMemoryToAccelerationStructureInfoKHR* local_pInfo = nullptr; + { + deferredOperation = Unwrap(deferredOperation); + if (pInfo) { + local_pInfo = new vku::safe_VkCopyMemoryToAccelerationStructureInfoKHR; + local_pInfo->initialize(pInfo); + + if (pInfo->dst) { + local_pInfo->dst = Unwrap(pInfo->dst); + } + } + } + VkResult result = device_dispatch_table.CopyMemoryToAccelerationStructureKHR( + device, deferredOperation, (const VkCopyMemoryToAccelerationStructureInfoKHR*)local_pInfo); + if (local_pInfo) { + // Fix check for deferred ray tracing pipeline creation + // https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5817 + const bool is_operation_deferred = (deferredOperation != VK_NULL_HANDLE) && (result == VK_OPERATION_DEFERRED_KHR); + if (is_operation_deferred) { + std::vector> cleanup{[local_pInfo]() { delete local_pInfo; }}; + deferred_operation_post_completion.insert(deferredOperation, cleanup); + } else { + delete local_pInfo; + } + } + return result; +} + +VkResult DispatchObject::WriteAccelerationStructuresPropertiesKHR(VkDevice device, uint32_t accelerationStructureCount, + const VkAccelerationStructureKHR* pAccelerationStructures, + VkQueryType queryType, size_t dataSize, void* pData, + size_t stride) { + if (!wrap_handles) + return device_dispatch_table.WriteAccelerationStructuresPropertiesKHR( + device, accelerationStructureCount, pAccelerationStructures, queryType, dataSize, pData, stride); + small_vector var_local_pAccelerationStructures; + VkAccelerationStructureKHR* local_pAccelerationStructures = nullptr; + { + if (pAccelerationStructures) { + var_local_pAccelerationStructures.resize(accelerationStructureCount); + local_pAccelerationStructures = var_local_pAccelerationStructures.data(); + for (uint32_t index0 = 0; index0 < accelerationStructureCount; ++index0) { + local_pAccelerationStructures[index0] = Unwrap(pAccelerationStructures[index0]); + } + } + } + VkResult result = device_dispatch_table.WriteAccelerationStructuresPropertiesKHR( + device, accelerationStructureCount, (const VkAccelerationStructureKHR*)local_pAccelerationStructures, queryType, dataSize, + pData, stride); + + return result; +} + +void DispatchObject::CmdCopyAccelerationStructureKHR(VkCommandBuffer commandBuffer, + const VkCopyAccelerationStructureInfoKHR* pInfo) { + if (!wrap_handles) return device_dispatch_table.CmdCopyAccelerationStructureKHR(commandBuffer, pInfo); + vku::safe_VkCopyAccelerationStructureInfoKHR var_local_pInfo; + vku::safe_VkCopyAccelerationStructureInfoKHR* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->src) { + local_pInfo->src = Unwrap(pInfo->src); + } + if (pInfo->dst) { + local_pInfo->dst = Unwrap(pInfo->dst); + } + } + } + device_dispatch_table.CmdCopyAccelerationStructureKHR(commandBuffer, (const VkCopyAccelerationStructureInfoKHR*)local_pInfo); +} + +void DispatchObject::CmdCopyAccelerationStructureToMemoryKHR(VkCommandBuffer commandBuffer, + const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo) { + if (!wrap_handles) return device_dispatch_table.CmdCopyAccelerationStructureToMemoryKHR(commandBuffer, pInfo); + vku::safe_VkCopyAccelerationStructureToMemoryInfoKHR var_local_pInfo; + vku::safe_VkCopyAccelerationStructureToMemoryInfoKHR* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->src) { + local_pInfo->src = Unwrap(pInfo->src); + } + } + } + device_dispatch_table.CmdCopyAccelerationStructureToMemoryKHR(commandBuffer, + (const VkCopyAccelerationStructureToMemoryInfoKHR*)local_pInfo); +} + +void DispatchObject::CmdCopyMemoryToAccelerationStructureKHR(VkCommandBuffer commandBuffer, + const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo) { + if (!wrap_handles) return device_dispatch_table.CmdCopyMemoryToAccelerationStructureKHR(commandBuffer, pInfo); + vku::safe_VkCopyMemoryToAccelerationStructureInfoKHR var_local_pInfo; + vku::safe_VkCopyMemoryToAccelerationStructureInfoKHR* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->dst) { + local_pInfo->dst = Unwrap(pInfo->dst); + } + } + } + device_dispatch_table.CmdCopyMemoryToAccelerationStructureKHR(commandBuffer, + (const VkCopyMemoryToAccelerationStructureInfoKHR*)local_pInfo); +} + +VkDeviceAddress DispatchObject::GetAccelerationStructureDeviceAddressKHR(VkDevice device, + const VkAccelerationStructureDeviceAddressInfoKHR* pInfo) { + if (!wrap_handles) return device_dispatch_table.GetAccelerationStructureDeviceAddressKHR(device, pInfo); + vku::safe_VkAccelerationStructureDeviceAddressInfoKHR var_local_pInfo; + vku::safe_VkAccelerationStructureDeviceAddressInfoKHR* local_pInfo = nullptr; + { + if (pInfo) { + local_pInfo = &var_local_pInfo; + local_pInfo->initialize(pInfo); + + if (pInfo->accelerationStructure) { + local_pInfo->accelerationStructure = Unwrap(pInfo->accelerationStructure); + } + } + } + VkDeviceAddress result = device_dispatch_table.GetAccelerationStructureDeviceAddressKHR( + device, (const VkAccelerationStructureDeviceAddressInfoKHR*)local_pInfo); + + return result; +} + +void DispatchObject::CmdWriteAccelerationStructuresPropertiesKHR(VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, + const VkAccelerationStructureKHR* pAccelerationStructures, + VkQueryType queryType, VkQueryPool queryPool, + uint32_t firstQuery) { + if (!wrap_handles) + return device_dispatch_table.CmdWriteAccelerationStructuresPropertiesKHR( + commandBuffer, accelerationStructureCount, pAccelerationStructures, queryType, queryPool, firstQuery); + small_vector var_local_pAccelerationStructures; + VkAccelerationStructureKHR* local_pAccelerationStructures = nullptr; + { + if (pAccelerationStructures) { + var_local_pAccelerationStructures.resize(accelerationStructureCount); + local_pAccelerationStructures = var_local_pAccelerationStructures.data(); + for (uint32_t index0 = 0; index0 < accelerationStructureCount; ++index0) { + local_pAccelerationStructures[index0] = Unwrap(pAccelerationStructures[index0]); + } + } + queryPool = Unwrap(queryPool); + } + device_dispatch_table.CmdWriteAccelerationStructuresPropertiesKHR( + commandBuffer, accelerationStructureCount, (const VkAccelerationStructureKHR*)local_pAccelerationStructures, queryType, + queryPool, firstQuery); +} + +void DispatchObject::GetDeviceAccelerationStructureCompatibilityKHR(VkDevice device, + const VkAccelerationStructureVersionInfoKHR* pVersionInfo, + VkAccelerationStructureCompatibilityKHR* pCompatibility) { + device_dispatch_table.GetDeviceAccelerationStructureCompatibilityKHR(device, pVersionInfo, pCompatibility); +} + +void DispatchObject::CmdTraceRaysKHR(VkCommandBuffer commandBuffer, + const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, uint32_t width, + uint32_t height, uint32_t depth) { + device_dispatch_table.CmdTraceRaysKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, pHitShaderBindingTable, + pCallableShaderBindingTable, width, height, depth); +} + +VkResult DispatchObject::GetRayTracingCaptureReplayShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, + uint32_t groupCount, size_t dataSize, void* pData) { + if (!wrap_handles) + return device_dispatch_table.GetRayTracingCaptureReplayShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, + dataSize, pData); + { pipeline = Unwrap(pipeline); } + VkResult result = device_dispatch_table.GetRayTracingCaptureReplayShaderGroupHandlesKHR(device, pipeline, firstGroup, + groupCount, dataSize, pData); + + return result; +} + +void DispatchObject::CmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer, + const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, + VkDeviceAddress indirectDeviceAddress) { + device_dispatch_table.CmdTraceRaysIndirectKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, + pHitShaderBindingTable, pCallableShaderBindingTable, indirectDeviceAddress); +} + +VkDeviceSize DispatchObject::GetRayTracingShaderGroupStackSizeKHR(VkDevice device, VkPipeline pipeline, uint32_t group, + VkShaderGroupShaderKHR groupShader) { + if (!wrap_handles) return device_dispatch_table.GetRayTracingShaderGroupStackSizeKHR(device, pipeline, group, groupShader); + { pipeline = Unwrap(pipeline); } + VkDeviceSize result = device_dispatch_table.GetRayTracingShaderGroupStackSizeKHR(device, pipeline, group, groupShader); + + return result; +} + +void DispatchObject::CmdSetRayTracingPipelineStackSizeKHR(VkCommandBuffer commandBuffer, uint32_t pipelineStackSize) { + device_dispatch_table.CmdSetRayTracingPipelineStackSizeKHR(commandBuffer, pipelineStackSize); +} + +void DispatchObject::CmdDrawMeshTasksEXT(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, + uint32_t groupCountZ) { + device_dispatch_table.CmdDrawMeshTasksEXT(commandBuffer, groupCountX, groupCountY, groupCountZ); +} + +void DispatchObject::CmdDrawMeshTasksIndirectEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + uint32_t drawCount, uint32_t stride) { + if (!wrap_handles) return device_dispatch_table.CmdDrawMeshTasksIndirectEXT(commandBuffer, buffer, offset, drawCount, stride); + { buffer = Unwrap(buffer); } + device_dispatch_table.CmdDrawMeshTasksIndirectEXT(commandBuffer, buffer, offset, drawCount, stride); +} + +void DispatchObject::CmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride) { + if (!wrap_handles) + return device_dispatch_table.CmdDrawMeshTasksIndirectCountEXT(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride); + { + buffer = Unwrap(buffer); + countBuffer = Unwrap(countBuffer); + } + device_dispatch_table.CmdDrawMeshTasksIndirectCountEXT(commandBuffer, buffer, offset, countBuffer, countBufferOffset, + maxDrawCount, stride); +} + +// NOLINTEND diff --git a/layers/vulkan/generated/dispatch_object_methods.h b/layers/vulkan/generated/dispatch_object_methods.h new file mode 100644 index 00000000000..aef31dad128 --- /dev/null +++ b/layers/vulkan/generated/dispatch_object_methods.h @@ -0,0 +1,1213 @@ +// *** THIS FILE IS GENERATED - DO NOT EDIT *** +// See dispatch_object_generator.py for modifications + +/*************************************************************************** + * + * Copyright (c) 2015-2024 The Khronos Group Inc. + * Copyright (c) 2015-2024 Valve Corporation + * Copyright (c) 2015-2024 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. + ****************************************************************************/ + +// NOLINTBEGIN + +// This file contains methods for class DispatchObject and it is designed to ONLY be +// included into dispatch_object.h. +VkResult CreateInstance(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance); +void DestroyInstance(VkInstance instance, const VkAllocationCallbacks* pAllocator); +VkResult EnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices); +void GetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures); +void GetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties); +VkResult GetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, + VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, + VkImageFormatProperties* pImageFormatProperties); +void GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties); +void GetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, + VkQueueFamilyProperties* pQueueFamilyProperties); +void GetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties); +PFN_vkVoidFunction GetInstanceProcAddr(VkInstance instance, const char* pName); +PFN_vkVoidFunction GetDeviceProcAddr(VkDevice device, const char* pName); +VkResult CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDevice* pDevice); +void DestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator); +VkResult EnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties); +VkResult EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pPropertyCount, + VkExtensionProperties* pProperties); +VkResult EnumerateInstanceLayerProperties(uint32_t* pPropertyCount, VkLayerProperties* pProperties); +VkResult EnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkLayerProperties* pProperties); +void GetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue); +VkResult QueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence); +VkResult QueueWaitIdle(VkQueue queue); +VkResult DeviceWaitIdle(VkDevice device); +VkResult AllocateMemory(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, const VkAllocationCallbacks* pAllocator, + VkDeviceMemory* pMemory); +void FreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator); +VkResult MapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, + void** ppData); +void UnmapMemory(VkDevice device, VkDeviceMemory memory); +VkResult FlushMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges); +VkResult InvalidateMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges); +void GetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes); +VkResult BindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset); +VkResult BindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset); +void GetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements); +void GetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements); +void GetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements* pSparseMemoryRequirements); +void GetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, + VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, + uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties); +VkResult QueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence); +VkResult CreateFence(VkDevice device, const VkFenceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkFence* pFence); +void DestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator); +VkResult ResetFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences); +VkResult GetFenceStatus(VkDevice device, VkFence fence); +VkResult WaitForFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout); +VkResult CreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkSemaphore* pSemaphore); +void DestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator); +VkResult CreateEvent(VkDevice device, const VkEventCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkEvent* pEvent); +void DestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator); +VkResult GetEventStatus(VkDevice device, VkEvent event); +VkResult SetEvent(VkDevice device, VkEvent event); +VkResult ResetEvent(VkDevice device, VkEvent event); +VkResult CreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkQueryPool* pQueryPool); +void DestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator); +VkResult GetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, + void* pData, VkDeviceSize stride, VkQueryResultFlags flags); +VkResult CreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkBuffer* pBuffer); +void DestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator); +VkResult CreateBufferView(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkBufferView* pView); +void DestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator); +VkResult CreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkImage* pImage); +void DestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator); +void GetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, + VkSubresourceLayout* pLayout); +VkResult CreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkImageView* pView); +void DestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator); +VkResult CreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkShaderModule* pShaderModule); +void DestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator); +VkResult CreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkPipelineCache* pPipelineCache); +void DestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks* pAllocator); +VkResult GetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData); +VkResult MergePipelineCaches(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches); +VkResult CreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, + VkPipeline* pPipelines); +VkResult CreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, + VkPipeline* pPipelines); +void DestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator); +VkResult CreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout); +void DestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks* pAllocator); +VkResult CreateSampler(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkSampler* pSampler); +void DestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator); +VkResult CreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout); +void DestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, + const VkAllocationCallbacks* pAllocator); +VkResult CreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool); +void DestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks* pAllocator); +VkResult ResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags); +VkResult AllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, + VkDescriptorSet* pDescriptorSets); +VkResult FreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, + const VkDescriptorSet* pDescriptorSets); +void UpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, + uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies); +VkResult CreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkFramebuffer* pFramebuffer); +void DestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator); +VkResult CreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkRenderPass* pRenderPass); +void DestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator); +void GetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity); +VkResult CreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkCommandPool* pCommandPool); +void DestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator); +VkResult ResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags); +VkResult AllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, + VkCommandBuffer* pCommandBuffers); +void FreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, + const VkCommandBuffer* pCommandBuffers); +VkResult BeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo); +VkResult EndCommandBuffer(VkCommandBuffer commandBuffer); +VkResult ResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags); +void CmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline); +void CmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports); +void CmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors); +void CmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth); +void CmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, + float depthBiasSlopeFactor); +void CmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4]); +void CmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds); +void CmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask); +void CmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask); +void CmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference); +void CmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, + uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, + uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets); +void CmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType); +void CmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, + const VkDeviceSize* pOffsets); +void CmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, + uint32_t firstInstance); +void CmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, + int32_t vertexOffset, uint32_t firstInstance); +void CmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride); +void CmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, + uint32_t stride); +void CmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); +void CmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset); +void CmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, + const VkBufferCopy* pRegions); +void CmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, + VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions); +void CmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, + VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter); +void CmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, + uint32_t regionCount, const VkBufferImageCopy* pRegions); +void CmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, + uint32_t regionCount, const VkBufferImageCopy* pRegions); +void CmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, + const void* pData); +void CmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data); +void CmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, + uint32_t rangeCount, const VkImageSubresourceRange* pRanges); +void CmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, + const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, + const VkImageSubresourceRange* pRanges); +void CmdClearAttachments(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, + uint32_t rectCount, const VkClearRect* pRects); +void CmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, + VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions); +void CmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask); +void CmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask); +void CmdWaitEvents(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); +void CmdPipelineBarrier(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); +void CmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags); +void CmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query); +void CmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount); +void CmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query); +void CmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, + VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags); +void CmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, + uint32_t size, const void* pValues); +void CmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents); +void CmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents); +void CmdEndRenderPass(VkCommandBuffer commandBuffer); +void CmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers); +VkResult EnumerateInstanceVersion(uint32_t* pApiVersion); +VkResult BindBufferMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos); +VkResult BindImageMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos); +void GetDeviceGroupPeerMemoryFeatures(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, + VkPeerMemoryFeatureFlags* pPeerMemoryFeatures); +void CmdSetDeviceMask(VkCommandBuffer commandBuffer, uint32_t deviceMask); +void CmdDispatchBase(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, + uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); +VkResult EnumeratePhysicalDeviceGroups(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, + VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties); +void GetImageMemoryRequirements2(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements); +void GetBufferMemoryRequirements2(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements); +void GetImageSparseMemoryRequirements2(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); +void GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures); +void GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties); +void GetPhysicalDeviceFormatProperties2(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties2* pFormatProperties); +VkResult GetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, + VkImageFormatProperties2* pImageFormatProperties); +void GetPhysicalDeviceQueueFamilyProperties2(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, + VkQueueFamilyProperties2* pQueueFamilyProperties); +void GetPhysicalDeviceMemoryProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties); +void GetPhysicalDeviceSparseImageFormatProperties2(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, + uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties); +void TrimCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags); +void GetDeviceQueue2(VkDevice device, const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue); +VkResult CreateSamplerYcbcrConversion(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion); +void DestroySamplerYcbcrConversion(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, + const VkAllocationCallbacks* pAllocator); +VkResult CreateDescriptorUpdateTemplate(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate); +void DestroyDescriptorUpdateTemplate(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, + const VkAllocationCallbacks* pAllocator); +void UpdateDescriptorSetWithTemplate(VkDevice device, VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData); +void GetPhysicalDeviceExternalBufferProperties(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, + VkExternalBufferProperties* pExternalBufferProperties); +void GetPhysicalDeviceExternalFenceProperties(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, + VkExternalFenceProperties* pExternalFenceProperties); +void GetPhysicalDeviceExternalSemaphoreProperties(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, + VkExternalSemaphoreProperties* pExternalSemaphoreProperties); +void GetDescriptorSetLayoutSupport(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, + VkDescriptorSetLayoutSupport* pSupport); +void CmdDrawIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, + VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); +void CmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, + VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); +VkResult CreateRenderPass2(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkRenderPass* pRenderPass); +void CmdBeginRenderPass2(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, + const VkSubpassBeginInfo* pSubpassBeginInfo); +void CmdNextSubpass2(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, + const VkSubpassEndInfo* pSubpassEndInfo); +void CmdEndRenderPass2(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo); +void ResetQueryPool(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount); +VkResult GetSemaphoreCounterValue(VkDevice device, VkSemaphore semaphore, uint64_t* pValue); +VkResult WaitSemaphores(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout); +VkResult SignalSemaphore(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo); +VkDeviceAddress GetBufferDeviceAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo); +uint64_t GetBufferOpaqueCaptureAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo); +uint64_t GetDeviceMemoryOpaqueCaptureAddress(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo); +VkResult GetPhysicalDeviceToolProperties(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, + VkPhysicalDeviceToolProperties* pToolProperties); +VkResult CreatePrivateDataSlot(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot); +void DestroyPrivateDataSlot(VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator); +VkResult SetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, + uint64_t data); +void GetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, + uint64_t* pData); +void CmdSetEvent2(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo); +void CmdResetEvent2(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask); +void CmdWaitEvents2(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, + const VkDependencyInfo* pDependencyInfos); +void CmdPipelineBarrier2(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo); +void CmdWriteTimestamp2(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, uint32_t query); +VkResult QueueSubmit2(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence); +void CmdCopyBuffer2(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo); +void CmdCopyImage2(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo); +void CmdCopyBufferToImage2(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo); +void CmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo); +void CmdBlitImage2(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo); +void CmdResolveImage2(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo); +void CmdBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo); +void CmdEndRendering(VkCommandBuffer commandBuffer); +void CmdSetCullMode(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode); +void CmdSetFrontFace(VkCommandBuffer commandBuffer, VkFrontFace frontFace); +void CmdSetPrimitiveTopology(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology); +void CmdSetViewportWithCount(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports); +void CmdSetScissorWithCount(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors); +void CmdBindVertexBuffers2(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, + const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, const VkDeviceSize* pStrides); +void CmdSetDepthTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable); +void CmdSetDepthWriteEnable(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable); +void CmdSetDepthCompareOp(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp); +void CmdSetDepthBoundsTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable); +void CmdSetStencilTestEnable(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable); +void CmdSetStencilOp(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, + VkStencilOp depthFailOp, VkCompareOp compareOp); +void CmdSetRasterizerDiscardEnable(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable); +void CmdSetDepthBiasEnable(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable); +void CmdSetPrimitiveRestartEnable(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable); +void GetDeviceBufferMemoryRequirements(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements); +void GetDeviceImageMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements); +void GetDeviceImageSparseMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); +void DestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator); +VkResult GetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, + VkBool32* pSupported); +VkResult GetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + VkSurfaceCapabilitiesKHR* pSurfaceCapabilities); +VkResult GetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pSurfaceFormatCount, + VkSurfaceFormatKHR* pSurfaceFormats); +VkResult GetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pPresentModeCount, + VkPresentModeKHR* pPresentModes); +VkResult CreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkSwapchainKHR* pSwapchain); +void DestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator); +VkResult GetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, + VkImage* pSwapchainImages); +VkResult AcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, + uint32_t* pImageIndex); +VkResult QueuePresentKHR(VkQueue queue, const VkPresentInfoKHR* pPresentInfo); +VkResult GetDeviceGroupPresentCapabilitiesKHR(VkDevice device, + VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities); +VkResult GetDeviceGroupSurfacePresentModesKHR(VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR* pModes); +VkResult GetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pRectCount, + VkRect2D* pRects); +VkResult AcquireNextImage2KHR(VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex); +VkResult GetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkDisplayPropertiesKHR* pProperties); +VkResult GetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkDisplayPlanePropertiesKHR* pProperties); +VkResult GetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t* pDisplayCount, + VkDisplayKHR* pDisplays); +VkResult GetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, + VkDisplayModePropertiesKHR* pProperties); +VkResult CreateDisplayModeKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, const VkDisplayModeCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode); +VkResult GetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex, + VkDisplayPlaneCapabilitiesKHR* pCapabilities); +VkResult CreateDisplayPlaneSurfaceKHR(VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); +VkResult CreateSharedSwapchainsKHR(VkDevice device, uint32_t swapchainCount, const VkSwapchainCreateInfoKHR* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains); +#ifdef VK_USE_PLATFORM_XLIB_KHR +VkResult CreateXlibSurfaceKHR(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); +VkBool32 GetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, + VisualID visualID); +#endif // VK_USE_PLATFORM_XLIB_KHR +#ifdef VK_USE_PLATFORM_XCB_KHR +VkResult CreateXcbSurfaceKHR(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); +VkBool32 GetPhysicalDeviceXcbPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + xcb_connection_t* connection, xcb_visualid_t visual_id); +#endif // VK_USE_PLATFORM_XCB_KHR +#ifdef VK_USE_PLATFORM_WAYLAND_KHR +VkResult CreateWaylandSurfaceKHR(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); +VkBool32 GetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + struct wl_display* display); +#endif // VK_USE_PLATFORM_WAYLAND_KHR +#ifdef VK_USE_PLATFORM_ANDROID_KHR +VkResult CreateAndroidSurfaceKHR(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); +#endif // VK_USE_PLATFORM_ANDROID_KHR +#ifdef VK_USE_PLATFORM_WIN32_KHR +VkResult CreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); +VkBool32 GetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex); +#endif // VK_USE_PLATFORM_WIN32_KHR +VkResult GetPhysicalDeviceVideoCapabilitiesKHR(VkPhysicalDevice physicalDevice, const VkVideoProfileInfoKHR* pVideoProfile, + VkVideoCapabilitiesKHR* pCapabilities); +VkResult GetPhysicalDeviceVideoFormatPropertiesKHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceVideoFormatInfoKHR* pVideoFormatInfo, + uint32_t* pVideoFormatPropertyCount, + VkVideoFormatPropertiesKHR* pVideoFormatProperties); +VkResult CreateVideoSessionKHR(VkDevice device, const VkVideoSessionCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkVideoSessionKHR* pVideoSession); +void DestroyVideoSessionKHR(VkDevice device, VkVideoSessionKHR videoSession, const VkAllocationCallbacks* pAllocator); +VkResult GetVideoSessionMemoryRequirementsKHR(VkDevice device, VkVideoSessionKHR videoSession, uint32_t* pMemoryRequirementsCount, + VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements); +VkResult BindVideoSessionMemoryKHR(VkDevice device, VkVideoSessionKHR videoSession, uint32_t bindSessionMemoryInfoCount, + const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos); +VkResult CreateVideoSessionParametersKHR(VkDevice device, const VkVideoSessionParametersCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkVideoSessionParametersKHR* pVideoSessionParameters); +VkResult UpdateVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, + const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo); +void DestroyVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, + const VkAllocationCallbacks* pAllocator); +void CmdBeginVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoBeginCodingInfoKHR* pBeginInfo); +void CmdEndVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoEndCodingInfoKHR* pEndCodingInfo); +void CmdControlVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoCodingControlInfoKHR* pCodingControlInfo); +void CmdDecodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR* pDecodeInfo); +void CmdBeginRenderingKHR(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo); +void CmdEndRenderingKHR(VkCommandBuffer commandBuffer); +void GetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures); +void GetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties); +void GetPhysicalDeviceFormatProperties2KHR(VkPhysicalDevice physicalDevice, VkFormat format, + VkFormatProperties2* pFormatProperties); +VkResult GetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, + VkImageFormatProperties2* pImageFormatProperties); +void GetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, + VkQueueFamilyProperties2* pQueueFamilyProperties); +void GetPhysicalDeviceMemoryProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties); +void GetPhysicalDeviceSparseImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, + uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties); +void GetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, uint32_t remoteDeviceIndex, + VkPeerMemoryFeatureFlags* pPeerMemoryFeatures); +void CmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, uint32_t deviceMask); +void CmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, + uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); +void TrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags); +VkResult EnumeratePhysicalDeviceGroupsKHR(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, + VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties); +void GetPhysicalDeviceExternalBufferPropertiesKHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, + VkExternalBufferProperties* pExternalBufferProperties); +#ifdef VK_USE_PLATFORM_WIN32_KHR +VkResult GetMemoryWin32HandleKHR(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); +VkResult GetMemoryWin32HandlePropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, + VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties); +#endif // VK_USE_PLATFORM_WIN32_KHR +VkResult GetMemoryFdKHR(VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd); +VkResult GetMemoryFdPropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, + VkMemoryFdPropertiesKHR* pMemoryFdProperties); +void GetPhysicalDeviceExternalSemaphorePropertiesKHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, + VkExternalSemaphoreProperties* pExternalSemaphoreProperties); +#ifdef VK_USE_PLATFORM_WIN32_KHR +VkResult ImportSemaphoreWin32HandleKHR(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo); +VkResult GetSemaphoreWin32HandleKHR(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); +#endif // VK_USE_PLATFORM_WIN32_KHR +VkResult ImportSemaphoreFdKHR(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo); +VkResult GetSemaphoreFdKHR(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd); +void CmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, + uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites); +void CmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, + VkPipelineLayout layout, uint32_t set, const void* pData); +VkResult CreateDescriptorUpdateTemplateKHR(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate); +void DestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, + const VkAllocationCallbacks* pAllocator); +void UpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData); +VkResult CreateRenderPass2KHR(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkRenderPass* pRenderPass); +void CmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, + const VkSubpassBeginInfo* pSubpassBeginInfo); +void CmdNextSubpass2KHR(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, + const VkSubpassEndInfo* pSubpassEndInfo); +void CmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo); +VkResult GetSwapchainStatusKHR(VkDevice device, VkSwapchainKHR swapchain); +void GetPhysicalDeviceExternalFencePropertiesKHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, + VkExternalFenceProperties* pExternalFenceProperties); +#ifdef VK_USE_PLATFORM_WIN32_KHR +VkResult ImportFenceWin32HandleKHR(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo); +VkResult GetFenceWin32HandleKHR(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); +#endif // VK_USE_PLATFORM_WIN32_KHR +VkResult ImportFenceFdKHR(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo); +VkResult GetFenceFdKHR(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd); +VkResult EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + uint32_t* pCounterCount, VkPerformanceCounterKHR* pCounters, + VkPerformanceCounterDescriptionKHR* pCounterDescriptions); +void GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR(VkPhysicalDevice physicalDevice, + const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, + uint32_t* pNumPasses); +VkResult AcquireProfilingLockKHR(VkDevice device, const VkAcquireProfilingLockInfoKHR* pInfo); +void ReleaseProfilingLockKHR(VkDevice device); +VkResult GetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + VkSurfaceCapabilities2KHR* pSurfaceCapabilities); +VkResult GetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats); +VkResult GetPhysicalDeviceDisplayProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkDisplayProperties2KHR* pProperties); +VkResult GetPhysicalDeviceDisplayPlaneProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkDisplayPlaneProperties2KHR* pProperties); +VkResult GetDisplayModeProperties2KHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, + VkDisplayModeProperties2KHR* pProperties); +VkResult GetDisplayPlaneCapabilities2KHR(VkPhysicalDevice physicalDevice, const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, + VkDisplayPlaneCapabilities2KHR* pCapabilities); +void GetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements); +void GetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements); +void GetImageSparseMemoryRequirements2KHR(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); +VkResult CreateSamplerYcbcrConversionKHR(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion); +void DestroySamplerYcbcrConversionKHR(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, + const VkAllocationCallbacks* pAllocator); +VkResult BindBufferMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos); +VkResult BindImageMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos); +void GetDescriptorSetLayoutSupportKHR(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, + VkDescriptorSetLayoutSupport* pSupport); +void CmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, + VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); +void CmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, + VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); +VkResult GetSemaphoreCounterValueKHR(VkDevice device, VkSemaphore semaphore, uint64_t* pValue); +VkResult WaitSemaphoresKHR(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout); +VkResult SignalSemaphoreKHR(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo); +VkResult GetPhysicalDeviceFragmentShadingRatesKHR(VkPhysicalDevice physicalDevice, uint32_t* pFragmentShadingRateCount, + VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates); +void CmdSetFragmentShadingRateKHR(VkCommandBuffer commandBuffer, const VkExtent2D* pFragmentSize, + const VkFragmentShadingRateCombinerOpKHR combinerOps[2]); +void CmdSetRenderingAttachmentLocationsKHR(VkCommandBuffer commandBuffer, + const VkRenderingAttachmentLocationInfoKHR* pLocationInfo); +void CmdSetRenderingInputAttachmentIndicesKHR(VkCommandBuffer commandBuffer, + const VkRenderingInputAttachmentIndexInfoKHR* pInputAttachmentIndexInfo); +VkResult WaitForPresentKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t presentId, uint64_t timeout); +VkDeviceAddress GetBufferDeviceAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo); +uint64_t GetBufferOpaqueCaptureAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo); +uint64_t GetDeviceMemoryOpaqueCaptureAddressKHR(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo); +VkResult CreateDeferredOperationKHR(VkDevice device, const VkAllocationCallbacks* pAllocator, + VkDeferredOperationKHR* pDeferredOperation); +void DestroyDeferredOperationKHR(VkDevice device, VkDeferredOperationKHR operation, const VkAllocationCallbacks* pAllocator); +uint32_t GetDeferredOperationMaxConcurrencyKHR(VkDevice device, VkDeferredOperationKHR operation); +VkResult GetDeferredOperationResultKHR(VkDevice device, VkDeferredOperationKHR operation); +VkResult DeferredOperationJoinKHR(VkDevice device, VkDeferredOperationKHR operation); +VkResult GetPipelineExecutablePropertiesKHR(VkDevice device, const VkPipelineInfoKHR* pPipelineInfo, uint32_t* pExecutableCount, + VkPipelineExecutablePropertiesKHR* pProperties); +VkResult GetPipelineExecutableStatisticsKHR(VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, + uint32_t* pStatisticCount, VkPipelineExecutableStatisticKHR* pStatistics); +VkResult GetPipelineExecutableInternalRepresentationsKHR(VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, + uint32_t* pInternalRepresentationCount, + VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations); +VkResult MapMemory2KHR(VkDevice device, const VkMemoryMapInfoKHR* pMemoryMapInfo, void** ppData); +VkResult UnmapMemory2KHR(VkDevice device, const VkMemoryUnmapInfoKHR* pMemoryUnmapInfo); +VkResult GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, + VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties); +VkResult GetEncodedVideoSessionParametersKHR(VkDevice device, + const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo, + VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, size_t* pDataSize, + void* pData); +void CmdEncodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo); +void CmdSetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo); +void CmdResetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask); +void CmdWaitEvents2KHR(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, + const VkDependencyInfo* pDependencyInfos); +void CmdPipelineBarrier2KHR(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo); +void CmdWriteTimestamp2KHR(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, uint32_t query); +VkResult QueueSubmit2KHR(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence); +void CmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo); +void CmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo); +void CmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo); +void CmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo); +void CmdBlitImage2KHR(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo); +void CmdResolveImage2KHR(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo); +void CmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress); +void GetDeviceBufferMemoryRequirementsKHR(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements); +void GetDeviceImageMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements); +void GetDeviceImageSparseMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); +void CmdBindIndexBuffer2KHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkDeviceSize size, + VkIndexType indexType); +void GetRenderingAreaGranularityKHR(VkDevice device, const VkRenderingAreaInfoKHR* pRenderingAreaInfo, VkExtent2D* pGranularity); +void GetDeviceImageSubresourceLayoutKHR(VkDevice device, const VkDeviceImageSubresourceInfoKHR* pInfo, + VkSubresourceLayout2KHR* pLayout); +void GetImageSubresourceLayout2KHR(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, + VkSubresourceLayout2KHR* pLayout); +VkResult CreatePipelineBinariesKHR(VkDevice device, const VkPipelineBinaryCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPipelineBinaryHandlesInfoKHR* pBinaries); +void DestroyPipelineBinaryKHR(VkDevice device, VkPipelineBinaryKHR pipelineBinary, const VkAllocationCallbacks* pAllocator); +VkResult GetPipelineKeyKHR(VkDevice device, const VkPipelineCreateInfoKHR* pPipelineCreateInfo, + VkPipelineBinaryKeyKHR* pPipelineKey); +VkResult GetPipelineBinaryDataKHR(VkDevice device, const VkPipelineBinaryDataInfoKHR* pInfo, + VkPipelineBinaryKeyKHR* pPipelineBinaryKey, size_t* pPipelineBinaryDataSize, + void* pPipelineBinaryData); +VkResult ReleaseCapturedPipelineDataKHR(VkDevice device, const VkReleaseCapturedPipelineDataInfoKHR* pInfo, + const VkAllocationCallbacks* pAllocator); +VkResult GetPhysicalDeviceCooperativeMatrixPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkCooperativeMatrixPropertiesKHR* pProperties); +void CmdSetLineStippleKHR(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern); +VkResult GetPhysicalDeviceCalibrateableTimeDomainsKHR(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, + VkTimeDomainKHR* pTimeDomains); +VkResult GetCalibratedTimestampsKHR(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoKHR* pTimestampInfos, + uint64_t* pTimestamps, uint64_t* pMaxDeviation); +void CmdBindDescriptorSets2KHR(VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo); +void CmdPushConstants2KHR(VkCommandBuffer commandBuffer, const VkPushConstantsInfoKHR* pPushConstantsInfo); +void CmdPushDescriptorSet2KHR(VkCommandBuffer commandBuffer, const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo); +void CmdPushDescriptorSetWithTemplate2KHR(VkCommandBuffer commandBuffer, + const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo); +void CmdSetDescriptorBufferOffsets2EXT(VkCommandBuffer commandBuffer, + const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo); +void CmdBindDescriptorBufferEmbeddedSamplers2EXT( + VkCommandBuffer commandBuffer, const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo); +VkResult CreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback); +void DestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT callback, const VkAllocationCallbacks* pAllocator); +void DebugReportMessageEXT(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, + size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage); +VkResult DebugMarkerSetObjectTagEXT(VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo); +VkResult DebugMarkerSetObjectNameEXT(VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo); +void CmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); +void CmdDebugMarkerEndEXT(VkCommandBuffer commandBuffer); +void CmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); +void CmdBindTransformFeedbackBuffersEXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, + const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes); +void CmdBeginTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, + const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets); +void CmdEndTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, + const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets); +void CmdBeginQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, + uint32_t index); +void CmdEndQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index); +void CmdDrawIndirectByteCountEXT(VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, + VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, + uint32_t vertexStride); +VkResult CreateCuModuleNVX(VkDevice device, const VkCuModuleCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkCuModuleNVX* pModule); +VkResult CreateCuFunctionNVX(VkDevice device, const VkCuFunctionCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkCuFunctionNVX* pFunction); +void DestroyCuModuleNVX(VkDevice device, VkCuModuleNVX module, const VkAllocationCallbacks* pAllocator); +void DestroyCuFunctionNVX(VkDevice device, VkCuFunctionNVX function, const VkAllocationCallbacks* pAllocator); +void CmdCuLaunchKernelNVX(VkCommandBuffer commandBuffer, const VkCuLaunchInfoNVX* pLaunchInfo); +uint32_t GetImageViewHandleNVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo); +uint64_t GetImageViewHandle64NVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo); +VkResult GetImageViewAddressNVX(VkDevice device, VkImageView imageView, VkImageViewAddressPropertiesNVX* pProperties); +void CmdDrawIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, + VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); +void CmdDrawIndexedIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, + VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); +VkResult GetShaderInfoAMD(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, VkShaderInfoTypeAMD infoType, + size_t* pInfoSize, void* pInfo); +#ifdef VK_USE_PLATFORM_GGP +VkResult CreateStreamDescriptorSurfaceGGP(VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); +#endif // VK_USE_PLATFORM_GGP +VkResult GetPhysicalDeviceExternalImageFormatPropertiesNV(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, + VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, + VkExternalMemoryHandleTypeFlagsNV externalHandleType, + VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties); +#ifdef VK_USE_PLATFORM_WIN32_KHR +VkResult GetMemoryWin32HandleNV(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, + HANDLE* pHandle); +#endif // VK_USE_PLATFORM_WIN32_KHR +#ifdef VK_USE_PLATFORM_VI_NN +VkResult CreateViSurfaceNN(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface); +#endif // VK_USE_PLATFORM_VI_NN +void CmdBeginConditionalRenderingEXT(VkCommandBuffer commandBuffer, + const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin); +void CmdEndConditionalRenderingEXT(VkCommandBuffer commandBuffer); +void CmdSetViewportWScalingNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, + const VkViewportWScalingNV* pViewportWScalings); +VkResult ReleaseDisplayEXT(VkPhysicalDevice physicalDevice, VkDisplayKHR display); +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT +VkResult AcquireXlibDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display); +VkResult GetRandROutputDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay); +#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT +VkResult GetPhysicalDeviceSurfaceCapabilities2EXT(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + VkSurfaceCapabilities2EXT* pSurfaceCapabilities); +VkResult DisplayPowerControlEXT(VkDevice device, VkDisplayKHR display, const VkDisplayPowerInfoEXT* pDisplayPowerInfo); +VkResult RegisterDeviceEventEXT(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, + const VkAllocationCallbacks* pAllocator, VkFence* pFence); +VkResult RegisterDisplayEventEXT(VkDevice device, VkDisplayKHR display, const VkDisplayEventInfoEXT* pDisplayEventInfo, + const VkAllocationCallbacks* pAllocator, VkFence* pFence); +VkResult GetSwapchainCounterEXT(VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, + uint64_t* pCounterValue); +VkResult GetRefreshCycleDurationGOOGLE(VkDevice device, VkSwapchainKHR swapchain, + VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties); +VkResult GetPastPresentationTimingGOOGLE(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pPresentationTimingCount, + VkPastPresentationTimingGOOGLE* pPresentationTimings); +void CmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, uint32_t discardRectangleCount, + const VkRect2D* pDiscardRectangles); +void CmdSetDiscardRectangleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 discardRectangleEnable); +void CmdSetDiscardRectangleModeEXT(VkCommandBuffer commandBuffer, VkDiscardRectangleModeEXT discardRectangleMode); +void SetHdrMetadataEXT(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, + const VkHdrMetadataEXT* pMetadata); +#ifdef VK_USE_PLATFORM_IOS_MVK +VkResult CreateIOSSurfaceMVK(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); +#endif // VK_USE_PLATFORM_IOS_MVK +#ifdef VK_USE_PLATFORM_MACOS_MVK +VkResult CreateMacOSSurfaceMVK(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); +#endif // VK_USE_PLATFORM_MACOS_MVK +VkResult SetDebugUtilsObjectNameEXT(VkDevice device, const VkDebugUtilsObjectNameInfoEXT* pNameInfo); +VkResult SetDebugUtilsObjectTagEXT(VkDevice device, const VkDebugUtilsObjectTagInfoEXT* pTagInfo); +void QueueBeginDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo); +void QueueEndDebugUtilsLabelEXT(VkQueue queue); +void QueueInsertDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo); +void CmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo); +void CmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer); +void CmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo); +VkResult CreateDebugUtilsMessengerEXT(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDebugUtilsMessengerEXT* pMessenger); +void DestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT messenger, + const VkAllocationCallbacks* pAllocator); +void SubmitDebugUtilsMessageEXT(VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, + VkDebugUtilsMessageTypeFlagsEXT messageTypes, + const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData); +#ifdef VK_USE_PLATFORM_ANDROID_KHR +VkResult GetAndroidHardwareBufferPropertiesANDROID(VkDevice device, const struct AHardwareBuffer* buffer, + VkAndroidHardwareBufferPropertiesANDROID* pProperties); +VkResult GetMemoryAndroidHardwareBufferANDROID(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, + struct AHardwareBuffer** pBuffer); +#endif // VK_USE_PLATFORM_ANDROID_KHR +#ifdef VK_ENABLE_BETA_EXTENSIONS +VkResult CreateExecutionGraphPipelinesAMDX(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); +VkResult GetExecutionGraphPipelineScratchSizeAMDX(VkDevice device, VkPipeline executionGraph, + VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo); +VkResult GetExecutionGraphPipelineNodeIndexAMDX(VkDevice device, VkPipeline executionGraph, + const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo, uint32_t* pNodeIndex); +void CmdInitializeGraphScratchMemoryAMDX(VkCommandBuffer commandBuffer, VkPipeline executionGraph, VkDeviceAddress scratch, + VkDeviceSize scratchSize); +void CmdDispatchGraphAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, + const VkDispatchGraphCountInfoAMDX* pCountInfo); +void CmdDispatchGraphIndirectAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, + const VkDispatchGraphCountInfoAMDX* pCountInfo); +void CmdDispatchGraphIndirectCountAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, + VkDeviceAddress countInfo); +#endif // VK_ENABLE_BETA_EXTENSIONS +void CmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo); +void GetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, + VkMultisamplePropertiesEXT* pMultisampleProperties); +VkResult GetImageDrmFormatModifierPropertiesEXT(VkDevice device, VkImage image, VkImageDrmFormatModifierPropertiesEXT* pProperties); +VkResult CreateValidationCacheEXT(VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkValidationCacheEXT* pValidationCache); +void DestroyValidationCacheEXT(VkDevice device, VkValidationCacheEXT validationCache, const VkAllocationCallbacks* pAllocator); +VkResult MergeValidationCachesEXT(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, + const VkValidationCacheEXT* pSrcCaches); +VkResult GetValidationCacheDataEXT(VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, void* pData); +void CmdBindShadingRateImageNV(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout); +void CmdSetViewportShadingRatePaletteNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, + const VkShadingRatePaletteNV* pShadingRatePalettes); +void CmdSetCoarseSampleOrderNV(VkCommandBuffer commandBuffer, VkCoarseSampleOrderTypeNV sampleOrderType, + uint32_t customSampleOrderCount, const VkCoarseSampleOrderCustomNV* pCustomSampleOrders); +VkResult CreateAccelerationStructureNV(VkDevice device, const VkAccelerationStructureCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkAccelerationStructureNV* pAccelerationStructure); +void DestroyAccelerationStructureNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, + const VkAllocationCallbacks* pAllocator); +void GetAccelerationStructureMemoryRequirementsNV(VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, + VkMemoryRequirements2KHR* pMemoryRequirements); +VkResult BindAccelerationStructureMemoryNV(VkDevice device, uint32_t bindInfoCount, + const VkBindAccelerationStructureMemoryInfoNV* pBindInfos); +void CmdBuildAccelerationStructureNV(VkCommandBuffer commandBuffer, const VkAccelerationStructureInfoNV* pInfo, + VkBuffer instanceData, VkDeviceSize instanceOffset, VkBool32 update, + VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkBuffer scratch, + VkDeviceSize scratchOffset); +void CmdCopyAccelerationStructureNV(VkCommandBuffer commandBuffer, VkAccelerationStructureNV dst, VkAccelerationStructureNV src, + VkCopyAccelerationStructureModeKHR mode); +void CmdTraceRaysNV(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); +VkResult CreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoNV* pCreateInfos, const VkAllocationCallbacks* pAllocator, + VkPipeline* pPipelines); +VkResult GetRayTracingShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, + size_t dataSize, void* pData); +VkResult GetRayTracingShaderGroupHandlesNV(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, + size_t dataSize, void* pData); +VkResult GetAccelerationStructureHandleNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, size_t dataSize, + void* pData); +void CmdWriteAccelerationStructuresPropertiesNV(VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, + const VkAccelerationStructureNV* pAccelerationStructures, VkQueryType queryType, + VkQueryPool queryPool, uint32_t firstQuery); +VkResult CompileDeferredNV(VkDevice device, VkPipeline pipeline, uint32_t shader); +VkResult GetMemoryHostPointerPropertiesEXT(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer, + VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties); +void CmdWriteBufferMarkerAMD(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkBuffer dstBuffer, + VkDeviceSize dstOffset, uint32_t marker); +void CmdWriteBufferMarker2AMD(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkBuffer dstBuffer, + VkDeviceSize dstOffset, uint32_t marker); +VkResult GetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, + VkTimeDomainKHR* pTimeDomains); +VkResult GetCalibratedTimestampsEXT(VkDevice device, uint32_t timestampCount, const VkCalibratedTimestampInfoKHR* pTimestampInfos, + uint64_t* pTimestamps, uint64_t* pMaxDeviation); +void CmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask); +void CmdDrawMeshTasksIndirectNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, + uint32_t stride); +void CmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, + VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); +void CmdSetExclusiveScissorEnableNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, + const VkBool32* pExclusiveScissorEnables); +void CmdSetExclusiveScissorNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, + const VkRect2D* pExclusiveScissors); +void CmdSetCheckpointNV(VkCommandBuffer commandBuffer, const void* pCheckpointMarker); +void GetQueueCheckpointDataNV(VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointDataNV* pCheckpointData); +void GetQueueCheckpointData2NV(VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointData2NV* pCheckpointData); +VkResult InitializePerformanceApiINTEL(VkDevice device, const VkInitializePerformanceApiInfoINTEL* pInitializeInfo); +void UninitializePerformanceApiINTEL(VkDevice device); +VkResult CmdSetPerformanceMarkerINTEL(VkCommandBuffer commandBuffer, const VkPerformanceMarkerInfoINTEL* pMarkerInfo); +VkResult CmdSetPerformanceStreamMarkerINTEL(VkCommandBuffer commandBuffer, const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo); +VkResult CmdSetPerformanceOverrideINTEL(VkCommandBuffer commandBuffer, const VkPerformanceOverrideInfoINTEL* pOverrideInfo); +VkResult AcquirePerformanceConfigurationINTEL(VkDevice device, const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, + VkPerformanceConfigurationINTEL* pConfiguration); +VkResult ReleasePerformanceConfigurationINTEL(VkDevice device, VkPerformanceConfigurationINTEL configuration); +VkResult QueueSetPerformanceConfigurationINTEL(VkQueue queue, VkPerformanceConfigurationINTEL configuration); +VkResult GetPerformanceParameterINTEL(VkDevice device, VkPerformanceParameterTypeINTEL parameter, VkPerformanceValueINTEL* pValue); +void SetLocalDimmingAMD(VkDevice device, VkSwapchainKHR swapChain, VkBool32 localDimmingEnable); +#ifdef VK_USE_PLATFORM_FUCHSIA +VkResult CreateImagePipeSurfaceFUCHSIA(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); +#endif // VK_USE_PLATFORM_FUCHSIA +#ifdef VK_USE_PLATFORM_METAL_EXT +VkResult CreateMetalSurfaceEXT(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); +#endif // VK_USE_PLATFORM_METAL_EXT +VkDeviceAddress GetBufferDeviceAddressEXT(VkDevice device, const VkBufferDeviceAddressInfo* pInfo); +VkResult GetPhysicalDeviceToolPropertiesEXT(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, + VkPhysicalDeviceToolProperties* pToolProperties); +VkResult GetPhysicalDeviceCooperativeMatrixPropertiesNV(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkCooperativeMatrixPropertiesNV* pProperties); +VkResult GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(VkPhysicalDevice physicalDevice, + uint32_t* pCombinationCount, + VkFramebufferMixedSamplesCombinationNV* pCombinations); +#ifdef VK_USE_PLATFORM_WIN32_KHR +VkResult GetPhysicalDeviceSurfacePresentModes2EXT(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pPresentModeCount, + VkPresentModeKHR* pPresentModes); +VkResult AcquireFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain); +VkResult ReleaseFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain); +VkResult GetDeviceGroupSurfacePresentModes2EXT(VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + VkDeviceGroupPresentModeFlagsKHR* pModes); +#endif // VK_USE_PLATFORM_WIN32_KHR +VkResult CreateHeadlessSurfaceEXT(VkInstance instance, const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); +void CmdSetLineStippleEXT(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern); +void ResetQueryPoolEXT(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount); +void CmdSetCullModeEXT(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode); +void CmdSetFrontFaceEXT(VkCommandBuffer commandBuffer, VkFrontFace frontFace); +void CmdSetPrimitiveTopologyEXT(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology); +void CmdSetViewportWithCountEXT(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports); +void CmdSetScissorWithCountEXT(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors); +void CmdBindVertexBuffers2EXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, + const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, const VkDeviceSize* pStrides); +void CmdSetDepthTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable); +void CmdSetDepthWriteEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable); +void CmdSetDepthCompareOpEXT(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp); +void CmdSetDepthBoundsTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable); +void CmdSetStencilTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable); +void CmdSetStencilOpEXT(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, + VkStencilOp depthFailOp, VkCompareOp compareOp); +VkResult CopyMemoryToImageEXT(VkDevice device, const VkCopyMemoryToImageInfoEXT* pCopyMemoryToImageInfo); +VkResult CopyImageToMemoryEXT(VkDevice device, const VkCopyImageToMemoryInfoEXT* pCopyImageToMemoryInfo); +VkResult CopyImageToImageEXT(VkDevice device, const VkCopyImageToImageInfoEXT* pCopyImageToImageInfo); +VkResult TransitionImageLayoutEXT(VkDevice device, uint32_t transitionCount, + const VkHostImageLayoutTransitionInfoEXT* pTransitions); +void GetImageSubresourceLayout2EXT(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, + VkSubresourceLayout2KHR* pLayout); +VkResult ReleaseSwapchainImagesEXT(VkDevice device, const VkReleaseSwapchainImagesInfoEXT* pReleaseInfo); +void GetGeneratedCommandsMemoryRequirementsNV(VkDevice device, const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo, + VkMemoryRequirements2* pMemoryRequirements); +void CmdPreprocessGeneratedCommandsNV(VkCommandBuffer commandBuffer, const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo); +void CmdExecuteGeneratedCommandsNV(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, + const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo); +void CmdBindPipelineShaderGroupNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline, + uint32_t groupIndex); +VkResult CreateIndirectCommandsLayoutNV(VkDevice device, const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkIndirectCommandsLayoutNV* pIndirectCommandsLayout); +void DestroyIndirectCommandsLayoutNV(VkDevice device, VkIndirectCommandsLayoutNV indirectCommandsLayout, + const VkAllocationCallbacks* pAllocator); +void CmdSetDepthBias2EXT(VkCommandBuffer commandBuffer, const VkDepthBiasInfoEXT* pDepthBiasInfo); +VkResult AcquireDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, VkDisplayKHR display); +VkResult GetDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, uint32_t connectorId, VkDisplayKHR* display); +VkResult CreatePrivateDataSlotEXT(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot); +void DestroyPrivateDataSlotEXT(VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator); +VkResult SetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, + uint64_t data); +void GetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, + uint64_t* pData); +VkResult CreateCudaModuleNV(VkDevice device, const VkCudaModuleCreateInfoNV* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkCudaModuleNV* pModule); +VkResult GetCudaModuleCacheNV(VkDevice device, VkCudaModuleNV module, size_t* pCacheSize, void* pCacheData); +VkResult CreateCudaFunctionNV(VkDevice device, const VkCudaFunctionCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCudaFunctionNV* pFunction); +void DestroyCudaModuleNV(VkDevice device, VkCudaModuleNV module, const VkAllocationCallbacks* pAllocator); +void DestroyCudaFunctionNV(VkDevice device, VkCudaFunctionNV function, const VkAllocationCallbacks* pAllocator); +void CmdCudaLaunchKernelNV(VkCommandBuffer commandBuffer, const VkCudaLaunchInfoNV* pLaunchInfo); +#ifdef VK_USE_PLATFORM_METAL_EXT +void ExportMetalObjectsEXT(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo); +#endif // VK_USE_PLATFORM_METAL_EXT +void GetDescriptorSetLayoutSizeEXT(VkDevice device, VkDescriptorSetLayout layout, VkDeviceSize* pLayoutSizeInBytes); +void GetDescriptorSetLayoutBindingOffsetEXT(VkDevice device, VkDescriptorSetLayout layout, uint32_t binding, VkDeviceSize* pOffset); +void GetDescriptorEXT(VkDevice device, const VkDescriptorGetInfoEXT* pDescriptorInfo, size_t dataSize, void* pDescriptor); +void CmdBindDescriptorBuffersEXT(VkCommandBuffer commandBuffer, uint32_t bufferCount, + const VkDescriptorBufferBindingInfoEXT* pBindingInfos); +void CmdSetDescriptorBufferOffsetsEXT(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, + uint32_t firstSet, uint32_t setCount, const uint32_t* pBufferIndices, + const VkDeviceSize* pOffsets); +void CmdBindDescriptorBufferEmbeddedSamplersEXT(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, uint32_t set); +VkResult GetBufferOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkBufferCaptureDescriptorDataInfoEXT* pInfo, void* pData); +VkResult GetImageOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkImageCaptureDescriptorDataInfoEXT* pInfo, void* pData); +VkResult GetImageViewOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkImageViewCaptureDescriptorDataInfoEXT* pInfo, + void* pData); +VkResult GetSamplerOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkSamplerCaptureDescriptorDataInfoEXT* pInfo, void* pData); +VkResult GetAccelerationStructureOpaqueCaptureDescriptorDataEXT(VkDevice device, + const VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfo, + void* pData); +void CmdSetFragmentShadingRateEnumNV(VkCommandBuffer commandBuffer, VkFragmentShadingRateNV shadingRate, + const VkFragmentShadingRateCombinerOpKHR combinerOps[2]); +VkResult GetDeviceFaultInfoEXT(VkDevice device, VkDeviceFaultCountsEXT* pFaultCounts, VkDeviceFaultInfoEXT* pFaultInfo); +#ifdef VK_USE_PLATFORM_WIN32_KHR +VkResult AcquireWinrtDisplayNV(VkPhysicalDevice physicalDevice, VkDisplayKHR display); +VkResult GetWinrtDisplayNV(VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR* pDisplay); +#endif // VK_USE_PLATFORM_WIN32_KHR +#ifdef VK_USE_PLATFORM_DIRECTFB_EXT +VkResult CreateDirectFBSurfaceEXT(VkInstance instance, const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); +VkBool32 GetPhysicalDeviceDirectFBPresentationSupportEXT(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + IDirectFB* dfb); +#endif // VK_USE_PLATFORM_DIRECTFB_EXT +void CmdSetVertexInputEXT(VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, + const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, + uint32_t vertexAttributeDescriptionCount, + const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions); +#ifdef VK_USE_PLATFORM_FUCHSIA +VkResult GetMemoryZirconHandleFUCHSIA(VkDevice device, const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, + zx_handle_t* pZirconHandle); +VkResult GetMemoryZirconHandlePropertiesFUCHSIA(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, + zx_handle_t zirconHandle, + VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties); +VkResult ImportSemaphoreZirconHandleFUCHSIA(VkDevice device, + const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo); +VkResult GetSemaphoreZirconHandleFUCHSIA(VkDevice device, const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, + zx_handle_t* pZirconHandle); +VkResult CreateBufferCollectionFUCHSIA(VkDevice device, const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkBufferCollectionFUCHSIA* pCollection); +VkResult SetBufferCollectionImageConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, + const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo); +VkResult SetBufferCollectionBufferConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, + const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo); +void DestroyBufferCollectionFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkAllocationCallbacks* pAllocator); +VkResult GetBufferCollectionPropertiesFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, + VkBufferCollectionPropertiesFUCHSIA* pProperties); +#endif // VK_USE_PLATFORM_FUCHSIA +VkResult GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(VkDevice device, VkRenderPass renderpass, VkExtent2D* pMaxWorkgroupSize); +void CmdSubpassShadingHUAWEI(VkCommandBuffer commandBuffer); +void CmdBindInvocationMaskHUAWEI(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout); +VkResult GetMemoryRemoteAddressNV(VkDevice device, const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo, + VkRemoteAddressNV* pAddress); +VkResult GetPipelinePropertiesEXT(VkDevice device, const VkPipelineInfoEXT* pPipelineInfo, VkBaseOutStructure* pPipelineProperties); +void CmdSetPatchControlPointsEXT(VkCommandBuffer commandBuffer, uint32_t patchControlPoints); +void CmdSetRasterizerDiscardEnableEXT(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable); +void CmdSetDepthBiasEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable); +void CmdSetLogicOpEXT(VkCommandBuffer commandBuffer, VkLogicOp logicOp); +void CmdSetPrimitiveRestartEnableEXT(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable); +#ifdef VK_USE_PLATFORM_SCREEN_QNX +VkResult CreateScreenSurfaceQNX(VkInstance instance, const VkScreenSurfaceCreateInfoQNX* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); +VkBool32 GetPhysicalDeviceScreenPresentationSupportQNX(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + struct _screen_window* window); +#endif // VK_USE_PLATFORM_SCREEN_QNX +void CmdSetColorWriteEnableEXT(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkBool32* pColorWriteEnables); +void CmdDrawMultiEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawInfoEXT* pVertexInfo, + uint32_t instanceCount, uint32_t firstInstance, uint32_t stride); +void CmdDrawMultiIndexedEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawIndexedInfoEXT* pIndexInfo, + uint32_t instanceCount, uint32_t firstInstance, uint32_t stride, const int32_t* pVertexOffset); +VkResult CreateMicromapEXT(VkDevice device, const VkMicromapCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkMicromapEXT* pMicromap); +void DestroyMicromapEXT(VkDevice device, VkMicromapEXT micromap, const VkAllocationCallbacks* pAllocator); +void CmdBuildMicromapsEXT(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos); +VkResult BuildMicromapsEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, + const VkMicromapBuildInfoEXT* pInfos); +VkResult CopyMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapInfoEXT* pInfo); +VkResult CopyMicromapToMemoryEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMicromapToMemoryInfoEXT* pInfo); +VkResult CopyMemoryToMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMemoryToMicromapInfoEXT* pInfo); +VkResult WriteMicromapsPropertiesEXT(VkDevice device, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, + VkQueryType queryType, size_t dataSize, void* pData, size_t stride); +void CmdCopyMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT* pInfo); +void CmdCopyMicromapToMemoryEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT* pInfo); +void CmdCopyMemoryToMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT* pInfo); +void CmdWriteMicromapsPropertiesEXT(VkCommandBuffer commandBuffer, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, + VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery); +void GetDeviceMicromapCompatibilityEXT(VkDevice device, const VkMicromapVersionInfoEXT* pVersionInfo, + VkAccelerationStructureCompatibilityKHR* pCompatibility); +void GetMicromapBuildSizesEXT(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, + const VkMicromapBuildInfoEXT* pBuildInfo, VkMicromapBuildSizesInfoEXT* pSizeInfo); +void CmdDrawClusterHUAWEI(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); +void CmdDrawClusterIndirectHUAWEI(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset); +void SetDeviceMemoryPriorityEXT(VkDevice device, VkDeviceMemory memory, float priority); +void GetDescriptorSetLayoutHostMappingInfoVALVE(VkDevice device, const VkDescriptorSetBindingReferenceVALVE* pBindingReference, + VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping); +void GetDescriptorSetHostMappingVALVE(VkDevice device, VkDescriptorSet descriptorSet, void** ppData); +void CmdCopyMemoryIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, uint32_t copyCount, uint32_t stride); +void CmdCopyMemoryToImageIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, uint32_t copyCount, + uint32_t stride, VkImage dstImage, VkImageLayout dstImageLayout, + const VkImageSubresourceLayers* pImageSubresources); +void CmdDecompressMemoryNV(VkCommandBuffer commandBuffer, uint32_t decompressRegionCount, + const VkDecompressMemoryRegionNV* pDecompressMemoryRegions); +void CmdDecompressMemoryIndirectCountNV(VkCommandBuffer commandBuffer, VkDeviceAddress indirectCommandsAddress, + VkDeviceAddress indirectCommandsCountAddress, uint32_t stride); +void GetPipelineIndirectMemoryRequirementsNV(VkDevice device, const VkComputePipelineCreateInfo* pCreateInfo, + VkMemoryRequirements2* pMemoryRequirements); +void CmdUpdatePipelineIndirectBufferNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline); +VkDeviceAddress GetPipelineIndirectDeviceAddressNV(VkDevice device, const VkPipelineIndirectDeviceAddressInfoNV* pInfo); +void CmdSetDepthClampEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClampEnable); +void CmdSetPolygonModeEXT(VkCommandBuffer commandBuffer, VkPolygonMode polygonMode); +void CmdSetRasterizationSamplesEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits rasterizationSamples); +void CmdSetSampleMaskEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits samples, const VkSampleMask* pSampleMask); +void CmdSetAlphaToCoverageEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToCoverageEnable); +void CmdSetAlphaToOneEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToOneEnable); +void CmdSetLogicOpEnableEXT(VkCommandBuffer commandBuffer, VkBool32 logicOpEnable); +void CmdSetColorBlendEnableEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, + const VkBool32* pColorBlendEnables); +void CmdSetColorBlendEquationEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, + const VkColorBlendEquationEXT* pColorBlendEquations); +void CmdSetColorWriteMaskEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, + const VkColorComponentFlags* pColorWriteMasks); +void CmdSetTessellationDomainOriginEXT(VkCommandBuffer commandBuffer, VkTessellationDomainOrigin domainOrigin); +void CmdSetRasterizationStreamEXT(VkCommandBuffer commandBuffer, uint32_t rasterizationStream); +void CmdSetConservativeRasterizationModeEXT(VkCommandBuffer commandBuffer, + VkConservativeRasterizationModeEXT conservativeRasterizationMode); +void CmdSetExtraPrimitiveOverestimationSizeEXT(VkCommandBuffer commandBuffer, float extraPrimitiveOverestimationSize); +void CmdSetDepthClipEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClipEnable); +void CmdSetSampleLocationsEnableEXT(VkCommandBuffer commandBuffer, VkBool32 sampleLocationsEnable); +void CmdSetColorBlendAdvancedEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, + const VkColorBlendAdvancedEXT* pColorBlendAdvanced); +void CmdSetProvokingVertexModeEXT(VkCommandBuffer commandBuffer, VkProvokingVertexModeEXT provokingVertexMode); +void CmdSetLineRasterizationModeEXT(VkCommandBuffer commandBuffer, VkLineRasterizationModeEXT lineRasterizationMode); +void CmdSetLineStippleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stippledLineEnable); +void CmdSetDepthClipNegativeOneToOneEXT(VkCommandBuffer commandBuffer, VkBool32 negativeOneToOne); +void CmdSetViewportWScalingEnableNV(VkCommandBuffer commandBuffer, VkBool32 viewportWScalingEnable); +void CmdSetViewportSwizzleNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, + const VkViewportSwizzleNV* pViewportSwizzles); +void CmdSetCoverageToColorEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageToColorEnable); +void CmdSetCoverageToColorLocationNV(VkCommandBuffer commandBuffer, uint32_t coverageToColorLocation); +void CmdSetCoverageModulationModeNV(VkCommandBuffer commandBuffer, VkCoverageModulationModeNV coverageModulationMode); +void CmdSetCoverageModulationTableEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageModulationTableEnable); +void CmdSetCoverageModulationTableNV(VkCommandBuffer commandBuffer, uint32_t coverageModulationTableCount, + const float* pCoverageModulationTable); +void CmdSetShadingRateImageEnableNV(VkCommandBuffer commandBuffer, VkBool32 shadingRateImageEnable); +void CmdSetRepresentativeFragmentTestEnableNV(VkCommandBuffer commandBuffer, VkBool32 representativeFragmentTestEnable); +void CmdSetCoverageReductionModeNV(VkCommandBuffer commandBuffer, VkCoverageReductionModeNV coverageReductionMode); +void GetShaderModuleIdentifierEXT(VkDevice device, VkShaderModule shaderModule, VkShaderModuleIdentifierEXT* pIdentifier); +void GetShaderModuleCreateInfoIdentifierEXT(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, + VkShaderModuleIdentifierEXT* pIdentifier); +VkResult GetPhysicalDeviceOpticalFlowImageFormatsNV(VkPhysicalDevice physicalDevice, + const VkOpticalFlowImageFormatInfoNV* pOpticalFlowImageFormatInfo, + uint32_t* pFormatCount, + VkOpticalFlowImageFormatPropertiesNV* pImageFormatProperties); +VkResult CreateOpticalFlowSessionNV(VkDevice device, const VkOpticalFlowSessionCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkOpticalFlowSessionNV* pSession); +void DestroyOpticalFlowSessionNV(VkDevice device, VkOpticalFlowSessionNV session, const VkAllocationCallbacks* pAllocator); +VkResult BindOpticalFlowSessionImageNV(VkDevice device, VkOpticalFlowSessionNV session, + VkOpticalFlowSessionBindingPointNV bindingPoint, VkImageView view, VkImageLayout layout); +void CmdOpticalFlowExecuteNV(VkCommandBuffer commandBuffer, VkOpticalFlowSessionNV session, + const VkOpticalFlowExecuteInfoNV* pExecuteInfo); +void AntiLagUpdateAMD(VkDevice device, const VkAntiLagDataAMD* pData); +VkResult CreateShadersEXT(VkDevice device, uint32_t createInfoCount, const VkShaderCreateInfoEXT* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkShaderEXT* pShaders); +void DestroyShaderEXT(VkDevice device, VkShaderEXT shader, const VkAllocationCallbacks* pAllocator); +VkResult GetShaderBinaryDataEXT(VkDevice device, VkShaderEXT shader, size_t* pDataSize, void* pData); +void CmdBindShadersEXT(VkCommandBuffer commandBuffer, uint32_t stageCount, const VkShaderStageFlagBits* pStages, + const VkShaderEXT* pShaders); +void CmdSetDepthClampRangeEXT(VkCommandBuffer commandBuffer, VkDepthClampModeEXT depthClampMode, + const VkDepthClampRangeEXT* pDepthClampRange); +VkResult GetFramebufferTilePropertiesQCOM(VkDevice device, VkFramebuffer framebuffer, uint32_t* pPropertiesCount, + VkTilePropertiesQCOM* pProperties); +VkResult GetDynamicRenderingTilePropertiesQCOM(VkDevice device, const VkRenderingInfo* pRenderingInfo, + VkTilePropertiesQCOM* pProperties); +VkResult SetLatencySleepModeNV(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepModeInfoNV* pSleepModeInfo); +VkResult LatencySleepNV(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepInfoNV* pSleepInfo); +void SetLatencyMarkerNV(VkDevice device, VkSwapchainKHR swapchain, const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo); +void GetLatencyTimingsNV(VkDevice device, VkSwapchainKHR swapchain, VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo); +void QueueNotifyOutOfBandNV(VkQueue queue, const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo); +void CmdSetAttachmentFeedbackLoopEnableEXT(VkCommandBuffer commandBuffer, VkImageAspectFlags aspectMask); +#ifdef VK_USE_PLATFORM_SCREEN_QNX +VkResult GetScreenBufferPropertiesQNX(VkDevice device, const struct _screen_buffer* buffer, + VkScreenBufferPropertiesQNX* pProperties); +#endif // VK_USE_PLATFORM_SCREEN_QNX +void GetGeneratedCommandsMemoryRequirementsEXT(VkDevice device, const VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfo, + VkMemoryRequirements2* pMemoryRequirements); +void CmdPreprocessGeneratedCommandsEXT(VkCommandBuffer commandBuffer, const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, + VkCommandBuffer stateCommandBuffer); +void CmdExecuteGeneratedCommandsEXT(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, + const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo); +VkResult CreateIndirectCommandsLayoutEXT(VkDevice device, const VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkIndirectCommandsLayoutEXT* pIndirectCommandsLayout); +void DestroyIndirectCommandsLayoutEXT(VkDevice device, VkIndirectCommandsLayoutEXT indirectCommandsLayout, + const VkAllocationCallbacks* pAllocator); +VkResult CreateIndirectExecutionSetEXT(VkDevice device, const VkIndirectExecutionSetCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkIndirectExecutionSetEXT* pIndirectExecutionSet); +void DestroyIndirectExecutionSetEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, + const VkAllocationCallbacks* pAllocator); +void UpdateIndirectExecutionSetPipelineEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, + uint32_t executionSetWriteCount, + const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites); +void UpdateIndirectExecutionSetShaderEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, + uint32_t executionSetWriteCount, + const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites); +VkResult GetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( + VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixFlexibleDimensionsPropertiesNV* pProperties); +VkResult CreateAccelerationStructureKHR(VkDevice device, const VkAccelerationStructureCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkAccelerationStructureKHR* pAccelerationStructure); +void DestroyAccelerationStructureKHR(VkDevice device, VkAccelerationStructureKHR accelerationStructure, + const VkAllocationCallbacks* pAllocator); +void CmdBuildAccelerationStructuresKHR(VkCommandBuffer commandBuffer, uint32_t infoCount, + const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, + const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos); +void CmdBuildAccelerationStructuresIndirectKHR(VkCommandBuffer commandBuffer, uint32_t infoCount, + const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, + const VkDeviceAddress* pIndirectDeviceAddresses, const uint32_t* pIndirectStrides, + const uint32_t* const* ppMaxPrimitiveCounts); +VkResult BuildAccelerationStructuresKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, + const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, + const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos); +VkResult CopyAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyAccelerationStructureInfoKHR* pInfo); +VkResult CopyAccelerationStructureToMemoryKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo); +VkResult CopyMemoryToAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo); +VkResult WriteAccelerationStructuresPropertiesKHR(VkDevice device, uint32_t accelerationStructureCount, + const VkAccelerationStructureKHR* pAccelerationStructures, VkQueryType queryType, + size_t dataSize, void* pData, size_t stride); +void CmdCopyAccelerationStructureKHR(VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureInfoKHR* pInfo); +void CmdCopyAccelerationStructureToMemoryKHR(VkCommandBuffer commandBuffer, + const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo); +void CmdCopyMemoryToAccelerationStructureKHR(VkCommandBuffer commandBuffer, + const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo); +VkDeviceAddress GetAccelerationStructureDeviceAddressKHR(VkDevice device, const VkAccelerationStructureDeviceAddressInfoKHR* pInfo); +void CmdWriteAccelerationStructuresPropertiesKHR(VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, + const VkAccelerationStructureKHR* pAccelerationStructures, VkQueryType queryType, + VkQueryPool queryPool, uint32_t firstQuery); +void GetDeviceAccelerationStructureCompatibilityKHR(VkDevice device, const VkAccelerationStructureVersionInfoKHR* pVersionInfo, + VkAccelerationStructureCompatibilityKHR* pCompatibility); +void GetAccelerationStructureBuildSizesKHR(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, + const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo, + const uint32_t* pMaxPrimitiveCounts, + VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo); +void CmdTraceRaysKHR(VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, uint32_t width, uint32_t height, + uint32_t depth); +VkResult CreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, + uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); +VkResult GetRayTracingCaptureReplayShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, + uint32_t groupCount, size_t dataSize, void* pData); +void CmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, + VkDeviceAddress indirectDeviceAddress); +VkDeviceSize GetRayTracingShaderGroupStackSizeKHR(VkDevice device, VkPipeline pipeline, uint32_t group, + VkShaderGroupShaderKHR groupShader); +void CmdSetRayTracingPipelineStackSizeKHR(VkCommandBuffer commandBuffer, uint32_t pipelineStackSize); +void CmdDrawMeshTasksEXT(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); +void CmdDrawMeshTasksIndirectEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, + uint32_t stride); +void CmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, + VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); + +// NOLINTEND diff --git a/layers/vulkan/generated/chassis_dispatch_helper.h b/layers/vulkan/generated/dispatch_vector.cpp similarity index 54% rename from layers/vulkan/generated/chassis_dispatch_helper.h rename to layers/vulkan/generated/dispatch_vector.cpp index 59921543e0d..cc5ed6a69e5 100644 --- a/layers/vulkan/generated/chassis_dispatch_helper.h +++ b/layers/vulkan/generated/dispatch_vector.cpp @@ -1,5 +1,5 @@ // *** THIS FILE IS GENERATED - DO NOT EDIT *** -// See layer_chassis_generator.py for modifications +// See dispatch_vector_generator.py for modifications /*************************************************************************** * @@ -24,1796 +24,66 @@ // NOLINTBEGIN -#pragma once - // This source code creates dispatch vectors for each chassis api intercept, // i.e., PreCallValidateFoo, PreCallRecordFoo, PostCallRecordFoo, etc., ensuring that // each vector contains only the validation objects that override that particular base // class virtual function. Preventing non-overridden calls from reaching the default // functions saved about 5% in multithreaded applications. -typedef enum InterceptId { - InterceptIdPreCallValidateGetDeviceQueue, - InterceptIdPreCallRecordGetDeviceQueue, - InterceptIdPostCallRecordGetDeviceQueue, - InterceptIdPreCallValidateQueueSubmit, - InterceptIdPreCallRecordQueueSubmit, - InterceptIdPostCallRecordQueueSubmit, - InterceptIdPreCallValidateQueueWaitIdle, - InterceptIdPreCallRecordQueueWaitIdle, - InterceptIdPostCallRecordQueueWaitIdle, - InterceptIdPreCallValidateDeviceWaitIdle, - InterceptIdPreCallRecordDeviceWaitIdle, - InterceptIdPostCallRecordDeviceWaitIdle, - InterceptIdPreCallValidateAllocateMemory, - InterceptIdPreCallRecordAllocateMemory, - InterceptIdPostCallRecordAllocateMemory, - InterceptIdPreCallValidateFreeMemory, - InterceptIdPreCallRecordFreeMemory, - InterceptIdPostCallRecordFreeMemory, - InterceptIdPreCallValidateMapMemory, - InterceptIdPreCallRecordMapMemory, - InterceptIdPostCallRecordMapMemory, - InterceptIdPreCallValidateUnmapMemory, - InterceptIdPreCallRecordUnmapMemory, - InterceptIdPostCallRecordUnmapMemory, - InterceptIdPreCallValidateFlushMappedMemoryRanges, - InterceptIdPreCallRecordFlushMappedMemoryRanges, - InterceptIdPostCallRecordFlushMappedMemoryRanges, - InterceptIdPreCallValidateInvalidateMappedMemoryRanges, - InterceptIdPreCallRecordInvalidateMappedMemoryRanges, - InterceptIdPostCallRecordInvalidateMappedMemoryRanges, - InterceptIdPreCallValidateGetDeviceMemoryCommitment, - InterceptIdPreCallRecordGetDeviceMemoryCommitment, - InterceptIdPostCallRecordGetDeviceMemoryCommitment, - InterceptIdPreCallValidateBindBufferMemory, - InterceptIdPreCallRecordBindBufferMemory, - InterceptIdPostCallRecordBindBufferMemory, - InterceptIdPreCallValidateBindImageMemory, - InterceptIdPreCallRecordBindImageMemory, - InterceptIdPostCallRecordBindImageMemory, - InterceptIdPreCallValidateGetBufferMemoryRequirements, - InterceptIdPreCallRecordGetBufferMemoryRequirements, - InterceptIdPostCallRecordGetBufferMemoryRequirements, - InterceptIdPreCallValidateGetImageMemoryRequirements, - InterceptIdPreCallRecordGetImageMemoryRequirements, - InterceptIdPostCallRecordGetImageMemoryRequirements, - InterceptIdPreCallValidateGetImageSparseMemoryRequirements, - InterceptIdPreCallRecordGetImageSparseMemoryRequirements, - InterceptIdPostCallRecordGetImageSparseMemoryRequirements, - InterceptIdPreCallValidateQueueBindSparse, - InterceptIdPreCallRecordQueueBindSparse, - InterceptIdPostCallRecordQueueBindSparse, - InterceptIdPreCallValidateCreateFence, - InterceptIdPreCallRecordCreateFence, - InterceptIdPostCallRecordCreateFence, - InterceptIdPreCallValidateDestroyFence, - InterceptIdPreCallRecordDestroyFence, - InterceptIdPostCallRecordDestroyFence, - InterceptIdPreCallValidateResetFences, - InterceptIdPreCallRecordResetFences, - InterceptIdPostCallRecordResetFences, - InterceptIdPreCallValidateGetFenceStatus, - InterceptIdPreCallRecordGetFenceStatus, - InterceptIdPostCallRecordGetFenceStatus, - InterceptIdPreCallValidateWaitForFences, - InterceptIdPreCallRecordWaitForFences, - InterceptIdPostCallRecordWaitForFences, - InterceptIdPreCallValidateCreateSemaphore, - InterceptIdPreCallRecordCreateSemaphore, - InterceptIdPostCallRecordCreateSemaphore, - InterceptIdPreCallValidateDestroySemaphore, - InterceptIdPreCallRecordDestroySemaphore, - InterceptIdPostCallRecordDestroySemaphore, - InterceptIdPreCallValidateCreateEvent, - InterceptIdPreCallRecordCreateEvent, - InterceptIdPostCallRecordCreateEvent, - InterceptIdPreCallValidateDestroyEvent, - InterceptIdPreCallRecordDestroyEvent, - InterceptIdPostCallRecordDestroyEvent, - InterceptIdPreCallValidateGetEventStatus, - InterceptIdPreCallRecordGetEventStatus, - InterceptIdPostCallRecordGetEventStatus, - InterceptIdPreCallValidateSetEvent, - InterceptIdPreCallRecordSetEvent, - InterceptIdPostCallRecordSetEvent, - InterceptIdPreCallValidateResetEvent, - InterceptIdPreCallRecordResetEvent, - InterceptIdPostCallRecordResetEvent, - InterceptIdPreCallValidateCreateQueryPool, - InterceptIdPreCallRecordCreateQueryPool, - InterceptIdPostCallRecordCreateQueryPool, - InterceptIdPreCallValidateDestroyQueryPool, - InterceptIdPreCallRecordDestroyQueryPool, - InterceptIdPostCallRecordDestroyQueryPool, - InterceptIdPreCallValidateGetQueryPoolResults, - InterceptIdPreCallRecordGetQueryPoolResults, - InterceptIdPostCallRecordGetQueryPoolResults, - InterceptIdPreCallValidateCreateBuffer, - InterceptIdPostCallRecordCreateBuffer, - InterceptIdPreCallValidateDestroyBuffer, - InterceptIdPreCallRecordDestroyBuffer, - InterceptIdPostCallRecordDestroyBuffer, - InterceptIdPreCallValidateCreateBufferView, - InterceptIdPreCallRecordCreateBufferView, - InterceptIdPostCallRecordCreateBufferView, - InterceptIdPreCallValidateDestroyBufferView, - InterceptIdPreCallRecordDestroyBufferView, - InterceptIdPostCallRecordDestroyBufferView, - InterceptIdPreCallValidateCreateImage, - InterceptIdPreCallRecordCreateImage, - InterceptIdPostCallRecordCreateImage, - InterceptIdPreCallValidateDestroyImage, - InterceptIdPreCallRecordDestroyImage, - InterceptIdPostCallRecordDestroyImage, - InterceptIdPreCallValidateGetImageSubresourceLayout, - InterceptIdPreCallRecordGetImageSubresourceLayout, - InterceptIdPostCallRecordGetImageSubresourceLayout, - InterceptIdPreCallValidateCreateImageView, - InterceptIdPreCallRecordCreateImageView, - InterceptIdPostCallRecordCreateImageView, - InterceptIdPreCallValidateDestroyImageView, - InterceptIdPreCallRecordDestroyImageView, - InterceptIdPostCallRecordDestroyImageView, - InterceptIdPreCallValidateDestroyShaderModule, - InterceptIdPreCallRecordDestroyShaderModule, - InterceptIdPostCallRecordDestroyShaderModule, - InterceptIdPreCallValidateCreatePipelineCache, - InterceptIdPreCallRecordCreatePipelineCache, - InterceptIdPostCallRecordCreatePipelineCache, - InterceptIdPreCallValidateDestroyPipelineCache, - InterceptIdPreCallRecordDestroyPipelineCache, - InterceptIdPostCallRecordDestroyPipelineCache, - InterceptIdPreCallValidateGetPipelineCacheData, - InterceptIdPreCallRecordGetPipelineCacheData, - InterceptIdPostCallRecordGetPipelineCacheData, - InterceptIdPreCallValidateMergePipelineCaches, - InterceptIdPreCallRecordMergePipelineCaches, - InterceptIdPostCallRecordMergePipelineCaches, - InterceptIdPreCallValidateDestroyPipeline, - InterceptIdPreCallRecordDestroyPipeline, - InterceptIdPostCallRecordDestroyPipeline, - InterceptIdPreCallValidateCreatePipelineLayout, - InterceptIdPostCallRecordCreatePipelineLayout, - InterceptIdPreCallValidateDestroyPipelineLayout, - InterceptIdPreCallRecordDestroyPipelineLayout, - InterceptIdPostCallRecordDestroyPipelineLayout, - InterceptIdPreCallValidateCreateSampler, - InterceptIdPreCallRecordCreateSampler, - InterceptIdPostCallRecordCreateSampler, - InterceptIdPreCallValidateDestroySampler, - InterceptIdPreCallRecordDestroySampler, - InterceptIdPostCallRecordDestroySampler, - InterceptIdPreCallValidateCreateDescriptorSetLayout, - InterceptIdPreCallRecordCreateDescriptorSetLayout, - InterceptIdPostCallRecordCreateDescriptorSetLayout, - InterceptIdPreCallValidateDestroyDescriptorSetLayout, - InterceptIdPreCallRecordDestroyDescriptorSetLayout, - InterceptIdPostCallRecordDestroyDescriptorSetLayout, - InterceptIdPreCallValidateCreateDescriptorPool, - InterceptIdPreCallRecordCreateDescriptorPool, - InterceptIdPostCallRecordCreateDescriptorPool, - InterceptIdPreCallValidateDestroyDescriptorPool, - InterceptIdPreCallRecordDestroyDescriptorPool, - InterceptIdPostCallRecordDestroyDescriptorPool, - InterceptIdPreCallValidateResetDescriptorPool, - InterceptIdPreCallRecordResetDescriptorPool, - InterceptIdPostCallRecordResetDescriptorPool, - InterceptIdPreCallRecordAllocateDescriptorSets, - InterceptIdPreCallValidateFreeDescriptorSets, - InterceptIdPreCallRecordFreeDescriptorSets, - InterceptIdPostCallRecordFreeDescriptorSets, - InterceptIdPreCallValidateUpdateDescriptorSets, - InterceptIdPreCallRecordUpdateDescriptorSets, - InterceptIdPostCallRecordUpdateDescriptorSets, - InterceptIdPreCallValidateCreateFramebuffer, - InterceptIdPreCallRecordCreateFramebuffer, - InterceptIdPostCallRecordCreateFramebuffer, - InterceptIdPreCallValidateDestroyFramebuffer, - InterceptIdPreCallRecordDestroyFramebuffer, - InterceptIdPostCallRecordDestroyFramebuffer, - InterceptIdPreCallValidateCreateRenderPass, - InterceptIdPreCallRecordCreateRenderPass, - InterceptIdPostCallRecordCreateRenderPass, - InterceptIdPreCallValidateDestroyRenderPass, - InterceptIdPreCallRecordDestroyRenderPass, - InterceptIdPostCallRecordDestroyRenderPass, - InterceptIdPreCallValidateGetRenderAreaGranularity, - InterceptIdPreCallRecordGetRenderAreaGranularity, - InterceptIdPostCallRecordGetRenderAreaGranularity, - InterceptIdPreCallValidateCreateCommandPool, - InterceptIdPreCallRecordCreateCommandPool, - InterceptIdPostCallRecordCreateCommandPool, - InterceptIdPreCallValidateDestroyCommandPool, - InterceptIdPreCallRecordDestroyCommandPool, - InterceptIdPostCallRecordDestroyCommandPool, - InterceptIdPreCallValidateResetCommandPool, - InterceptIdPreCallRecordResetCommandPool, - InterceptIdPostCallRecordResetCommandPool, - InterceptIdPreCallValidateAllocateCommandBuffers, - InterceptIdPreCallRecordAllocateCommandBuffers, - InterceptIdPostCallRecordAllocateCommandBuffers, - InterceptIdPreCallValidateFreeCommandBuffers, - InterceptIdPreCallRecordFreeCommandBuffers, - InterceptIdPostCallRecordFreeCommandBuffers, - InterceptIdPreCallValidateBeginCommandBuffer, - InterceptIdPreCallRecordBeginCommandBuffer, - InterceptIdPostCallRecordBeginCommandBuffer, - InterceptIdPreCallValidateEndCommandBuffer, - InterceptIdPreCallRecordEndCommandBuffer, - InterceptIdPostCallRecordEndCommandBuffer, - InterceptIdPreCallValidateResetCommandBuffer, - InterceptIdPreCallRecordResetCommandBuffer, - InterceptIdPostCallRecordResetCommandBuffer, - InterceptIdPreCallValidateCmdBindPipeline, - InterceptIdPreCallRecordCmdBindPipeline, - InterceptIdPostCallRecordCmdBindPipeline, - InterceptIdPreCallValidateCmdSetViewport, - InterceptIdPreCallRecordCmdSetViewport, - InterceptIdPostCallRecordCmdSetViewport, - InterceptIdPreCallValidateCmdSetScissor, - InterceptIdPreCallRecordCmdSetScissor, - InterceptIdPostCallRecordCmdSetScissor, - InterceptIdPreCallValidateCmdSetLineWidth, - InterceptIdPreCallRecordCmdSetLineWidth, - InterceptIdPostCallRecordCmdSetLineWidth, - InterceptIdPreCallValidateCmdSetDepthBias, - InterceptIdPreCallRecordCmdSetDepthBias, - InterceptIdPostCallRecordCmdSetDepthBias, - InterceptIdPreCallValidateCmdSetBlendConstants, - InterceptIdPreCallRecordCmdSetBlendConstants, - InterceptIdPostCallRecordCmdSetBlendConstants, - InterceptIdPreCallValidateCmdSetDepthBounds, - InterceptIdPreCallRecordCmdSetDepthBounds, - InterceptIdPostCallRecordCmdSetDepthBounds, - InterceptIdPreCallValidateCmdSetStencilCompareMask, - InterceptIdPreCallRecordCmdSetStencilCompareMask, - InterceptIdPostCallRecordCmdSetStencilCompareMask, - InterceptIdPreCallValidateCmdSetStencilWriteMask, - InterceptIdPreCallRecordCmdSetStencilWriteMask, - InterceptIdPostCallRecordCmdSetStencilWriteMask, - InterceptIdPreCallValidateCmdSetStencilReference, - InterceptIdPreCallRecordCmdSetStencilReference, - InterceptIdPostCallRecordCmdSetStencilReference, - InterceptIdPreCallValidateCmdBindDescriptorSets, - InterceptIdPreCallRecordCmdBindDescriptorSets, - InterceptIdPostCallRecordCmdBindDescriptorSets, - InterceptIdPreCallValidateCmdBindIndexBuffer, - InterceptIdPreCallRecordCmdBindIndexBuffer, - InterceptIdPostCallRecordCmdBindIndexBuffer, - InterceptIdPreCallValidateCmdBindVertexBuffers, - InterceptIdPreCallRecordCmdBindVertexBuffers, - InterceptIdPostCallRecordCmdBindVertexBuffers, - InterceptIdPreCallValidateCmdDraw, - InterceptIdPreCallRecordCmdDraw, - InterceptIdPostCallRecordCmdDraw, - InterceptIdPreCallValidateCmdDrawIndexed, - InterceptIdPreCallRecordCmdDrawIndexed, - InterceptIdPostCallRecordCmdDrawIndexed, - InterceptIdPreCallValidateCmdDrawIndirect, - InterceptIdPreCallRecordCmdDrawIndirect, - InterceptIdPostCallRecordCmdDrawIndirect, - InterceptIdPreCallValidateCmdDrawIndexedIndirect, - InterceptIdPreCallRecordCmdDrawIndexedIndirect, - InterceptIdPostCallRecordCmdDrawIndexedIndirect, - InterceptIdPreCallValidateCmdDispatch, - InterceptIdPreCallRecordCmdDispatch, - InterceptIdPostCallRecordCmdDispatch, - InterceptIdPreCallValidateCmdDispatchIndirect, - InterceptIdPreCallRecordCmdDispatchIndirect, - InterceptIdPostCallRecordCmdDispatchIndirect, - InterceptIdPreCallValidateCmdCopyBuffer, - InterceptIdPreCallRecordCmdCopyBuffer, - InterceptIdPostCallRecordCmdCopyBuffer, - InterceptIdPreCallValidateCmdCopyImage, - InterceptIdPreCallRecordCmdCopyImage, - InterceptIdPostCallRecordCmdCopyImage, - InterceptIdPreCallValidateCmdBlitImage, - InterceptIdPreCallRecordCmdBlitImage, - InterceptIdPostCallRecordCmdBlitImage, - InterceptIdPreCallValidateCmdCopyBufferToImage, - InterceptIdPreCallRecordCmdCopyBufferToImage, - InterceptIdPostCallRecordCmdCopyBufferToImage, - InterceptIdPreCallValidateCmdCopyImageToBuffer, - InterceptIdPreCallRecordCmdCopyImageToBuffer, - InterceptIdPostCallRecordCmdCopyImageToBuffer, - InterceptIdPreCallValidateCmdUpdateBuffer, - InterceptIdPreCallRecordCmdUpdateBuffer, - InterceptIdPostCallRecordCmdUpdateBuffer, - InterceptIdPreCallValidateCmdFillBuffer, - InterceptIdPreCallRecordCmdFillBuffer, - InterceptIdPostCallRecordCmdFillBuffer, - InterceptIdPreCallValidateCmdClearColorImage, - InterceptIdPreCallRecordCmdClearColorImage, - InterceptIdPostCallRecordCmdClearColorImage, - InterceptIdPreCallValidateCmdClearDepthStencilImage, - InterceptIdPreCallRecordCmdClearDepthStencilImage, - InterceptIdPostCallRecordCmdClearDepthStencilImage, - InterceptIdPreCallValidateCmdClearAttachments, - InterceptIdPreCallRecordCmdClearAttachments, - InterceptIdPostCallRecordCmdClearAttachments, - InterceptIdPreCallValidateCmdResolveImage, - InterceptIdPreCallRecordCmdResolveImage, - InterceptIdPostCallRecordCmdResolveImage, - InterceptIdPreCallValidateCmdSetEvent, - InterceptIdPreCallRecordCmdSetEvent, - InterceptIdPostCallRecordCmdSetEvent, - InterceptIdPreCallValidateCmdResetEvent, - InterceptIdPreCallRecordCmdResetEvent, - InterceptIdPostCallRecordCmdResetEvent, - InterceptIdPreCallValidateCmdWaitEvents, - InterceptIdPreCallRecordCmdWaitEvents, - InterceptIdPostCallRecordCmdWaitEvents, - InterceptIdPreCallValidateCmdPipelineBarrier, - InterceptIdPreCallRecordCmdPipelineBarrier, - InterceptIdPostCallRecordCmdPipelineBarrier, - InterceptIdPreCallValidateCmdBeginQuery, - InterceptIdPreCallRecordCmdBeginQuery, - InterceptIdPostCallRecordCmdBeginQuery, - InterceptIdPreCallValidateCmdEndQuery, - InterceptIdPreCallRecordCmdEndQuery, - InterceptIdPostCallRecordCmdEndQuery, - InterceptIdPreCallValidateCmdResetQueryPool, - InterceptIdPreCallRecordCmdResetQueryPool, - InterceptIdPostCallRecordCmdResetQueryPool, - InterceptIdPreCallValidateCmdWriteTimestamp, - InterceptIdPreCallRecordCmdWriteTimestamp, - InterceptIdPostCallRecordCmdWriteTimestamp, - InterceptIdPreCallValidateCmdCopyQueryPoolResults, - InterceptIdPreCallRecordCmdCopyQueryPoolResults, - InterceptIdPostCallRecordCmdCopyQueryPoolResults, - InterceptIdPreCallValidateCmdPushConstants, - InterceptIdPreCallRecordCmdPushConstants, - InterceptIdPostCallRecordCmdPushConstants, - InterceptIdPreCallValidateCmdBeginRenderPass, - InterceptIdPreCallRecordCmdBeginRenderPass, - InterceptIdPostCallRecordCmdBeginRenderPass, - InterceptIdPreCallValidateCmdNextSubpass, - InterceptIdPreCallRecordCmdNextSubpass, - InterceptIdPostCallRecordCmdNextSubpass, - InterceptIdPreCallValidateCmdEndRenderPass, - InterceptIdPreCallRecordCmdEndRenderPass, - InterceptIdPostCallRecordCmdEndRenderPass, - InterceptIdPreCallValidateCmdExecuteCommands, - InterceptIdPreCallRecordCmdExecuteCommands, - InterceptIdPostCallRecordCmdExecuteCommands, - InterceptIdPreCallValidateBindBufferMemory2, - InterceptIdPreCallRecordBindBufferMemory2, - InterceptIdPostCallRecordBindBufferMemory2, - InterceptIdPreCallValidateBindImageMemory2, - InterceptIdPreCallRecordBindImageMemory2, - InterceptIdPostCallRecordBindImageMemory2, - InterceptIdPreCallValidateGetDeviceGroupPeerMemoryFeatures, - InterceptIdPreCallRecordGetDeviceGroupPeerMemoryFeatures, - InterceptIdPostCallRecordGetDeviceGroupPeerMemoryFeatures, - InterceptIdPreCallValidateCmdSetDeviceMask, - InterceptIdPreCallRecordCmdSetDeviceMask, - InterceptIdPostCallRecordCmdSetDeviceMask, - InterceptIdPreCallValidateCmdDispatchBase, - InterceptIdPreCallRecordCmdDispatchBase, - InterceptIdPostCallRecordCmdDispatchBase, - InterceptIdPreCallValidateGetImageMemoryRequirements2, - InterceptIdPreCallRecordGetImageMemoryRequirements2, - InterceptIdPostCallRecordGetImageMemoryRequirements2, - InterceptIdPreCallValidateGetBufferMemoryRequirements2, - InterceptIdPreCallRecordGetBufferMemoryRequirements2, - InterceptIdPostCallRecordGetBufferMemoryRequirements2, - InterceptIdPreCallValidateGetImageSparseMemoryRequirements2, - InterceptIdPreCallRecordGetImageSparseMemoryRequirements2, - InterceptIdPostCallRecordGetImageSparseMemoryRequirements2, - InterceptIdPreCallValidateTrimCommandPool, - InterceptIdPreCallRecordTrimCommandPool, - InterceptIdPostCallRecordTrimCommandPool, - InterceptIdPreCallValidateGetDeviceQueue2, - InterceptIdPreCallRecordGetDeviceQueue2, - InterceptIdPostCallRecordGetDeviceQueue2, - InterceptIdPreCallValidateCreateSamplerYcbcrConversion, - InterceptIdPreCallRecordCreateSamplerYcbcrConversion, - InterceptIdPostCallRecordCreateSamplerYcbcrConversion, - InterceptIdPreCallValidateDestroySamplerYcbcrConversion, - InterceptIdPreCallRecordDestroySamplerYcbcrConversion, - InterceptIdPostCallRecordDestroySamplerYcbcrConversion, - InterceptIdPreCallValidateCreateDescriptorUpdateTemplate, - InterceptIdPreCallRecordCreateDescriptorUpdateTemplate, - InterceptIdPostCallRecordCreateDescriptorUpdateTemplate, - InterceptIdPreCallValidateDestroyDescriptorUpdateTemplate, - InterceptIdPreCallRecordDestroyDescriptorUpdateTemplate, - InterceptIdPostCallRecordDestroyDescriptorUpdateTemplate, - InterceptIdPreCallValidateUpdateDescriptorSetWithTemplate, - InterceptIdPreCallRecordUpdateDescriptorSetWithTemplate, - InterceptIdPostCallRecordUpdateDescriptorSetWithTemplate, - InterceptIdPreCallValidateGetDescriptorSetLayoutSupport, - InterceptIdPreCallRecordGetDescriptorSetLayoutSupport, - InterceptIdPostCallRecordGetDescriptorSetLayoutSupport, - InterceptIdPreCallValidateCmdDrawIndirectCount, - InterceptIdPreCallRecordCmdDrawIndirectCount, - InterceptIdPostCallRecordCmdDrawIndirectCount, - InterceptIdPreCallValidateCmdDrawIndexedIndirectCount, - InterceptIdPreCallRecordCmdDrawIndexedIndirectCount, - InterceptIdPostCallRecordCmdDrawIndexedIndirectCount, - InterceptIdPreCallValidateCreateRenderPass2, - InterceptIdPreCallRecordCreateRenderPass2, - InterceptIdPostCallRecordCreateRenderPass2, - InterceptIdPreCallValidateCmdBeginRenderPass2, - InterceptIdPreCallRecordCmdBeginRenderPass2, - InterceptIdPostCallRecordCmdBeginRenderPass2, - InterceptIdPreCallValidateCmdNextSubpass2, - InterceptIdPreCallRecordCmdNextSubpass2, - InterceptIdPostCallRecordCmdNextSubpass2, - InterceptIdPreCallValidateCmdEndRenderPass2, - InterceptIdPreCallRecordCmdEndRenderPass2, - InterceptIdPostCallRecordCmdEndRenderPass2, - InterceptIdPreCallValidateResetQueryPool, - InterceptIdPreCallRecordResetQueryPool, - InterceptIdPostCallRecordResetQueryPool, - InterceptIdPreCallValidateGetSemaphoreCounterValue, - InterceptIdPreCallRecordGetSemaphoreCounterValue, - InterceptIdPostCallRecordGetSemaphoreCounterValue, - InterceptIdPreCallValidateWaitSemaphores, - InterceptIdPreCallRecordWaitSemaphores, - InterceptIdPostCallRecordWaitSemaphores, - InterceptIdPreCallValidateSignalSemaphore, - InterceptIdPreCallRecordSignalSemaphore, - InterceptIdPostCallRecordSignalSemaphore, - InterceptIdPreCallValidateGetBufferDeviceAddress, - InterceptIdPreCallRecordGetBufferDeviceAddress, - InterceptIdPostCallRecordGetBufferDeviceAddress, - InterceptIdPreCallValidateGetBufferOpaqueCaptureAddress, - InterceptIdPreCallRecordGetBufferOpaqueCaptureAddress, - InterceptIdPostCallRecordGetBufferOpaqueCaptureAddress, - InterceptIdPreCallValidateGetDeviceMemoryOpaqueCaptureAddress, - InterceptIdPreCallRecordGetDeviceMemoryOpaqueCaptureAddress, - InterceptIdPostCallRecordGetDeviceMemoryOpaqueCaptureAddress, - InterceptIdPreCallValidateCreatePrivateDataSlot, - InterceptIdPreCallRecordCreatePrivateDataSlot, - InterceptIdPostCallRecordCreatePrivateDataSlot, - InterceptIdPreCallValidateDestroyPrivateDataSlot, - InterceptIdPreCallRecordDestroyPrivateDataSlot, - InterceptIdPostCallRecordDestroyPrivateDataSlot, - InterceptIdPreCallValidateSetPrivateData, - InterceptIdPreCallRecordSetPrivateData, - InterceptIdPostCallRecordSetPrivateData, - InterceptIdPreCallValidateGetPrivateData, - InterceptIdPreCallRecordGetPrivateData, - InterceptIdPostCallRecordGetPrivateData, - InterceptIdPreCallValidateCmdSetEvent2, - InterceptIdPreCallRecordCmdSetEvent2, - InterceptIdPostCallRecordCmdSetEvent2, - InterceptIdPreCallValidateCmdResetEvent2, - InterceptIdPreCallRecordCmdResetEvent2, - InterceptIdPostCallRecordCmdResetEvent2, - InterceptIdPreCallValidateCmdWaitEvents2, - InterceptIdPreCallRecordCmdWaitEvents2, - InterceptIdPostCallRecordCmdWaitEvents2, - InterceptIdPreCallValidateCmdPipelineBarrier2, - InterceptIdPreCallRecordCmdPipelineBarrier2, - InterceptIdPostCallRecordCmdPipelineBarrier2, - InterceptIdPreCallValidateCmdWriteTimestamp2, - InterceptIdPreCallRecordCmdWriteTimestamp2, - InterceptIdPostCallRecordCmdWriteTimestamp2, - InterceptIdPreCallValidateQueueSubmit2, - InterceptIdPreCallRecordQueueSubmit2, - InterceptIdPostCallRecordQueueSubmit2, - InterceptIdPreCallValidateCmdCopyBuffer2, - InterceptIdPreCallRecordCmdCopyBuffer2, - InterceptIdPostCallRecordCmdCopyBuffer2, - InterceptIdPreCallValidateCmdCopyImage2, - InterceptIdPreCallRecordCmdCopyImage2, - InterceptIdPostCallRecordCmdCopyImage2, - InterceptIdPreCallValidateCmdCopyBufferToImage2, - InterceptIdPreCallRecordCmdCopyBufferToImage2, - InterceptIdPostCallRecordCmdCopyBufferToImage2, - InterceptIdPreCallValidateCmdCopyImageToBuffer2, - InterceptIdPreCallRecordCmdCopyImageToBuffer2, - InterceptIdPostCallRecordCmdCopyImageToBuffer2, - InterceptIdPreCallValidateCmdBlitImage2, - InterceptIdPreCallRecordCmdBlitImage2, - InterceptIdPostCallRecordCmdBlitImage2, - InterceptIdPreCallValidateCmdResolveImage2, - InterceptIdPreCallRecordCmdResolveImage2, - InterceptIdPostCallRecordCmdResolveImage2, - InterceptIdPreCallValidateCmdBeginRendering, - InterceptIdPreCallRecordCmdBeginRendering, - InterceptIdPostCallRecordCmdBeginRendering, - InterceptIdPreCallValidateCmdEndRendering, - InterceptIdPreCallRecordCmdEndRendering, - InterceptIdPostCallRecordCmdEndRendering, - InterceptIdPreCallValidateCmdSetCullMode, - InterceptIdPreCallRecordCmdSetCullMode, - InterceptIdPostCallRecordCmdSetCullMode, - InterceptIdPreCallValidateCmdSetFrontFace, - InterceptIdPreCallRecordCmdSetFrontFace, - InterceptIdPostCallRecordCmdSetFrontFace, - InterceptIdPreCallValidateCmdSetPrimitiveTopology, - InterceptIdPreCallRecordCmdSetPrimitiveTopology, - InterceptIdPostCallRecordCmdSetPrimitiveTopology, - InterceptIdPreCallValidateCmdSetViewportWithCount, - InterceptIdPreCallRecordCmdSetViewportWithCount, - InterceptIdPostCallRecordCmdSetViewportWithCount, - InterceptIdPreCallValidateCmdSetScissorWithCount, - InterceptIdPreCallRecordCmdSetScissorWithCount, - InterceptIdPostCallRecordCmdSetScissorWithCount, - InterceptIdPreCallValidateCmdBindVertexBuffers2, - InterceptIdPreCallRecordCmdBindVertexBuffers2, - InterceptIdPostCallRecordCmdBindVertexBuffers2, - InterceptIdPreCallValidateCmdSetDepthTestEnable, - InterceptIdPreCallRecordCmdSetDepthTestEnable, - InterceptIdPostCallRecordCmdSetDepthTestEnable, - InterceptIdPreCallValidateCmdSetDepthWriteEnable, - InterceptIdPreCallRecordCmdSetDepthWriteEnable, - InterceptIdPostCallRecordCmdSetDepthWriteEnable, - InterceptIdPreCallValidateCmdSetDepthCompareOp, - InterceptIdPreCallRecordCmdSetDepthCompareOp, - InterceptIdPostCallRecordCmdSetDepthCompareOp, - InterceptIdPreCallValidateCmdSetDepthBoundsTestEnable, - InterceptIdPreCallRecordCmdSetDepthBoundsTestEnable, - InterceptIdPostCallRecordCmdSetDepthBoundsTestEnable, - InterceptIdPreCallValidateCmdSetStencilTestEnable, - InterceptIdPreCallRecordCmdSetStencilTestEnable, - InterceptIdPostCallRecordCmdSetStencilTestEnable, - InterceptIdPreCallValidateCmdSetStencilOp, - InterceptIdPreCallRecordCmdSetStencilOp, - InterceptIdPostCallRecordCmdSetStencilOp, - InterceptIdPreCallValidateCmdSetRasterizerDiscardEnable, - InterceptIdPreCallRecordCmdSetRasterizerDiscardEnable, - InterceptIdPostCallRecordCmdSetRasterizerDiscardEnable, - InterceptIdPreCallValidateCmdSetDepthBiasEnable, - InterceptIdPreCallRecordCmdSetDepthBiasEnable, - InterceptIdPostCallRecordCmdSetDepthBiasEnable, - InterceptIdPreCallValidateCmdSetPrimitiveRestartEnable, - InterceptIdPreCallRecordCmdSetPrimitiveRestartEnable, - InterceptIdPostCallRecordCmdSetPrimitiveRestartEnable, - InterceptIdPreCallValidateGetDeviceBufferMemoryRequirements, - InterceptIdPreCallRecordGetDeviceBufferMemoryRequirements, - InterceptIdPostCallRecordGetDeviceBufferMemoryRequirements, - InterceptIdPreCallValidateGetDeviceImageMemoryRequirements, - InterceptIdPreCallRecordGetDeviceImageMemoryRequirements, - InterceptIdPostCallRecordGetDeviceImageMemoryRequirements, - InterceptIdPreCallValidateGetDeviceImageSparseMemoryRequirements, - InterceptIdPreCallRecordGetDeviceImageSparseMemoryRequirements, - InterceptIdPostCallRecordGetDeviceImageSparseMemoryRequirements, - InterceptIdPreCallValidateCreateSwapchainKHR, - InterceptIdPreCallRecordCreateSwapchainKHR, - InterceptIdPostCallRecordCreateSwapchainKHR, - InterceptIdPreCallValidateDestroySwapchainKHR, - InterceptIdPreCallRecordDestroySwapchainKHR, - InterceptIdPostCallRecordDestroySwapchainKHR, - InterceptIdPreCallValidateGetSwapchainImagesKHR, - InterceptIdPreCallRecordGetSwapchainImagesKHR, - InterceptIdPostCallRecordGetSwapchainImagesKHR, - InterceptIdPreCallValidateAcquireNextImageKHR, - InterceptIdPreCallRecordAcquireNextImageKHR, - InterceptIdPostCallRecordAcquireNextImageKHR, - InterceptIdPreCallValidateQueuePresentKHR, - InterceptIdPreCallRecordQueuePresentKHR, - InterceptIdPostCallRecordQueuePresentKHR, - InterceptIdPreCallValidateGetDeviceGroupPresentCapabilitiesKHR, - InterceptIdPreCallRecordGetDeviceGroupPresentCapabilitiesKHR, - InterceptIdPostCallRecordGetDeviceGroupPresentCapabilitiesKHR, - InterceptIdPreCallValidateGetDeviceGroupSurfacePresentModesKHR, - InterceptIdPreCallRecordGetDeviceGroupSurfacePresentModesKHR, - InterceptIdPostCallRecordGetDeviceGroupSurfacePresentModesKHR, - InterceptIdPreCallValidateAcquireNextImage2KHR, - InterceptIdPreCallRecordAcquireNextImage2KHR, - InterceptIdPostCallRecordAcquireNextImage2KHR, - InterceptIdPreCallValidateCreateSharedSwapchainsKHR, - InterceptIdPreCallRecordCreateSharedSwapchainsKHR, - InterceptIdPostCallRecordCreateSharedSwapchainsKHR, - InterceptIdPreCallValidateCreateVideoSessionKHR, - InterceptIdPreCallRecordCreateVideoSessionKHR, - InterceptIdPostCallRecordCreateVideoSessionKHR, - InterceptIdPreCallValidateDestroyVideoSessionKHR, - InterceptIdPreCallRecordDestroyVideoSessionKHR, - InterceptIdPostCallRecordDestroyVideoSessionKHR, - InterceptIdPreCallValidateGetVideoSessionMemoryRequirementsKHR, - InterceptIdPreCallRecordGetVideoSessionMemoryRequirementsKHR, - InterceptIdPostCallRecordGetVideoSessionMemoryRequirementsKHR, - InterceptIdPreCallValidateBindVideoSessionMemoryKHR, - InterceptIdPreCallRecordBindVideoSessionMemoryKHR, - InterceptIdPostCallRecordBindVideoSessionMemoryKHR, - InterceptIdPreCallValidateCreateVideoSessionParametersKHR, - InterceptIdPreCallRecordCreateVideoSessionParametersKHR, - InterceptIdPostCallRecordCreateVideoSessionParametersKHR, - InterceptIdPreCallValidateUpdateVideoSessionParametersKHR, - InterceptIdPreCallRecordUpdateVideoSessionParametersKHR, - InterceptIdPostCallRecordUpdateVideoSessionParametersKHR, - InterceptIdPreCallValidateDestroyVideoSessionParametersKHR, - InterceptIdPreCallRecordDestroyVideoSessionParametersKHR, - InterceptIdPostCallRecordDestroyVideoSessionParametersKHR, - InterceptIdPreCallValidateCmdBeginVideoCodingKHR, - InterceptIdPreCallRecordCmdBeginVideoCodingKHR, - InterceptIdPostCallRecordCmdBeginVideoCodingKHR, - InterceptIdPreCallValidateCmdEndVideoCodingKHR, - InterceptIdPreCallRecordCmdEndVideoCodingKHR, - InterceptIdPostCallRecordCmdEndVideoCodingKHR, - InterceptIdPreCallValidateCmdControlVideoCodingKHR, - InterceptIdPreCallRecordCmdControlVideoCodingKHR, - InterceptIdPostCallRecordCmdControlVideoCodingKHR, - InterceptIdPreCallValidateCmdDecodeVideoKHR, - InterceptIdPreCallRecordCmdDecodeVideoKHR, - InterceptIdPostCallRecordCmdDecodeVideoKHR, - InterceptIdPreCallValidateCmdBeginRenderingKHR, - InterceptIdPreCallRecordCmdBeginRenderingKHR, - InterceptIdPostCallRecordCmdBeginRenderingKHR, - InterceptIdPreCallValidateCmdEndRenderingKHR, - InterceptIdPreCallRecordCmdEndRenderingKHR, - InterceptIdPostCallRecordCmdEndRenderingKHR, - InterceptIdPreCallValidateGetDeviceGroupPeerMemoryFeaturesKHR, - InterceptIdPreCallRecordGetDeviceGroupPeerMemoryFeaturesKHR, - InterceptIdPostCallRecordGetDeviceGroupPeerMemoryFeaturesKHR, - InterceptIdPreCallValidateCmdSetDeviceMaskKHR, - InterceptIdPreCallRecordCmdSetDeviceMaskKHR, - InterceptIdPostCallRecordCmdSetDeviceMaskKHR, - InterceptIdPreCallValidateCmdDispatchBaseKHR, - InterceptIdPreCallRecordCmdDispatchBaseKHR, - InterceptIdPostCallRecordCmdDispatchBaseKHR, - InterceptIdPreCallValidateTrimCommandPoolKHR, - InterceptIdPreCallRecordTrimCommandPoolKHR, - InterceptIdPostCallRecordTrimCommandPoolKHR, - InterceptIdPreCallValidateGetMemoryWin32HandleKHR, - InterceptIdPreCallRecordGetMemoryWin32HandleKHR, - InterceptIdPostCallRecordGetMemoryWin32HandleKHR, - InterceptIdPreCallValidateGetMemoryWin32HandlePropertiesKHR, - InterceptIdPreCallRecordGetMemoryWin32HandlePropertiesKHR, - InterceptIdPostCallRecordGetMemoryWin32HandlePropertiesKHR, - InterceptIdPreCallValidateGetMemoryFdKHR, - InterceptIdPreCallRecordGetMemoryFdKHR, - InterceptIdPostCallRecordGetMemoryFdKHR, - InterceptIdPreCallValidateGetMemoryFdPropertiesKHR, - InterceptIdPreCallRecordGetMemoryFdPropertiesKHR, - InterceptIdPostCallRecordGetMemoryFdPropertiesKHR, - InterceptIdPreCallValidateImportSemaphoreWin32HandleKHR, - InterceptIdPreCallRecordImportSemaphoreWin32HandleKHR, - InterceptIdPostCallRecordImportSemaphoreWin32HandleKHR, - InterceptIdPreCallValidateGetSemaphoreWin32HandleKHR, - InterceptIdPreCallRecordGetSemaphoreWin32HandleKHR, - InterceptIdPostCallRecordGetSemaphoreWin32HandleKHR, - InterceptIdPreCallValidateImportSemaphoreFdKHR, - InterceptIdPreCallRecordImportSemaphoreFdKHR, - InterceptIdPostCallRecordImportSemaphoreFdKHR, - InterceptIdPreCallValidateGetSemaphoreFdKHR, - InterceptIdPreCallRecordGetSemaphoreFdKHR, - InterceptIdPostCallRecordGetSemaphoreFdKHR, - InterceptIdPreCallValidateCmdPushDescriptorSetKHR, - InterceptIdPreCallRecordCmdPushDescriptorSetKHR, - InterceptIdPostCallRecordCmdPushDescriptorSetKHR, - InterceptIdPreCallValidateCmdPushDescriptorSetWithTemplateKHR, - InterceptIdPreCallRecordCmdPushDescriptorSetWithTemplateKHR, - InterceptIdPostCallRecordCmdPushDescriptorSetWithTemplateKHR, - InterceptIdPreCallValidateCreateDescriptorUpdateTemplateKHR, - InterceptIdPreCallRecordCreateDescriptorUpdateTemplateKHR, - InterceptIdPostCallRecordCreateDescriptorUpdateTemplateKHR, - InterceptIdPreCallValidateDestroyDescriptorUpdateTemplateKHR, - InterceptIdPreCallRecordDestroyDescriptorUpdateTemplateKHR, - InterceptIdPostCallRecordDestroyDescriptorUpdateTemplateKHR, - InterceptIdPreCallValidateUpdateDescriptorSetWithTemplateKHR, - InterceptIdPreCallRecordUpdateDescriptorSetWithTemplateKHR, - InterceptIdPostCallRecordUpdateDescriptorSetWithTemplateKHR, - InterceptIdPreCallValidateCreateRenderPass2KHR, - InterceptIdPreCallRecordCreateRenderPass2KHR, - InterceptIdPostCallRecordCreateRenderPass2KHR, - InterceptIdPreCallValidateCmdBeginRenderPass2KHR, - InterceptIdPreCallRecordCmdBeginRenderPass2KHR, - InterceptIdPostCallRecordCmdBeginRenderPass2KHR, - InterceptIdPreCallValidateCmdNextSubpass2KHR, - InterceptIdPreCallRecordCmdNextSubpass2KHR, - InterceptIdPostCallRecordCmdNextSubpass2KHR, - InterceptIdPreCallValidateCmdEndRenderPass2KHR, - InterceptIdPreCallRecordCmdEndRenderPass2KHR, - InterceptIdPostCallRecordCmdEndRenderPass2KHR, - InterceptIdPreCallValidateGetSwapchainStatusKHR, - InterceptIdPreCallRecordGetSwapchainStatusKHR, - InterceptIdPostCallRecordGetSwapchainStatusKHR, - InterceptIdPreCallValidateImportFenceWin32HandleKHR, - InterceptIdPreCallRecordImportFenceWin32HandleKHR, - InterceptIdPostCallRecordImportFenceWin32HandleKHR, - InterceptIdPreCallValidateGetFenceWin32HandleKHR, - InterceptIdPreCallRecordGetFenceWin32HandleKHR, - InterceptIdPostCallRecordGetFenceWin32HandleKHR, - InterceptIdPreCallValidateImportFenceFdKHR, - InterceptIdPreCallRecordImportFenceFdKHR, - InterceptIdPostCallRecordImportFenceFdKHR, - InterceptIdPreCallValidateGetFenceFdKHR, - InterceptIdPreCallRecordGetFenceFdKHR, - InterceptIdPostCallRecordGetFenceFdKHR, - InterceptIdPreCallValidateAcquireProfilingLockKHR, - InterceptIdPreCallRecordAcquireProfilingLockKHR, - InterceptIdPostCallRecordAcquireProfilingLockKHR, - InterceptIdPreCallValidateReleaseProfilingLockKHR, - InterceptIdPreCallRecordReleaseProfilingLockKHR, - InterceptIdPostCallRecordReleaseProfilingLockKHR, - InterceptIdPreCallValidateGetImageMemoryRequirements2KHR, - InterceptIdPreCallRecordGetImageMemoryRequirements2KHR, - InterceptIdPostCallRecordGetImageMemoryRequirements2KHR, - InterceptIdPreCallValidateGetBufferMemoryRequirements2KHR, - InterceptIdPreCallRecordGetBufferMemoryRequirements2KHR, - InterceptIdPostCallRecordGetBufferMemoryRequirements2KHR, - InterceptIdPreCallValidateGetImageSparseMemoryRequirements2KHR, - InterceptIdPreCallRecordGetImageSparseMemoryRequirements2KHR, - InterceptIdPostCallRecordGetImageSparseMemoryRequirements2KHR, - InterceptIdPreCallValidateCreateSamplerYcbcrConversionKHR, - InterceptIdPreCallRecordCreateSamplerYcbcrConversionKHR, - InterceptIdPostCallRecordCreateSamplerYcbcrConversionKHR, - InterceptIdPreCallValidateDestroySamplerYcbcrConversionKHR, - InterceptIdPreCallRecordDestroySamplerYcbcrConversionKHR, - InterceptIdPostCallRecordDestroySamplerYcbcrConversionKHR, - InterceptIdPreCallValidateBindBufferMemory2KHR, - InterceptIdPreCallRecordBindBufferMemory2KHR, - InterceptIdPostCallRecordBindBufferMemory2KHR, - InterceptIdPreCallValidateBindImageMemory2KHR, - InterceptIdPreCallRecordBindImageMemory2KHR, - InterceptIdPostCallRecordBindImageMemory2KHR, - InterceptIdPreCallValidateGetDescriptorSetLayoutSupportKHR, - InterceptIdPreCallRecordGetDescriptorSetLayoutSupportKHR, - InterceptIdPostCallRecordGetDescriptorSetLayoutSupportKHR, - InterceptIdPreCallValidateCmdDrawIndirectCountKHR, - InterceptIdPreCallRecordCmdDrawIndirectCountKHR, - InterceptIdPostCallRecordCmdDrawIndirectCountKHR, - InterceptIdPreCallValidateCmdDrawIndexedIndirectCountKHR, - InterceptIdPreCallRecordCmdDrawIndexedIndirectCountKHR, - InterceptIdPostCallRecordCmdDrawIndexedIndirectCountKHR, - InterceptIdPreCallValidateGetSemaphoreCounterValueKHR, - InterceptIdPreCallRecordGetSemaphoreCounterValueKHR, - InterceptIdPostCallRecordGetSemaphoreCounterValueKHR, - InterceptIdPreCallValidateWaitSemaphoresKHR, - InterceptIdPreCallRecordWaitSemaphoresKHR, - InterceptIdPostCallRecordWaitSemaphoresKHR, - InterceptIdPreCallValidateSignalSemaphoreKHR, - InterceptIdPreCallRecordSignalSemaphoreKHR, - InterceptIdPostCallRecordSignalSemaphoreKHR, - InterceptIdPreCallValidateCmdSetFragmentShadingRateKHR, - InterceptIdPreCallRecordCmdSetFragmentShadingRateKHR, - InterceptIdPostCallRecordCmdSetFragmentShadingRateKHR, - InterceptIdPreCallValidateCmdSetRenderingAttachmentLocationsKHR, - InterceptIdPreCallRecordCmdSetRenderingAttachmentLocationsKHR, - InterceptIdPostCallRecordCmdSetRenderingAttachmentLocationsKHR, - InterceptIdPreCallValidateCmdSetRenderingInputAttachmentIndicesKHR, - InterceptIdPreCallRecordCmdSetRenderingInputAttachmentIndicesKHR, - InterceptIdPostCallRecordCmdSetRenderingInputAttachmentIndicesKHR, - InterceptIdPreCallValidateWaitForPresentKHR, - InterceptIdPreCallRecordWaitForPresentKHR, - InterceptIdPostCallRecordWaitForPresentKHR, - InterceptIdPreCallValidateGetBufferDeviceAddressKHR, - InterceptIdPreCallRecordGetBufferDeviceAddressKHR, - InterceptIdPostCallRecordGetBufferDeviceAddressKHR, - InterceptIdPreCallValidateGetBufferOpaqueCaptureAddressKHR, - InterceptIdPreCallRecordGetBufferOpaqueCaptureAddressKHR, - InterceptIdPostCallRecordGetBufferOpaqueCaptureAddressKHR, - InterceptIdPreCallValidateGetDeviceMemoryOpaqueCaptureAddressKHR, - InterceptIdPreCallRecordGetDeviceMemoryOpaqueCaptureAddressKHR, - InterceptIdPostCallRecordGetDeviceMemoryOpaqueCaptureAddressKHR, - InterceptIdPreCallValidateCreateDeferredOperationKHR, - InterceptIdPreCallRecordCreateDeferredOperationKHR, - InterceptIdPostCallRecordCreateDeferredOperationKHR, - InterceptIdPreCallValidateDestroyDeferredOperationKHR, - InterceptIdPreCallRecordDestroyDeferredOperationKHR, - InterceptIdPostCallRecordDestroyDeferredOperationKHR, - InterceptIdPreCallValidateGetDeferredOperationMaxConcurrencyKHR, - InterceptIdPreCallRecordGetDeferredOperationMaxConcurrencyKHR, - InterceptIdPostCallRecordGetDeferredOperationMaxConcurrencyKHR, - InterceptIdPreCallValidateGetDeferredOperationResultKHR, - InterceptIdPreCallRecordGetDeferredOperationResultKHR, - InterceptIdPostCallRecordGetDeferredOperationResultKHR, - InterceptIdPreCallValidateDeferredOperationJoinKHR, - InterceptIdPreCallRecordDeferredOperationJoinKHR, - InterceptIdPostCallRecordDeferredOperationJoinKHR, - InterceptIdPreCallValidateGetPipelineExecutablePropertiesKHR, - InterceptIdPreCallRecordGetPipelineExecutablePropertiesKHR, - InterceptIdPostCallRecordGetPipelineExecutablePropertiesKHR, - InterceptIdPreCallValidateGetPipelineExecutableStatisticsKHR, - InterceptIdPreCallRecordGetPipelineExecutableStatisticsKHR, - InterceptIdPostCallRecordGetPipelineExecutableStatisticsKHR, - InterceptIdPreCallValidateGetPipelineExecutableInternalRepresentationsKHR, - InterceptIdPreCallRecordGetPipelineExecutableInternalRepresentationsKHR, - InterceptIdPostCallRecordGetPipelineExecutableInternalRepresentationsKHR, - InterceptIdPreCallValidateMapMemory2KHR, - InterceptIdPreCallRecordMapMemory2KHR, - InterceptIdPostCallRecordMapMemory2KHR, - InterceptIdPreCallValidateUnmapMemory2KHR, - InterceptIdPreCallRecordUnmapMemory2KHR, - InterceptIdPostCallRecordUnmapMemory2KHR, - InterceptIdPreCallValidateGetEncodedVideoSessionParametersKHR, - InterceptIdPreCallRecordGetEncodedVideoSessionParametersKHR, - InterceptIdPostCallRecordGetEncodedVideoSessionParametersKHR, - InterceptIdPreCallValidateCmdEncodeVideoKHR, - InterceptIdPreCallRecordCmdEncodeVideoKHR, - InterceptIdPostCallRecordCmdEncodeVideoKHR, - InterceptIdPreCallValidateCmdSetEvent2KHR, - InterceptIdPreCallRecordCmdSetEvent2KHR, - InterceptIdPostCallRecordCmdSetEvent2KHR, - InterceptIdPreCallValidateCmdResetEvent2KHR, - InterceptIdPreCallRecordCmdResetEvent2KHR, - InterceptIdPostCallRecordCmdResetEvent2KHR, - InterceptIdPreCallValidateCmdWaitEvents2KHR, - InterceptIdPreCallRecordCmdWaitEvents2KHR, - InterceptIdPostCallRecordCmdWaitEvents2KHR, - InterceptIdPreCallValidateCmdPipelineBarrier2KHR, - InterceptIdPreCallRecordCmdPipelineBarrier2KHR, - InterceptIdPostCallRecordCmdPipelineBarrier2KHR, - InterceptIdPreCallValidateCmdWriteTimestamp2KHR, - InterceptIdPreCallRecordCmdWriteTimestamp2KHR, - InterceptIdPostCallRecordCmdWriteTimestamp2KHR, - InterceptIdPreCallValidateQueueSubmit2KHR, - InterceptIdPreCallRecordQueueSubmit2KHR, - InterceptIdPostCallRecordQueueSubmit2KHR, - InterceptIdPreCallValidateCmdCopyBuffer2KHR, - InterceptIdPreCallRecordCmdCopyBuffer2KHR, - InterceptIdPostCallRecordCmdCopyBuffer2KHR, - InterceptIdPreCallValidateCmdCopyImage2KHR, - InterceptIdPreCallRecordCmdCopyImage2KHR, - InterceptIdPostCallRecordCmdCopyImage2KHR, - InterceptIdPreCallValidateCmdCopyBufferToImage2KHR, - InterceptIdPreCallRecordCmdCopyBufferToImage2KHR, - InterceptIdPostCallRecordCmdCopyBufferToImage2KHR, - InterceptIdPreCallValidateCmdCopyImageToBuffer2KHR, - InterceptIdPreCallRecordCmdCopyImageToBuffer2KHR, - InterceptIdPostCallRecordCmdCopyImageToBuffer2KHR, - InterceptIdPreCallValidateCmdBlitImage2KHR, - InterceptIdPreCallRecordCmdBlitImage2KHR, - InterceptIdPostCallRecordCmdBlitImage2KHR, - InterceptIdPreCallValidateCmdResolveImage2KHR, - InterceptIdPreCallRecordCmdResolveImage2KHR, - InterceptIdPostCallRecordCmdResolveImage2KHR, - InterceptIdPreCallValidateCmdTraceRaysIndirect2KHR, - InterceptIdPreCallRecordCmdTraceRaysIndirect2KHR, - InterceptIdPostCallRecordCmdTraceRaysIndirect2KHR, - InterceptIdPreCallValidateGetDeviceBufferMemoryRequirementsKHR, - InterceptIdPreCallRecordGetDeviceBufferMemoryRequirementsKHR, - InterceptIdPostCallRecordGetDeviceBufferMemoryRequirementsKHR, - InterceptIdPreCallValidateGetDeviceImageMemoryRequirementsKHR, - InterceptIdPreCallRecordGetDeviceImageMemoryRequirementsKHR, - InterceptIdPostCallRecordGetDeviceImageMemoryRequirementsKHR, - InterceptIdPreCallValidateGetDeviceImageSparseMemoryRequirementsKHR, - InterceptIdPreCallRecordGetDeviceImageSparseMemoryRequirementsKHR, - InterceptIdPostCallRecordGetDeviceImageSparseMemoryRequirementsKHR, - InterceptIdPreCallValidateCmdBindIndexBuffer2KHR, - InterceptIdPreCallRecordCmdBindIndexBuffer2KHR, - InterceptIdPostCallRecordCmdBindIndexBuffer2KHR, - InterceptIdPreCallValidateGetRenderingAreaGranularityKHR, - InterceptIdPreCallRecordGetRenderingAreaGranularityKHR, - InterceptIdPostCallRecordGetRenderingAreaGranularityKHR, - InterceptIdPreCallValidateGetDeviceImageSubresourceLayoutKHR, - InterceptIdPreCallRecordGetDeviceImageSubresourceLayoutKHR, - InterceptIdPostCallRecordGetDeviceImageSubresourceLayoutKHR, - InterceptIdPreCallValidateGetImageSubresourceLayout2KHR, - InterceptIdPreCallRecordGetImageSubresourceLayout2KHR, - InterceptIdPostCallRecordGetImageSubresourceLayout2KHR, - InterceptIdPreCallValidateCreatePipelineBinariesKHR, - InterceptIdPreCallRecordCreatePipelineBinariesKHR, - InterceptIdPostCallRecordCreatePipelineBinariesKHR, - InterceptIdPreCallValidateDestroyPipelineBinaryKHR, - InterceptIdPreCallRecordDestroyPipelineBinaryKHR, - InterceptIdPostCallRecordDestroyPipelineBinaryKHR, - InterceptIdPreCallValidateGetPipelineKeyKHR, - InterceptIdPreCallRecordGetPipelineKeyKHR, - InterceptIdPostCallRecordGetPipelineKeyKHR, - InterceptIdPreCallValidateGetPipelineBinaryDataKHR, - InterceptIdPreCallRecordGetPipelineBinaryDataKHR, - InterceptIdPostCallRecordGetPipelineBinaryDataKHR, - InterceptIdPreCallValidateReleaseCapturedPipelineDataKHR, - InterceptIdPreCallRecordReleaseCapturedPipelineDataKHR, - InterceptIdPostCallRecordReleaseCapturedPipelineDataKHR, - InterceptIdPreCallValidateCmdSetLineStippleKHR, - InterceptIdPreCallRecordCmdSetLineStippleKHR, - InterceptIdPostCallRecordCmdSetLineStippleKHR, - InterceptIdPreCallValidateGetCalibratedTimestampsKHR, - InterceptIdPreCallRecordGetCalibratedTimestampsKHR, - InterceptIdPostCallRecordGetCalibratedTimestampsKHR, - InterceptIdPreCallValidateCmdBindDescriptorSets2KHR, - InterceptIdPreCallRecordCmdBindDescriptorSets2KHR, - InterceptIdPostCallRecordCmdBindDescriptorSets2KHR, - InterceptIdPreCallValidateCmdPushConstants2KHR, - InterceptIdPreCallRecordCmdPushConstants2KHR, - InterceptIdPostCallRecordCmdPushConstants2KHR, - InterceptIdPreCallValidateCmdPushDescriptorSet2KHR, - InterceptIdPreCallRecordCmdPushDescriptorSet2KHR, - InterceptIdPostCallRecordCmdPushDescriptorSet2KHR, - InterceptIdPreCallValidateCmdPushDescriptorSetWithTemplate2KHR, - InterceptIdPreCallRecordCmdPushDescriptorSetWithTemplate2KHR, - InterceptIdPostCallRecordCmdPushDescriptorSetWithTemplate2KHR, - InterceptIdPreCallValidateCmdSetDescriptorBufferOffsets2EXT, - InterceptIdPreCallRecordCmdSetDescriptorBufferOffsets2EXT, - InterceptIdPostCallRecordCmdSetDescriptorBufferOffsets2EXT, - InterceptIdPreCallValidateCmdBindDescriptorBufferEmbeddedSamplers2EXT, - InterceptIdPreCallRecordCmdBindDescriptorBufferEmbeddedSamplers2EXT, - InterceptIdPostCallRecordCmdBindDescriptorBufferEmbeddedSamplers2EXT, - InterceptIdPreCallValidateDebugMarkerSetObjectTagEXT, - InterceptIdPreCallRecordDebugMarkerSetObjectTagEXT, - InterceptIdPostCallRecordDebugMarkerSetObjectTagEXT, - InterceptIdPreCallValidateDebugMarkerSetObjectNameEXT, - InterceptIdPreCallRecordDebugMarkerSetObjectNameEXT, - InterceptIdPostCallRecordDebugMarkerSetObjectNameEXT, - InterceptIdPreCallValidateCmdDebugMarkerBeginEXT, - InterceptIdPreCallRecordCmdDebugMarkerBeginEXT, - InterceptIdPostCallRecordCmdDebugMarkerBeginEXT, - InterceptIdPreCallValidateCmdDebugMarkerEndEXT, - InterceptIdPreCallRecordCmdDebugMarkerEndEXT, - InterceptIdPostCallRecordCmdDebugMarkerEndEXT, - InterceptIdPreCallValidateCmdDebugMarkerInsertEXT, - InterceptIdPreCallRecordCmdDebugMarkerInsertEXT, - InterceptIdPostCallRecordCmdDebugMarkerInsertEXT, - InterceptIdPreCallValidateCmdBindTransformFeedbackBuffersEXT, - InterceptIdPreCallRecordCmdBindTransformFeedbackBuffersEXT, - InterceptIdPostCallRecordCmdBindTransformFeedbackBuffersEXT, - InterceptIdPreCallValidateCmdBeginTransformFeedbackEXT, - InterceptIdPreCallRecordCmdBeginTransformFeedbackEXT, - InterceptIdPostCallRecordCmdBeginTransformFeedbackEXT, - InterceptIdPreCallValidateCmdEndTransformFeedbackEXT, - InterceptIdPreCallRecordCmdEndTransformFeedbackEXT, - InterceptIdPostCallRecordCmdEndTransformFeedbackEXT, - InterceptIdPreCallValidateCmdBeginQueryIndexedEXT, - InterceptIdPreCallRecordCmdBeginQueryIndexedEXT, - InterceptIdPostCallRecordCmdBeginQueryIndexedEXT, - InterceptIdPreCallValidateCmdEndQueryIndexedEXT, - InterceptIdPreCallRecordCmdEndQueryIndexedEXT, - InterceptIdPostCallRecordCmdEndQueryIndexedEXT, - InterceptIdPreCallValidateCmdDrawIndirectByteCountEXT, - InterceptIdPreCallRecordCmdDrawIndirectByteCountEXT, - InterceptIdPostCallRecordCmdDrawIndirectByteCountEXT, - InterceptIdPreCallValidateCreateCuModuleNVX, - InterceptIdPreCallRecordCreateCuModuleNVX, - InterceptIdPostCallRecordCreateCuModuleNVX, - InterceptIdPreCallValidateCreateCuFunctionNVX, - InterceptIdPreCallRecordCreateCuFunctionNVX, - InterceptIdPostCallRecordCreateCuFunctionNVX, - InterceptIdPreCallValidateDestroyCuModuleNVX, - InterceptIdPreCallRecordDestroyCuModuleNVX, - InterceptIdPostCallRecordDestroyCuModuleNVX, - InterceptIdPreCallValidateDestroyCuFunctionNVX, - InterceptIdPreCallRecordDestroyCuFunctionNVX, - InterceptIdPostCallRecordDestroyCuFunctionNVX, - InterceptIdPreCallValidateCmdCuLaunchKernelNVX, - InterceptIdPreCallRecordCmdCuLaunchKernelNVX, - InterceptIdPostCallRecordCmdCuLaunchKernelNVX, - InterceptIdPreCallValidateGetImageViewHandleNVX, - InterceptIdPreCallRecordGetImageViewHandleNVX, - InterceptIdPostCallRecordGetImageViewHandleNVX, - InterceptIdPreCallValidateGetImageViewHandle64NVX, - InterceptIdPreCallRecordGetImageViewHandle64NVX, - InterceptIdPostCallRecordGetImageViewHandle64NVX, - InterceptIdPreCallValidateGetImageViewAddressNVX, - InterceptIdPreCallRecordGetImageViewAddressNVX, - InterceptIdPostCallRecordGetImageViewAddressNVX, - InterceptIdPreCallValidateCmdDrawIndirectCountAMD, - InterceptIdPreCallRecordCmdDrawIndirectCountAMD, - InterceptIdPostCallRecordCmdDrawIndirectCountAMD, - InterceptIdPreCallValidateCmdDrawIndexedIndirectCountAMD, - InterceptIdPreCallRecordCmdDrawIndexedIndirectCountAMD, - InterceptIdPostCallRecordCmdDrawIndexedIndirectCountAMD, - InterceptIdPreCallValidateGetShaderInfoAMD, - InterceptIdPreCallRecordGetShaderInfoAMD, - InterceptIdPostCallRecordGetShaderInfoAMD, - InterceptIdPreCallValidateGetMemoryWin32HandleNV, - InterceptIdPreCallRecordGetMemoryWin32HandleNV, - InterceptIdPostCallRecordGetMemoryWin32HandleNV, - InterceptIdPreCallValidateCmdBeginConditionalRenderingEXT, - InterceptIdPreCallRecordCmdBeginConditionalRenderingEXT, - InterceptIdPostCallRecordCmdBeginConditionalRenderingEXT, - InterceptIdPreCallValidateCmdEndConditionalRenderingEXT, - InterceptIdPreCallRecordCmdEndConditionalRenderingEXT, - InterceptIdPostCallRecordCmdEndConditionalRenderingEXT, - InterceptIdPreCallValidateCmdSetViewportWScalingNV, - InterceptIdPreCallRecordCmdSetViewportWScalingNV, - InterceptIdPostCallRecordCmdSetViewportWScalingNV, - InterceptIdPreCallValidateDisplayPowerControlEXT, - InterceptIdPreCallRecordDisplayPowerControlEXT, - InterceptIdPostCallRecordDisplayPowerControlEXT, - InterceptIdPreCallValidateRegisterDeviceEventEXT, - InterceptIdPreCallRecordRegisterDeviceEventEXT, - InterceptIdPostCallRecordRegisterDeviceEventEXT, - InterceptIdPreCallValidateRegisterDisplayEventEXT, - InterceptIdPreCallRecordRegisterDisplayEventEXT, - InterceptIdPostCallRecordRegisterDisplayEventEXT, - InterceptIdPreCallValidateGetSwapchainCounterEXT, - InterceptIdPreCallRecordGetSwapchainCounterEXT, - InterceptIdPostCallRecordGetSwapchainCounterEXT, - InterceptIdPreCallValidateGetRefreshCycleDurationGOOGLE, - InterceptIdPreCallRecordGetRefreshCycleDurationGOOGLE, - InterceptIdPostCallRecordGetRefreshCycleDurationGOOGLE, - InterceptIdPreCallValidateGetPastPresentationTimingGOOGLE, - InterceptIdPreCallRecordGetPastPresentationTimingGOOGLE, - InterceptIdPostCallRecordGetPastPresentationTimingGOOGLE, - InterceptIdPreCallValidateCmdSetDiscardRectangleEXT, - InterceptIdPreCallRecordCmdSetDiscardRectangleEXT, - InterceptIdPostCallRecordCmdSetDiscardRectangleEXT, - InterceptIdPreCallValidateCmdSetDiscardRectangleEnableEXT, - InterceptIdPreCallRecordCmdSetDiscardRectangleEnableEXT, - InterceptIdPostCallRecordCmdSetDiscardRectangleEnableEXT, - InterceptIdPreCallValidateCmdSetDiscardRectangleModeEXT, - InterceptIdPreCallRecordCmdSetDiscardRectangleModeEXT, - InterceptIdPostCallRecordCmdSetDiscardRectangleModeEXT, - InterceptIdPreCallValidateSetHdrMetadataEXT, - InterceptIdPreCallRecordSetHdrMetadataEXT, - InterceptIdPostCallRecordSetHdrMetadataEXT, - InterceptIdPreCallValidateSetDebugUtilsObjectNameEXT, - InterceptIdPreCallRecordSetDebugUtilsObjectNameEXT, - InterceptIdPostCallRecordSetDebugUtilsObjectNameEXT, - InterceptIdPreCallValidateSetDebugUtilsObjectTagEXT, - InterceptIdPreCallRecordSetDebugUtilsObjectTagEXT, - InterceptIdPostCallRecordSetDebugUtilsObjectTagEXT, - InterceptIdPreCallValidateQueueBeginDebugUtilsLabelEXT, - InterceptIdPreCallRecordQueueBeginDebugUtilsLabelEXT, - InterceptIdPostCallRecordQueueBeginDebugUtilsLabelEXT, - InterceptIdPreCallValidateQueueEndDebugUtilsLabelEXT, - InterceptIdPreCallRecordQueueEndDebugUtilsLabelEXT, - InterceptIdPostCallRecordQueueEndDebugUtilsLabelEXT, - InterceptIdPreCallValidateQueueInsertDebugUtilsLabelEXT, - InterceptIdPreCallRecordQueueInsertDebugUtilsLabelEXT, - InterceptIdPostCallRecordQueueInsertDebugUtilsLabelEXT, - InterceptIdPreCallValidateCmdBeginDebugUtilsLabelEXT, - InterceptIdPreCallRecordCmdBeginDebugUtilsLabelEXT, - InterceptIdPostCallRecordCmdBeginDebugUtilsLabelEXT, - InterceptIdPreCallValidateCmdEndDebugUtilsLabelEXT, - InterceptIdPreCallRecordCmdEndDebugUtilsLabelEXT, - InterceptIdPostCallRecordCmdEndDebugUtilsLabelEXT, - InterceptIdPreCallValidateCmdInsertDebugUtilsLabelEXT, - InterceptIdPreCallRecordCmdInsertDebugUtilsLabelEXT, - InterceptIdPostCallRecordCmdInsertDebugUtilsLabelEXT, - InterceptIdPreCallValidateGetAndroidHardwareBufferPropertiesANDROID, - InterceptIdPreCallRecordGetAndroidHardwareBufferPropertiesANDROID, - InterceptIdPostCallRecordGetAndroidHardwareBufferPropertiesANDROID, - InterceptIdPreCallValidateGetMemoryAndroidHardwareBufferANDROID, - InterceptIdPreCallRecordGetMemoryAndroidHardwareBufferANDROID, - InterceptIdPostCallRecordGetMemoryAndroidHardwareBufferANDROID, - InterceptIdPreCallValidateCreateExecutionGraphPipelinesAMDX, - InterceptIdPreCallRecordCreateExecutionGraphPipelinesAMDX, - InterceptIdPostCallRecordCreateExecutionGraphPipelinesAMDX, - InterceptIdPreCallValidateGetExecutionGraphPipelineScratchSizeAMDX, - InterceptIdPreCallRecordGetExecutionGraphPipelineScratchSizeAMDX, - InterceptIdPostCallRecordGetExecutionGraphPipelineScratchSizeAMDX, - InterceptIdPreCallValidateGetExecutionGraphPipelineNodeIndexAMDX, - InterceptIdPreCallRecordGetExecutionGraphPipelineNodeIndexAMDX, - InterceptIdPostCallRecordGetExecutionGraphPipelineNodeIndexAMDX, - InterceptIdPreCallValidateCmdInitializeGraphScratchMemoryAMDX, - InterceptIdPreCallRecordCmdInitializeGraphScratchMemoryAMDX, - InterceptIdPostCallRecordCmdInitializeGraphScratchMemoryAMDX, - InterceptIdPreCallValidateCmdDispatchGraphAMDX, - InterceptIdPreCallRecordCmdDispatchGraphAMDX, - InterceptIdPostCallRecordCmdDispatchGraphAMDX, - InterceptIdPreCallValidateCmdDispatchGraphIndirectAMDX, - InterceptIdPreCallRecordCmdDispatchGraphIndirectAMDX, - InterceptIdPostCallRecordCmdDispatchGraphIndirectAMDX, - InterceptIdPreCallValidateCmdDispatchGraphIndirectCountAMDX, - InterceptIdPreCallRecordCmdDispatchGraphIndirectCountAMDX, - InterceptIdPostCallRecordCmdDispatchGraphIndirectCountAMDX, - InterceptIdPreCallValidateCmdSetSampleLocationsEXT, - InterceptIdPreCallRecordCmdSetSampleLocationsEXT, - InterceptIdPostCallRecordCmdSetSampleLocationsEXT, - InterceptIdPreCallValidateGetImageDrmFormatModifierPropertiesEXT, - InterceptIdPreCallRecordGetImageDrmFormatModifierPropertiesEXT, - InterceptIdPostCallRecordGetImageDrmFormatModifierPropertiesEXT, - InterceptIdPreCallValidateCmdBindShadingRateImageNV, - InterceptIdPreCallRecordCmdBindShadingRateImageNV, - InterceptIdPostCallRecordCmdBindShadingRateImageNV, - InterceptIdPreCallValidateCmdSetViewportShadingRatePaletteNV, - InterceptIdPreCallRecordCmdSetViewportShadingRatePaletteNV, - InterceptIdPostCallRecordCmdSetViewportShadingRatePaletteNV, - InterceptIdPreCallValidateCmdSetCoarseSampleOrderNV, - InterceptIdPreCallRecordCmdSetCoarseSampleOrderNV, - InterceptIdPostCallRecordCmdSetCoarseSampleOrderNV, - InterceptIdPreCallValidateCreateAccelerationStructureNV, - InterceptIdPreCallRecordCreateAccelerationStructureNV, - InterceptIdPostCallRecordCreateAccelerationStructureNV, - InterceptIdPreCallValidateDestroyAccelerationStructureNV, - InterceptIdPreCallRecordDestroyAccelerationStructureNV, - InterceptIdPostCallRecordDestroyAccelerationStructureNV, - InterceptIdPreCallValidateGetAccelerationStructureMemoryRequirementsNV, - InterceptIdPreCallRecordGetAccelerationStructureMemoryRequirementsNV, - InterceptIdPostCallRecordGetAccelerationStructureMemoryRequirementsNV, - InterceptIdPreCallValidateBindAccelerationStructureMemoryNV, - InterceptIdPreCallRecordBindAccelerationStructureMemoryNV, - InterceptIdPostCallRecordBindAccelerationStructureMemoryNV, - InterceptIdPreCallValidateCmdBuildAccelerationStructureNV, - InterceptIdPreCallRecordCmdBuildAccelerationStructureNV, - InterceptIdPostCallRecordCmdBuildAccelerationStructureNV, - InterceptIdPreCallValidateCmdCopyAccelerationStructureNV, - InterceptIdPreCallRecordCmdCopyAccelerationStructureNV, - InterceptIdPostCallRecordCmdCopyAccelerationStructureNV, - InterceptIdPreCallValidateCmdTraceRaysNV, - InterceptIdPreCallRecordCmdTraceRaysNV, - InterceptIdPostCallRecordCmdTraceRaysNV, - InterceptIdPreCallValidateGetRayTracingShaderGroupHandlesKHR, - InterceptIdPreCallRecordGetRayTracingShaderGroupHandlesKHR, - InterceptIdPostCallRecordGetRayTracingShaderGroupHandlesKHR, - InterceptIdPreCallValidateGetRayTracingShaderGroupHandlesNV, - InterceptIdPreCallRecordGetRayTracingShaderGroupHandlesNV, - InterceptIdPostCallRecordGetRayTracingShaderGroupHandlesNV, - InterceptIdPreCallValidateGetAccelerationStructureHandleNV, - InterceptIdPreCallRecordGetAccelerationStructureHandleNV, - InterceptIdPostCallRecordGetAccelerationStructureHandleNV, - InterceptIdPreCallValidateCmdWriteAccelerationStructuresPropertiesNV, - InterceptIdPreCallRecordCmdWriteAccelerationStructuresPropertiesNV, - InterceptIdPostCallRecordCmdWriteAccelerationStructuresPropertiesNV, - InterceptIdPreCallValidateCompileDeferredNV, - InterceptIdPreCallRecordCompileDeferredNV, - InterceptIdPostCallRecordCompileDeferredNV, - InterceptIdPreCallValidateGetMemoryHostPointerPropertiesEXT, - InterceptIdPreCallRecordGetMemoryHostPointerPropertiesEXT, - InterceptIdPostCallRecordGetMemoryHostPointerPropertiesEXT, - InterceptIdPreCallValidateCmdWriteBufferMarkerAMD, - InterceptIdPreCallRecordCmdWriteBufferMarkerAMD, - InterceptIdPostCallRecordCmdWriteBufferMarkerAMD, - InterceptIdPreCallValidateCmdWriteBufferMarker2AMD, - InterceptIdPreCallRecordCmdWriteBufferMarker2AMD, - InterceptIdPostCallRecordCmdWriteBufferMarker2AMD, - InterceptIdPreCallValidateGetCalibratedTimestampsEXT, - InterceptIdPreCallRecordGetCalibratedTimestampsEXT, - InterceptIdPostCallRecordGetCalibratedTimestampsEXT, - InterceptIdPreCallValidateCmdDrawMeshTasksNV, - InterceptIdPreCallRecordCmdDrawMeshTasksNV, - InterceptIdPostCallRecordCmdDrawMeshTasksNV, - InterceptIdPreCallValidateCmdDrawMeshTasksIndirectNV, - InterceptIdPreCallRecordCmdDrawMeshTasksIndirectNV, - InterceptIdPostCallRecordCmdDrawMeshTasksIndirectNV, - InterceptIdPreCallValidateCmdDrawMeshTasksIndirectCountNV, - InterceptIdPreCallRecordCmdDrawMeshTasksIndirectCountNV, - InterceptIdPostCallRecordCmdDrawMeshTasksIndirectCountNV, - InterceptIdPreCallValidateCmdSetExclusiveScissorEnableNV, - InterceptIdPreCallRecordCmdSetExclusiveScissorEnableNV, - InterceptIdPostCallRecordCmdSetExclusiveScissorEnableNV, - InterceptIdPreCallValidateCmdSetExclusiveScissorNV, - InterceptIdPreCallRecordCmdSetExclusiveScissorNV, - InterceptIdPostCallRecordCmdSetExclusiveScissorNV, - InterceptIdPreCallValidateCmdSetCheckpointNV, - InterceptIdPreCallRecordCmdSetCheckpointNV, - InterceptIdPostCallRecordCmdSetCheckpointNV, - InterceptIdPreCallValidateGetQueueCheckpointDataNV, - InterceptIdPreCallRecordGetQueueCheckpointDataNV, - InterceptIdPostCallRecordGetQueueCheckpointDataNV, - InterceptIdPreCallValidateGetQueueCheckpointData2NV, - InterceptIdPreCallRecordGetQueueCheckpointData2NV, - InterceptIdPostCallRecordGetQueueCheckpointData2NV, - InterceptIdPreCallValidateInitializePerformanceApiINTEL, - InterceptIdPreCallRecordInitializePerformanceApiINTEL, - InterceptIdPostCallRecordInitializePerformanceApiINTEL, - InterceptIdPreCallValidateUninitializePerformanceApiINTEL, - InterceptIdPreCallRecordUninitializePerformanceApiINTEL, - InterceptIdPostCallRecordUninitializePerformanceApiINTEL, - InterceptIdPreCallValidateCmdSetPerformanceMarkerINTEL, - InterceptIdPreCallRecordCmdSetPerformanceMarkerINTEL, - InterceptIdPostCallRecordCmdSetPerformanceMarkerINTEL, - InterceptIdPreCallValidateCmdSetPerformanceStreamMarkerINTEL, - InterceptIdPreCallRecordCmdSetPerformanceStreamMarkerINTEL, - InterceptIdPostCallRecordCmdSetPerformanceStreamMarkerINTEL, - InterceptIdPreCallValidateCmdSetPerformanceOverrideINTEL, - InterceptIdPreCallRecordCmdSetPerformanceOverrideINTEL, - InterceptIdPostCallRecordCmdSetPerformanceOverrideINTEL, - InterceptIdPreCallValidateAcquirePerformanceConfigurationINTEL, - InterceptIdPreCallRecordAcquirePerformanceConfigurationINTEL, - InterceptIdPostCallRecordAcquirePerformanceConfigurationINTEL, - InterceptIdPreCallValidateReleasePerformanceConfigurationINTEL, - InterceptIdPreCallRecordReleasePerformanceConfigurationINTEL, - InterceptIdPostCallRecordReleasePerformanceConfigurationINTEL, - InterceptIdPreCallValidateQueueSetPerformanceConfigurationINTEL, - InterceptIdPreCallRecordQueueSetPerformanceConfigurationINTEL, - InterceptIdPostCallRecordQueueSetPerformanceConfigurationINTEL, - InterceptIdPreCallValidateGetPerformanceParameterINTEL, - InterceptIdPreCallRecordGetPerformanceParameterINTEL, - InterceptIdPostCallRecordGetPerformanceParameterINTEL, - InterceptIdPreCallValidateSetLocalDimmingAMD, - InterceptIdPreCallRecordSetLocalDimmingAMD, - InterceptIdPostCallRecordSetLocalDimmingAMD, - InterceptIdPreCallValidateGetBufferDeviceAddressEXT, - InterceptIdPreCallRecordGetBufferDeviceAddressEXT, - InterceptIdPostCallRecordGetBufferDeviceAddressEXT, - InterceptIdPreCallValidateAcquireFullScreenExclusiveModeEXT, - InterceptIdPreCallRecordAcquireFullScreenExclusiveModeEXT, - InterceptIdPostCallRecordAcquireFullScreenExclusiveModeEXT, - InterceptIdPreCallValidateReleaseFullScreenExclusiveModeEXT, - InterceptIdPreCallRecordReleaseFullScreenExclusiveModeEXT, - InterceptIdPostCallRecordReleaseFullScreenExclusiveModeEXT, - InterceptIdPreCallValidateGetDeviceGroupSurfacePresentModes2EXT, - InterceptIdPreCallRecordGetDeviceGroupSurfacePresentModes2EXT, - InterceptIdPostCallRecordGetDeviceGroupSurfacePresentModes2EXT, - InterceptIdPreCallValidateCmdSetLineStippleEXT, - InterceptIdPreCallRecordCmdSetLineStippleEXT, - InterceptIdPostCallRecordCmdSetLineStippleEXT, - InterceptIdPreCallValidateResetQueryPoolEXT, - InterceptIdPreCallRecordResetQueryPoolEXT, - InterceptIdPostCallRecordResetQueryPoolEXT, - InterceptIdPreCallValidateCmdSetCullModeEXT, - InterceptIdPreCallRecordCmdSetCullModeEXT, - InterceptIdPostCallRecordCmdSetCullModeEXT, - InterceptIdPreCallValidateCmdSetFrontFaceEXT, - InterceptIdPreCallRecordCmdSetFrontFaceEXT, - InterceptIdPostCallRecordCmdSetFrontFaceEXT, - InterceptIdPreCallValidateCmdSetPrimitiveTopologyEXT, - InterceptIdPreCallRecordCmdSetPrimitiveTopologyEXT, - InterceptIdPostCallRecordCmdSetPrimitiveTopologyEXT, - InterceptIdPreCallValidateCmdSetViewportWithCountEXT, - InterceptIdPreCallRecordCmdSetViewportWithCountEXT, - InterceptIdPostCallRecordCmdSetViewportWithCountEXT, - InterceptIdPreCallValidateCmdSetScissorWithCountEXT, - InterceptIdPreCallRecordCmdSetScissorWithCountEXT, - InterceptIdPostCallRecordCmdSetScissorWithCountEXT, - InterceptIdPreCallValidateCmdBindVertexBuffers2EXT, - InterceptIdPreCallRecordCmdBindVertexBuffers2EXT, - InterceptIdPostCallRecordCmdBindVertexBuffers2EXT, - InterceptIdPreCallValidateCmdSetDepthTestEnableEXT, - InterceptIdPreCallRecordCmdSetDepthTestEnableEXT, - InterceptIdPostCallRecordCmdSetDepthTestEnableEXT, - InterceptIdPreCallValidateCmdSetDepthWriteEnableEXT, - InterceptIdPreCallRecordCmdSetDepthWriteEnableEXT, - InterceptIdPostCallRecordCmdSetDepthWriteEnableEXT, - InterceptIdPreCallValidateCmdSetDepthCompareOpEXT, - InterceptIdPreCallRecordCmdSetDepthCompareOpEXT, - InterceptIdPostCallRecordCmdSetDepthCompareOpEXT, - InterceptIdPreCallValidateCmdSetDepthBoundsTestEnableEXT, - InterceptIdPreCallRecordCmdSetDepthBoundsTestEnableEXT, - InterceptIdPostCallRecordCmdSetDepthBoundsTestEnableEXT, - InterceptIdPreCallValidateCmdSetStencilTestEnableEXT, - InterceptIdPreCallRecordCmdSetStencilTestEnableEXT, - InterceptIdPostCallRecordCmdSetStencilTestEnableEXT, - InterceptIdPreCallValidateCmdSetStencilOpEXT, - InterceptIdPreCallRecordCmdSetStencilOpEXT, - InterceptIdPostCallRecordCmdSetStencilOpEXT, - InterceptIdPreCallValidateCopyMemoryToImageEXT, - InterceptIdPreCallRecordCopyMemoryToImageEXT, - InterceptIdPostCallRecordCopyMemoryToImageEXT, - InterceptIdPreCallValidateCopyImageToMemoryEXT, - InterceptIdPreCallRecordCopyImageToMemoryEXT, - InterceptIdPostCallRecordCopyImageToMemoryEXT, - InterceptIdPreCallValidateCopyImageToImageEXT, - InterceptIdPreCallRecordCopyImageToImageEXT, - InterceptIdPostCallRecordCopyImageToImageEXT, - InterceptIdPreCallValidateTransitionImageLayoutEXT, - InterceptIdPreCallRecordTransitionImageLayoutEXT, - InterceptIdPostCallRecordTransitionImageLayoutEXT, - InterceptIdPreCallValidateGetImageSubresourceLayout2EXT, - InterceptIdPreCallRecordGetImageSubresourceLayout2EXT, - InterceptIdPostCallRecordGetImageSubresourceLayout2EXT, - InterceptIdPreCallValidateReleaseSwapchainImagesEXT, - InterceptIdPreCallRecordReleaseSwapchainImagesEXT, - InterceptIdPostCallRecordReleaseSwapchainImagesEXT, - InterceptIdPreCallValidateGetGeneratedCommandsMemoryRequirementsNV, - InterceptIdPreCallRecordGetGeneratedCommandsMemoryRequirementsNV, - InterceptIdPostCallRecordGetGeneratedCommandsMemoryRequirementsNV, - InterceptIdPreCallValidateCmdPreprocessGeneratedCommandsNV, - InterceptIdPreCallRecordCmdPreprocessGeneratedCommandsNV, - InterceptIdPostCallRecordCmdPreprocessGeneratedCommandsNV, - InterceptIdPreCallValidateCmdExecuteGeneratedCommandsNV, - InterceptIdPreCallRecordCmdExecuteGeneratedCommandsNV, - InterceptIdPostCallRecordCmdExecuteGeneratedCommandsNV, - InterceptIdPreCallValidateCmdBindPipelineShaderGroupNV, - InterceptIdPreCallRecordCmdBindPipelineShaderGroupNV, - InterceptIdPostCallRecordCmdBindPipelineShaderGroupNV, - InterceptIdPreCallValidateCreateIndirectCommandsLayoutNV, - InterceptIdPreCallRecordCreateIndirectCommandsLayoutNV, - InterceptIdPostCallRecordCreateIndirectCommandsLayoutNV, - InterceptIdPreCallValidateDestroyIndirectCommandsLayoutNV, - InterceptIdPreCallRecordDestroyIndirectCommandsLayoutNV, - InterceptIdPostCallRecordDestroyIndirectCommandsLayoutNV, - InterceptIdPreCallValidateCmdSetDepthBias2EXT, - InterceptIdPreCallRecordCmdSetDepthBias2EXT, - InterceptIdPostCallRecordCmdSetDepthBias2EXT, - InterceptIdPreCallValidateCreatePrivateDataSlotEXT, - InterceptIdPreCallRecordCreatePrivateDataSlotEXT, - InterceptIdPostCallRecordCreatePrivateDataSlotEXT, - InterceptIdPreCallValidateDestroyPrivateDataSlotEXT, - InterceptIdPreCallRecordDestroyPrivateDataSlotEXT, - InterceptIdPostCallRecordDestroyPrivateDataSlotEXT, - InterceptIdPreCallValidateSetPrivateDataEXT, - InterceptIdPreCallRecordSetPrivateDataEXT, - InterceptIdPostCallRecordSetPrivateDataEXT, - InterceptIdPreCallValidateGetPrivateDataEXT, - InterceptIdPreCallRecordGetPrivateDataEXT, - InterceptIdPostCallRecordGetPrivateDataEXT, - InterceptIdPreCallValidateCreateCudaModuleNV, - InterceptIdPreCallRecordCreateCudaModuleNV, - InterceptIdPostCallRecordCreateCudaModuleNV, - InterceptIdPreCallValidateGetCudaModuleCacheNV, - InterceptIdPreCallRecordGetCudaModuleCacheNV, - InterceptIdPostCallRecordGetCudaModuleCacheNV, - InterceptIdPreCallValidateCreateCudaFunctionNV, - InterceptIdPreCallRecordCreateCudaFunctionNV, - InterceptIdPostCallRecordCreateCudaFunctionNV, - InterceptIdPreCallValidateDestroyCudaModuleNV, - InterceptIdPreCallRecordDestroyCudaModuleNV, - InterceptIdPostCallRecordDestroyCudaModuleNV, - InterceptIdPreCallValidateDestroyCudaFunctionNV, - InterceptIdPreCallRecordDestroyCudaFunctionNV, - InterceptIdPostCallRecordDestroyCudaFunctionNV, - InterceptIdPreCallValidateCmdCudaLaunchKernelNV, - InterceptIdPreCallRecordCmdCudaLaunchKernelNV, - InterceptIdPostCallRecordCmdCudaLaunchKernelNV, - InterceptIdPreCallValidateExportMetalObjectsEXT, - InterceptIdPreCallRecordExportMetalObjectsEXT, - InterceptIdPostCallRecordExportMetalObjectsEXT, - InterceptIdPreCallValidateGetDescriptorSetLayoutSizeEXT, - InterceptIdPreCallRecordGetDescriptorSetLayoutSizeEXT, - InterceptIdPostCallRecordGetDescriptorSetLayoutSizeEXT, - InterceptIdPreCallValidateGetDescriptorSetLayoutBindingOffsetEXT, - InterceptIdPreCallRecordGetDescriptorSetLayoutBindingOffsetEXT, - InterceptIdPostCallRecordGetDescriptorSetLayoutBindingOffsetEXT, - InterceptIdPreCallValidateGetDescriptorEXT, - InterceptIdPreCallRecordGetDescriptorEXT, - InterceptIdPostCallRecordGetDescriptorEXT, - InterceptIdPreCallValidateCmdBindDescriptorBuffersEXT, - InterceptIdPreCallRecordCmdBindDescriptorBuffersEXT, - InterceptIdPostCallRecordCmdBindDescriptorBuffersEXT, - InterceptIdPreCallValidateCmdSetDescriptorBufferOffsetsEXT, - InterceptIdPreCallRecordCmdSetDescriptorBufferOffsetsEXT, - InterceptIdPostCallRecordCmdSetDescriptorBufferOffsetsEXT, - InterceptIdPreCallValidateCmdBindDescriptorBufferEmbeddedSamplersEXT, - InterceptIdPreCallRecordCmdBindDescriptorBufferEmbeddedSamplersEXT, - InterceptIdPostCallRecordCmdBindDescriptorBufferEmbeddedSamplersEXT, - InterceptIdPreCallValidateGetBufferOpaqueCaptureDescriptorDataEXT, - InterceptIdPreCallRecordGetBufferOpaqueCaptureDescriptorDataEXT, - InterceptIdPostCallRecordGetBufferOpaqueCaptureDescriptorDataEXT, - InterceptIdPreCallValidateGetImageOpaqueCaptureDescriptorDataEXT, - InterceptIdPreCallRecordGetImageOpaqueCaptureDescriptorDataEXT, - InterceptIdPostCallRecordGetImageOpaqueCaptureDescriptorDataEXT, - InterceptIdPreCallValidateGetImageViewOpaqueCaptureDescriptorDataEXT, - InterceptIdPreCallRecordGetImageViewOpaqueCaptureDescriptorDataEXT, - InterceptIdPostCallRecordGetImageViewOpaqueCaptureDescriptorDataEXT, - InterceptIdPreCallValidateGetSamplerOpaqueCaptureDescriptorDataEXT, - InterceptIdPreCallRecordGetSamplerOpaqueCaptureDescriptorDataEXT, - InterceptIdPostCallRecordGetSamplerOpaqueCaptureDescriptorDataEXT, - InterceptIdPreCallValidateGetAccelerationStructureOpaqueCaptureDescriptorDataEXT, - InterceptIdPreCallRecordGetAccelerationStructureOpaqueCaptureDescriptorDataEXT, - InterceptIdPostCallRecordGetAccelerationStructureOpaqueCaptureDescriptorDataEXT, - InterceptIdPreCallValidateCmdSetFragmentShadingRateEnumNV, - InterceptIdPreCallRecordCmdSetFragmentShadingRateEnumNV, - InterceptIdPostCallRecordCmdSetFragmentShadingRateEnumNV, - InterceptIdPreCallValidateGetDeviceFaultInfoEXT, - InterceptIdPreCallRecordGetDeviceFaultInfoEXT, - InterceptIdPostCallRecordGetDeviceFaultInfoEXT, - InterceptIdPreCallValidateCmdSetVertexInputEXT, - InterceptIdPreCallRecordCmdSetVertexInputEXT, - InterceptIdPostCallRecordCmdSetVertexInputEXT, - InterceptIdPreCallValidateGetMemoryZirconHandleFUCHSIA, - InterceptIdPreCallRecordGetMemoryZirconHandleFUCHSIA, - InterceptIdPostCallRecordGetMemoryZirconHandleFUCHSIA, - InterceptIdPreCallValidateGetMemoryZirconHandlePropertiesFUCHSIA, - InterceptIdPreCallRecordGetMemoryZirconHandlePropertiesFUCHSIA, - InterceptIdPostCallRecordGetMemoryZirconHandlePropertiesFUCHSIA, - InterceptIdPreCallValidateImportSemaphoreZirconHandleFUCHSIA, - InterceptIdPreCallRecordImportSemaphoreZirconHandleFUCHSIA, - InterceptIdPostCallRecordImportSemaphoreZirconHandleFUCHSIA, - InterceptIdPreCallValidateGetSemaphoreZirconHandleFUCHSIA, - InterceptIdPreCallRecordGetSemaphoreZirconHandleFUCHSIA, - InterceptIdPostCallRecordGetSemaphoreZirconHandleFUCHSIA, - InterceptIdPreCallValidateCreateBufferCollectionFUCHSIA, - InterceptIdPreCallRecordCreateBufferCollectionFUCHSIA, - InterceptIdPostCallRecordCreateBufferCollectionFUCHSIA, - InterceptIdPreCallValidateSetBufferCollectionImageConstraintsFUCHSIA, - InterceptIdPreCallRecordSetBufferCollectionImageConstraintsFUCHSIA, - InterceptIdPostCallRecordSetBufferCollectionImageConstraintsFUCHSIA, - InterceptIdPreCallValidateSetBufferCollectionBufferConstraintsFUCHSIA, - InterceptIdPreCallRecordSetBufferCollectionBufferConstraintsFUCHSIA, - InterceptIdPostCallRecordSetBufferCollectionBufferConstraintsFUCHSIA, - InterceptIdPreCallValidateDestroyBufferCollectionFUCHSIA, - InterceptIdPreCallRecordDestroyBufferCollectionFUCHSIA, - InterceptIdPostCallRecordDestroyBufferCollectionFUCHSIA, - InterceptIdPreCallValidateGetBufferCollectionPropertiesFUCHSIA, - InterceptIdPreCallRecordGetBufferCollectionPropertiesFUCHSIA, - InterceptIdPostCallRecordGetBufferCollectionPropertiesFUCHSIA, - InterceptIdPreCallValidateGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI, - InterceptIdPreCallRecordGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI, - InterceptIdPostCallRecordGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI, - InterceptIdPreCallValidateCmdSubpassShadingHUAWEI, - InterceptIdPreCallRecordCmdSubpassShadingHUAWEI, - InterceptIdPostCallRecordCmdSubpassShadingHUAWEI, - InterceptIdPreCallValidateCmdBindInvocationMaskHUAWEI, - InterceptIdPreCallRecordCmdBindInvocationMaskHUAWEI, - InterceptIdPostCallRecordCmdBindInvocationMaskHUAWEI, - InterceptIdPreCallValidateGetMemoryRemoteAddressNV, - InterceptIdPreCallRecordGetMemoryRemoteAddressNV, - InterceptIdPostCallRecordGetMemoryRemoteAddressNV, - InterceptIdPreCallValidateGetPipelinePropertiesEXT, - InterceptIdPreCallRecordGetPipelinePropertiesEXT, - InterceptIdPostCallRecordGetPipelinePropertiesEXT, - InterceptIdPreCallValidateCmdSetPatchControlPointsEXT, - InterceptIdPreCallRecordCmdSetPatchControlPointsEXT, - InterceptIdPostCallRecordCmdSetPatchControlPointsEXT, - InterceptIdPreCallValidateCmdSetRasterizerDiscardEnableEXT, - InterceptIdPreCallRecordCmdSetRasterizerDiscardEnableEXT, - InterceptIdPostCallRecordCmdSetRasterizerDiscardEnableEXT, - InterceptIdPreCallValidateCmdSetDepthBiasEnableEXT, - InterceptIdPreCallRecordCmdSetDepthBiasEnableEXT, - InterceptIdPostCallRecordCmdSetDepthBiasEnableEXT, - InterceptIdPreCallValidateCmdSetLogicOpEXT, - InterceptIdPreCallRecordCmdSetLogicOpEXT, - InterceptIdPostCallRecordCmdSetLogicOpEXT, - InterceptIdPreCallValidateCmdSetPrimitiveRestartEnableEXT, - InterceptIdPreCallRecordCmdSetPrimitiveRestartEnableEXT, - InterceptIdPostCallRecordCmdSetPrimitiveRestartEnableEXT, - InterceptIdPreCallValidateCmdSetColorWriteEnableEXT, - InterceptIdPreCallRecordCmdSetColorWriteEnableEXT, - InterceptIdPostCallRecordCmdSetColorWriteEnableEXT, - InterceptIdPreCallValidateCmdDrawMultiEXT, - InterceptIdPreCallRecordCmdDrawMultiEXT, - InterceptIdPostCallRecordCmdDrawMultiEXT, - InterceptIdPreCallValidateCmdDrawMultiIndexedEXT, - InterceptIdPreCallRecordCmdDrawMultiIndexedEXT, - InterceptIdPostCallRecordCmdDrawMultiIndexedEXT, - InterceptIdPreCallValidateCreateMicromapEXT, - InterceptIdPreCallRecordCreateMicromapEXT, - InterceptIdPostCallRecordCreateMicromapEXT, - InterceptIdPreCallValidateDestroyMicromapEXT, - InterceptIdPreCallRecordDestroyMicromapEXT, - InterceptIdPostCallRecordDestroyMicromapEXT, - InterceptIdPreCallValidateCmdBuildMicromapsEXT, - InterceptIdPreCallRecordCmdBuildMicromapsEXT, - InterceptIdPostCallRecordCmdBuildMicromapsEXT, - InterceptIdPreCallValidateBuildMicromapsEXT, - InterceptIdPreCallRecordBuildMicromapsEXT, - InterceptIdPostCallRecordBuildMicromapsEXT, - InterceptIdPreCallValidateCopyMicromapEXT, - InterceptIdPreCallRecordCopyMicromapEXT, - InterceptIdPostCallRecordCopyMicromapEXT, - InterceptIdPreCallValidateCopyMicromapToMemoryEXT, - InterceptIdPreCallRecordCopyMicromapToMemoryEXT, - InterceptIdPostCallRecordCopyMicromapToMemoryEXT, - InterceptIdPreCallValidateCopyMemoryToMicromapEXT, - InterceptIdPreCallRecordCopyMemoryToMicromapEXT, - InterceptIdPostCallRecordCopyMemoryToMicromapEXT, - InterceptIdPreCallValidateWriteMicromapsPropertiesEXT, - InterceptIdPreCallRecordWriteMicromapsPropertiesEXT, - InterceptIdPostCallRecordWriteMicromapsPropertiesEXT, - InterceptIdPreCallValidateCmdCopyMicromapEXT, - InterceptIdPreCallRecordCmdCopyMicromapEXT, - InterceptIdPostCallRecordCmdCopyMicromapEXT, - InterceptIdPreCallValidateCmdCopyMicromapToMemoryEXT, - InterceptIdPreCallRecordCmdCopyMicromapToMemoryEXT, - InterceptIdPostCallRecordCmdCopyMicromapToMemoryEXT, - InterceptIdPreCallValidateCmdCopyMemoryToMicromapEXT, - InterceptIdPreCallRecordCmdCopyMemoryToMicromapEXT, - InterceptIdPostCallRecordCmdCopyMemoryToMicromapEXT, - InterceptIdPreCallValidateCmdWriteMicromapsPropertiesEXT, - InterceptIdPreCallRecordCmdWriteMicromapsPropertiesEXT, - InterceptIdPostCallRecordCmdWriteMicromapsPropertiesEXT, - InterceptIdPreCallValidateGetDeviceMicromapCompatibilityEXT, - InterceptIdPreCallRecordGetDeviceMicromapCompatibilityEXT, - InterceptIdPostCallRecordGetDeviceMicromapCompatibilityEXT, - InterceptIdPreCallValidateGetMicromapBuildSizesEXT, - InterceptIdPreCallRecordGetMicromapBuildSizesEXT, - InterceptIdPostCallRecordGetMicromapBuildSizesEXT, - InterceptIdPreCallValidateCmdDrawClusterHUAWEI, - InterceptIdPreCallRecordCmdDrawClusterHUAWEI, - InterceptIdPostCallRecordCmdDrawClusterHUAWEI, - InterceptIdPreCallValidateCmdDrawClusterIndirectHUAWEI, - InterceptIdPreCallRecordCmdDrawClusterIndirectHUAWEI, - InterceptIdPostCallRecordCmdDrawClusterIndirectHUAWEI, - InterceptIdPreCallValidateSetDeviceMemoryPriorityEXT, - InterceptIdPreCallRecordSetDeviceMemoryPriorityEXT, - InterceptIdPostCallRecordSetDeviceMemoryPriorityEXT, - InterceptIdPreCallValidateGetDescriptorSetLayoutHostMappingInfoVALVE, - InterceptIdPreCallRecordGetDescriptorSetLayoutHostMappingInfoVALVE, - InterceptIdPostCallRecordGetDescriptorSetLayoutHostMappingInfoVALVE, - InterceptIdPreCallValidateGetDescriptorSetHostMappingVALVE, - InterceptIdPreCallRecordGetDescriptorSetHostMappingVALVE, - InterceptIdPostCallRecordGetDescriptorSetHostMappingVALVE, - InterceptIdPreCallValidateCmdCopyMemoryIndirectNV, - InterceptIdPreCallRecordCmdCopyMemoryIndirectNV, - InterceptIdPostCallRecordCmdCopyMemoryIndirectNV, - InterceptIdPreCallValidateCmdCopyMemoryToImageIndirectNV, - InterceptIdPreCallRecordCmdCopyMemoryToImageIndirectNV, - InterceptIdPostCallRecordCmdCopyMemoryToImageIndirectNV, - InterceptIdPreCallValidateCmdDecompressMemoryNV, - InterceptIdPreCallRecordCmdDecompressMemoryNV, - InterceptIdPostCallRecordCmdDecompressMemoryNV, - InterceptIdPreCallValidateCmdDecompressMemoryIndirectCountNV, - InterceptIdPreCallRecordCmdDecompressMemoryIndirectCountNV, - InterceptIdPostCallRecordCmdDecompressMemoryIndirectCountNV, - InterceptIdPreCallValidateGetPipelineIndirectMemoryRequirementsNV, - InterceptIdPreCallRecordGetPipelineIndirectMemoryRequirementsNV, - InterceptIdPostCallRecordGetPipelineIndirectMemoryRequirementsNV, - InterceptIdPreCallValidateCmdUpdatePipelineIndirectBufferNV, - InterceptIdPreCallRecordCmdUpdatePipelineIndirectBufferNV, - InterceptIdPostCallRecordCmdUpdatePipelineIndirectBufferNV, - InterceptIdPreCallValidateGetPipelineIndirectDeviceAddressNV, - InterceptIdPreCallRecordGetPipelineIndirectDeviceAddressNV, - InterceptIdPostCallRecordGetPipelineIndirectDeviceAddressNV, - InterceptIdPreCallValidateCmdSetDepthClampEnableEXT, - InterceptIdPreCallRecordCmdSetDepthClampEnableEXT, - InterceptIdPostCallRecordCmdSetDepthClampEnableEXT, - InterceptIdPreCallValidateCmdSetPolygonModeEXT, - InterceptIdPreCallRecordCmdSetPolygonModeEXT, - InterceptIdPostCallRecordCmdSetPolygonModeEXT, - InterceptIdPreCallValidateCmdSetRasterizationSamplesEXT, - InterceptIdPreCallRecordCmdSetRasterizationSamplesEXT, - InterceptIdPostCallRecordCmdSetRasterizationSamplesEXT, - InterceptIdPreCallValidateCmdSetSampleMaskEXT, - InterceptIdPreCallRecordCmdSetSampleMaskEXT, - InterceptIdPostCallRecordCmdSetSampleMaskEXT, - InterceptIdPreCallValidateCmdSetAlphaToCoverageEnableEXT, - InterceptIdPreCallRecordCmdSetAlphaToCoverageEnableEXT, - InterceptIdPostCallRecordCmdSetAlphaToCoverageEnableEXT, - InterceptIdPreCallValidateCmdSetAlphaToOneEnableEXT, - InterceptIdPreCallRecordCmdSetAlphaToOneEnableEXT, - InterceptIdPostCallRecordCmdSetAlphaToOneEnableEXT, - InterceptIdPreCallValidateCmdSetLogicOpEnableEXT, - InterceptIdPreCallRecordCmdSetLogicOpEnableEXT, - InterceptIdPostCallRecordCmdSetLogicOpEnableEXT, - InterceptIdPreCallValidateCmdSetColorBlendEnableEXT, - InterceptIdPreCallRecordCmdSetColorBlendEnableEXT, - InterceptIdPostCallRecordCmdSetColorBlendEnableEXT, - InterceptIdPreCallValidateCmdSetColorBlendEquationEXT, - InterceptIdPreCallRecordCmdSetColorBlendEquationEXT, - InterceptIdPostCallRecordCmdSetColorBlendEquationEXT, - InterceptIdPreCallValidateCmdSetColorWriteMaskEXT, - InterceptIdPreCallRecordCmdSetColorWriteMaskEXT, - InterceptIdPostCallRecordCmdSetColorWriteMaskEXT, - InterceptIdPreCallValidateCmdSetTessellationDomainOriginEXT, - InterceptIdPreCallRecordCmdSetTessellationDomainOriginEXT, - InterceptIdPostCallRecordCmdSetTessellationDomainOriginEXT, - InterceptIdPreCallValidateCmdSetRasterizationStreamEXT, - InterceptIdPreCallRecordCmdSetRasterizationStreamEXT, - InterceptIdPostCallRecordCmdSetRasterizationStreamEXT, - InterceptIdPreCallValidateCmdSetConservativeRasterizationModeEXT, - InterceptIdPreCallRecordCmdSetConservativeRasterizationModeEXT, - InterceptIdPostCallRecordCmdSetConservativeRasterizationModeEXT, - InterceptIdPreCallValidateCmdSetExtraPrimitiveOverestimationSizeEXT, - InterceptIdPreCallRecordCmdSetExtraPrimitiveOverestimationSizeEXT, - InterceptIdPostCallRecordCmdSetExtraPrimitiveOverestimationSizeEXT, - InterceptIdPreCallValidateCmdSetDepthClipEnableEXT, - InterceptIdPreCallRecordCmdSetDepthClipEnableEXT, - InterceptIdPostCallRecordCmdSetDepthClipEnableEXT, - InterceptIdPreCallValidateCmdSetSampleLocationsEnableEXT, - InterceptIdPreCallRecordCmdSetSampleLocationsEnableEXT, - InterceptIdPostCallRecordCmdSetSampleLocationsEnableEXT, - InterceptIdPreCallValidateCmdSetColorBlendAdvancedEXT, - InterceptIdPreCallRecordCmdSetColorBlendAdvancedEXT, - InterceptIdPostCallRecordCmdSetColorBlendAdvancedEXT, - InterceptIdPreCallValidateCmdSetProvokingVertexModeEXT, - InterceptIdPreCallRecordCmdSetProvokingVertexModeEXT, - InterceptIdPostCallRecordCmdSetProvokingVertexModeEXT, - InterceptIdPreCallValidateCmdSetLineRasterizationModeEXT, - InterceptIdPreCallRecordCmdSetLineRasterizationModeEXT, - InterceptIdPostCallRecordCmdSetLineRasterizationModeEXT, - InterceptIdPreCallValidateCmdSetLineStippleEnableEXT, - InterceptIdPreCallRecordCmdSetLineStippleEnableEXT, - InterceptIdPostCallRecordCmdSetLineStippleEnableEXT, - InterceptIdPreCallValidateCmdSetDepthClipNegativeOneToOneEXT, - InterceptIdPreCallRecordCmdSetDepthClipNegativeOneToOneEXT, - InterceptIdPostCallRecordCmdSetDepthClipNegativeOneToOneEXT, - InterceptIdPreCallValidateCmdSetViewportWScalingEnableNV, - InterceptIdPreCallRecordCmdSetViewportWScalingEnableNV, - InterceptIdPostCallRecordCmdSetViewportWScalingEnableNV, - InterceptIdPreCallValidateCmdSetViewportSwizzleNV, - InterceptIdPreCallRecordCmdSetViewportSwizzleNV, - InterceptIdPostCallRecordCmdSetViewportSwizzleNV, - InterceptIdPreCallValidateCmdSetCoverageToColorEnableNV, - InterceptIdPreCallRecordCmdSetCoverageToColorEnableNV, - InterceptIdPostCallRecordCmdSetCoverageToColorEnableNV, - InterceptIdPreCallValidateCmdSetCoverageToColorLocationNV, - InterceptIdPreCallRecordCmdSetCoverageToColorLocationNV, - InterceptIdPostCallRecordCmdSetCoverageToColorLocationNV, - InterceptIdPreCallValidateCmdSetCoverageModulationModeNV, - InterceptIdPreCallRecordCmdSetCoverageModulationModeNV, - InterceptIdPostCallRecordCmdSetCoverageModulationModeNV, - InterceptIdPreCallValidateCmdSetCoverageModulationTableEnableNV, - InterceptIdPreCallRecordCmdSetCoverageModulationTableEnableNV, - InterceptIdPostCallRecordCmdSetCoverageModulationTableEnableNV, - InterceptIdPreCallValidateCmdSetCoverageModulationTableNV, - InterceptIdPreCallRecordCmdSetCoverageModulationTableNV, - InterceptIdPostCallRecordCmdSetCoverageModulationTableNV, - InterceptIdPreCallValidateCmdSetShadingRateImageEnableNV, - InterceptIdPreCallRecordCmdSetShadingRateImageEnableNV, - InterceptIdPostCallRecordCmdSetShadingRateImageEnableNV, - InterceptIdPreCallValidateCmdSetRepresentativeFragmentTestEnableNV, - InterceptIdPreCallRecordCmdSetRepresentativeFragmentTestEnableNV, - InterceptIdPostCallRecordCmdSetRepresentativeFragmentTestEnableNV, - InterceptIdPreCallValidateCmdSetCoverageReductionModeNV, - InterceptIdPreCallRecordCmdSetCoverageReductionModeNV, - InterceptIdPostCallRecordCmdSetCoverageReductionModeNV, - InterceptIdPreCallValidateGetShaderModuleIdentifierEXT, - InterceptIdPreCallRecordGetShaderModuleIdentifierEXT, - InterceptIdPostCallRecordGetShaderModuleIdentifierEXT, - InterceptIdPreCallValidateGetShaderModuleCreateInfoIdentifierEXT, - InterceptIdPreCallRecordGetShaderModuleCreateInfoIdentifierEXT, - InterceptIdPostCallRecordGetShaderModuleCreateInfoIdentifierEXT, - InterceptIdPreCallValidateCreateOpticalFlowSessionNV, - InterceptIdPreCallRecordCreateOpticalFlowSessionNV, - InterceptIdPostCallRecordCreateOpticalFlowSessionNV, - InterceptIdPreCallValidateDestroyOpticalFlowSessionNV, - InterceptIdPreCallRecordDestroyOpticalFlowSessionNV, - InterceptIdPostCallRecordDestroyOpticalFlowSessionNV, - InterceptIdPreCallValidateBindOpticalFlowSessionImageNV, - InterceptIdPreCallRecordBindOpticalFlowSessionImageNV, - InterceptIdPostCallRecordBindOpticalFlowSessionImageNV, - InterceptIdPreCallValidateCmdOpticalFlowExecuteNV, - InterceptIdPreCallRecordCmdOpticalFlowExecuteNV, - InterceptIdPostCallRecordCmdOpticalFlowExecuteNV, - InterceptIdPreCallValidateAntiLagUpdateAMD, - InterceptIdPreCallRecordAntiLagUpdateAMD, - InterceptIdPostCallRecordAntiLagUpdateAMD, - InterceptIdPreCallValidateDestroyShaderEXT, - InterceptIdPreCallRecordDestroyShaderEXT, - InterceptIdPostCallRecordDestroyShaderEXT, - InterceptIdPreCallValidateGetShaderBinaryDataEXT, - InterceptIdPreCallRecordGetShaderBinaryDataEXT, - InterceptIdPostCallRecordGetShaderBinaryDataEXT, - InterceptIdPreCallValidateCmdBindShadersEXT, - InterceptIdPreCallRecordCmdBindShadersEXT, - InterceptIdPostCallRecordCmdBindShadersEXT, - InterceptIdPreCallValidateCmdSetDepthClampRangeEXT, - InterceptIdPreCallRecordCmdSetDepthClampRangeEXT, - InterceptIdPostCallRecordCmdSetDepthClampRangeEXT, - InterceptIdPreCallValidateGetFramebufferTilePropertiesQCOM, - InterceptIdPreCallRecordGetFramebufferTilePropertiesQCOM, - InterceptIdPostCallRecordGetFramebufferTilePropertiesQCOM, - InterceptIdPreCallValidateGetDynamicRenderingTilePropertiesQCOM, - InterceptIdPreCallRecordGetDynamicRenderingTilePropertiesQCOM, - InterceptIdPostCallRecordGetDynamicRenderingTilePropertiesQCOM, - InterceptIdPreCallValidateSetLatencySleepModeNV, - InterceptIdPreCallRecordSetLatencySleepModeNV, - InterceptIdPostCallRecordSetLatencySleepModeNV, - InterceptIdPreCallValidateLatencySleepNV, - InterceptIdPreCallRecordLatencySleepNV, - InterceptIdPostCallRecordLatencySleepNV, - InterceptIdPreCallValidateSetLatencyMarkerNV, - InterceptIdPreCallRecordSetLatencyMarkerNV, - InterceptIdPostCallRecordSetLatencyMarkerNV, - InterceptIdPreCallValidateGetLatencyTimingsNV, - InterceptIdPreCallRecordGetLatencyTimingsNV, - InterceptIdPostCallRecordGetLatencyTimingsNV, - InterceptIdPreCallValidateQueueNotifyOutOfBandNV, - InterceptIdPreCallRecordQueueNotifyOutOfBandNV, - InterceptIdPostCallRecordQueueNotifyOutOfBandNV, - InterceptIdPreCallValidateCmdSetAttachmentFeedbackLoopEnableEXT, - InterceptIdPreCallRecordCmdSetAttachmentFeedbackLoopEnableEXT, - InterceptIdPostCallRecordCmdSetAttachmentFeedbackLoopEnableEXT, - InterceptIdPreCallValidateGetScreenBufferPropertiesQNX, - InterceptIdPreCallRecordGetScreenBufferPropertiesQNX, - InterceptIdPostCallRecordGetScreenBufferPropertiesQNX, - InterceptIdPreCallValidateGetGeneratedCommandsMemoryRequirementsEXT, - InterceptIdPreCallRecordGetGeneratedCommandsMemoryRequirementsEXT, - InterceptIdPostCallRecordGetGeneratedCommandsMemoryRequirementsEXT, - InterceptIdPreCallValidateCmdPreprocessGeneratedCommandsEXT, - InterceptIdPreCallRecordCmdPreprocessGeneratedCommandsEXT, - InterceptIdPostCallRecordCmdPreprocessGeneratedCommandsEXT, - InterceptIdPreCallValidateCmdExecuteGeneratedCommandsEXT, - InterceptIdPreCallRecordCmdExecuteGeneratedCommandsEXT, - InterceptIdPostCallRecordCmdExecuteGeneratedCommandsEXT, - InterceptIdPreCallValidateCreateIndirectCommandsLayoutEXT, - InterceptIdPreCallRecordCreateIndirectCommandsLayoutEXT, - InterceptIdPostCallRecordCreateIndirectCommandsLayoutEXT, - InterceptIdPreCallValidateDestroyIndirectCommandsLayoutEXT, - InterceptIdPreCallRecordDestroyIndirectCommandsLayoutEXT, - InterceptIdPostCallRecordDestroyIndirectCommandsLayoutEXT, - InterceptIdPreCallValidateCreateIndirectExecutionSetEXT, - InterceptIdPreCallRecordCreateIndirectExecutionSetEXT, - InterceptIdPostCallRecordCreateIndirectExecutionSetEXT, - InterceptIdPreCallValidateDestroyIndirectExecutionSetEXT, - InterceptIdPreCallRecordDestroyIndirectExecutionSetEXT, - InterceptIdPostCallRecordDestroyIndirectExecutionSetEXT, - InterceptIdPreCallValidateUpdateIndirectExecutionSetPipelineEXT, - InterceptIdPreCallRecordUpdateIndirectExecutionSetPipelineEXT, - InterceptIdPostCallRecordUpdateIndirectExecutionSetPipelineEXT, - InterceptIdPreCallValidateUpdateIndirectExecutionSetShaderEXT, - InterceptIdPreCallRecordUpdateIndirectExecutionSetShaderEXT, - InterceptIdPostCallRecordUpdateIndirectExecutionSetShaderEXT, - InterceptIdPreCallValidateCreateAccelerationStructureKHR, - InterceptIdPreCallRecordCreateAccelerationStructureKHR, - InterceptIdPostCallRecordCreateAccelerationStructureKHR, - InterceptIdPreCallValidateDestroyAccelerationStructureKHR, - InterceptIdPreCallRecordDestroyAccelerationStructureKHR, - InterceptIdPostCallRecordDestroyAccelerationStructureKHR, - InterceptIdPreCallValidateCmdBuildAccelerationStructuresKHR, - InterceptIdPreCallRecordCmdBuildAccelerationStructuresKHR, - InterceptIdPostCallRecordCmdBuildAccelerationStructuresKHR, - InterceptIdPreCallValidateCmdBuildAccelerationStructuresIndirectKHR, - InterceptIdPreCallRecordCmdBuildAccelerationStructuresIndirectKHR, - InterceptIdPostCallRecordCmdBuildAccelerationStructuresIndirectKHR, - InterceptIdPreCallValidateBuildAccelerationStructuresKHR, - InterceptIdPreCallRecordBuildAccelerationStructuresKHR, - InterceptIdPostCallRecordBuildAccelerationStructuresKHR, - InterceptIdPreCallValidateCopyAccelerationStructureKHR, - InterceptIdPreCallRecordCopyAccelerationStructureKHR, - InterceptIdPostCallRecordCopyAccelerationStructureKHR, - InterceptIdPreCallValidateCopyAccelerationStructureToMemoryKHR, - InterceptIdPreCallRecordCopyAccelerationStructureToMemoryKHR, - InterceptIdPostCallRecordCopyAccelerationStructureToMemoryKHR, - InterceptIdPreCallValidateCopyMemoryToAccelerationStructureKHR, - InterceptIdPreCallRecordCopyMemoryToAccelerationStructureKHR, - InterceptIdPostCallRecordCopyMemoryToAccelerationStructureKHR, - InterceptIdPreCallValidateWriteAccelerationStructuresPropertiesKHR, - InterceptIdPreCallRecordWriteAccelerationStructuresPropertiesKHR, - InterceptIdPostCallRecordWriteAccelerationStructuresPropertiesKHR, - InterceptIdPreCallValidateCmdCopyAccelerationStructureKHR, - InterceptIdPreCallRecordCmdCopyAccelerationStructureKHR, - InterceptIdPostCallRecordCmdCopyAccelerationStructureKHR, - InterceptIdPreCallValidateCmdCopyAccelerationStructureToMemoryKHR, - InterceptIdPreCallRecordCmdCopyAccelerationStructureToMemoryKHR, - InterceptIdPostCallRecordCmdCopyAccelerationStructureToMemoryKHR, - InterceptIdPreCallValidateCmdCopyMemoryToAccelerationStructureKHR, - InterceptIdPreCallRecordCmdCopyMemoryToAccelerationStructureKHR, - InterceptIdPostCallRecordCmdCopyMemoryToAccelerationStructureKHR, - InterceptIdPreCallValidateGetAccelerationStructureDeviceAddressKHR, - InterceptIdPreCallRecordGetAccelerationStructureDeviceAddressKHR, - InterceptIdPostCallRecordGetAccelerationStructureDeviceAddressKHR, - InterceptIdPreCallValidateCmdWriteAccelerationStructuresPropertiesKHR, - InterceptIdPreCallRecordCmdWriteAccelerationStructuresPropertiesKHR, - InterceptIdPostCallRecordCmdWriteAccelerationStructuresPropertiesKHR, - InterceptIdPreCallValidateGetDeviceAccelerationStructureCompatibilityKHR, - InterceptIdPreCallRecordGetDeviceAccelerationStructureCompatibilityKHR, - InterceptIdPostCallRecordGetDeviceAccelerationStructureCompatibilityKHR, - InterceptIdPreCallValidateGetAccelerationStructureBuildSizesKHR, - InterceptIdPreCallRecordGetAccelerationStructureBuildSizesKHR, - InterceptIdPostCallRecordGetAccelerationStructureBuildSizesKHR, - InterceptIdPreCallValidateCmdTraceRaysKHR, - InterceptIdPreCallRecordCmdTraceRaysKHR, - InterceptIdPostCallRecordCmdTraceRaysKHR, - InterceptIdPreCallValidateGetRayTracingCaptureReplayShaderGroupHandlesKHR, - InterceptIdPreCallRecordGetRayTracingCaptureReplayShaderGroupHandlesKHR, - InterceptIdPostCallRecordGetRayTracingCaptureReplayShaderGroupHandlesKHR, - InterceptIdPreCallValidateCmdTraceRaysIndirectKHR, - InterceptIdPreCallRecordCmdTraceRaysIndirectKHR, - InterceptIdPostCallRecordCmdTraceRaysIndirectKHR, - InterceptIdPreCallValidateGetRayTracingShaderGroupStackSizeKHR, - InterceptIdPreCallRecordGetRayTracingShaderGroupStackSizeKHR, - InterceptIdPostCallRecordGetRayTracingShaderGroupStackSizeKHR, - InterceptIdPreCallValidateCmdSetRayTracingPipelineStackSizeKHR, - InterceptIdPreCallRecordCmdSetRayTracingPipelineStackSizeKHR, - InterceptIdPostCallRecordCmdSetRayTracingPipelineStackSizeKHR, - InterceptIdPreCallValidateCmdDrawMeshTasksEXT, - InterceptIdPreCallRecordCmdDrawMeshTasksEXT, - InterceptIdPostCallRecordCmdDrawMeshTasksEXT, - InterceptIdPreCallValidateCmdDrawMeshTasksIndirectEXT, - InterceptIdPreCallRecordCmdDrawMeshTasksIndirectEXT, - InterceptIdPostCallRecordCmdDrawMeshTasksIndirectEXT, - InterceptIdPreCallValidateCmdDrawMeshTasksIndirectCountEXT, - InterceptIdPreCallRecordCmdDrawMeshTasksIndirectCountEXT, - InterceptIdPostCallRecordCmdDrawMeshTasksIndirectCountEXT, - InterceptIdCount, -} InterceptId; +#include "generated/dispatch_vector.h" +#include "chassis/dispatch_object.h" -// clang-format off -void DispatchObject::InitObjectDispatchVectors() { +// Include layer validation object definitions +#include "generated/dispatch_vector.h" +#include "chassis/dispatch_object.h" +#include "thread_tracker/thread_safety_validation.h" +#include "stateless/stateless_validation.h" +#include "object_tracker/object_lifetime_validation.h" +#include "core_checks/core_validation.h" +#include "best_practices/best_practices_validation.h" +#include "gpu/core/gpuav.h" +#include "sync/sync_validation.h" -#define BUILD_DISPATCH_VECTOR(name) \ - init_object_dispatch_vector(InterceptId ## name, \ - typeid(&ValidationObject::name), \ - typeid(&ThreadSafety::name), \ - typeid(&StatelessValidation::name), \ - typeid(&ObjectLifetimes::name), \ - typeid(&CoreChecks::name), \ - typeid(&BestPractices::name), \ - typeid(&gpuav::Validator::name), \ - typeid(&SyncValidator::name)); +void DispatchObject::InitObjectDispatchVectors() { +#define BUILD_DISPATCH_VECTOR(name) \ + init_object_dispatch_vector(InterceptId##name, typeid(&ValidationObject::name), typeid(&ThreadSafety::name), \ + typeid(&StatelessValidation::name), typeid(&ObjectLifetimes::name), typeid(&CoreChecks::name), \ + typeid(&BestPractices::name), typeid(&gpuav::Validator::name), typeid(&SyncValidator::name)); - auto init_object_dispatch_vector = [this](InterceptId id, - const std::type_info& vo_typeid, - const std::type_info& tt_typeid, - const std::type_info& tpv_typeid, - const std::type_info& tot_typeid, - const std::type_info& tcv_typeid, - const std::type_info& tbp_typeid, - const std::type_info& tga_typeid, - const std::type_info& tsv_typeid) { + auto init_object_dispatch_vector = [this](InterceptId id, const std::type_info& vo_typeid, const std::type_info& tt_typeid, + const std::type_info& tpv_typeid, const std::type_info& tot_typeid, + const std::type_info& tcv_typeid, const std::type_info& tbp_typeid, + const std::type_info& tga_typeid, const std::type_info& tsv_typeid) { for (auto item : this->object_dispatch) { auto intercept_vector = &this->intercept_vectors[id]; switch (item->container_type) { - case LayerObjectTypeThreading: - if (tt_typeid != vo_typeid) intercept_vector->push_back(item); - break; - case LayerObjectTypeParameterValidation: - if (tpv_typeid != vo_typeid) intercept_vector->push_back(item); - break; - case LayerObjectTypeObjectTracker: - if (tot_typeid != vo_typeid) intercept_vector->push_back(item); - break; - case LayerObjectTypeCoreValidation: - if (tcv_typeid != vo_typeid) intercept_vector->push_back(item); - break; - case LayerObjectTypeBestPractices: - if (tbp_typeid != vo_typeid) intercept_vector->push_back(item); - break; - case LayerObjectTypeGpuAssisted: - if (tga_typeid != vo_typeid) intercept_vector->push_back(item); - break; - case LayerObjectTypeSyncValidation: - if (tsv_typeid != vo_typeid) intercept_vector->push_back(item); - break; - default: - /* Chassis codegen needs to be updated for unknown validation object type */ - assert(0); + case LayerObjectTypeThreading: + if (tt_typeid != vo_typeid) intercept_vector->push_back(item); + break; + case LayerObjectTypeParameterValidation: + if (tpv_typeid != vo_typeid) intercept_vector->push_back(item); + break; + case LayerObjectTypeObjectTracker: + if (tot_typeid != vo_typeid) intercept_vector->push_back(item); + break; + case LayerObjectTypeCoreValidation: + if (tcv_typeid != vo_typeid) intercept_vector->push_back(item); + break; + case LayerObjectTypeBestPractices: + if (tbp_typeid != vo_typeid) intercept_vector->push_back(item); + break; + case LayerObjectTypeGpuAssisted: + if (tga_typeid != vo_typeid) intercept_vector->push_back(item); + break; + case LayerObjectTypeSyncValidation: + if (tsv_typeid != vo_typeid) intercept_vector->push_back(item); + break; + default: + /* Chassis codegen needs to be updated for unknown validation object type */ + assert(0); } } }; - // clang-format on intercept_vectors.resize(InterceptIdCount); BUILD_DISPATCH_VECTOR(PreCallValidateGetDeviceQueue); diff --git a/layers/vulkan/generated/dispatch_vector.h b/layers/vulkan/generated/dispatch_vector.h new file mode 100644 index 00000000000..0c10cacd28f --- /dev/null +++ b/layers/vulkan/generated/dispatch_vector.h @@ -0,0 +1,1763 @@ +// *** THIS FILE IS GENERATED - DO NOT EDIT *** +// See dispatch_vector_generator.py for modifications + +/*************************************************************************** + * + * Copyright (c) 2015-2024 The Khronos Group Inc. + * Copyright (c) 2015-2024 Valve Corporation + * Copyright (c) 2015-2024 LunarG, Inc. + * Copyright (c) 2015-2024 Google Inc. + * Copyright (c) 2023-2024 RasterGrid Kft. + * + * 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. + ****************************************************************************/ + +// NOLINTBEGIN + +#pragma once + +// This source code creates dispatch vectors for each chassis api intercept, +// i.e., PreCallValidateFoo, PreCallRecordFoo, PostCallRecordFoo, etc., ensuring that +// each vector contains only the validation objects that override that particular base +// class virtual function. Preventing non-overridden calls from reaching the default +// functions saved about 5% in multithreaded applications. + +typedef enum InterceptId { + InterceptIdPreCallValidateGetDeviceQueue, + InterceptIdPreCallRecordGetDeviceQueue, + InterceptIdPostCallRecordGetDeviceQueue, + InterceptIdPreCallValidateQueueSubmit, + InterceptIdPreCallRecordQueueSubmit, + InterceptIdPostCallRecordQueueSubmit, + InterceptIdPreCallValidateQueueWaitIdle, + InterceptIdPreCallRecordQueueWaitIdle, + InterceptIdPostCallRecordQueueWaitIdle, + InterceptIdPreCallValidateDeviceWaitIdle, + InterceptIdPreCallRecordDeviceWaitIdle, + InterceptIdPostCallRecordDeviceWaitIdle, + InterceptIdPreCallValidateAllocateMemory, + InterceptIdPreCallRecordAllocateMemory, + InterceptIdPostCallRecordAllocateMemory, + InterceptIdPreCallValidateFreeMemory, + InterceptIdPreCallRecordFreeMemory, + InterceptIdPostCallRecordFreeMemory, + InterceptIdPreCallValidateMapMemory, + InterceptIdPreCallRecordMapMemory, + InterceptIdPostCallRecordMapMemory, + InterceptIdPreCallValidateUnmapMemory, + InterceptIdPreCallRecordUnmapMemory, + InterceptIdPostCallRecordUnmapMemory, + InterceptIdPreCallValidateFlushMappedMemoryRanges, + InterceptIdPreCallRecordFlushMappedMemoryRanges, + InterceptIdPostCallRecordFlushMappedMemoryRanges, + InterceptIdPreCallValidateInvalidateMappedMemoryRanges, + InterceptIdPreCallRecordInvalidateMappedMemoryRanges, + InterceptIdPostCallRecordInvalidateMappedMemoryRanges, + InterceptIdPreCallValidateGetDeviceMemoryCommitment, + InterceptIdPreCallRecordGetDeviceMemoryCommitment, + InterceptIdPostCallRecordGetDeviceMemoryCommitment, + InterceptIdPreCallValidateBindBufferMemory, + InterceptIdPreCallRecordBindBufferMemory, + InterceptIdPostCallRecordBindBufferMemory, + InterceptIdPreCallValidateBindImageMemory, + InterceptIdPreCallRecordBindImageMemory, + InterceptIdPostCallRecordBindImageMemory, + InterceptIdPreCallValidateGetBufferMemoryRequirements, + InterceptIdPreCallRecordGetBufferMemoryRequirements, + InterceptIdPostCallRecordGetBufferMemoryRequirements, + InterceptIdPreCallValidateGetImageMemoryRequirements, + InterceptIdPreCallRecordGetImageMemoryRequirements, + InterceptIdPostCallRecordGetImageMemoryRequirements, + InterceptIdPreCallValidateGetImageSparseMemoryRequirements, + InterceptIdPreCallRecordGetImageSparseMemoryRequirements, + InterceptIdPostCallRecordGetImageSparseMemoryRequirements, + InterceptIdPreCallValidateQueueBindSparse, + InterceptIdPreCallRecordQueueBindSparse, + InterceptIdPostCallRecordQueueBindSparse, + InterceptIdPreCallValidateCreateFence, + InterceptIdPreCallRecordCreateFence, + InterceptIdPostCallRecordCreateFence, + InterceptIdPreCallValidateDestroyFence, + InterceptIdPreCallRecordDestroyFence, + InterceptIdPostCallRecordDestroyFence, + InterceptIdPreCallValidateResetFences, + InterceptIdPreCallRecordResetFences, + InterceptIdPostCallRecordResetFences, + InterceptIdPreCallValidateGetFenceStatus, + InterceptIdPreCallRecordGetFenceStatus, + InterceptIdPostCallRecordGetFenceStatus, + InterceptIdPreCallValidateWaitForFences, + InterceptIdPreCallRecordWaitForFences, + InterceptIdPostCallRecordWaitForFences, + InterceptIdPreCallValidateCreateSemaphore, + InterceptIdPreCallRecordCreateSemaphore, + InterceptIdPostCallRecordCreateSemaphore, + InterceptIdPreCallValidateDestroySemaphore, + InterceptIdPreCallRecordDestroySemaphore, + InterceptIdPostCallRecordDestroySemaphore, + InterceptIdPreCallValidateCreateEvent, + InterceptIdPreCallRecordCreateEvent, + InterceptIdPostCallRecordCreateEvent, + InterceptIdPreCallValidateDestroyEvent, + InterceptIdPreCallRecordDestroyEvent, + InterceptIdPostCallRecordDestroyEvent, + InterceptIdPreCallValidateGetEventStatus, + InterceptIdPreCallRecordGetEventStatus, + InterceptIdPostCallRecordGetEventStatus, + InterceptIdPreCallValidateSetEvent, + InterceptIdPreCallRecordSetEvent, + InterceptIdPostCallRecordSetEvent, + InterceptIdPreCallValidateResetEvent, + InterceptIdPreCallRecordResetEvent, + InterceptIdPostCallRecordResetEvent, + InterceptIdPreCallValidateCreateQueryPool, + InterceptIdPreCallRecordCreateQueryPool, + InterceptIdPostCallRecordCreateQueryPool, + InterceptIdPreCallValidateDestroyQueryPool, + InterceptIdPreCallRecordDestroyQueryPool, + InterceptIdPostCallRecordDestroyQueryPool, + InterceptIdPreCallValidateGetQueryPoolResults, + InterceptIdPreCallRecordGetQueryPoolResults, + InterceptIdPostCallRecordGetQueryPoolResults, + InterceptIdPreCallValidateCreateBuffer, + InterceptIdPostCallRecordCreateBuffer, + InterceptIdPreCallValidateDestroyBuffer, + InterceptIdPreCallRecordDestroyBuffer, + InterceptIdPostCallRecordDestroyBuffer, + InterceptIdPreCallValidateCreateBufferView, + InterceptIdPreCallRecordCreateBufferView, + InterceptIdPostCallRecordCreateBufferView, + InterceptIdPreCallValidateDestroyBufferView, + InterceptIdPreCallRecordDestroyBufferView, + InterceptIdPostCallRecordDestroyBufferView, + InterceptIdPreCallValidateCreateImage, + InterceptIdPreCallRecordCreateImage, + InterceptIdPostCallRecordCreateImage, + InterceptIdPreCallValidateDestroyImage, + InterceptIdPreCallRecordDestroyImage, + InterceptIdPostCallRecordDestroyImage, + InterceptIdPreCallValidateGetImageSubresourceLayout, + InterceptIdPreCallRecordGetImageSubresourceLayout, + InterceptIdPostCallRecordGetImageSubresourceLayout, + InterceptIdPreCallValidateCreateImageView, + InterceptIdPreCallRecordCreateImageView, + InterceptIdPostCallRecordCreateImageView, + InterceptIdPreCallValidateDestroyImageView, + InterceptIdPreCallRecordDestroyImageView, + InterceptIdPostCallRecordDestroyImageView, + InterceptIdPreCallValidateDestroyShaderModule, + InterceptIdPreCallRecordDestroyShaderModule, + InterceptIdPostCallRecordDestroyShaderModule, + InterceptIdPreCallValidateCreatePipelineCache, + InterceptIdPreCallRecordCreatePipelineCache, + InterceptIdPostCallRecordCreatePipelineCache, + InterceptIdPreCallValidateDestroyPipelineCache, + InterceptIdPreCallRecordDestroyPipelineCache, + InterceptIdPostCallRecordDestroyPipelineCache, + InterceptIdPreCallValidateGetPipelineCacheData, + InterceptIdPreCallRecordGetPipelineCacheData, + InterceptIdPostCallRecordGetPipelineCacheData, + InterceptIdPreCallValidateMergePipelineCaches, + InterceptIdPreCallRecordMergePipelineCaches, + InterceptIdPostCallRecordMergePipelineCaches, + InterceptIdPreCallValidateDestroyPipeline, + InterceptIdPreCallRecordDestroyPipeline, + InterceptIdPostCallRecordDestroyPipeline, + InterceptIdPreCallValidateCreatePipelineLayout, + InterceptIdPostCallRecordCreatePipelineLayout, + InterceptIdPreCallValidateDestroyPipelineLayout, + InterceptIdPreCallRecordDestroyPipelineLayout, + InterceptIdPostCallRecordDestroyPipelineLayout, + InterceptIdPreCallValidateCreateSampler, + InterceptIdPreCallRecordCreateSampler, + InterceptIdPostCallRecordCreateSampler, + InterceptIdPreCallValidateDestroySampler, + InterceptIdPreCallRecordDestroySampler, + InterceptIdPostCallRecordDestroySampler, + InterceptIdPreCallValidateCreateDescriptorSetLayout, + InterceptIdPreCallRecordCreateDescriptorSetLayout, + InterceptIdPostCallRecordCreateDescriptorSetLayout, + InterceptIdPreCallValidateDestroyDescriptorSetLayout, + InterceptIdPreCallRecordDestroyDescriptorSetLayout, + InterceptIdPostCallRecordDestroyDescriptorSetLayout, + InterceptIdPreCallValidateCreateDescriptorPool, + InterceptIdPreCallRecordCreateDescriptorPool, + InterceptIdPostCallRecordCreateDescriptorPool, + InterceptIdPreCallValidateDestroyDescriptorPool, + InterceptIdPreCallRecordDestroyDescriptorPool, + InterceptIdPostCallRecordDestroyDescriptorPool, + InterceptIdPreCallValidateResetDescriptorPool, + InterceptIdPreCallRecordResetDescriptorPool, + InterceptIdPostCallRecordResetDescriptorPool, + InterceptIdPreCallRecordAllocateDescriptorSets, + InterceptIdPreCallValidateFreeDescriptorSets, + InterceptIdPreCallRecordFreeDescriptorSets, + InterceptIdPostCallRecordFreeDescriptorSets, + InterceptIdPreCallValidateUpdateDescriptorSets, + InterceptIdPreCallRecordUpdateDescriptorSets, + InterceptIdPostCallRecordUpdateDescriptorSets, + InterceptIdPreCallValidateCreateFramebuffer, + InterceptIdPreCallRecordCreateFramebuffer, + InterceptIdPostCallRecordCreateFramebuffer, + InterceptIdPreCallValidateDestroyFramebuffer, + InterceptIdPreCallRecordDestroyFramebuffer, + InterceptIdPostCallRecordDestroyFramebuffer, + InterceptIdPreCallValidateCreateRenderPass, + InterceptIdPreCallRecordCreateRenderPass, + InterceptIdPostCallRecordCreateRenderPass, + InterceptIdPreCallValidateDestroyRenderPass, + InterceptIdPreCallRecordDestroyRenderPass, + InterceptIdPostCallRecordDestroyRenderPass, + InterceptIdPreCallValidateGetRenderAreaGranularity, + InterceptIdPreCallRecordGetRenderAreaGranularity, + InterceptIdPostCallRecordGetRenderAreaGranularity, + InterceptIdPreCallValidateCreateCommandPool, + InterceptIdPreCallRecordCreateCommandPool, + InterceptIdPostCallRecordCreateCommandPool, + InterceptIdPreCallValidateDestroyCommandPool, + InterceptIdPreCallRecordDestroyCommandPool, + InterceptIdPostCallRecordDestroyCommandPool, + InterceptIdPreCallValidateResetCommandPool, + InterceptIdPreCallRecordResetCommandPool, + InterceptIdPostCallRecordResetCommandPool, + InterceptIdPreCallValidateAllocateCommandBuffers, + InterceptIdPreCallRecordAllocateCommandBuffers, + InterceptIdPostCallRecordAllocateCommandBuffers, + InterceptIdPreCallValidateFreeCommandBuffers, + InterceptIdPreCallRecordFreeCommandBuffers, + InterceptIdPostCallRecordFreeCommandBuffers, + InterceptIdPreCallValidateBeginCommandBuffer, + InterceptIdPreCallRecordBeginCommandBuffer, + InterceptIdPostCallRecordBeginCommandBuffer, + InterceptIdPreCallValidateEndCommandBuffer, + InterceptIdPreCallRecordEndCommandBuffer, + InterceptIdPostCallRecordEndCommandBuffer, + InterceptIdPreCallValidateResetCommandBuffer, + InterceptIdPreCallRecordResetCommandBuffer, + InterceptIdPostCallRecordResetCommandBuffer, + InterceptIdPreCallValidateCmdBindPipeline, + InterceptIdPreCallRecordCmdBindPipeline, + InterceptIdPostCallRecordCmdBindPipeline, + InterceptIdPreCallValidateCmdSetViewport, + InterceptIdPreCallRecordCmdSetViewport, + InterceptIdPostCallRecordCmdSetViewport, + InterceptIdPreCallValidateCmdSetScissor, + InterceptIdPreCallRecordCmdSetScissor, + InterceptIdPostCallRecordCmdSetScissor, + InterceptIdPreCallValidateCmdSetLineWidth, + InterceptIdPreCallRecordCmdSetLineWidth, + InterceptIdPostCallRecordCmdSetLineWidth, + InterceptIdPreCallValidateCmdSetDepthBias, + InterceptIdPreCallRecordCmdSetDepthBias, + InterceptIdPostCallRecordCmdSetDepthBias, + InterceptIdPreCallValidateCmdSetBlendConstants, + InterceptIdPreCallRecordCmdSetBlendConstants, + InterceptIdPostCallRecordCmdSetBlendConstants, + InterceptIdPreCallValidateCmdSetDepthBounds, + InterceptIdPreCallRecordCmdSetDepthBounds, + InterceptIdPostCallRecordCmdSetDepthBounds, + InterceptIdPreCallValidateCmdSetStencilCompareMask, + InterceptIdPreCallRecordCmdSetStencilCompareMask, + InterceptIdPostCallRecordCmdSetStencilCompareMask, + InterceptIdPreCallValidateCmdSetStencilWriteMask, + InterceptIdPreCallRecordCmdSetStencilWriteMask, + InterceptIdPostCallRecordCmdSetStencilWriteMask, + InterceptIdPreCallValidateCmdSetStencilReference, + InterceptIdPreCallRecordCmdSetStencilReference, + InterceptIdPostCallRecordCmdSetStencilReference, + InterceptIdPreCallValidateCmdBindDescriptorSets, + InterceptIdPreCallRecordCmdBindDescriptorSets, + InterceptIdPostCallRecordCmdBindDescriptorSets, + InterceptIdPreCallValidateCmdBindIndexBuffer, + InterceptIdPreCallRecordCmdBindIndexBuffer, + InterceptIdPostCallRecordCmdBindIndexBuffer, + InterceptIdPreCallValidateCmdBindVertexBuffers, + InterceptIdPreCallRecordCmdBindVertexBuffers, + InterceptIdPostCallRecordCmdBindVertexBuffers, + InterceptIdPreCallValidateCmdDraw, + InterceptIdPreCallRecordCmdDraw, + InterceptIdPostCallRecordCmdDraw, + InterceptIdPreCallValidateCmdDrawIndexed, + InterceptIdPreCallRecordCmdDrawIndexed, + InterceptIdPostCallRecordCmdDrawIndexed, + InterceptIdPreCallValidateCmdDrawIndirect, + InterceptIdPreCallRecordCmdDrawIndirect, + InterceptIdPostCallRecordCmdDrawIndirect, + InterceptIdPreCallValidateCmdDrawIndexedIndirect, + InterceptIdPreCallRecordCmdDrawIndexedIndirect, + InterceptIdPostCallRecordCmdDrawIndexedIndirect, + InterceptIdPreCallValidateCmdDispatch, + InterceptIdPreCallRecordCmdDispatch, + InterceptIdPostCallRecordCmdDispatch, + InterceptIdPreCallValidateCmdDispatchIndirect, + InterceptIdPreCallRecordCmdDispatchIndirect, + InterceptIdPostCallRecordCmdDispatchIndirect, + InterceptIdPreCallValidateCmdCopyBuffer, + InterceptIdPreCallRecordCmdCopyBuffer, + InterceptIdPostCallRecordCmdCopyBuffer, + InterceptIdPreCallValidateCmdCopyImage, + InterceptIdPreCallRecordCmdCopyImage, + InterceptIdPostCallRecordCmdCopyImage, + InterceptIdPreCallValidateCmdBlitImage, + InterceptIdPreCallRecordCmdBlitImage, + InterceptIdPostCallRecordCmdBlitImage, + InterceptIdPreCallValidateCmdCopyBufferToImage, + InterceptIdPreCallRecordCmdCopyBufferToImage, + InterceptIdPostCallRecordCmdCopyBufferToImage, + InterceptIdPreCallValidateCmdCopyImageToBuffer, + InterceptIdPreCallRecordCmdCopyImageToBuffer, + InterceptIdPostCallRecordCmdCopyImageToBuffer, + InterceptIdPreCallValidateCmdUpdateBuffer, + InterceptIdPreCallRecordCmdUpdateBuffer, + InterceptIdPostCallRecordCmdUpdateBuffer, + InterceptIdPreCallValidateCmdFillBuffer, + InterceptIdPreCallRecordCmdFillBuffer, + InterceptIdPostCallRecordCmdFillBuffer, + InterceptIdPreCallValidateCmdClearColorImage, + InterceptIdPreCallRecordCmdClearColorImage, + InterceptIdPostCallRecordCmdClearColorImage, + InterceptIdPreCallValidateCmdClearDepthStencilImage, + InterceptIdPreCallRecordCmdClearDepthStencilImage, + InterceptIdPostCallRecordCmdClearDepthStencilImage, + InterceptIdPreCallValidateCmdClearAttachments, + InterceptIdPreCallRecordCmdClearAttachments, + InterceptIdPostCallRecordCmdClearAttachments, + InterceptIdPreCallValidateCmdResolveImage, + InterceptIdPreCallRecordCmdResolveImage, + InterceptIdPostCallRecordCmdResolveImage, + InterceptIdPreCallValidateCmdSetEvent, + InterceptIdPreCallRecordCmdSetEvent, + InterceptIdPostCallRecordCmdSetEvent, + InterceptIdPreCallValidateCmdResetEvent, + InterceptIdPreCallRecordCmdResetEvent, + InterceptIdPostCallRecordCmdResetEvent, + InterceptIdPreCallValidateCmdWaitEvents, + InterceptIdPreCallRecordCmdWaitEvents, + InterceptIdPostCallRecordCmdWaitEvents, + InterceptIdPreCallValidateCmdPipelineBarrier, + InterceptIdPreCallRecordCmdPipelineBarrier, + InterceptIdPostCallRecordCmdPipelineBarrier, + InterceptIdPreCallValidateCmdBeginQuery, + InterceptIdPreCallRecordCmdBeginQuery, + InterceptIdPostCallRecordCmdBeginQuery, + InterceptIdPreCallValidateCmdEndQuery, + InterceptIdPreCallRecordCmdEndQuery, + InterceptIdPostCallRecordCmdEndQuery, + InterceptIdPreCallValidateCmdResetQueryPool, + InterceptIdPreCallRecordCmdResetQueryPool, + InterceptIdPostCallRecordCmdResetQueryPool, + InterceptIdPreCallValidateCmdWriteTimestamp, + InterceptIdPreCallRecordCmdWriteTimestamp, + InterceptIdPostCallRecordCmdWriteTimestamp, + InterceptIdPreCallValidateCmdCopyQueryPoolResults, + InterceptIdPreCallRecordCmdCopyQueryPoolResults, + InterceptIdPostCallRecordCmdCopyQueryPoolResults, + InterceptIdPreCallValidateCmdPushConstants, + InterceptIdPreCallRecordCmdPushConstants, + InterceptIdPostCallRecordCmdPushConstants, + InterceptIdPreCallValidateCmdBeginRenderPass, + InterceptIdPreCallRecordCmdBeginRenderPass, + InterceptIdPostCallRecordCmdBeginRenderPass, + InterceptIdPreCallValidateCmdNextSubpass, + InterceptIdPreCallRecordCmdNextSubpass, + InterceptIdPostCallRecordCmdNextSubpass, + InterceptIdPreCallValidateCmdEndRenderPass, + InterceptIdPreCallRecordCmdEndRenderPass, + InterceptIdPostCallRecordCmdEndRenderPass, + InterceptIdPreCallValidateCmdExecuteCommands, + InterceptIdPreCallRecordCmdExecuteCommands, + InterceptIdPostCallRecordCmdExecuteCommands, + InterceptIdPreCallValidateBindBufferMemory2, + InterceptIdPreCallRecordBindBufferMemory2, + InterceptIdPostCallRecordBindBufferMemory2, + InterceptIdPreCallValidateBindImageMemory2, + InterceptIdPreCallRecordBindImageMemory2, + InterceptIdPostCallRecordBindImageMemory2, + InterceptIdPreCallValidateGetDeviceGroupPeerMemoryFeatures, + InterceptIdPreCallRecordGetDeviceGroupPeerMemoryFeatures, + InterceptIdPostCallRecordGetDeviceGroupPeerMemoryFeatures, + InterceptIdPreCallValidateCmdSetDeviceMask, + InterceptIdPreCallRecordCmdSetDeviceMask, + InterceptIdPostCallRecordCmdSetDeviceMask, + InterceptIdPreCallValidateCmdDispatchBase, + InterceptIdPreCallRecordCmdDispatchBase, + InterceptIdPostCallRecordCmdDispatchBase, + InterceptIdPreCallValidateGetImageMemoryRequirements2, + InterceptIdPreCallRecordGetImageMemoryRequirements2, + InterceptIdPostCallRecordGetImageMemoryRequirements2, + InterceptIdPreCallValidateGetBufferMemoryRequirements2, + InterceptIdPreCallRecordGetBufferMemoryRequirements2, + InterceptIdPostCallRecordGetBufferMemoryRequirements2, + InterceptIdPreCallValidateGetImageSparseMemoryRequirements2, + InterceptIdPreCallRecordGetImageSparseMemoryRequirements2, + InterceptIdPostCallRecordGetImageSparseMemoryRequirements2, + InterceptIdPreCallValidateTrimCommandPool, + InterceptIdPreCallRecordTrimCommandPool, + InterceptIdPostCallRecordTrimCommandPool, + InterceptIdPreCallValidateGetDeviceQueue2, + InterceptIdPreCallRecordGetDeviceQueue2, + InterceptIdPostCallRecordGetDeviceQueue2, + InterceptIdPreCallValidateCreateSamplerYcbcrConversion, + InterceptIdPreCallRecordCreateSamplerYcbcrConversion, + InterceptIdPostCallRecordCreateSamplerYcbcrConversion, + InterceptIdPreCallValidateDestroySamplerYcbcrConversion, + InterceptIdPreCallRecordDestroySamplerYcbcrConversion, + InterceptIdPostCallRecordDestroySamplerYcbcrConversion, + InterceptIdPreCallValidateCreateDescriptorUpdateTemplate, + InterceptIdPreCallRecordCreateDescriptorUpdateTemplate, + InterceptIdPostCallRecordCreateDescriptorUpdateTemplate, + InterceptIdPreCallValidateDestroyDescriptorUpdateTemplate, + InterceptIdPreCallRecordDestroyDescriptorUpdateTemplate, + InterceptIdPostCallRecordDestroyDescriptorUpdateTemplate, + InterceptIdPreCallValidateUpdateDescriptorSetWithTemplate, + InterceptIdPreCallRecordUpdateDescriptorSetWithTemplate, + InterceptIdPostCallRecordUpdateDescriptorSetWithTemplate, + InterceptIdPreCallValidateGetDescriptorSetLayoutSupport, + InterceptIdPreCallRecordGetDescriptorSetLayoutSupport, + InterceptIdPostCallRecordGetDescriptorSetLayoutSupport, + InterceptIdPreCallValidateCmdDrawIndirectCount, + InterceptIdPreCallRecordCmdDrawIndirectCount, + InterceptIdPostCallRecordCmdDrawIndirectCount, + InterceptIdPreCallValidateCmdDrawIndexedIndirectCount, + InterceptIdPreCallRecordCmdDrawIndexedIndirectCount, + InterceptIdPostCallRecordCmdDrawIndexedIndirectCount, + InterceptIdPreCallValidateCreateRenderPass2, + InterceptIdPreCallRecordCreateRenderPass2, + InterceptIdPostCallRecordCreateRenderPass2, + InterceptIdPreCallValidateCmdBeginRenderPass2, + InterceptIdPreCallRecordCmdBeginRenderPass2, + InterceptIdPostCallRecordCmdBeginRenderPass2, + InterceptIdPreCallValidateCmdNextSubpass2, + InterceptIdPreCallRecordCmdNextSubpass2, + InterceptIdPostCallRecordCmdNextSubpass2, + InterceptIdPreCallValidateCmdEndRenderPass2, + InterceptIdPreCallRecordCmdEndRenderPass2, + InterceptIdPostCallRecordCmdEndRenderPass2, + InterceptIdPreCallValidateResetQueryPool, + InterceptIdPreCallRecordResetQueryPool, + InterceptIdPostCallRecordResetQueryPool, + InterceptIdPreCallValidateGetSemaphoreCounterValue, + InterceptIdPreCallRecordGetSemaphoreCounterValue, + InterceptIdPostCallRecordGetSemaphoreCounterValue, + InterceptIdPreCallValidateWaitSemaphores, + InterceptIdPreCallRecordWaitSemaphores, + InterceptIdPostCallRecordWaitSemaphores, + InterceptIdPreCallValidateSignalSemaphore, + InterceptIdPreCallRecordSignalSemaphore, + InterceptIdPostCallRecordSignalSemaphore, + InterceptIdPreCallValidateGetBufferDeviceAddress, + InterceptIdPreCallRecordGetBufferDeviceAddress, + InterceptIdPostCallRecordGetBufferDeviceAddress, + InterceptIdPreCallValidateGetBufferOpaqueCaptureAddress, + InterceptIdPreCallRecordGetBufferOpaqueCaptureAddress, + InterceptIdPostCallRecordGetBufferOpaqueCaptureAddress, + InterceptIdPreCallValidateGetDeviceMemoryOpaqueCaptureAddress, + InterceptIdPreCallRecordGetDeviceMemoryOpaqueCaptureAddress, + InterceptIdPostCallRecordGetDeviceMemoryOpaqueCaptureAddress, + InterceptIdPreCallValidateCreatePrivateDataSlot, + InterceptIdPreCallRecordCreatePrivateDataSlot, + InterceptIdPostCallRecordCreatePrivateDataSlot, + InterceptIdPreCallValidateDestroyPrivateDataSlot, + InterceptIdPreCallRecordDestroyPrivateDataSlot, + InterceptIdPostCallRecordDestroyPrivateDataSlot, + InterceptIdPreCallValidateSetPrivateData, + InterceptIdPreCallRecordSetPrivateData, + InterceptIdPostCallRecordSetPrivateData, + InterceptIdPreCallValidateGetPrivateData, + InterceptIdPreCallRecordGetPrivateData, + InterceptIdPostCallRecordGetPrivateData, + InterceptIdPreCallValidateCmdSetEvent2, + InterceptIdPreCallRecordCmdSetEvent2, + InterceptIdPostCallRecordCmdSetEvent2, + InterceptIdPreCallValidateCmdResetEvent2, + InterceptIdPreCallRecordCmdResetEvent2, + InterceptIdPostCallRecordCmdResetEvent2, + InterceptIdPreCallValidateCmdWaitEvents2, + InterceptIdPreCallRecordCmdWaitEvents2, + InterceptIdPostCallRecordCmdWaitEvents2, + InterceptIdPreCallValidateCmdPipelineBarrier2, + InterceptIdPreCallRecordCmdPipelineBarrier2, + InterceptIdPostCallRecordCmdPipelineBarrier2, + InterceptIdPreCallValidateCmdWriteTimestamp2, + InterceptIdPreCallRecordCmdWriteTimestamp2, + InterceptIdPostCallRecordCmdWriteTimestamp2, + InterceptIdPreCallValidateQueueSubmit2, + InterceptIdPreCallRecordQueueSubmit2, + InterceptIdPostCallRecordQueueSubmit2, + InterceptIdPreCallValidateCmdCopyBuffer2, + InterceptIdPreCallRecordCmdCopyBuffer2, + InterceptIdPostCallRecordCmdCopyBuffer2, + InterceptIdPreCallValidateCmdCopyImage2, + InterceptIdPreCallRecordCmdCopyImage2, + InterceptIdPostCallRecordCmdCopyImage2, + InterceptIdPreCallValidateCmdCopyBufferToImage2, + InterceptIdPreCallRecordCmdCopyBufferToImage2, + InterceptIdPostCallRecordCmdCopyBufferToImage2, + InterceptIdPreCallValidateCmdCopyImageToBuffer2, + InterceptIdPreCallRecordCmdCopyImageToBuffer2, + InterceptIdPostCallRecordCmdCopyImageToBuffer2, + InterceptIdPreCallValidateCmdBlitImage2, + InterceptIdPreCallRecordCmdBlitImage2, + InterceptIdPostCallRecordCmdBlitImage2, + InterceptIdPreCallValidateCmdResolveImage2, + InterceptIdPreCallRecordCmdResolveImage2, + InterceptIdPostCallRecordCmdResolveImage2, + InterceptIdPreCallValidateCmdBeginRendering, + InterceptIdPreCallRecordCmdBeginRendering, + InterceptIdPostCallRecordCmdBeginRendering, + InterceptIdPreCallValidateCmdEndRendering, + InterceptIdPreCallRecordCmdEndRendering, + InterceptIdPostCallRecordCmdEndRendering, + InterceptIdPreCallValidateCmdSetCullMode, + InterceptIdPreCallRecordCmdSetCullMode, + InterceptIdPostCallRecordCmdSetCullMode, + InterceptIdPreCallValidateCmdSetFrontFace, + InterceptIdPreCallRecordCmdSetFrontFace, + InterceptIdPostCallRecordCmdSetFrontFace, + InterceptIdPreCallValidateCmdSetPrimitiveTopology, + InterceptIdPreCallRecordCmdSetPrimitiveTopology, + InterceptIdPostCallRecordCmdSetPrimitiveTopology, + InterceptIdPreCallValidateCmdSetViewportWithCount, + InterceptIdPreCallRecordCmdSetViewportWithCount, + InterceptIdPostCallRecordCmdSetViewportWithCount, + InterceptIdPreCallValidateCmdSetScissorWithCount, + InterceptIdPreCallRecordCmdSetScissorWithCount, + InterceptIdPostCallRecordCmdSetScissorWithCount, + InterceptIdPreCallValidateCmdBindVertexBuffers2, + InterceptIdPreCallRecordCmdBindVertexBuffers2, + InterceptIdPostCallRecordCmdBindVertexBuffers2, + InterceptIdPreCallValidateCmdSetDepthTestEnable, + InterceptIdPreCallRecordCmdSetDepthTestEnable, + InterceptIdPostCallRecordCmdSetDepthTestEnable, + InterceptIdPreCallValidateCmdSetDepthWriteEnable, + InterceptIdPreCallRecordCmdSetDepthWriteEnable, + InterceptIdPostCallRecordCmdSetDepthWriteEnable, + InterceptIdPreCallValidateCmdSetDepthCompareOp, + InterceptIdPreCallRecordCmdSetDepthCompareOp, + InterceptIdPostCallRecordCmdSetDepthCompareOp, + InterceptIdPreCallValidateCmdSetDepthBoundsTestEnable, + InterceptIdPreCallRecordCmdSetDepthBoundsTestEnable, + InterceptIdPostCallRecordCmdSetDepthBoundsTestEnable, + InterceptIdPreCallValidateCmdSetStencilTestEnable, + InterceptIdPreCallRecordCmdSetStencilTestEnable, + InterceptIdPostCallRecordCmdSetStencilTestEnable, + InterceptIdPreCallValidateCmdSetStencilOp, + InterceptIdPreCallRecordCmdSetStencilOp, + InterceptIdPostCallRecordCmdSetStencilOp, + InterceptIdPreCallValidateCmdSetRasterizerDiscardEnable, + InterceptIdPreCallRecordCmdSetRasterizerDiscardEnable, + InterceptIdPostCallRecordCmdSetRasterizerDiscardEnable, + InterceptIdPreCallValidateCmdSetDepthBiasEnable, + InterceptIdPreCallRecordCmdSetDepthBiasEnable, + InterceptIdPostCallRecordCmdSetDepthBiasEnable, + InterceptIdPreCallValidateCmdSetPrimitiveRestartEnable, + InterceptIdPreCallRecordCmdSetPrimitiveRestartEnable, + InterceptIdPostCallRecordCmdSetPrimitiveRestartEnable, + InterceptIdPreCallValidateGetDeviceBufferMemoryRequirements, + InterceptIdPreCallRecordGetDeviceBufferMemoryRequirements, + InterceptIdPostCallRecordGetDeviceBufferMemoryRequirements, + InterceptIdPreCallValidateGetDeviceImageMemoryRequirements, + InterceptIdPreCallRecordGetDeviceImageMemoryRequirements, + InterceptIdPostCallRecordGetDeviceImageMemoryRequirements, + InterceptIdPreCallValidateGetDeviceImageSparseMemoryRequirements, + InterceptIdPreCallRecordGetDeviceImageSparseMemoryRequirements, + InterceptIdPostCallRecordGetDeviceImageSparseMemoryRequirements, + InterceptIdPreCallValidateCreateSwapchainKHR, + InterceptIdPreCallRecordCreateSwapchainKHR, + InterceptIdPostCallRecordCreateSwapchainKHR, + InterceptIdPreCallValidateDestroySwapchainKHR, + InterceptIdPreCallRecordDestroySwapchainKHR, + InterceptIdPostCallRecordDestroySwapchainKHR, + InterceptIdPreCallValidateGetSwapchainImagesKHR, + InterceptIdPreCallRecordGetSwapchainImagesKHR, + InterceptIdPostCallRecordGetSwapchainImagesKHR, + InterceptIdPreCallValidateAcquireNextImageKHR, + InterceptIdPreCallRecordAcquireNextImageKHR, + InterceptIdPostCallRecordAcquireNextImageKHR, + InterceptIdPreCallValidateQueuePresentKHR, + InterceptIdPreCallRecordQueuePresentKHR, + InterceptIdPostCallRecordQueuePresentKHR, + InterceptIdPreCallValidateGetDeviceGroupPresentCapabilitiesKHR, + InterceptIdPreCallRecordGetDeviceGroupPresentCapabilitiesKHR, + InterceptIdPostCallRecordGetDeviceGroupPresentCapabilitiesKHR, + InterceptIdPreCallValidateGetDeviceGroupSurfacePresentModesKHR, + InterceptIdPreCallRecordGetDeviceGroupSurfacePresentModesKHR, + InterceptIdPostCallRecordGetDeviceGroupSurfacePresentModesKHR, + InterceptIdPreCallValidateAcquireNextImage2KHR, + InterceptIdPreCallRecordAcquireNextImage2KHR, + InterceptIdPostCallRecordAcquireNextImage2KHR, + InterceptIdPreCallValidateCreateSharedSwapchainsKHR, + InterceptIdPreCallRecordCreateSharedSwapchainsKHR, + InterceptIdPostCallRecordCreateSharedSwapchainsKHR, + InterceptIdPreCallValidateCreateVideoSessionKHR, + InterceptIdPreCallRecordCreateVideoSessionKHR, + InterceptIdPostCallRecordCreateVideoSessionKHR, + InterceptIdPreCallValidateDestroyVideoSessionKHR, + InterceptIdPreCallRecordDestroyVideoSessionKHR, + InterceptIdPostCallRecordDestroyVideoSessionKHR, + InterceptIdPreCallValidateGetVideoSessionMemoryRequirementsKHR, + InterceptIdPreCallRecordGetVideoSessionMemoryRequirementsKHR, + InterceptIdPostCallRecordGetVideoSessionMemoryRequirementsKHR, + InterceptIdPreCallValidateBindVideoSessionMemoryKHR, + InterceptIdPreCallRecordBindVideoSessionMemoryKHR, + InterceptIdPostCallRecordBindVideoSessionMemoryKHR, + InterceptIdPreCallValidateCreateVideoSessionParametersKHR, + InterceptIdPreCallRecordCreateVideoSessionParametersKHR, + InterceptIdPostCallRecordCreateVideoSessionParametersKHR, + InterceptIdPreCallValidateUpdateVideoSessionParametersKHR, + InterceptIdPreCallRecordUpdateVideoSessionParametersKHR, + InterceptIdPostCallRecordUpdateVideoSessionParametersKHR, + InterceptIdPreCallValidateDestroyVideoSessionParametersKHR, + InterceptIdPreCallRecordDestroyVideoSessionParametersKHR, + InterceptIdPostCallRecordDestroyVideoSessionParametersKHR, + InterceptIdPreCallValidateCmdBeginVideoCodingKHR, + InterceptIdPreCallRecordCmdBeginVideoCodingKHR, + InterceptIdPostCallRecordCmdBeginVideoCodingKHR, + InterceptIdPreCallValidateCmdEndVideoCodingKHR, + InterceptIdPreCallRecordCmdEndVideoCodingKHR, + InterceptIdPostCallRecordCmdEndVideoCodingKHR, + InterceptIdPreCallValidateCmdControlVideoCodingKHR, + InterceptIdPreCallRecordCmdControlVideoCodingKHR, + InterceptIdPostCallRecordCmdControlVideoCodingKHR, + InterceptIdPreCallValidateCmdDecodeVideoKHR, + InterceptIdPreCallRecordCmdDecodeVideoKHR, + InterceptIdPostCallRecordCmdDecodeVideoKHR, + InterceptIdPreCallValidateCmdBeginRenderingKHR, + InterceptIdPreCallRecordCmdBeginRenderingKHR, + InterceptIdPostCallRecordCmdBeginRenderingKHR, + InterceptIdPreCallValidateCmdEndRenderingKHR, + InterceptIdPreCallRecordCmdEndRenderingKHR, + InterceptIdPostCallRecordCmdEndRenderingKHR, + InterceptIdPreCallValidateGetDeviceGroupPeerMemoryFeaturesKHR, + InterceptIdPreCallRecordGetDeviceGroupPeerMemoryFeaturesKHR, + InterceptIdPostCallRecordGetDeviceGroupPeerMemoryFeaturesKHR, + InterceptIdPreCallValidateCmdSetDeviceMaskKHR, + InterceptIdPreCallRecordCmdSetDeviceMaskKHR, + InterceptIdPostCallRecordCmdSetDeviceMaskKHR, + InterceptIdPreCallValidateCmdDispatchBaseKHR, + InterceptIdPreCallRecordCmdDispatchBaseKHR, + InterceptIdPostCallRecordCmdDispatchBaseKHR, + InterceptIdPreCallValidateTrimCommandPoolKHR, + InterceptIdPreCallRecordTrimCommandPoolKHR, + InterceptIdPostCallRecordTrimCommandPoolKHR, + InterceptIdPreCallValidateGetMemoryWin32HandleKHR, + InterceptIdPreCallRecordGetMemoryWin32HandleKHR, + InterceptIdPostCallRecordGetMemoryWin32HandleKHR, + InterceptIdPreCallValidateGetMemoryWin32HandlePropertiesKHR, + InterceptIdPreCallRecordGetMemoryWin32HandlePropertiesKHR, + InterceptIdPostCallRecordGetMemoryWin32HandlePropertiesKHR, + InterceptIdPreCallValidateGetMemoryFdKHR, + InterceptIdPreCallRecordGetMemoryFdKHR, + InterceptIdPostCallRecordGetMemoryFdKHR, + InterceptIdPreCallValidateGetMemoryFdPropertiesKHR, + InterceptIdPreCallRecordGetMemoryFdPropertiesKHR, + InterceptIdPostCallRecordGetMemoryFdPropertiesKHR, + InterceptIdPreCallValidateImportSemaphoreWin32HandleKHR, + InterceptIdPreCallRecordImportSemaphoreWin32HandleKHR, + InterceptIdPostCallRecordImportSemaphoreWin32HandleKHR, + InterceptIdPreCallValidateGetSemaphoreWin32HandleKHR, + InterceptIdPreCallRecordGetSemaphoreWin32HandleKHR, + InterceptIdPostCallRecordGetSemaphoreWin32HandleKHR, + InterceptIdPreCallValidateImportSemaphoreFdKHR, + InterceptIdPreCallRecordImportSemaphoreFdKHR, + InterceptIdPostCallRecordImportSemaphoreFdKHR, + InterceptIdPreCallValidateGetSemaphoreFdKHR, + InterceptIdPreCallRecordGetSemaphoreFdKHR, + InterceptIdPostCallRecordGetSemaphoreFdKHR, + InterceptIdPreCallValidateCmdPushDescriptorSetKHR, + InterceptIdPreCallRecordCmdPushDescriptorSetKHR, + InterceptIdPostCallRecordCmdPushDescriptorSetKHR, + InterceptIdPreCallValidateCmdPushDescriptorSetWithTemplateKHR, + InterceptIdPreCallRecordCmdPushDescriptorSetWithTemplateKHR, + InterceptIdPostCallRecordCmdPushDescriptorSetWithTemplateKHR, + InterceptIdPreCallValidateCreateDescriptorUpdateTemplateKHR, + InterceptIdPreCallRecordCreateDescriptorUpdateTemplateKHR, + InterceptIdPostCallRecordCreateDescriptorUpdateTemplateKHR, + InterceptIdPreCallValidateDestroyDescriptorUpdateTemplateKHR, + InterceptIdPreCallRecordDestroyDescriptorUpdateTemplateKHR, + InterceptIdPostCallRecordDestroyDescriptorUpdateTemplateKHR, + InterceptIdPreCallValidateUpdateDescriptorSetWithTemplateKHR, + InterceptIdPreCallRecordUpdateDescriptorSetWithTemplateKHR, + InterceptIdPostCallRecordUpdateDescriptorSetWithTemplateKHR, + InterceptIdPreCallValidateCreateRenderPass2KHR, + InterceptIdPreCallRecordCreateRenderPass2KHR, + InterceptIdPostCallRecordCreateRenderPass2KHR, + InterceptIdPreCallValidateCmdBeginRenderPass2KHR, + InterceptIdPreCallRecordCmdBeginRenderPass2KHR, + InterceptIdPostCallRecordCmdBeginRenderPass2KHR, + InterceptIdPreCallValidateCmdNextSubpass2KHR, + InterceptIdPreCallRecordCmdNextSubpass2KHR, + InterceptIdPostCallRecordCmdNextSubpass2KHR, + InterceptIdPreCallValidateCmdEndRenderPass2KHR, + InterceptIdPreCallRecordCmdEndRenderPass2KHR, + InterceptIdPostCallRecordCmdEndRenderPass2KHR, + InterceptIdPreCallValidateGetSwapchainStatusKHR, + InterceptIdPreCallRecordGetSwapchainStatusKHR, + InterceptIdPostCallRecordGetSwapchainStatusKHR, + InterceptIdPreCallValidateImportFenceWin32HandleKHR, + InterceptIdPreCallRecordImportFenceWin32HandleKHR, + InterceptIdPostCallRecordImportFenceWin32HandleKHR, + InterceptIdPreCallValidateGetFenceWin32HandleKHR, + InterceptIdPreCallRecordGetFenceWin32HandleKHR, + InterceptIdPostCallRecordGetFenceWin32HandleKHR, + InterceptIdPreCallValidateImportFenceFdKHR, + InterceptIdPreCallRecordImportFenceFdKHR, + InterceptIdPostCallRecordImportFenceFdKHR, + InterceptIdPreCallValidateGetFenceFdKHR, + InterceptIdPreCallRecordGetFenceFdKHR, + InterceptIdPostCallRecordGetFenceFdKHR, + InterceptIdPreCallValidateAcquireProfilingLockKHR, + InterceptIdPreCallRecordAcquireProfilingLockKHR, + InterceptIdPostCallRecordAcquireProfilingLockKHR, + InterceptIdPreCallValidateReleaseProfilingLockKHR, + InterceptIdPreCallRecordReleaseProfilingLockKHR, + InterceptIdPostCallRecordReleaseProfilingLockKHR, + InterceptIdPreCallValidateGetImageMemoryRequirements2KHR, + InterceptIdPreCallRecordGetImageMemoryRequirements2KHR, + InterceptIdPostCallRecordGetImageMemoryRequirements2KHR, + InterceptIdPreCallValidateGetBufferMemoryRequirements2KHR, + InterceptIdPreCallRecordGetBufferMemoryRequirements2KHR, + InterceptIdPostCallRecordGetBufferMemoryRequirements2KHR, + InterceptIdPreCallValidateGetImageSparseMemoryRequirements2KHR, + InterceptIdPreCallRecordGetImageSparseMemoryRequirements2KHR, + InterceptIdPostCallRecordGetImageSparseMemoryRequirements2KHR, + InterceptIdPreCallValidateCreateSamplerYcbcrConversionKHR, + InterceptIdPreCallRecordCreateSamplerYcbcrConversionKHR, + InterceptIdPostCallRecordCreateSamplerYcbcrConversionKHR, + InterceptIdPreCallValidateDestroySamplerYcbcrConversionKHR, + InterceptIdPreCallRecordDestroySamplerYcbcrConversionKHR, + InterceptIdPostCallRecordDestroySamplerYcbcrConversionKHR, + InterceptIdPreCallValidateBindBufferMemory2KHR, + InterceptIdPreCallRecordBindBufferMemory2KHR, + InterceptIdPostCallRecordBindBufferMemory2KHR, + InterceptIdPreCallValidateBindImageMemory2KHR, + InterceptIdPreCallRecordBindImageMemory2KHR, + InterceptIdPostCallRecordBindImageMemory2KHR, + InterceptIdPreCallValidateGetDescriptorSetLayoutSupportKHR, + InterceptIdPreCallRecordGetDescriptorSetLayoutSupportKHR, + InterceptIdPostCallRecordGetDescriptorSetLayoutSupportKHR, + InterceptIdPreCallValidateCmdDrawIndirectCountKHR, + InterceptIdPreCallRecordCmdDrawIndirectCountKHR, + InterceptIdPostCallRecordCmdDrawIndirectCountKHR, + InterceptIdPreCallValidateCmdDrawIndexedIndirectCountKHR, + InterceptIdPreCallRecordCmdDrawIndexedIndirectCountKHR, + InterceptIdPostCallRecordCmdDrawIndexedIndirectCountKHR, + InterceptIdPreCallValidateGetSemaphoreCounterValueKHR, + InterceptIdPreCallRecordGetSemaphoreCounterValueKHR, + InterceptIdPostCallRecordGetSemaphoreCounterValueKHR, + InterceptIdPreCallValidateWaitSemaphoresKHR, + InterceptIdPreCallRecordWaitSemaphoresKHR, + InterceptIdPostCallRecordWaitSemaphoresKHR, + InterceptIdPreCallValidateSignalSemaphoreKHR, + InterceptIdPreCallRecordSignalSemaphoreKHR, + InterceptIdPostCallRecordSignalSemaphoreKHR, + InterceptIdPreCallValidateCmdSetFragmentShadingRateKHR, + InterceptIdPreCallRecordCmdSetFragmentShadingRateKHR, + InterceptIdPostCallRecordCmdSetFragmentShadingRateKHR, + InterceptIdPreCallValidateCmdSetRenderingAttachmentLocationsKHR, + InterceptIdPreCallRecordCmdSetRenderingAttachmentLocationsKHR, + InterceptIdPostCallRecordCmdSetRenderingAttachmentLocationsKHR, + InterceptIdPreCallValidateCmdSetRenderingInputAttachmentIndicesKHR, + InterceptIdPreCallRecordCmdSetRenderingInputAttachmentIndicesKHR, + InterceptIdPostCallRecordCmdSetRenderingInputAttachmentIndicesKHR, + InterceptIdPreCallValidateWaitForPresentKHR, + InterceptIdPreCallRecordWaitForPresentKHR, + InterceptIdPostCallRecordWaitForPresentKHR, + InterceptIdPreCallValidateGetBufferDeviceAddressKHR, + InterceptIdPreCallRecordGetBufferDeviceAddressKHR, + InterceptIdPostCallRecordGetBufferDeviceAddressKHR, + InterceptIdPreCallValidateGetBufferOpaqueCaptureAddressKHR, + InterceptIdPreCallRecordGetBufferOpaqueCaptureAddressKHR, + InterceptIdPostCallRecordGetBufferOpaqueCaptureAddressKHR, + InterceptIdPreCallValidateGetDeviceMemoryOpaqueCaptureAddressKHR, + InterceptIdPreCallRecordGetDeviceMemoryOpaqueCaptureAddressKHR, + InterceptIdPostCallRecordGetDeviceMemoryOpaqueCaptureAddressKHR, + InterceptIdPreCallValidateCreateDeferredOperationKHR, + InterceptIdPreCallRecordCreateDeferredOperationKHR, + InterceptIdPostCallRecordCreateDeferredOperationKHR, + InterceptIdPreCallValidateDestroyDeferredOperationKHR, + InterceptIdPreCallRecordDestroyDeferredOperationKHR, + InterceptIdPostCallRecordDestroyDeferredOperationKHR, + InterceptIdPreCallValidateGetDeferredOperationMaxConcurrencyKHR, + InterceptIdPreCallRecordGetDeferredOperationMaxConcurrencyKHR, + InterceptIdPostCallRecordGetDeferredOperationMaxConcurrencyKHR, + InterceptIdPreCallValidateGetDeferredOperationResultKHR, + InterceptIdPreCallRecordGetDeferredOperationResultKHR, + InterceptIdPostCallRecordGetDeferredOperationResultKHR, + InterceptIdPreCallValidateDeferredOperationJoinKHR, + InterceptIdPreCallRecordDeferredOperationJoinKHR, + InterceptIdPostCallRecordDeferredOperationJoinKHR, + InterceptIdPreCallValidateGetPipelineExecutablePropertiesKHR, + InterceptIdPreCallRecordGetPipelineExecutablePropertiesKHR, + InterceptIdPostCallRecordGetPipelineExecutablePropertiesKHR, + InterceptIdPreCallValidateGetPipelineExecutableStatisticsKHR, + InterceptIdPreCallRecordGetPipelineExecutableStatisticsKHR, + InterceptIdPostCallRecordGetPipelineExecutableStatisticsKHR, + InterceptIdPreCallValidateGetPipelineExecutableInternalRepresentationsKHR, + InterceptIdPreCallRecordGetPipelineExecutableInternalRepresentationsKHR, + InterceptIdPostCallRecordGetPipelineExecutableInternalRepresentationsKHR, + InterceptIdPreCallValidateMapMemory2KHR, + InterceptIdPreCallRecordMapMemory2KHR, + InterceptIdPostCallRecordMapMemory2KHR, + InterceptIdPreCallValidateUnmapMemory2KHR, + InterceptIdPreCallRecordUnmapMemory2KHR, + InterceptIdPostCallRecordUnmapMemory2KHR, + InterceptIdPreCallValidateGetEncodedVideoSessionParametersKHR, + InterceptIdPreCallRecordGetEncodedVideoSessionParametersKHR, + InterceptIdPostCallRecordGetEncodedVideoSessionParametersKHR, + InterceptIdPreCallValidateCmdEncodeVideoKHR, + InterceptIdPreCallRecordCmdEncodeVideoKHR, + InterceptIdPostCallRecordCmdEncodeVideoKHR, + InterceptIdPreCallValidateCmdSetEvent2KHR, + InterceptIdPreCallRecordCmdSetEvent2KHR, + InterceptIdPostCallRecordCmdSetEvent2KHR, + InterceptIdPreCallValidateCmdResetEvent2KHR, + InterceptIdPreCallRecordCmdResetEvent2KHR, + InterceptIdPostCallRecordCmdResetEvent2KHR, + InterceptIdPreCallValidateCmdWaitEvents2KHR, + InterceptIdPreCallRecordCmdWaitEvents2KHR, + InterceptIdPostCallRecordCmdWaitEvents2KHR, + InterceptIdPreCallValidateCmdPipelineBarrier2KHR, + InterceptIdPreCallRecordCmdPipelineBarrier2KHR, + InterceptIdPostCallRecordCmdPipelineBarrier2KHR, + InterceptIdPreCallValidateCmdWriteTimestamp2KHR, + InterceptIdPreCallRecordCmdWriteTimestamp2KHR, + InterceptIdPostCallRecordCmdWriteTimestamp2KHR, + InterceptIdPreCallValidateQueueSubmit2KHR, + InterceptIdPreCallRecordQueueSubmit2KHR, + InterceptIdPostCallRecordQueueSubmit2KHR, + InterceptIdPreCallValidateCmdCopyBuffer2KHR, + InterceptIdPreCallRecordCmdCopyBuffer2KHR, + InterceptIdPostCallRecordCmdCopyBuffer2KHR, + InterceptIdPreCallValidateCmdCopyImage2KHR, + InterceptIdPreCallRecordCmdCopyImage2KHR, + InterceptIdPostCallRecordCmdCopyImage2KHR, + InterceptIdPreCallValidateCmdCopyBufferToImage2KHR, + InterceptIdPreCallRecordCmdCopyBufferToImage2KHR, + InterceptIdPostCallRecordCmdCopyBufferToImage2KHR, + InterceptIdPreCallValidateCmdCopyImageToBuffer2KHR, + InterceptIdPreCallRecordCmdCopyImageToBuffer2KHR, + InterceptIdPostCallRecordCmdCopyImageToBuffer2KHR, + InterceptIdPreCallValidateCmdBlitImage2KHR, + InterceptIdPreCallRecordCmdBlitImage2KHR, + InterceptIdPostCallRecordCmdBlitImage2KHR, + InterceptIdPreCallValidateCmdResolveImage2KHR, + InterceptIdPreCallRecordCmdResolveImage2KHR, + InterceptIdPostCallRecordCmdResolveImage2KHR, + InterceptIdPreCallValidateCmdTraceRaysIndirect2KHR, + InterceptIdPreCallRecordCmdTraceRaysIndirect2KHR, + InterceptIdPostCallRecordCmdTraceRaysIndirect2KHR, + InterceptIdPreCallValidateGetDeviceBufferMemoryRequirementsKHR, + InterceptIdPreCallRecordGetDeviceBufferMemoryRequirementsKHR, + InterceptIdPostCallRecordGetDeviceBufferMemoryRequirementsKHR, + InterceptIdPreCallValidateGetDeviceImageMemoryRequirementsKHR, + InterceptIdPreCallRecordGetDeviceImageMemoryRequirementsKHR, + InterceptIdPostCallRecordGetDeviceImageMemoryRequirementsKHR, + InterceptIdPreCallValidateGetDeviceImageSparseMemoryRequirementsKHR, + InterceptIdPreCallRecordGetDeviceImageSparseMemoryRequirementsKHR, + InterceptIdPostCallRecordGetDeviceImageSparseMemoryRequirementsKHR, + InterceptIdPreCallValidateCmdBindIndexBuffer2KHR, + InterceptIdPreCallRecordCmdBindIndexBuffer2KHR, + InterceptIdPostCallRecordCmdBindIndexBuffer2KHR, + InterceptIdPreCallValidateGetRenderingAreaGranularityKHR, + InterceptIdPreCallRecordGetRenderingAreaGranularityKHR, + InterceptIdPostCallRecordGetRenderingAreaGranularityKHR, + InterceptIdPreCallValidateGetDeviceImageSubresourceLayoutKHR, + InterceptIdPreCallRecordGetDeviceImageSubresourceLayoutKHR, + InterceptIdPostCallRecordGetDeviceImageSubresourceLayoutKHR, + InterceptIdPreCallValidateGetImageSubresourceLayout2KHR, + InterceptIdPreCallRecordGetImageSubresourceLayout2KHR, + InterceptIdPostCallRecordGetImageSubresourceLayout2KHR, + InterceptIdPreCallValidateCreatePipelineBinariesKHR, + InterceptIdPreCallRecordCreatePipelineBinariesKHR, + InterceptIdPostCallRecordCreatePipelineBinariesKHR, + InterceptIdPreCallValidateDestroyPipelineBinaryKHR, + InterceptIdPreCallRecordDestroyPipelineBinaryKHR, + InterceptIdPostCallRecordDestroyPipelineBinaryKHR, + InterceptIdPreCallValidateGetPipelineKeyKHR, + InterceptIdPreCallRecordGetPipelineKeyKHR, + InterceptIdPostCallRecordGetPipelineKeyKHR, + InterceptIdPreCallValidateGetPipelineBinaryDataKHR, + InterceptIdPreCallRecordGetPipelineBinaryDataKHR, + InterceptIdPostCallRecordGetPipelineBinaryDataKHR, + InterceptIdPreCallValidateReleaseCapturedPipelineDataKHR, + InterceptIdPreCallRecordReleaseCapturedPipelineDataKHR, + InterceptIdPostCallRecordReleaseCapturedPipelineDataKHR, + InterceptIdPreCallValidateCmdSetLineStippleKHR, + InterceptIdPreCallRecordCmdSetLineStippleKHR, + InterceptIdPostCallRecordCmdSetLineStippleKHR, + InterceptIdPreCallValidateGetCalibratedTimestampsKHR, + InterceptIdPreCallRecordGetCalibratedTimestampsKHR, + InterceptIdPostCallRecordGetCalibratedTimestampsKHR, + InterceptIdPreCallValidateCmdBindDescriptorSets2KHR, + InterceptIdPreCallRecordCmdBindDescriptorSets2KHR, + InterceptIdPostCallRecordCmdBindDescriptorSets2KHR, + InterceptIdPreCallValidateCmdPushConstants2KHR, + InterceptIdPreCallRecordCmdPushConstants2KHR, + InterceptIdPostCallRecordCmdPushConstants2KHR, + InterceptIdPreCallValidateCmdPushDescriptorSet2KHR, + InterceptIdPreCallRecordCmdPushDescriptorSet2KHR, + InterceptIdPostCallRecordCmdPushDescriptorSet2KHR, + InterceptIdPreCallValidateCmdPushDescriptorSetWithTemplate2KHR, + InterceptIdPreCallRecordCmdPushDescriptorSetWithTemplate2KHR, + InterceptIdPostCallRecordCmdPushDescriptorSetWithTemplate2KHR, + InterceptIdPreCallValidateCmdSetDescriptorBufferOffsets2EXT, + InterceptIdPreCallRecordCmdSetDescriptorBufferOffsets2EXT, + InterceptIdPostCallRecordCmdSetDescriptorBufferOffsets2EXT, + InterceptIdPreCallValidateCmdBindDescriptorBufferEmbeddedSamplers2EXT, + InterceptIdPreCallRecordCmdBindDescriptorBufferEmbeddedSamplers2EXT, + InterceptIdPostCallRecordCmdBindDescriptorBufferEmbeddedSamplers2EXT, + InterceptIdPreCallValidateDebugMarkerSetObjectTagEXT, + InterceptIdPreCallRecordDebugMarkerSetObjectTagEXT, + InterceptIdPostCallRecordDebugMarkerSetObjectTagEXT, + InterceptIdPreCallValidateDebugMarkerSetObjectNameEXT, + InterceptIdPreCallRecordDebugMarkerSetObjectNameEXT, + InterceptIdPostCallRecordDebugMarkerSetObjectNameEXT, + InterceptIdPreCallValidateCmdDebugMarkerBeginEXT, + InterceptIdPreCallRecordCmdDebugMarkerBeginEXT, + InterceptIdPostCallRecordCmdDebugMarkerBeginEXT, + InterceptIdPreCallValidateCmdDebugMarkerEndEXT, + InterceptIdPreCallRecordCmdDebugMarkerEndEXT, + InterceptIdPostCallRecordCmdDebugMarkerEndEXT, + InterceptIdPreCallValidateCmdDebugMarkerInsertEXT, + InterceptIdPreCallRecordCmdDebugMarkerInsertEXT, + InterceptIdPostCallRecordCmdDebugMarkerInsertEXT, + InterceptIdPreCallValidateCmdBindTransformFeedbackBuffersEXT, + InterceptIdPreCallRecordCmdBindTransformFeedbackBuffersEXT, + InterceptIdPostCallRecordCmdBindTransformFeedbackBuffersEXT, + InterceptIdPreCallValidateCmdBeginTransformFeedbackEXT, + InterceptIdPreCallRecordCmdBeginTransformFeedbackEXT, + InterceptIdPostCallRecordCmdBeginTransformFeedbackEXT, + InterceptIdPreCallValidateCmdEndTransformFeedbackEXT, + InterceptIdPreCallRecordCmdEndTransformFeedbackEXT, + InterceptIdPostCallRecordCmdEndTransformFeedbackEXT, + InterceptIdPreCallValidateCmdBeginQueryIndexedEXT, + InterceptIdPreCallRecordCmdBeginQueryIndexedEXT, + InterceptIdPostCallRecordCmdBeginQueryIndexedEXT, + InterceptIdPreCallValidateCmdEndQueryIndexedEXT, + InterceptIdPreCallRecordCmdEndQueryIndexedEXT, + InterceptIdPostCallRecordCmdEndQueryIndexedEXT, + InterceptIdPreCallValidateCmdDrawIndirectByteCountEXT, + InterceptIdPreCallRecordCmdDrawIndirectByteCountEXT, + InterceptIdPostCallRecordCmdDrawIndirectByteCountEXT, + InterceptIdPreCallValidateCreateCuModuleNVX, + InterceptIdPreCallRecordCreateCuModuleNVX, + InterceptIdPostCallRecordCreateCuModuleNVX, + InterceptIdPreCallValidateCreateCuFunctionNVX, + InterceptIdPreCallRecordCreateCuFunctionNVX, + InterceptIdPostCallRecordCreateCuFunctionNVX, + InterceptIdPreCallValidateDestroyCuModuleNVX, + InterceptIdPreCallRecordDestroyCuModuleNVX, + InterceptIdPostCallRecordDestroyCuModuleNVX, + InterceptIdPreCallValidateDestroyCuFunctionNVX, + InterceptIdPreCallRecordDestroyCuFunctionNVX, + InterceptIdPostCallRecordDestroyCuFunctionNVX, + InterceptIdPreCallValidateCmdCuLaunchKernelNVX, + InterceptIdPreCallRecordCmdCuLaunchKernelNVX, + InterceptIdPostCallRecordCmdCuLaunchKernelNVX, + InterceptIdPreCallValidateGetImageViewHandleNVX, + InterceptIdPreCallRecordGetImageViewHandleNVX, + InterceptIdPostCallRecordGetImageViewHandleNVX, + InterceptIdPreCallValidateGetImageViewHandle64NVX, + InterceptIdPreCallRecordGetImageViewHandle64NVX, + InterceptIdPostCallRecordGetImageViewHandle64NVX, + InterceptIdPreCallValidateGetImageViewAddressNVX, + InterceptIdPreCallRecordGetImageViewAddressNVX, + InterceptIdPostCallRecordGetImageViewAddressNVX, + InterceptIdPreCallValidateCmdDrawIndirectCountAMD, + InterceptIdPreCallRecordCmdDrawIndirectCountAMD, + InterceptIdPostCallRecordCmdDrawIndirectCountAMD, + InterceptIdPreCallValidateCmdDrawIndexedIndirectCountAMD, + InterceptIdPreCallRecordCmdDrawIndexedIndirectCountAMD, + InterceptIdPostCallRecordCmdDrawIndexedIndirectCountAMD, + InterceptIdPreCallValidateGetShaderInfoAMD, + InterceptIdPreCallRecordGetShaderInfoAMD, + InterceptIdPostCallRecordGetShaderInfoAMD, + InterceptIdPreCallValidateGetMemoryWin32HandleNV, + InterceptIdPreCallRecordGetMemoryWin32HandleNV, + InterceptIdPostCallRecordGetMemoryWin32HandleNV, + InterceptIdPreCallValidateCmdBeginConditionalRenderingEXT, + InterceptIdPreCallRecordCmdBeginConditionalRenderingEXT, + InterceptIdPostCallRecordCmdBeginConditionalRenderingEXT, + InterceptIdPreCallValidateCmdEndConditionalRenderingEXT, + InterceptIdPreCallRecordCmdEndConditionalRenderingEXT, + InterceptIdPostCallRecordCmdEndConditionalRenderingEXT, + InterceptIdPreCallValidateCmdSetViewportWScalingNV, + InterceptIdPreCallRecordCmdSetViewportWScalingNV, + InterceptIdPostCallRecordCmdSetViewportWScalingNV, + InterceptIdPreCallValidateDisplayPowerControlEXT, + InterceptIdPreCallRecordDisplayPowerControlEXT, + InterceptIdPostCallRecordDisplayPowerControlEXT, + InterceptIdPreCallValidateRegisterDeviceEventEXT, + InterceptIdPreCallRecordRegisterDeviceEventEXT, + InterceptIdPostCallRecordRegisterDeviceEventEXT, + InterceptIdPreCallValidateRegisterDisplayEventEXT, + InterceptIdPreCallRecordRegisterDisplayEventEXT, + InterceptIdPostCallRecordRegisterDisplayEventEXT, + InterceptIdPreCallValidateGetSwapchainCounterEXT, + InterceptIdPreCallRecordGetSwapchainCounterEXT, + InterceptIdPostCallRecordGetSwapchainCounterEXT, + InterceptIdPreCallValidateGetRefreshCycleDurationGOOGLE, + InterceptIdPreCallRecordGetRefreshCycleDurationGOOGLE, + InterceptIdPostCallRecordGetRefreshCycleDurationGOOGLE, + InterceptIdPreCallValidateGetPastPresentationTimingGOOGLE, + InterceptIdPreCallRecordGetPastPresentationTimingGOOGLE, + InterceptIdPostCallRecordGetPastPresentationTimingGOOGLE, + InterceptIdPreCallValidateCmdSetDiscardRectangleEXT, + InterceptIdPreCallRecordCmdSetDiscardRectangleEXT, + InterceptIdPostCallRecordCmdSetDiscardRectangleEXT, + InterceptIdPreCallValidateCmdSetDiscardRectangleEnableEXT, + InterceptIdPreCallRecordCmdSetDiscardRectangleEnableEXT, + InterceptIdPostCallRecordCmdSetDiscardRectangleEnableEXT, + InterceptIdPreCallValidateCmdSetDiscardRectangleModeEXT, + InterceptIdPreCallRecordCmdSetDiscardRectangleModeEXT, + InterceptIdPostCallRecordCmdSetDiscardRectangleModeEXT, + InterceptIdPreCallValidateSetHdrMetadataEXT, + InterceptIdPreCallRecordSetHdrMetadataEXT, + InterceptIdPostCallRecordSetHdrMetadataEXT, + InterceptIdPreCallValidateSetDebugUtilsObjectNameEXT, + InterceptIdPreCallRecordSetDebugUtilsObjectNameEXT, + InterceptIdPostCallRecordSetDebugUtilsObjectNameEXT, + InterceptIdPreCallValidateSetDebugUtilsObjectTagEXT, + InterceptIdPreCallRecordSetDebugUtilsObjectTagEXT, + InterceptIdPostCallRecordSetDebugUtilsObjectTagEXT, + InterceptIdPreCallValidateQueueBeginDebugUtilsLabelEXT, + InterceptIdPreCallRecordQueueBeginDebugUtilsLabelEXT, + InterceptIdPostCallRecordQueueBeginDebugUtilsLabelEXT, + InterceptIdPreCallValidateQueueEndDebugUtilsLabelEXT, + InterceptIdPreCallRecordQueueEndDebugUtilsLabelEXT, + InterceptIdPostCallRecordQueueEndDebugUtilsLabelEXT, + InterceptIdPreCallValidateQueueInsertDebugUtilsLabelEXT, + InterceptIdPreCallRecordQueueInsertDebugUtilsLabelEXT, + InterceptIdPostCallRecordQueueInsertDebugUtilsLabelEXT, + InterceptIdPreCallValidateCmdBeginDebugUtilsLabelEXT, + InterceptIdPreCallRecordCmdBeginDebugUtilsLabelEXT, + InterceptIdPostCallRecordCmdBeginDebugUtilsLabelEXT, + InterceptIdPreCallValidateCmdEndDebugUtilsLabelEXT, + InterceptIdPreCallRecordCmdEndDebugUtilsLabelEXT, + InterceptIdPostCallRecordCmdEndDebugUtilsLabelEXT, + InterceptIdPreCallValidateCmdInsertDebugUtilsLabelEXT, + InterceptIdPreCallRecordCmdInsertDebugUtilsLabelEXT, + InterceptIdPostCallRecordCmdInsertDebugUtilsLabelEXT, + InterceptIdPreCallValidateGetAndroidHardwareBufferPropertiesANDROID, + InterceptIdPreCallRecordGetAndroidHardwareBufferPropertiesANDROID, + InterceptIdPostCallRecordGetAndroidHardwareBufferPropertiesANDROID, + InterceptIdPreCallValidateGetMemoryAndroidHardwareBufferANDROID, + InterceptIdPreCallRecordGetMemoryAndroidHardwareBufferANDROID, + InterceptIdPostCallRecordGetMemoryAndroidHardwareBufferANDROID, + InterceptIdPreCallValidateCreateExecutionGraphPipelinesAMDX, + InterceptIdPreCallRecordCreateExecutionGraphPipelinesAMDX, + InterceptIdPostCallRecordCreateExecutionGraphPipelinesAMDX, + InterceptIdPreCallValidateGetExecutionGraphPipelineScratchSizeAMDX, + InterceptIdPreCallRecordGetExecutionGraphPipelineScratchSizeAMDX, + InterceptIdPostCallRecordGetExecutionGraphPipelineScratchSizeAMDX, + InterceptIdPreCallValidateGetExecutionGraphPipelineNodeIndexAMDX, + InterceptIdPreCallRecordGetExecutionGraphPipelineNodeIndexAMDX, + InterceptIdPostCallRecordGetExecutionGraphPipelineNodeIndexAMDX, + InterceptIdPreCallValidateCmdInitializeGraphScratchMemoryAMDX, + InterceptIdPreCallRecordCmdInitializeGraphScratchMemoryAMDX, + InterceptIdPostCallRecordCmdInitializeGraphScratchMemoryAMDX, + InterceptIdPreCallValidateCmdDispatchGraphAMDX, + InterceptIdPreCallRecordCmdDispatchGraphAMDX, + InterceptIdPostCallRecordCmdDispatchGraphAMDX, + InterceptIdPreCallValidateCmdDispatchGraphIndirectAMDX, + InterceptIdPreCallRecordCmdDispatchGraphIndirectAMDX, + InterceptIdPostCallRecordCmdDispatchGraphIndirectAMDX, + InterceptIdPreCallValidateCmdDispatchGraphIndirectCountAMDX, + InterceptIdPreCallRecordCmdDispatchGraphIndirectCountAMDX, + InterceptIdPostCallRecordCmdDispatchGraphIndirectCountAMDX, + InterceptIdPreCallValidateCmdSetSampleLocationsEXT, + InterceptIdPreCallRecordCmdSetSampleLocationsEXT, + InterceptIdPostCallRecordCmdSetSampleLocationsEXT, + InterceptIdPreCallValidateGetImageDrmFormatModifierPropertiesEXT, + InterceptIdPreCallRecordGetImageDrmFormatModifierPropertiesEXT, + InterceptIdPostCallRecordGetImageDrmFormatModifierPropertiesEXT, + InterceptIdPreCallValidateCmdBindShadingRateImageNV, + InterceptIdPreCallRecordCmdBindShadingRateImageNV, + InterceptIdPostCallRecordCmdBindShadingRateImageNV, + InterceptIdPreCallValidateCmdSetViewportShadingRatePaletteNV, + InterceptIdPreCallRecordCmdSetViewportShadingRatePaletteNV, + InterceptIdPostCallRecordCmdSetViewportShadingRatePaletteNV, + InterceptIdPreCallValidateCmdSetCoarseSampleOrderNV, + InterceptIdPreCallRecordCmdSetCoarseSampleOrderNV, + InterceptIdPostCallRecordCmdSetCoarseSampleOrderNV, + InterceptIdPreCallValidateCreateAccelerationStructureNV, + InterceptIdPreCallRecordCreateAccelerationStructureNV, + InterceptIdPostCallRecordCreateAccelerationStructureNV, + InterceptIdPreCallValidateDestroyAccelerationStructureNV, + InterceptIdPreCallRecordDestroyAccelerationStructureNV, + InterceptIdPostCallRecordDestroyAccelerationStructureNV, + InterceptIdPreCallValidateGetAccelerationStructureMemoryRequirementsNV, + InterceptIdPreCallRecordGetAccelerationStructureMemoryRequirementsNV, + InterceptIdPostCallRecordGetAccelerationStructureMemoryRequirementsNV, + InterceptIdPreCallValidateBindAccelerationStructureMemoryNV, + InterceptIdPreCallRecordBindAccelerationStructureMemoryNV, + InterceptIdPostCallRecordBindAccelerationStructureMemoryNV, + InterceptIdPreCallValidateCmdBuildAccelerationStructureNV, + InterceptIdPreCallRecordCmdBuildAccelerationStructureNV, + InterceptIdPostCallRecordCmdBuildAccelerationStructureNV, + InterceptIdPreCallValidateCmdCopyAccelerationStructureNV, + InterceptIdPreCallRecordCmdCopyAccelerationStructureNV, + InterceptIdPostCallRecordCmdCopyAccelerationStructureNV, + InterceptIdPreCallValidateCmdTraceRaysNV, + InterceptIdPreCallRecordCmdTraceRaysNV, + InterceptIdPostCallRecordCmdTraceRaysNV, + InterceptIdPreCallValidateGetRayTracingShaderGroupHandlesKHR, + InterceptIdPreCallRecordGetRayTracingShaderGroupHandlesKHR, + InterceptIdPostCallRecordGetRayTracingShaderGroupHandlesKHR, + InterceptIdPreCallValidateGetRayTracingShaderGroupHandlesNV, + InterceptIdPreCallRecordGetRayTracingShaderGroupHandlesNV, + InterceptIdPostCallRecordGetRayTracingShaderGroupHandlesNV, + InterceptIdPreCallValidateGetAccelerationStructureHandleNV, + InterceptIdPreCallRecordGetAccelerationStructureHandleNV, + InterceptIdPostCallRecordGetAccelerationStructureHandleNV, + InterceptIdPreCallValidateCmdWriteAccelerationStructuresPropertiesNV, + InterceptIdPreCallRecordCmdWriteAccelerationStructuresPropertiesNV, + InterceptIdPostCallRecordCmdWriteAccelerationStructuresPropertiesNV, + InterceptIdPreCallValidateCompileDeferredNV, + InterceptIdPreCallRecordCompileDeferredNV, + InterceptIdPostCallRecordCompileDeferredNV, + InterceptIdPreCallValidateGetMemoryHostPointerPropertiesEXT, + InterceptIdPreCallRecordGetMemoryHostPointerPropertiesEXT, + InterceptIdPostCallRecordGetMemoryHostPointerPropertiesEXT, + InterceptIdPreCallValidateCmdWriteBufferMarkerAMD, + InterceptIdPreCallRecordCmdWriteBufferMarkerAMD, + InterceptIdPostCallRecordCmdWriteBufferMarkerAMD, + InterceptIdPreCallValidateCmdWriteBufferMarker2AMD, + InterceptIdPreCallRecordCmdWriteBufferMarker2AMD, + InterceptIdPostCallRecordCmdWriteBufferMarker2AMD, + InterceptIdPreCallValidateGetCalibratedTimestampsEXT, + InterceptIdPreCallRecordGetCalibratedTimestampsEXT, + InterceptIdPostCallRecordGetCalibratedTimestampsEXT, + InterceptIdPreCallValidateCmdDrawMeshTasksNV, + InterceptIdPreCallRecordCmdDrawMeshTasksNV, + InterceptIdPostCallRecordCmdDrawMeshTasksNV, + InterceptIdPreCallValidateCmdDrawMeshTasksIndirectNV, + InterceptIdPreCallRecordCmdDrawMeshTasksIndirectNV, + InterceptIdPostCallRecordCmdDrawMeshTasksIndirectNV, + InterceptIdPreCallValidateCmdDrawMeshTasksIndirectCountNV, + InterceptIdPreCallRecordCmdDrawMeshTasksIndirectCountNV, + InterceptIdPostCallRecordCmdDrawMeshTasksIndirectCountNV, + InterceptIdPreCallValidateCmdSetExclusiveScissorEnableNV, + InterceptIdPreCallRecordCmdSetExclusiveScissorEnableNV, + InterceptIdPostCallRecordCmdSetExclusiveScissorEnableNV, + InterceptIdPreCallValidateCmdSetExclusiveScissorNV, + InterceptIdPreCallRecordCmdSetExclusiveScissorNV, + InterceptIdPostCallRecordCmdSetExclusiveScissorNV, + InterceptIdPreCallValidateCmdSetCheckpointNV, + InterceptIdPreCallRecordCmdSetCheckpointNV, + InterceptIdPostCallRecordCmdSetCheckpointNV, + InterceptIdPreCallValidateGetQueueCheckpointDataNV, + InterceptIdPreCallRecordGetQueueCheckpointDataNV, + InterceptIdPostCallRecordGetQueueCheckpointDataNV, + InterceptIdPreCallValidateGetQueueCheckpointData2NV, + InterceptIdPreCallRecordGetQueueCheckpointData2NV, + InterceptIdPostCallRecordGetQueueCheckpointData2NV, + InterceptIdPreCallValidateInitializePerformanceApiINTEL, + InterceptIdPreCallRecordInitializePerformanceApiINTEL, + InterceptIdPostCallRecordInitializePerformanceApiINTEL, + InterceptIdPreCallValidateUninitializePerformanceApiINTEL, + InterceptIdPreCallRecordUninitializePerformanceApiINTEL, + InterceptIdPostCallRecordUninitializePerformanceApiINTEL, + InterceptIdPreCallValidateCmdSetPerformanceMarkerINTEL, + InterceptIdPreCallRecordCmdSetPerformanceMarkerINTEL, + InterceptIdPostCallRecordCmdSetPerformanceMarkerINTEL, + InterceptIdPreCallValidateCmdSetPerformanceStreamMarkerINTEL, + InterceptIdPreCallRecordCmdSetPerformanceStreamMarkerINTEL, + InterceptIdPostCallRecordCmdSetPerformanceStreamMarkerINTEL, + InterceptIdPreCallValidateCmdSetPerformanceOverrideINTEL, + InterceptIdPreCallRecordCmdSetPerformanceOverrideINTEL, + InterceptIdPostCallRecordCmdSetPerformanceOverrideINTEL, + InterceptIdPreCallValidateAcquirePerformanceConfigurationINTEL, + InterceptIdPreCallRecordAcquirePerformanceConfigurationINTEL, + InterceptIdPostCallRecordAcquirePerformanceConfigurationINTEL, + InterceptIdPreCallValidateReleasePerformanceConfigurationINTEL, + InterceptIdPreCallRecordReleasePerformanceConfigurationINTEL, + InterceptIdPostCallRecordReleasePerformanceConfigurationINTEL, + InterceptIdPreCallValidateQueueSetPerformanceConfigurationINTEL, + InterceptIdPreCallRecordQueueSetPerformanceConfigurationINTEL, + InterceptIdPostCallRecordQueueSetPerformanceConfigurationINTEL, + InterceptIdPreCallValidateGetPerformanceParameterINTEL, + InterceptIdPreCallRecordGetPerformanceParameterINTEL, + InterceptIdPostCallRecordGetPerformanceParameterINTEL, + InterceptIdPreCallValidateSetLocalDimmingAMD, + InterceptIdPreCallRecordSetLocalDimmingAMD, + InterceptIdPostCallRecordSetLocalDimmingAMD, + InterceptIdPreCallValidateGetBufferDeviceAddressEXT, + InterceptIdPreCallRecordGetBufferDeviceAddressEXT, + InterceptIdPostCallRecordGetBufferDeviceAddressEXT, + InterceptIdPreCallValidateAcquireFullScreenExclusiveModeEXT, + InterceptIdPreCallRecordAcquireFullScreenExclusiveModeEXT, + InterceptIdPostCallRecordAcquireFullScreenExclusiveModeEXT, + InterceptIdPreCallValidateReleaseFullScreenExclusiveModeEXT, + InterceptIdPreCallRecordReleaseFullScreenExclusiveModeEXT, + InterceptIdPostCallRecordReleaseFullScreenExclusiveModeEXT, + InterceptIdPreCallValidateGetDeviceGroupSurfacePresentModes2EXT, + InterceptIdPreCallRecordGetDeviceGroupSurfacePresentModes2EXT, + InterceptIdPostCallRecordGetDeviceGroupSurfacePresentModes2EXT, + InterceptIdPreCallValidateCmdSetLineStippleEXT, + InterceptIdPreCallRecordCmdSetLineStippleEXT, + InterceptIdPostCallRecordCmdSetLineStippleEXT, + InterceptIdPreCallValidateResetQueryPoolEXT, + InterceptIdPreCallRecordResetQueryPoolEXT, + InterceptIdPostCallRecordResetQueryPoolEXT, + InterceptIdPreCallValidateCmdSetCullModeEXT, + InterceptIdPreCallRecordCmdSetCullModeEXT, + InterceptIdPostCallRecordCmdSetCullModeEXT, + InterceptIdPreCallValidateCmdSetFrontFaceEXT, + InterceptIdPreCallRecordCmdSetFrontFaceEXT, + InterceptIdPostCallRecordCmdSetFrontFaceEXT, + InterceptIdPreCallValidateCmdSetPrimitiveTopologyEXT, + InterceptIdPreCallRecordCmdSetPrimitiveTopologyEXT, + InterceptIdPostCallRecordCmdSetPrimitiveTopologyEXT, + InterceptIdPreCallValidateCmdSetViewportWithCountEXT, + InterceptIdPreCallRecordCmdSetViewportWithCountEXT, + InterceptIdPostCallRecordCmdSetViewportWithCountEXT, + InterceptIdPreCallValidateCmdSetScissorWithCountEXT, + InterceptIdPreCallRecordCmdSetScissorWithCountEXT, + InterceptIdPostCallRecordCmdSetScissorWithCountEXT, + InterceptIdPreCallValidateCmdBindVertexBuffers2EXT, + InterceptIdPreCallRecordCmdBindVertexBuffers2EXT, + InterceptIdPostCallRecordCmdBindVertexBuffers2EXT, + InterceptIdPreCallValidateCmdSetDepthTestEnableEXT, + InterceptIdPreCallRecordCmdSetDepthTestEnableEXT, + InterceptIdPostCallRecordCmdSetDepthTestEnableEXT, + InterceptIdPreCallValidateCmdSetDepthWriteEnableEXT, + InterceptIdPreCallRecordCmdSetDepthWriteEnableEXT, + InterceptIdPostCallRecordCmdSetDepthWriteEnableEXT, + InterceptIdPreCallValidateCmdSetDepthCompareOpEXT, + InterceptIdPreCallRecordCmdSetDepthCompareOpEXT, + InterceptIdPostCallRecordCmdSetDepthCompareOpEXT, + InterceptIdPreCallValidateCmdSetDepthBoundsTestEnableEXT, + InterceptIdPreCallRecordCmdSetDepthBoundsTestEnableEXT, + InterceptIdPostCallRecordCmdSetDepthBoundsTestEnableEXT, + InterceptIdPreCallValidateCmdSetStencilTestEnableEXT, + InterceptIdPreCallRecordCmdSetStencilTestEnableEXT, + InterceptIdPostCallRecordCmdSetStencilTestEnableEXT, + InterceptIdPreCallValidateCmdSetStencilOpEXT, + InterceptIdPreCallRecordCmdSetStencilOpEXT, + InterceptIdPostCallRecordCmdSetStencilOpEXT, + InterceptIdPreCallValidateCopyMemoryToImageEXT, + InterceptIdPreCallRecordCopyMemoryToImageEXT, + InterceptIdPostCallRecordCopyMemoryToImageEXT, + InterceptIdPreCallValidateCopyImageToMemoryEXT, + InterceptIdPreCallRecordCopyImageToMemoryEXT, + InterceptIdPostCallRecordCopyImageToMemoryEXT, + InterceptIdPreCallValidateCopyImageToImageEXT, + InterceptIdPreCallRecordCopyImageToImageEXT, + InterceptIdPostCallRecordCopyImageToImageEXT, + InterceptIdPreCallValidateTransitionImageLayoutEXT, + InterceptIdPreCallRecordTransitionImageLayoutEXT, + InterceptIdPostCallRecordTransitionImageLayoutEXT, + InterceptIdPreCallValidateGetImageSubresourceLayout2EXT, + InterceptIdPreCallRecordGetImageSubresourceLayout2EXT, + InterceptIdPostCallRecordGetImageSubresourceLayout2EXT, + InterceptIdPreCallValidateReleaseSwapchainImagesEXT, + InterceptIdPreCallRecordReleaseSwapchainImagesEXT, + InterceptIdPostCallRecordReleaseSwapchainImagesEXT, + InterceptIdPreCallValidateGetGeneratedCommandsMemoryRequirementsNV, + InterceptIdPreCallRecordGetGeneratedCommandsMemoryRequirementsNV, + InterceptIdPostCallRecordGetGeneratedCommandsMemoryRequirementsNV, + InterceptIdPreCallValidateCmdPreprocessGeneratedCommandsNV, + InterceptIdPreCallRecordCmdPreprocessGeneratedCommandsNV, + InterceptIdPostCallRecordCmdPreprocessGeneratedCommandsNV, + InterceptIdPreCallValidateCmdExecuteGeneratedCommandsNV, + InterceptIdPreCallRecordCmdExecuteGeneratedCommandsNV, + InterceptIdPostCallRecordCmdExecuteGeneratedCommandsNV, + InterceptIdPreCallValidateCmdBindPipelineShaderGroupNV, + InterceptIdPreCallRecordCmdBindPipelineShaderGroupNV, + InterceptIdPostCallRecordCmdBindPipelineShaderGroupNV, + InterceptIdPreCallValidateCreateIndirectCommandsLayoutNV, + InterceptIdPreCallRecordCreateIndirectCommandsLayoutNV, + InterceptIdPostCallRecordCreateIndirectCommandsLayoutNV, + InterceptIdPreCallValidateDestroyIndirectCommandsLayoutNV, + InterceptIdPreCallRecordDestroyIndirectCommandsLayoutNV, + InterceptIdPostCallRecordDestroyIndirectCommandsLayoutNV, + InterceptIdPreCallValidateCmdSetDepthBias2EXT, + InterceptIdPreCallRecordCmdSetDepthBias2EXT, + InterceptIdPostCallRecordCmdSetDepthBias2EXT, + InterceptIdPreCallValidateCreatePrivateDataSlotEXT, + InterceptIdPreCallRecordCreatePrivateDataSlotEXT, + InterceptIdPostCallRecordCreatePrivateDataSlotEXT, + InterceptIdPreCallValidateDestroyPrivateDataSlotEXT, + InterceptIdPreCallRecordDestroyPrivateDataSlotEXT, + InterceptIdPostCallRecordDestroyPrivateDataSlotEXT, + InterceptIdPreCallValidateSetPrivateDataEXT, + InterceptIdPreCallRecordSetPrivateDataEXT, + InterceptIdPostCallRecordSetPrivateDataEXT, + InterceptIdPreCallValidateGetPrivateDataEXT, + InterceptIdPreCallRecordGetPrivateDataEXT, + InterceptIdPostCallRecordGetPrivateDataEXT, + InterceptIdPreCallValidateCreateCudaModuleNV, + InterceptIdPreCallRecordCreateCudaModuleNV, + InterceptIdPostCallRecordCreateCudaModuleNV, + InterceptIdPreCallValidateGetCudaModuleCacheNV, + InterceptIdPreCallRecordGetCudaModuleCacheNV, + InterceptIdPostCallRecordGetCudaModuleCacheNV, + InterceptIdPreCallValidateCreateCudaFunctionNV, + InterceptIdPreCallRecordCreateCudaFunctionNV, + InterceptIdPostCallRecordCreateCudaFunctionNV, + InterceptIdPreCallValidateDestroyCudaModuleNV, + InterceptIdPreCallRecordDestroyCudaModuleNV, + InterceptIdPostCallRecordDestroyCudaModuleNV, + InterceptIdPreCallValidateDestroyCudaFunctionNV, + InterceptIdPreCallRecordDestroyCudaFunctionNV, + InterceptIdPostCallRecordDestroyCudaFunctionNV, + InterceptIdPreCallValidateCmdCudaLaunchKernelNV, + InterceptIdPreCallRecordCmdCudaLaunchKernelNV, + InterceptIdPostCallRecordCmdCudaLaunchKernelNV, + InterceptIdPreCallValidateExportMetalObjectsEXT, + InterceptIdPreCallRecordExportMetalObjectsEXT, + InterceptIdPostCallRecordExportMetalObjectsEXT, + InterceptIdPreCallValidateGetDescriptorSetLayoutSizeEXT, + InterceptIdPreCallRecordGetDescriptorSetLayoutSizeEXT, + InterceptIdPostCallRecordGetDescriptorSetLayoutSizeEXT, + InterceptIdPreCallValidateGetDescriptorSetLayoutBindingOffsetEXT, + InterceptIdPreCallRecordGetDescriptorSetLayoutBindingOffsetEXT, + InterceptIdPostCallRecordGetDescriptorSetLayoutBindingOffsetEXT, + InterceptIdPreCallValidateGetDescriptorEXT, + InterceptIdPreCallRecordGetDescriptorEXT, + InterceptIdPostCallRecordGetDescriptorEXT, + InterceptIdPreCallValidateCmdBindDescriptorBuffersEXT, + InterceptIdPreCallRecordCmdBindDescriptorBuffersEXT, + InterceptIdPostCallRecordCmdBindDescriptorBuffersEXT, + InterceptIdPreCallValidateCmdSetDescriptorBufferOffsetsEXT, + InterceptIdPreCallRecordCmdSetDescriptorBufferOffsetsEXT, + InterceptIdPostCallRecordCmdSetDescriptorBufferOffsetsEXT, + InterceptIdPreCallValidateCmdBindDescriptorBufferEmbeddedSamplersEXT, + InterceptIdPreCallRecordCmdBindDescriptorBufferEmbeddedSamplersEXT, + InterceptIdPostCallRecordCmdBindDescriptorBufferEmbeddedSamplersEXT, + InterceptIdPreCallValidateGetBufferOpaqueCaptureDescriptorDataEXT, + InterceptIdPreCallRecordGetBufferOpaqueCaptureDescriptorDataEXT, + InterceptIdPostCallRecordGetBufferOpaqueCaptureDescriptorDataEXT, + InterceptIdPreCallValidateGetImageOpaqueCaptureDescriptorDataEXT, + InterceptIdPreCallRecordGetImageOpaqueCaptureDescriptorDataEXT, + InterceptIdPostCallRecordGetImageOpaqueCaptureDescriptorDataEXT, + InterceptIdPreCallValidateGetImageViewOpaqueCaptureDescriptorDataEXT, + InterceptIdPreCallRecordGetImageViewOpaqueCaptureDescriptorDataEXT, + InterceptIdPostCallRecordGetImageViewOpaqueCaptureDescriptorDataEXT, + InterceptIdPreCallValidateGetSamplerOpaqueCaptureDescriptorDataEXT, + InterceptIdPreCallRecordGetSamplerOpaqueCaptureDescriptorDataEXT, + InterceptIdPostCallRecordGetSamplerOpaqueCaptureDescriptorDataEXT, + InterceptIdPreCallValidateGetAccelerationStructureOpaqueCaptureDescriptorDataEXT, + InterceptIdPreCallRecordGetAccelerationStructureOpaqueCaptureDescriptorDataEXT, + InterceptIdPostCallRecordGetAccelerationStructureOpaqueCaptureDescriptorDataEXT, + InterceptIdPreCallValidateCmdSetFragmentShadingRateEnumNV, + InterceptIdPreCallRecordCmdSetFragmentShadingRateEnumNV, + InterceptIdPostCallRecordCmdSetFragmentShadingRateEnumNV, + InterceptIdPreCallValidateGetDeviceFaultInfoEXT, + InterceptIdPreCallRecordGetDeviceFaultInfoEXT, + InterceptIdPostCallRecordGetDeviceFaultInfoEXT, + InterceptIdPreCallValidateCmdSetVertexInputEXT, + InterceptIdPreCallRecordCmdSetVertexInputEXT, + InterceptIdPostCallRecordCmdSetVertexInputEXT, + InterceptIdPreCallValidateGetMemoryZirconHandleFUCHSIA, + InterceptIdPreCallRecordGetMemoryZirconHandleFUCHSIA, + InterceptIdPostCallRecordGetMemoryZirconHandleFUCHSIA, + InterceptIdPreCallValidateGetMemoryZirconHandlePropertiesFUCHSIA, + InterceptIdPreCallRecordGetMemoryZirconHandlePropertiesFUCHSIA, + InterceptIdPostCallRecordGetMemoryZirconHandlePropertiesFUCHSIA, + InterceptIdPreCallValidateImportSemaphoreZirconHandleFUCHSIA, + InterceptIdPreCallRecordImportSemaphoreZirconHandleFUCHSIA, + InterceptIdPostCallRecordImportSemaphoreZirconHandleFUCHSIA, + InterceptIdPreCallValidateGetSemaphoreZirconHandleFUCHSIA, + InterceptIdPreCallRecordGetSemaphoreZirconHandleFUCHSIA, + InterceptIdPostCallRecordGetSemaphoreZirconHandleFUCHSIA, + InterceptIdPreCallValidateCreateBufferCollectionFUCHSIA, + InterceptIdPreCallRecordCreateBufferCollectionFUCHSIA, + InterceptIdPostCallRecordCreateBufferCollectionFUCHSIA, + InterceptIdPreCallValidateSetBufferCollectionImageConstraintsFUCHSIA, + InterceptIdPreCallRecordSetBufferCollectionImageConstraintsFUCHSIA, + InterceptIdPostCallRecordSetBufferCollectionImageConstraintsFUCHSIA, + InterceptIdPreCallValidateSetBufferCollectionBufferConstraintsFUCHSIA, + InterceptIdPreCallRecordSetBufferCollectionBufferConstraintsFUCHSIA, + InterceptIdPostCallRecordSetBufferCollectionBufferConstraintsFUCHSIA, + InterceptIdPreCallValidateDestroyBufferCollectionFUCHSIA, + InterceptIdPreCallRecordDestroyBufferCollectionFUCHSIA, + InterceptIdPostCallRecordDestroyBufferCollectionFUCHSIA, + InterceptIdPreCallValidateGetBufferCollectionPropertiesFUCHSIA, + InterceptIdPreCallRecordGetBufferCollectionPropertiesFUCHSIA, + InterceptIdPostCallRecordGetBufferCollectionPropertiesFUCHSIA, + InterceptIdPreCallValidateGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI, + InterceptIdPreCallRecordGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI, + InterceptIdPostCallRecordGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI, + InterceptIdPreCallValidateCmdSubpassShadingHUAWEI, + InterceptIdPreCallRecordCmdSubpassShadingHUAWEI, + InterceptIdPostCallRecordCmdSubpassShadingHUAWEI, + InterceptIdPreCallValidateCmdBindInvocationMaskHUAWEI, + InterceptIdPreCallRecordCmdBindInvocationMaskHUAWEI, + InterceptIdPostCallRecordCmdBindInvocationMaskHUAWEI, + InterceptIdPreCallValidateGetMemoryRemoteAddressNV, + InterceptIdPreCallRecordGetMemoryRemoteAddressNV, + InterceptIdPostCallRecordGetMemoryRemoteAddressNV, + InterceptIdPreCallValidateGetPipelinePropertiesEXT, + InterceptIdPreCallRecordGetPipelinePropertiesEXT, + InterceptIdPostCallRecordGetPipelinePropertiesEXT, + InterceptIdPreCallValidateCmdSetPatchControlPointsEXT, + InterceptIdPreCallRecordCmdSetPatchControlPointsEXT, + InterceptIdPostCallRecordCmdSetPatchControlPointsEXT, + InterceptIdPreCallValidateCmdSetRasterizerDiscardEnableEXT, + InterceptIdPreCallRecordCmdSetRasterizerDiscardEnableEXT, + InterceptIdPostCallRecordCmdSetRasterizerDiscardEnableEXT, + InterceptIdPreCallValidateCmdSetDepthBiasEnableEXT, + InterceptIdPreCallRecordCmdSetDepthBiasEnableEXT, + InterceptIdPostCallRecordCmdSetDepthBiasEnableEXT, + InterceptIdPreCallValidateCmdSetLogicOpEXT, + InterceptIdPreCallRecordCmdSetLogicOpEXT, + InterceptIdPostCallRecordCmdSetLogicOpEXT, + InterceptIdPreCallValidateCmdSetPrimitiveRestartEnableEXT, + InterceptIdPreCallRecordCmdSetPrimitiveRestartEnableEXT, + InterceptIdPostCallRecordCmdSetPrimitiveRestartEnableEXT, + InterceptIdPreCallValidateCmdSetColorWriteEnableEXT, + InterceptIdPreCallRecordCmdSetColorWriteEnableEXT, + InterceptIdPostCallRecordCmdSetColorWriteEnableEXT, + InterceptIdPreCallValidateCmdDrawMultiEXT, + InterceptIdPreCallRecordCmdDrawMultiEXT, + InterceptIdPostCallRecordCmdDrawMultiEXT, + InterceptIdPreCallValidateCmdDrawMultiIndexedEXT, + InterceptIdPreCallRecordCmdDrawMultiIndexedEXT, + InterceptIdPostCallRecordCmdDrawMultiIndexedEXT, + InterceptIdPreCallValidateCreateMicromapEXT, + InterceptIdPreCallRecordCreateMicromapEXT, + InterceptIdPostCallRecordCreateMicromapEXT, + InterceptIdPreCallValidateDestroyMicromapEXT, + InterceptIdPreCallRecordDestroyMicromapEXT, + InterceptIdPostCallRecordDestroyMicromapEXT, + InterceptIdPreCallValidateCmdBuildMicromapsEXT, + InterceptIdPreCallRecordCmdBuildMicromapsEXT, + InterceptIdPostCallRecordCmdBuildMicromapsEXT, + InterceptIdPreCallValidateBuildMicromapsEXT, + InterceptIdPreCallRecordBuildMicromapsEXT, + InterceptIdPostCallRecordBuildMicromapsEXT, + InterceptIdPreCallValidateCopyMicromapEXT, + InterceptIdPreCallRecordCopyMicromapEXT, + InterceptIdPostCallRecordCopyMicromapEXT, + InterceptIdPreCallValidateCopyMicromapToMemoryEXT, + InterceptIdPreCallRecordCopyMicromapToMemoryEXT, + InterceptIdPostCallRecordCopyMicromapToMemoryEXT, + InterceptIdPreCallValidateCopyMemoryToMicromapEXT, + InterceptIdPreCallRecordCopyMemoryToMicromapEXT, + InterceptIdPostCallRecordCopyMemoryToMicromapEXT, + InterceptIdPreCallValidateWriteMicromapsPropertiesEXT, + InterceptIdPreCallRecordWriteMicromapsPropertiesEXT, + InterceptIdPostCallRecordWriteMicromapsPropertiesEXT, + InterceptIdPreCallValidateCmdCopyMicromapEXT, + InterceptIdPreCallRecordCmdCopyMicromapEXT, + InterceptIdPostCallRecordCmdCopyMicromapEXT, + InterceptIdPreCallValidateCmdCopyMicromapToMemoryEXT, + InterceptIdPreCallRecordCmdCopyMicromapToMemoryEXT, + InterceptIdPostCallRecordCmdCopyMicromapToMemoryEXT, + InterceptIdPreCallValidateCmdCopyMemoryToMicromapEXT, + InterceptIdPreCallRecordCmdCopyMemoryToMicromapEXT, + InterceptIdPostCallRecordCmdCopyMemoryToMicromapEXT, + InterceptIdPreCallValidateCmdWriteMicromapsPropertiesEXT, + InterceptIdPreCallRecordCmdWriteMicromapsPropertiesEXT, + InterceptIdPostCallRecordCmdWriteMicromapsPropertiesEXT, + InterceptIdPreCallValidateGetDeviceMicromapCompatibilityEXT, + InterceptIdPreCallRecordGetDeviceMicromapCompatibilityEXT, + InterceptIdPostCallRecordGetDeviceMicromapCompatibilityEXT, + InterceptIdPreCallValidateGetMicromapBuildSizesEXT, + InterceptIdPreCallRecordGetMicromapBuildSizesEXT, + InterceptIdPostCallRecordGetMicromapBuildSizesEXT, + InterceptIdPreCallValidateCmdDrawClusterHUAWEI, + InterceptIdPreCallRecordCmdDrawClusterHUAWEI, + InterceptIdPostCallRecordCmdDrawClusterHUAWEI, + InterceptIdPreCallValidateCmdDrawClusterIndirectHUAWEI, + InterceptIdPreCallRecordCmdDrawClusterIndirectHUAWEI, + InterceptIdPostCallRecordCmdDrawClusterIndirectHUAWEI, + InterceptIdPreCallValidateSetDeviceMemoryPriorityEXT, + InterceptIdPreCallRecordSetDeviceMemoryPriorityEXT, + InterceptIdPostCallRecordSetDeviceMemoryPriorityEXT, + InterceptIdPreCallValidateGetDescriptorSetLayoutHostMappingInfoVALVE, + InterceptIdPreCallRecordGetDescriptorSetLayoutHostMappingInfoVALVE, + InterceptIdPostCallRecordGetDescriptorSetLayoutHostMappingInfoVALVE, + InterceptIdPreCallValidateGetDescriptorSetHostMappingVALVE, + InterceptIdPreCallRecordGetDescriptorSetHostMappingVALVE, + InterceptIdPostCallRecordGetDescriptorSetHostMappingVALVE, + InterceptIdPreCallValidateCmdCopyMemoryIndirectNV, + InterceptIdPreCallRecordCmdCopyMemoryIndirectNV, + InterceptIdPostCallRecordCmdCopyMemoryIndirectNV, + InterceptIdPreCallValidateCmdCopyMemoryToImageIndirectNV, + InterceptIdPreCallRecordCmdCopyMemoryToImageIndirectNV, + InterceptIdPostCallRecordCmdCopyMemoryToImageIndirectNV, + InterceptIdPreCallValidateCmdDecompressMemoryNV, + InterceptIdPreCallRecordCmdDecompressMemoryNV, + InterceptIdPostCallRecordCmdDecompressMemoryNV, + InterceptIdPreCallValidateCmdDecompressMemoryIndirectCountNV, + InterceptIdPreCallRecordCmdDecompressMemoryIndirectCountNV, + InterceptIdPostCallRecordCmdDecompressMemoryIndirectCountNV, + InterceptIdPreCallValidateGetPipelineIndirectMemoryRequirementsNV, + InterceptIdPreCallRecordGetPipelineIndirectMemoryRequirementsNV, + InterceptIdPostCallRecordGetPipelineIndirectMemoryRequirementsNV, + InterceptIdPreCallValidateCmdUpdatePipelineIndirectBufferNV, + InterceptIdPreCallRecordCmdUpdatePipelineIndirectBufferNV, + InterceptIdPostCallRecordCmdUpdatePipelineIndirectBufferNV, + InterceptIdPreCallValidateGetPipelineIndirectDeviceAddressNV, + InterceptIdPreCallRecordGetPipelineIndirectDeviceAddressNV, + InterceptIdPostCallRecordGetPipelineIndirectDeviceAddressNV, + InterceptIdPreCallValidateCmdSetDepthClampEnableEXT, + InterceptIdPreCallRecordCmdSetDepthClampEnableEXT, + InterceptIdPostCallRecordCmdSetDepthClampEnableEXT, + InterceptIdPreCallValidateCmdSetPolygonModeEXT, + InterceptIdPreCallRecordCmdSetPolygonModeEXT, + InterceptIdPostCallRecordCmdSetPolygonModeEXT, + InterceptIdPreCallValidateCmdSetRasterizationSamplesEXT, + InterceptIdPreCallRecordCmdSetRasterizationSamplesEXT, + InterceptIdPostCallRecordCmdSetRasterizationSamplesEXT, + InterceptIdPreCallValidateCmdSetSampleMaskEXT, + InterceptIdPreCallRecordCmdSetSampleMaskEXT, + InterceptIdPostCallRecordCmdSetSampleMaskEXT, + InterceptIdPreCallValidateCmdSetAlphaToCoverageEnableEXT, + InterceptIdPreCallRecordCmdSetAlphaToCoverageEnableEXT, + InterceptIdPostCallRecordCmdSetAlphaToCoverageEnableEXT, + InterceptIdPreCallValidateCmdSetAlphaToOneEnableEXT, + InterceptIdPreCallRecordCmdSetAlphaToOneEnableEXT, + InterceptIdPostCallRecordCmdSetAlphaToOneEnableEXT, + InterceptIdPreCallValidateCmdSetLogicOpEnableEXT, + InterceptIdPreCallRecordCmdSetLogicOpEnableEXT, + InterceptIdPostCallRecordCmdSetLogicOpEnableEXT, + InterceptIdPreCallValidateCmdSetColorBlendEnableEXT, + InterceptIdPreCallRecordCmdSetColorBlendEnableEXT, + InterceptIdPostCallRecordCmdSetColorBlendEnableEXT, + InterceptIdPreCallValidateCmdSetColorBlendEquationEXT, + InterceptIdPreCallRecordCmdSetColorBlendEquationEXT, + InterceptIdPostCallRecordCmdSetColorBlendEquationEXT, + InterceptIdPreCallValidateCmdSetColorWriteMaskEXT, + InterceptIdPreCallRecordCmdSetColorWriteMaskEXT, + InterceptIdPostCallRecordCmdSetColorWriteMaskEXT, + InterceptIdPreCallValidateCmdSetTessellationDomainOriginEXT, + InterceptIdPreCallRecordCmdSetTessellationDomainOriginEXT, + InterceptIdPostCallRecordCmdSetTessellationDomainOriginEXT, + InterceptIdPreCallValidateCmdSetRasterizationStreamEXT, + InterceptIdPreCallRecordCmdSetRasterizationStreamEXT, + InterceptIdPostCallRecordCmdSetRasterizationStreamEXT, + InterceptIdPreCallValidateCmdSetConservativeRasterizationModeEXT, + InterceptIdPreCallRecordCmdSetConservativeRasterizationModeEXT, + InterceptIdPostCallRecordCmdSetConservativeRasterizationModeEXT, + InterceptIdPreCallValidateCmdSetExtraPrimitiveOverestimationSizeEXT, + InterceptIdPreCallRecordCmdSetExtraPrimitiveOverestimationSizeEXT, + InterceptIdPostCallRecordCmdSetExtraPrimitiveOverestimationSizeEXT, + InterceptIdPreCallValidateCmdSetDepthClipEnableEXT, + InterceptIdPreCallRecordCmdSetDepthClipEnableEXT, + InterceptIdPostCallRecordCmdSetDepthClipEnableEXT, + InterceptIdPreCallValidateCmdSetSampleLocationsEnableEXT, + InterceptIdPreCallRecordCmdSetSampleLocationsEnableEXT, + InterceptIdPostCallRecordCmdSetSampleLocationsEnableEXT, + InterceptIdPreCallValidateCmdSetColorBlendAdvancedEXT, + InterceptIdPreCallRecordCmdSetColorBlendAdvancedEXT, + InterceptIdPostCallRecordCmdSetColorBlendAdvancedEXT, + InterceptIdPreCallValidateCmdSetProvokingVertexModeEXT, + InterceptIdPreCallRecordCmdSetProvokingVertexModeEXT, + InterceptIdPostCallRecordCmdSetProvokingVertexModeEXT, + InterceptIdPreCallValidateCmdSetLineRasterizationModeEXT, + InterceptIdPreCallRecordCmdSetLineRasterizationModeEXT, + InterceptIdPostCallRecordCmdSetLineRasterizationModeEXT, + InterceptIdPreCallValidateCmdSetLineStippleEnableEXT, + InterceptIdPreCallRecordCmdSetLineStippleEnableEXT, + InterceptIdPostCallRecordCmdSetLineStippleEnableEXT, + InterceptIdPreCallValidateCmdSetDepthClipNegativeOneToOneEXT, + InterceptIdPreCallRecordCmdSetDepthClipNegativeOneToOneEXT, + InterceptIdPostCallRecordCmdSetDepthClipNegativeOneToOneEXT, + InterceptIdPreCallValidateCmdSetViewportWScalingEnableNV, + InterceptIdPreCallRecordCmdSetViewportWScalingEnableNV, + InterceptIdPostCallRecordCmdSetViewportWScalingEnableNV, + InterceptIdPreCallValidateCmdSetViewportSwizzleNV, + InterceptIdPreCallRecordCmdSetViewportSwizzleNV, + InterceptIdPostCallRecordCmdSetViewportSwizzleNV, + InterceptIdPreCallValidateCmdSetCoverageToColorEnableNV, + InterceptIdPreCallRecordCmdSetCoverageToColorEnableNV, + InterceptIdPostCallRecordCmdSetCoverageToColorEnableNV, + InterceptIdPreCallValidateCmdSetCoverageToColorLocationNV, + InterceptIdPreCallRecordCmdSetCoverageToColorLocationNV, + InterceptIdPostCallRecordCmdSetCoverageToColorLocationNV, + InterceptIdPreCallValidateCmdSetCoverageModulationModeNV, + InterceptIdPreCallRecordCmdSetCoverageModulationModeNV, + InterceptIdPostCallRecordCmdSetCoverageModulationModeNV, + InterceptIdPreCallValidateCmdSetCoverageModulationTableEnableNV, + InterceptIdPreCallRecordCmdSetCoverageModulationTableEnableNV, + InterceptIdPostCallRecordCmdSetCoverageModulationTableEnableNV, + InterceptIdPreCallValidateCmdSetCoverageModulationTableNV, + InterceptIdPreCallRecordCmdSetCoverageModulationTableNV, + InterceptIdPostCallRecordCmdSetCoverageModulationTableNV, + InterceptIdPreCallValidateCmdSetShadingRateImageEnableNV, + InterceptIdPreCallRecordCmdSetShadingRateImageEnableNV, + InterceptIdPostCallRecordCmdSetShadingRateImageEnableNV, + InterceptIdPreCallValidateCmdSetRepresentativeFragmentTestEnableNV, + InterceptIdPreCallRecordCmdSetRepresentativeFragmentTestEnableNV, + InterceptIdPostCallRecordCmdSetRepresentativeFragmentTestEnableNV, + InterceptIdPreCallValidateCmdSetCoverageReductionModeNV, + InterceptIdPreCallRecordCmdSetCoverageReductionModeNV, + InterceptIdPostCallRecordCmdSetCoverageReductionModeNV, + InterceptIdPreCallValidateGetShaderModuleIdentifierEXT, + InterceptIdPreCallRecordGetShaderModuleIdentifierEXT, + InterceptIdPostCallRecordGetShaderModuleIdentifierEXT, + InterceptIdPreCallValidateGetShaderModuleCreateInfoIdentifierEXT, + InterceptIdPreCallRecordGetShaderModuleCreateInfoIdentifierEXT, + InterceptIdPostCallRecordGetShaderModuleCreateInfoIdentifierEXT, + InterceptIdPreCallValidateCreateOpticalFlowSessionNV, + InterceptIdPreCallRecordCreateOpticalFlowSessionNV, + InterceptIdPostCallRecordCreateOpticalFlowSessionNV, + InterceptIdPreCallValidateDestroyOpticalFlowSessionNV, + InterceptIdPreCallRecordDestroyOpticalFlowSessionNV, + InterceptIdPostCallRecordDestroyOpticalFlowSessionNV, + InterceptIdPreCallValidateBindOpticalFlowSessionImageNV, + InterceptIdPreCallRecordBindOpticalFlowSessionImageNV, + InterceptIdPostCallRecordBindOpticalFlowSessionImageNV, + InterceptIdPreCallValidateCmdOpticalFlowExecuteNV, + InterceptIdPreCallRecordCmdOpticalFlowExecuteNV, + InterceptIdPostCallRecordCmdOpticalFlowExecuteNV, + InterceptIdPreCallValidateAntiLagUpdateAMD, + InterceptIdPreCallRecordAntiLagUpdateAMD, + InterceptIdPostCallRecordAntiLagUpdateAMD, + InterceptIdPreCallValidateDestroyShaderEXT, + InterceptIdPreCallRecordDestroyShaderEXT, + InterceptIdPostCallRecordDestroyShaderEXT, + InterceptIdPreCallValidateGetShaderBinaryDataEXT, + InterceptIdPreCallRecordGetShaderBinaryDataEXT, + InterceptIdPostCallRecordGetShaderBinaryDataEXT, + InterceptIdPreCallValidateCmdBindShadersEXT, + InterceptIdPreCallRecordCmdBindShadersEXT, + InterceptIdPostCallRecordCmdBindShadersEXT, + InterceptIdPreCallValidateCmdSetDepthClampRangeEXT, + InterceptIdPreCallRecordCmdSetDepthClampRangeEXT, + InterceptIdPostCallRecordCmdSetDepthClampRangeEXT, + InterceptIdPreCallValidateGetFramebufferTilePropertiesQCOM, + InterceptIdPreCallRecordGetFramebufferTilePropertiesQCOM, + InterceptIdPostCallRecordGetFramebufferTilePropertiesQCOM, + InterceptIdPreCallValidateGetDynamicRenderingTilePropertiesQCOM, + InterceptIdPreCallRecordGetDynamicRenderingTilePropertiesQCOM, + InterceptIdPostCallRecordGetDynamicRenderingTilePropertiesQCOM, + InterceptIdPreCallValidateSetLatencySleepModeNV, + InterceptIdPreCallRecordSetLatencySleepModeNV, + InterceptIdPostCallRecordSetLatencySleepModeNV, + InterceptIdPreCallValidateLatencySleepNV, + InterceptIdPreCallRecordLatencySleepNV, + InterceptIdPostCallRecordLatencySleepNV, + InterceptIdPreCallValidateSetLatencyMarkerNV, + InterceptIdPreCallRecordSetLatencyMarkerNV, + InterceptIdPostCallRecordSetLatencyMarkerNV, + InterceptIdPreCallValidateGetLatencyTimingsNV, + InterceptIdPreCallRecordGetLatencyTimingsNV, + InterceptIdPostCallRecordGetLatencyTimingsNV, + InterceptIdPreCallValidateQueueNotifyOutOfBandNV, + InterceptIdPreCallRecordQueueNotifyOutOfBandNV, + InterceptIdPostCallRecordQueueNotifyOutOfBandNV, + InterceptIdPreCallValidateCmdSetAttachmentFeedbackLoopEnableEXT, + InterceptIdPreCallRecordCmdSetAttachmentFeedbackLoopEnableEXT, + InterceptIdPostCallRecordCmdSetAttachmentFeedbackLoopEnableEXT, + InterceptIdPreCallValidateGetScreenBufferPropertiesQNX, + InterceptIdPreCallRecordGetScreenBufferPropertiesQNX, + InterceptIdPostCallRecordGetScreenBufferPropertiesQNX, + InterceptIdPreCallValidateGetGeneratedCommandsMemoryRequirementsEXT, + InterceptIdPreCallRecordGetGeneratedCommandsMemoryRequirementsEXT, + InterceptIdPostCallRecordGetGeneratedCommandsMemoryRequirementsEXT, + InterceptIdPreCallValidateCmdPreprocessGeneratedCommandsEXT, + InterceptIdPreCallRecordCmdPreprocessGeneratedCommandsEXT, + InterceptIdPostCallRecordCmdPreprocessGeneratedCommandsEXT, + InterceptIdPreCallValidateCmdExecuteGeneratedCommandsEXT, + InterceptIdPreCallRecordCmdExecuteGeneratedCommandsEXT, + InterceptIdPostCallRecordCmdExecuteGeneratedCommandsEXT, + InterceptIdPreCallValidateCreateIndirectCommandsLayoutEXT, + InterceptIdPreCallRecordCreateIndirectCommandsLayoutEXT, + InterceptIdPostCallRecordCreateIndirectCommandsLayoutEXT, + InterceptIdPreCallValidateDestroyIndirectCommandsLayoutEXT, + InterceptIdPreCallRecordDestroyIndirectCommandsLayoutEXT, + InterceptIdPostCallRecordDestroyIndirectCommandsLayoutEXT, + InterceptIdPreCallValidateCreateIndirectExecutionSetEXT, + InterceptIdPreCallRecordCreateIndirectExecutionSetEXT, + InterceptIdPostCallRecordCreateIndirectExecutionSetEXT, + InterceptIdPreCallValidateDestroyIndirectExecutionSetEXT, + InterceptIdPreCallRecordDestroyIndirectExecutionSetEXT, + InterceptIdPostCallRecordDestroyIndirectExecutionSetEXT, + InterceptIdPreCallValidateUpdateIndirectExecutionSetPipelineEXT, + InterceptIdPreCallRecordUpdateIndirectExecutionSetPipelineEXT, + InterceptIdPostCallRecordUpdateIndirectExecutionSetPipelineEXT, + InterceptIdPreCallValidateUpdateIndirectExecutionSetShaderEXT, + InterceptIdPreCallRecordUpdateIndirectExecutionSetShaderEXT, + InterceptIdPostCallRecordUpdateIndirectExecutionSetShaderEXT, + InterceptIdPreCallValidateCreateAccelerationStructureKHR, + InterceptIdPreCallRecordCreateAccelerationStructureKHR, + InterceptIdPostCallRecordCreateAccelerationStructureKHR, + InterceptIdPreCallValidateDestroyAccelerationStructureKHR, + InterceptIdPreCallRecordDestroyAccelerationStructureKHR, + InterceptIdPostCallRecordDestroyAccelerationStructureKHR, + InterceptIdPreCallValidateCmdBuildAccelerationStructuresKHR, + InterceptIdPreCallRecordCmdBuildAccelerationStructuresKHR, + InterceptIdPostCallRecordCmdBuildAccelerationStructuresKHR, + InterceptIdPreCallValidateCmdBuildAccelerationStructuresIndirectKHR, + InterceptIdPreCallRecordCmdBuildAccelerationStructuresIndirectKHR, + InterceptIdPostCallRecordCmdBuildAccelerationStructuresIndirectKHR, + InterceptIdPreCallValidateBuildAccelerationStructuresKHR, + InterceptIdPreCallRecordBuildAccelerationStructuresKHR, + InterceptIdPostCallRecordBuildAccelerationStructuresKHR, + InterceptIdPreCallValidateCopyAccelerationStructureKHR, + InterceptIdPreCallRecordCopyAccelerationStructureKHR, + InterceptIdPostCallRecordCopyAccelerationStructureKHR, + InterceptIdPreCallValidateCopyAccelerationStructureToMemoryKHR, + InterceptIdPreCallRecordCopyAccelerationStructureToMemoryKHR, + InterceptIdPostCallRecordCopyAccelerationStructureToMemoryKHR, + InterceptIdPreCallValidateCopyMemoryToAccelerationStructureKHR, + InterceptIdPreCallRecordCopyMemoryToAccelerationStructureKHR, + InterceptIdPostCallRecordCopyMemoryToAccelerationStructureKHR, + InterceptIdPreCallValidateWriteAccelerationStructuresPropertiesKHR, + InterceptIdPreCallRecordWriteAccelerationStructuresPropertiesKHR, + InterceptIdPostCallRecordWriteAccelerationStructuresPropertiesKHR, + InterceptIdPreCallValidateCmdCopyAccelerationStructureKHR, + InterceptIdPreCallRecordCmdCopyAccelerationStructureKHR, + InterceptIdPostCallRecordCmdCopyAccelerationStructureKHR, + InterceptIdPreCallValidateCmdCopyAccelerationStructureToMemoryKHR, + InterceptIdPreCallRecordCmdCopyAccelerationStructureToMemoryKHR, + InterceptIdPostCallRecordCmdCopyAccelerationStructureToMemoryKHR, + InterceptIdPreCallValidateCmdCopyMemoryToAccelerationStructureKHR, + InterceptIdPreCallRecordCmdCopyMemoryToAccelerationStructureKHR, + InterceptIdPostCallRecordCmdCopyMemoryToAccelerationStructureKHR, + InterceptIdPreCallValidateGetAccelerationStructureDeviceAddressKHR, + InterceptIdPreCallRecordGetAccelerationStructureDeviceAddressKHR, + InterceptIdPostCallRecordGetAccelerationStructureDeviceAddressKHR, + InterceptIdPreCallValidateCmdWriteAccelerationStructuresPropertiesKHR, + InterceptIdPreCallRecordCmdWriteAccelerationStructuresPropertiesKHR, + InterceptIdPostCallRecordCmdWriteAccelerationStructuresPropertiesKHR, + InterceptIdPreCallValidateGetDeviceAccelerationStructureCompatibilityKHR, + InterceptIdPreCallRecordGetDeviceAccelerationStructureCompatibilityKHR, + InterceptIdPostCallRecordGetDeviceAccelerationStructureCompatibilityKHR, + InterceptIdPreCallValidateGetAccelerationStructureBuildSizesKHR, + InterceptIdPreCallRecordGetAccelerationStructureBuildSizesKHR, + InterceptIdPostCallRecordGetAccelerationStructureBuildSizesKHR, + InterceptIdPreCallValidateCmdTraceRaysKHR, + InterceptIdPreCallRecordCmdTraceRaysKHR, + InterceptIdPostCallRecordCmdTraceRaysKHR, + InterceptIdPreCallValidateGetRayTracingCaptureReplayShaderGroupHandlesKHR, + InterceptIdPreCallRecordGetRayTracingCaptureReplayShaderGroupHandlesKHR, + InterceptIdPostCallRecordGetRayTracingCaptureReplayShaderGroupHandlesKHR, + InterceptIdPreCallValidateCmdTraceRaysIndirectKHR, + InterceptIdPreCallRecordCmdTraceRaysIndirectKHR, + InterceptIdPostCallRecordCmdTraceRaysIndirectKHR, + InterceptIdPreCallValidateGetRayTracingShaderGroupStackSizeKHR, + InterceptIdPreCallRecordGetRayTracingShaderGroupStackSizeKHR, + InterceptIdPostCallRecordGetRayTracingShaderGroupStackSizeKHR, + InterceptIdPreCallValidateCmdSetRayTracingPipelineStackSizeKHR, + InterceptIdPreCallRecordCmdSetRayTracingPipelineStackSizeKHR, + InterceptIdPostCallRecordCmdSetRayTracingPipelineStackSizeKHR, + InterceptIdPreCallValidateCmdDrawMeshTasksEXT, + InterceptIdPreCallRecordCmdDrawMeshTasksEXT, + InterceptIdPostCallRecordCmdDrawMeshTasksEXT, + InterceptIdPreCallValidateCmdDrawMeshTasksIndirectEXT, + InterceptIdPreCallRecordCmdDrawMeshTasksIndirectEXT, + InterceptIdPostCallRecordCmdDrawMeshTasksIndirectEXT, + InterceptIdPreCallValidateCmdDrawMeshTasksIndirectCountEXT, + InterceptIdPreCallRecordCmdDrawMeshTasksIndirectCountEXT, + InterceptIdPostCallRecordCmdDrawMeshTasksIndirectCountEXT, + InterceptIdCount, +} InterceptId; + +// NOLINTEND diff --git a/layers/vulkan/generated/layer_chassis_dispatch.cpp b/layers/vulkan/generated/layer_chassis_dispatch.cpp deleted file mode 100644 index c5468bc6ce3..00000000000 --- a/layers/vulkan/generated/layer_chassis_dispatch.cpp +++ /dev/null @@ -1,9732 +0,0 @@ -// *** THIS FILE IS GENERATED - DO NOT EDIT *** -// See layer_chassis_dispatch_generator.py for modifications - -/*************************************************************************** - * - * Copyright (c) 2015-2024 The Khronos Group Inc. - * Copyright (c) 2015-2024 Valve Corporation - * Copyright (c) 2015-2024 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. - ****************************************************************************/ - -// NOLINTBEGIN - -#include "utils/cast_utils.h" -#include "chassis.h" -#include "layer_chassis_dispatch.h" -#include -#include "state_tracker/pipeline_state.h" -#include "containers/custom_containers.h" - -#define DISPATCH_MAX_STACK_ALLOCATIONS 32 - -// Unique Objects pNext extension handling function -void UnwrapPnextChainHandles(DispatchObject* layer_data, const void* pNext) { - void* cur_pnext = const_cast(pNext); - while (cur_pnext != nullptr) { - VkBaseOutStructure* header = reinterpret_cast(cur_pnext); - - switch (header->sType) { - case VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->stage.module) { - safe_struct->stage.module = layer_data->Unwrap(safe_struct->stage.module); - } - UnwrapPnextChainHandles(layer_data, safe_struct->stage.pNext); - - if (safe_struct->layout) { - safe_struct->layout = layer_data->Unwrap(safe_struct->layout); - } - if (safe_struct->basePipelineHandle) { - safe_struct->basePipelineHandle = layer_data->Unwrap(safe_struct->basePipelineHandle); - } - } break; - case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO: { - auto* safe_struct = reinterpret_cast(cur_pnext); - if (safe_struct->pStages) { - for (uint32_t index0 = 0; index0 < safe_struct->stageCount; ++index0) { - UnwrapPnextChainHandles(layer_data, safe_struct->pStages[index0].pNext); - - if (safe_struct->pStages[index0].module) { - safe_struct->pStages[index0].module = layer_data->Unwrap(safe_struct->pStages[index0].module); - } - } - } - - if (safe_struct->layout) { - safe_struct->layout = layer_data->Unwrap(safe_struct->layout); - } - if (safe_struct->renderPass) { - safe_struct->renderPass = layer_data->Unwrap(safe_struct->renderPass); - } - if (safe_struct->basePipelineHandle) { - safe_struct->basePipelineHandle = layer_data->Unwrap(safe_struct->basePipelineHandle); - } - } break; - case VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_KHR: { - auto* safe_struct = reinterpret_cast(cur_pnext); - if (safe_struct->pStages) { - for (uint32_t index0 = 0; index0 < safe_struct->stageCount; ++index0) { - UnwrapPnextChainHandles(layer_data, safe_struct->pStages[index0].pNext); - - if (safe_struct->pStages[index0].module) { - safe_struct->pStages[index0].module = layer_data->Unwrap(safe_struct->pStages[index0].module); - } - } - } - if (safe_struct->pLibraryInfo) { - if (safe_struct->pLibraryInfo->pLibraries) { - for (uint32_t index1 = 0; index1 < safe_struct->pLibraryInfo->libraryCount; ++index1) { - safe_struct->pLibraryInfo->pLibraries[index1] = - layer_data->Unwrap(safe_struct->pLibraryInfo->pLibraries[index1]); - } - } - } - - if (safe_struct->layout) { - safe_struct->layout = layer_data->Unwrap(safe_struct->layout); - } - if (safe_struct->basePipelineHandle) { - safe_struct->basePipelineHandle = layer_data->Unwrap(safe_struct->basePipelineHandle); - } - } break; -#ifdef VK_ENABLE_BETA_EXTENSIONS - case VK_STRUCTURE_TYPE_EXECUTION_GRAPH_PIPELINE_CREATE_INFO_AMDX: { - auto* safe_struct = reinterpret_cast(cur_pnext); - if (safe_struct->pStages) { - for (uint32_t index0 = 0; index0 < safe_struct->stageCount; ++index0) { - UnwrapPnextChainHandles(layer_data, safe_struct->pStages[index0].pNext); - - if (safe_struct->pStages[index0].module) { - safe_struct->pStages[index0].module = layer_data->Unwrap(safe_struct->pStages[index0].module); - } - } - } - if (safe_struct->pLibraryInfo) { - if (safe_struct->pLibraryInfo->pLibraries) { - for (uint32_t index1 = 0; index1 < safe_struct->pLibraryInfo->libraryCount; ++index1) { - safe_struct->pLibraryInfo->pLibraries[index1] = - layer_data->Unwrap(safe_struct->pLibraryInfo->pLibraries[index1]); - } - } - } - - if (safe_struct->layout) { - safe_struct->layout = layer_data->Unwrap(safe_struct->layout); - } - if (safe_struct->basePipelineHandle) { - safe_struct->basePipelineHandle = layer_data->Unwrap(safe_struct->basePipelineHandle); - } - } break; -#endif // VK_ENABLE_BETA_EXTENSIONS - case VK_STRUCTURE_TYPE_FRAME_BOUNDARY_EXT: { - auto* safe_struct = reinterpret_cast(cur_pnext); - if (safe_struct->pImages) { - for (uint32_t index0 = 0; index0 < safe_struct->imageCount; ++index0) { - safe_struct->pImages[index0] = layer_data->Unwrap(safe_struct->pImages[index0]); - } - } - if (safe_struct->pBuffers) { - for (uint32_t index0 = 0; index0 < safe_struct->bufferCount; ++index0) { - safe_struct->pBuffers[index0] = layer_data->Unwrap(safe_struct->pBuffers[index0]); - } - } - } break; -#ifdef VK_USE_PLATFORM_WIN32_KHR - case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR: { - auto* safe_struct = reinterpret_cast(cur_pnext); - if (safe_struct->pAcquireSyncs) { - for (uint32_t index0 = 0; index0 < safe_struct->acquireCount; ++index0) { - safe_struct->pAcquireSyncs[index0] = layer_data->Unwrap(safe_struct->pAcquireSyncs[index0]); - } - } - if (safe_struct->pReleaseSyncs) { - for (uint32_t index0 = 0; index0 < safe_struct->releaseCount; ++index0) { - safe_struct->pReleaseSyncs[index0] = layer_data->Unwrap(safe_struct->pReleaseSyncs[index0]); - } - } - } break; - case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV: { - auto* safe_struct = reinterpret_cast(cur_pnext); - if (safe_struct->pAcquireSyncs) { - for (uint32_t index0 = 0; index0 < safe_struct->acquireCount; ++index0) { - safe_struct->pAcquireSyncs[index0] = layer_data->Unwrap(safe_struct->pAcquireSyncs[index0]); - } - } - if (safe_struct->pReleaseSyncs) { - for (uint32_t index0 = 0; index0 < safe_struct->releaseCount; ++index0) { - safe_struct->pReleaseSyncs[index0] = layer_data->Unwrap(safe_struct->pReleaseSyncs[index0]); - } - } - } break; -#endif // VK_USE_PLATFORM_WIN32_KHR - case VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->image) { - safe_struct->image = layer_data->Unwrap(safe_struct->image); - } - if (safe_struct->buffer) { - safe_struct->buffer = layer_data->Unwrap(safe_struct->buffer); - } - } break; -#ifdef VK_USE_PLATFORM_FUCHSIA - case VK_STRUCTURE_TYPE_IMPORT_MEMORY_BUFFER_COLLECTION_FUCHSIA: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->collection) { - safe_struct->collection = layer_data->Unwrap(safe_struct->collection); - } - } break; -#endif // VK_USE_PLATFORM_FUCHSIA - case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->image) { - safe_struct->image = layer_data->Unwrap(safe_struct->image); - } - if (safe_struct->buffer) { - safe_struct->buffer = layer_data->Unwrap(safe_struct->buffer); - } - } break; -#ifdef VK_USE_PLATFORM_FUCHSIA - case VK_STRUCTURE_TYPE_BUFFER_COLLECTION_BUFFER_CREATE_INFO_FUCHSIA: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->collection) { - safe_struct->collection = layer_data->Unwrap(safe_struct->collection); - } - } break; - case VK_STRUCTURE_TYPE_BUFFER_COLLECTION_IMAGE_CREATE_INFO_FUCHSIA: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->collection) { - safe_struct->collection = layer_data->Unwrap(safe_struct->collection); - } - } break; -#endif // VK_USE_PLATFORM_FUCHSIA - case VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->swapchain) { - safe_struct->swapchain = layer_data->Unwrap(safe_struct->swapchain); - } - } break; - case VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->conversion) { - safe_struct->conversion = layer_data->Unwrap(safe_struct->conversion); - } - } break; - case VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->validationCache) { - safe_struct->validationCache = layer_data->Unwrap(safe_struct->validationCache); - } - } break; - case VK_STRUCTURE_TYPE_PIPELINE_BINARY_INFO_KHR: { - auto* safe_struct = reinterpret_cast(cur_pnext); - if (safe_struct->pPipelineBinaries) { - for (uint32_t index0 = 0; index0 < safe_struct->binaryCount; ++index0) { - safe_struct->pPipelineBinaries[index0] = layer_data->Unwrap(safe_struct->pPipelineBinaries[index0]); - } - } - } break; - case VK_STRUCTURE_TYPE_SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->renderPass) { - safe_struct->renderPass = layer_data->Unwrap(safe_struct->renderPass); - } - } break; - case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_SHADER_GROUPS_CREATE_INFO_NV: { - auto* safe_struct = reinterpret_cast(cur_pnext); - if (safe_struct->pGroups) { - for (uint32_t index0 = 0; index0 < safe_struct->groupCount; ++index0) { - if (safe_struct->pGroups[index0].pStages) { - for (uint32_t index1 = 0; index1 < safe_struct->pGroups[index0].stageCount; ++index1) { - UnwrapPnextChainHandles(layer_data, safe_struct->pGroups[index0].pStages[index1].pNext); - - if (safe_struct->pGroups[index0].pStages[index1].module) { - safe_struct->pGroups[index0].pStages[index1].module = - layer_data->Unwrap(safe_struct->pGroups[index0].pStages[index1].module); - } - } - } - } - } - if (safe_struct->pPipelines) { - for (uint32_t index0 = 0; index0 < safe_struct->pipelineCount; ++index0) { - safe_struct->pPipelines[index0] = layer_data->Unwrap(safe_struct->pPipelines[index0]); - } - } - } break; - case VK_STRUCTURE_TYPE_PIPELINE_LIBRARY_CREATE_INFO_KHR: { - auto* safe_struct = reinterpret_cast(cur_pnext); - if (safe_struct->pLibraries) { - for (uint32_t index0 = 0; index0 < safe_struct->libraryCount; ++index0) { - safe_struct->pLibraries[index0] = layer_data->Unwrap(safe_struct->pLibraries[index0]); - } - } - } break; - case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR: { - auto* safe_struct = reinterpret_cast(cur_pnext); - if (safe_struct->pAccelerationStructures) { - for (uint32_t index0 = 0; index0 < safe_struct->accelerationStructureCount; ++index0) { - safe_struct->pAccelerationStructures[index0] = - layer_data->Unwrap(safe_struct->pAccelerationStructures[index0]); - } - } - } break; - case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV: { - auto* safe_struct = reinterpret_cast(cur_pnext); - if (safe_struct->pAccelerationStructures) { - for (uint32_t index0 = 0; index0 < safe_struct->accelerationStructureCount; ++index0) { - safe_struct->pAccelerationStructures[index0] = - layer_data->Unwrap(safe_struct->pAccelerationStructures[index0]); - } - } - } break; - case VK_STRUCTURE_TYPE_RENDER_PASS_ATTACHMENT_BEGIN_INFO: { - auto* safe_struct = reinterpret_cast(cur_pnext); - if (safe_struct->pAttachments) { - for (uint32_t index0 = 0; index0 < safe_struct->attachmentCount; ++index0) { - safe_struct->pAttachments[index0] = layer_data->Unwrap(safe_struct->pAttachments[index0]); - } - } - } break; - case VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->swapchain) { - safe_struct->swapchain = layer_data->Unwrap(safe_struct->swapchain); - } - } break; - case VK_STRUCTURE_TYPE_RENDER_PASS_STRIPE_SUBMIT_INFO_ARM: { - auto* safe_struct = reinterpret_cast(cur_pnext); - if (safe_struct->pStripeSemaphoreInfos) { - for (uint32_t index0 = 0; index0 < safe_struct->stripeSemaphoreInfoCount; ++index0) { - if (safe_struct->pStripeSemaphoreInfos[index0].semaphore) { - safe_struct->pStripeSemaphoreInfos[index0].semaphore = - layer_data->Unwrap(safe_struct->pStripeSemaphoreInfos[index0].semaphore); - } - } - } - } break; - case VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_INFO_EXT: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->imageView) { - safe_struct->imageView = layer_data->Unwrap(safe_struct->imageView); - } - } break; - case VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->imageView) { - safe_struct->imageView = layer_data->Unwrap(safe_struct->imageView); - } - } break; - case VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_FENCE_INFO_EXT: { - auto* safe_struct = reinterpret_cast(cur_pnext); - if (safe_struct->pFences) { - for (uint32_t index0 = 0; index0 < safe_struct->swapchainCount; ++index0) { - safe_struct->pFences[index0] = layer_data->Unwrap(safe_struct->pFences[index0]); - } - } - } break; - case VK_STRUCTURE_TYPE_VIDEO_INLINE_QUERY_INFO_KHR: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->queryPool) { - safe_struct->queryPool = layer_data->Unwrap(safe_struct->queryPool); - } - } break; - case VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_INFO_KHR: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->quantizationMap) { - safe_struct->quantizationMap = layer_data->Unwrap(safe_struct->quantizationMap); - } - } break; - case VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO: { - auto* safe_struct = reinterpret_cast(cur_pnext); - if (safe_struct->pSetLayouts) { - for (uint32_t index0 = 0; index0 < safe_struct->setLayoutCount; ++index0) { - safe_struct->pSetLayouts[index0] = layer_data->Unwrap(safe_struct->pSetLayouts[index0]); - } - } - } break; -#ifdef VK_USE_PLATFORM_METAL_EXT - case VK_STRUCTURE_TYPE_EXPORT_METAL_BUFFER_INFO_EXT: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->memory) { - safe_struct->memory = layer_data->Unwrap(safe_struct->memory); - } - } break; - case VK_STRUCTURE_TYPE_EXPORT_METAL_IO_SURFACE_INFO_EXT: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->image) { - safe_struct->image = layer_data->Unwrap(safe_struct->image); - } - } break; - case VK_STRUCTURE_TYPE_EXPORT_METAL_SHARED_EVENT_INFO_EXT: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->semaphore) { - safe_struct->semaphore = layer_data->Unwrap(safe_struct->semaphore); - } - if (safe_struct->event) { - safe_struct->event = layer_data->Unwrap(safe_struct->event); - } - } break; - case VK_STRUCTURE_TYPE_EXPORT_METAL_TEXTURE_INFO_EXT: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->image) { - safe_struct->image = layer_data->Unwrap(safe_struct->image); - } - if (safe_struct->imageView) { - safe_struct->imageView = layer_data->Unwrap(safe_struct->imageView); - } - if (safe_struct->bufferView) { - safe_struct->bufferView = layer_data->Unwrap(safe_struct->bufferView); - } - } break; -#endif // VK_USE_PLATFORM_METAL_EXT - case VK_STRUCTURE_TYPE_DESCRIPTOR_BUFFER_BINDING_PUSH_DESCRIPTOR_BUFFER_HANDLE_EXT: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->buffer) { - safe_struct->buffer = layer_data->Unwrap(safe_struct->buffer); - } - } break; - case VK_STRUCTURE_TYPE_GENERATED_COMMANDS_PIPELINE_INFO_EXT: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->pipeline) { - safe_struct->pipeline = layer_data->Unwrap(safe_struct->pipeline); - } - } break; - case VK_STRUCTURE_TYPE_GENERATED_COMMANDS_SHADER_INFO_EXT: { - auto* safe_struct = reinterpret_cast(cur_pnext); - if (safe_struct->pShaders) { - for (uint32_t index0 = 0; index0 < safe_struct->shaderCount; ++index0) { - safe_struct->pShaders[index0] = layer_data->Unwrap(safe_struct->pShaders[index0]); - } - } - } break; -#ifdef VK_ENABLE_BETA_EXTENSIONS - case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_DISPLACEMENT_MICROMAP_NV: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->micromap) { - safe_struct->micromap = layer_data->Unwrap(safe_struct->micromap); - } - } break; -#endif // VK_ENABLE_BETA_EXTENSIONS - case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_OPACITY_MICROMAP_EXT: { - auto* safe_struct = reinterpret_cast(cur_pnext); - - if (safe_struct->micromap) { - safe_struct->micromap = layer_data->Unwrap(safe_struct->micromap); - } - } break; - - default: - break; - } - - // Process the next structure in the chain - cur_pnext = header->pNext; - } -} - -[[maybe_unused]] static bool NotDispatchableHandle(VkObjectType object_type) { - switch (object_type) { - case VK_OBJECT_TYPE_INSTANCE: - case VK_OBJECT_TYPE_PHYSICAL_DEVICE: - case VK_OBJECT_TYPE_DEVICE: - case VK_OBJECT_TYPE_QUEUE: - case VK_OBJECT_TYPE_COMMAND_BUFFER: - return false; - default: - return true; - } -} - -VkResult DispatchEnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - - VkResult result = - layer_data->instance_dispatch_table.EnumeratePhysicalDevices(instance, pPhysicalDeviceCount, pPhysicalDevices); - - return result; -} - -void DispatchGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceFeatures(physicalDevice, pFeatures); -} - -void DispatchGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, - VkFormatProperties* pFormatProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceFormatProperties(physicalDevice, format, pFormatProperties); -} - -VkResult DispatchGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, - VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, - VkImageFormatProperties* pImageFormatProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkResult result = layer_data->instance_dispatch_table.GetPhysicalDeviceImageFormatProperties( - physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties); - - return result; -} - -void DispatchGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceProperties(physicalDevice, pProperties); -} - -void DispatchGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, - VkQueueFamilyProperties* pQueueFamilyProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, - pQueueFamilyProperties); -} - -void DispatchGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, - VkPhysicalDeviceMemoryProperties* pMemoryProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceMemoryProperties(physicalDevice, pMemoryProperties); -} - -PFN_vkVoidFunction DispatchGetInstanceProcAddr(VkInstance instance, const char* pName) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - - PFN_vkVoidFunction result = layer_data->instance_dispatch_table.GetInstanceProcAddr(instance, pName); - - return result; -} - -PFN_vkVoidFunction DispatchGetDeviceProcAddr(VkDevice device, const char* pName) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - PFN_vkVoidFunction result = layer_data->device_dispatch_table.GetDeviceProcAddr(device, pName); - - return result; -} - -VkResult DispatchEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, - uint32_t* pPropertyCount, VkExtensionProperties* pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkResult result = layer_data->instance_dispatch_table.EnumerateDeviceExtensionProperties(physicalDevice, pLayerName, - pPropertyCount, pProperties); - - return result; -} - -void DispatchGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - layer_data->device_dispatch_table.GetDeviceQueue(device, queueFamilyIndex, queueIndex, pQueue); -} - -VkResult DispatchQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.QueueSubmit(queue, submitCount, pSubmits, fence); - small_vector var_local_pSubmits; - vku::safe_VkSubmitInfo* local_pSubmits = nullptr; - { - if (pSubmits) { - var_local_pSubmits.resize(submitCount); - local_pSubmits = var_local_pSubmits.data(); - for (uint32_t index0 = 0; index0 < submitCount; ++index0) { - local_pSubmits[index0].initialize(&pSubmits[index0]); - UnwrapPnextChainHandles(layer_data, local_pSubmits[index0].pNext); - if (local_pSubmits[index0].pWaitSemaphores) { - for (uint32_t index1 = 0; index1 < local_pSubmits[index0].waitSemaphoreCount; ++index1) { - local_pSubmits[index0].pWaitSemaphores[index1] = - layer_data->Unwrap(local_pSubmits[index0].pWaitSemaphores[index1]); - } - } - if (local_pSubmits[index0].pSignalSemaphores) { - for (uint32_t index1 = 0; index1 < local_pSubmits[index0].signalSemaphoreCount; ++index1) { - local_pSubmits[index0].pSignalSemaphores[index1] = - layer_data->Unwrap(local_pSubmits[index0].pSignalSemaphores[index1]); - } - } - } - } - fence = layer_data->Unwrap(fence); - } - VkResult result = layer_data->device_dispatch_table.QueueSubmit(queue, submitCount, (const VkSubmitInfo*)local_pSubmits, fence); - - return result; -} - -VkResult DispatchQueueWaitIdle(VkQueue queue) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); - - VkResult result = layer_data->device_dispatch_table.QueueWaitIdle(queue); - - return result; -} - -VkResult DispatchDeviceWaitIdle(VkDevice device) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - VkResult result = layer_data->device_dispatch_table.DeviceWaitIdle(device); - - return result; -} - -VkResult DispatchAllocateMemory(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, const VkAllocationCallbacks* pAllocator, - VkDeviceMemory* pMemory) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.AllocateMemory(device, pAllocateInfo, pAllocator, pMemory); - vku::safe_VkMemoryAllocateInfo var_local_pAllocateInfo; - vku::safe_VkMemoryAllocateInfo* local_pAllocateInfo = nullptr; - { - if (pAllocateInfo) { - local_pAllocateInfo = &var_local_pAllocateInfo; - local_pAllocateInfo->initialize(pAllocateInfo); - UnwrapPnextChainHandles(layer_data, local_pAllocateInfo->pNext); - } - } - VkResult result = layer_data->device_dispatch_table.AllocateMemory(device, (const VkMemoryAllocateInfo*)local_pAllocateInfo, - pAllocator, pMemory); - if (VK_SUCCESS == result) { - *pMemory = layer_data->WrapNew(*pMemory); - } - return result; -} - -void DispatchFreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.FreeMemory(device, memory, pAllocator); - - uint64_t memory_id = CastToUint64(memory); - auto iter = unique_id_mapping.pop(memory_id); - if (iter != unique_id_mapping.end()) { - memory = (VkDeviceMemory)iter->second; - } else { - memory = (VkDeviceMemory)0; - } - layer_data->device_dispatch_table.FreeMemory(device, memory, pAllocator); -} - -VkResult DispatchMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, - void** ppData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.MapMemory(device, memory, offset, size, flags, ppData); - { memory = layer_data->Unwrap(memory); } - VkResult result = layer_data->device_dispatch_table.MapMemory(device, memory, offset, size, flags, ppData); - - return result; -} - -void DispatchUnmapMemory(VkDevice device, VkDeviceMemory memory) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.UnmapMemory(device, memory); - { memory = layer_data->Unwrap(memory); } - layer_data->device_dispatch_table.UnmapMemory(device, memory); -} - -VkResult DispatchFlushMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.FlushMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges); - small_vector var_local_pMemoryRanges; - vku::safe_VkMappedMemoryRange* local_pMemoryRanges = nullptr; - { - if (pMemoryRanges) { - var_local_pMemoryRanges.resize(memoryRangeCount); - local_pMemoryRanges = var_local_pMemoryRanges.data(); - for (uint32_t index0 = 0; index0 < memoryRangeCount; ++index0) { - local_pMemoryRanges[index0].initialize(&pMemoryRanges[index0]); - - if (pMemoryRanges[index0].memory) { - local_pMemoryRanges[index0].memory = layer_data->Unwrap(pMemoryRanges[index0].memory); - } - } - } - } - VkResult result = layer_data->device_dispatch_table.FlushMappedMemoryRanges(device, memoryRangeCount, - (const VkMappedMemoryRange*)local_pMemoryRanges); - - return result; -} - -VkResult DispatchInvalidateMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, - const VkMappedMemoryRange* pMemoryRanges) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.InvalidateMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges); - small_vector var_local_pMemoryRanges; - vku::safe_VkMappedMemoryRange* local_pMemoryRanges = nullptr; - { - if (pMemoryRanges) { - var_local_pMemoryRanges.resize(memoryRangeCount); - local_pMemoryRanges = var_local_pMemoryRanges.data(); - for (uint32_t index0 = 0; index0 < memoryRangeCount; ++index0) { - local_pMemoryRanges[index0].initialize(&pMemoryRanges[index0]); - - if (pMemoryRanges[index0].memory) { - local_pMemoryRanges[index0].memory = layer_data->Unwrap(pMemoryRanges[index0].memory); - } - } - } - } - VkResult result = layer_data->device_dispatch_table.InvalidateMappedMemoryRanges( - device, memoryRangeCount, (const VkMappedMemoryRange*)local_pMemoryRanges); - - return result; -} - -void DispatchGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetDeviceMemoryCommitment(device, memory, pCommittedMemoryInBytes); - { memory = layer_data->Unwrap(memory); } - layer_data->device_dispatch_table.GetDeviceMemoryCommitment(device, memory, pCommittedMemoryInBytes); -} - -VkResult DispatchBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.BindBufferMemory(device, buffer, memory, memoryOffset); - { - buffer = layer_data->Unwrap(buffer); - memory = layer_data->Unwrap(memory); - } - VkResult result = layer_data->device_dispatch_table.BindBufferMemory(device, buffer, memory, memoryOffset); - - return result; -} - -VkResult DispatchBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.BindImageMemory(device, image, memory, memoryOffset); - { - image = layer_data->Unwrap(image); - memory = layer_data->Unwrap(memory); - } - VkResult result = layer_data->device_dispatch_table.BindImageMemory(device, image, memory, memoryOffset); - - return result; -} - -void DispatchGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetBufferMemoryRequirements(device, buffer, pMemoryRequirements); - { buffer = layer_data->Unwrap(buffer); } - layer_data->device_dispatch_table.GetBufferMemoryRequirements(device, buffer, pMemoryRequirements); -} - -void DispatchGetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetImageMemoryRequirements(device, image, pMemoryRequirements); - { image = layer_data->Unwrap(image); } - layer_data->device_dispatch_table.GetImageMemoryRequirements(device, image, pMemoryRequirements); -} - -void DispatchGetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements* pSparseMemoryRequirements) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetImageSparseMemoryRequirements(device, image, pSparseMemoryRequirementCount, - pSparseMemoryRequirements); - { image = layer_data->Unwrap(image); } - layer_data->device_dispatch_table.GetImageSparseMemoryRequirements(device, image, pSparseMemoryRequirementCount, - pSparseMemoryRequirements); -} - -void DispatchGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, - VkSampleCountFlagBits samples, VkImageUsageFlags usage, - VkImageTiling tiling, uint32_t* pPropertyCount, - VkSparseImageFormatProperties* pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceSparseImageFormatProperties(physicalDevice, format, type, samples, usage, - tiling, pPropertyCount, pProperties); -} - -VkResult DispatchQueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.QueueBindSparse(queue, bindInfoCount, pBindInfo, fence); - small_vector var_local_pBindInfo; - vku::safe_VkBindSparseInfo* local_pBindInfo = nullptr; - { - if (pBindInfo) { - var_local_pBindInfo.resize(bindInfoCount); - local_pBindInfo = var_local_pBindInfo.data(); - for (uint32_t index0 = 0; index0 < bindInfoCount; ++index0) { - local_pBindInfo[index0].initialize(&pBindInfo[index0]); - UnwrapPnextChainHandles(layer_data, local_pBindInfo[index0].pNext); - if (local_pBindInfo[index0].pWaitSemaphores) { - for (uint32_t index1 = 0; index1 < local_pBindInfo[index0].waitSemaphoreCount; ++index1) { - local_pBindInfo[index0].pWaitSemaphores[index1] = - layer_data->Unwrap(local_pBindInfo[index0].pWaitSemaphores[index1]); - } - } - if (local_pBindInfo[index0].pBufferBinds) { - for (uint32_t index1 = 0; index1 < local_pBindInfo[index0].bufferBindCount; ++index1) { - if (pBindInfo[index0].pBufferBinds[index1].buffer) { - local_pBindInfo[index0].pBufferBinds[index1].buffer = - layer_data->Unwrap(pBindInfo[index0].pBufferBinds[index1].buffer); - } - if (local_pBindInfo[index0].pBufferBinds[index1].pBinds) { - for (uint32_t index2 = 0; index2 < local_pBindInfo[index0].pBufferBinds[index1].bindCount; ++index2) { - if (pBindInfo[index0].pBufferBinds[index1].pBinds[index2].memory) { - local_pBindInfo[index0].pBufferBinds[index1].pBinds[index2].memory = - layer_data->Unwrap(pBindInfo[index0].pBufferBinds[index1].pBinds[index2].memory); - } - } - } - } - } - if (local_pBindInfo[index0].pImageOpaqueBinds) { - for (uint32_t index1 = 0; index1 < local_pBindInfo[index0].imageOpaqueBindCount; ++index1) { - if (pBindInfo[index0].pImageOpaqueBinds[index1].image) { - local_pBindInfo[index0].pImageOpaqueBinds[index1].image = - layer_data->Unwrap(pBindInfo[index0].pImageOpaqueBinds[index1].image); - } - if (local_pBindInfo[index0].pImageOpaqueBinds[index1].pBinds) { - for (uint32_t index2 = 0; index2 < local_pBindInfo[index0].pImageOpaqueBinds[index1].bindCount; - ++index2) { - if (pBindInfo[index0].pImageOpaqueBinds[index1].pBinds[index2].memory) { - local_pBindInfo[index0].pImageOpaqueBinds[index1].pBinds[index2].memory = - layer_data->Unwrap(pBindInfo[index0].pImageOpaqueBinds[index1].pBinds[index2].memory); - } - } - } - } - } - if (local_pBindInfo[index0].pImageBinds) { - for (uint32_t index1 = 0; index1 < local_pBindInfo[index0].imageBindCount; ++index1) { - if (pBindInfo[index0].pImageBinds[index1].image) { - local_pBindInfo[index0].pImageBinds[index1].image = - layer_data->Unwrap(pBindInfo[index0].pImageBinds[index1].image); - } - if (local_pBindInfo[index0].pImageBinds[index1].pBinds) { - for (uint32_t index2 = 0; index2 < local_pBindInfo[index0].pImageBinds[index1].bindCount; ++index2) { - if (pBindInfo[index0].pImageBinds[index1].pBinds[index2].memory) { - local_pBindInfo[index0].pImageBinds[index1].pBinds[index2].memory = - layer_data->Unwrap(pBindInfo[index0].pImageBinds[index1].pBinds[index2].memory); - } - } - } - } - } - if (local_pBindInfo[index0].pSignalSemaphores) { - for (uint32_t index1 = 0; index1 < local_pBindInfo[index0].signalSemaphoreCount; ++index1) { - local_pBindInfo[index0].pSignalSemaphores[index1] = - layer_data->Unwrap(local_pBindInfo[index0].pSignalSemaphores[index1]); - } - } - } - } - fence = layer_data->Unwrap(fence); - } - VkResult result = - layer_data->device_dispatch_table.QueueBindSparse(queue, bindInfoCount, (const VkBindSparseInfo*)local_pBindInfo, fence); - - return result; -} - -VkResult DispatchCreateFence(VkDevice device, const VkFenceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkFence* pFence) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CreateFence(device, pCreateInfo, pAllocator, pFence); - - VkResult result = layer_data->device_dispatch_table.CreateFence(device, pCreateInfo, pAllocator, pFence); - if (VK_SUCCESS == result) { - *pFence = layer_data->WrapNew(*pFence); - } - return result; -} - -void DispatchDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyFence(device, fence, pAllocator); - - uint64_t fence_id = CastToUint64(fence); - auto iter = unique_id_mapping.pop(fence_id); - if (iter != unique_id_mapping.end()) { - fence = (VkFence)iter->second; - } else { - fence = (VkFence)0; - } - layer_data->device_dispatch_table.DestroyFence(device, fence, pAllocator); -} - -VkResult DispatchResetFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.ResetFences(device, fenceCount, pFences); - small_vector var_local_pFences; - VkFence* local_pFences = nullptr; - { - if (pFences) { - var_local_pFences.resize(fenceCount); - local_pFences = var_local_pFences.data(); - for (uint32_t index0 = 0; index0 < fenceCount; ++index0) { - local_pFences[index0] = layer_data->Unwrap(pFences[index0]); - } - } - } - VkResult result = layer_data->device_dispatch_table.ResetFences(device, fenceCount, (const VkFence*)local_pFences); - - return result; -} - -VkResult DispatchGetFenceStatus(VkDevice device, VkFence fence) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetFenceStatus(device, fence); - { fence = layer_data->Unwrap(fence); } - VkResult result = layer_data->device_dispatch_table.GetFenceStatus(device, fence); - - return result; -} - -VkResult DispatchWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.WaitForFences(device, fenceCount, pFences, waitAll, timeout); - small_vector var_local_pFences; - VkFence* local_pFences = nullptr; - { - if (pFences) { - var_local_pFences.resize(fenceCount); - local_pFences = var_local_pFences.data(); - for (uint32_t index0 = 0; index0 < fenceCount; ++index0) { - local_pFences[index0] = layer_data->Unwrap(pFences[index0]); - } - } - } - VkResult result = - layer_data->device_dispatch_table.WaitForFences(device, fenceCount, (const VkFence*)local_pFences, waitAll, timeout); - - return result; -} - -VkResult DispatchCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkSemaphore* pSemaphore) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CreateSemaphore(device, pCreateInfo, pAllocator, pSemaphore); - - VkResult result = layer_data->device_dispatch_table.CreateSemaphore(device, pCreateInfo, pAllocator, pSemaphore); - if (VK_SUCCESS == result) { - *pSemaphore = layer_data->WrapNew(*pSemaphore); - } - return result; -} - -void DispatchDestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroySemaphore(device, semaphore, pAllocator); - - uint64_t semaphore_id = CastToUint64(semaphore); - auto iter = unique_id_mapping.pop(semaphore_id); - if (iter != unique_id_mapping.end()) { - semaphore = (VkSemaphore)iter->second; - } else { - semaphore = (VkSemaphore)0; - } - layer_data->device_dispatch_table.DestroySemaphore(device, semaphore, pAllocator); -} - -VkResult DispatchCreateEvent(VkDevice device, const VkEventCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkEvent* pEvent) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CreateEvent(device, pCreateInfo, pAllocator, pEvent); - - VkResult result = layer_data->device_dispatch_table.CreateEvent(device, pCreateInfo, pAllocator, pEvent); - if (VK_SUCCESS == result) { - *pEvent = layer_data->WrapNew(*pEvent); - } - return result; -} - -void DispatchDestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyEvent(device, event, pAllocator); - - uint64_t event_id = CastToUint64(event); - auto iter = unique_id_mapping.pop(event_id); - if (iter != unique_id_mapping.end()) { - event = (VkEvent)iter->second; - } else { - event = (VkEvent)0; - } - layer_data->device_dispatch_table.DestroyEvent(device, event, pAllocator); -} - -VkResult DispatchGetEventStatus(VkDevice device, VkEvent event) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetEventStatus(device, event); - { event = layer_data->Unwrap(event); } - VkResult result = layer_data->device_dispatch_table.GetEventStatus(device, event); - - return result; -} - -VkResult DispatchSetEvent(VkDevice device, VkEvent event) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.SetEvent(device, event); - { event = layer_data->Unwrap(event); } - VkResult result = layer_data->device_dispatch_table.SetEvent(device, event); - - return result; -} - -VkResult DispatchResetEvent(VkDevice device, VkEvent event) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.ResetEvent(device, event); - { event = layer_data->Unwrap(event); } - VkResult result = layer_data->device_dispatch_table.ResetEvent(device, event); - - return result; -} - -VkResult DispatchCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkQueryPool* pQueryPool) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CreateQueryPool(device, pCreateInfo, pAllocator, pQueryPool); - - VkResult result = layer_data->device_dispatch_table.CreateQueryPool(device, pCreateInfo, pAllocator, pQueryPool); - if (VK_SUCCESS == result) { - *pQueryPool = layer_data->WrapNew(*pQueryPool); - } - return result; -} - -void DispatchDestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyQueryPool(device, queryPool, pAllocator); - - uint64_t queryPool_id = CastToUint64(queryPool); - auto iter = unique_id_mapping.pop(queryPool_id); - if (iter != unique_id_mapping.end()) { - queryPool = (VkQueryPool)iter->second; - } else { - queryPool = (VkQueryPool)0; - } - layer_data->device_dispatch_table.DestroyQueryPool(device, queryPool, pAllocator); -} - -VkResult DispatchGetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, - size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetQueryPoolResults(device, queryPool, firstQuery, queryCount, dataSize, pData, - stride, flags); - { queryPool = layer_data->Unwrap(queryPool); } - VkResult result = layer_data->device_dispatch_table.GetQueryPoolResults(device, queryPool, firstQuery, queryCount, dataSize, - pData, stride, flags); - - return result; -} - -VkResult DispatchCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkBuffer* pBuffer) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CreateBuffer(device, pCreateInfo, pAllocator, pBuffer); - vku::safe_VkBufferCreateInfo var_local_pCreateInfo; - vku::safe_VkBufferCreateInfo* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - UnwrapPnextChainHandles(layer_data, local_pCreateInfo->pNext); - } - } - VkResult result = - layer_data->device_dispatch_table.CreateBuffer(device, (const VkBufferCreateInfo*)local_pCreateInfo, pAllocator, pBuffer); - if (VK_SUCCESS == result) { - *pBuffer = layer_data->WrapNew(*pBuffer); - } - return result; -} - -void DispatchDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyBuffer(device, buffer, pAllocator); - - uint64_t buffer_id = CastToUint64(buffer); - auto iter = unique_id_mapping.pop(buffer_id); - if (iter != unique_id_mapping.end()) { - buffer = (VkBuffer)iter->second; - } else { - buffer = (VkBuffer)0; - } - layer_data->device_dispatch_table.DestroyBuffer(device, buffer, pAllocator); -} - -VkResult DispatchCreateBufferView(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkBufferView* pView) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CreateBufferView(device, pCreateInfo, pAllocator, pView); - vku::safe_VkBufferViewCreateInfo var_local_pCreateInfo; - vku::safe_VkBufferViewCreateInfo* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - - if (pCreateInfo->buffer) { - local_pCreateInfo->buffer = layer_data->Unwrap(pCreateInfo->buffer); - } - } - } - VkResult result = layer_data->device_dispatch_table.CreateBufferView(device, (const VkBufferViewCreateInfo*)local_pCreateInfo, - pAllocator, pView); - if (VK_SUCCESS == result) { - *pView = layer_data->WrapNew(*pView); - } - return result; -} - -void DispatchDestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyBufferView(device, bufferView, pAllocator); - - uint64_t bufferView_id = CastToUint64(bufferView); - auto iter = unique_id_mapping.pop(bufferView_id); - if (iter != unique_id_mapping.end()) { - bufferView = (VkBufferView)iter->second; - } else { - bufferView = (VkBufferView)0; - } - layer_data->device_dispatch_table.DestroyBufferView(device, bufferView, pAllocator); -} - -VkResult DispatchCreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkImage* pImage) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CreateImage(device, pCreateInfo, pAllocator, pImage); - vku::safe_VkImageCreateInfo var_local_pCreateInfo; - vku::safe_VkImageCreateInfo* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - UnwrapPnextChainHandles(layer_data, local_pCreateInfo->pNext); - } - } - VkResult result = - layer_data->device_dispatch_table.CreateImage(device, (const VkImageCreateInfo*)local_pCreateInfo, pAllocator, pImage); - if (VK_SUCCESS == result) { - *pImage = layer_data->WrapNew(*pImage); - } - return result; -} - -void DispatchDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyImage(device, image, pAllocator); - - uint64_t image_id = CastToUint64(image); - auto iter = unique_id_mapping.pop(image_id); - if (iter != unique_id_mapping.end()) { - image = (VkImage)iter->second; - } else { - image = (VkImage)0; - } - layer_data->device_dispatch_table.DestroyImage(device, image, pAllocator); -} - -void DispatchGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, - VkSubresourceLayout* pLayout) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetImageSubresourceLayout(device, image, pSubresource, pLayout); - { image = layer_data->Unwrap(image); } - layer_data->device_dispatch_table.GetImageSubresourceLayout(device, image, pSubresource, pLayout); -} - -VkResult DispatchCreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkImageView* pView) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CreateImageView(device, pCreateInfo, pAllocator, pView); - vku::safe_VkImageViewCreateInfo var_local_pCreateInfo; - vku::safe_VkImageViewCreateInfo* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - - if (pCreateInfo->image) { - local_pCreateInfo->image = layer_data->Unwrap(pCreateInfo->image); - } - UnwrapPnextChainHandles(layer_data, local_pCreateInfo->pNext); - } - } - VkResult result = layer_data->device_dispatch_table.CreateImageView(device, (const VkImageViewCreateInfo*)local_pCreateInfo, - pAllocator, pView); - if (VK_SUCCESS == result) { - *pView = layer_data->WrapNew(*pView); - } - return result; -} - -void DispatchDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyImageView(device, imageView, pAllocator); - - uint64_t imageView_id = CastToUint64(imageView); - auto iter = unique_id_mapping.pop(imageView_id); - if (iter != unique_id_mapping.end()) { - imageView = (VkImageView)iter->second; - } else { - imageView = (VkImageView)0; - } - layer_data->device_dispatch_table.DestroyImageView(device, imageView, pAllocator); -} - -VkResult DispatchCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule); - vku::safe_VkShaderModuleCreateInfo var_local_pCreateInfo; - vku::safe_VkShaderModuleCreateInfo* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - UnwrapPnextChainHandles(layer_data, local_pCreateInfo->pNext); - } - } - VkResult result = layer_data->device_dispatch_table.CreateShaderModule( - device, (const VkShaderModuleCreateInfo*)local_pCreateInfo, pAllocator, pShaderModule); - if (VK_SUCCESS == result) { - *pShaderModule = layer_data->WrapNew(*pShaderModule); - } - return result; -} - -void DispatchDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyShaderModule(device, shaderModule, pAllocator); - - uint64_t shaderModule_id = CastToUint64(shaderModule); - auto iter = unique_id_mapping.pop(shaderModule_id); - if (iter != unique_id_mapping.end()) { - shaderModule = (VkShaderModule)iter->second; - } else { - shaderModule = (VkShaderModule)0; - } - layer_data->device_dispatch_table.DestroyShaderModule(device, shaderModule, pAllocator); -} - -VkResult DispatchCreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CreatePipelineCache(device, pCreateInfo, pAllocator, pPipelineCache); - - VkResult result = layer_data->device_dispatch_table.CreatePipelineCache(device, pCreateInfo, pAllocator, pPipelineCache); - if (VK_SUCCESS == result) { - *pPipelineCache = layer_data->WrapNew(*pPipelineCache); - } - return result; -} - -void DispatchDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyPipelineCache(device, pipelineCache, pAllocator); - - uint64_t pipelineCache_id = CastToUint64(pipelineCache); - auto iter = unique_id_mapping.pop(pipelineCache_id); - if (iter != unique_id_mapping.end()) { - pipelineCache = (VkPipelineCache)iter->second; - } else { - pipelineCache = (VkPipelineCache)0; - } - layer_data->device_dispatch_table.DestroyPipelineCache(device, pipelineCache, pAllocator); -} - -VkResult DispatchGetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetPipelineCacheData(device, pipelineCache, pDataSize, pData); - { pipelineCache = layer_data->Unwrap(pipelineCache); } - VkResult result = layer_data->device_dispatch_table.GetPipelineCacheData(device, pipelineCache, pDataSize, pData); - - return result; -} - -VkResult DispatchMergePipelineCaches(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, - const VkPipelineCache* pSrcCaches) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.MergePipelineCaches(device, dstCache, srcCacheCount, pSrcCaches); - small_vector var_local_pSrcCaches; - VkPipelineCache* local_pSrcCaches = nullptr; - { - dstCache = layer_data->Unwrap(dstCache); - if (pSrcCaches) { - var_local_pSrcCaches.resize(srcCacheCount); - local_pSrcCaches = var_local_pSrcCaches.data(); - for (uint32_t index0 = 0; index0 < srcCacheCount; ++index0) { - local_pSrcCaches[index0] = layer_data->Unwrap(pSrcCaches[index0]); - } - } - } - VkResult result = layer_data->device_dispatch_table.MergePipelineCaches(device, dstCache, srcCacheCount, - (const VkPipelineCache*)local_pSrcCaches); - - return result; -} - -void DispatchDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyPipeline(device, pipeline, pAllocator); - - uint64_t pipeline_id = CastToUint64(pipeline); - auto iter = unique_id_mapping.pop(pipeline_id); - if (iter != unique_id_mapping.end()) { - pipeline = (VkPipeline)iter->second; - } else { - pipeline = (VkPipeline)0; - } - layer_data->device_dispatch_table.DestroyPipeline(device, pipeline, pAllocator); -} - -VkResult DispatchCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CreatePipelineLayout(device, pCreateInfo, pAllocator, pPipelineLayout); - vku::safe_VkPipelineLayoutCreateInfo var_local_pCreateInfo; - vku::safe_VkPipelineLayoutCreateInfo* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - if (local_pCreateInfo->pSetLayouts) { - for (uint32_t index1 = 0; index1 < local_pCreateInfo->setLayoutCount; ++index1) { - local_pCreateInfo->pSetLayouts[index1] = layer_data->Unwrap(local_pCreateInfo->pSetLayouts[index1]); - } - } - } - } - VkResult result = layer_data->device_dispatch_table.CreatePipelineLayout( - device, (const VkPipelineLayoutCreateInfo*)local_pCreateInfo, pAllocator, pPipelineLayout); - if (VK_SUCCESS == result) { - *pPipelineLayout = layer_data->WrapNew(*pPipelineLayout); - } - return result; -} - -void DispatchDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyPipelineLayout(device, pipelineLayout, pAllocator); - - uint64_t pipelineLayout_id = CastToUint64(pipelineLayout); - auto iter = unique_id_mapping.pop(pipelineLayout_id); - if (iter != unique_id_mapping.end()) { - pipelineLayout = (VkPipelineLayout)iter->second; - } else { - pipelineLayout = (VkPipelineLayout)0; - } - layer_data->device_dispatch_table.DestroyPipelineLayout(device, pipelineLayout, pAllocator); -} - -VkResult DispatchCreateSampler(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkSampler* pSampler) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CreateSampler(device, pCreateInfo, pAllocator, pSampler); - vku::safe_VkSamplerCreateInfo var_local_pCreateInfo; - vku::safe_VkSamplerCreateInfo* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - UnwrapPnextChainHandles(layer_data, local_pCreateInfo->pNext); - } - } - VkResult result = layer_data->device_dispatch_table.CreateSampler(device, (const VkSamplerCreateInfo*)local_pCreateInfo, - pAllocator, pSampler); - if (VK_SUCCESS == result) { - *pSampler = layer_data->WrapNew(*pSampler); - } - return result; -} - -void DispatchDestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroySampler(device, sampler, pAllocator); - - uint64_t sampler_id = CastToUint64(sampler); - auto iter = unique_id_mapping.pop(sampler_id); - if (iter != unique_id_mapping.end()) { - sampler = (VkSampler)iter->second; - } else { - sampler = (VkSampler)0; - } - layer_data->device_dispatch_table.DestroySampler(device, sampler, pAllocator); -} - -VkResult DispatchCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CreateDescriptorSetLayout(device, pCreateInfo, pAllocator, pSetLayout); - vku::safe_VkDescriptorSetLayoutCreateInfo var_local_pCreateInfo; - vku::safe_VkDescriptorSetLayoutCreateInfo* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - if (local_pCreateInfo->pBindings) { - for (uint32_t index1 = 0; index1 < local_pCreateInfo->bindingCount; ++index1) { - if (local_pCreateInfo->pBindings[index1].pImmutableSamplers) { - for (uint32_t index2 = 0; index2 < local_pCreateInfo->pBindings[index1].descriptorCount; ++index2) { - local_pCreateInfo->pBindings[index1].pImmutableSamplers[index2] = - layer_data->Unwrap(local_pCreateInfo->pBindings[index1].pImmutableSamplers[index2]); - } - } - } - } - } - } - VkResult result = layer_data->device_dispatch_table.CreateDescriptorSetLayout( - device, (const VkDescriptorSetLayoutCreateInfo*)local_pCreateInfo, pAllocator, pSetLayout); - if (VK_SUCCESS == result) { - *pSetLayout = layer_data->WrapNew(*pSetLayout); - } - return result; -} - -void DispatchDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, - const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyDescriptorSetLayout(device, descriptorSetLayout, pAllocator); - - uint64_t descriptorSetLayout_id = CastToUint64(descriptorSetLayout); - auto iter = unique_id_mapping.pop(descriptorSetLayout_id); - if (iter != unique_id_mapping.end()) { - descriptorSetLayout = (VkDescriptorSetLayout)iter->second; - } else { - descriptorSetLayout = (VkDescriptorSetLayout)0; - } - layer_data->device_dispatch_table.DestroyDescriptorSetLayout(device, descriptorSetLayout, pAllocator); -} - -VkResult DispatchCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CreateDescriptorPool(device, pCreateInfo, pAllocator, pDescriptorPool); - - VkResult result = layer_data->device_dispatch_table.CreateDescriptorPool(device, pCreateInfo, pAllocator, pDescriptorPool); - if (VK_SUCCESS == result) { - *pDescriptorPool = layer_data->WrapNew(*pDescriptorPool); - } - return result; -} - -void DispatchUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, - uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.UpdateDescriptorSets(device, descriptorWriteCount, pDescriptorWrites, - descriptorCopyCount, pDescriptorCopies); - small_vector var_local_pDescriptorWrites; - vku::safe_VkWriteDescriptorSet* local_pDescriptorWrites = nullptr; - small_vector var_local_pDescriptorCopies; - vku::safe_VkCopyDescriptorSet* local_pDescriptorCopies = nullptr; - { - if (pDescriptorWrites) { - var_local_pDescriptorWrites.resize(descriptorWriteCount); - local_pDescriptorWrites = var_local_pDescriptorWrites.data(); - for (uint32_t index0 = 0; index0 < descriptorWriteCount; ++index0) { - local_pDescriptorWrites[index0].initialize(&pDescriptorWrites[index0]); - UnwrapPnextChainHandles(layer_data, local_pDescriptorWrites[index0].pNext); - - if (pDescriptorWrites[index0].dstSet) { - local_pDescriptorWrites[index0].dstSet = layer_data->Unwrap(pDescriptorWrites[index0].dstSet); - } - if (local_pDescriptorWrites[index0].pImageInfo) { - for (uint32_t index1 = 0; index1 < local_pDescriptorWrites[index0].descriptorCount; ++index1) { - if (pDescriptorWrites[index0].pImageInfo[index1].sampler) { - local_pDescriptorWrites[index0].pImageInfo[index1].sampler = - layer_data->Unwrap(pDescriptorWrites[index0].pImageInfo[index1].sampler); - } - if (pDescriptorWrites[index0].pImageInfo[index1].imageView) { - local_pDescriptorWrites[index0].pImageInfo[index1].imageView = - layer_data->Unwrap(pDescriptorWrites[index0].pImageInfo[index1].imageView); - } - } - } - if (local_pDescriptorWrites[index0].pBufferInfo) { - for (uint32_t index1 = 0; index1 < local_pDescriptorWrites[index0].descriptorCount; ++index1) { - if (pDescriptorWrites[index0].pBufferInfo[index1].buffer) { - local_pDescriptorWrites[index0].pBufferInfo[index1].buffer = - layer_data->Unwrap(pDescriptorWrites[index0].pBufferInfo[index1].buffer); - } - } - } - if (local_pDescriptorWrites[index0].pTexelBufferView) { - for (uint32_t index1 = 0; index1 < local_pDescriptorWrites[index0].descriptorCount; ++index1) { - local_pDescriptorWrites[index0].pTexelBufferView[index1] = - layer_data->Unwrap(local_pDescriptorWrites[index0].pTexelBufferView[index1]); - } - } - } - } - if (pDescriptorCopies) { - var_local_pDescriptorCopies.resize(descriptorCopyCount); - local_pDescriptorCopies = var_local_pDescriptorCopies.data(); - for (uint32_t index0 = 0; index0 < descriptorCopyCount; ++index0) { - local_pDescriptorCopies[index0].initialize(&pDescriptorCopies[index0]); - - if (pDescriptorCopies[index0].srcSet) { - local_pDescriptorCopies[index0].srcSet = layer_data->Unwrap(pDescriptorCopies[index0].srcSet); - } - if (pDescriptorCopies[index0].dstSet) { - local_pDescriptorCopies[index0].dstSet = layer_data->Unwrap(pDescriptorCopies[index0].dstSet); - } - } - } - } - layer_data->device_dispatch_table.UpdateDescriptorSets( - device, descriptorWriteCount, (const VkWriteDescriptorSet*)local_pDescriptorWrites, descriptorCopyCount, - (const VkCopyDescriptorSet*)local_pDescriptorCopies); -} - -VkResult DispatchCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CreateFramebuffer(device, pCreateInfo, pAllocator, pFramebuffer); - vku::safe_VkFramebufferCreateInfo var_local_pCreateInfo; - vku::safe_VkFramebufferCreateInfo* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - - if (pCreateInfo->renderPass) { - local_pCreateInfo->renderPass = layer_data->Unwrap(pCreateInfo->renderPass); - } - if (local_pCreateInfo->pAttachments) { - for (uint32_t index1 = 0; index1 < local_pCreateInfo->attachmentCount; ++index1) { - local_pCreateInfo->pAttachments[index1] = layer_data->Unwrap(local_pCreateInfo->pAttachments[index1]); - } - } - } - } - VkResult result = layer_data->device_dispatch_table.CreateFramebuffer(device, (const VkFramebufferCreateInfo*)local_pCreateInfo, - pAllocator, pFramebuffer); - if (VK_SUCCESS == result) { - *pFramebuffer = layer_data->WrapNew(*pFramebuffer); - } - return result; -} - -void DispatchDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyFramebuffer(device, framebuffer, pAllocator); - - uint64_t framebuffer_id = CastToUint64(framebuffer); - auto iter = unique_id_mapping.pop(framebuffer_id); - if (iter != unique_id_mapping.end()) { - framebuffer = (VkFramebuffer)iter->second; - } else { - framebuffer = (VkFramebuffer)0; - } - layer_data->device_dispatch_table.DestroyFramebuffer(device, framebuffer, pAllocator); -} - -void DispatchGetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetRenderAreaGranularity(device, renderPass, pGranularity); - { renderPass = layer_data->Unwrap(renderPass); } - layer_data->device_dispatch_table.GetRenderAreaGranularity(device, renderPass, pGranularity); -} - -VkResult DispatchCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CreateCommandPool(device, pCreateInfo, pAllocator, pCommandPool); - - VkResult result = layer_data->device_dispatch_table.CreateCommandPool(device, pCreateInfo, pAllocator, pCommandPool); - if (VK_SUCCESS == result) { - *pCommandPool = layer_data->WrapNew(*pCommandPool); - } - return result; -} - -VkResult DispatchResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.ResetCommandPool(device, commandPool, flags); - { commandPool = layer_data->Unwrap(commandPool); } - VkResult result = layer_data->device_dispatch_table.ResetCommandPool(device, commandPool, flags); - - return result; -} - -VkResult DispatchEndCommandBuffer(VkCommandBuffer commandBuffer) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - VkResult result = layer_data->device_dispatch_table.EndCommandBuffer(commandBuffer); - - return result; -} - -VkResult DispatchResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - VkResult result = layer_data->device_dispatch_table.ResetCommandBuffer(commandBuffer, flags); - - return result; -} - -void DispatchCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdBindPipeline(commandBuffer, pipelineBindPoint, pipeline); - { pipeline = layer_data->Unwrap(pipeline); } - layer_data->device_dispatch_table.CmdBindPipeline(commandBuffer, pipelineBindPoint, pipeline); -} - -void DispatchCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, - const VkViewport* pViewports) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetViewport(commandBuffer, firstViewport, viewportCount, pViewports); -} - -void DispatchCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetScissor(commandBuffer, firstScissor, scissorCount, pScissors); -} - -void DispatchCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetLineWidth(commandBuffer, lineWidth); -} - -void DispatchCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, - float depthBiasSlopeFactor) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetDepthBias(commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor); -} - -void DispatchCmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4]) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetBlendConstants(commandBuffer, blendConstants); -} - -void DispatchCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetDepthBounds(commandBuffer, minDepthBounds, maxDepthBounds); -} - -void DispatchCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetStencilCompareMask(commandBuffer, faceMask, compareMask); -} - -void DispatchCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetStencilWriteMask(commandBuffer, faceMask, writeMask); -} - -void DispatchCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetStencilReference(commandBuffer, faceMask, reference); -} - -void DispatchCmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, - uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, - uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdBindDescriptorSets(commandBuffer, pipelineBindPoint, layout, firstSet, - descriptorSetCount, pDescriptorSets, dynamicOffsetCount, - pDynamicOffsets); - small_vector var_local_pDescriptorSets; - VkDescriptorSet* local_pDescriptorSets = nullptr; - { - layout = layer_data->Unwrap(layout); - if (pDescriptorSets) { - var_local_pDescriptorSets.resize(descriptorSetCount); - local_pDescriptorSets = var_local_pDescriptorSets.data(); - for (uint32_t index0 = 0; index0 < descriptorSetCount; ++index0) { - local_pDescriptorSets[index0] = layer_data->Unwrap(pDescriptorSets[index0]); - } - } - } - layer_data->device_dispatch_table.CmdBindDescriptorSets(commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, - (const VkDescriptorSet*)local_pDescriptorSets, dynamicOffsetCount, - pDynamicOffsets); -} - -void DispatchCmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdBindIndexBuffer(commandBuffer, buffer, offset, indexType); - { buffer = layer_data->Unwrap(buffer); } - layer_data->device_dispatch_table.CmdBindIndexBuffer(commandBuffer, buffer, offset, indexType); -} - -void DispatchCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, - const VkBuffer* pBuffers, const VkDeviceSize* pOffsets) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdBindVertexBuffers(commandBuffer, firstBinding, bindingCount, pBuffers, - pOffsets); - small_vector var_local_pBuffers; - VkBuffer* local_pBuffers = nullptr; - { - if (pBuffers) { - var_local_pBuffers.resize(bindingCount); - local_pBuffers = var_local_pBuffers.data(); - for (uint32_t index0 = 0; index0 < bindingCount; ++index0) { - local_pBuffers[index0] = layer_data->Unwrap(pBuffers[index0]); - } - } - } - layer_data->device_dispatch_table.CmdBindVertexBuffers(commandBuffer, firstBinding, bindingCount, - (const VkBuffer*)local_pBuffers, pOffsets); -} - -void DispatchCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, - uint32_t firstInstance) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdDraw(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance); -} - -void DispatchCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, - int32_t vertexOffset, uint32_t firstInstance) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdDrawIndexed(commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, - firstInstance); -} - -void DispatchCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, - uint32_t stride) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdDrawIndirect(commandBuffer, buffer, offset, drawCount, stride); - { buffer = layer_data->Unwrap(buffer); } - layer_data->device_dispatch_table.CmdDrawIndirect(commandBuffer, buffer, offset, drawCount, stride); -} - -void DispatchCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, - uint32_t stride) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdDrawIndexedIndirect(commandBuffer, buffer, offset, drawCount, stride); - { buffer = layer_data->Unwrap(buffer); } - layer_data->device_dispatch_table.CmdDrawIndexedIndirect(commandBuffer, buffer, offset, drawCount, stride); -} - -void DispatchCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdDispatch(commandBuffer, groupCountX, groupCountY, groupCountZ); -} - -void DispatchCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdDispatchIndirect(commandBuffer, buffer, offset); - { buffer = layer_data->Unwrap(buffer); } - layer_data->device_dispatch_table.CmdDispatchIndirect(commandBuffer, buffer, offset); -} - -void DispatchCmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, - const VkBufferCopy* pRegions) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdCopyBuffer(commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions); - { - srcBuffer = layer_data->Unwrap(srcBuffer); - dstBuffer = layer_data->Unwrap(dstBuffer); - } - layer_data->device_dispatch_table.CmdCopyBuffer(commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions); -} - -void DispatchCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, - VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdCopyImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, - regionCount, pRegions); - { - srcImage = layer_data->Unwrap(srcImage); - dstImage = layer_data->Unwrap(dstImage); - } - layer_data->device_dispatch_table.CmdCopyImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, - pRegions); -} - -void DispatchCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, - VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdBlitImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, - regionCount, pRegions, filter); - { - srcImage = layer_data->Unwrap(srcImage); - dstImage = layer_data->Unwrap(dstImage); - } - layer_data->device_dispatch_table.CmdBlitImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, - pRegions, filter); -} - -void DispatchCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, - uint32_t regionCount, const VkBufferImageCopy* pRegions) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdCopyBufferToImage(commandBuffer, srcBuffer, dstImage, dstImageLayout, - regionCount, pRegions); - { - srcBuffer = layer_data->Unwrap(srcBuffer); - dstImage = layer_data->Unwrap(dstImage); - } - layer_data->device_dispatch_table.CmdCopyBufferToImage(commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, - pRegions); -} - -void DispatchCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, - uint32_t regionCount, const VkBufferImageCopy* pRegions) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdCopyImageToBuffer(commandBuffer, srcImage, srcImageLayout, dstBuffer, - regionCount, pRegions); - { - srcImage = layer_data->Unwrap(srcImage); - dstBuffer = layer_data->Unwrap(dstBuffer); - } - layer_data->device_dispatch_table.CmdCopyImageToBuffer(commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, - pRegions); -} - -void DispatchCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, - const void* pData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, dataSize, pData); - { dstBuffer = layer_data->Unwrap(dstBuffer); } - layer_data->device_dispatch_table.CmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, dataSize, pData); -} - -void DispatchCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, - uint32_t data) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdFillBuffer(commandBuffer, dstBuffer, dstOffset, size, data); - { dstBuffer = layer_data->Unwrap(dstBuffer); } - layer_data->device_dispatch_table.CmdFillBuffer(commandBuffer, dstBuffer, dstOffset, size, data); -} - -void DispatchCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, - const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdClearColorImage(commandBuffer, image, imageLayout, pColor, rangeCount, pRanges); - { image = layer_data->Unwrap(image); } - layer_data->device_dispatch_table.CmdClearColorImage(commandBuffer, image, imageLayout, pColor, rangeCount, pRanges); -} - -void DispatchCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, - const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, - const VkImageSubresourceRange* pRanges) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdClearDepthStencilImage(commandBuffer, image, imageLayout, pDepthStencil, - rangeCount, pRanges); - { image = layer_data->Unwrap(image); } - layer_data->device_dispatch_table.CmdClearDepthStencilImage(commandBuffer, image, imageLayout, pDepthStencil, rangeCount, - pRanges); -} - -void DispatchCmdClearAttachments(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, - uint32_t rectCount, const VkClearRect* pRects) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdClearAttachments(commandBuffer, attachmentCount, pAttachments, rectCount, pRects); -} - -void DispatchCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, - VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdResolveImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, - regionCount, pRegions); - { - srcImage = layer_data->Unwrap(srcImage); - dstImage = layer_data->Unwrap(dstImage); - } - layer_data->device_dispatch_table.CmdResolveImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, - regionCount, pRegions); -} - -void DispatchCmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdSetEvent(commandBuffer, event, stageMask); - { event = layer_data->Unwrap(event); } - layer_data->device_dispatch_table.CmdSetEvent(commandBuffer, event, stageMask); -} - -void DispatchCmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdResetEvent(commandBuffer, event, stageMask); - { event = layer_data->Unwrap(event); } - layer_data->device_dispatch_table.CmdResetEvent(commandBuffer, event, stageMask); -} - -void DispatchCmdWaitEvents(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) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdWaitEvents( - commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, - bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); - small_vector var_local_pEvents; - VkEvent* local_pEvents = nullptr; - small_vector var_local_pBufferMemoryBarriers; - vku::safe_VkBufferMemoryBarrier* local_pBufferMemoryBarriers = nullptr; - small_vector var_local_pImageMemoryBarriers; - vku::safe_VkImageMemoryBarrier* local_pImageMemoryBarriers = nullptr; - { - if (pEvents) { - var_local_pEvents.resize(eventCount); - local_pEvents = var_local_pEvents.data(); - for (uint32_t index0 = 0; index0 < eventCount; ++index0) { - local_pEvents[index0] = layer_data->Unwrap(pEvents[index0]); - } - } - if (pBufferMemoryBarriers) { - var_local_pBufferMemoryBarriers.resize(bufferMemoryBarrierCount); - local_pBufferMemoryBarriers = var_local_pBufferMemoryBarriers.data(); - for (uint32_t index0 = 0; index0 < bufferMemoryBarrierCount; ++index0) { - local_pBufferMemoryBarriers[index0].initialize(&pBufferMemoryBarriers[index0]); - - if (pBufferMemoryBarriers[index0].buffer) { - local_pBufferMemoryBarriers[index0].buffer = layer_data->Unwrap(pBufferMemoryBarriers[index0].buffer); - } - } - } - if (pImageMemoryBarriers) { - var_local_pImageMemoryBarriers.resize(imageMemoryBarrierCount); - local_pImageMemoryBarriers = var_local_pImageMemoryBarriers.data(); - for (uint32_t index0 = 0; index0 < imageMemoryBarrierCount; ++index0) { - local_pImageMemoryBarriers[index0].initialize(&pImageMemoryBarriers[index0]); - - if (pImageMemoryBarriers[index0].image) { - local_pImageMemoryBarriers[index0].image = layer_data->Unwrap(pImageMemoryBarriers[index0].image); - } - } - } - } - layer_data->device_dispatch_table.CmdWaitEvents( - commandBuffer, eventCount, (const VkEvent*)local_pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, - bufferMemoryBarrierCount, (const VkBufferMemoryBarrier*)local_pBufferMemoryBarriers, imageMemoryBarrierCount, - (const VkImageMemoryBarrier*)local_pImageMemoryBarriers); -} - -void DispatchCmdPipelineBarrier(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) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdPipelineBarrier( - commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, - bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); - small_vector var_local_pBufferMemoryBarriers; - vku::safe_VkBufferMemoryBarrier* local_pBufferMemoryBarriers = nullptr; - small_vector var_local_pImageMemoryBarriers; - vku::safe_VkImageMemoryBarrier* local_pImageMemoryBarriers = nullptr; - { - if (pBufferMemoryBarriers) { - var_local_pBufferMemoryBarriers.resize(bufferMemoryBarrierCount); - local_pBufferMemoryBarriers = var_local_pBufferMemoryBarriers.data(); - for (uint32_t index0 = 0; index0 < bufferMemoryBarrierCount; ++index0) { - local_pBufferMemoryBarriers[index0].initialize(&pBufferMemoryBarriers[index0]); - - if (pBufferMemoryBarriers[index0].buffer) { - local_pBufferMemoryBarriers[index0].buffer = layer_data->Unwrap(pBufferMemoryBarriers[index0].buffer); - } - } - } - if (pImageMemoryBarriers) { - var_local_pImageMemoryBarriers.resize(imageMemoryBarrierCount); - local_pImageMemoryBarriers = var_local_pImageMemoryBarriers.data(); - for (uint32_t index0 = 0; index0 < imageMemoryBarrierCount; ++index0) { - local_pImageMemoryBarriers[index0].initialize(&pImageMemoryBarriers[index0]); - - if (pImageMemoryBarriers[index0].image) { - local_pImageMemoryBarriers[index0].image = layer_data->Unwrap(pImageMemoryBarriers[index0].image); - } - } - } - } - layer_data->device_dispatch_table.CmdPipelineBarrier( - commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, - (const VkBufferMemoryBarrier*)local_pBufferMemoryBarriers, imageMemoryBarrierCount, - (const VkImageMemoryBarrier*)local_pImageMemoryBarriers); -} - -void DispatchCmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdBeginQuery(commandBuffer, queryPool, query, flags); - { queryPool = layer_data->Unwrap(queryPool); } - layer_data->device_dispatch_table.CmdBeginQuery(commandBuffer, queryPool, query, flags); -} - -void DispatchCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdEndQuery(commandBuffer, queryPool, query); - { queryPool = layer_data->Unwrap(queryPool); } - layer_data->device_dispatch_table.CmdEndQuery(commandBuffer, queryPool, query); -} - -void DispatchCmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdResetQueryPool(commandBuffer, queryPool, firstQuery, queryCount); - { queryPool = layer_data->Unwrap(queryPool); } - layer_data->device_dispatch_table.CmdResetQueryPool(commandBuffer, queryPool, firstQuery, queryCount); -} - -void DispatchCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, - uint32_t query) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdWriteTimestamp(commandBuffer, pipelineStage, queryPool, query); - { queryPool = layer_data->Unwrap(queryPool); } - layer_data->device_dispatch_table.CmdWriteTimestamp(commandBuffer, pipelineStage, queryPool, query); -} - -void DispatchCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, - VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdCopyQueryPoolResults(commandBuffer, queryPool, firstQuery, queryCount, - dstBuffer, dstOffset, stride, flags); - { - queryPool = layer_data->Unwrap(queryPool); - dstBuffer = layer_data->Unwrap(dstBuffer); - } - layer_data->device_dispatch_table.CmdCopyQueryPoolResults(commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, - dstOffset, stride, flags); -} - -void DispatchCmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, - uint32_t offset, uint32_t size, const void* pValues) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdPushConstants(commandBuffer, layout, stageFlags, offset, size, pValues); - { layout = layer_data->Unwrap(layout); } - layer_data->device_dispatch_table.CmdPushConstants(commandBuffer, layout, stageFlags, offset, size, pValues); -} - -void DispatchCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, - VkSubpassContents contents) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdBeginRenderPass(commandBuffer, pRenderPassBegin, contents); - vku::safe_VkRenderPassBeginInfo var_local_pRenderPassBegin; - vku::safe_VkRenderPassBeginInfo* local_pRenderPassBegin = nullptr; - { - if (pRenderPassBegin) { - local_pRenderPassBegin = &var_local_pRenderPassBegin; - local_pRenderPassBegin->initialize(pRenderPassBegin); - - if (pRenderPassBegin->renderPass) { - local_pRenderPassBegin->renderPass = layer_data->Unwrap(pRenderPassBegin->renderPass); - } - if (pRenderPassBegin->framebuffer) { - local_pRenderPassBegin->framebuffer = layer_data->Unwrap(pRenderPassBegin->framebuffer); - } - UnwrapPnextChainHandles(layer_data, local_pRenderPassBegin->pNext); - } - } - layer_data->device_dispatch_table.CmdBeginRenderPass(commandBuffer, (const VkRenderPassBeginInfo*)local_pRenderPassBegin, - contents); -} - -void DispatchCmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdNextSubpass(commandBuffer, contents); -} - -void DispatchCmdEndRenderPass(VkCommandBuffer commandBuffer) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdEndRenderPass(commandBuffer); -} - -void DispatchCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, - const VkCommandBuffer* pCommandBuffers) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdExecuteCommands(commandBuffer, commandBufferCount, pCommandBuffers); -} - -VkResult DispatchBindBufferMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.BindBufferMemory2(device, bindInfoCount, pBindInfos); - small_vector var_local_pBindInfos; - vku::safe_VkBindBufferMemoryInfo* local_pBindInfos = nullptr; - { - if (pBindInfos) { - var_local_pBindInfos.resize(bindInfoCount); - local_pBindInfos = var_local_pBindInfos.data(); - for (uint32_t index0 = 0; index0 < bindInfoCount; ++index0) { - local_pBindInfos[index0].initialize(&pBindInfos[index0]); - - if (pBindInfos[index0].buffer) { - local_pBindInfos[index0].buffer = layer_data->Unwrap(pBindInfos[index0].buffer); - } - if (pBindInfos[index0].memory) { - local_pBindInfos[index0].memory = layer_data->Unwrap(pBindInfos[index0].memory); - } - } - } - } - VkResult result = - layer_data->device_dispatch_table.BindBufferMemory2(device, bindInfoCount, (const VkBindBufferMemoryInfo*)local_pBindInfos); - - return result; -} - -VkResult DispatchBindImageMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.BindImageMemory2(device, bindInfoCount, pBindInfos); - small_vector var_local_pBindInfos; - vku::safe_VkBindImageMemoryInfo* local_pBindInfos = nullptr; - { - if (pBindInfos) { - var_local_pBindInfos.resize(bindInfoCount); - local_pBindInfos = var_local_pBindInfos.data(); - for (uint32_t index0 = 0; index0 < bindInfoCount; ++index0) { - local_pBindInfos[index0].initialize(&pBindInfos[index0]); - UnwrapPnextChainHandles(layer_data, local_pBindInfos[index0].pNext); - - if (pBindInfos[index0].image) { - local_pBindInfos[index0].image = layer_data->Unwrap(pBindInfos[index0].image); - } - if (pBindInfos[index0].memory) { - local_pBindInfos[index0].memory = layer_data->Unwrap(pBindInfos[index0].memory); - } - } - } - } - VkResult result = - layer_data->device_dispatch_table.BindImageMemory2(device, bindInfoCount, (const VkBindImageMemoryInfo*)local_pBindInfos); - - return result; -} - -void DispatchGetDeviceGroupPeerMemoryFeatures(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, - uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - layer_data->device_dispatch_table.GetDeviceGroupPeerMemoryFeatures(device, heapIndex, localDeviceIndex, remoteDeviceIndex, - pPeerMemoryFeatures); -} - -void DispatchCmdSetDeviceMask(VkCommandBuffer commandBuffer, uint32_t deviceMask) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetDeviceMask(commandBuffer, deviceMask); -} - -void DispatchCmdDispatchBase(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, - uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdDispatchBase(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, groupCountY, - groupCountZ); -} - -VkResult DispatchEnumeratePhysicalDeviceGroups(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, - VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - - VkResult result = layer_data->instance_dispatch_table.EnumeratePhysicalDeviceGroups(instance, pPhysicalDeviceGroupCount, - pPhysicalDeviceGroupProperties); - - return result; -} - -void DispatchGetImageMemoryRequirements2(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, - VkMemoryRequirements2* pMemoryRequirements) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetImageMemoryRequirements2(device, pInfo, pMemoryRequirements); - vku::safe_VkImageMemoryRequirementsInfo2 var_local_pInfo; - vku::safe_VkImageMemoryRequirementsInfo2* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->image) { - local_pInfo->image = layer_data->Unwrap(pInfo->image); - } - } - } - layer_data->device_dispatch_table.GetImageMemoryRequirements2(device, (const VkImageMemoryRequirementsInfo2*)local_pInfo, - pMemoryRequirements); -} - -void DispatchGetBufferMemoryRequirements2(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, - VkMemoryRequirements2* pMemoryRequirements) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetBufferMemoryRequirements2(device, pInfo, pMemoryRequirements); - vku::safe_VkBufferMemoryRequirementsInfo2 var_local_pInfo; - vku::safe_VkBufferMemoryRequirementsInfo2* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->buffer) { - local_pInfo->buffer = layer_data->Unwrap(pInfo->buffer); - } - } - } - layer_data->device_dispatch_table.GetBufferMemoryRequirements2(device, (const VkBufferMemoryRequirementsInfo2*)local_pInfo, - pMemoryRequirements); -} - -void DispatchGetImageSparseMemoryRequirements2(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, - uint32_t* pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetImageSparseMemoryRequirements2(device, pInfo, pSparseMemoryRequirementCount, - pSparseMemoryRequirements); - vku::safe_VkImageSparseMemoryRequirementsInfo2 var_local_pInfo; - vku::safe_VkImageSparseMemoryRequirementsInfo2* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->image) { - local_pInfo->image = layer_data->Unwrap(pInfo->image); - } - } - } - layer_data->device_dispatch_table.GetImageSparseMemoryRequirements2( - device, (const VkImageSparseMemoryRequirementsInfo2*)local_pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); -} - -void DispatchGetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceFeatures2(physicalDevice, pFeatures); -} - -void DispatchGetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceProperties2(physicalDevice, pProperties); -} - -void DispatchGetPhysicalDeviceFormatProperties2(VkPhysicalDevice physicalDevice, VkFormat format, - VkFormatProperties2* pFormatProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceFormatProperties2(physicalDevice, format, pFormatProperties); -} - -VkResult DispatchGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, - VkImageFormatProperties2* pImageFormatProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkResult result = layer_data->instance_dispatch_table.GetPhysicalDeviceImageFormatProperties2(physicalDevice, pImageFormatInfo, - pImageFormatProperties); - - return result; -} - -void DispatchGetPhysicalDeviceQueueFamilyProperties2(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, - VkQueueFamilyProperties2* pQueueFamilyProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceQueueFamilyProperties2(physicalDevice, pQueueFamilyPropertyCount, - pQueueFamilyProperties); -} - -void DispatchGetPhysicalDeviceMemoryProperties2(VkPhysicalDevice physicalDevice, - VkPhysicalDeviceMemoryProperties2* pMemoryProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceMemoryProperties2(physicalDevice, pMemoryProperties); -} - -void DispatchGetPhysicalDeviceSparseImageFormatProperties2(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, - uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceSparseImageFormatProperties2(physicalDevice, pFormatInfo, pPropertyCount, - pProperties); -} - -void DispatchTrimCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.TrimCommandPool(device, commandPool, flags); - { commandPool = layer_data->Unwrap(commandPool); } - layer_data->device_dispatch_table.TrimCommandPool(device, commandPool, flags); -} - -void DispatchGetDeviceQueue2(VkDevice device, const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - layer_data->device_dispatch_table.GetDeviceQueue2(device, pQueueInfo, pQueue); -} - -VkResult DispatchCreateSamplerYcbcrConversion(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CreateSamplerYcbcrConversion(device, pCreateInfo, pAllocator, pYcbcrConversion); - - VkResult result = - layer_data->device_dispatch_table.CreateSamplerYcbcrConversion(device, pCreateInfo, pAllocator, pYcbcrConversion); - if (VK_SUCCESS == result) { - *pYcbcrConversion = layer_data->WrapNew(*pYcbcrConversion); - } - return result; -} - -void DispatchDestroySamplerYcbcrConversion(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, - const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroySamplerYcbcrConversion(device, ycbcrConversion, pAllocator); - - uint64_t ycbcrConversion_id = CastToUint64(ycbcrConversion); - auto iter = unique_id_mapping.pop(ycbcrConversion_id); - if (iter != unique_id_mapping.end()) { - ycbcrConversion = (VkSamplerYcbcrConversion)iter->second; - } else { - ycbcrConversion = (VkSamplerYcbcrConversion)0; - } - layer_data->device_dispatch_table.DestroySamplerYcbcrConversion(device, ycbcrConversion, pAllocator); -} - -void DispatchGetPhysicalDeviceExternalBufferProperties(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, - VkExternalBufferProperties* pExternalBufferProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceExternalBufferProperties(physicalDevice, pExternalBufferInfo, - pExternalBufferProperties); -} - -void DispatchGetPhysicalDeviceExternalFenceProperties(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, - VkExternalFenceProperties* pExternalFenceProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceExternalFenceProperties(physicalDevice, pExternalFenceInfo, - pExternalFenceProperties); -} - -void DispatchGetPhysicalDeviceExternalSemaphoreProperties(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, - VkExternalSemaphoreProperties* pExternalSemaphoreProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceExternalSemaphoreProperties(physicalDevice, pExternalSemaphoreInfo, - pExternalSemaphoreProperties); -} - -void DispatchGetDescriptorSetLayoutSupport(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, - VkDescriptorSetLayoutSupport* pSupport) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetDescriptorSetLayoutSupport(device, pCreateInfo, pSupport); - vku::safe_VkDescriptorSetLayoutCreateInfo var_local_pCreateInfo; - vku::safe_VkDescriptorSetLayoutCreateInfo* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - if (local_pCreateInfo->pBindings) { - for (uint32_t index1 = 0; index1 < local_pCreateInfo->bindingCount; ++index1) { - if (local_pCreateInfo->pBindings[index1].pImmutableSamplers) { - for (uint32_t index2 = 0; index2 < local_pCreateInfo->pBindings[index1].descriptorCount; ++index2) { - local_pCreateInfo->pBindings[index1].pImmutableSamplers[index2] = - layer_data->Unwrap(local_pCreateInfo->pBindings[index1].pImmutableSamplers[index2]); - } - } - } - } - } - } - layer_data->device_dispatch_table.GetDescriptorSetLayoutSupport( - device, (const VkDescriptorSetLayoutCreateInfo*)local_pCreateInfo, pSupport); -} - -void DispatchCmdDrawIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, - VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdDrawIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride); - { - buffer = layer_data->Unwrap(buffer); - countBuffer = layer_data->Unwrap(countBuffer); - } - layer_data->device_dispatch_table.CmdDrawIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride); -} - -void DispatchCmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, - VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, - countBufferOffset, maxDrawCount, stride); - { - buffer = layer_data->Unwrap(buffer); - countBuffer = layer_data->Unwrap(countBuffer); - } - layer_data->device_dispatch_table.CmdDrawIndexedIndirectCount(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride); -} - -void DispatchCmdBeginRenderPass2(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, - const VkSubpassBeginInfo* pSubpassBeginInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdBeginRenderPass2(commandBuffer, pRenderPassBegin, pSubpassBeginInfo); - vku::safe_VkRenderPassBeginInfo var_local_pRenderPassBegin; - vku::safe_VkRenderPassBeginInfo* local_pRenderPassBegin = nullptr; - { - if (pRenderPassBegin) { - local_pRenderPassBegin = &var_local_pRenderPassBegin; - local_pRenderPassBegin->initialize(pRenderPassBegin); - - if (pRenderPassBegin->renderPass) { - local_pRenderPassBegin->renderPass = layer_data->Unwrap(pRenderPassBegin->renderPass); - } - if (pRenderPassBegin->framebuffer) { - local_pRenderPassBegin->framebuffer = layer_data->Unwrap(pRenderPassBegin->framebuffer); - } - UnwrapPnextChainHandles(layer_data, local_pRenderPassBegin->pNext); - } - } - layer_data->device_dispatch_table.CmdBeginRenderPass2(commandBuffer, (const VkRenderPassBeginInfo*)local_pRenderPassBegin, - pSubpassBeginInfo); -} - -void DispatchCmdNextSubpass2(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, - const VkSubpassEndInfo* pSubpassEndInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdNextSubpass2(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo); -} - -void DispatchCmdEndRenderPass2(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdEndRenderPass2(commandBuffer, pSubpassEndInfo); -} - -void DispatchResetQueryPool(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.ResetQueryPool(device, queryPool, firstQuery, queryCount); - { queryPool = layer_data->Unwrap(queryPool); } - layer_data->device_dispatch_table.ResetQueryPool(device, queryPool, firstQuery, queryCount); -} - -VkResult DispatchGetSemaphoreCounterValue(VkDevice device, VkSemaphore semaphore, uint64_t* pValue) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetSemaphoreCounterValue(device, semaphore, pValue); - { semaphore = layer_data->Unwrap(semaphore); } - VkResult result = layer_data->device_dispatch_table.GetSemaphoreCounterValue(device, semaphore, pValue); - - return result; -} - -VkResult DispatchWaitSemaphores(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.WaitSemaphores(device, pWaitInfo, timeout); - vku::safe_VkSemaphoreWaitInfo var_local_pWaitInfo; - vku::safe_VkSemaphoreWaitInfo* local_pWaitInfo = nullptr; - { - if (pWaitInfo) { - local_pWaitInfo = &var_local_pWaitInfo; - local_pWaitInfo->initialize(pWaitInfo); - if (local_pWaitInfo->pSemaphores) { - for (uint32_t index1 = 0; index1 < local_pWaitInfo->semaphoreCount; ++index1) { - local_pWaitInfo->pSemaphores[index1] = layer_data->Unwrap(local_pWaitInfo->pSemaphores[index1]); - } - } - } - } - VkResult result = - layer_data->device_dispatch_table.WaitSemaphores(device, (const VkSemaphoreWaitInfo*)local_pWaitInfo, timeout); - - return result; -} - -VkResult DispatchSignalSemaphore(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.SignalSemaphore(device, pSignalInfo); - vku::safe_VkSemaphoreSignalInfo var_local_pSignalInfo; - vku::safe_VkSemaphoreSignalInfo* local_pSignalInfo = nullptr; - { - if (pSignalInfo) { - local_pSignalInfo = &var_local_pSignalInfo; - local_pSignalInfo->initialize(pSignalInfo); - - if (pSignalInfo->semaphore) { - local_pSignalInfo->semaphore = layer_data->Unwrap(pSignalInfo->semaphore); - } - } - } - VkResult result = layer_data->device_dispatch_table.SignalSemaphore(device, (const VkSemaphoreSignalInfo*)local_pSignalInfo); - - return result; -} - -VkDeviceAddress DispatchGetBufferDeviceAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetBufferDeviceAddress(device, pInfo); - vku::safe_VkBufferDeviceAddressInfo var_local_pInfo; - vku::safe_VkBufferDeviceAddressInfo* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->buffer) { - local_pInfo->buffer = layer_data->Unwrap(pInfo->buffer); - } - } - } - VkDeviceAddress result = - layer_data->device_dispatch_table.GetBufferDeviceAddress(device, (const VkBufferDeviceAddressInfo*)local_pInfo); - - return result; -} - -uint64_t DispatchGetBufferOpaqueCaptureAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetBufferOpaqueCaptureAddress(device, pInfo); - vku::safe_VkBufferDeviceAddressInfo var_local_pInfo; - vku::safe_VkBufferDeviceAddressInfo* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->buffer) { - local_pInfo->buffer = layer_data->Unwrap(pInfo->buffer); - } - } - } - uint64_t result = - layer_data->device_dispatch_table.GetBufferOpaqueCaptureAddress(device, (const VkBufferDeviceAddressInfo*)local_pInfo); - - return result; -} - -uint64_t DispatchGetDeviceMemoryOpaqueCaptureAddress(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetDeviceMemoryOpaqueCaptureAddress(device, pInfo); - vku::safe_VkDeviceMemoryOpaqueCaptureAddressInfo var_local_pInfo; - vku::safe_VkDeviceMemoryOpaqueCaptureAddressInfo* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->memory) { - local_pInfo->memory = layer_data->Unwrap(pInfo->memory); - } - } - } - uint64_t result = layer_data->device_dispatch_table.GetDeviceMemoryOpaqueCaptureAddress( - device, (const VkDeviceMemoryOpaqueCaptureAddressInfo*)local_pInfo); - - return result; -} - -VkResult DispatchCreatePrivateDataSlot(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CreatePrivateDataSlot(device, pCreateInfo, pAllocator, pPrivateDataSlot); - - VkResult result = layer_data->device_dispatch_table.CreatePrivateDataSlot(device, pCreateInfo, pAllocator, pPrivateDataSlot); - if (VK_SUCCESS == result) { - *pPrivateDataSlot = layer_data->WrapNew(*pPrivateDataSlot); - } - return result; -} - -void DispatchDestroyPrivateDataSlot(VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyPrivateDataSlot(device, privateDataSlot, pAllocator); - - uint64_t privateDataSlot_id = CastToUint64(privateDataSlot); - auto iter = unique_id_mapping.pop(privateDataSlot_id); - if (iter != unique_id_mapping.end()) { - privateDataSlot = (VkPrivateDataSlot)iter->second; - } else { - privateDataSlot = (VkPrivateDataSlot)0; - } - layer_data->device_dispatch_table.DestroyPrivateDataSlot(device, privateDataSlot, pAllocator); -} - -VkResult DispatchSetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, - uint64_t data) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.SetPrivateData(device, objectType, objectHandle, privateDataSlot, data); - { - if (NotDispatchableHandle(objectType)) { - objectHandle = layer_data->Unwrap(objectHandle); - } - privateDataSlot = layer_data->Unwrap(privateDataSlot); - } - VkResult result = layer_data->device_dispatch_table.SetPrivateData(device, objectType, objectHandle, privateDataSlot, data); - - return result; -} - -void DispatchGetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, - uint64_t* pData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetPrivateData(device, objectType, objectHandle, privateDataSlot, pData); - { - if (NotDispatchableHandle(objectType)) { - objectHandle = layer_data->Unwrap(objectHandle); - } - privateDataSlot = layer_data->Unwrap(privateDataSlot); - } - layer_data->device_dispatch_table.GetPrivateData(device, objectType, objectHandle, privateDataSlot, pData); -} - -void DispatchCmdSetEvent2(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdSetEvent2(commandBuffer, event, pDependencyInfo); - vku::safe_VkDependencyInfo var_local_pDependencyInfo; - vku::safe_VkDependencyInfo* local_pDependencyInfo = nullptr; - { - event = layer_data->Unwrap(event); - if (pDependencyInfo) { - local_pDependencyInfo = &var_local_pDependencyInfo; - local_pDependencyInfo->initialize(pDependencyInfo); - if (local_pDependencyInfo->pBufferMemoryBarriers) { - for (uint32_t index1 = 0; index1 < local_pDependencyInfo->bufferMemoryBarrierCount; ++index1) { - if (pDependencyInfo->pBufferMemoryBarriers[index1].buffer) { - local_pDependencyInfo->pBufferMemoryBarriers[index1].buffer = - layer_data->Unwrap(pDependencyInfo->pBufferMemoryBarriers[index1].buffer); - } - } - } - if (local_pDependencyInfo->pImageMemoryBarriers) { - for (uint32_t index1 = 0; index1 < local_pDependencyInfo->imageMemoryBarrierCount; ++index1) { - if (pDependencyInfo->pImageMemoryBarriers[index1].image) { - local_pDependencyInfo->pImageMemoryBarriers[index1].image = - layer_data->Unwrap(pDependencyInfo->pImageMemoryBarriers[index1].image); - } - } - } - } - } - layer_data->device_dispatch_table.CmdSetEvent2(commandBuffer, event, (const VkDependencyInfo*)local_pDependencyInfo); -} - -void DispatchCmdResetEvent2(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdResetEvent2(commandBuffer, event, stageMask); - { event = layer_data->Unwrap(event); } - layer_data->device_dispatch_table.CmdResetEvent2(commandBuffer, event, stageMask); -} - -void DispatchCmdWaitEvents2(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, - const VkDependencyInfo* pDependencyInfos) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdWaitEvents2(commandBuffer, eventCount, pEvents, pDependencyInfos); - small_vector var_local_pEvents; - VkEvent* local_pEvents = nullptr; - small_vector var_local_pDependencyInfos; - vku::safe_VkDependencyInfo* local_pDependencyInfos = nullptr; - { - if (pEvents) { - var_local_pEvents.resize(eventCount); - local_pEvents = var_local_pEvents.data(); - for (uint32_t index0 = 0; index0 < eventCount; ++index0) { - local_pEvents[index0] = layer_data->Unwrap(pEvents[index0]); - } - } - if (pDependencyInfos) { - var_local_pDependencyInfos.resize(eventCount); - local_pDependencyInfos = var_local_pDependencyInfos.data(); - for (uint32_t index0 = 0; index0 < eventCount; ++index0) { - local_pDependencyInfos[index0].initialize(&pDependencyInfos[index0]); - if (local_pDependencyInfos[index0].pBufferMemoryBarriers) { - for (uint32_t index1 = 0; index1 < local_pDependencyInfos[index0].bufferMemoryBarrierCount; ++index1) { - if (pDependencyInfos[index0].pBufferMemoryBarriers[index1].buffer) { - local_pDependencyInfos[index0].pBufferMemoryBarriers[index1].buffer = - layer_data->Unwrap(pDependencyInfos[index0].pBufferMemoryBarriers[index1].buffer); - } - } - } - if (local_pDependencyInfos[index0].pImageMemoryBarriers) { - for (uint32_t index1 = 0; index1 < local_pDependencyInfos[index0].imageMemoryBarrierCount; ++index1) { - if (pDependencyInfos[index0].pImageMemoryBarriers[index1].image) { - local_pDependencyInfos[index0].pImageMemoryBarriers[index1].image = - layer_data->Unwrap(pDependencyInfos[index0].pImageMemoryBarriers[index1].image); - } - } - } - } - } - } - layer_data->device_dispatch_table.CmdWaitEvents2(commandBuffer, eventCount, (const VkEvent*)local_pEvents, - (const VkDependencyInfo*)local_pDependencyInfos); -} - -void DispatchCmdPipelineBarrier2(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdPipelineBarrier2(commandBuffer, pDependencyInfo); - vku::safe_VkDependencyInfo var_local_pDependencyInfo; - vku::safe_VkDependencyInfo* local_pDependencyInfo = nullptr; - { - if (pDependencyInfo) { - local_pDependencyInfo = &var_local_pDependencyInfo; - local_pDependencyInfo->initialize(pDependencyInfo); - if (local_pDependencyInfo->pBufferMemoryBarriers) { - for (uint32_t index1 = 0; index1 < local_pDependencyInfo->bufferMemoryBarrierCount; ++index1) { - if (pDependencyInfo->pBufferMemoryBarriers[index1].buffer) { - local_pDependencyInfo->pBufferMemoryBarriers[index1].buffer = - layer_data->Unwrap(pDependencyInfo->pBufferMemoryBarriers[index1].buffer); - } - } - } - if (local_pDependencyInfo->pImageMemoryBarriers) { - for (uint32_t index1 = 0; index1 < local_pDependencyInfo->imageMemoryBarrierCount; ++index1) { - if (pDependencyInfo->pImageMemoryBarriers[index1].image) { - local_pDependencyInfo->pImageMemoryBarriers[index1].image = - layer_data->Unwrap(pDependencyInfo->pImageMemoryBarriers[index1].image); - } - } - } - } - } - layer_data->device_dispatch_table.CmdPipelineBarrier2(commandBuffer, (const VkDependencyInfo*)local_pDependencyInfo); -} - -void DispatchCmdWriteTimestamp2(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, uint32_t query) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdWriteTimestamp2(commandBuffer, stage, queryPool, query); - { queryPool = layer_data->Unwrap(queryPool); } - layer_data->device_dispatch_table.CmdWriteTimestamp2(commandBuffer, stage, queryPool, query); -} - -VkResult DispatchQueueSubmit2(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.QueueSubmit2(queue, submitCount, pSubmits, fence); - small_vector var_local_pSubmits; - vku::safe_VkSubmitInfo2* local_pSubmits = nullptr; - { - if (pSubmits) { - var_local_pSubmits.resize(submitCount); - local_pSubmits = var_local_pSubmits.data(); - for (uint32_t index0 = 0; index0 < submitCount; ++index0) { - local_pSubmits[index0].initialize(&pSubmits[index0]); - UnwrapPnextChainHandles(layer_data, local_pSubmits[index0].pNext); - if (local_pSubmits[index0].pWaitSemaphoreInfos) { - for (uint32_t index1 = 0; index1 < local_pSubmits[index0].waitSemaphoreInfoCount; ++index1) { - if (pSubmits[index0].pWaitSemaphoreInfos[index1].semaphore) { - local_pSubmits[index0].pWaitSemaphoreInfos[index1].semaphore = - layer_data->Unwrap(pSubmits[index0].pWaitSemaphoreInfos[index1].semaphore); - } - } - } - if (local_pSubmits[index0].pCommandBufferInfos) { - for (uint32_t index1 = 0; index1 < local_pSubmits[index0].commandBufferInfoCount; ++index1) { - UnwrapPnextChainHandles(layer_data, local_pSubmits[index0].pCommandBufferInfos[index1].pNext); - } - } - if (local_pSubmits[index0].pSignalSemaphoreInfos) { - for (uint32_t index1 = 0; index1 < local_pSubmits[index0].signalSemaphoreInfoCount; ++index1) { - if (pSubmits[index0].pSignalSemaphoreInfos[index1].semaphore) { - local_pSubmits[index0].pSignalSemaphoreInfos[index1].semaphore = - layer_data->Unwrap(pSubmits[index0].pSignalSemaphoreInfos[index1].semaphore); - } - } - } - } - } - fence = layer_data->Unwrap(fence); - } - VkResult result = - layer_data->device_dispatch_table.QueueSubmit2(queue, submitCount, (const VkSubmitInfo2*)local_pSubmits, fence); - - return result; -} - -void DispatchCmdCopyBuffer2(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdCopyBuffer2(commandBuffer, pCopyBufferInfo); - vku::safe_VkCopyBufferInfo2 var_local_pCopyBufferInfo; - vku::safe_VkCopyBufferInfo2* local_pCopyBufferInfo = nullptr; - { - if (pCopyBufferInfo) { - local_pCopyBufferInfo = &var_local_pCopyBufferInfo; - local_pCopyBufferInfo->initialize(pCopyBufferInfo); - - if (pCopyBufferInfo->srcBuffer) { - local_pCopyBufferInfo->srcBuffer = layer_data->Unwrap(pCopyBufferInfo->srcBuffer); - } - if (pCopyBufferInfo->dstBuffer) { - local_pCopyBufferInfo->dstBuffer = layer_data->Unwrap(pCopyBufferInfo->dstBuffer); - } - } - } - layer_data->device_dispatch_table.CmdCopyBuffer2(commandBuffer, (const VkCopyBufferInfo2*)local_pCopyBufferInfo); -} - -void DispatchCmdCopyImage2(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdCopyImage2(commandBuffer, pCopyImageInfo); - vku::safe_VkCopyImageInfo2 var_local_pCopyImageInfo; - vku::safe_VkCopyImageInfo2* local_pCopyImageInfo = nullptr; - { - if (pCopyImageInfo) { - local_pCopyImageInfo = &var_local_pCopyImageInfo; - local_pCopyImageInfo->initialize(pCopyImageInfo); - - if (pCopyImageInfo->srcImage) { - local_pCopyImageInfo->srcImage = layer_data->Unwrap(pCopyImageInfo->srcImage); - } - if (pCopyImageInfo->dstImage) { - local_pCopyImageInfo->dstImage = layer_data->Unwrap(pCopyImageInfo->dstImage); - } - } - } - layer_data->device_dispatch_table.CmdCopyImage2(commandBuffer, (const VkCopyImageInfo2*)local_pCopyImageInfo); -} - -void DispatchCmdCopyBufferToImage2(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdCopyBufferToImage2(commandBuffer, pCopyBufferToImageInfo); - vku::safe_VkCopyBufferToImageInfo2 var_local_pCopyBufferToImageInfo; - vku::safe_VkCopyBufferToImageInfo2* local_pCopyBufferToImageInfo = nullptr; - { - if (pCopyBufferToImageInfo) { - local_pCopyBufferToImageInfo = &var_local_pCopyBufferToImageInfo; - local_pCopyBufferToImageInfo->initialize(pCopyBufferToImageInfo); - - if (pCopyBufferToImageInfo->srcBuffer) { - local_pCopyBufferToImageInfo->srcBuffer = layer_data->Unwrap(pCopyBufferToImageInfo->srcBuffer); - } - if (pCopyBufferToImageInfo->dstImage) { - local_pCopyBufferToImageInfo->dstImage = layer_data->Unwrap(pCopyBufferToImageInfo->dstImage); - } - } - } - layer_data->device_dispatch_table.CmdCopyBufferToImage2(commandBuffer, - (const VkCopyBufferToImageInfo2*)local_pCopyBufferToImageInfo); -} - -void DispatchCmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdCopyImageToBuffer2(commandBuffer, pCopyImageToBufferInfo); - vku::safe_VkCopyImageToBufferInfo2 var_local_pCopyImageToBufferInfo; - vku::safe_VkCopyImageToBufferInfo2* local_pCopyImageToBufferInfo = nullptr; - { - if (pCopyImageToBufferInfo) { - local_pCopyImageToBufferInfo = &var_local_pCopyImageToBufferInfo; - local_pCopyImageToBufferInfo->initialize(pCopyImageToBufferInfo); - - if (pCopyImageToBufferInfo->srcImage) { - local_pCopyImageToBufferInfo->srcImage = layer_data->Unwrap(pCopyImageToBufferInfo->srcImage); - } - if (pCopyImageToBufferInfo->dstBuffer) { - local_pCopyImageToBufferInfo->dstBuffer = layer_data->Unwrap(pCopyImageToBufferInfo->dstBuffer); - } - } - } - layer_data->device_dispatch_table.CmdCopyImageToBuffer2(commandBuffer, - (const VkCopyImageToBufferInfo2*)local_pCopyImageToBufferInfo); -} - -void DispatchCmdBlitImage2(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdBlitImage2(commandBuffer, pBlitImageInfo); - vku::safe_VkBlitImageInfo2 var_local_pBlitImageInfo; - vku::safe_VkBlitImageInfo2* local_pBlitImageInfo = nullptr; - { - if (pBlitImageInfo) { - local_pBlitImageInfo = &var_local_pBlitImageInfo; - local_pBlitImageInfo->initialize(pBlitImageInfo); - - if (pBlitImageInfo->srcImage) { - local_pBlitImageInfo->srcImage = layer_data->Unwrap(pBlitImageInfo->srcImage); - } - if (pBlitImageInfo->dstImage) { - local_pBlitImageInfo->dstImage = layer_data->Unwrap(pBlitImageInfo->dstImage); - } - } - } - layer_data->device_dispatch_table.CmdBlitImage2(commandBuffer, (const VkBlitImageInfo2*)local_pBlitImageInfo); -} - -void DispatchCmdResolveImage2(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdResolveImage2(commandBuffer, pResolveImageInfo); - vku::safe_VkResolveImageInfo2 var_local_pResolveImageInfo; - vku::safe_VkResolveImageInfo2* local_pResolveImageInfo = nullptr; - { - if (pResolveImageInfo) { - local_pResolveImageInfo = &var_local_pResolveImageInfo; - local_pResolveImageInfo->initialize(pResolveImageInfo); - - if (pResolveImageInfo->srcImage) { - local_pResolveImageInfo->srcImage = layer_data->Unwrap(pResolveImageInfo->srcImage); - } - if (pResolveImageInfo->dstImage) { - local_pResolveImageInfo->dstImage = layer_data->Unwrap(pResolveImageInfo->dstImage); - } - } - } - layer_data->device_dispatch_table.CmdResolveImage2(commandBuffer, (const VkResolveImageInfo2*)local_pResolveImageInfo); -} - -void DispatchCmdBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdBeginRendering(commandBuffer, pRenderingInfo); - vku::safe_VkRenderingInfo var_local_pRenderingInfo; - vku::safe_VkRenderingInfo* local_pRenderingInfo = nullptr; - { - if (pRenderingInfo) { - local_pRenderingInfo = &var_local_pRenderingInfo; - local_pRenderingInfo->initialize(pRenderingInfo); - if (local_pRenderingInfo->pColorAttachments) { - for (uint32_t index1 = 0; index1 < local_pRenderingInfo->colorAttachmentCount; ++index1) { - if (pRenderingInfo->pColorAttachments[index1].imageView) { - local_pRenderingInfo->pColorAttachments[index1].imageView = - layer_data->Unwrap(pRenderingInfo->pColorAttachments[index1].imageView); - } - if (pRenderingInfo->pColorAttachments[index1].resolveImageView) { - local_pRenderingInfo->pColorAttachments[index1].resolveImageView = - layer_data->Unwrap(pRenderingInfo->pColorAttachments[index1].resolveImageView); - } - } - } - if (local_pRenderingInfo->pDepthAttachment) { - if (pRenderingInfo->pDepthAttachment->imageView) { - local_pRenderingInfo->pDepthAttachment->imageView = - layer_data->Unwrap(pRenderingInfo->pDepthAttachment->imageView); - } - if (pRenderingInfo->pDepthAttachment->resolveImageView) { - local_pRenderingInfo->pDepthAttachment->resolveImageView = - layer_data->Unwrap(pRenderingInfo->pDepthAttachment->resolveImageView); - } - } - if (local_pRenderingInfo->pStencilAttachment) { - if (pRenderingInfo->pStencilAttachment->imageView) { - local_pRenderingInfo->pStencilAttachment->imageView = - layer_data->Unwrap(pRenderingInfo->pStencilAttachment->imageView); - } - if (pRenderingInfo->pStencilAttachment->resolveImageView) { - local_pRenderingInfo->pStencilAttachment->resolveImageView = - layer_data->Unwrap(pRenderingInfo->pStencilAttachment->resolveImageView); - } - } - UnwrapPnextChainHandles(layer_data, local_pRenderingInfo->pNext); - } - } - layer_data->device_dispatch_table.CmdBeginRendering(commandBuffer, (const VkRenderingInfo*)local_pRenderingInfo); -} - -void DispatchCmdEndRendering(VkCommandBuffer commandBuffer) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdEndRendering(commandBuffer); -} - -void DispatchCmdSetCullMode(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetCullMode(commandBuffer, cullMode); -} - -void DispatchCmdSetFrontFace(VkCommandBuffer commandBuffer, VkFrontFace frontFace) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetFrontFace(commandBuffer, frontFace); -} - -void DispatchCmdSetPrimitiveTopology(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetPrimitiveTopology(commandBuffer, primitiveTopology); -} - -void DispatchCmdSetViewportWithCount(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetViewportWithCount(commandBuffer, viewportCount, pViewports); -} - -void DispatchCmdSetScissorWithCount(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetScissorWithCount(commandBuffer, scissorCount, pScissors); -} - -void DispatchCmdBindVertexBuffers2(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, - const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, - const VkDeviceSize* pStrides) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdBindVertexBuffers2(commandBuffer, firstBinding, bindingCount, pBuffers, - pOffsets, pSizes, pStrides); - small_vector var_local_pBuffers; - VkBuffer* local_pBuffers = nullptr; - { - if (pBuffers) { - var_local_pBuffers.resize(bindingCount); - local_pBuffers = var_local_pBuffers.data(); - for (uint32_t index0 = 0; index0 < bindingCount; ++index0) { - local_pBuffers[index0] = layer_data->Unwrap(pBuffers[index0]); - } - } - } - layer_data->device_dispatch_table.CmdBindVertexBuffers2(commandBuffer, firstBinding, bindingCount, - (const VkBuffer*)local_pBuffers, pOffsets, pSizes, pStrides); -} - -void DispatchCmdSetDepthTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetDepthTestEnable(commandBuffer, depthTestEnable); -} - -void DispatchCmdSetDepthWriteEnable(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetDepthWriteEnable(commandBuffer, depthWriteEnable); -} - -void DispatchCmdSetDepthCompareOp(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetDepthCompareOp(commandBuffer, depthCompareOp); -} - -void DispatchCmdSetDepthBoundsTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetDepthBoundsTestEnable(commandBuffer, depthBoundsTestEnable); -} - -void DispatchCmdSetStencilTestEnable(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetStencilTestEnable(commandBuffer, stencilTestEnable); -} - -void DispatchCmdSetStencilOp(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, - VkStencilOp depthFailOp, VkCompareOp compareOp) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetStencilOp(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp); -} - -void DispatchCmdSetRasterizerDiscardEnable(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetRasterizerDiscardEnable(commandBuffer, rasterizerDiscardEnable); -} - -void DispatchCmdSetDepthBiasEnable(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetDepthBiasEnable(commandBuffer, depthBiasEnable); -} - -void DispatchCmdSetPrimitiveRestartEnable(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetPrimitiveRestartEnable(commandBuffer, primitiveRestartEnable); -} - -void DispatchGetDeviceBufferMemoryRequirements(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, - VkMemoryRequirements2* pMemoryRequirements) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - layer_data->device_dispatch_table.GetDeviceBufferMemoryRequirements(device, pInfo, pMemoryRequirements); -} - -void DispatchGetDeviceImageMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, - VkMemoryRequirements2* pMemoryRequirements) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - layer_data->device_dispatch_table.GetDeviceImageMemoryRequirements(device, pInfo, pMemoryRequirements); -} - -void DispatchGetDeviceImageSparseMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, - uint32_t* pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - layer_data->device_dispatch_table.GetDeviceImageSparseMemoryRequirements(device, pInfo, pSparseMemoryRequirementCount, - pSparseMemoryRequirements); -} - -void DispatchDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - if (!wrap_handles) return layer_data->instance_dispatch_table.DestroySurfaceKHR(instance, surface, pAllocator); - - uint64_t surface_id = CastToUint64(surface); - auto iter = unique_id_mapping.pop(surface_id); - if (iter != unique_id_mapping.end()) { - surface = (VkSurfaceKHR)iter->second; - } else { - surface = (VkSurfaceKHR)0; - } - layer_data->instance_dispatch_table.DestroySurfaceKHR(instance, surface, pAllocator); -} - -VkResult DispatchGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, - VkSurfaceKHR surface, VkBool32* pSupported) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.GetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, surface, - pSupported); - { surface = layer_data->Unwrap(surface); } - VkResult result = layer_data->instance_dispatch_table.GetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, - surface, pSupported); - - return result; -} - -VkResult DispatchGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, - VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.GetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, surface, - pSurfaceCapabilities); - { surface = layer_data->Unwrap(surface); } - VkResult result = - layer_data->instance_dispatch_table.GetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, surface, pSurfaceCapabilities); - - return result; -} - -VkResult DispatchGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, - uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.GetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, pSurfaceFormatCount, - pSurfaceFormats); - { surface = layer_data->Unwrap(surface); } - VkResult result = layer_data->instance_dispatch_table.GetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, - pSurfaceFormatCount, pSurfaceFormats); - - return result; -} - -VkResult DispatchGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, - uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.GetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, surface, - pPresentModeCount, pPresentModes); - { surface = layer_data->Unwrap(surface); } - VkResult result = layer_data->instance_dispatch_table.GetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, surface, - pPresentModeCount, pPresentModes); - - return result; -} - -VkResult DispatchCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CreateSwapchainKHR(device, pCreateInfo, pAllocator, pSwapchain); - vku::safe_VkSwapchainCreateInfoKHR var_local_pCreateInfo; - vku::safe_VkSwapchainCreateInfoKHR* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - - if (pCreateInfo->surface) { - local_pCreateInfo->surface = layer_data->Unwrap(pCreateInfo->surface); - } - if (pCreateInfo->oldSwapchain) { - local_pCreateInfo->oldSwapchain = layer_data->Unwrap(pCreateInfo->oldSwapchain); - } - } - } - VkResult result = layer_data->device_dispatch_table.CreateSwapchainKHR( - device, (const VkSwapchainCreateInfoKHR*)local_pCreateInfo, pAllocator, pSwapchain); - if (VK_SUCCESS == result) { - *pSwapchain = layer_data->WrapNew(*pSwapchain); - } - return result; -} - -VkResult DispatchAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, - VkFence fence, uint32_t* pImageIndex) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.AcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, pImageIndex); - { - swapchain = layer_data->Unwrap(swapchain); - semaphore = layer_data->Unwrap(semaphore); - fence = layer_data->Unwrap(fence); - } - VkResult result = - layer_data->device_dispatch_table.AcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, pImageIndex); - - return result; -} - -VkResult DispatchGetDeviceGroupPresentCapabilitiesKHR(VkDevice device, - VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - VkResult result = - layer_data->device_dispatch_table.GetDeviceGroupPresentCapabilitiesKHR(device, pDeviceGroupPresentCapabilities); - - return result; -} - -VkResult DispatchGetDeviceGroupSurfacePresentModesKHR(VkDevice device, VkSurfaceKHR surface, - VkDeviceGroupPresentModeFlagsKHR* pModes) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetDeviceGroupSurfacePresentModesKHR(device, surface, pModes); - { surface = layer_data->Unwrap(surface); } - VkResult result = layer_data->device_dispatch_table.GetDeviceGroupSurfacePresentModesKHR(device, surface, pModes); - - return result; -} - -VkResult DispatchGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pRectCount, - VkRect2D* pRects) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.GetPhysicalDevicePresentRectanglesKHR(physicalDevice, surface, pRectCount, - pRects); - { surface = layer_data->Unwrap(surface); } - VkResult result = - layer_data->instance_dispatch_table.GetPhysicalDevicePresentRectanglesKHR(physicalDevice, surface, pRectCount, pRects); - - return result; -} - -VkResult DispatchAcquireNextImage2KHR(VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.AcquireNextImage2KHR(device, pAcquireInfo, pImageIndex); - vku::safe_VkAcquireNextImageInfoKHR var_local_pAcquireInfo; - vku::safe_VkAcquireNextImageInfoKHR* local_pAcquireInfo = nullptr; - { - if (pAcquireInfo) { - local_pAcquireInfo = &var_local_pAcquireInfo; - local_pAcquireInfo->initialize(pAcquireInfo); - - if (pAcquireInfo->swapchain) { - local_pAcquireInfo->swapchain = layer_data->Unwrap(pAcquireInfo->swapchain); - } - if (pAcquireInfo->semaphore) { - local_pAcquireInfo->semaphore = layer_data->Unwrap(pAcquireInfo->semaphore); - } - if (pAcquireInfo->fence) { - local_pAcquireInfo->fence = layer_data->Unwrap(pAcquireInfo->fence); - } - } - } - VkResult result = layer_data->device_dispatch_table.AcquireNextImage2KHR( - device, (const VkAcquireNextImageInfoKHR*)local_pAcquireInfo, pImageIndex); - - return result; -} - -VkResult DispatchCreateDisplayModeKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, - const VkDisplayModeCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkDisplayModeKHR* pMode) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.CreateDisplayModeKHR(physicalDevice, display, pCreateInfo, pAllocator, pMode); - { display = layer_data->Unwrap(display); } - VkResult result = - layer_data->instance_dispatch_table.CreateDisplayModeKHR(physicalDevice, display, pCreateInfo, pAllocator, pMode); - if (VK_SUCCESS == result) { - *pMode = layer_data->WrapNew(*pMode); - } - return result; -} - -VkResult DispatchGetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex, - VkDisplayPlaneCapabilitiesKHR* pCapabilities) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.GetDisplayPlaneCapabilitiesKHR(physicalDevice, mode, planeIndex, pCapabilities); - { mode = layer_data->Unwrap(mode); } - VkResult result = - layer_data->instance_dispatch_table.GetDisplayPlaneCapabilitiesKHR(physicalDevice, mode, planeIndex, pCapabilities); - - return result; -} - -VkResult DispatchCreateDisplayPlaneSurfaceKHR(VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.CreateDisplayPlaneSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); - vku::safe_VkDisplaySurfaceCreateInfoKHR var_local_pCreateInfo; - vku::safe_VkDisplaySurfaceCreateInfoKHR* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - - if (pCreateInfo->displayMode) { - local_pCreateInfo->displayMode = layer_data->Unwrap(pCreateInfo->displayMode); - } - } - } - VkResult result = layer_data->instance_dispatch_table.CreateDisplayPlaneSurfaceKHR( - instance, (const VkDisplaySurfaceCreateInfoKHR*)local_pCreateInfo, pAllocator, pSurface); - if (VK_SUCCESS == result) { - *pSurface = layer_data->WrapNew(*pSurface); - } - return result; -} - -VkResult DispatchCreateSharedSwapchainsKHR(VkDevice device, uint32_t swapchainCount, const VkSwapchainCreateInfoKHR* pCreateInfos, - const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CreateSharedSwapchainsKHR(device, swapchainCount, pCreateInfos, pAllocator, - pSwapchains); - small_vector var_local_pCreateInfos; - vku::safe_VkSwapchainCreateInfoKHR* local_pCreateInfos = nullptr; - { - if (pCreateInfos) { - var_local_pCreateInfos.resize(swapchainCount); - local_pCreateInfos = var_local_pCreateInfos.data(); - for (uint32_t index0 = 0; index0 < swapchainCount; ++index0) { - local_pCreateInfos[index0].initialize(&pCreateInfos[index0]); - - if (pCreateInfos[index0].surface) { - local_pCreateInfos[index0].surface = layer_data->Unwrap(pCreateInfos[index0].surface); - } - if (pCreateInfos[index0].oldSwapchain) { - local_pCreateInfos[index0].oldSwapchain = layer_data->Unwrap(pCreateInfos[index0].oldSwapchain); - } - } - } - } - VkResult result = layer_data->device_dispatch_table.CreateSharedSwapchainsKHR( - device, swapchainCount, (const VkSwapchainCreateInfoKHR*)local_pCreateInfos, pAllocator, pSwapchains); - if (VK_SUCCESS == result) { - for (uint32_t index0 = 0; index0 < swapchainCount; index0++) { - pSwapchains[index0] = layer_data->WrapNew(pSwapchains[index0]); - } - } - return result; -} -#ifdef VK_USE_PLATFORM_XLIB_KHR - -VkResult DispatchCreateXlibSurfaceKHR(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - if (!wrap_handles) return layer_data->instance_dispatch_table.CreateXlibSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); - - VkResult result = layer_data->instance_dispatch_table.CreateXlibSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); - if (VK_SUCCESS == result) { - *pSurface = layer_data->WrapNew(*pSurface); - } - return result; -} - -VkBool32 DispatchGetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, - Display* dpy, VisualID visualID) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkBool32 result = layer_data->instance_dispatch_table.GetPhysicalDeviceXlibPresentationSupportKHR( - physicalDevice, queueFamilyIndex, dpy, visualID); - - return result; -} -#endif // VK_USE_PLATFORM_XLIB_KHR -#ifdef VK_USE_PLATFORM_XCB_KHR - -VkResult DispatchCreateXcbSurfaceKHR(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - if (!wrap_handles) return layer_data->instance_dispatch_table.CreateXcbSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); - - VkResult result = layer_data->instance_dispatch_table.CreateXcbSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); - if (VK_SUCCESS == result) { - *pSurface = layer_data->WrapNew(*pSurface); - } - return result; -} - -VkBool32 DispatchGetPhysicalDeviceXcbPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, - xcb_connection_t* connection, xcb_visualid_t visual_id) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkBool32 result = layer_data->instance_dispatch_table.GetPhysicalDeviceXcbPresentationSupportKHR( - physicalDevice, queueFamilyIndex, connection, visual_id); - - return result; -} -#endif // VK_USE_PLATFORM_XCB_KHR -#ifdef VK_USE_PLATFORM_WAYLAND_KHR - -VkResult DispatchCreateWaylandSurfaceKHR(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.CreateWaylandSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); - - VkResult result = layer_data->instance_dispatch_table.CreateWaylandSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); - if (VK_SUCCESS == result) { - *pSurface = layer_data->WrapNew(*pSurface); - } - return result; -} - -VkBool32 DispatchGetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, - struct wl_display* display) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkBool32 result = layer_data->instance_dispatch_table.GetPhysicalDeviceWaylandPresentationSupportKHR(physicalDevice, - queueFamilyIndex, display); - - return result; -} -#endif // VK_USE_PLATFORM_WAYLAND_KHR -#ifdef VK_USE_PLATFORM_ANDROID_KHR - -VkResult DispatchCreateAndroidSurfaceKHR(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.CreateAndroidSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); - - VkResult result = layer_data->instance_dispatch_table.CreateAndroidSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); - if (VK_SUCCESS == result) { - *pSurface = layer_data->WrapNew(*pSurface); - } - return result; -} -#endif // VK_USE_PLATFORM_ANDROID_KHR -#ifdef VK_USE_PLATFORM_WIN32_KHR - -VkResult DispatchCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.CreateWin32SurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); - - VkResult result = layer_data->instance_dispatch_table.CreateWin32SurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); - if (VK_SUCCESS == result) { - *pSurface = layer_data->WrapNew(*pSurface); - } - return result; -} - -VkBool32 DispatchGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkBool32 result = - layer_data->instance_dispatch_table.GetPhysicalDeviceWin32PresentationSupportKHR(physicalDevice, queueFamilyIndex); - - return result; -} -#endif // VK_USE_PLATFORM_WIN32_KHR - -VkResult DispatchGetPhysicalDeviceVideoCapabilitiesKHR(VkPhysicalDevice physicalDevice, const VkVideoProfileInfoKHR* pVideoProfile, - VkVideoCapabilitiesKHR* pCapabilities) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkResult result = - layer_data->instance_dispatch_table.GetPhysicalDeviceVideoCapabilitiesKHR(physicalDevice, pVideoProfile, pCapabilities); - - return result; -} - -VkResult DispatchGetPhysicalDeviceVideoFormatPropertiesKHR(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceVideoFormatInfoKHR* pVideoFormatInfo, - uint32_t* pVideoFormatPropertyCount, - VkVideoFormatPropertiesKHR* pVideoFormatProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkResult result = layer_data->instance_dispatch_table.GetPhysicalDeviceVideoFormatPropertiesKHR( - physicalDevice, pVideoFormatInfo, pVideoFormatPropertyCount, pVideoFormatProperties); - - return result; -} - -VkResult DispatchCreateVideoSessionKHR(VkDevice device, const VkVideoSessionCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkVideoSessionKHR* pVideoSession) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CreateVideoSessionKHR(device, pCreateInfo, pAllocator, pVideoSession); - - VkResult result = layer_data->device_dispatch_table.CreateVideoSessionKHR(device, pCreateInfo, pAllocator, pVideoSession); - if (VK_SUCCESS == result) { - *pVideoSession = layer_data->WrapNew(*pVideoSession); - } - return result; -} - -void DispatchDestroyVideoSessionKHR(VkDevice device, VkVideoSessionKHR videoSession, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyVideoSessionKHR(device, videoSession, pAllocator); - - uint64_t videoSession_id = CastToUint64(videoSession); - auto iter = unique_id_mapping.pop(videoSession_id); - if (iter != unique_id_mapping.end()) { - videoSession = (VkVideoSessionKHR)iter->second; - } else { - videoSession = (VkVideoSessionKHR)0; - } - layer_data->device_dispatch_table.DestroyVideoSessionKHR(device, videoSession, pAllocator); -} - -VkResult DispatchGetVideoSessionMemoryRequirementsKHR(VkDevice device, VkVideoSessionKHR videoSession, - uint32_t* pMemoryRequirementsCount, - VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetVideoSessionMemoryRequirementsKHR( - device, videoSession, pMemoryRequirementsCount, pMemoryRequirements); - { videoSession = layer_data->Unwrap(videoSession); } - VkResult result = layer_data->device_dispatch_table.GetVideoSessionMemoryRequirementsKHR( - device, videoSession, pMemoryRequirementsCount, pMemoryRequirements); - - return result; -} - -VkResult DispatchBindVideoSessionMemoryKHR(VkDevice device, VkVideoSessionKHR videoSession, uint32_t bindSessionMemoryInfoCount, - const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.BindVideoSessionMemoryKHR(device, videoSession, bindSessionMemoryInfoCount, - pBindSessionMemoryInfos); - small_vector var_local_pBindSessionMemoryInfos; - vku::safe_VkBindVideoSessionMemoryInfoKHR* local_pBindSessionMemoryInfos = nullptr; - { - videoSession = layer_data->Unwrap(videoSession); - if (pBindSessionMemoryInfos) { - var_local_pBindSessionMemoryInfos.resize(bindSessionMemoryInfoCount); - local_pBindSessionMemoryInfos = var_local_pBindSessionMemoryInfos.data(); - for (uint32_t index0 = 0; index0 < bindSessionMemoryInfoCount; ++index0) { - local_pBindSessionMemoryInfos[index0].initialize(&pBindSessionMemoryInfos[index0]); - - if (pBindSessionMemoryInfos[index0].memory) { - local_pBindSessionMemoryInfos[index0].memory = layer_data->Unwrap(pBindSessionMemoryInfos[index0].memory); - } - } - } - } - VkResult result = layer_data->device_dispatch_table.BindVideoSessionMemoryKHR( - device, videoSession, bindSessionMemoryInfoCount, (const VkBindVideoSessionMemoryInfoKHR*)local_pBindSessionMemoryInfos); - - return result; -} - -VkResult DispatchCreateVideoSessionParametersKHR(VkDevice device, const VkVideoSessionParametersCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkVideoSessionParametersKHR* pVideoSessionParameters) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CreateVideoSessionParametersKHR(device, pCreateInfo, pAllocator, - pVideoSessionParameters); - vku::safe_VkVideoSessionParametersCreateInfoKHR var_local_pCreateInfo; - vku::safe_VkVideoSessionParametersCreateInfoKHR* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - - if (pCreateInfo->videoSessionParametersTemplate) { - local_pCreateInfo->videoSessionParametersTemplate = layer_data->Unwrap(pCreateInfo->videoSessionParametersTemplate); - } - if (pCreateInfo->videoSession) { - local_pCreateInfo->videoSession = layer_data->Unwrap(pCreateInfo->videoSession); - } - } - } - VkResult result = layer_data->device_dispatch_table.CreateVideoSessionParametersKHR( - device, (const VkVideoSessionParametersCreateInfoKHR*)local_pCreateInfo, pAllocator, pVideoSessionParameters); - if (VK_SUCCESS == result) { - *pVideoSessionParameters = layer_data->WrapNew(*pVideoSessionParameters); - } - return result; -} - -VkResult DispatchUpdateVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, - const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.UpdateVideoSessionParametersKHR(device, videoSessionParameters, pUpdateInfo); - { videoSessionParameters = layer_data->Unwrap(videoSessionParameters); } - VkResult result = - layer_data->device_dispatch_table.UpdateVideoSessionParametersKHR(device, videoSessionParameters, pUpdateInfo); - - return result; -} - -void DispatchDestroyVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, - const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.DestroyVideoSessionParametersKHR(device, videoSessionParameters, pAllocator); - - uint64_t videoSessionParameters_id = CastToUint64(videoSessionParameters); - auto iter = unique_id_mapping.pop(videoSessionParameters_id); - if (iter != unique_id_mapping.end()) { - videoSessionParameters = (VkVideoSessionParametersKHR)iter->second; - } else { - videoSessionParameters = (VkVideoSessionParametersKHR)0; - } - layer_data->device_dispatch_table.DestroyVideoSessionParametersKHR(device, videoSessionParameters, pAllocator); -} - -void DispatchCmdBeginVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoBeginCodingInfoKHR* pBeginInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdBeginVideoCodingKHR(commandBuffer, pBeginInfo); - vku::safe_VkVideoBeginCodingInfoKHR var_local_pBeginInfo; - vku::safe_VkVideoBeginCodingInfoKHR* local_pBeginInfo = nullptr; - { - if (pBeginInfo) { - local_pBeginInfo = &var_local_pBeginInfo; - local_pBeginInfo->initialize(pBeginInfo); - - if (pBeginInfo->videoSession) { - local_pBeginInfo->videoSession = layer_data->Unwrap(pBeginInfo->videoSession); - } - if (pBeginInfo->videoSessionParameters) { - local_pBeginInfo->videoSessionParameters = layer_data->Unwrap(pBeginInfo->videoSessionParameters); - } - if (local_pBeginInfo->pReferenceSlots) { - for (uint32_t index1 = 0; index1 < local_pBeginInfo->referenceSlotCount; ++index1) { - if (local_pBeginInfo->pReferenceSlots[index1].pPictureResource) { - if (pBeginInfo->pReferenceSlots[index1].pPictureResource->imageViewBinding) { - local_pBeginInfo->pReferenceSlots[index1].pPictureResource->imageViewBinding = - layer_data->Unwrap(pBeginInfo->pReferenceSlots[index1].pPictureResource->imageViewBinding); - } - } - } - } - } - } - layer_data->device_dispatch_table.CmdBeginVideoCodingKHR(commandBuffer, (const VkVideoBeginCodingInfoKHR*)local_pBeginInfo); -} - -void DispatchCmdEndVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoEndCodingInfoKHR* pEndCodingInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdEndVideoCodingKHR(commandBuffer, pEndCodingInfo); -} - -void DispatchCmdControlVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoCodingControlInfoKHR* pCodingControlInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdControlVideoCodingKHR(commandBuffer, pCodingControlInfo); -} - -void DispatchCmdDecodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR* pDecodeInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdDecodeVideoKHR(commandBuffer, pDecodeInfo); - vku::safe_VkVideoDecodeInfoKHR var_local_pDecodeInfo; - vku::safe_VkVideoDecodeInfoKHR* local_pDecodeInfo = nullptr; - { - if (pDecodeInfo) { - local_pDecodeInfo = &var_local_pDecodeInfo; - local_pDecodeInfo->initialize(pDecodeInfo); - - if (pDecodeInfo->srcBuffer) { - local_pDecodeInfo->srcBuffer = layer_data->Unwrap(pDecodeInfo->srcBuffer); - } - if (pDecodeInfo->dstPictureResource.imageViewBinding) { - local_pDecodeInfo->dstPictureResource.imageViewBinding = - layer_data->Unwrap(pDecodeInfo->dstPictureResource.imageViewBinding); - } - if (local_pDecodeInfo->pSetupReferenceSlot) { - if (local_pDecodeInfo->pSetupReferenceSlot->pPictureResource) { - if (pDecodeInfo->pSetupReferenceSlot->pPictureResource->imageViewBinding) { - local_pDecodeInfo->pSetupReferenceSlot->pPictureResource->imageViewBinding = - layer_data->Unwrap(pDecodeInfo->pSetupReferenceSlot->pPictureResource->imageViewBinding); - } - } - } - if (local_pDecodeInfo->pReferenceSlots) { - for (uint32_t index1 = 0; index1 < local_pDecodeInfo->referenceSlotCount; ++index1) { - if (local_pDecodeInfo->pReferenceSlots[index1].pPictureResource) { - if (pDecodeInfo->pReferenceSlots[index1].pPictureResource->imageViewBinding) { - local_pDecodeInfo->pReferenceSlots[index1].pPictureResource->imageViewBinding = - layer_data->Unwrap(pDecodeInfo->pReferenceSlots[index1].pPictureResource->imageViewBinding); - } - } - } - } - UnwrapPnextChainHandles(layer_data, local_pDecodeInfo->pNext); - } - } - layer_data->device_dispatch_table.CmdDecodeVideoKHR(commandBuffer, (const VkVideoDecodeInfoKHR*)local_pDecodeInfo); -} - -void DispatchCmdBeginRenderingKHR(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdBeginRenderingKHR(commandBuffer, pRenderingInfo); - vku::safe_VkRenderingInfo var_local_pRenderingInfo; - vku::safe_VkRenderingInfo* local_pRenderingInfo = nullptr; - { - if (pRenderingInfo) { - local_pRenderingInfo = &var_local_pRenderingInfo; - local_pRenderingInfo->initialize(pRenderingInfo); - if (local_pRenderingInfo->pColorAttachments) { - for (uint32_t index1 = 0; index1 < local_pRenderingInfo->colorAttachmentCount; ++index1) { - if (pRenderingInfo->pColorAttachments[index1].imageView) { - local_pRenderingInfo->pColorAttachments[index1].imageView = - layer_data->Unwrap(pRenderingInfo->pColorAttachments[index1].imageView); - } - if (pRenderingInfo->pColorAttachments[index1].resolveImageView) { - local_pRenderingInfo->pColorAttachments[index1].resolveImageView = - layer_data->Unwrap(pRenderingInfo->pColorAttachments[index1].resolveImageView); - } - } - } - if (local_pRenderingInfo->pDepthAttachment) { - if (pRenderingInfo->pDepthAttachment->imageView) { - local_pRenderingInfo->pDepthAttachment->imageView = - layer_data->Unwrap(pRenderingInfo->pDepthAttachment->imageView); - } - if (pRenderingInfo->pDepthAttachment->resolveImageView) { - local_pRenderingInfo->pDepthAttachment->resolveImageView = - layer_data->Unwrap(pRenderingInfo->pDepthAttachment->resolveImageView); - } - } - if (local_pRenderingInfo->pStencilAttachment) { - if (pRenderingInfo->pStencilAttachment->imageView) { - local_pRenderingInfo->pStencilAttachment->imageView = - layer_data->Unwrap(pRenderingInfo->pStencilAttachment->imageView); - } - if (pRenderingInfo->pStencilAttachment->resolveImageView) { - local_pRenderingInfo->pStencilAttachment->resolveImageView = - layer_data->Unwrap(pRenderingInfo->pStencilAttachment->resolveImageView); - } - } - UnwrapPnextChainHandles(layer_data, local_pRenderingInfo->pNext); - } - } - layer_data->device_dispatch_table.CmdBeginRenderingKHR(commandBuffer, (const VkRenderingInfo*)local_pRenderingInfo); -} - -void DispatchCmdEndRenderingKHR(VkCommandBuffer commandBuffer) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdEndRenderingKHR(commandBuffer); -} - -void DispatchGetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceFeatures2KHR(physicalDevice, pFeatures); -} - -void DispatchGetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceProperties2KHR(physicalDevice, pProperties); -} - -void DispatchGetPhysicalDeviceFormatProperties2KHR(VkPhysicalDevice physicalDevice, VkFormat format, - VkFormatProperties2* pFormatProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceFormatProperties2KHR(physicalDevice, format, pFormatProperties); -} - -VkResult DispatchGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, - VkImageFormatProperties2* pImageFormatProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkResult result = layer_data->instance_dispatch_table.GetPhysicalDeviceImageFormatProperties2KHR( - physicalDevice, pImageFormatInfo, pImageFormatProperties); - - return result; -} - -void DispatchGetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, - VkQueueFamilyProperties2* pQueueFamilyProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceQueueFamilyProperties2KHR(physicalDevice, pQueueFamilyPropertyCount, - pQueueFamilyProperties); -} - -void DispatchGetPhysicalDeviceMemoryProperties2KHR(VkPhysicalDevice physicalDevice, - VkPhysicalDeviceMemoryProperties2* pMemoryProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceMemoryProperties2KHR(physicalDevice, pMemoryProperties); -} - -void DispatchGetPhysicalDeviceSparseImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, - uint32_t* pPropertyCount, - VkSparseImageFormatProperties2* pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceSparseImageFormatProperties2KHR(physicalDevice, pFormatInfo, - pPropertyCount, pProperties); -} - -void DispatchGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, - uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - layer_data->device_dispatch_table.GetDeviceGroupPeerMemoryFeaturesKHR(device, heapIndex, localDeviceIndex, remoteDeviceIndex, - pPeerMemoryFeatures); -} - -void DispatchCmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, uint32_t deviceMask) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetDeviceMaskKHR(commandBuffer, deviceMask); -} - -void DispatchCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, - uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdDispatchBaseKHR(commandBuffer, baseGroupX, baseGroupY, baseGroupZ, groupCountX, - groupCountY, groupCountZ); -} - -void DispatchTrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.TrimCommandPoolKHR(device, commandPool, flags); - { commandPool = layer_data->Unwrap(commandPool); } - layer_data->device_dispatch_table.TrimCommandPoolKHR(device, commandPool, flags); -} - -VkResult DispatchEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, - VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - - VkResult result = layer_data->instance_dispatch_table.EnumeratePhysicalDeviceGroupsKHR(instance, pPhysicalDeviceGroupCount, - pPhysicalDeviceGroupProperties); - - return result; -} - -void DispatchGetPhysicalDeviceExternalBufferPropertiesKHR(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, - VkExternalBufferProperties* pExternalBufferProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceExternalBufferPropertiesKHR(physicalDevice, pExternalBufferInfo, - pExternalBufferProperties); -} -#ifdef VK_USE_PLATFORM_WIN32_KHR - -VkResult DispatchGetMemoryWin32HandleKHR(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, - HANDLE* pHandle) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetMemoryWin32HandleKHR(device, pGetWin32HandleInfo, pHandle); - vku::safe_VkMemoryGetWin32HandleInfoKHR var_local_pGetWin32HandleInfo; - vku::safe_VkMemoryGetWin32HandleInfoKHR* local_pGetWin32HandleInfo = nullptr; - { - if (pGetWin32HandleInfo) { - local_pGetWin32HandleInfo = &var_local_pGetWin32HandleInfo; - local_pGetWin32HandleInfo->initialize(pGetWin32HandleInfo); - - if (pGetWin32HandleInfo->memory) { - local_pGetWin32HandleInfo->memory = layer_data->Unwrap(pGetWin32HandleInfo->memory); - } - } - } - VkResult result = layer_data->device_dispatch_table.GetMemoryWin32HandleKHR( - device, (const VkMemoryGetWin32HandleInfoKHR*)local_pGetWin32HandleInfo, pHandle); - - return result; -} - -VkResult DispatchGetMemoryWin32HandlePropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, - VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - VkResult result = layer_data->device_dispatch_table.GetMemoryWin32HandlePropertiesKHR(device, handleType, handle, - pMemoryWin32HandleProperties); - - return result; -} -#endif // VK_USE_PLATFORM_WIN32_KHR - -VkResult DispatchGetMemoryFdKHR(VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetMemoryFdKHR(device, pGetFdInfo, pFd); - vku::safe_VkMemoryGetFdInfoKHR var_local_pGetFdInfo; - vku::safe_VkMemoryGetFdInfoKHR* local_pGetFdInfo = nullptr; - { - if (pGetFdInfo) { - local_pGetFdInfo = &var_local_pGetFdInfo; - local_pGetFdInfo->initialize(pGetFdInfo); - - if (pGetFdInfo->memory) { - local_pGetFdInfo->memory = layer_data->Unwrap(pGetFdInfo->memory); - } - } - } - VkResult result = layer_data->device_dispatch_table.GetMemoryFdKHR(device, (const VkMemoryGetFdInfoKHR*)local_pGetFdInfo, pFd); - - return result; -} - -VkResult DispatchGetMemoryFdPropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, - VkMemoryFdPropertiesKHR* pMemoryFdProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - VkResult result = layer_data->device_dispatch_table.GetMemoryFdPropertiesKHR(device, handleType, fd, pMemoryFdProperties); - - return result; -} - -void DispatchGetPhysicalDeviceExternalSemaphorePropertiesKHR(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, - VkExternalSemaphoreProperties* pExternalSemaphoreProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceExternalSemaphorePropertiesKHR(physicalDevice, pExternalSemaphoreInfo, - pExternalSemaphoreProperties); -} -#ifdef VK_USE_PLATFORM_WIN32_KHR - -VkResult DispatchImportSemaphoreWin32HandleKHR(VkDevice device, - const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.ImportSemaphoreWin32HandleKHR(device, pImportSemaphoreWin32HandleInfo); - vku::safe_VkImportSemaphoreWin32HandleInfoKHR var_local_pImportSemaphoreWin32HandleInfo; - vku::safe_VkImportSemaphoreWin32HandleInfoKHR* local_pImportSemaphoreWin32HandleInfo = nullptr; - { - if (pImportSemaphoreWin32HandleInfo) { - local_pImportSemaphoreWin32HandleInfo = &var_local_pImportSemaphoreWin32HandleInfo; - local_pImportSemaphoreWin32HandleInfo->initialize(pImportSemaphoreWin32HandleInfo); - - if (pImportSemaphoreWin32HandleInfo->semaphore) { - local_pImportSemaphoreWin32HandleInfo->semaphore = layer_data->Unwrap(pImportSemaphoreWin32HandleInfo->semaphore); - } - } - } - VkResult result = layer_data->device_dispatch_table.ImportSemaphoreWin32HandleKHR( - device, (const VkImportSemaphoreWin32HandleInfoKHR*)local_pImportSemaphoreWin32HandleInfo); - - return result; -} - -VkResult DispatchGetSemaphoreWin32HandleKHR(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, - HANDLE* pHandle) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetSemaphoreWin32HandleKHR(device, pGetWin32HandleInfo, pHandle); - vku::safe_VkSemaphoreGetWin32HandleInfoKHR var_local_pGetWin32HandleInfo; - vku::safe_VkSemaphoreGetWin32HandleInfoKHR* local_pGetWin32HandleInfo = nullptr; - { - if (pGetWin32HandleInfo) { - local_pGetWin32HandleInfo = &var_local_pGetWin32HandleInfo; - local_pGetWin32HandleInfo->initialize(pGetWin32HandleInfo); - - if (pGetWin32HandleInfo->semaphore) { - local_pGetWin32HandleInfo->semaphore = layer_data->Unwrap(pGetWin32HandleInfo->semaphore); - } - } - } - VkResult result = layer_data->device_dispatch_table.GetSemaphoreWin32HandleKHR( - device, (const VkSemaphoreGetWin32HandleInfoKHR*)local_pGetWin32HandleInfo, pHandle); - - return result; -} -#endif // VK_USE_PLATFORM_WIN32_KHR - -VkResult DispatchImportSemaphoreFdKHR(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.ImportSemaphoreFdKHR(device, pImportSemaphoreFdInfo); - vku::safe_VkImportSemaphoreFdInfoKHR var_local_pImportSemaphoreFdInfo; - vku::safe_VkImportSemaphoreFdInfoKHR* local_pImportSemaphoreFdInfo = nullptr; - { - if (pImportSemaphoreFdInfo) { - local_pImportSemaphoreFdInfo = &var_local_pImportSemaphoreFdInfo; - local_pImportSemaphoreFdInfo->initialize(pImportSemaphoreFdInfo); - - if (pImportSemaphoreFdInfo->semaphore) { - local_pImportSemaphoreFdInfo->semaphore = layer_data->Unwrap(pImportSemaphoreFdInfo->semaphore); - } - } - } - VkResult result = layer_data->device_dispatch_table.ImportSemaphoreFdKHR( - device, (const VkImportSemaphoreFdInfoKHR*)local_pImportSemaphoreFdInfo); - - return result; -} - -VkResult DispatchGetSemaphoreFdKHR(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetSemaphoreFdKHR(device, pGetFdInfo, pFd); - vku::safe_VkSemaphoreGetFdInfoKHR var_local_pGetFdInfo; - vku::safe_VkSemaphoreGetFdInfoKHR* local_pGetFdInfo = nullptr; - { - if (pGetFdInfo) { - local_pGetFdInfo = &var_local_pGetFdInfo; - local_pGetFdInfo->initialize(pGetFdInfo); - - if (pGetFdInfo->semaphore) { - local_pGetFdInfo->semaphore = layer_data->Unwrap(pGetFdInfo->semaphore); - } - } - } - VkResult result = - layer_data->device_dispatch_table.GetSemaphoreFdKHR(device, (const VkSemaphoreGetFdInfoKHR*)local_pGetFdInfo, pFd); - - return result; -} - -void DispatchCmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, - uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdPushDescriptorSetKHR(commandBuffer, pipelineBindPoint, layout, set, - descriptorWriteCount, pDescriptorWrites); - small_vector var_local_pDescriptorWrites; - vku::safe_VkWriteDescriptorSet* local_pDescriptorWrites = nullptr; - { - layout = layer_data->Unwrap(layout); - if (pDescriptorWrites) { - var_local_pDescriptorWrites.resize(descriptorWriteCount); - local_pDescriptorWrites = var_local_pDescriptorWrites.data(); - for (uint32_t index0 = 0; index0 < descriptorWriteCount; ++index0) { - local_pDescriptorWrites[index0].initialize(&pDescriptorWrites[index0]); - UnwrapPnextChainHandles(layer_data, local_pDescriptorWrites[index0].pNext); - - if (pDescriptorWrites[index0].dstSet) { - local_pDescriptorWrites[index0].dstSet = layer_data->Unwrap(pDescriptorWrites[index0].dstSet); - } - if (local_pDescriptorWrites[index0].pImageInfo) { - for (uint32_t index1 = 0; index1 < local_pDescriptorWrites[index0].descriptorCount; ++index1) { - if (pDescriptorWrites[index0].pImageInfo[index1].sampler) { - local_pDescriptorWrites[index0].pImageInfo[index1].sampler = - layer_data->Unwrap(pDescriptorWrites[index0].pImageInfo[index1].sampler); - } - if (pDescriptorWrites[index0].pImageInfo[index1].imageView) { - local_pDescriptorWrites[index0].pImageInfo[index1].imageView = - layer_data->Unwrap(pDescriptorWrites[index0].pImageInfo[index1].imageView); - } - } - } - if (local_pDescriptorWrites[index0].pBufferInfo) { - for (uint32_t index1 = 0; index1 < local_pDescriptorWrites[index0].descriptorCount; ++index1) { - if (pDescriptorWrites[index0].pBufferInfo[index1].buffer) { - local_pDescriptorWrites[index0].pBufferInfo[index1].buffer = - layer_data->Unwrap(pDescriptorWrites[index0].pBufferInfo[index1].buffer); - } - } - } - if (local_pDescriptorWrites[index0].pTexelBufferView) { - for (uint32_t index1 = 0; index1 < local_pDescriptorWrites[index0].descriptorCount; ++index1) { - local_pDescriptorWrites[index0].pTexelBufferView[index1] = - layer_data->Unwrap(local_pDescriptorWrites[index0].pTexelBufferView[index1]); - } - } - } - } - } - layer_data->device_dispatch_table.CmdPushDescriptorSetKHR(commandBuffer, pipelineBindPoint, layout, set, descriptorWriteCount, - (const VkWriteDescriptorSet*)local_pDescriptorWrites); -} - -void DispatchCmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, - const VkSubpassBeginInfo* pSubpassBeginInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdBeginRenderPass2KHR(commandBuffer, pRenderPassBegin, pSubpassBeginInfo); - vku::safe_VkRenderPassBeginInfo var_local_pRenderPassBegin; - vku::safe_VkRenderPassBeginInfo* local_pRenderPassBegin = nullptr; - { - if (pRenderPassBegin) { - local_pRenderPassBegin = &var_local_pRenderPassBegin; - local_pRenderPassBegin->initialize(pRenderPassBegin); - - if (pRenderPassBegin->renderPass) { - local_pRenderPassBegin->renderPass = layer_data->Unwrap(pRenderPassBegin->renderPass); - } - if (pRenderPassBegin->framebuffer) { - local_pRenderPassBegin->framebuffer = layer_data->Unwrap(pRenderPassBegin->framebuffer); - } - UnwrapPnextChainHandles(layer_data, local_pRenderPassBegin->pNext); - } - } - layer_data->device_dispatch_table.CmdBeginRenderPass2KHR(commandBuffer, (const VkRenderPassBeginInfo*)local_pRenderPassBegin, - pSubpassBeginInfo); -} - -void DispatchCmdNextSubpass2KHR(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, - const VkSubpassEndInfo* pSubpassEndInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdNextSubpass2KHR(commandBuffer, pSubpassBeginInfo, pSubpassEndInfo); -} - -void DispatchCmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdEndRenderPass2KHR(commandBuffer, pSubpassEndInfo); -} - -VkResult DispatchGetSwapchainStatusKHR(VkDevice device, VkSwapchainKHR swapchain) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetSwapchainStatusKHR(device, swapchain); - { swapchain = layer_data->Unwrap(swapchain); } - VkResult result = layer_data->device_dispatch_table.GetSwapchainStatusKHR(device, swapchain); - - return result; -} - -void DispatchGetPhysicalDeviceExternalFencePropertiesKHR(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, - VkExternalFenceProperties* pExternalFenceProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceExternalFencePropertiesKHR(physicalDevice, pExternalFenceInfo, - pExternalFenceProperties); -} -#ifdef VK_USE_PLATFORM_WIN32_KHR - -VkResult DispatchImportFenceWin32HandleKHR(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.ImportFenceWin32HandleKHR(device, pImportFenceWin32HandleInfo); - vku::safe_VkImportFenceWin32HandleInfoKHR var_local_pImportFenceWin32HandleInfo; - vku::safe_VkImportFenceWin32HandleInfoKHR* local_pImportFenceWin32HandleInfo = nullptr; - { - if (pImportFenceWin32HandleInfo) { - local_pImportFenceWin32HandleInfo = &var_local_pImportFenceWin32HandleInfo; - local_pImportFenceWin32HandleInfo->initialize(pImportFenceWin32HandleInfo); - - if (pImportFenceWin32HandleInfo->fence) { - local_pImportFenceWin32HandleInfo->fence = layer_data->Unwrap(pImportFenceWin32HandleInfo->fence); - } - } - } - VkResult result = layer_data->device_dispatch_table.ImportFenceWin32HandleKHR( - device, (const VkImportFenceWin32HandleInfoKHR*)local_pImportFenceWin32HandleInfo); - - return result; -} - -VkResult DispatchGetFenceWin32HandleKHR(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetFenceWin32HandleKHR(device, pGetWin32HandleInfo, pHandle); - vku::safe_VkFenceGetWin32HandleInfoKHR var_local_pGetWin32HandleInfo; - vku::safe_VkFenceGetWin32HandleInfoKHR* local_pGetWin32HandleInfo = nullptr; - { - if (pGetWin32HandleInfo) { - local_pGetWin32HandleInfo = &var_local_pGetWin32HandleInfo; - local_pGetWin32HandleInfo->initialize(pGetWin32HandleInfo); - - if (pGetWin32HandleInfo->fence) { - local_pGetWin32HandleInfo->fence = layer_data->Unwrap(pGetWin32HandleInfo->fence); - } - } - } - VkResult result = layer_data->device_dispatch_table.GetFenceWin32HandleKHR( - device, (const VkFenceGetWin32HandleInfoKHR*)local_pGetWin32HandleInfo, pHandle); - - return result; -} -#endif // VK_USE_PLATFORM_WIN32_KHR - -VkResult DispatchImportFenceFdKHR(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.ImportFenceFdKHR(device, pImportFenceFdInfo); - vku::safe_VkImportFenceFdInfoKHR var_local_pImportFenceFdInfo; - vku::safe_VkImportFenceFdInfoKHR* local_pImportFenceFdInfo = nullptr; - { - if (pImportFenceFdInfo) { - local_pImportFenceFdInfo = &var_local_pImportFenceFdInfo; - local_pImportFenceFdInfo->initialize(pImportFenceFdInfo); - - if (pImportFenceFdInfo->fence) { - local_pImportFenceFdInfo->fence = layer_data->Unwrap(pImportFenceFdInfo->fence); - } - } - } - VkResult result = - layer_data->device_dispatch_table.ImportFenceFdKHR(device, (const VkImportFenceFdInfoKHR*)local_pImportFenceFdInfo); - - return result; -} - -VkResult DispatchGetFenceFdKHR(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetFenceFdKHR(device, pGetFdInfo, pFd); - vku::safe_VkFenceGetFdInfoKHR var_local_pGetFdInfo; - vku::safe_VkFenceGetFdInfoKHR* local_pGetFdInfo = nullptr; - { - if (pGetFdInfo) { - local_pGetFdInfo = &var_local_pGetFdInfo; - local_pGetFdInfo->initialize(pGetFdInfo); - - if (pGetFdInfo->fence) { - local_pGetFdInfo->fence = layer_data->Unwrap(pGetFdInfo->fence); - } - } - } - VkResult result = layer_data->device_dispatch_table.GetFenceFdKHR(device, (const VkFenceGetFdInfoKHR*)local_pGetFdInfo, pFd); - - return result; -} - -VkResult DispatchEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( - VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, uint32_t* pCounterCount, VkPerformanceCounterKHR* pCounters, - VkPerformanceCounterDescriptionKHR* pCounterDescriptions) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkResult result = layer_data->instance_dispatch_table.EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( - physicalDevice, queueFamilyIndex, pCounterCount, pCounters, pCounterDescriptions); - - return result; -} - -void DispatchGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( - VkPhysicalDevice physicalDevice, const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, uint32_t* pNumPasses) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( - physicalDevice, pPerformanceQueryCreateInfo, pNumPasses); -} - -VkResult DispatchAcquireProfilingLockKHR(VkDevice device, const VkAcquireProfilingLockInfoKHR* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - VkResult result = layer_data->device_dispatch_table.AcquireProfilingLockKHR(device, pInfo); - - return result; -} - -void DispatchReleaseProfilingLockKHR(VkDevice device) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - layer_data->device_dispatch_table.ReleaseProfilingLockKHR(device); -} - -VkResult DispatchGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, - VkSurfaceCapabilities2KHR* pSurfaceCapabilities) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.GetPhysicalDeviceSurfaceCapabilities2KHR(physicalDevice, pSurfaceInfo, - pSurfaceCapabilities); - vku::safe_VkPhysicalDeviceSurfaceInfo2KHR var_local_pSurfaceInfo; - vku::safe_VkPhysicalDeviceSurfaceInfo2KHR* local_pSurfaceInfo = nullptr; - { - if (pSurfaceInfo) { - local_pSurfaceInfo = &var_local_pSurfaceInfo; - local_pSurfaceInfo->initialize(pSurfaceInfo); - - if (pSurfaceInfo->surface) { - local_pSurfaceInfo->surface = layer_data->Unwrap(pSurfaceInfo->surface); - } - } - } - VkResult result = layer_data->instance_dispatch_table.GetPhysicalDeviceSurfaceCapabilities2KHR( - physicalDevice, (const VkPhysicalDeviceSurfaceInfo2KHR*)local_pSurfaceInfo, pSurfaceCapabilities); - - return result; -} - -VkResult DispatchGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, - uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.GetPhysicalDeviceSurfaceFormats2KHR(physicalDevice, pSurfaceInfo, - pSurfaceFormatCount, pSurfaceFormats); - vku::safe_VkPhysicalDeviceSurfaceInfo2KHR var_local_pSurfaceInfo; - vku::safe_VkPhysicalDeviceSurfaceInfo2KHR* local_pSurfaceInfo = nullptr; - { - if (pSurfaceInfo) { - local_pSurfaceInfo = &var_local_pSurfaceInfo; - local_pSurfaceInfo->initialize(pSurfaceInfo); - - if (pSurfaceInfo->surface) { - local_pSurfaceInfo->surface = layer_data->Unwrap(pSurfaceInfo->surface); - } - } - } - VkResult result = layer_data->instance_dispatch_table.GetPhysicalDeviceSurfaceFormats2KHR( - physicalDevice, (const VkPhysicalDeviceSurfaceInfo2KHR*)local_pSurfaceInfo, pSurfaceFormatCount, pSurfaceFormats); - - return result; -} - -VkResult DispatchGetDisplayPlaneCapabilities2KHR(VkPhysicalDevice physicalDevice, const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, - VkDisplayPlaneCapabilities2KHR* pCapabilities) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.GetDisplayPlaneCapabilities2KHR(physicalDevice, pDisplayPlaneInfo, - pCapabilities); - vku::safe_VkDisplayPlaneInfo2KHR var_local_pDisplayPlaneInfo; - vku::safe_VkDisplayPlaneInfo2KHR* local_pDisplayPlaneInfo = nullptr; - { - if (pDisplayPlaneInfo) { - local_pDisplayPlaneInfo = &var_local_pDisplayPlaneInfo; - local_pDisplayPlaneInfo->initialize(pDisplayPlaneInfo); - - if (pDisplayPlaneInfo->mode) { - local_pDisplayPlaneInfo->mode = layer_data->Unwrap(pDisplayPlaneInfo->mode); - } - } - } - VkResult result = layer_data->instance_dispatch_table.GetDisplayPlaneCapabilities2KHR( - physicalDevice, (const VkDisplayPlaneInfo2KHR*)local_pDisplayPlaneInfo, pCapabilities); - - return result; -} - -void DispatchGetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, - VkMemoryRequirements2* pMemoryRequirements) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetImageMemoryRequirements2KHR(device, pInfo, pMemoryRequirements); - vku::safe_VkImageMemoryRequirementsInfo2 var_local_pInfo; - vku::safe_VkImageMemoryRequirementsInfo2* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->image) { - local_pInfo->image = layer_data->Unwrap(pInfo->image); - } - } - } - layer_data->device_dispatch_table.GetImageMemoryRequirements2KHR(device, (const VkImageMemoryRequirementsInfo2*)local_pInfo, - pMemoryRequirements); -} - -void DispatchGetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, - VkMemoryRequirements2* pMemoryRequirements) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetBufferMemoryRequirements2KHR(device, pInfo, pMemoryRequirements); - vku::safe_VkBufferMemoryRequirementsInfo2 var_local_pInfo; - vku::safe_VkBufferMemoryRequirementsInfo2* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->buffer) { - local_pInfo->buffer = layer_data->Unwrap(pInfo->buffer); - } - } - } - layer_data->device_dispatch_table.GetBufferMemoryRequirements2KHR(device, (const VkBufferMemoryRequirementsInfo2*)local_pInfo, - pMemoryRequirements); -} - -void DispatchGetImageSparseMemoryRequirements2KHR(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, - uint32_t* pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetImageSparseMemoryRequirements2KHR(device, pInfo, pSparseMemoryRequirementCount, - pSparseMemoryRequirements); - vku::safe_VkImageSparseMemoryRequirementsInfo2 var_local_pInfo; - vku::safe_VkImageSparseMemoryRequirementsInfo2* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->image) { - local_pInfo->image = layer_data->Unwrap(pInfo->image); - } - } - } - layer_data->device_dispatch_table.GetImageSparseMemoryRequirements2KHR( - device, (const VkImageSparseMemoryRequirementsInfo2*)local_pInfo, pSparseMemoryRequirementCount, pSparseMemoryRequirements); -} - -VkResult DispatchCreateSamplerYcbcrConversionKHR(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSamplerYcbcrConversion* pYcbcrConversion) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CreateSamplerYcbcrConversionKHR(device, pCreateInfo, pAllocator, pYcbcrConversion); - - VkResult result = - layer_data->device_dispatch_table.CreateSamplerYcbcrConversionKHR(device, pCreateInfo, pAllocator, pYcbcrConversion); - if (VK_SUCCESS == result) { - *pYcbcrConversion = layer_data->WrapNew(*pYcbcrConversion); - } - return result; -} - -void DispatchDestroySamplerYcbcrConversionKHR(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, - const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.DestroySamplerYcbcrConversionKHR(device, ycbcrConversion, pAllocator); - - uint64_t ycbcrConversion_id = CastToUint64(ycbcrConversion); - auto iter = unique_id_mapping.pop(ycbcrConversion_id); - if (iter != unique_id_mapping.end()) { - ycbcrConversion = (VkSamplerYcbcrConversion)iter->second; - } else { - ycbcrConversion = (VkSamplerYcbcrConversion)0; - } - layer_data->device_dispatch_table.DestroySamplerYcbcrConversionKHR(device, ycbcrConversion, pAllocator); -} - -VkResult DispatchBindBufferMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.BindBufferMemory2KHR(device, bindInfoCount, pBindInfos); - small_vector var_local_pBindInfos; - vku::safe_VkBindBufferMemoryInfo* local_pBindInfos = nullptr; - { - if (pBindInfos) { - var_local_pBindInfos.resize(bindInfoCount); - local_pBindInfos = var_local_pBindInfos.data(); - for (uint32_t index0 = 0; index0 < bindInfoCount; ++index0) { - local_pBindInfos[index0].initialize(&pBindInfos[index0]); - - if (pBindInfos[index0].buffer) { - local_pBindInfos[index0].buffer = layer_data->Unwrap(pBindInfos[index0].buffer); - } - if (pBindInfos[index0].memory) { - local_pBindInfos[index0].memory = layer_data->Unwrap(pBindInfos[index0].memory); - } - } - } - } - VkResult result = layer_data->device_dispatch_table.BindBufferMemory2KHR(device, bindInfoCount, - (const VkBindBufferMemoryInfo*)local_pBindInfos); - - return result; -} - -VkResult DispatchBindImageMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.BindImageMemory2KHR(device, bindInfoCount, pBindInfos); - small_vector var_local_pBindInfos; - vku::safe_VkBindImageMemoryInfo* local_pBindInfos = nullptr; - { - if (pBindInfos) { - var_local_pBindInfos.resize(bindInfoCount); - local_pBindInfos = var_local_pBindInfos.data(); - for (uint32_t index0 = 0; index0 < bindInfoCount; ++index0) { - local_pBindInfos[index0].initialize(&pBindInfos[index0]); - UnwrapPnextChainHandles(layer_data, local_pBindInfos[index0].pNext); - - if (pBindInfos[index0].image) { - local_pBindInfos[index0].image = layer_data->Unwrap(pBindInfos[index0].image); - } - if (pBindInfos[index0].memory) { - local_pBindInfos[index0].memory = layer_data->Unwrap(pBindInfos[index0].memory); - } - } - } - } - VkResult result = layer_data->device_dispatch_table.BindImageMemory2KHR(device, bindInfoCount, - (const VkBindImageMemoryInfo*)local_pBindInfos); - - return result; -} - -void DispatchGetDescriptorSetLayoutSupportKHR(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, - VkDescriptorSetLayoutSupport* pSupport) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetDescriptorSetLayoutSupportKHR(device, pCreateInfo, pSupport); - vku::safe_VkDescriptorSetLayoutCreateInfo var_local_pCreateInfo; - vku::safe_VkDescriptorSetLayoutCreateInfo* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - if (local_pCreateInfo->pBindings) { - for (uint32_t index1 = 0; index1 < local_pCreateInfo->bindingCount; ++index1) { - if (local_pCreateInfo->pBindings[index1].pImmutableSamplers) { - for (uint32_t index2 = 0; index2 < local_pCreateInfo->pBindings[index1].descriptorCount; ++index2) { - local_pCreateInfo->pBindings[index1].pImmutableSamplers[index2] = - layer_data->Unwrap(local_pCreateInfo->pBindings[index1].pImmutableSamplers[index2]); - } - } - } - } - } - } - layer_data->device_dispatch_table.GetDescriptorSetLayoutSupportKHR( - device, (const VkDescriptorSetLayoutCreateInfo*)local_pCreateInfo, pSupport); -} - -void DispatchCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, - VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdDrawIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, - countBufferOffset, maxDrawCount, stride); - { - buffer = layer_data->Unwrap(buffer); - countBuffer = layer_data->Unwrap(countBuffer); - } - layer_data->device_dispatch_table.CmdDrawIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride); -} - -void DispatchCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, - VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, - uint32_t stride) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdDrawIndexedIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, - countBufferOffset, maxDrawCount, stride); - { - buffer = layer_data->Unwrap(buffer); - countBuffer = layer_data->Unwrap(countBuffer); - } - layer_data->device_dispatch_table.CmdDrawIndexedIndirectCountKHR(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride); -} - -VkResult DispatchGetSemaphoreCounterValueKHR(VkDevice device, VkSemaphore semaphore, uint64_t* pValue) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetSemaphoreCounterValueKHR(device, semaphore, pValue); - { semaphore = layer_data->Unwrap(semaphore); } - VkResult result = layer_data->device_dispatch_table.GetSemaphoreCounterValueKHR(device, semaphore, pValue); - - return result; -} - -VkResult DispatchWaitSemaphoresKHR(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.WaitSemaphoresKHR(device, pWaitInfo, timeout); - vku::safe_VkSemaphoreWaitInfo var_local_pWaitInfo; - vku::safe_VkSemaphoreWaitInfo* local_pWaitInfo = nullptr; - { - if (pWaitInfo) { - local_pWaitInfo = &var_local_pWaitInfo; - local_pWaitInfo->initialize(pWaitInfo); - if (local_pWaitInfo->pSemaphores) { - for (uint32_t index1 = 0; index1 < local_pWaitInfo->semaphoreCount; ++index1) { - local_pWaitInfo->pSemaphores[index1] = layer_data->Unwrap(local_pWaitInfo->pSemaphores[index1]); - } - } - } - } - VkResult result = - layer_data->device_dispatch_table.WaitSemaphoresKHR(device, (const VkSemaphoreWaitInfo*)local_pWaitInfo, timeout); - - return result; -} - -VkResult DispatchSignalSemaphoreKHR(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.SignalSemaphoreKHR(device, pSignalInfo); - vku::safe_VkSemaphoreSignalInfo var_local_pSignalInfo; - vku::safe_VkSemaphoreSignalInfo* local_pSignalInfo = nullptr; - { - if (pSignalInfo) { - local_pSignalInfo = &var_local_pSignalInfo; - local_pSignalInfo->initialize(pSignalInfo); - - if (pSignalInfo->semaphore) { - local_pSignalInfo->semaphore = layer_data->Unwrap(pSignalInfo->semaphore); - } - } - } - VkResult result = layer_data->device_dispatch_table.SignalSemaphoreKHR(device, (const VkSemaphoreSignalInfo*)local_pSignalInfo); - - return result; -} - -VkResult DispatchGetPhysicalDeviceFragmentShadingRatesKHR(VkPhysicalDevice physicalDevice, uint32_t* pFragmentShadingRateCount, - VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkResult result = layer_data->instance_dispatch_table.GetPhysicalDeviceFragmentShadingRatesKHR( - physicalDevice, pFragmentShadingRateCount, pFragmentShadingRates); - - return result; -} - -void DispatchCmdSetFragmentShadingRateKHR(VkCommandBuffer commandBuffer, const VkExtent2D* pFragmentSize, - const VkFragmentShadingRateCombinerOpKHR combinerOps[2]) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetFragmentShadingRateKHR(commandBuffer, pFragmentSize, combinerOps); -} - -void DispatchCmdSetRenderingAttachmentLocationsKHR(VkCommandBuffer commandBuffer, - const VkRenderingAttachmentLocationInfoKHR* pLocationInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetRenderingAttachmentLocationsKHR(commandBuffer, pLocationInfo); -} - -void DispatchCmdSetRenderingInputAttachmentIndicesKHR(VkCommandBuffer commandBuffer, - const VkRenderingInputAttachmentIndexInfoKHR* pInputAttachmentIndexInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetRenderingInputAttachmentIndicesKHR(commandBuffer, pInputAttachmentIndexInfo); -} - -VkResult DispatchWaitForPresentKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t presentId, uint64_t timeout) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.WaitForPresentKHR(device, swapchain, presentId, timeout); - { swapchain = layer_data->Unwrap(swapchain); } - VkResult result = layer_data->device_dispatch_table.WaitForPresentKHR(device, swapchain, presentId, timeout); - - return result; -} - -VkDeviceAddress DispatchGetBufferDeviceAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetBufferDeviceAddressKHR(device, pInfo); - vku::safe_VkBufferDeviceAddressInfo var_local_pInfo; - vku::safe_VkBufferDeviceAddressInfo* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->buffer) { - local_pInfo->buffer = layer_data->Unwrap(pInfo->buffer); - } - } - } - VkDeviceAddress result = - layer_data->device_dispatch_table.GetBufferDeviceAddressKHR(device, (const VkBufferDeviceAddressInfo*)local_pInfo); - - return result; -} - -uint64_t DispatchGetBufferOpaqueCaptureAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetBufferOpaqueCaptureAddressKHR(device, pInfo); - vku::safe_VkBufferDeviceAddressInfo var_local_pInfo; - vku::safe_VkBufferDeviceAddressInfo* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->buffer) { - local_pInfo->buffer = layer_data->Unwrap(pInfo->buffer); - } - } - } - uint64_t result = - layer_data->device_dispatch_table.GetBufferOpaqueCaptureAddressKHR(device, (const VkBufferDeviceAddressInfo*)local_pInfo); - - return result; -} - -uint64_t DispatchGetDeviceMemoryOpaqueCaptureAddressKHR(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetDeviceMemoryOpaqueCaptureAddressKHR(device, pInfo); - vku::safe_VkDeviceMemoryOpaqueCaptureAddressInfo var_local_pInfo; - vku::safe_VkDeviceMemoryOpaqueCaptureAddressInfo* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->memory) { - local_pInfo->memory = layer_data->Unwrap(pInfo->memory); - } - } - } - uint64_t result = layer_data->device_dispatch_table.GetDeviceMemoryOpaqueCaptureAddressKHR( - device, (const VkDeviceMemoryOpaqueCaptureAddressInfo*)local_pInfo); - - return result; -} - -VkResult DispatchCreateDeferredOperationKHR(VkDevice device, const VkAllocationCallbacks* pAllocator, - VkDeferredOperationKHR* pDeferredOperation) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CreateDeferredOperationKHR(device, pAllocator, pDeferredOperation); - - VkResult result = layer_data->device_dispatch_table.CreateDeferredOperationKHR(device, pAllocator, pDeferredOperation); - if (VK_SUCCESS == result) { - *pDeferredOperation = layer_data->WrapNew(*pDeferredOperation); - } - return result; -} - -void DispatchDestroyDeferredOperationKHR(VkDevice device, VkDeferredOperationKHR operation, - const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyDeferredOperationKHR(device, operation, pAllocator); - - uint64_t operation_id = CastToUint64(operation); - auto iter = unique_id_mapping.pop(operation_id); - if (iter != unique_id_mapping.end()) { - operation = (VkDeferredOperationKHR)iter->second; - } else { - operation = (VkDeferredOperationKHR)0; - } - layer_data->device_dispatch_table.DestroyDeferredOperationKHR(device, operation, pAllocator); -} - -uint32_t DispatchGetDeferredOperationMaxConcurrencyKHR(VkDevice device, VkDeferredOperationKHR operation) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetDeferredOperationMaxConcurrencyKHR(device, operation); - { operation = layer_data->Unwrap(operation); } - uint32_t result = layer_data->device_dispatch_table.GetDeferredOperationMaxConcurrencyKHR(device, operation); - - return result; -} - -VkResult DispatchGetPipelineExecutablePropertiesKHR(VkDevice device, const VkPipelineInfoKHR* pPipelineInfo, - uint32_t* pExecutableCount, VkPipelineExecutablePropertiesKHR* pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetPipelineExecutablePropertiesKHR(device, pPipelineInfo, pExecutableCount, - pProperties); - vku::safe_VkPipelineInfoKHR var_local_pPipelineInfo; - vku::safe_VkPipelineInfoKHR* local_pPipelineInfo = nullptr; - { - if (pPipelineInfo) { - local_pPipelineInfo = &var_local_pPipelineInfo; - local_pPipelineInfo->initialize(pPipelineInfo); - - if (pPipelineInfo->pipeline) { - local_pPipelineInfo->pipeline = layer_data->Unwrap(pPipelineInfo->pipeline); - } - } - } - VkResult result = layer_data->device_dispatch_table.GetPipelineExecutablePropertiesKHR( - device, (const VkPipelineInfoKHR*)local_pPipelineInfo, pExecutableCount, pProperties); - - return result; -} - -VkResult DispatchGetPipelineExecutableStatisticsKHR(VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, - uint32_t* pStatisticCount, VkPipelineExecutableStatisticKHR* pStatistics) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetPipelineExecutableStatisticsKHR(device, pExecutableInfo, pStatisticCount, - pStatistics); - vku::safe_VkPipelineExecutableInfoKHR var_local_pExecutableInfo; - vku::safe_VkPipelineExecutableInfoKHR* local_pExecutableInfo = nullptr; - { - if (pExecutableInfo) { - local_pExecutableInfo = &var_local_pExecutableInfo; - local_pExecutableInfo->initialize(pExecutableInfo); - - if (pExecutableInfo->pipeline) { - local_pExecutableInfo->pipeline = layer_data->Unwrap(pExecutableInfo->pipeline); - } - } - } - VkResult result = layer_data->device_dispatch_table.GetPipelineExecutableStatisticsKHR( - device, (const VkPipelineExecutableInfoKHR*)local_pExecutableInfo, pStatisticCount, pStatistics); - - return result; -} - -VkResult DispatchGetPipelineExecutableInternalRepresentationsKHR( - VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pInternalRepresentationCount, - VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetPipelineExecutableInternalRepresentationsKHR( - device, pExecutableInfo, pInternalRepresentationCount, pInternalRepresentations); - vku::safe_VkPipelineExecutableInfoKHR var_local_pExecutableInfo; - vku::safe_VkPipelineExecutableInfoKHR* local_pExecutableInfo = nullptr; - { - if (pExecutableInfo) { - local_pExecutableInfo = &var_local_pExecutableInfo; - local_pExecutableInfo->initialize(pExecutableInfo); - - if (pExecutableInfo->pipeline) { - local_pExecutableInfo->pipeline = layer_data->Unwrap(pExecutableInfo->pipeline); - } - } - } - VkResult result = layer_data->device_dispatch_table.GetPipelineExecutableInternalRepresentationsKHR( - device, (const VkPipelineExecutableInfoKHR*)local_pExecutableInfo, pInternalRepresentationCount, pInternalRepresentations); - - return result; -} - -VkResult DispatchMapMemory2KHR(VkDevice device, const VkMemoryMapInfoKHR* pMemoryMapInfo, void** ppData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.MapMemory2KHR(device, pMemoryMapInfo, ppData); - vku::safe_VkMemoryMapInfoKHR var_local_pMemoryMapInfo; - vku::safe_VkMemoryMapInfoKHR* local_pMemoryMapInfo = nullptr; - { - if (pMemoryMapInfo) { - local_pMemoryMapInfo = &var_local_pMemoryMapInfo; - local_pMemoryMapInfo->initialize(pMemoryMapInfo); - - if (pMemoryMapInfo->memory) { - local_pMemoryMapInfo->memory = layer_data->Unwrap(pMemoryMapInfo->memory); - } - } - } - VkResult result = - layer_data->device_dispatch_table.MapMemory2KHR(device, (const VkMemoryMapInfoKHR*)local_pMemoryMapInfo, ppData); - - return result; -} - -VkResult DispatchUnmapMemory2KHR(VkDevice device, const VkMemoryUnmapInfoKHR* pMemoryUnmapInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.UnmapMemory2KHR(device, pMemoryUnmapInfo); - vku::safe_VkMemoryUnmapInfoKHR var_local_pMemoryUnmapInfo; - vku::safe_VkMemoryUnmapInfoKHR* local_pMemoryUnmapInfo = nullptr; - { - if (pMemoryUnmapInfo) { - local_pMemoryUnmapInfo = &var_local_pMemoryUnmapInfo; - local_pMemoryUnmapInfo->initialize(pMemoryUnmapInfo); - - if (pMemoryUnmapInfo->memory) { - local_pMemoryUnmapInfo->memory = layer_data->Unwrap(pMemoryUnmapInfo->memory); - } - } - } - VkResult result = - layer_data->device_dispatch_table.UnmapMemory2KHR(device, (const VkMemoryUnmapInfoKHR*)local_pMemoryUnmapInfo); - - return result; -} - -VkResult DispatchGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( - VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, - VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkResult result = layer_data->instance_dispatch_table.GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( - physicalDevice, pQualityLevelInfo, pQualityLevelProperties); - - return result; -} - -VkResult DispatchGetEncodedVideoSessionParametersKHR(VkDevice device, - const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo, - VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, - size_t* pDataSize, void* pData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetEncodedVideoSessionParametersKHR(device, pVideoSessionParametersInfo, - pFeedbackInfo, pDataSize, pData); - vku::safe_VkVideoEncodeSessionParametersGetInfoKHR var_local_pVideoSessionParametersInfo; - vku::safe_VkVideoEncodeSessionParametersGetInfoKHR* local_pVideoSessionParametersInfo = nullptr; - { - if (pVideoSessionParametersInfo) { - local_pVideoSessionParametersInfo = &var_local_pVideoSessionParametersInfo; - local_pVideoSessionParametersInfo->initialize(pVideoSessionParametersInfo); - - if (pVideoSessionParametersInfo->videoSessionParameters) { - local_pVideoSessionParametersInfo->videoSessionParameters = - layer_data->Unwrap(pVideoSessionParametersInfo->videoSessionParameters); - } - } - } - VkResult result = layer_data->device_dispatch_table.GetEncodedVideoSessionParametersKHR( - device, (const VkVideoEncodeSessionParametersGetInfoKHR*)local_pVideoSessionParametersInfo, pFeedbackInfo, pDataSize, - pData); - - return result; -} - -void DispatchCmdEncodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdEncodeVideoKHR(commandBuffer, pEncodeInfo); - vku::safe_VkVideoEncodeInfoKHR var_local_pEncodeInfo; - vku::safe_VkVideoEncodeInfoKHR* local_pEncodeInfo = nullptr; - { - if (pEncodeInfo) { - local_pEncodeInfo = &var_local_pEncodeInfo; - local_pEncodeInfo->initialize(pEncodeInfo); - - if (pEncodeInfo->dstBuffer) { - local_pEncodeInfo->dstBuffer = layer_data->Unwrap(pEncodeInfo->dstBuffer); - } - if (pEncodeInfo->srcPictureResource.imageViewBinding) { - local_pEncodeInfo->srcPictureResource.imageViewBinding = - layer_data->Unwrap(pEncodeInfo->srcPictureResource.imageViewBinding); - } - if (local_pEncodeInfo->pSetupReferenceSlot) { - if (local_pEncodeInfo->pSetupReferenceSlot->pPictureResource) { - if (pEncodeInfo->pSetupReferenceSlot->pPictureResource->imageViewBinding) { - local_pEncodeInfo->pSetupReferenceSlot->pPictureResource->imageViewBinding = - layer_data->Unwrap(pEncodeInfo->pSetupReferenceSlot->pPictureResource->imageViewBinding); - } - } - } - if (local_pEncodeInfo->pReferenceSlots) { - for (uint32_t index1 = 0; index1 < local_pEncodeInfo->referenceSlotCount; ++index1) { - if (local_pEncodeInfo->pReferenceSlots[index1].pPictureResource) { - if (pEncodeInfo->pReferenceSlots[index1].pPictureResource->imageViewBinding) { - local_pEncodeInfo->pReferenceSlots[index1].pPictureResource->imageViewBinding = - layer_data->Unwrap(pEncodeInfo->pReferenceSlots[index1].pPictureResource->imageViewBinding); - } - } - } - } - UnwrapPnextChainHandles(layer_data, local_pEncodeInfo->pNext); - } - } - layer_data->device_dispatch_table.CmdEncodeVideoKHR(commandBuffer, (const VkVideoEncodeInfoKHR*)local_pEncodeInfo); -} - -void DispatchCmdSetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdSetEvent2KHR(commandBuffer, event, pDependencyInfo); - vku::safe_VkDependencyInfo var_local_pDependencyInfo; - vku::safe_VkDependencyInfo* local_pDependencyInfo = nullptr; - { - event = layer_data->Unwrap(event); - if (pDependencyInfo) { - local_pDependencyInfo = &var_local_pDependencyInfo; - local_pDependencyInfo->initialize(pDependencyInfo); - if (local_pDependencyInfo->pBufferMemoryBarriers) { - for (uint32_t index1 = 0; index1 < local_pDependencyInfo->bufferMemoryBarrierCount; ++index1) { - if (pDependencyInfo->pBufferMemoryBarriers[index1].buffer) { - local_pDependencyInfo->pBufferMemoryBarriers[index1].buffer = - layer_data->Unwrap(pDependencyInfo->pBufferMemoryBarriers[index1].buffer); - } - } - } - if (local_pDependencyInfo->pImageMemoryBarriers) { - for (uint32_t index1 = 0; index1 < local_pDependencyInfo->imageMemoryBarrierCount; ++index1) { - if (pDependencyInfo->pImageMemoryBarriers[index1].image) { - local_pDependencyInfo->pImageMemoryBarriers[index1].image = - layer_data->Unwrap(pDependencyInfo->pImageMemoryBarriers[index1].image); - } - } - } - } - } - layer_data->device_dispatch_table.CmdSetEvent2KHR(commandBuffer, event, (const VkDependencyInfo*)local_pDependencyInfo); -} - -void DispatchCmdResetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdResetEvent2KHR(commandBuffer, event, stageMask); - { event = layer_data->Unwrap(event); } - layer_data->device_dispatch_table.CmdResetEvent2KHR(commandBuffer, event, stageMask); -} - -void DispatchCmdWaitEvents2KHR(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, - const VkDependencyInfo* pDependencyInfos) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdWaitEvents2KHR(commandBuffer, eventCount, pEvents, pDependencyInfos); - small_vector var_local_pEvents; - VkEvent* local_pEvents = nullptr; - small_vector var_local_pDependencyInfos; - vku::safe_VkDependencyInfo* local_pDependencyInfos = nullptr; - { - if (pEvents) { - var_local_pEvents.resize(eventCount); - local_pEvents = var_local_pEvents.data(); - for (uint32_t index0 = 0; index0 < eventCount; ++index0) { - local_pEvents[index0] = layer_data->Unwrap(pEvents[index0]); - } - } - if (pDependencyInfos) { - var_local_pDependencyInfos.resize(eventCount); - local_pDependencyInfos = var_local_pDependencyInfos.data(); - for (uint32_t index0 = 0; index0 < eventCount; ++index0) { - local_pDependencyInfos[index0].initialize(&pDependencyInfos[index0]); - if (local_pDependencyInfos[index0].pBufferMemoryBarriers) { - for (uint32_t index1 = 0; index1 < local_pDependencyInfos[index0].bufferMemoryBarrierCount; ++index1) { - if (pDependencyInfos[index0].pBufferMemoryBarriers[index1].buffer) { - local_pDependencyInfos[index0].pBufferMemoryBarriers[index1].buffer = - layer_data->Unwrap(pDependencyInfos[index0].pBufferMemoryBarriers[index1].buffer); - } - } - } - if (local_pDependencyInfos[index0].pImageMemoryBarriers) { - for (uint32_t index1 = 0; index1 < local_pDependencyInfos[index0].imageMemoryBarrierCount; ++index1) { - if (pDependencyInfos[index0].pImageMemoryBarriers[index1].image) { - local_pDependencyInfos[index0].pImageMemoryBarriers[index1].image = - layer_data->Unwrap(pDependencyInfos[index0].pImageMemoryBarriers[index1].image); - } - } - } - } - } - } - layer_data->device_dispatch_table.CmdWaitEvents2KHR(commandBuffer, eventCount, (const VkEvent*)local_pEvents, - (const VkDependencyInfo*)local_pDependencyInfos); -} - -void DispatchCmdPipelineBarrier2KHR(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdPipelineBarrier2KHR(commandBuffer, pDependencyInfo); - vku::safe_VkDependencyInfo var_local_pDependencyInfo; - vku::safe_VkDependencyInfo* local_pDependencyInfo = nullptr; - { - if (pDependencyInfo) { - local_pDependencyInfo = &var_local_pDependencyInfo; - local_pDependencyInfo->initialize(pDependencyInfo); - if (local_pDependencyInfo->pBufferMemoryBarriers) { - for (uint32_t index1 = 0; index1 < local_pDependencyInfo->bufferMemoryBarrierCount; ++index1) { - if (pDependencyInfo->pBufferMemoryBarriers[index1].buffer) { - local_pDependencyInfo->pBufferMemoryBarriers[index1].buffer = - layer_data->Unwrap(pDependencyInfo->pBufferMemoryBarriers[index1].buffer); - } - } - } - if (local_pDependencyInfo->pImageMemoryBarriers) { - for (uint32_t index1 = 0; index1 < local_pDependencyInfo->imageMemoryBarrierCount; ++index1) { - if (pDependencyInfo->pImageMemoryBarriers[index1].image) { - local_pDependencyInfo->pImageMemoryBarriers[index1].image = - layer_data->Unwrap(pDependencyInfo->pImageMemoryBarriers[index1].image); - } - } - } - } - } - layer_data->device_dispatch_table.CmdPipelineBarrier2KHR(commandBuffer, (const VkDependencyInfo*)local_pDependencyInfo); -} - -void DispatchCmdWriteTimestamp2KHR(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, - uint32_t query) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdWriteTimestamp2KHR(commandBuffer, stage, queryPool, query); - { queryPool = layer_data->Unwrap(queryPool); } - layer_data->device_dispatch_table.CmdWriteTimestamp2KHR(commandBuffer, stage, queryPool, query); -} - -VkResult DispatchQueueSubmit2KHR(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.QueueSubmit2KHR(queue, submitCount, pSubmits, fence); - small_vector var_local_pSubmits; - vku::safe_VkSubmitInfo2* local_pSubmits = nullptr; - { - if (pSubmits) { - var_local_pSubmits.resize(submitCount); - local_pSubmits = var_local_pSubmits.data(); - for (uint32_t index0 = 0; index0 < submitCount; ++index0) { - local_pSubmits[index0].initialize(&pSubmits[index0]); - UnwrapPnextChainHandles(layer_data, local_pSubmits[index0].pNext); - if (local_pSubmits[index0].pWaitSemaphoreInfos) { - for (uint32_t index1 = 0; index1 < local_pSubmits[index0].waitSemaphoreInfoCount; ++index1) { - if (pSubmits[index0].pWaitSemaphoreInfos[index1].semaphore) { - local_pSubmits[index0].pWaitSemaphoreInfos[index1].semaphore = - layer_data->Unwrap(pSubmits[index0].pWaitSemaphoreInfos[index1].semaphore); - } - } - } - if (local_pSubmits[index0].pCommandBufferInfos) { - for (uint32_t index1 = 0; index1 < local_pSubmits[index0].commandBufferInfoCount; ++index1) { - UnwrapPnextChainHandles(layer_data, local_pSubmits[index0].pCommandBufferInfos[index1].pNext); - } - } - if (local_pSubmits[index0].pSignalSemaphoreInfos) { - for (uint32_t index1 = 0; index1 < local_pSubmits[index0].signalSemaphoreInfoCount; ++index1) { - if (pSubmits[index0].pSignalSemaphoreInfos[index1].semaphore) { - local_pSubmits[index0].pSignalSemaphoreInfos[index1].semaphore = - layer_data->Unwrap(pSubmits[index0].pSignalSemaphoreInfos[index1].semaphore); - } - } - } - } - } - fence = layer_data->Unwrap(fence); - } - VkResult result = - layer_data->device_dispatch_table.QueueSubmit2KHR(queue, submitCount, (const VkSubmitInfo2*)local_pSubmits, fence); - - return result; -} - -void DispatchCmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdCopyBuffer2KHR(commandBuffer, pCopyBufferInfo); - vku::safe_VkCopyBufferInfo2 var_local_pCopyBufferInfo; - vku::safe_VkCopyBufferInfo2* local_pCopyBufferInfo = nullptr; - { - if (pCopyBufferInfo) { - local_pCopyBufferInfo = &var_local_pCopyBufferInfo; - local_pCopyBufferInfo->initialize(pCopyBufferInfo); - - if (pCopyBufferInfo->srcBuffer) { - local_pCopyBufferInfo->srcBuffer = layer_data->Unwrap(pCopyBufferInfo->srcBuffer); - } - if (pCopyBufferInfo->dstBuffer) { - local_pCopyBufferInfo->dstBuffer = layer_data->Unwrap(pCopyBufferInfo->dstBuffer); - } - } - } - layer_data->device_dispatch_table.CmdCopyBuffer2KHR(commandBuffer, (const VkCopyBufferInfo2*)local_pCopyBufferInfo); -} - -void DispatchCmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdCopyImage2KHR(commandBuffer, pCopyImageInfo); - vku::safe_VkCopyImageInfo2 var_local_pCopyImageInfo; - vku::safe_VkCopyImageInfo2* local_pCopyImageInfo = nullptr; - { - if (pCopyImageInfo) { - local_pCopyImageInfo = &var_local_pCopyImageInfo; - local_pCopyImageInfo->initialize(pCopyImageInfo); - - if (pCopyImageInfo->srcImage) { - local_pCopyImageInfo->srcImage = layer_data->Unwrap(pCopyImageInfo->srcImage); - } - if (pCopyImageInfo->dstImage) { - local_pCopyImageInfo->dstImage = layer_data->Unwrap(pCopyImageInfo->dstImage); - } - } - } - layer_data->device_dispatch_table.CmdCopyImage2KHR(commandBuffer, (const VkCopyImageInfo2*)local_pCopyImageInfo); -} - -void DispatchCmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdCopyBufferToImage2KHR(commandBuffer, pCopyBufferToImageInfo); - vku::safe_VkCopyBufferToImageInfo2 var_local_pCopyBufferToImageInfo; - vku::safe_VkCopyBufferToImageInfo2* local_pCopyBufferToImageInfo = nullptr; - { - if (pCopyBufferToImageInfo) { - local_pCopyBufferToImageInfo = &var_local_pCopyBufferToImageInfo; - local_pCopyBufferToImageInfo->initialize(pCopyBufferToImageInfo); - - if (pCopyBufferToImageInfo->srcBuffer) { - local_pCopyBufferToImageInfo->srcBuffer = layer_data->Unwrap(pCopyBufferToImageInfo->srcBuffer); - } - if (pCopyBufferToImageInfo->dstImage) { - local_pCopyBufferToImageInfo->dstImage = layer_data->Unwrap(pCopyBufferToImageInfo->dstImage); - } - } - } - layer_data->device_dispatch_table.CmdCopyBufferToImage2KHR(commandBuffer, - (const VkCopyBufferToImageInfo2*)local_pCopyBufferToImageInfo); -} - -void DispatchCmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdCopyImageToBuffer2KHR(commandBuffer, pCopyImageToBufferInfo); - vku::safe_VkCopyImageToBufferInfo2 var_local_pCopyImageToBufferInfo; - vku::safe_VkCopyImageToBufferInfo2* local_pCopyImageToBufferInfo = nullptr; - { - if (pCopyImageToBufferInfo) { - local_pCopyImageToBufferInfo = &var_local_pCopyImageToBufferInfo; - local_pCopyImageToBufferInfo->initialize(pCopyImageToBufferInfo); - - if (pCopyImageToBufferInfo->srcImage) { - local_pCopyImageToBufferInfo->srcImage = layer_data->Unwrap(pCopyImageToBufferInfo->srcImage); - } - if (pCopyImageToBufferInfo->dstBuffer) { - local_pCopyImageToBufferInfo->dstBuffer = layer_data->Unwrap(pCopyImageToBufferInfo->dstBuffer); - } - } - } - layer_data->device_dispatch_table.CmdCopyImageToBuffer2KHR(commandBuffer, - (const VkCopyImageToBufferInfo2*)local_pCopyImageToBufferInfo); -} - -void DispatchCmdBlitImage2KHR(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdBlitImage2KHR(commandBuffer, pBlitImageInfo); - vku::safe_VkBlitImageInfo2 var_local_pBlitImageInfo; - vku::safe_VkBlitImageInfo2* local_pBlitImageInfo = nullptr; - { - if (pBlitImageInfo) { - local_pBlitImageInfo = &var_local_pBlitImageInfo; - local_pBlitImageInfo->initialize(pBlitImageInfo); - - if (pBlitImageInfo->srcImage) { - local_pBlitImageInfo->srcImage = layer_data->Unwrap(pBlitImageInfo->srcImage); - } - if (pBlitImageInfo->dstImage) { - local_pBlitImageInfo->dstImage = layer_data->Unwrap(pBlitImageInfo->dstImage); - } - } - } - layer_data->device_dispatch_table.CmdBlitImage2KHR(commandBuffer, (const VkBlitImageInfo2*)local_pBlitImageInfo); -} - -void DispatchCmdResolveImage2KHR(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdResolveImage2KHR(commandBuffer, pResolveImageInfo); - vku::safe_VkResolveImageInfo2 var_local_pResolveImageInfo; - vku::safe_VkResolveImageInfo2* local_pResolveImageInfo = nullptr; - { - if (pResolveImageInfo) { - local_pResolveImageInfo = &var_local_pResolveImageInfo; - local_pResolveImageInfo->initialize(pResolveImageInfo); - - if (pResolveImageInfo->srcImage) { - local_pResolveImageInfo->srcImage = layer_data->Unwrap(pResolveImageInfo->srcImage); - } - if (pResolveImageInfo->dstImage) { - local_pResolveImageInfo->dstImage = layer_data->Unwrap(pResolveImageInfo->dstImage); - } - } - } - layer_data->device_dispatch_table.CmdResolveImage2KHR(commandBuffer, (const VkResolveImageInfo2*)local_pResolveImageInfo); -} - -void DispatchCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdTraceRaysIndirect2KHR(commandBuffer, indirectDeviceAddress); -} - -void DispatchGetDeviceBufferMemoryRequirementsKHR(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, - VkMemoryRequirements2* pMemoryRequirements) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - layer_data->device_dispatch_table.GetDeviceBufferMemoryRequirementsKHR(device, pInfo, pMemoryRequirements); -} - -void DispatchGetDeviceImageMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, - VkMemoryRequirements2* pMemoryRequirements) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - layer_data->device_dispatch_table.GetDeviceImageMemoryRequirementsKHR(device, pInfo, pMemoryRequirements); -} - -void DispatchGetDeviceImageSparseMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, - uint32_t* pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements2* pSparseMemoryRequirements) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - layer_data->device_dispatch_table.GetDeviceImageSparseMemoryRequirementsKHR(device, pInfo, pSparseMemoryRequirementCount, - pSparseMemoryRequirements); -} - -void DispatchCmdBindIndexBuffer2KHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkDeviceSize size, - VkIndexType indexType) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdBindIndexBuffer2KHR(commandBuffer, buffer, offset, size, indexType); - { buffer = layer_data->Unwrap(buffer); } - layer_data->device_dispatch_table.CmdBindIndexBuffer2KHR(commandBuffer, buffer, offset, size, indexType); -} - -void DispatchGetRenderingAreaGranularityKHR(VkDevice device, const VkRenderingAreaInfoKHR* pRenderingAreaInfo, - VkExtent2D* pGranularity) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - layer_data->device_dispatch_table.GetRenderingAreaGranularityKHR(device, pRenderingAreaInfo, pGranularity); -} - -void DispatchGetDeviceImageSubresourceLayoutKHR(VkDevice device, const VkDeviceImageSubresourceInfoKHR* pInfo, - VkSubresourceLayout2KHR* pLayout) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - layer_data->device_dispatch_table.GetDeviceImageSubresourceLayoutKHR(device, pInfo, pLayout); -} - -void DispatchGetImageSubresourceLayout2KHR(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, - VkSubresourceLayout2KHR* pLayout) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetImageSubresourceLayout2KHR(device, image, pSubresource, pLayout); - { image = layer_data->Unwrap(image); } - layer_data->device_dispatch_table.GetImageSubresourceLayout2KHR(device, image, pSubresource, pLayout); -} - -void DispatchDestroyPipelineBinaryKHR(VkDevice device, VkPipelineBinaryKHR pipelineBinary, - const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyPipelineBinaryKHR(device, pipelineBinary, pAllocator); - - uint64_t pipelineBinary_id = CastToUint64(pipelineBinary); - auto iter = unique_id_mapping.pop(pipelineBinary_id); - if (iter != unique_id_mapping.end()) { - pipelineBinary = (VkPipelineBinaryKHR)iter->second; - } else { - pipelineBinary = (VkPipelineBinaryKHR)0; - } - layer_data->device_dispatch_table.DestroyPipelineBinaryKHR(device, pipelineBinary, pAllocator); -} - -VkResult DispatchGetPipelineBinaryDataKHR(VkDevice device, const VkPipelineBinaryDataInfoKHR* pInfo, - VkPipelineBinaryKeyKHR* pPipelineBinaryKey, size_t* pPipelineBinaryDataSize, - void* pPipelineBinaryData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetPipelineBinaryDataKHR(device, pInfo, pPipelineBinaryKey, - pPipelineBinaryDataSize, pPipelineBinaryData); - vku::safe_VkPipelineBinaryDataInfoKHR var_local_pInfo; - vku::safe_VkPipelineBinaryDataInfoKHR* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->pipelineBinary) { - local_pInfo->pipelineBinary = layer_data->Unwrap(pInfo->pipelineBinary); - } - } - } - VkResult result = layer_data->device_dispatch_table.GetPipelineBinaryDataKHR( - device, (const VkPipelineBinaryDataInfoKHR*)local_pInfo, pPipelineBinaryKey, pPipelineBinaryDataSize, pPipelineBinaryData); - - return result; -} - -VkResult DispatchReleaseCapturedPipelineDataKHR(VkDevice device, const VkReleaseCapturedPipelineDataInfoKHR* pInfo, - const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.ReleaseCapturedPipelineDataKHR(device, pInfo, pAllocator); - vku::safe_VkReleaseCapturedPipelineDataInfoKHR var_local_pInfo; - vku::safe_VkReleaseCapturedPipelineDataInfoKHR* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->pipeline) { - local_pInfo->pipeline = layer_data->Unwrap(pInfo->pipeline); - } - } - } - VkResult result = layer_data->device_dispatch_table.ReleaseCapturedPipelineDataKHR( - device, (const VkReleaseCapturedPipelineDataInfoKHR*)local_pInfo, pAllocator); - - return result; -} - -VkResult DispatchGetPhysicalDeviceCooperativeMatrixPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, - VkCooperativeMatrixPropertiesKHR* pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkResult result = layer_data->instance_dispatch_table.GetPhysicalDeviceCooperativeMatrixPropertiesKHR( - physicalDevice, pPropertyCount, pProperties); - - return result; -} - -void DispatchCmdSetLineStippleKHR(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetLineStippleKHR(commandBuffer, lineStippleFactor, lineStipplePattern); -} - -VkResult DispatchGetPhysicalDeviceCalibrateableTimeDomainsKHR(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, - VkTimeDomainKHR* pTimeDomains) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkResult result = layer_data->instance_dispatch_table.GetPhysicalDeviceCalibrateableTimeDomainsKHR( - physicalDevice, pTimeDomainCount, pTimeDomains); - - return result; -} - -VkResult DispatchGetCalibratedTimestampsKHR(VkDevice device, uint32_t timestampCount, - const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, - uint64_t* pMaxDeviation) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - VkResult result = layer_data->device_dispatch_table.GetCalibratedTimestampsKHR(device, timestampCount, pTimestampInfos, - pTimestamps, pMaxDeviation); - - return result; -} - -void DispatchCmdBindDescriptorSets2KHR(VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdBindDescriptorSets2KHR(commandBuffer, pBindDescriptorSetsInfo); - vku::safe_VkBindDescriptorSetsInfoKHR var_local_pBindDescriptorSetsInfo; - vku::safe_VkBindDescriptorSetsInfoKHR* local_pBindDescriptorSetsInfo = nullptr; - { - if (pBindDescriptorSetsInfo) { - local_pBindDescriptorSetsInfo = &var_local_pBindDescriptorSetsInfo; - local_pBindDescriptorSetsInfo->initialize(pBindDescriptorSetsInfo); - - if (pBindDescriptorSetsInfo->layout) { - local_pBindDescriptorSetsInfo->layout = layer_data->Unwrap(pBindDescriptorSetsInfo->layout); - } - if (local_pBindDescriptorSetsInfo->pDescriptorSets) { - for (uint32_t index1 = 0; index1 < local_pBindDescriptorSetsInfo->descriptorSetCount; ++index1) { - local_pBindDescriptorSetsInfo->pDescriptorSets[index1] = - layer_data->Unwrap(local_pBindDescriptorSetsInfo->pDescriptorSets[index1]); - } - } - UnwrapPnextChainHandles(layer_data, local_pBindDescriptorSetsInfo->pNext); - } - } - layer_data->device_dispatch_table.CmdBindDescriptorSets2KHR(commandBuffer, - (const VkBindDescriptorSetsInfoKHR*)local_pBindDescriptorSetsInfo); -} - -void DispatchCmdPushConstants2KHR(VkCommandBuffer commandBuffer, const VkPushConstantsInfoKHR* pPushConstantsInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdPushConstants2KHR(commandBuffer, pPushConstantsInfo); - vku::safe_VkPushConstantsInfoKHR var_local_pPushConstantsInfo; - vku::safe_VkPushConstantsInfoKHR* local_pPushConstantsInfo = nullptr; - { - if (pPushConstantsInfo) { - local_pPushConstantsInfo = &var_local_pPushConstantsInfo; - local_pPushConstantsInfo->initialize(pPushConstantsInfo); - - if (pPushConstantsInfo->layout) { - local_pPushConstantsInfo->layout = layer_data->Unwrap(pPushConstantsInfo->layout); - } - UnwrapPnextChainHandles(layer_data, local_pPushConstantsInfo->pNext); - } - } - layer_data->device_dispatch_table.CmdPushConstants2KHR(commandBuffer, (const VkPushConstantsInfoKHR*)local_pPushConstantsInfo); -} - -void DispatchCmdPushDescriptorSet2KHR(VkCommandBuffer commandBuffer, const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdPushDescriptorSet2KHR(commandBuffer, pPushDescriptorSetInfo); - vku::safe_VkPushDescriptorSetInfoKHR var_local_pPushDescriptorSetInfo; - vku::safe_VkPushDescriptorSetInfoKHR* local_pPushDescriptorSetInfo = nullptr; - { - if (pPushDescriptorSetInfo) { - local_pPushDescriptorSetInfo = &var_local_pPushDescriptorSetInfo; - local_pPushDescriptorSetInfo->initialize(pPushDescriptorSetInfo); - - if (pPushDescriptorSetInfo->layout) { - local_pPushDescriptorSetInfo->layout = layer_data->Unwrap(pPushDescriptorSetInfo->layout); - } - if (local_pPushDescriptorSetInfo->pDescriptorWrites) { - for (uint32_t index1 = 0; index1 < local_pPushDescriptorSetInfo->descriptorWriteCount; ++index1) { - UnwrapPnextChainHandles(layer_data, local_pPushDescriptorSetInfo->pDescriptorWrites[index1].pNext); - - if (pPushDescriptorSetInfo->pDescriptorWrites[index1].dstSet) { - local_pPushDescriptorSetInfo->pDescriptorWrites[index1].dstSet = - layer_data->Unwrap(pPushDescriptorSetInfo->pDescriptorWrites[index1].dstSet); - } - if (local_pPushDescriptorSetInfo->pDescriptorWrites[index1].pImageInfo) { - for (uint32_t index2 = 0; index2 < local_pPushDescriptorSetInfo->pDescriptorWrites[index1].descriptorCount; - ++index2) { - if (pPushDescriptorSetInfo->pDescriptorWrites[index1].pImageInfo[index2].sampler) { - local_pPushDescriptorSetInfo->pDescriptorWrites[index1].pImageInfo[index2].sampler = - layer_data->Unwrap( - pPushDescriptorSetInfo->pDescriptorWrites[index1].pImageInfo[index2].sampler); - } - if (pPushDescriptorSetInfo->pDescriptorWrites[index1].pImageInfo[index2].imageView) { - local_pPushDescriptorSetInfo->pDescriptorWrites[index1].pImageInfo[index2].imageView = - layer_data->Unwrap( - pPushDescriptorSetInfo->pDescriptorWrites[index1].pImageInfo[index2].imageView); - } - } - } - if (local_pPushDescriptorSetInfo->pDescriptorWrites[index1].pBufferInfo) { - for (uint32_t index2 = 0; index2 < local_pPushDescriptorSetInfo->pDescriptorWrites[index1].descriptorCount; - ++index2) { - if (pPushDescriptorSetInfo->pDescriptorWrites[index1].pBufferInfo[index2].buffer) { - local_pPushDescriptorSetInfo->pDescriptorWrites[index1].pBufferInfo[index2].buffer = - layer_data->Unwrap( - pPushDescriptorSetInfo->pDescriptorWrites[index1].pBufferInfo[index2].buffer); - } - } - } - if (local_pPushDescriptorSetInfo->pDescriptorWrites[index1].pTexelBufferView) { - for (uint32_t index2 = 0; index2 < local_pPushDescriptorSetInfo->pDescriptorWrites[index1].descriptorCount; - ++index2) { - local_pPushDescriptorSetInfo->pDescriptorWrites[index1].pTexelBufferView[index2] = layer_data->Unwrap( - local_pPushDescriptorSetInfo->pDescriptorWrites[index1].pTexelBufferView[index2]); - } - } - } - } - UnwrapPnextChainHandles(layer_data, local_pPushDescriptorSetInfo->pNext); - } - } - layer_data->device_dispatch_table.CmdPushDescriptorSet2KHR(commandBuffer, - (const VkPushDescriptorSetInfoKHR*)local_pPushDescriptorSetInfo); -} - -void DispatchCmdSetDescriptorBufferOffsets2EXT(VkCommandBuffer commandBuffer, - const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdSetDescriptorBufferOffsets2EXT(commandBuffer, pSetDescriptorBufferOffsetsInfo); - vku::safe_VkSetDescriptorBufferOffsetsInfoEXT var_local_pSetDescriptorBufferOffsetsInfo; - vku::safe_VkSetDescriptorBufferOffsetsInfoEXT* local_pSetDescriptorBufferOffsetsInfo = nullptr; - { - if (pSetDescriptorBufferOffsetsInfo) { - local_pSetDescriptorBufferOffsetsInfo = &var_local_pSetDescriptorBufferOffsetsInfo; - local_pSetDescriptorBufferOffsetsInfo->initialize(pSetDescriptorBufferOffsetsInfo); - - if (pSetDescriptorBufferOffsetsInfo->layout) { - local_pSetDescriptorBufferOffsetsInfo->layout = layer_data->Unwrap(pSetDescriptorBufferOffsetsInfo->layout); - } - UnwrapPnextChainHandles(layer_data, local_pSetDescriptorBufferOffsetsInfo->pNext); - } - } - layer_data->device_dispatch_table.CmdSetDescriptorBufferOffsets2EXT( - commandBuffer, (const VkSetDescriptorBufferOffsetsInfoEXT*)local_pSetDescriptorBufferOffsetsInfo); -} - -void DispatchCmdBindDescriptorBufferEmbeddedSamplers2EXT( - VkCommandBuffer commandBuffer, const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdBindDescriptorBufferEmbeddedSamplers2EXT( - commandBuffer, pBindDescriptorBufferEmbeddedSamplersInfo); - vku::safe_VkBindDescriptorBufferEmbeddedSamplersInfoEXT var_local_pBindDescriptorBufferEmbeddedSamplersInfo; - vku::safe_VkBindDescriptorBufferEmbeddedSamplersInfoEXT* local_pBindDescriptorBufferEmbeddedSamplersInfo = nullptr; - { - if (pBindDescriptorBufferEmbeddedSamplersInfo) { - local_pBindDescriptorBufferEmbeddedSamplersInfo = &var_local_pBindDescriptorBufferEmbeddedSamplersInfo; - local_pBindDescriptorBufferEmbeddedSamplersInfo->initialize(pBindDescriptorBufferEmbeddedSamplersInfo); - - if (pBindDescriptorBufferEmbeddedSamplersInfo->layout) { - local_pBindDescriptorBufferEmbeddedSamplersInfo->layout = - layer_data->Unwrap(pBindDescriptorBufferEmbeddedSamplersInfo->layout); - } - UnwrapPnextChainHandles(layer_data, local_pBindDescriptorBufferEmbeddedSamplersInfo->pNext); - } - } - layer_data->device_dispatch_table.CmdBindDescriptorBufferEmbeddedSamplers2EXT( - commandBuffer, (const VkBindDescriptorBufferEmbeddedSamplersInfoEXT*)local_pBindDescriptorBufferEmbeddedSamplersInfo); -} - -VkResult DispatchCreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.CreateDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, pCallback); - - VkResult result = - layer_data->instance_dispatch_table.CreateDebugReportCallbackEXT(instance, pCreateInfo, pAllocator, pCallback); - if (VK_SUCCESS == result) { - *pCallback = layer_data->WrapNew(*pCallback); - } - return result; -} - -void DispatchDestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT callback, - const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - if (!wrap_handles) return layer_data->instance_dispatch_table.DestroyDebugReportCallbackEXT(instance, callback, pAllocator); - - uint64_t callback_id = CastToUint64(callback); - auto iter = unique_id_mapping.pop(callback_id); - if (iter != unique_id_mapping.end()) { - callback = (VkDebugReportCallbackEXT)iter->second; - } else { - callback = (VkDebugReportCallbackEXT)0; - } - layer_data->instance_dispatch_table.DestroyDebugReportCallbackEXT(instance, callback, pAllocator); -} - -void DispatchDebugReportMessageEXT(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, - uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, - const char* pMessage) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - - layer_data->instance_dispatch_table.DebugReportMessageEXT(instance, flags, objectType, object, location, messageCode, - pLayerPrefix, pMessage); -} - -void DispatchCmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdDebugMarkerBeginEXT(commandBuffer, pMarkerInfo); -} - -void DispatchCmdDebugMarkerEndEXT(VkCommandBuffer commandBuffer) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdDebugMarkerEndEXT(commandBuffer); -} - -void DispatchCmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdDebugMarkerInsertEXT(commandBuffer, pMarkerInfo); -} - -void DispatchCmdBindTransformFeedbackBuffersEXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, - const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, - const VkDeviceSize* pSizes) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdBindTransformFeedbackBuffersEXT(commandBuffer, firstBinding, bindingCount, - pBuffers, pOffsets, pSizes); - small_vector var_local_pBuffers; - VkBuffer* local_pBuffers = nullptr; - { - if (pBuffers) { - var_local_pBuffers.resize(bindingCount); - local_pBuffers = var_local_pBuffers.data(); - for (uint32_t index0 = 0; index0 < bindingCount; ++index0) { - local_pBuffers[index0] = layer_data->Unwrap(pBuffers[index0]); - } - } - } - layer_data->device_dispatch_table.CmdBindTransformFeedbackBuffersEXT(commandBuffer, firstBinding, bindingCount, - (const VkBuffer*)local_pBuffers, pOffsets, pSizes); -} - -void DispatchCmdBeginTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, - const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdBeginTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, - pCounterBuffers, pCounterBufferOffsets); - small_vector var_local_pCounterBuffers; - VkBuffer* local_pCounterBuffers = nullptr; - { - if (pCounterBuffers) { - var_local_pCounterBuffers.resize(counterBufferCount); - local_pCounterBuffers = var_local_pCounterBuffers.data(); - for (uint32_t index0 = 0; index0 < counterBufferCount; ++index0) { - local_pCounterBuffers[index0] = layer_data->Unwrap(pCounterBuffers[index0]); - } - } - } - layer_data->device_dispatch_table.CmdBeginTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, - (const VkBuffer*)local_pCounterBuffers, pCounterBufferOffsets); -} - -void DispatchCmdEndTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, - const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdEndTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, - pCounterBuffers, pCounterBufferOffsets); - small_vector var_local_pCounterBuffers; - VkBuffer* local_pCounterBuffers = nullptr; - { - if (pCounterBuffers) { - var_local_pCounterBuffers.resize(counterBufferCount); - local_pCounterBuffers = var_local_pCounterBuffers.data(); - for (uint32_t index0 = 0; index0 < counterBufferCount; ++index0) { - local_pCounterBuffers[index0] = layer_data->Unwrap(pCounterBuffers[index0]); - } - } - } - layer_data->device_dispatch_table.CmdEndTransformFeedbackEXT(commandBuffer, firstCounterBuffer, counterBufferCount, - (const VkBuffer*)local_pCounterBuffers, pCounterBufferOffsets); -} - -void DispatchCmdBeginQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, - VkQueryControlFlags flags, uint32_t index) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdBeginQueryIndexedEXT(commandBuffer, queryPool, query, flags, index); - { queryPool = layer_data->Unwrap(queryPool); } - layer_data->device_dispatch_table.CmdBeginQueryIndexedEXT(commandBuffer, queryPool, query, flags, index); -} - -void DispatchCmdEndQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdEndQueryIndexedEXT(commandBuffer, queryPool, query, index); - { queryPool = layer_data->Unwrap(queryPool); } - layer_data->device_dispatch_table.CmdEndQueryIndexedEXT(commandBuffer, queryPool, query, index); -} - -void DispatchCmdDrawIndirectByteCountEXT(VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, - VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, - uint32_t vertexStride) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdDrawIndirectByteCountEXT( - commandBuffer, instanceCount, firstInstance, counterBuffer, counterBufferOffset, counterOffset, vertexStride); - { counterBuffer = layer_data->Unwrap(counterBuffer); } - layer_data->device_dispatch_table.CmdDrawIndirectByteCountEXT(commandBuffer, instanceCount, firstInstance, counterBuffer, - counterBufferOffset, counterOffset, vertexStride); -} - -VkResult DispatchCreateCuModuleNVX(VkDevice device, const VkCuModuleCreateInfoNVX* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkCuModuleNVX* pModule) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CreateCuModuleNVX(device, pCreateInfo, pAllocator, pModule); - - VkResult result = layer_data->device_dispatch_table.CreateCuModuleNVX(device, pCreateInfo, pAllocator, pModule); - if (VK_SUCCESS == result) { - *pModule = layer_data->WrapNew(*pModule); - } - return result; -} - -VkResult DispatchCreateCuFunctionNVX(VkDevice device, const VkCuFunctionCreateInfoNVX* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkCuFunctionNVX* pFunction) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CreateCuFunctionNVX(device, pCreateInfo, pAllocator, pFunction); - vku::safe_VkCuFunctionCreateInfoNVX var_local_pCreateInfo; - vku::safe_VkCuFunctionCreateInfoNVX* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - - if (pCreateInfo->module) { - local_pCreateInfo->module = layer_data->Unwrap(pCreateInfo->module); - } - } - } - VkResult result = layer_data->device_dispatch_table.CreateCuFunctionNVX( - device, (const VkCuFunctionCreateInfoNVX*)local_pCreateInfo, pAllocator, pFunction); - if (VK_SUCCESS == result) { - *pFunction = layer_data->WrapNew(*pFunction); - } - return result; -} - -void DispatchDestroyCuModuleNVX(VkDevice device, VkCuModuleNVX module, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyCuModuleNVX(device, module, pAllocator); - - uint64_t module_id = CastToUint64(module); - auto iter = unique_id_mapping.pop(module_id); - if (iter != unique_id_mapping.end()) { - module = (VkCuModuleNVX)iter->second; - } else { - module = (VkCuModuleNVX)0; - } - layer_data->device_dispatch_table.DestroyCuModuleNVX(device, module, pAllocator); -} - -void DispatchDestroyCuFunctionNVX(VkDevice device, VkCuFunctionNVX function, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyCuFunctionNVX(device, function, pAllocator); - - uint64_t function_id = CastToUint64(function); - auto iter = unique_id_mapping.pop(function_id); - if (iter != unique_id_mapping.end()) { - function = (VkCuFunctionNVX)iter->second; - } else { - function = (VkCuFunctionNVX)0; - } - layer_data->device_dispatch_table.DestroyCuFunctionNVX(device, function, pAllocator); -} - -void DispatchCmdCuLaunchKernelNVX(VkCommandBuffer commandBuffer, const VkCuLaunchInfoNVX* pLaunchInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdCuLaunchKernelNVX(commandBuffer, pLaunchInfo); - vku::safe_VkCuLaunchInfoNVX var_local_pLaunchInfo; - vku::safe_VkCuLaunchInfoNVX* local_pLaunchInfo = nullptr; - { - if (pLaunchInfo) { - local_pLaunchInfo = &var_local_pLaunchInfo; - local_pLaunchInfo->initialize(pLaunchInfo); - - if (pLaunchInfo->function) { - local_pLaunchInfo->function = layer_data->Unwrap(pLaunchInfo->function); - } - } - } - layer_data->device_dispatch_table.CmdCuLaunchKernelNVX(commandBuffer, (const VkCuLaunchInfoNVX*)local_pLaunchInfo); -} - -uint32_t DispatchGetImageViewHandleNVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetImageViewHandleNVX(device, pInfo); - vku::safe_VkImageViewHandleInfoNVX var_local_pInfo; - vku::safe_VkImageViewHandleInfoNVX* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->imageView) { - local_pInfo->imageView = layer_data->Unwrap(pInfo->imageView); - } - if (pInfo->sampler) { - local_pInfo->sampler = layer_data->Unwrap(pInfo->sampler); - } - } - } - uint32_t result = layer_data->device_dispatch_table.GetImageViewHandleNVX(device, (const VkImageViewHandleInfoNVX*)local_pInfo); - - return result; -} - -uint64_t DispatchGetImageViewHandle64NVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetImageViewHandle64NVX(device, pInfo); - vku::safe_VkImageViewHandleInfoNVX var_local_pInfo; - vku::safe_VkImageViewHandleInfoNVX* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->imageView) { - local_pInfo->imageView = layer_data->Unwrap(pInfo->imageView); - } - if (pInfo->sampler) { - local_pInfo->sampler = layer_data->Unwrap(pInfo->sampler); - } - } - } - uint64_t result = - layer_data->device_dispatch_table.GetImageViewHandle64NVX(device, (const VkImageViewHandleInfoNVX*)local_pInfo); - - return result; -} - -VkResult DispatchGetImageViewAddressNVX(VkDevice device, VkImageView imageView, VkImageViewAddressPropertiesNVX* pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetImageViewAddressNVX(device, imageView, pProperties); - { imageView = layer_data->Unwrap(imageView); } - VkResult result = layer_data->device_dispatch_table.GetImageViewAddressNVX(device, imageView, pProperties); - - return result; -} - -void DispatchCmdDrawIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, - VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdDrawIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, - countBufferOffset, maxDrawCount, stride); - { - buffer = layer_data->Unwrap(buffer); - countBuffer = layer_data->Unwrap(countBuffer); - } - layer_data->device_dispatch_table.CmdDrawIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride); -} - -void DispatchCmdDrawIndexedIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, - VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, - uint32_t stride) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdDrawIndexedIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, - countBufferOffset, maxDrawCount, stride); - { - buffer = layer_data->Unwrap(buffer); - countBuffer = layer_data->Unwrap(countBuffer); - } - layer_data->device_dispatch_table.CmdDrawIndexedIndirectCountAMD(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride); -} - -VkResult DispatchGetShaderInfoAMD(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, - VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetShaderInfoAMD(device, pipeline, shaderStage, infoType, pInfoSize, pInfo); - { pipeline = layer_data->Unwrap(pipeline); } - VkResult result = layer_data->device_dispatch_table.GetShaderInfoAMD(device, pipeline, shaderStage, infoType, pInfoSize, pInfo); - - return result; -} -#ifdef VK_USE_PLATFORM_GGP - -VkResult DispatchCreateStreamDescriptorSurfaceGGP(VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.CreateStreamDescriptorSurfaceGGP(instance, pCreateInfo, pAllocator, pSurface); - - VkResult result = - layer_data->instance_dispatch_table.CreateStreamDescriptorSurfaceGGP(instance, pCreateInfo, pAllocator, pSurface); - if (VK_SUCCESS == result) { - *pSurface = layer_data->WrapNew(*pSurface); - } - return result; -} -#endif // VK_USE_PLATFORM_GGP - -VkResult DispatchGetPhysicalDeviceExternalImageFormatPropertiesNV( - VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, - VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, - VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkResult result = layer_data->instance_dispatch_table.GetPhysicalDeviceExternalImageFormatPropertiesNV( - physicalDevice, format, type, tiling, usage, flags, externalHandleType, pExternalImageFormatProperties); - - return result; -} -#ifdef VK_USE_PLATFORM_WIN32_KHR - -VkResult DispatchGetMemoryWin32HandleNV(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, - HANDLE* pHandle) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetMemoryWin32HandleNV(device, memory, handleType, pHandle); - { memory = layer_data->Unwrap(memory); } - VkResult result = layer_data->device_dispatch_table.GetMemoryWin32HandleNV(device, memory, handleType, pHandle); - - return result; -} -#endif // VK_USE_PLATFORM_WIN32_KHR -#ifdef VK_USE_PLATFORM_VI_NN - -VkResult DispatchCreateViSurfaceNN(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - if (!wrap_handles) return layer_data->instance_dispatch_table.CreateViSurfaceNN(instance, pCreateInfo, pAllocator, pSurface); - - VkResult result = layer_data->instance_dispatch_table.CreateViSurfaceNN(instance, pCreateInfo, pAllocator, pSurface); - if (VK_SUCCESS == result) { - *pSurface = layer_data->WrapNew(*pSurface); - } - return result; -} -#endif // VK_USE_PLATFORM_VI_NN - -void DispatchCmdBeginConditionalRenderingEXT(VkCommandBuffer commandBuffer, - const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdBeginConditionalRenderingEXT(commandBuffer, pConditionalRenderingBegin); - vku::safe_VkConditionalRenderingBeginInfoEXT var_local_pConditionalRenderingBegin; - vku::safe_VkConditionalRenderingBeginInfoEXT* local_pConditionalRenderingBegin = nullptr; - { - if (pConditionalRenderingBegin) { - local_pConditionalRenderingBegin = &var_local_pConditionalRenderingBegin; - local_pConditionalRenderingBegin->initialize(pConditionalRenderingBegin); - - if (pConditionalRenderingBegin->buffer) { - local_pConditionalRenderingBegin->buffer = layer_data->Unwrap(pConditionalRenderingBegin->buffer); - } - } - } - layer_data->device_dispatch_table.CmdBeginConditionalRenderingEXT( - commandBuffer, (const VkConditionalRenderingBeginInfoEXT*)local_pConditionalRenderingBegin); -} - -void DispatchCmdEndConditionalRenderingEXT(VkCommandBuffer commandBuffer) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdEndConditionalRenderingEXT(commandBuffer); -} - -void DispatchCmdSetViewportWScalingNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, - const VkViewportWScalingNV* pViewportWScalings) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetViewportWScalingNV(commandBuffer, firstViewport, viewportCount, pViewportWScalings); -} - -VkResult DispatchReleaseDisplayEXT(VkPhysicalDevice physicalDevice, VkDisplayKHR display) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - if (!wrap_handles) return layer_data->instance_dispatch_table.ReleaseDisplayEXT(physicalDevice, display); - { display = layer_data->Unwrap(display); } - VkResult result = layer_data->instance_dispatch_table.ReleaseDisplayEXT(physicalDevice, display); - - return result; -} -#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT - -VkResult DispatchAcquireXlibDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - if (!wrap_handles) return layer_data->instance_dispatch_table.AcquireXlibDisplayEXT(physicalDevice, dpy, display); - { display = layer_data->Unwrap(display); } - VkResult result = layer_data->instance_dispatch_table.AcquireXlibDisplayEXT(physicalDevice, dpy, display); - - return result; -} - -VkResult DispatchGetRandROutputDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, - VkDisplayKHR* pDisplay) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - if (!wrap_handles) return layer_data->instance_dispatch_table.GetRandROutputDisplayEXT(physicalDevice, dpy, rrOutput, pDisplay); - - VkResult result = layer_data->instance_dispatch_table.GetRandROutputDisplayEXT(physicalDevice, dpy, rrOutput, pDisplay); - if (VK_SUCCESS == result) { - *pDisplay = layer_data->MaybeWrapDisplay(*pDisplay); - } - return result; -} -#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT - -VkResult DispatchGetPhysicalDeviceSurfaceCapabilities2EXT(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, - VkSurfaceCapabilities2EXT* pSurfaceCapabilities) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.GetPhysicalDeviceSurfaceCapabilities2EXT(physicalDevice, surface, - pSurfaceCapabilities); - { surface = layer_data->Unwrap(surface); } - VkResult result = - layer_data->instance_dispatch_table.GetPhysicalDeviceSurfaceCapabilities2EXT(physicalDevice, surface, pSurfaceCapabilities); - - return result; -} - -VkResult DispatchDisplayPowerControlEXT(VkDevice device, VkDisplayKHR display, const VkDisplayPowerInfoEXT* pDisplayPowerInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DisplayPowerControlEXT(device, display, pDisplayPowerInfo); - { display = layer_data->Unwrap(display); } - VkResult result = layer_data->device_dispatch_table.DisplayPowerControlEXT(device, display, pDisplayPowerInfo); - - return result; -} - -VkResult DispatchRegisterDeviceEventEXT(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, - const VkAllocationCallbacks* pAllocator, VkFence* pFence) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.RegisterDeviceEventEXT(device, pDeviceEventInfo, pAllocator, pFence); - - VkResult result = layer_data->device_dispatch_table.RegisterDeviceEventEXT(device, pDeviceEventInfo, pAllocator, pFence); - if (VK_SUCCESS == result) { - *pFence = layer_data->WrapNew(*pFence); - } - return result; -} - -VkResult DispatchRegisterDisplayEventEXT(VkDevice device, VkDisplayKHR display, const VkDisplayEventInfoEXT* pDisplayEventInfo, - const VkAllocationCallbacks* pAllocator, VkFence* pFence) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.RegisterDisplayEventEXT(device, display, pDisplayEventInfo, pAllocator, pFence); - { display = layer_data->Unwrap(display); } - VkResult result = - layer_data->device_dispatch_table.RegisterDisplayEventEXT(device, display, pDisplayEventInfo, pAllocator, pFence); - if (VK_SUCCESS == result) { - *pFence = layer_data->WrapNew(*pFence); - } - return result; -} - -VkResult DispatchGetSwapchainCounterEXT(VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, - uint64_t* pCounterValue) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetSwapchainCounterEXT(device, swapchain, counter, pCounterValue); - { swapchain = layer_data->Unwrap(swapchain); } - VkResult result = layer_data->device_dispatch_table.GetSwapchainCounterEXT(device, swapchain, counter, pCounterValue); - - return result; -} - -VkResult DispatchGetRefreshCycleDurationGOOGLE(VkDevice device, VkSwapchainKHR swapchain, - VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetRefreshCycleDurationGOOGLE(device, swapchain, pDisplayTimingProperties); - { swapchain = layer_data->Unwrap(swapchain); } - VkResult result = layer_data->device_dispatch_table.GetRefreshCycleDurationGOOGLE(device, swapchain, pDisplayTimingProperties); - - return result; -} - -VkResult DispatchGetPastPresentationTimingGOOGLE(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pPresentationTimingCount, - VkPastPresentationTimingGOOGLE* pPresentationTimings) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetPastPresentationTimingGOOGLE(device, swapchain, pPresentationTimingCount, - pPresentationTimings); - { swapchain = layer_data->Unwrap(swapchain); } - VkResult result = layer_data->device_dispatch_table.GetPastPresentationTimingGOOGLE(device, swapchain, pPresentationTimingCount, - pPresentationTimings); - - return result; -} - -void DispatchCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, - uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetDiscardRectangleEXT(commandBuffer, firstDiscardRectangle, discardRectangleCount, - pDiscardRectangles); -} - -void DispatchCmdSetDiscardRectangleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 discardRectangleEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetDiscardRectangleEnableEXT(commandBuffer, discardRectangleEnable); -} - -void DispatchCmdSetDiscardRectangleModeEXT(VkCommandBuffer commandBuffer, VkDiscardRectangleModeEXT discardRectangleMode) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetDiscardRectangleModeEXT(commandBuffer, discardRectangleMode); -} - -void DispatchSetHdrMetadataEXT(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, - const VkHdrMetadataEXT* pMetadata) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.SetHdrMetadataEXT(device, swapchainCount, pSwapchains, pMetadata); - small_vector var_local_pSwapchains; - VkSwapchainKHR* local_pSwapchains = nullptr; - { - if (pSwapchains) { - var_local_pSwapchains.resize(swapchainCount); - local_pSwapchains = var_local_pSwapchains.data(); - for (uint32_t index0 = 0; index0 < swapchainCount; ++index0) { - local_pSwapchains[index0] = layer_data->Unwrap(pSwapchains[index0]); - } - } - } - layer_data->device_dispatch_table.SetHdrMetadataEXT(device, swapchainCount, (const VkSwapchainKHR*)local_pSwapchains, - pMetadata); -} -#ifdef VK_USE_PLATFORM_IOS_MVK - -VkResult DispatchCreateIOSSurfaceMVK(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - if (!wrap_handles) return layer_data->instance_dispatch_table.CreateIOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); - - VkResult result = layer_data->instance_dispatch_table.CreateIOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); - if (VK_SUCCESS == result) { - *pSurface = layer_data->WrapNew(*pSurface); - } - return result; -} -#endif // VK_USE_PLATFORM_IOS_MVK -#ifdef VK_USE_PLATFORM_MACOS_MVK - -VkResult DispatchCreateMacOSSurfaceMVK(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.CreateMacOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); - - VkResult result = layer_data->instance_dispatch_table.CreateMacOSSurfaceMVK(instance, pCreateInfo, pAllocator, pSurface); - if (VK_SUCCESS == result) { - *pSurface = layer_data->WrapNew(*pSurface); - } - return result; -} -#endif // VK_USE_PLATFORM_MACOS_MVK - -void DispatchQueueBeginDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); - - layer_data->device_dispatch_table.QueueBeginDebugUtilsLabelEXT(queue, pLabelInfo); -} - -void DispatchQueueEndDebugUtilsLabelEXT(VkQueue queue) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); - - layer_data->device_dispatch_table.QueueEndDebugUtilsLabelEXT(queue); -} - -void DispatchQueueInsertDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); - - layer_data->device_dispatch_table.QueueInsertDebugUtilsLabelEXT(queue, pLabelInfo); -} - -void DispatchCmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdBeginDebugUtilsLabelEXT(commandBuffer, pLabelInfo); -} - -void DispatchCmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdEndDebugUtilsLabelEXT(commandBuffer); -} - -void DispatchCmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdInsertDebugUtilsLabelEXT(commandBuffer, pLabelInfo); -} - -VkResult DispatchCreateDebugUtilsMessengerEXT(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkDebugUtilsMessengerEXT* pMessenger) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.CreateDebugUtilsMessengerEXT(instance, pCreateInfo, pAllocator, pMessenger); - - VkResult result = - layer_data->instance_dispatch_table.CreateDebugUtilsMessengerEXT(instance, pCreateInfo, pAllocator, pMessenger); - if (VK_SUCCESS == result) { - *pMessenger = layer_data->WrapNew(*pMessenger); - } - return result; -} - -void DispatchDestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT messenger, - const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - if (!wrap_handles) return layer_data->instance_dispatch_table.DestroyDebugUtilsMessengerEXT(instance, messenger, pAllocator); - - uint64_t messenger_id = CastToUint64(messenger); - auto iter = unique_id_mapping.pop(messenger_id); - if (iter != unique_id_mapping.end()) { - messenger = (VkDebugUtilsMessengerEXT)iter->second; - } else { - messenger = (VkDebugUtilsMessengerEXT)0; - } - layer_data->instance_dispatch_table.DestroyDebugUtilsMessengerEXT(instance, messenger, pAllocator); -} - -void DispatchSubmitDebugUtilsMessageEXT(VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, - VkDebugUtilsMessageTypeFlagsEXT messageTypes, - const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - - layer_data->instance_dispatch_table.SubmitDebugUtilsMessageEXT(instance, messageSeverity, messageTypes, pCallbackData); -} -#ifdef VK_USE_PLATFORM_ANDROID_KHR - -VkResult DispatchGetAndroidHardwareBufferPropertiesANDROID(VkDevice device, const struct AHardwareBuffer* buffer, - VkAndroidHardwareBufferPropertiesANDROID* pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - VkResult result = layer_data->device_dispatch_table.GetAndroidHardwareBufferPropertiesANDROID(device, buffer, pProperties); - - return result; -} - -VkResult DispatchGetMemoryAndroidHardwareBufferANDROID(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, - struct AHardwareBuffer** pBuffer) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetMemoryAndroidHardwareBufferANDROID(device, pInfo, pBuffer); - vku::safe_VkMemoryGetAndroidHardwareBufferInfoANDROID var_local_pInfo; - vku::safe_VkMemoryGetAndroidHardwareBufferInfoANDROID* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->memory) { - local_pInfo->memory = layer_data->Unwrap(pInfo->memory); - } - } - } - VkResult result = layer_data->device_dispatch_table.GetMemoryAndroidHardwareBufferANDROID( - device, (const VkMemoryGetAndroidHardwareBufferInfoANDROID*)local_pInfo, pBuffer); - - return result; -} -#endif // VK_USE_PLATFORM_ANDROID_KHR -#ifdef VK_ENABLE_BETA_EXTENSIONS - -VkResult DispatchCreateExecutionGraphPipelinesAMDX(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, - const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos, - const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CreateExecutionGraphPipelinesAMDX(device, pipelineCache, createInfoCount, - pCreateInfos, pAllocator, pPipelines); - small_vector var_local_pCreateInfos; - vku::safe_VkExecutionGraphPipelineCreateInfoAMDX* local_pCreateInfos = nullptr; - { - pipelineCache = layer_data->Unwrap(pipelineCache); - if (pCreateInfos) { - var_local_pCreateInfos.resize(createInfoCount); - local_pCreateInfos = var_local_pCreateInfos.data(); - for (uint32_t index0 = 0; index0 < createInfoCount; ++index0) { - local_pCreateInfos[index0].initialize(&pCreateInfos[index0]); - if (local_pCreateInfos[index0].pStages) { - for (uint32_t index1 = 0; index1 < local_pCreateInfos[index0].stageCount; ++index1) { - UnwrapPnextChainHandles(layer_data, local_pCreateInfos[index0].pStages[index1].pNext); - - if (pCreateInfos[index0].pStages[index1].module) { - local_pCreateInfos[index0].pStages[index1].module = - layer_data->Unwrap(pCreateInfos[index0].pStages[index1].module); - } - } - } - if (local_pCreateInfos[index0].pLibraryInfo) { - if (local_pCreateInfos[index0].pLibraryInfo->pLibraries) { - for (uint32_t index2 = 0; index2 < local_pCreateInfos[index0].pLibraryInfo->libraryCount; ++index2) { - local_pCreateInfos[index0].pLibraryInfo->pLibraries[index2] = - layer_data->Unwrap(local_pCreateInfos[index0].pLibraryInfo->pLibraries[index2]); - } - } - } - - if (pCreateInfos[index0].layout) { - local_pCreateInfos[index0].layout = layer_data->Unwrap(pCreateInfos[index0].layout); - } - if (pCreateInfos[index0].basePipelineHandle) { - local_pCreateInfos[index0].basePipelineHandle = layer_data->Unwrap(pCreateInfos[index0].basePipelineHandle); - } - } - } - } - VkResult result = layer_data->device_dispatch_table.CreateExecutionGraphPipelinesAMDX( - device, pipelineCache, createInfoCount, (const VkExecutionGraphPipelineCreateInfoAMDX*)local_pCreateInfos, pAllocator, - pPipelines); - if (VK_SUCCESS == result) { - for (uint32_t index0 = 0; index0 < createInfoCount; index0++) { - pPipelines[index0] = layer_data->WrapNew(pPipelines[index0]); - } - } - return result; -} - -VkResult DispatchGetExecutionGraphPipelineScratchSizeAMDX(VkDevice device, VkPipeline executionGraph, - VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetExecutionGraphPipelineScratchSizeAMDX(device, executionGraph, pSizeInfo); - { executionGraph = layer_data->Unwrap(executionGraph); } - VkResult result = layer_data->device_dispatch_table.GetExecutionGraphPipelineScratchSizeAMDX(device, executionGraph, pSizeInfo); - - return result; -} - -VkResult DispatchGetExecutionGraphPipelineNodeIndexAMDX(VkDevice device, VkPipeline executionGraph, - const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo, - uint32_t* pNodeIndex) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetExecutionGraphPipelineNodeIndexAMDX(device, executionGraph, pNodeInfo, - pNodeIndex); - { executionGraph = layer_data->Unwrap(executionGraph); } - VkResult result = - layer_data->device_dispatch_table.GetExecutionGraphPipelineNodeIndexAMDX(device, executionGraph, pNodeInfo, pNodeIndex); - - return result; -} - -void DispatchCmdInitializeGraphScratchMemoryAMDX(VkCommandBuffer commandBuffer, VkPipeline executionGraph, VkDeviceAddress scratch, - VkDeviceSize scratchSize) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdInitializeGraphScratchMemoryAMDX(commandBuffer, executionGraph, scratch, - scratchSize); - { executionGraph = layer_data->Unwrap(executionGraph); } - layer_data->device_dispatch_table.CmdInitializeGraphScratchMemoryAMDX(commandBuffer, executionGraph, scratch, scratchSize); -} - -void DispatchCmdDispatchGraphAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, - const VkDispatchGraphCountInfoAMDX* pCountInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdDispatchGraphAMDX(commandBuffer, scratch, scratchSize, pCountInfo); -} - -void DispatchCmdDispatchGraphIndirectAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, - const VkDispatchGraphCountInfoAMDX* pCountInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdDispatchGraphIndirectAMDX(commandBuffer, scratch, scratchSize, pCountInfo); -} - -void DispatchCmdDispatchGraphIndirectCountAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, - VkDeviceAddress countInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdDispatchGraphIndirectCountAMDX(commandBuffer, scratch, scratchSize, countInfo); -} -#endif // VK_ENABLE_BETA_EXTENSIONS - -void DispatchCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetSampleLocationsEXT(commandBuffer, pSampleLocationsInfo); -} - -void DispatchGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, - VkMultisamplePropertiesEXT* pMultisampleProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - layer_data->instance_dispatch_table.GetPhysicalDeviceMultisamplePropertiesEXT(physicalDevice, samples, pMultisampleProperties); -} - -VkResult DispatchGetImageDrmFormatModifierPropertiesEXT(VkDevice device, VkImage image, - VkImageDrmFormatModifierPropertiesEXT* pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetImageDrmFormatModifierPropertiesEXT(device, image, pProperties); - { image = layer_data->Unwrap(image); } - VkResult result = layer_data->device_dispatch_table.GetImageDrmFormatModifierPropertiesEXT(device, image, pProperties); - - return result; -} - -VkResult DispatchCreateValidationCacheEXT(VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkValidationCacheEXT* pValidationCache) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CreateValidationCacheEXT(device, pCreateInfo, pAllocator, pValidationCache); - - VkResult result = layer_data->device_dispatch_table.CreateValidationCacheEXT(device, pCreateInfo, pAllocator, pValidationCache); - if (VK_SUCCESS == result) { - *pValidationCache = layer_data->WrapNew(*pValidationCache); - } - return result; -} - -void DispatchDestroyValidationCacheEXT(VkDevice device, VkValidationCacheEXT validationCache, - const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyValidationCacheEXT(device, validationCache, pAllocator); - - uint64_t validationCache_id = CastToUint64(validationCache); - auto iter = unique_id_mapping.pop(validationCache_id); - if (iter != unique_id_mapping.end()) { - validationCache = (VkValidationCacheEXT)iter->second; - } else { - validationCache = (VkValidationCacheEXT)0; - } - layer_data->device_dispatch_table.DestroyValidationCacheEXT(device, validationCache, pAllocator); -} - -VkResult DispatchMergeValidationCachesEXT(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, - const VkValidationCacheEXT* pSrcCaches) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.MergeValidationCachesEXT(device, dstCache, srcCacheCount, pSrcCaches); - small_vector var_local_pSrcCaches; - VkValidationCacheEXT* local_pSrcCaches = nullptr; - { - dstCache = layer_data->Unwrap(dstCache); - if (pSrcCaches) { - var_local_pSrcCaches.resize(srcCacheCount); - local_pSrcCaches = var_local_pSrcCaches.data(); - for (uint32_t index0 = 0; index0 < srcCacheCount; ++index0) { - local_pSrcCaches[index0] = layer_data->Unwrap(pSrcCaches[index0]); - } - } - } - VkResult result = layer_data->device_dispatch_table.MergeValidationCachesEXT(device, dstCache, srcCacheCount, - (const VkValidationCacheEXT*)local_pSrcCaches); - - return result; -} - -VkResult DispatchGetValidationCacheDataEXT(VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, void* pData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetValidationCacheDataEXT(device, validationCache, pDataSize, pData); - { validationCache = layer_data->Unwrap(validationCache); } - VkResult result = layer_data->device_dispatch_table.GetValidationCacheDataEXT(device, validationCache, pDataSize, pData); - - return result; -} - -void DispatchCmdBindShadingRateImageNV(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdBindShadingRateImageNV(commandBuffer, imageView, imageLayout); - { imageView = layer_data->Unwrap(imageView); } - layer_data->device_dispatch_table.CmdBindShadingRateImageNV(commandBuffer, imageView, imageLayout); -} - -void DispatchCmdSetViewportShadingRatePaletteNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, - const VkShadingRatePaletteNV* pShadingRatePalettes) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetViewportShadingRatePaletteNV(commandBuffer, firstViewport, viewportCount, - pShadingRatePalettes); -} - -void DispatchCmdSetCoarseSampleOrderNV(VkCommandBuffer commandBuffer, VkCoarseSampleOrderTypeNV sampleOrderType, - uint32_t customSampleOrderCount, const VkCoarseSampleOrderCustomNV* pCustomSampleOrders) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetCoarseSampleOrderNV(commandBuffer, sampleOrderType, customSampleOrderCount, - pCustomSampleOrders); -} - -VkResult DispatchCreateAccelerationStructureNV(VkDevice device, const VkAccelerationStructureCreateInfoNV* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkAccelerationStructureNV* pAccelerationStructure) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CreateAccelerationStructureNV(device, pCreateInfo, pAllocator, - pAccelerationStructure); - vku::safe_VkAccelerationStructureCreateInfoNV var_local_pCreateInfo; - vku::safe_VkAccelerationStructureCreateInfoNV* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - if (local_pCreateInfo->info.pGeometries) { - for (uint32_t index2 = 0; index2 < local_pCreateInfo->info.geometryCount; ++index2) { - if (pCreateInfo->info.pGeometries[index2].geometry.triangles.vertexData) { - local_pCreateInfo->info.pGeometries[index2].geometry.triangles.vertexData = - layer_data->Unwrap(pCreateInfo->info.pGeometries[index2].geometry.triangles.vertexData); - } - if (pCreateInfo->info.pGeometries[index2].geometry.triangles.indexData) { - local_pCreateInfo->info.pGeometries[index2].geometry.triangles.indexData = - layer_data->Unwrap(pCreateInfo->info.pGeometries[index2].geometry.triangles.indexData); - } - if (pCreateInfo->info.pGeometries[index2].geometry.triangles.transformData) { - local_pCreateInfo->info.pGeometries[index2].geometry.triangles.transformData = - layer_data->Unwrap(pCreateInfo->info.pGeometries[index2].geometry.triangles.transformData); - } - if (pCreateInfo->info.pGeometries[index2].geometry.aabbs.aabbData) { - local_pCreateInfo->info.pGeometries[index2].geometry.aabbs.aabbData = - layer_data->Unwrap(pCreateInfo->info.pGeometries[index2].geometry.aabbs.aabbData); - } - } - } - } - } - VkResult result = layer_data->device_dispatch_table.CreateAccelerationStructureNV( - device, (const VkAccelerationStructureCreateInfoNV*)local_pCreateInfo, pAllocator, pAccelerationStructure); - if (VK_SUCCESS == result) { - *pAccelerationStructure = layer_data->WrapNew(*pAccelerationStructure); - } - return result; -} - -void DispatchDestroyAccelerationStructureNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, - const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.DestroyAccelerationStructureNV(device, accelerationStructure, pAllocator); - - uint64_t accelerationStructure_id = CastToUint64(accelerationStructure); - auto iter = unique_id_mapping.pop(accelerationStructure_id); - if (iter != unique_id_mapping.end()) { - accelerationStructure = (VkAccelerationStructureNV)iter->second; - } else { - accelerationStructure = (VkAccelerationStructureNV)0; - } - layer_data->device_dispatch_table.DestroyAccelerationStructureNV(device, accelerationStructure, pAllocator); -} - -void DispatchGetAccelerationStructureMemoryRequirementsNV(VkDevice device, - const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, - VkMemoryRequirements2KHR* pMemoryRequirements) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetAccelerationStructureMemoryRequirementsNV(device, pInfo, pMemoryRequirements); - vku::safe_VkAccelerationStructureMemoryRequirementsInfoNV var_local_pInfo; - vku::safe_VkAccelerationStructureMemoryRequirementsInfoNV* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->accelerationStructure) { - local_pInfo->accelerationStructure = layer_data->Unwrap(pInfo->accelerationStructure); - } - } - } - layer_data->device_dispatch_table.GetAccelerationStructureMemoryRequirementsNV( - device, (const VkAccelerationStructureMemoryRequirementsInfoNV*)local_pInfo, pMemoryRequirements); -} - -VkResult DispatchBindAccelerationStructureMemoryNV(VkDevice device, uint32_t bindInfoCount, - const VkBindAccelerationStructureMemoryInfoNV* pBindInfos) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.BindAccelerationStructureMemoryNV(device, bindInfoCount, pBindInfos); - small_vector var_local_pBindInfos; - vku::safe_VkBindAccelerationStructureMemoryInfoNV* local_pBindInfos = nullptr; - { - if (pBindInfos) { - var_local_pBindInfos.resize(bindInfoCount); - local_pBindInfos = var_local_pBindInfos.data(); - for (uint32_t index0 = 0; index0 < bindInfoCount; ++index0) { - local_pBindInfos[index0].initialize(&pBindInfos[index0]); - - if (pBindInfos[index0].accelerationStructure) { - local_pBindInfos[index0].accelerationStructure = layer_data->Unwrap(pBindInfos[index0].accelerationStructure); - } - if (pBindInfos[index0].memory) { - local_pBindInfos[index0].memory = layer_data->Unwrap(pBindInfos[index0].memory); - } - } - } - } - VkResult result = layer_data->device_dispatch_table.BindAccelerationStructureMemoryNV( - device, bindInfoCount, (const VkBindAccelerationStructureMemoryInfoNV*)local_pBindInfos); - - return result; -} - -void DispatchCmdBuildAccelerationStructureNV(VkCommandBuffer commandBuffer, const VkAccelerationStructureInfoNV* pInfo, - VkBuffer instanceData, VkDeviceSize instanceOffset, VkBool32 update, - VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkBuffer scratch, - VkDeviceSize scratchOffset) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdBuildAccelerationStructureNV(commandBuffer, pInfo, instanceData, instanceOffset, - update, dst, src, scratch, scratchOffset); - vku::safe_VkAccelerationStructureInfoNV var_local_pInfo; - vku::safe_VkAccelerationStructureInfoNV* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - if (local_pInfo->pGeometries) { - for (uint32_t index1 = 0; index1 < local_pInfo->geometryCount; ++index1) { - if (pInfo->pGeometries[index1].geometry.triangles.vertexData) { - local_pInfo->pGeometries[index1].geometry.triangles.vertexData = - layer_data->Unwrap(pInfo->pGeometries[index1].geometry.triangles.vertexData); - } - if (pInfo->pGeometries[index1].geometry.triangles.indexData) { - local_pInfo->pGeometries[index1].geometry.triangles.indexData = - layer_data->Unwrap(pInfo->pGeometries[index1].geometry.triangles.indexData); - } - if (pInfo->pGeometries[index1].geometry.triangles.transformData) { - local_pInfo->pGeometries[index1].geometry.triangles.transformData = - layer_data->Unwrap(pInfo->pGeometries[index1].geometry.triangles.transformData); - } - if (pInfo->pGeometries[index1].geometry.aabbs.aabbData) { - local_pInfo->pGeometries[index1].geometry.aabbs.aabbData = - layer_data->Unwrap(pInfo->pGeometries[index1].geometry.aabbs.aabbData); - } - } - } - } - instanceData = layer_data->Unwrap(instanceData); - dst = layer_data->Unwrap(dst); - src = layer_data->Unwrap(src); - scratch = layer_data->Unwrap(scratch); - } - layer_data->device_dispatch_table.CmdBuildAccelerationStructureNV( - commandBuffer, (const VkAccelerationStructureInfoNV*)local_pInfo, instanceData, instanceOffset, update, dst, src, scratch, - scratchOffset); -} - -void DispatchCmdCopyAccelerationStructureNV(VkCommandBuffer commandBuffer, VkAccelerationStructureNV dst, - VkAccelerationStructureNV src, VkCopyAccelerationStructureModeKHR mode) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdCopyAccelerationStructureNV(commandBuffer, dst, src, mode); - { - dst = layer_data->Unwrap(dst); - src = layer_data->Unwrap(src); - } - layer_data->device_dispatch_table.CmdCopyAccelerationStructureNV(commandBuffer, dst, src, mode); -} - -void DispatchCmdTraceRaysNV(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) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdTraceRaysNV( - commandBuffer, raygenShaderBindingTableBuffer, raygenShaderBindingOffset, missShaderBindingTableBuffer, - missShaderBindingOffset, missShaderBindingStride, hitShaderBindingTableBuffer, hitShaderBindingOffset, - hitShaderBindingStride, callableShaderBindingTableBuffer, callableShaderBindingOffset, callableShaderBindingStride, - width, height, depth); - { - raygenShaderBindingTableBuffer = layer_data->Unwrap(raygenShaderBindingTableBuffer); - missShaderBindingTableBuffer = layer_data->Unwrap(missShaderBindingTableBuffer); - hitShaderBindingTableBuffer = layer_data->Unwrap(hitShaderBindingTableBuffer); - callableShaderBindingTableBuffer = layer_data->Unwrap(callableShaderBindingTableBuffer); - } - layer_data->device_dispatch_table.CmdTraceRaysNV(commandBuffer, raygenShaderBindingTableBuffer, raygenShaderBindingOffset, - missShaderBindingTableBuffer, missShaderBindingOffset, missShaderBindingStride, - hitShaderBindingTableBuffer, hitShaderBindingOffset, hitShaderBindingStride, - callableShaderBindingTableBuffer, callableShaderBindingOffset, - callableShaderBindingStride, width, height, depth); -} - -VkResult DispatchGetRayTracingShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, - size_t dataSize, void* pData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetRayTracingShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, - dataSize, pData); - { pipeline = layer_data->Unwrap(pipeline); } - VkResult result = layer_data->device_dispatch_table.GetRayTracingShaderGroupHandlesKHR(device, pipeline, firstGroup, groupCount, - dataSize, pData); - - return result; -} - -VkResult DispatchGetRayTracingShaderGroupHandlesNV(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, - size_t dataSize, void* pData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetRayTracingShaderGroupHandlesNV(device, pipeline, firstGroup, groupCount, - dataSize, pData); - { pipeline = layer_data->Unwrap(pipeline); } - VkResult result = layer_data->device_dispatch_table.GetRayTracingShaderGroupHandlesNV(device, pipeline, firstGroup, groupCount, - dataSize, pData); - - return result; -} - -VkResult DispatchGetAccelerationStructureHandleNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, size_t dataSize, - void* pData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetAccelerationStructureHandleNV(device, accelerationStructure, dataSize, pData); - { accelerationStructure = layer_data->Unwrap(accelerationStructure); } - VkResult result = - layer_data->device_dispatch_table.GetAccelerationStructureHandleNV(device, accelerationStructure, dataSize, pData); - - return result; -} - -void DispatchCmdWriteAccelerationStructuresPropertiesNV(VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, - const VkAccelerationStructureNV* pAccelerationStructures, - VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdWriteAccelerationStructuresPropertiesNV( - commandBuffer, accelerationStructureCount, pAccelerationStructures, queryType, queryPool, firstQuery); - small_vector var_local_pAccelerationStructures; - VkAccelerationStructureNV* local_pAccelerationStructures = nullptr; - { - if (pAccelerationStructures) { - var_local_pAccelerationStructures.resize(accelerationStructureCount); - local_pAccelerationStructures = var_local_pAccelerationStructures.data(); - for (uint32_t index0 = 0; index0 < accelerationStructureCount; ++index0) { - local_pAccelerationStructures[index0] = layer_data->Unwrap(pAccelerationStructures[index0]); - } - } - queryPool = layer_data->Unwrap(queryPool); - } - layer_data->device_dispatch_table.CmdWriteAccelerationStructuresPropertiesNV( - commandBuffer, accelerationStructureCount, (const VkAccelerationStructureNV*)local_pAccelerationStructures, queryType, - queryPool, firstQuery); -} - -VkResult DispatchCompileDeferredNV(VkDevice device, VkPipeline pipeline, uint32_t shader) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CompileDeferredNV(device, pipeline, shader); - { pipeline = layer_data->Unwrap(pipeline); } - VkResult result = layer_data->device_dispatch_table.CompileDeferredNV(device, pipeline, shader); - - return result; -} - -VkResult DispatchGetMemoryHostPointerPropertiesEXT(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, - const void* pHostPointer, - VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - VkResult result = layer_data->device_dispatch_table.GetMemoryHostPointerPropertiesEXT(device, handleType, pHostPointer, - pMemoryHostPointerProperties); - - return result; -} - -void DispatchCmdWriteBufferMarkerAMD(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkBuffer dstBuffer, - VkDeviceSize dstOffset, uint32_t marker) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdWriteBufferMarkerAMD(commandBuffer, pipelineStage, dstBuffer, dstOffset, - marker); - { dstBuffer = layer_data->Unwrap(dstBuffer); } - layer_data->device_dispatch_table.CmdWriteBufferMarkerAMD(commandBuffer, pipelineStage, dstBuffer, dstOffset, marker); -} - -void DispatchCmdWriteBufferMarker2AMD(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkBuffer dstBuffer, - VkDeviceSize dstOffset, uint32_t marker) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdWriteBufferMarker2AMD(commandBuffer, stage, dstBuffer, dstOffset, marker); - { dstBuffer = layer_data->Unwrap(dstBuffer); } - layer_data->device_dispatch_table.CmdWriteBufferMarker2AMD(commandBuffer, stage, dstBuffer, dstOffset, marker); -} - -VkResult DispatchGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, - VkTimeDomainKHR* pTimeDomains) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkResult result = layer_data->instance_dispatch_table.GetPhysicalDeviceCalibrateableTimeDomainsEXT( - physicalDevice, pTimeDomainCount, pTimeDomains); - - return result; -} - -VkResult DispatchGetCalibratedTimestampsEXT(VkDevice device, uint32_t timestampCount, - const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, - uint64_t* pMaxDeviation) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - VkResult result = layer_data->device_dispatch_table.GetCalibratedTimestampsEXT(device, timestampCount, pTimestampInfos, - pTimestamps, pMaxDeviation); - - return result; -} - -void DispatchCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdDrawMeshTasksNV(commandBuffer, taskCount, firstTask); -} - -void DispatchCmdDrawMeshTasksIndirectNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, - uint32_t stride) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdDrawMeshTasksIndirectNV(commandBuffer, buffer, offset, drawCount, stride); - { buffer = layer_data->Unwrap(buffer); } - layer_data->device_dispatch_table.CmdDrawMeshTasksIndirectNV(commandBuffer, buffer, offset, drawCount, stride); -} - -void DispatchCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, - VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, - uint32_t stride) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdDrawMeshTasksIndirectCountNV(commandBuffer, buffer, offset, countBuffer, - countBufferOffset, maxDrawCount, stride); - { - buffer = layer_data->Unwrap(buffer); - countBuffer = layer_data->Unwrap(countBuffer); - } - layer_data->device_dispatch_table.CmdDrawMeshTasksIndirectCountNV(commandBuffer, buffer, offset, countBuffer, countBufferOffset, - maxDrawCount, stride); -} - -void DispatchCmdSetExclusiveScissorEnableNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, - uint32_t exclusiveScissorCount, const VkBool32* pExclusiveScissorEnables) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetExclusiveScissorEnableNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, - pExclusiveScissorEnables); -} - -void DispatchCmdSetExclusiveScissorNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, - const VkRect2D* pExclusiveScissors) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetExclusiveScissorNV(commandBuffer, firstExclusiveScissor, exclusiveScissorCount, - pExclusiveScissors); -} - -void DispatchCmdSetCheckpointNV(VkCommandBuffer commandBuffer, const void* pCheckpointMarker) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetCheckpointNV(commandBuffer, pCheckpointMarker); -} - -void DispatchGetQueueCheckpointDataNV(VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointDataNV* pCheckpointData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); - - layer_data->device_dispatch_table.GetQueueCheckpointDataNV(queue, pCheckpointDataCount, pCheckpointData); -} - -void DispatchGetQueueCheckpointData2NV(VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointData2NV* pCheckpointData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); - - layer_data->device_dispatch_table.GetQueueCheckpointData2NV(queue, pCheckpointDataCount, pCheckpointData); -} - -VkResult DispatchInitializePerformanceApiINTEL(VkDevice device, const VkInitializePerformanceApiInfoINTEL* pInitializeInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - VkResult result = layer_data->device_dispatch_table.InitializePerformanceApiINTEL(device, pInitializeInfo); - - return result; -} - -void DispatchUninitializePerformanceApiINTEL(VkDevice device) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - layer_data->device_dispatch_table.UninitializePerformanceApiINTEL(device); -} - -VkResult DispatchCmdSetPerformanceMarkerINTEL(VkCommandBuffer commandBuffer, const VkPerformanceMarkerInfoINTEL* pMarkerInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - VkResult result = layer_data->device_dispatch_table.CmdSetPerformanceMarkerINTEL(commandBuffer, pMarkerInfo); - - return result; -} - -VkResult DispatchCmdSetPerformanceStreamMarkerINTEL(VkCommandBuffer commandBuffer, - const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - VkResult result = layer_data->device_dispatch_table.CmdSetPerformanceStreamMarkerINTEL(commandBuffer, pMarkerInfo); - - return result; -} - -VkResult DispatchCmdSetPerformanceOverrideINTEL(VkCommandBuffer commandBuffer, - const VkPerformanceOverrideInfoINTEL* pOverrideInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - VkResult result = layer_data->device_dispatch_table.CmdSetPerformanceOverrideINTEL(commandBuffer, pOverrideInfo); - - return result; -} - -VkResult DispatchAcquirePerformanceConfigurationINTEL(VkDevice device, - const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, - VkPerformanceConfigurationINTEL* pConfiguration) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.AcquirePerformanceConfigurationINTEL(device, pAcquireInfo, pConfiguration); - - VkResult result = layer_data->device_dispatch_table.AcquirePerformanceConfigurationINTEL(device, pAcquireInfo, pConfiguration); - if (VK_SUCCESS == result) { - *pConfiguration = layer_data->WrapNew(*pConfiguration); - } - return result; -} - -VkResult DispatchQueueSetPerformanceConfigurationINTEL(VkQueue queue, VkPerformanceConfigurationINTEL configuration) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.QueueSetPerformanceConfigurationINTEL(queue, configuration); - { configuration = layer_data->Unwrap(configuration); } - VkResult result = layer_data->device_dispatch_table.QueueSetPerformanceConfigurationINTEL(queue, configuration); - - return result; -} - -VkResult DispatchGetPerformanceParameterINTEL(VkDevice device, VkPerformanceParameterTypeINTEL parameter, - VkPerformanceValueINTEL* pValue) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - VkResult result = layer_data->device_dispatch_table.GetPerformanceParameterINTEL(device, parameter, pValue); - - return result; -} - -void DispatchSetLocalDimmingAMD(VkDevice device, VkSwapchainKHR swapChain, VkBool32 localDimmingEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.SetLocalDimmingAMD(device, swapChain, localDimmingEnable); - { swapChain = layer_data->Unwrap(swapChain); } - layer_data->device_dispatch_table.SetLocalDimmingAMD(device, swapChain, localDimmingEnable); -} -#ifdef VK_USE_PLATFORM_FUCHSIA - -VkResult DispatchCreateImagePipeSurfaceFUCHSIA(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.CreateImagePipeSurfaceFUCHSIA(instance, pCreateInfo, pAllocator, pSurface); - - VkResult result = - layer_data->instance_dispatch_table.CreateImagePipeSurfaceFUCHSIA(instance, pCreateInfo, pAllocator, pSurface); - if (VK_SUCCESS == result) { - *pSurface = layer_data->WrapNew(*pSurface); - } - return result; -} -#endif // VK_USE_PLATFORM_FUCHSIA -#ifdef VK_USE_PLATFORM_METAL_EXT - -VkResult DispatchCreateMetalSurfaceEXT(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.CreateMetalSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); - - VkResult result = layer_data->instance_dispatch_table.CreateMetalSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); - if (VK_SUCCESS == result) { - *pSurface = layer_data->WrapNew(*pSurface); - } - return result; -} -#endif // VK_USE_PLATFORM_METAL_EXT - -VkDeviceAddress DispatchGetBufferDeviceAddressEXT(VkDevice device, const VkBufferDeviceAddressInfo* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetBufferDeviceAddressEXT(device, pInfo); - vku::safe_VkBufferDeviceAddressInfo var_local_pInfo; - vku::safe_VkBufferDeviceAddressInfo* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->buffer) { - local_pInfo->buffer = layer_data->Unwrap(pInfo->buffer); - } - } - } - VkDeviceAddress result = - layer_data->device_dispatch_table.GetBufferDeviceAddressEXT(device, (const VkBufferDeviceAddressInfo*)local_pInfo); - - return result; -} - -VkResult DispatchGetPhysicalDeviceCooperativeMatrixPropertiesNV(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, - VkCooperativeMatrixPropertiesNV* pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkResult result = layer_data->instance_dispatch_table.GetPhysicalDeviceCooperativeMatrixPropertiesNV( - physicalDevice, pPropertyCount, pProperties); - - return result; -} - -VkResult DispatchGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( - VkPhysicalDevice physicalDevice, uint32_t* pCombinationCount, VkFramebufferMixedSamplesCombinationNV* pCombinations) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkResult result = layer_data->instance_dispatch_table.GetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( - physicalDevice, pCombinationCount, pCombinations); - - return result; -} -#ifdef VK_USE_PLATFORM_WIN32_KHR - -VkResult DispatchGetPhysicalDeviceSurfacePresentModes2EXT(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, - uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.GetPhysicalDeviceSurfacePresentModes2EXT(physicalDevice, pSurfaceInfo, - pPresentModeCount, pPresentModes); - vku::safe_VkPhysicalDeviceSurfaceInfo2KHR var_local_pSurfaceInfo; - vku::safe_VkPhysicalDeviceSurfaceInfo2KHR* local_pSurfaceInfo = nullptr; - { - if (pSurfaceInfo) { - local_pSurfaceInfo = &var_local_pSurfaceInfo; - local_pSurfaceInfo->initialize(pSurfaceInfo); - - if (pSurfaceInfo->surface) { - local_pSurfaceInfo->surface = layer_data->Unwrap(pSurfaceInfo->surface); - } - } - } - VkResult result = layer_data->instance_dispatch_table.GetPhysicalDeviceSurfacePresentModes2EXT( - physicalDevice, (const VkPhysicalDeviceSurfaceInfo2KHR*)local_pSurfaceInfo, pPresentModeCount, pPresentModes); - - return result; -} - -VkResult DispatchAcquireFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.AcquireFullScreenExclusiveModeEXT(device, swapchain); - { swapchain = layer_data->Unwrap(swapchain); } - VkResult result = layer_data->device_dispatch_table.AcquireFullScreenExclusiveModeEXT(device, swapchain); - - return result; -} - -VkResult DispatchReleaseFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.ReleaseFullScreenExclusiveModeEXT(device, swapchain); - { swapchain = layer_data->Unwrap(swapchain); } - VkResult result = layer_data->device_dispatch_table.ReleaseFullScreenExclusiveModeEXT(device, swapchain); - - return result; -} - -VkResult DispatchGetDeviceGroupSurfacePresentModes2EXT(VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, - VkDeviceGroupPresentModeFlagsKHR* pModes) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetDeviceGroupSurfacePresentModes2EXT(device, pSurfaceInfo, pModes); - vku::safe_VkPhysicalDeviceSurfaceInfo2KHR var_local_pSurfaceInfo; - vku::safe_VkPhysicalDeviceSurfaceInfo2KHR* local_pSurfaceInfo = nullptr; - { - if (pSurfaceInfo) { - local_pSurfaceInfo = &var_local_pSurfaceInfo; - local_pSurfaceInfo->initialize(pSurfaceInfo); - - if (pSurfaceInfo->surface) { - local_pSurfaceInfo->surface = layer_data->Unwrap(pSurfaceInfo->surface); - } - } - } - VkResult result = layer_data->device_dispatch_table.GetDeviceGroupSurfacePresentModes2EXT( - device, (const VkPhysicalDeviceSurfaceInfo2KHR*)local_pSurfaceInfo, pModes); - - return result; -} -#endif // VK_USE_PLATFORM_WIN32_KHR - -VkResult DispatchCreateHeadlessSurfaceEXT(VkInstance instance, const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.CreateHeadlessSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); - - VkResult result = layer_data->instance_dispatch_table.CreateHeadlessSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); - if (VK_SUCCESS == result) { - *pSurface = layer_data->WrapNew(*pSurface); - } - return result; -} - -void DispatchCmdSetLineStippleEXT(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetLineStippleEXT(commandBuffer, lineStippleFactor, lineStipplePattern); -} - -void DispatchResetQueryPoolEXT(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.ResetQueryPoolEXT(device, queryPool, firstQuery, queryCount); - { queryPool = layer_data->Unwrap(queryPool); } - layer_data->device_dispatch_table.ResetQueryPoolEXT(device, queryPool, firstQuery, queryCount); -} - -void DispatchCmdSetCullModeEXT(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetCullModeEXT(commandBuffer, cullMode); -} - -void DispatchCmdSetFrontFaceEXT(VkCommandBuffer commandBuffer, VkFrontFace frontFace) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetFrontFaceEXT(commandBuffer, frontFace); -} - -void DispatchCmdSetPrimitiveTopologyEXT(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetPrimitiveTopologyEXT(commandBuffer, primitiveTopology); -} - -void DispatchCmdSetViewportWithCountEXT(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetViewportWithCountEXT(commandBuffer, viewportCount, pViewports); -} - -void DispatchCmdSetScissorWithCountEXT(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetScissorWithCountEXT(commandBuffer, scissorCount, pScissors); -} - -void DispatchCmdBindVertexBuffers2EXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, - const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, - const VkDeviceSize* pStrides) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdBindVertexBuffers2EXT(commandBuffer, firstBinding, bindingCount, pBuffers, - pOffsets, pSizes, pStrides); - small_vector var_local_pBuffers; - VkBuffer* local_pBuffers = nullptr; - { - if (pBuffers) { - var_local_pBuffers.resize(bindingCount); - local_pBuffers = var_local_pBuffers.data(); - for (uint32_t index0 = 0; index0 < bindingCount; ++index0) { - local_pBuffers[index0] = layer_data->Unwrap(pBuffers[index0]); - } - } - } - layer_data->device_dispatch_table.CmdBindVertexBuffers2EXT(commandBuffer, firstBinding, bindingCount, - (const VkBuffer*)local_pBuffers, pOffsets, pSizes, pStrides); -} - -void DispatchCmdSetDepthTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetDepthTestEnableEXT(commandBuffer, depthTestEnable); -} - -void DispatchCmdSetDepthWriteEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetDepthWriteEnableEXT(commandBuffer, depthWriteEnable); -} - -void DispatchCmdSetDepthCompareOpEXT(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetDepthCompareOpEXT(commandBuffer, depthCompareOp); -} - -void DispatchCmdSetDepthBoundsTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetDepthBoundsTestEnableEXT(commandBuffer, depthBoundsTestEnable); -} - -void DispatchCmdSetStencilTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetStencilTestEnableEXT(commandBuffer, stencilTestEnable); -} - -void DispatchCmdSetStencilOpEXT(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, - VkStencilOp depthFailOp, VkCompareOp compareOp) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetStencilOpEXT(commandBuffer, faceMask, failOp, passOp, depthFailOp, compareOp); -} - -VkResult DispatchCopyMemoryToImageEXT(VkDevice device, const VkCopyMemoryToImageInfoEXT* pCopyMemoryToImageInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CopyMemoryToImageEXT(device, pCopyMemoryToImageInfo); - vku::safe_VkCopyMemoryToImageInfoEXT var_local_pCopyMemoryToImageInfo; - vku::safe_VkCopyMemoryToImageInfoEXT* local_pCopyMemoryToImageInfo = nullptr; - { - if (pCopyMemoryToImageInfo) { - local_pCopyMemoryToImageInfo = &var_local_pCopyMemoryToImageInfo; - local_pCopyMemoryToImageInfo->initialize(pCopyMemoryToImageInfo); - - if (pCopyMemoryToImageInfo->dstImage) { - local_pCopyMemoryToImageInfo->dstImage = layer_data->Unwrap(pCopyMemoryToImageInfo->dstImage); - } - } - } - VkResult result = layer_data->device_dispatch_table.CopyMemoryToImageEXT( - device, (const VkCopyMemoryToImageInfoEXT*)local_pCopyMemoryToImageInfo); - - return result; -} - -VkResult DispatchCopyImageToMemoryEXT(VkDevice device, const VkCopyImageToMemoryInfoEXT* pCopyImageToMemoryInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CopyImageToMemoryEXT(device, pCopyImageToMemoryInfo); - vku::safe_VkCopyImageToMemoryInfoEXT var_local_pCopyImageToMemoryInfo; - vku::safe_VkCopyImageToMemoryInfoEXT* local_pCopyImageToMemoryInfo = nullptr; - { - if (pCopyImageToMemoryInfo) { - local_pCopyImageToMemoryInfo = &var_local_pCopyImageToMemoryInfo; - local_pCopyImageToMemoryInfo->initialize(pCopyImageToMemoryInfo); - - if (pCopyImageToMemoryInfo->srcImage) { - local_pCopyImageToMemoryInfo->srcImage = layer_data->Unwrap(pCopyImageToMemoryInfo->srcImage); - } - } - } - VkResult result = layer_data->device_dispatch_table.CopyImageToMemoryEXT( - device, (const VkCopyImageToMemoryInfoEXT*)local_pCopyImageToMemoryInfo); - - return result; -} - -VkResult DispatchCopyImageToImageEXT(VkDevice device, const VkCopyImageToImageInfoEXT* pCopyImageToImageInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CopyImageToImageEXT(device, pCopyImageToImageInfo); - vku::safe_VkCopyImageToImageInfoEXT var_local_pCopyImageToImageInfo; - vku::safe_VkCopyImageToImageInfoEXT* local_pCopyImageToImageInfo = nullptr; - { - if (pCopyImageToImageInfo) { - local_pCopyImageToImageInfo = &var_local_pCopyImageToImageInfo; - local_pCopyImageToImageInfo->initialize(pCopyImageToImageInfo); - - if (pCopyImageToImageInfo->srcImage) { - local_pCopyImageToImageInfo->srcImage = layer_data->Unwrap(pCopyImageToImageInfo->srcImage); - } - if (pCopyImageToImageInfo->dstImage) { - local_pCopyImageToImageInfo->dstImage = layer_data->Unwrap(pCopyImageToImageInfo->dstImage); - } - } - } - VkResult result = layer_data->device_dispatch_table.CopyImageToImageEXT( - device, (const VkCopyImageToImageInfoEXT*)local_pCopyImageToImageInfo); - - return result; -} - -VkResult DispatchTransitionImageLayoutEXT(VkDevice device, uint32_t transitionCount, - const VkHostImageLayoutTransitionInfoEXT* pTransitions) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.TransitionImageLayoutEXT(device, transitionCount, pTransitions); - small_vector var_local_pTransitions; - vku::safe_VkHostImageLayoutTransitionInfoEXT* local_pTransitions = nullptr; - { - if (pTransitions) { - var_local_pTransitions.resize(transitionCount); - local_pTransitions = var_local_pTransitions.data(); - for (uint32_t index0 = 0; index0 < transitionCount; ++index0) { - local_pTransitions[index0].initialize(&pTransitions[index0]); - - if (pTransitions[index0].image) { - local_pTransitions[index0].image = layer_data->Unwrap(pTransitions[index0].image); - } - } - } - } - VkResult result = layer_data->device_dispatch_table.TransitionImageLayoutEXT( - device, transitionCount, (const VkHostImageLayoutTransitionInfoEXT*)local_pTransitions); - - return result; -} - -void DispatchGetImageSubresourceLayout2EXT(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, - VkSubresourceLayout2KHR* pLayout) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetImageSubresourceLayout2EXT(device, image, pSubresource, pLayout); - { image = layer_data->Unwrap(image); } - layer_data->device_dispatch_table.GetImageSubresourceLayout2EXT(device, image, pSubresource, pLayout); -} - -VkResult DispatchReleaseSwapchainImagesEXT(VkDevice device, const VkReleaseSwapchainImagesInfoEXT* pReleaseInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.ReleaseSwapchainImagesEXT(device, pReleaseInfo); - vku::safe_VkReleaseSwapchainImagesInfoEXT var_local_pReleaseInfo; - vku::safe_VkReleaseSwapchainImagesInfoEXT* local_pReleaseInfo = nullptr; - { - if (pReleaseInfo) { - local_pReleaseInfo = &var_local_pReleaseInfo; - local_pReleaseInfo->initialize(pReleaseInfo); - - if (pReleaseInfo->swapchain) { - local_pReleaseInfo->swapchain = layer_data->Unwrap(pReleaseInfo->swapchain); - } - } - } - VkResult result = layer_data->device_dispatch_table.ReleaseSwapchainImagesEXT( - device, (const VkReleaseSwapchainImagesInfoEXT*)local_pReleaseInfo); - - return result; -} - -void DispatchGetGeneratedCommandsMemoryRequirementsNV(VkDevice device, const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo, - VkMemoryRequirements2* pMemoryRequirements) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetGeneratedCommandsMemoryRequirementsNV(device, pInfo, pMemoryRequirements); - vku::safe_VkGeneratedCommandsMemoryRequirementsInfoNV var_local_pInfo; - vku::safe_VkGeneratedCommandsMemoryRequirementsInfoNV* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->pipeline) { - local_pInfo->pipeline = layer_data->Unwrap(pInfo->pipeline); - } - if (pInfo->indirectCommandsLayout) { - local_pInfo->indirectCommandsLayout = layer_data->Unwrap(pInfo->indirectCommandsLayout); - } - } - } - layer_data->device_dispatch_table.GetGeneratedCommandsMemoryRequirementsNV( - device, (const VkGeneratedCommandsMemoryRequirementsInfoNV*)local_pInfo, pMemoryRequirements); -} - -void DispatchCmdPreprocessGeneratedCommandsNV(VkCommandBuffer commandBuffer, - const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdPreprocessGeneratedCommandsNV(commandBuffer, pGeneratedCommandsInfo); - vku::safe_VkGeneratedCommandsInfoNV var_local_pGeneratedCommandsInfo; - vku::safe_VkGeneratedCommandsInfoNV* local_pGeneratedCommandsInfo = nullptr; - { - if (pGeneratedCommandsInfo) { - local_pGeneratedCommandsInfo = &var_local_pGeneratedCommandsInfo; - local_pGeneratedCommandsInfo->initialize(pGeneratedCommandsInfo); - - if (pGeneratedCommandsInfo->pipeline) { - local_pGeneratedCommandsInfo->pipeline = layer_data->Unwrap(pGeneratedCommandsInfo->pipeline); - } - if (pGeneratedCommandsInfo->indirectCommandsLayout) { - local_pGeneratedCommandsInfo->indirectCommandsLayout = - layer_data->Unwrap(pGeneratedCommandsInfo->indirectCommandsLayout); - } - if (local_pGeneratedCommandsInfo->pStreams) { - for (uint32_t index1 = 0; index1 < local_pGeneratedCommandsInfo->streamCount; ++index1) { - if (pGeneratedCommandsInfo->pStreams[index1].buffer) { - local_pGeneratedCommandsInfo->pStreams[index1].buffer = - layer_data->Unwrap(pGeneratedCommandsInfo->pStreams[index1].buffer); - } - } - } - - if (pGeneratedCommandsInfo->preprocessBuffer) { - local_pGeneratedCommandsInfo->preprocessBuffer = layer_data->Unwrap(pGeneratedCommandsInfo->preprocessBuffer); - } - if (pGeneratedCommandsInfo->sequencesCountBuffer) { - local_pGeneratedCommandsInfo->sequencesCountBuffer = - layer_data->Unwrap(pGeneratedCommandsInfo->sequencesCountBuffer); - } - if (pGeneratedCommandsInfo->sequencesIndexBuffer) { - local_pGeneratedCommandsInfo->sequencesIndexBuffer = - layer_data->Unwrap(pGeneratedCommandsInfo->sequencesIndexBuffer); - } - } - } - layer_data->device_dispatch_table.CmdPreprocessGeneratedCommandsNV( - commandBuffer, (const VkGeneratedCommandsInfoNV*)local_pGeneratedCommandsInfo); -} - -void DispatchCmdExecuteGeneratedCommandsNV(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, - const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdExecuteGeneratedCommandsNV(commandBuffer, isPreprocessed, - pGeneratedCommandsInfo); - vku::safe_VkGeneratedCommandsInfoNV var_local_pGeneratedCommandsInfo; - vku::safe_VkGeneratedCommandsInfoNV* local_pGeneratedCommandsInfo = nullptr; - { - if (pGeneratedCommandsInfo) { - local_pGeneratedCommandsInfo = &var_local_pGeneratedCommandsInfo; - local_pGeneratedCommandsInfo->initialize(pGeneratedCommandsInfo); - - if (pGeneratedCommandsInfo->pipeline) { - local_pGeneratedCommandsInfo->pipeline = layer_data->Unwrap(pGeneratedCommandsInfo->pipeline); - } - if (pGeneratedCommandsInfo->indirectCommandsLayout) { - local_pGeneratedCommandsInfo->indirectCommandsLayout = - layer_data->Unwrap(pGeneratedCommandsInfo->indirectCommandsLayout); - } - if (local_pGeneratedCommandsInfo->pStreams) { - for (uint32_t index1 = 0; index1 < local_pGeneratedCommandsInfo->streamCount; ++index1) { - if (pGeneratedCommandsInfo->pStreams[index1].buffer) { - local_pGeneratedCommandsInfo->pStreams[index1].buffer = - layer_data->Unwrap(pGeneratedCommandsInfo->pStreams[index1].buffer); - } - } - } - - if (pGeneratedCommandsInfo->preprocessBuffer) { - local_pGeneratedCommandsInfo->preprocessBuffer = layer_data->Unwrap(pGeneratedCommandsInfo->preprocessBuffer); - } - if (pGeneratedCommandsInfo->sequencesCountBuffer) { - local_pGeneratedCommandsInfo->sequencesCountBuffer = - layer_data->Unwrap(pGeneratedCommandsInfo->sequencesCountBuffer); - } - if (pGeneratedCommandsInfo->sequencesIndexBuffer) { - local_pGeneratedCommandsInfo->sequencesIndexBuffer = - layer_data->Unwrap(pGeneratedCommandsInfo->sequencesIndexBuffer); - } - } - } - layer_data->device_dispatch_table.CmdExecuteGeneratedCommandsNV(commandBuffer, isPreprocessed, - (const VkGeneratedCommandsInfoNV*)local_pGeneratedCommandsInfo); -} - -void DispatchCmdBindPipelineShaderGroupNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline, - uint32_t groupIndex) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdBindPipelineShaderGroupNV(commandBuffer, pipelineBindPoint, pipeline, - groupIndex); - { pipeline = layer_data->Unwrap(pipeline); } - layer_data->device_dispatch_table.CmdBindPipelineShaderGroupNV(commandBuffer, pipelineBindPoint, pipeline, groupIndex); -} - -VkResult DispatchCreateIndirectCommandsLayoutNV(VkDevice device, const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkIndirectCommandsLayoutNV* pIndirectCommandsLayout) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CreateIndirectCommandsLayoutNV(device, pCreateInfo, pAllocator, - pIndirectCommandsLayout); - vku::safe_VkIndirectCommandsLayoutCreateInfoNV var_local_pCreateInfo; - vku::safe_VkIndirectCommandsLayoutCreateInfoNV* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - if (local_pCreateInfo->pTokens) { - for (uint32_t index1 = 0; index1 < local_pCreateInfo->tokenCount; ++index1) { - if (pCreateInfo->pTokens[index1].pushconstantPipelineLayout) { - local_pCreateInfo->pTokens[index1].pushconstantPipelineLayout = - layer_data->Unwrap(pCreateInfo->pTokens[index1].pushconstantPipelineLayout); - } - } - } - } - } - VkResult result = layer_data->device_dispatch_table.CreateIndirectCommandsLayoutNV( - device, (const VkIndirectCommandsLayoutCreateInfoNV*)local_pCreateInfo, pAllocator, pIndirectCommandsLayout); - if (VK_SUCCESS == result) { - *pIndirectCommandsLayout = layer_data->WrapNew(*pIndirectCommandsLayout); - } - return result; -} - -void DispatchDestroyIndirectCommandsLayoutNV(VkDevice device, VkIndirectCommandsLayoutNV indirectCommandsLayout, - const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.DestroyIndirectCommandsLayoutNV(device, indirectCommandsLayout, pAllocator); - - uint64_t indirectCommandsLayout_id = CastToUint64(indirectCommandsLayout); - auto iter = unique_id_mapping.pop(indirectCommandsLayout_id); - if (iter != unique_id_mapping.end()) { - indirectCommandsLayout = (VkIndirectCommandsLayoutNV)iter->second; - } else { - indirectCommandsLayout = (VkIndirectCommandsLayoutNV)0; - } - layer_data->device_dispatch_table.DestroyIndirectCommandsLayoutNV(device, indirectCommandsLayout, pAllocator); -} - -void DispatchCmdSetDepthBias2EXT(VkCommandBuffer commandBuffer, const VkDepthBiasInfoEXT* pDepthBiasInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetDepthBias2EXT(commandBuffer, pDepthBiasInfo); -} - -VkResult DispatchAcquireDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, VkDisplayKHR display) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - if (!wrap_handles) return layer_data->instance_dispatch_table.AcquireDrmDisplayEXT(physicalDevice, drmFd, display); - { display = layer_data->Unwrap(display); } - VkResult result = layer_data->instance_dispatch_table.AcquireDrmDisplayEXT(physicalDevice, drmFd, display); - - return result; -} - -VkResult DispatchGetDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, uint32_t connectorId, VkDisplayKHR* display) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - if (!wrap_handles) return layer_data->instance_dispatch_table.GetDrmDisplayEXT(physicalDevice, drmFd, connectorId, display); - - VkResult result = layer_data->instance_dispatch_table.GetDrmDisplayEXT(physicalDevice, drmFd, connectorId, display); - if (VK_SUCCESS == result) { - *display = layer_data->MaybeWrapDisplay(*display); - } - return result; -} - -VkResult DispatchCreatePrivateDataSlotEXT(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CreatePrivateDataSlotEXT(device, pCreateInfo, pAllocator, pPrivateDataSlot); - - VkResult result = layer_data->device_dispatch_table.CreatePrivateDataSlotEXT(device, pCreateInfo, pAllocator, pPrivateDataSlot); - if (VK_SUCCESS == result) { - *pPrivateDataSlot = layer_data->WrapNew(*pPrivateDataSlot); - } - return result; -} - -void DispatchDestroyPrivateDataSlotEXT(VkDevice device, VkPrivateDataSlot privateDataSlot, - const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyPrivateDataSlotEXT(device, privateDataSlot, pAllocator); - - uint64_t privateDataSlot_id = CastToUint64(privateDataSlot); - auto iter = unique_id_mapping.pop(privateDataSlot_id); - if (iter != unique_id_mapping.end()) { - privateDataSlot = (VkPrivateDataSlot)iter->second; - } else { - privateDataSlot = (VkPrivateDataSlot)0; - } - layer_data->device_dispatch_table.DestroyPrivateDataSlotEXT(device, privateDataSlot, pAllocator); -} - -VkResult DispatchSetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, - VkPrivateDataSlot privateDataSlot, uint64_t data) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.SetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, data); - { - if (NotDispatchableHandle(objectType)) { - objectHandle = layer_data->Unwrap(objectHandle); - } - privateDataSlot = layer_data->Unwrap(privateDataSlot); - } - VkResult result = layer_data->device_dispatch_table.SetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, data); - - return result; -} - -void DispatchGetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, - uint64_t* pData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, pData); - { - if (NotDispatchableHandle(objectType)) { - objectHandle = layer_data->Unwrap(objectHandle); - } - privateDataSlot = layer_data->Unwrap(privateDataSlot); - } - layer_data->device_dispatch_table.GetPrivateDataEXT(device, objectType, objectHandle, privateDataSlot, pData); -} - -VkResult DispatchCreateCudaModuleNV(VkDevice device, const VkCudaModuleCreateInfoNV* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkCudaModuleNV* pModule) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CreateCudaModuleNV(device, pCreateInfo, pAllocator, pModule); - - VkResult result = layer_data->device_dispatch_table.CreateCudaModuleNV(device, pCreateInfo, pAllocator, pModule); - if (VK_SUCCESS == result) { - *pModule = layer_data->WrapNew(*pModule); - } - return result; -} - -VkResult DispatchGetCudaModuleCacheNV(VkDevice device, VkCudaModuleNV module, size_t* pCacheSize, void* pCacheData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetCudaModuleCacheNV(device, module, pCacheSize, pCacheData); - { module = layer_data->Unwrap(module); } - VkResult result = layer_data->device_dispatch_table.GetCudaModuleCacheNV(device, module, pCacheSize, pCacheData); - - return result; -} - -VkResult DispatchCreateCudaFunctionNV(VkDevice device, const VkCudaFunctionCreateInfoNV* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkCudaFunctionNV* pFunction) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CreateCudaFunctionNV(device, pCreateInfo, pAllocator, pFunction); - vku::safe_VkCudaFunctionCreateInfoNV var_local_pCreateInfo; - vku::safe_VkCudaFunctionCreateInfoNV* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - - if (pCreateInfo->module) { - local_pCreateInfo->module = layer_data->Unwrap(pCreateInfo->module); - } - } - } - VkResult result = layer_data->device_dispatch_table.CreateCudaFunctionNV( - device, (const VkCudaFunctionCreateInfoNV*)local_pCreateInfo, pAllocator, pFunction); - if (VK_SUCCESS == result) { - *pFunction = layer_data->WrapNew(*pFunction); - } - return result; -} - -void DispatchDestroyCudaModuleNV(VkDevice device, VkCudaModuleNV module, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyCudaModuleNV(device, module, pAllocator); - - uint64_t module_id = CastToUint64(module); - auto iter = unique_id_mapping.pop(module_id); - if (iter != unique_id_mapping.end()) { - module = (VkCudaModuleNV)iter->second; - } else { - module = (VkCudaModuleNV)0; - } - layer_data->device_dispatch_table.DestroyCudaModuleNV(device, module, pAllocator); -} - -void DispatchDestroyCudaFunctionNV(VkDevice device, VkCudaFunctionNV function, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyCudaFunctionNV(device, function, pAllocator); - - uint64_t function_id = CastToUint64(function); - auto iter = unique_id_mapping.pop(function_id); - if (iter != unique_id_mapping.end()) { - function = (VkCudaFunctionNV)iter->second; - } else { - function = (VkCudaFunctionNV)0; - } - layer_data->device_dispatch_table.DestroyCudaFunctionNV(device, function, pAllocator); -} - -void DispatchCmdCudaLaunchKernelNV(VkCommandBuffer commandBuffer, const VkCudaLaunchInfoNV* pLaunchInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdCudaLaunchKernelNV(commandBuffer, pLaunchInfo); - vku::safe_VkCudaLaunchInfoNV var_local_pLaunchInfo; - vku::safe_VkCudaLaunchInfoNV* local_pLaunchInfo = nullptr; - { - if (pLaunchInfo) { - local_pLaunchInfo = &var_local_pLaunchInfo; - local_pLaunchInfo->initialize(pLaunchInfo); - - if (pLaunchInfo->function) { - local_pLaunchInfo->function = layer_data->Unwrap(pLaunchInfo->function); - } - } - } - layer_data->device_dispatch_table.CmdCudaLaunchKernelNV(commandBuffer, (const VkCudaLaunchInfoNV*)local_pLaunchInfo); -} - -void DispatchGetDescriptorSetLayoutSizeEXT(VkDevice device, VkDescriptorSetLayout layout, VkDeviceSize* pLayoutSizeInBytes) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetDescriptorSetLayoutSizeEXT(device, layout, pLayoutSizeInBytes); - { layout = layer_data->Unwrap(layout); } - layer_data->device_dispatch_table.GetDescriptorSetLayoutSizeEXT(device, layout, pLayoutSizeInBytes); -} - -void DispatchGetDescriptorSetLayoutBindingOffsetEXT(VkDevice device, VkDescriptorSetLayout layout, uint32_t binding, - VkDeviceSize* pOffset) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetDescriptorSetLayoutBindingOffsetEXT(device, layout, binding, pOffset); - { layout = layer_data->Unwrap(layout); } - layer_data->device_dispatch_table.GetDescriptorSetLayoutBindingOffsetEXT(device, layout, binding, pOffset); -} - -void DispatchCmdBindDescriptorBuffersEXT(VkCommandBuffer commandBuffer, uint32_t bufferCount, - const VkDescriptorBufferBindingInfoEXT* pBindingInfos) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdBindDescriptorBuffersEXT(commandBuffer, bufferCount, pBindingInfos); - small_vector var_local_pBindingInfos; - vku::safe_VkDescriptorBufferBindingInfoEXT* local_pBindingInfos = nullptr; - { - if (pBindingInfos) { - var_local_pBindingInfos.resize(bufferCount); - local_pBindingInfos = var_local_pBindingInfos.data(); - for (uint32_t index0 = 0; index0 < bufferCount; ++index0) { - local_pBindingInfos[index0].initialize(&pBindingInfos[index0]); - UnwrapPnextChainHandles(layer_data, local_pBindingInfos[index0].pNext); - } - } - } - layer_data->device_dispatch_table.CmdBindDescriptorBuffersEXT(commandBuffer, bufferCount, - (const VkDescriptorBufferBindingInfoEXT*)local_pBindingInfos); -} - -void DispatchCmdSetDescriptorBufferOffsetsEXT(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, - VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, - const uint32_t* pBufferIndices, const VkDeviceSize* pOffsets) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdSetDescriptorBufferOffsetsEXT(commandBuffer, pipelineBindPoint, layout, - firstSet, setCount, pBufferIndices, pOffsets); - { layout = layer_data->Unwrap(layout); } - layer_data->device_dispatch_table.CmdSetDescriptorBufferOffsetsEXT(commandBuffer, pipelineBindPoint, layout, firstSet, setCount, - pBufferIndices, pOffsets); -} - -void DispatchCmdBindDescriptorBufferEmbeddedSamplersEXT(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, - VkPipelineLayout layout, uint32_t set) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdBindDescriptorBufferEmbeddedSamplersEXT(commandBuffer, pipelineBindPoint, - layout, set); - { layout = layer_data->Unwrap(layout); } - layer_data->device_dispatch_table.CmdBindDescriptorBufferEmbeddedSamplersEXT(commandBuffer, pipelineBindPoint, layout, set); -} - -VkResult DispatchGetBufferOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkBufferCaptureDescriptorDataInfoEXT* pInfo, - void* pData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetBufferOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); - vku::safe_VkBufferCaptureDescriptorDataInfoEXT var_local_pInfo; - vku::safe_VkBufferCaptureDescriptorDataInfoEXT* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->buffer) { - local_pInfo->buffer = layer_data->Unwrap(pInfo->buffer); - } - } - } - VkResult result = layer_data->device_dispatch_table.GetBufferOpaqueCaptureDescriptorDataEXT( - device, (const VkBufferCaptureDescriptorDataInfoEXT*)local_pInfo, pData); - - return result; -} - -VkResult DispatchGetImageOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkImageCaptureDescriptorDataInfoEXT* pInfo, - void* pData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetImageOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); - vku::safe_VkImageCaptureDescriptorDataInfoEXT var_local_pInfo; - vku::safe_VkImageCaptureDescriptorDataInfoEXT* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->image) { - local_pInfo->image = layer_data->Unwrap(pInfo->image); - } - } - } - VkResult result = layer_data->device_dispatch_table.GetImageOpaqueCaptureDescriptorDataEXT( - device, (const VkImageCaptureDescriptorDataInfoEXT*)local_pInfo, pData); - - return result; -} - -VkResult DispatchGetImageViewOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkImageViewCaptureDescriptorDataInfoEXT* pInfo, - void* pData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetImageViewOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); - vku::safe_VkImageViewCaptureDescriptorDataInfoEXT var_local_pInfo; - vku::safe_VkImageViewCaptureDescriptorDataInfoEXT* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->imageView) { - local_pInfo->imageView = layer_data->Unwrap(pInfo->imageView); - } - } - } - VkResult result = layer_data->device_dispatch_table.GetImageViewOpaqueCaptureDescriptorDataEXT( - device, (const VkImageViewCaptureDescriptorDataInfoEXT*)local_pInfo, pData); - - return result; -} - -VkResult DispatchGetSamplerOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkSamplerCaptureDescriptorDataInfoEXT* pInfo, - void* pData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetSamplerOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); - vku::safe_VkSamplerCaptureDescriptorDataInfoEXT var_local_pInfo; - vku::safe_VkSamplerCaptureDescriptorDataInfoEXT* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->sampler) { - local_pInfo->sampler = layer_data->Unwrap(pInfo->sampler); - } - } - } - VkResult result = layer_data->device_dispatch_table.GetSamplerOpaqueCaptureDescriptorDataEXT( - device, (const VkSamplerCaptureDescriptorDataInfoEXT*)local_pInfo, pData); - - return result; -} - -VkResult DispatchGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( - VkDevice device, const VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfo, void* pData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetAccelerationStructureOpaqueCaptureDescriptorDataEXT(device, pInfo, pData); - vku::safe_VkAccelerationStructureCaptureDescriptorDataInfoEXT var_local_pInfo; - vku::safe_VkAccelerationStructureCaptureDescriptorDataInfoEXT* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->accelerationStructure) { - local_pInfo->accelerationStructure = layer_data->Unwrap(pInfo->accelerationStructure); - } - if (pInfo->accelerationStructureNV) { - local_pInfo->accelerationStructureNV = layer_data->Unwrap(pInfo->accelerationStructureNV); - } - } - } - VkResult result = layer_data->device_dispatch_table.GetAccelerationStructureOpaqueCaptureDescriptorDataEXT( - device, (const VkAccelerationStructureCaptureDescriptorDataInfoEXT*)local_pInfo, pData); - - return result; -} - -void DispatchCmdSetFragmentShadingRateEnumNV(VkCommandBuffer commandBuffer, VkFragmentShadingRateNV shadingRate, - const VkFragmentShadingRateCombinerOpKHR combinerOps[2]) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetFragmentShadingRateEnumNV(commandBuffer, shadingRate, combinerOps); -} - -VkResult DispatchGetDeviceFaultInfoEXT(VkDevice device, VkDeviceFaultCountsEXT* pFaultCounts, VkDeviceFaultInfoEXT* pFaultInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - VkResult result = layer_data->device_dispatch_table.GetDeviceFaultInfoEXT(device, pFaultCounts, pFaultInfo); - - return result; -} -#ifdef VK_USE_PLATFORM_WIN32_KHR - -VkResult DispatchAcquireWinrtDisplayNV(VkPhysicalDevice physicalDevice, VkDisplayKHR display) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - if (!wrap_handles) return layer_data->instance_dispatch_table.AcquireWinrtDisplayNV(physicalDevice, display); - { display = layer_data->Unwrap(display); } - VkResult result = layer_data->instance_dispatch_table.AcquireWinrtDisplayNV(physicalDevice, display); - - return result; -} - -VkResult DispatchGetWinrtDisplayNV(VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR* pDisplay) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - if (!wrap_handles) return layer_data->instance_dispatch_table.GetWinrtDisplayNV(physicalDevice, deviceRelativeId, pDisplay); - - VkResult result = layer_data->instance_dispatch_table.GetWinrtDisplayNV(physicalDevice, deviceRelativeId, pDisplay); - if (VK_SUCCESS == result) { - *pDisplay = layer_data->MaybeWrapDisplay(*pDisplay); - } - return result; -} -#endif // VK_USE_PLATFORM_WIN32_KHR -#ifdef VK_USE_PLATFORM_DIRECTFB_EXT - -VkResult DispatchCreateDirectFBSurfaceEXT(VkInstance instance, const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.CreateDirectFBSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); - - VkResult result = layer_data->instance_dispatch_table.CreateDirectFBSurfaceEXT(instance, pCreateInfo, pAllocator, pSurface); - if (VK_SUCCESS == result) { - *pSurface = layer_data->WrapNew(*pSurface); - } - return result; -} - -VkBool32 DispatchGetPhysicalDeviceDirectFBPresentationSupportEXT(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, - IDirectFB* dfb) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkBool32 result = - layer_data->instance_dispatch_table.GetPhysicalDeviceDirectFBPresentationSupportEXT(physicalDevice, queueFamilyIndex, dfb); - - return result; -} -#endif // VK_USE_PLATFORM_DIRECTFB_EXT - -void DispatchCmdSetVertexInputEXT(VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, - const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, - uint32_t vertexAttributeDescriptionCount, - const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetVertexInputEXT(commandBuffer, vertexBindingDescriptionCount, pVertexBindingDescriptions, - vertexAttributeDescriptionCount, pVertexAttributeDescriptions); -} -#ifdef VK_USE_PLATFORM_FUCHSIA - -VkResult DispatchGetMemoryZirconHandleFUCHSIA(VkDevice device, const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, - zx_handle_t* pZirconHandle) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetMemoryZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle); - vku::safe_VkMemoryGetZirconHandleInfoFUCHSIA var_local_pGetZirconHandleInfo; - vku::safe_VkMemoryGetZirconHandleInfoFUCHSIA* local_pGetZirconHandleInfo = nullptr; - { - if (pGetZirconHandleInfo) { - local_pGetZirconHandleInfo = &var_local_pGetZirconHandleInfo; - local_pGetZirconHandleInfo->initialize(pGetZirconHandleInfo); - - if (pGetZirconHandleInfo->memory) { - local_pGetZirconHandleInfo->memory = layer_data->Unwrap(pGetZirconHandleInfo->memory); - } - } - } - VkResult result = layer_data->device_dispatch_table.GetMemoryZirconHandleFUCHSIA( - device, (const VkMemoryGetZirconHandleInfoFUCHSIA*)local_pGetZirconHandleInfo, pZirconHandle); - - return result; -} - -VkResult DispatchGetMemoryZirconHandlePropertiesFUCHSIA(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, - zx_handle_t zirconHandle, - VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - VkResult result = layer_data->device_dispatch_table.GetMemoryZirconHandlePropertiesFUCHSIA(device, handleType, zirconHandle, - pMemoryZirconHandleProperties); - - return result; -} - -VkResult DispatchImportSemaphoreZirconHandleFUCHSIA( - VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.ImportSemaphoreZirconHandleFUCHSIA(device, pImportSemaphoreZirconHandleInfo); - vku::safe_VkImportSemaphoreZirconHandleInfoFUCHSIA var_local_pImportSemaphoreZirconHandleInfo; - vku::safe_VkImportSemaphoreZirconHandleInfoFUCHSIA* local_pImportSemaphoreZirconHandleInfo = nullptr; - { - if (pImportSemaphoreZirconHandleInfo) { - local_pImportSemaphoreZirconHandleInfo = &var_local_pImportSemaphoreZirconHandleInfo; - local_pImportSemaphoreZirconHandleInfo->initialize(pImportSemaphoreZirconHandleInfo); - - if (pImportSemaphoreZirconHandleInfo->semaphore) { - local_pImportSemaphoreZirconHandleInfo->semaphore = layer_data->Unwrap(pImportSemaphoreZirconHandleInfo->semaphore); - } - } - } - VkResult result = layer_data->device_dispatch_table.ImportSemaphoreZirconHandleFUCHSIA( - device, (const VkImportSemaphoreZirconHandleInfoFUCHSIA*)local_pImportSemaphoreZirconHandleInfo); - - return result; -} - -VkResult DispatchGetSemaphoreZirconHandleFUCHSIA(VkDevice device, const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, - zx_handle_t* pZirconHandle) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetSemaphoreZirconHandleFUCHSIA(device, pGetZirconHandleInfo, pZirconHandle); - vku::safe_VkSemaphoreGetZirconHandleInfoFUCHSIA var_local_pGetZirconHandleInfo; - vku::safe_VkSemaphoreGetZirconHandleInfoFUCHSIA* local_pGetZirconHandleInfo = nullptr; - { - if (pGetZirconHandleInfo) { - local_pGetZirconHandleInfo = &var_local_pGetZirconHandleInfo; - local_pGetZirconHandleInfo->initialize(pGetZirconHandleInfo); - - if (pGetZirconHandleInfo->semaphore) { - local_pGetZirconHandleInfo->semaphore = layer_data->Unwrap(pGetZirconHandleInfo->semaphore); - } - } - } - VkResult result = layer_data->device_dispatch_table.GetSemaphoreZirconHandleFUCHSIA( - device, (const VkSemaphoreGetZirconHandleInfoFUCHSIA*)local_pGetZirconHandleInfo, pZirconHandle); - - return result; -} - -VkResult DispatchCreateBufferCollectionFUCHSIA(VkDevice device, const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkBufferCollectionFUCHSIA* pCollection) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CreateBufferCollectionFUCHSIA(device, pCreateInfo, pAllocator, pCollection); - - VkResult result = layer_data->device_dispatch_table.CreateBufferCollectionFUCHSIA(device, pCreateInfo, pAllocator, pCollection); - if (VK_SUCCESS == result) { - *pCollection = layer_data->WrapNew(*pCollection); - } - return result; -} - -VkResult DispatchSetBufferCollectionImageConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, - const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.SetBufferCollectionImageConstraintsFUCHSIA(device, collection, - pImageConstraintsInfo); - { collection = layer_data->Unwrap(collection); } - VkResult result = - layer_data->device_dispatch_table.SetBufferCollectionImageConstraintsFUCHSIA(device, collection, pImageConstraintsInfo); - - return result; -} - -VkResult DispatchSetBufferCollectionBufferConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, - const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.SetBufferCollectionBufferConstraintsFUCHSIA(device, collection, - pBufferConstraintsInfo); - { collection = layer_data->Unwrap(collection); } - VkResult result = - layer_data->device_dispatch_table.SetBufferCollectionBufferConstraintsFUCHSIA(device, collection, pBufferConstraintsInfo); - - return result; -} - -void DispatchDestroyBufferCollectionFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, - const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyBufferCollectionFUCHSIA(device, collection, pAllocator); - - uint64_t collection_id = CastToUint64(collection); - auto iter = unique_id_mapping.pop(collection_id); - if (iter != unique_id_mapping.end()) { - collection = (VkBufferCollectionFUCHSIA)iter->second; - } else { - collection = (VkBufferCollectionFUCHSIA)0; - } - layer_data->device_dispatch_table.DestroyBufferCollectionFUCHSIA(device, collection, pAllocator); -} - -VkResult DispatchGetBufferCollectionPropertiesFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, - VkBufferCollectionPropertiesFUCHSIA* pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetBufferCollectionPropertiesFUCHSIA(device, collection, pProperties); - { collection = layer_data->Unwrap(collection); } - VkResult result = layer_data->device_dispatch_table.GetBufferCollectionPropertiesFUCHSIA(device, collection, pProperties); - - return result; -} -#endif // VK_USE_PLATFORM_FUCHSIA - -VkResult DispatchGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(VkDevice device, VkRenderPass renderpass, - VkExtent2D* pMaxWorkgroupSize) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(device, renderpass, - pMaxWorkgroupSize); - { renderpass = layer_data->Unwrap(renderpass); } - VkResult result = - layer_data->device_dispatch_table.GetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(device, renderpass, pMaxWorkgroupSize); - - return result; -} - -void DispatchCmdSubpassShadingHUAWEI(VkCommandBuffer commandBuffer) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSubpassShadingHUAWEI(commandBuffer); -} - -void DispatchCmdBindInvocationMaskHUAWEI(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdBindInvocationMaskHUAWEI(commandBuffer, imageView, imageLayout); - { imageView = layer_data->Unwrap(imageView); } - layer_data->device_dispatch_table.CmdBindInvocationMaskHUAWEI(commandBuffer, imageView, imageLayout); -} - -VkResult DispatchGetMemoryRemoteAddressNV(VkDevice device, const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo, - VkRemoteAddressNV* pAddress) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetMemoryRemoteAddressNV(device, pMemoryGetRemoteAddressInfo, pAddress); - vku::safe_VkMemoryGetRemoteAddressInfoNV var_local_pMemoryGetRemoteAddressInfo; - vku::safe_VkMemoryGetRemoteAddressInfoNV* local_pMemoryGetRemoteAddressInfo = nullptr; - { - if (pMemoryGetRemoteAddressInfo) { - local_pMemoryGetRemoteAddressInfo = &var_local_pMemoryGetRemoteAddressInfo; - local_pMemoryGetRemoteAddressInfo->initialize(pMemoryGetRemoteAddressInfo); - - if (pMemoryGetRemoteAddressInfo->memory) { - local_pMemoryGetRemoteAddressInfo->memory = layer_data->Unwrap(pMemoryGetRemoteAddressInfo->memory); - } - } - } - VkResult result = layer_data->device_dispatch_table.GetMemoryRemoteAddressNV( - device, (const VkMemoryGetRemoteAddressInfoNV*)local_pMemoryGetRemoteAddressInfo, pAddress); - - return result; -} - -VkResult DispatchGetPipelinePropertiesEXT(VkDevice device, const VkPipelineInfoEXT* pPipelineInfo, - VkBaseOutStructure* pPipelineProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - VkResult result = layer_data->device_dispatch_table.GetPipelinePropertiesEXT(device, pPipelineInfo, pPipelineProperties); - - return result; -} - -void DispatchCmdSetPatchControlPointsEXT(VkCommandBuffer commandBuffer, uint32_t patchControlPoints) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetPatchControlPointsEXT(commandBuffer, patchControlPoints); -} - -void DispatchCmdSetRasterizerDiscardEnableEXT(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetRasterizerDiscardEnableEXT(commandBuffer, rasterizerDiscardEnable); -} - -void DispatchCmdSetDepthBiasEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetDepthBiasEnableEXT(commandBuffer, depthBiasEnable); -} - -void DispatchCmdSetLogicOpEXT(VkCommandBuffer commandBuffer, VkLogicOp logicOp) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetLogicOpEXT(commandBuffer, logicOp); -} - -void DispatchCmdSetPrimitiveRestartEnableEXT(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetPrimitiveRestartEnableEXT(commandBuffer, primitiveRestartEnable); -} -#ifdef VK_USE_PLATFORM_SCREEN_QNX - -VkResult DispatchCreateScreenSurfaceQNX(VkInstance instance, const VkScreenSurfaceCreateInfoQNX* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - if (!wrap_handles) - return layer_data->instance_dispatch_table.CreateScreenSurfaceQNX(instance, pCreateInfo, pAllocator, pSurface); - - VkResult result = layer_data->instance_dispatch_table.CreateScreenSurfaceQNX(instance, pCreateInfo, pAllocator, pSurface); - if (VK_SUCCESS == result) { - *pSurface = layer_data->WrapNew(*pSurface); - } - return result; -} - -VkBool32 DispatchGetPhysicalDeviceScreenPresentationSupportQNX(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, - struct _screen_window* window) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkBool32 result = - layer_data->instance_dispatch_table.GetPhysicalDeviceScreenPresentationSupportQNX(physicalDevice, queueFamilyIndex, window); - - return result; -} -#endif // VK_USE_PLATFORM_SCREEN_QNX - -void DispatchCmdSetColorWriteEnableEXT(VkCommandBuffer commandBuffer, uint32_t attachmentCount, - const VkBool32* pColorWriteEnables) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetColorWriteEnableEXT(commandBuffer, attachmentCount, pColorWriteEnables); -} - -void DispatchCmdDrawMultiEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawInfoEXT* pVertexInfo, - uint32_t instanceCount, uint32_t firstInstance, uint32_t stride) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdDrawMultiEXT(commandBuffer, drawCount, pVertexInfo, instanceCount, firstInstance, stride); -} - -void DispatchCmdDrawMultiIndexedEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawIndexedInfoEXT* pIndexInfo, - uint32_t instanceCount, uint32_t firstInstance, uint32_t stride, const int32_t* pVertexOffset) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdDrawMultiIndexedEXT(commandBuffer, drawCount, pIndexInfo, instanceCount, firstInstance, - stride, pVertexOffset); -} - -VkResult DispatchCreateMicromapEXT(VkDevice device, const VkMicromapCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkMicromapEXT* pMicromap) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CreateMicromapEXT(device, pCreateInfo, pAllocator, pMicromap); - vku::safe_VkMicromapCreateInfoEXT var_local_pCreateInfo; - vku::safe_VkMicromapCreateInfoEXT* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - - if (pCreateInfo->buffer) { - local_pCreateInfo->buffer = layer_data->Unwrap(pCreateInfo->buffer); - } - } - } - VkResult result = layer_data->device_dispatch_table.CreateMicromapEXT(device, (const VkMicromapCreateInfoEXT*)local_pCreateInfo, - pAllocator, pMicromap); - if (VK_SUCCESS == result) { - *pMicromap = layer_data->WrapNew(*pMicromap); - } - return result; -} - -void DispatchDestroyMicromapEXT(VkDevice device, VkMicromapEXT micromap, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyMicromapEXT(device, micromap, pAllocator); - - uint64_t micromap_id = CastToUint64(micromap); - auto iter = unique_id_mapping.pop(micromap_id); - if (iter != unique_id_mapping.end()) { - micromap = (VkMicromapEXT)iter->second; - } else { - micromap = (VkMicromapEXT)0; - } - layer_data->device_dispatch_table.DestroyMicromapEXT(device, micromap, pAllocator); -} - -void DispatchCmdBuildMicromapsEXT(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdBuildMicromapsEXT(commandBuffer, infoCount, pInfos); - small_vector var_local_pInfos; - vku::safe_VkMicromapBuildInfoEXT* local_pInfos = nullptr; - { - if (pInfos) { - var_local_pInfos.resize(infoCount); - local_pInfos = var_local_pInfos.data(); - for (uint32_t index0 = 0; index0 < infoCount; ++index0) { - local_pInfos[index0].initialize(&pInfos[index0]); - - if (pInfos[index0].dstMicromap) { - local_pInfos[index0].dstMicromap = layer_data->Unwrap(pInfos[index0].dstMicromap); - } - } - } - } - layer_data->device_dispatch_table.CmdBuildMicromapsEXT(commandBuffer, infoCount, (const VkMicromapBuildInfoEXT*)local_pInfos); -} - -VkResult DispatchBuildMicromapsEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, - const VkMicromapBuildInfoEXT* pInfos) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.BuildMicromapsEXT(device, deferredOperation, infoCount, pInfos); - vku::safe_VkMicromapBuildInfoEXT* local_pInfos = nullptr; - { - deferredOperation = layer_data->Unwrap(deferredOperation); - if (pInfos) { - local_pInfos = new vku::safe_VkMicromapBuildInfoEXT[infoCount]; - for (uint32_t index0 = 0; index0 < infoCount; ++index0) { - local_pInfos[index0].initialize(&pInfos[index0]); - - if (pInfos[index0].dstMicromap) { - local_pInfos[index0].dstMicromap = layer_data->Unwrap(pInfos[index0].dstMicromap); - } - } - } - } - VkResult result = layer_data->device_dispatch_table.BuildMicromapsEXT(device, deferredOperation, infoCount, - (const VkMicromapBuildInfoEXT*)local_pInfos); - if (local_pInfos) { - // Fix check for deferred ray tracing pipeline creation - // https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5817 - const bool is_operation_deferred = (deferredOperation != VK_NULL_HANDLE) && (result == VK_OPERATION_DEFERRED_KHR); - if (is_operation_deferred) { - std::vector> cleanup{[local_pInfos]() { delete[] local_pInfos; }}; - layer_data->deferred_operation_post_completion.insert(deferredOperation, cleanup); - } else { - delete[] local_pInfos; - } - } - return result; -} - -VkResult DispatchCopyMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapInfoEXT* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CopyMicromapEXT(device, deferredOperation, pInfo); - vku::safe_VkCopyMicromapInfoEXT* local_pInfo = nullptr; - { - deferredOperation = layer_data->Unwrap(deferredOperation); - if (pInfo) { - local_pInfo = new vku::safe_VkCopyMicromapInfoEXT; - local_pInfo->initialize(pInfo); - - if (pInfo->src) { - local_pInfo->src = layer_data->Unwrap(pInfo->src); - } - if (pInfo->dst) { - local_pInfo->dst = layer_data->Unwrap(pInfo->dst); - } - } - } - VkResult result = - layer_data->device_dispatch_table.CopyMicromapEXT(device, deferredOperation, (const VkCopyMicromapInfoEXT*)local_pInfo); - if (local_pInfo) { - // Fix check for deferred ray tracing pipeline creation - // https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5817 - const bool is_operation_deferred = (deferredOperation != VK_NULL_HANDLE) && (result == VK_OPERATION_DEFERRED_KHR); - if (is_operation_deferred) { - std::vector> cleanup{[local_pInfo]() { delete local_pInfo; }}; - layer_data->deferred_operation_post_completion.insert(deferredOperation, cleanup); - } else { - delete local_pInfo; - } - } - return result; -} - -VkResult DispatchCopyMicromapToMemoryEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, - const VkCopyMicromapToMemoryInfoEXT* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CopyMicromapToMemoryEXT(device, deferredOperation, pInfo); - vku::safe_VkCopyMicromapToMemoryInfoEXT* local_pInfo = nullptr; - { - deferredOperation = layer_data->Unwrap(deferredOperation); - if (pInfo) { - local_pInfo = new vku::safe_VkCopyMicromapToMemoryInfoEXT; - local_pInfo->initialize(pInfo); - - if (pInfo->src) { - local_pInfo->src = layer_data->Unwrap(pInfo->src); - } - } - } - VkResult result = layer_data->device_dispatch_table.CopyMicromapToMemoryEXT(device, deferredOperation, - (const VkCopyMicromapToMemoryInfoEXT*)local_pInfo); - if (local_pInfo) { - // Fix check for deferred ray tracing pipeline creation - // https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5817 - const bool is_operation_deferred = (deferredOperation != VK_NULL_HANDLE) && (result == VK_OPERATION_DEFERRED_KHR); - if (is_operation_deferred) { - std::vector> cleanup{[local_pInfo]() { delete local_pInfo; }}; - layer_data->deferred_operation_post_completion.insert(deferredOperation, cleanup); - } else { - delete local_pInfo; - } - } - return result; -} - -VkResult DispatchCopyMemoryToMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, - const VkCopyMemoryToMicromapInfoEXT* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CopyMemoryToMicromapEXT(device, deferredOperation, pInfo); - vku::safe_VkCopyMemoryToMicromapInfoEXT* local_pInfo = nullptr; - { - deferredOperation = layer_data->Unwrap(deferredOperation); - if (pInfo) { - local_pInfo = new vku::safe_VkCopyMemoryToMicromapInfoEXT; - local_pInfo->initialize(pInfo); - - if (pInfo->dst) { - local_pInfo->dst = layer_data->Unwrap(pInfo->dst); - } - } - } - VkResult result = layer_data->device_dispatch_table.CopyMemoryToMicromapEXT(device, deferredOperation, - (const VkCopyMemoryToMicromapInfoEXT*)local_pInfo); - if (local_pInfo) { - // Fix check for deferred ray tracing pipeline creation - // https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5817 - const bool is_operation_deferred = (deferredOperation != VK_NULL_HANDLE) && (result == VK_OPERATION_DEFERRED_KHR); - if (is_operation_deferred) { - std::vector> cleanup{[local_pInfo]() { delete local_pInfo; }}; - layer_data->deferred_operation_post_completion.insert(deferredOperation, cleanup); - } else { - delete local_pInfo; - } - } - return result; -} - -VkResult DispatchWriteMicromapsPropertiesEXT(VkDevice device, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, - VkQueryType queryType, size_t dataSize, void* pData, size_t stride) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.WriteMicromapsPropertiesEXT(device, micromapCount, pMicromaps, queryType, dataSize, - pData, stride); - small_vector var_local_pMicromaps; - VkMicromapEXT* local_pMicromaps = nullptr; - { - if (pMicromaps) { - var_local_pMicromaps.resize(micromapCount); - local_pMicromaps = var_local_pMicromaps.data(); - for (uint32_t index0 = 0; index0 < micromapCount; ++index0) { - local_pMicromaps[index0] = layer_data->Unwrap(pMicromaps[index0]); - } - } - } - VkResult result = layer_data->device_dispatch_table.WriteMicromapsPropertiesEXT( - device, micromapCount, (const VkMicromapEXT*)local_pMicromaps, queryType, dataSize, pData, stride); - - return result; -} - -void DispatchCmdCopyMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdCopyMicromapEXT(commandBuffer, pInfo); - vku::safe_VkCopyMicromapInfoEXT var_local_pInfo; - vku::safe_VkCopyMicromapInfoEXT* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->src) { - local_pInfo->src = layer_data->Unwrap(pInfo->src); - } - if (pInfo->dst) { - local_pInfo->dst = layer_data->Unwrap(pInfo->dst); - } - } - } - layer_data->device_dispatch_table.CmdCopyMicromapEXT(commandBuffer, (const VkCopyMicromapInfoEXT*)local_pInfo); -} - -void DispatchCmdCopyMicromapToMemoryEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdCopyMicromapToMemoryEXT(commandBuffer, pInfo); - vku::safe_VkCopyMicromapToMemoryInfoEXT var_local_pInfo; - vku::safe_VkCopyMicromapToMemoryInfoEXT* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->src) { - local_pInfo->src = layer_data->Unwrap(pInfo->src); - } - } - } - layer_data->device_dispatch_table.CmdCopyMicromapToMemoryEXT(commandBuffer, (const VkCopyMicromapToMemoryInfoEXT*)local_pInfo); -} - -void DispatchCmdCopyMemoryToMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdCopyMemoryToMicromapEXT(commandBuffer, pInfo); - vku::safe_VkCopyMemoryToMicromapInfoEXT var_local_pInfo; - vku::safe_VkCopyMemoryToMicromapInfoEXT* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->dst) { - local_pInfo->dst = layer_data->Unwrap(pInfo->dst); - } - } - } - layer_data->device_dispatch_table.CmdCopyMemoryToMicromapEXT(commandBuffer, (const VkCopyMemoryToMicromapInfoEXT*)local_pInfo); -} - -void DispatchCmdWriteMicromapsPropertiesEXT(VkCommandBuffer commandBuffer, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, - VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdWriteMicromapsPropertiesEXT(commandBuffer, micromapCount, pMicromaps, queryType, - queryPool, firstQuery); - small_vector var_local_pMicromaps; - VkMicromapEXT* local_pMicromaps = nullptr; - { - if (pMicromaps) { - var_local_pMicromaps.resize(micromapCount); - local_pMicromaps = var_local_pMicromaps.data(); - for (uint32_t index0 = 0; index0 < micromapCount; ++index0) { - local_pMicromaps[index0] = layer_data->Unwrap(pMicromaps[index0]); - } - } - queryPool = layer_data->Unwrap(queryPool); - } - layer_data->device_dispatch_table.CmdWriteMicromapsPropertiesEXT( - commandBuffer, micromapCount, (const VkMicromapEXT*)local_pMicromaps, queryType, queryPool, firstQuery); -} - -void DispatchGetDeviceMicromapCompatibilityEXT(VkDevice device, const VkMicromapVersionInfoEXT* pVersionInfo, - VkAccelerationStructureCompatibilityKHR* pCompatibility) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - layer_data->device_dispatch_table.GetDeviceMicromapCompatibilityEXT(device, pVersionInfo, pCompatibility); -} - -void DispatchGetMicromapBuildSizesEXT(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, - const VkMicromapBuildInfoEXT* pBuildInfo, VkMicromapBuildSizesInfoEXT* pSizeInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetMicromapBuildSizesEXT(device, buildType, pBuildInfo, pSizeInfo); - vku::safe_VkMicromapBuildInfoEXT var_local_pBuildInfo; - vku::safe_VkMicromapBuildInfoEXT* local_pBuildInfo = nullptr; - { - if (pBuildInfo) { - local_pBuildInfo = &var_local_pBuildInfo; - local_pBuildInfo->initialize(pBuildInfo); - - if (pBuildInfo->dstMicromap) { - local_pBuildInfo->dstMicromap = layer_data->Unwrap(pBuildInfo->dstMicromap); - } - } - } - layer_data->device_dispatch_table.GetMicromapBuildSizesEXT(device, buildType, (const VkMicromapBuildInfoEXT*)local_pBuildInfo, - pSizeInfo); -} - -void DispatchCmdDrawClusterHUAWEI(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdDrawClusterHUAWEI(commandBuffer, groupCountX, groupCountY, groupCountZ); -} - -void DispatchCmdDrawClusterIndirectHUAWEI(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdDrawClusterIndirectHUAWEI(commandBuffer, buffer, offset); - { buffer = layer_data->Unwrap(buffer); } - layer_data->device_dispatch_table.CmdDrawClusterIndirectHUAWEI(commandBuffer, buffer, offset); -} - -void DispatchSetDeviceMemoryPriorityEXT(VkDevice device, VkDeviceMemory memory, float priority) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.SetDeviceMemoryPriorityEXT(device, memory, priority); - { memory = layer_data->Unwrap(memory); } - layer_data->device_dispatch_table.SetDeviceMemoryPriorityEXT(device, memory, priority); -} - -void DispatchGetDescriptorSetLayoutHostMappingInfoVALVE(VkDevice device, - const VkDescriptorSetBindingReferenceVALVE* pBindingReference, - VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetDescriptorSetLayoutHostMappingInfoVALVE(device, pBindingReference, - pHostMapping); - vku::safe_VkDescriptorSetBindingReferenceVALVE var_local_pBindingReference; - vku::safe_VkDescriptorSetBindingReferenceVALVE* local_pBindingReference = nullptr; - { - if (pBindingReference) { - local_pBindingReference = &var_local_pBindingReference; - local_pBindingReference->initialize(pBindingReference); - - if (pBindingReference->descriptorSetLayout) { - local_pBindingReference->descriptorSetLayout = layer_data->Unwrap(pBindingReference->descriptorSetLayout); - } - } - } - layer_data->device_dispatch_table.GetDescriptorSetLayoutHostMappingInfoVALVE( - device, (const VkDescriptorSetBindingReferenceVALVE*)local_pBindingReference, pHostMapping); -} - -void DispatchGetDescriptorSetHostMappingVALVE(VkDevice device, VkDescriptorSet descriptorSet, void** ppData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetDescriptorSetHostMappingVALVE(device, descriptorSet, ppData); - { descriptorSet = layer_data->Unwrap(descriptorSet); } - layer_data->device_dispatch_table.GetDescriptorSetHostMappingVALVE(device, descriptorSet, ppData); -} - -void DispatchCmdCopyMemoryIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, uint32_t copyCount, - uint32_t stride) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdCopyMemoryIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride); -} - -void DispatchCmdCopyMemoryToImageIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, uint32_t copyCount, - uint32_t stride, VkImage dstImage, VkImageLayout dstImageLayout, - const VkImageSubresourceLayers* pImageSubresources) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdCopyMemoryToImageIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride, - dstImage, dstImageLayout, pImageSubresources); - { dstImage = layer_data->Unwrap(dstImage); } - layer_data->device_dispatch_table.CmdCopyMemoryToImageIndirectNV(commandBuffer, copyBufferAddress, copyCount, stride, dstImage, - dstImageLayout, pImageSubresources); -} - -void DispatchCmdDecompressMemoryNV(VkCommandBuffer commandBuffer, uint32_t decompressRegionCount, - const VkDecompressMemoryRegionNV* pDecompressMemoryRegions) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdDecompressMemoryNV(commandBuffer, decompressRegionCount, pDecompressMemoryRegions); -} - -void DispatchCmdDecompressMemoryIndirectCountNV(VkCommandBuffer commandBuffer, VkDeviceAddress indirectCommandsAddress, - VkDeviceAddress indirectCommandsCountAddress, uint32_t stride) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdDecompressMemoryIndirectCountNV(commandBuffer, indirectCommandsAddress, - indirectCommandsCountAddress, stride); -} - -void DispatchGetPipelineIndirectMemoryRequirementsNV(VkDevice device, const VkComputePipelineCreateInfo* pCreateInfo, - VkMemoryRequirements2* pMemoryRequirements) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetPipelineIndirectMemoryRequirementsNV(device, pCreateInfo, pMemoryRequirements); - vku::safe_VkComputePipelineCreateInfo var_local_pCreateInfo; - vku::safe_VkComputePipelineCreateInfo* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - - if (pCreateInfo->stage.module) { - local_pCreateInfo->stage.module = layer_data->Unwrap(pCreateInfo->stage.module); - } - UnwrapPnextChainHandles(layer_data, local_pCreateInfo->stage.pNext); - - if (pCreateInfo->layout) { - local_pCreateInfo->layout = layer_data->Unwrap(pCreateInfo->layout); - } - if (pCreateInfo->basePipelineHandle) { - local_pCreateInfo->basePipelineHandle = layer_data->Unwrap(pCreateInfo->basePipelineHandle); - } - UnwrapPnextChainHandles(layer_data, local_pCreateInfo->pNext); - } - } - layer_data->device_dispatch_table.GetPipelineIndirectMemoryRequirementsNV( - device, (const VkComputePipelineCreateInfo*)local_pCreateInfo, pMemoryRequirements); -} - -void DispatchCmdUpdatePipelineIndirectBufferNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, - VkPipeline pipeline) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdUpdatePipelineIndirectBufferNV(commandBuffer, pipelineBindPoint, pipeline); - { pipeline = layer_data->Unwrap(pipeline); } - layer_data->device_dispatch_table.CmdUpdatePipelineIndirectBufferNV(commandBuffer, pipelineBindPoint, pipeline); -} - -VkDeviceAddress DispatchGetPipelineIndirectDeviceAddressNV(VkDevice device, const VkPipelineIndirectDeviceAddressInfoNV* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetPipelineIndirectDeviceAddressNV(device, pInfo); - vku::safe_VkPipelineIndirectDeviceAddressInfoNV var_local_pInfo; - vku::safe_VkPipelineIndirectDeviceAddressInfoNV* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->pipeline) { - local_pInfo->pipeline = layer_data->Unwrap(pInfo->pipeline); - } - } - } - VkDeviceAddress result = layer_data->device_dispatch_table.GetPipelineIndirectDeviceAddressNV( - device, (const VkPipelineIndirectDeviceAddressInfoNV*)local_pInfo); - - return result; -} - -void DispatchCmdSetDepthClampEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClampEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetDepthClampEnableEXT(commandBuffer, depthClampEnable); -} - -void DispatchCmdSetPolygonModeEXT(VkCommandBuffer commandBuffer, VkPolygonMode polygonMode) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetPolygonModeEXT(commandBuffer, polygonMode); -} - -void DispatchCmdSetRasterizationSamplesEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits rasterizationSamples) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetRasterizationSamplesEXT(commandBuffer, rasterizationSamples); -} - -void DispatchCmdSetSampleMaskEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits samples, const VkSampleMask* pSampleMask) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetSampleMaskEXT(commandBuffer, samples, pSampleMask); -} - -void DispatchCmdSetAlphaToCoverageEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToCoverageEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetAlphaToCoverageEnableEXT(commandBuffer, alphaToCoverageEnable); -} - -void DispatchCmdSetAlphaToOneEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToOneEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetAlphaToOneEnableEXT(commandBuffer, alphaToOneEnable); -} - -void DispatchCmdSetLogicOpEnableEXT(VkCommandBuffer commandBuffer, VkBool32 logicOpEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetLogicOpEnableEXT(commandBuffer, logicOpEnable); -} - -void DispatchCmdSetColorBlendEnableEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, - const VkBool32* pColorBlendEnables) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetColorBlendEnableEXT(commandBuffer, firstAttachment, attachmentCount, - pColorBlendEnables); -} - -void DispatchCmdSetColorBlendEquationEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, - const VkColorBlendEquationEXT* pColorBlendEquations) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetColorBlendEquationEXT(commandBuffer, firstAttachment, attachmentCount, - pColorBlendEquations); -} - -void DispatchCmdSetColorWriteMaskEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, - const VkColorComponentFlags* pColorWriteMasks) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetColorWriteMaskEXT(commandBuffer, firstAttachment, attachmentCount, pColorWriteMasks); -} - -void DispatchCmdSetTessellationDomainOriginEXT(VkCommandBuffer commandBuffer, VkTessellationDomainOrigin domainOrigin) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetTessellationDomainOriginEXT(commandBuffer, domainOrigin); -} - -void DispatchCmdSetRasterizationStreamEXT(VkCommandBuffer commandBuffer, uint32_t rasterizationStream) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetRasterizationStreamEXT(commandBuffer, rasterizationStream); -} - -void DispatchCmdSetConservativeRasterizationModeEXT(VkCommandBuffer commandBuffer, - VkConservativeRasterizationModeEXT conservativeRasterizationMode) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetConservativeRasterizationModeEXT(commandBuffer, conservativeRasterizationMode); -} - -void DispatchCmdSetExtraPrimitiveOverestimationSizeEXT(VkCommandBuffer commandBuffer, float extraPrimitiveOverestimationSize) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetExtraPrimitiveOverestimationSizeEXT(commandBuffer, extraPrimitiveOverestimationSize); -} - -void DispatchCmdSetDepthClipEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClipEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetDepthClipEnableEXT(commandBuffer, depthClipEnable); -} - -void DispatchCmdSetSampleLocationsEnableEXT(VkCommandBuffer commandBuffer, VkBool32 sampleLocationsEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetSampleLocationsEnableEXT(commandBuffer, sampleLocationsEnable); -} - -void DispatchCmdSetColorBlendAdvancedEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, - const VkColorBlendAdvancedEXT* pColorBlendAdvanced) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetColorBlendAdvancedEXT(commandBuffer, firstAttachment, attachmentCount, - pColorBlendAdvanced); -} - -void DispatchCmdSetProvokingVertexModeEXT(VkCommandBuffer commandBuffer, VkProvokingVertexModeEXT provokingVertexMode) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetProvokingVertexModeEXT(commandBuffer, provokingVertexMode); -} - -void DispatchCmdSetLineRasterizationModeEXT(VkCommandBuffer commandBuffer, VkLineRasterizationModeEXT lineRasterizationMode) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetLineRasterizationModeEXT(commandBuffer, lineRasterizationMode); -} - -void DispatchCmdSetLineStippleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stippledLineEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetLineStippleEnableEXT(commandBuffer, stippledLineEnable); -} - -void DispatchCmdSetDepthClipNegativeOneToOneEXT(VkCommandBuffer commandBuffer, VkBool32 negativeOneToOne) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetDepthClipNegativeOneToOneEXT(commandBuffer, negativeOneToOne); -} - -void DispatchCmdSetViewportWScalingEnableNV(VkCommandBuffer commandBuffer, VkBool32 viewportWScalingEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetViewportWScalingEnableNV(commandBuffer, viewportWScalingEnable); -} - -void DispatchCmdSetViewportSwizzleNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, - const VkViewportSwizzleNV* pViewportSwizzles) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetViewportSwizzleNV(commandBuffer, firstViewport, viewportCount, pViewportSwizzles); -} - -void DispatchCmdSetCoverageToColorEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageToColorEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetCoverageToColorEnableNV(commandBuffer, coverageToColorEnable); -} - -void DispatchCmdSetCoverageToColorLocationNV(VkCommandBuffer commandBuffer, uint32_t coverageToColorLocation) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetCoverageToColorLocationNV(commandBuffer, coverageToColorLocation); -} - -void DispatchCmdSetCoverageModulationModeNV(VkCommandBuffer commandBuffer, VkCoverageModulationModeNV coverageModulationMode) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetCoverageModulationModeNV(commandBuffer, coverageModulationMode); -} - -void DispatchCmdSetCoverageModulationTableEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageModulationTableEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetCoverageModulationTableEnableNV(commandBuffer, coverageModulationTableEnable); -} - -void DispatchCmdSetCoverageModulationTableNV(VkCommandBuffer commandBuffer, uint32_t coverageModulationTableCount, - const float* pCoverageModulationTable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetCoverageModulationTableNV(commandBuffer, coverageModulationTableCount, - pCoverageModulationTable); -} - -void DispatchCmdSetShadingRateImageEnableNV(VkCommandBuffer commandBuffer, VkBool32 shadingRateImageEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetShadingRateImageEnableNV(commandBuffer, shadingRateImageEnable); -} - -void DispatchCmdSetRepresentativeFragmentTestEnableNV(VkCommandBuffer commandBuffer, VkBool32 representativeFragmentTestEnable) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetRepresentativeFragmentTestEnableNV(commandBuffer, representativeFragmentTestEnable); -} - -void DispatchCmdSetCoverageReductionModeNV(VkCommandBuffer commandBuffer, VkCoverageReductionModeNV coverageReductionMode) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetCoverageReductionModeNV(commandBuffer, coverageReductionMode); -} - -void DispatchGetShaderModuleIdentifierEXT(VkDevice device, VkShaderModule shaderModule, VkShaderModuleIdentifierEXT* pIdentifier) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetShaderModuleIdentifierEXT(device, shaderModule, pIdentifier); - { shaderModule = layer_data->Unwrap(shaderModule); } - layer_data->device_dispatch_table.GetShaderModuleIdentifierEXT(device, shaderModule, pIdentifier); -} - -void DispatchGetShaderModuleCreateInfoIdentifierEXT(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, - VkShaderModuleIdentifierEXT* pIdentifier) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetShaderModuleCreateInfoIdentifierEXT(device, pCreateInfo, pIdentifier); - vku::safe_VkShaderModuleCreateInfo var_local_pCreateInfo; - vku::safe_VkShaderModuleCreateInfo* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - UnwrapPnextChainHandles(layer_data, local_pCreateInfo->pNext); - } - } - layer_data->device_dispatch_table.GetShaderModuleCreateInfoIdentifierEXT( - device, (const VkShaderModuleCreateInfo*)local_pCreateInfo, pIdentifier); -} - -VkResult DispatchGetPhysicalDeviceOpticalFlowImageFormatsNV(VkPhysicalDevice physicalDevice, - const VkOpticalFlowImageFormatInfoNV* pOpticalFlowImageFormatInfo, - uint32_t* pFormatCount, - VkOpticalFlowImageFormatPropertiesNV* pImageFormatProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkResult result = layer_data->instance_dispatch_table.GetPhysicalDeviceOpticalFlowImageFormatsNV( - physicalDevice, pOpticalFlowImageFormatInfo, pFormatCount, pImageFormatProperties); - - return result; -} - -VkResult DispatchCreateOpticalFlowSessionNV(VkDevice device, const VkOpticalFlowSessionCreateInfoNV* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkOpticalFlowSessionNV* pSession) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CreateOpticalFlowSessionNV(device, pCreateInfo, pAllocator, pSession); - - VkResult result = layer_data->device_dispatch_table.CreateOpticalFlowSessionNV(device, pCreateInfo, pAllocator, pSession); - if (VK_SUCCESS == result) { - *pSession = layer_data->WrapNew(*pSession); - } - return result; -} - -void DispatchDestroyOpticalFlowSessionNV(VkDevice device, VkOpticalFlowSessionNV session, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyOpticalFlowSessionNV(device, session, pAllocator); - - uint64_t session_id = CastToUint64(session); - auto iter = unique_id_mapping.pop(session_id); - if (iter != unique_id_mapping.end()) { - session = (VkOpticalFlowSessionNV)iter->second; - } else { - session = (VkOpticalFlowSessionNV)0; - } - layer_data->device_dispatch_table.DestroyOpticalFlowSessionNV(device, session, pAllocator); -} - -VkResult DispatchBindOpticalFlowSessionImageNV(VkDevice device, VkOpticalFlowSessionNV session, - VkOpticalFlowSessionBindingPointNV bindingPoint, VkImageView view, - VkImageLayout layout) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.BindOpticalFlowSessionImageNV(device, session, bindingPoint, view, layout); - { - session = layer_data->Unwrap(session); - view = layer_data->Unwrap(view); - } - VkResult result = layer_data->device_dispatch_table.BindOpticalFlowSessionImageNV(device, session, bindingPoint, view, layout); - - return result; -} - -void DispatchCmdOpticalFlowExecuteNV(VkCommandBuffer commandBuffer, VkOpticalFlowSessionNV session, - const VkOpticalFlowExecuteInfoNV* pExecuteInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdOpticalFlowExecuteNV(commandBuffer, session, pExecuteInfo); - { session = layer_data->Unwrap(session); } - layer_data->device_dispatch_table.CmdOpticalFlowExecuteNV(commandBuffer, session, pExecuteInfo); -} - -void DispatchAntiLagUpdateAMD(VkDevice device, const VkAntiLagDataAMD* pData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - layer_data->device_dispatch_table.AntiLagUpdateAMD(device, pData); -} - -VkResult DispatchCreateShadersEXT(VkDevice device, uint32_t createInfoCount, const VkShaderCreateInfoEXT* pCreateInfos, - const VkAllocationCallbacks* pAllocator, VkShaderEXT* pShaders) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CreateShadersEXT(device, createInfoCount, pCreateInfos, pAllocator, pShaders); - small_vector var_local_pCreateInfos; - vku::safe_VkShaderCreateInfoEXT* local_pCreateInfos = nullptr; - { - if (pCreateInfos) { - var_local_pCreateInfos.resize(createInfoCount); - local_pCreateInfos = var_local_pCreateInfos.data(); - for (uint32_t index0 = 0; index0 < createInfoCount; ++index0) { - local_pCreateInfos[index0].initialize(&pCreateInfos[index0]); - if (local_pCreateInfos[index0].pSetLayouts) { - for (uint32_t index1 = 0; index1 < local_pCreateInfos[index0].setLayoutCount; ++index1) { - local_pCreateInfos[index0].pSetLayouts[index1] = - layer_data->Unwrap(local_pCreateInfos[index0].pSetLayouts[index1]); - } - } - } - } - } - VkResult result = layer_data->device_dispatch_table.CreateShadersEXT( - device, createInfoCount, (const VkShaderCreateInfoEXT*)local_pCreateInfos, pAllocator, pShaders); - if (VK_SUCCESS == result) { - for (uint32_t index0 = 0; index0 < createInfoCount; index0++) { - pShaders[index0] = layer_data->WrapNew(pShaders[index0]); - } - } - return result; -} - -void DispatchDestroyShaderEXT(VkDevice device, VkShaderEXT shader, const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.DestroyShaderEXT(device, shader, pAllocator); - - uint64_t shader_id = CastToUint64(shader); - auto iter = unique_id_mapping.pop(shader_id); - if (iter != unique_id_mapping.end()) { - shader = (VkShaderEXT)iter->second; - } else { - shader = (VkShaderEXT)0; - } - layer_data->device_dispatch_table.DestroyShaderEXT(device, shader, pAllocator); -} - -VkResult DispatchGetShaderBinaryDataEXT(VkDevice device, VkShaderEXT shader, size_t* pDataSize, void* pData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetShaderBinaryDataEXT(device, shader, pDataSize, pData); - { shader = layer_data->Unwrap(shader); } - VkResult result = layer_data->device_dispatch_table.GetShaderBinaryDataEXT(device, shader, pDataSize, pData); - - return result; -} - -void DispatchCmdBindShadersEXT(VkCommandBuffer commandBuffer, uint32_t stageCount, const VkShaderStageFlagBits* pStages, - const VkShaderEXT* pShaders) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdBindShadersEXT(commandBuffer, stageCount, pStages, pShaders); - small_vector var_local_pShaders; - VkShaderEXT* local_pShaders = nullptr; - { - if (pShaders) { - var_local_pShaders.resize(stageCount); - local_pShaders = var_local_pShaders.data(); - for (uint32_t index0 = 0; index0 < stageCount; ++index0) { - local_pShaders[index0] = layer_data->Unwrap(pShaders[index0]); - } - } - } - layer_data->device_dispatch_table.CmdBindShadersEXT(commandBuffer, stageCount, pStages, (const VkShaderEXT*)local_pShaders); -} - -void DispatchCmdSetDepthClampRangeEXT(VkCommandBuffer commandBuffer, VkDepthClampModeEXT depthClampMode, - const VkDepthClampRangeEXT* pDepthClampRange) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetDepthClampRangeEXT(commandBuffer, depthClampMode, pDepthClampRange); -} - -VkResult DispatchGetFramebufferTilePropertiesQCOM(VkDevice device, VkFramebuffer framebuffer, uint32_t* pPropertiesCount, - VkTilePropertiesQCOM* pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetFramebufferTilePropertiesQCOM(device, framebuffer, pPropertiesCount, - pProperties); - { framebuffer = layer_data->Unwrap(framebuffer); } - VkResult result = - layer_data->device_dispatch_table.GetFramebufferTilePropertiesQCOM(device, framebuffer, pPropertiesCount, pProperties); - - return result; -} - -VkResult DispatchGetDynamicRenderingTilePropertiesQCOM(VkDevice device, const VkRenderingInfo* pRenderingInfo, - VkTilePropertiesQCOM* pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetDynamicRenderingTilePropertiesQCOM(device, pRenderingInfo, pProperties); - vku::safe_VkRenderingInfo var_local_pRenderingInfo; - vku::safe_VkRenderingInfo* local_pRenderingInfo = nullptr; - { - if (pRenderingInfo) { - local_pRenderingInfo = &var_local_pRenderingInfo; - local_pRenderingInfo->initialize(pRenderingInfo); - if (local_pRenderingInfo->pColorAttachments) { - for (uint32_t index1 = 0; index1 < local_pRenderingInfo->colorAttachmentCount; ++index1) { - if (pRenderingInfo->pColorAttachments[index1].imageView) { - local_pRenderingInfo->pColorAttachments[index1].imageView = - layer_data->Unwrap(pRenderingInfo->pColorAttachments[index1].imageView); - } - if (pRenderingInfo->pColorAttachments[index1].resolveImageView) { - local_pRenderingInfo->pColorAttachments[index1].resolveImageView = - layer_data->Unwrap(pRenderingInfo->pColorAttachments[index1].resolveImageView); - } - } - } - if (local_pRenderingInfo->pDepthAttachment) { - if (pRenderingInfo->pDepthAttachment->imageView) { - local_pRenderingInfo->pDepthAttachment->imageView = - layer_data->Unwrap(pRenderingInfo->pDepthAttachment->imageView); - } - if (pRenderingInfo->pDepthAttachment->resolveImageView) { - local_pRenderingInfo->pDepthAttachment->resolveImageView = - layer_data->Unwrap(pRenderingInfo->pDepthAttachment->resolveImageView); - } - } - if (local_pRenderingInfo->pStencilAttachment) { - if (pRenderingInfo->pStencilAttachment->imageView) { - local_pRenderingInfo->pStencilAttachment->imageView = - layer_data->Unwrap(pRenderingInfo->pStencilAttachment->imageView); - } - if (pRenderingInfo->pStencilAttachment->resolveImageView) { - local_pRenderingInfo->pStencilAttachment->resolveImageView = - layer_data->Unwrap(pRenderingInfo->pStencilAttachment->resolveImageView); - } - } - UnwrapPnextChainHandles(layer_data, local_pRenderingInfo->pNext); - } - } - VkResult result = layer_data->device_dispatch_table.GetDynamicRenderingTilePropertiesQCOM( - device, (const VkRenderingInfo*)local_pRenderingInfo, pProperties); - - return result; -} - -VkResult DispatchSetLatencySleepModeNV(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepModeInfoNV* pSleepModeInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.SetLatencySleepModeNV(device, swapchain, pSleepModeInfo); - { swapchain = layer_data->Unwrap(swapchain); } - VkResult result = layer_data->device_dispatch_table.SetLatencySleepModeNV(device, swapchain, pSleepModeInfo); - - return result; -} - -VkResult DispatchLatencySleepNV(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepInfoNV* pSleepInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.LatencySleepNV(device, swapchain, pSleepInfo); - vku::safe_VkLatencySleepInfoNV var_local_pSleepInfo; - vku::safe_VkLatencySleepInfoNV* local_pSleepInfo = nullptr; - { - swapchain = layer_data->Unwrap(swapchain); - if (pSleepInfo) { - local_pSleepInfo = &var_local_pSleepInfo; - local_pSleepInfo->initialize(pSleepInfo); - - if (pSleepInfo->signalSemaphore) { - local_pSleepInfo->signalSemaphore = layer_data->Unwrap(pSleepInfo->signalSemaphore); - } - } - } - VkResult result = - layer_data->device_dispatch_table.LatencySleepNV(device, swapchain, (const VkLatencySleepInfoNV*)local_pSleepInfo); - - return result; -} - -void DispatchSetLatencyMarkerNV(VkDevice device, VkSwapchainKHR swapchain, const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.SetLatencyMarkerNV(device, swapchain, pLatencyMarkerInfo); - { swapchain = layer_data->Unwrap(swapchain); } - layer_data->device_dispatch_table.SetLatencyMarkerNV(device, swapchain, pLatencyMarkerInfo); -} - -void DispatchGetLatencyTimingsNV(VkDevice device, VkSwapchainKHR swapchain, VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetLatencyTimingsNV(device, swapchain, pLatencyMarkerInfo); - { swapchain = layer_data->Unwrap(swapchain); } - layer_data->device_dispatch_table.GetLatencyTimingsNV(device, swapchain, pLatencyMarkerInfo); -} - -void DispatchQueueNotifyOutOfBandNV(VkQueue queue, const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); - - layer_data->device_dispatch_table.QueueNotifyOutOfBandNV(queue, pQueueTypeInfo); -} - -void DispatchCmdSetAttachmentFeedbackLoopEnableEXT(VkCommandBuffer commandBuffer, VkImageAspectFlags aspectMask) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetAttachmentFeedbackLoopEnableEXT(commandBuffer, aspectMask); -} -#ifdef VK_USE_PLATFORM_SCREEN_QNX - -VkResult DispatchGetScreenBufferPropertiesQNX(VkDevice device, const struct _screen_buffer* buffer, - VkScreenBufferPropertiesQNX* pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - VkResult result = layer_data->device_dispatch_table.GetScreenBufferPropertiesQNX(device, buffer, pProperties); - - return result; -} -#endif // VK_USE_PLATFORM_SCREEN_QNX - -void DispatchGetGeneratedCommandsMemoryRequirementsEXT(VkDevice device, const VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfo, - VkMemoryRequirements2* pMemoryRequirements) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetGeneratedCommandsMemoryRequirementsEXT(device, pInfo, pMemoryRequirements); - vku::safe_VkGeneratedCommandsMemoryRequirementsInfoEXT var_local_pInfo; - vku::safe_VkGeneratedCommandsMemoryRequirementsInfoEXT* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->indirectExecutionSet) { - local_pInfo->indirectExecutionSet = layer_data->Unwrap(pInfo->indirectExecutionSet); - } - if (pInfo->indirectCommandsLayout) { - local_pInfo->indirectCommandsLayout = layer_data->Unwrap(pInfo->indirectCommandsLayout); - } - UnwrapPnextChainHandles(layer_data, local_pInfo->pNext); - } - } - layer_data->device_dispatch_table.GetGeneratedCommandsMemoryRequirementsEXT( - device, (const VkGeneratedCommandsMemoryRequirementsInfoEXT*)local_pInfo, pMemoryRequirements); -} - -void DispatchCmdPreprocessGeneratedCommandsEXT(VkCommandBuffer commandBuffer, - const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, - VkCommandBuffer stateCommandBuffer) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdPreprocessGeneratedCommandsEXT(commandBuffer, pGeneratedCommandsInfo, - stateCommandBuffer); - vku::safe_VkGeneratedCommandsInfoEXT var_local_pGeneratedCommandsInfo; - vku::safe_VkGeneratedCommandsInfoEXT* local_pGeneratedCommandsInfo = nullptr; - { - if (pGeneratedCommandsInfo) { - local_pGeneratedCommandsInfo = &var_local_pGeneratedCommandsInfo; - local_pGeneratedCommandsInfo->initialize(pGeneratedCommandsInfo); - - if (pGeneratedCommandsInfo->indirectExecutionSet) { - local_pGeneratedCommandsInfo->indirectExecutionSet = - layer_data->Unwrap(pGeneratedCommandsInfo->indirectExecutionSet); - } - if (pGeneratedCommandsInfo->indirectCommandsLayout) { - local_pGeneratedCommandsInfo->indirectCommandsLayout = - layer_data->Unwrap(pGeneratedCommandsInfo->indirectCommandsLayout); - } - UnwrapPnextChainHandles(layer_data, local_pGeneratedCommandsInfo->pNext); - } - } - layer_data->device_dispatch_table.CmdPreprocessGeneratedCommandsEXT( - commandBuffer, (const VkGeneratedCommandsInfoEXT*)local_pGeneratedCommandsInfo, stateCommandBuffer); -} - -void DispatchCmdExecuteGeneratedCommandsEXT(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, - const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdExecuteGeneratedCommandsEXT(commandBuffer, isPreprocessed, - pGeneratedCommandsInfo); - vku::safe_VkGeneratedCommandsInfoEXT var_local_pGeneratedCommandsInfo; - vku::safe_VkGeneratedCommandsInfoEXT* local_pGeneratedCommandsInfo = nullptr; - { - if (pGeneratedCommandsInfo) { - local_pGeneratedCommandsInfo = &var_local_pGeneratedCommandsInfo; - local_pGeneratedCommandsInfo->initialize(pGeneratedCommandsInfo); - - if (pGeneratedCommandsInfo->indirectExecutionSet) { - local_pGeneratedCommandsInfo->indirectExecutionSet = - layer_data->Unwrap(pGeneratedCommandsInfo->indirectExecutionSet); - } - if (pGeneratedCommandsInfo->indirectCommandsLayout) { - local_pGeneratedCommandsInfo->indirectCommandsLayout = - layer_data->Unwrap(pGeneratedCommandsInfo->indirectCommandsLayout); - } - UnwrapPnextChainHandles(layer_data, local_pGeneratedCommandsInfo->pNext); - } - } - layer_data->device_dispatch_table.CmdExecuteGeneratedCommandsEXT( - commandBuffer, isPreprocessed, (const VkGeneratedCommandsInfoEXT*)local_pGeneratedCommandsInfo); -} - -VkResult DispatchCreateIndirectCommandsLayoutEXT(VkDevice device, const VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkIndirectCommandsLayoutEXT* pIndirectCommandsLayout) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CreateIndirectCommandsLayoutEXT(device, pCreateInfo, pAllocator, - pIndirectCommandsLayout); - vku::safe_VkIndirectCommandsLayoutCreateInfoEXT var_local_pCreateInfo; - vku::safe_VkIndirectCommandsLayoutCreateInfoEXT* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - - if (pCreateInfo->pipelineLayout) { - local_pCreateInfo->pipelineLayout = layer_data->Unwrap(pCreateInfo->pipelineLayout); - } - UnwrapPnextChainHandles(layer_data, local_pCreateInfo->pNext); - } - } - VkResult result = layer_data->device_dispatch_table.CreateIndirectCommandsLayoutEXT( - device, (const VkIndirectCommandsLayoutCreateInfoEXT*)local_pCreateInfo, pAllocator, pIndirectCommandsLayout); - if (VK_SUCCESS == result) { - *pIndirectCommandsLayout = layer_data->WrapNew(*pIndirectCommandsLayout); - } - return result; -} - -void DispatchDestroyIndirectCommandsLayoutEXT(VkDevice device, VkIndirectCommandsLayoutEXT indirectCommandsLayout, - const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.DestroyIndirectCommandsLayoutEXT(device, indirectCommandsLayout, pAllocator); - - uint64_t indirectCommandsLayout_id = CastToUint64(indirectCommandsLayout); - auto iter = unique_id_mapping.pop(indirectCommandsLayout_id); - if (iter != unique_id_mapping.end()) { - indirectCommandsLayout = (VkIndirectCommandsLayoutEXT)iter->second; - } else { - indirectCommandsLayout = (VkIndirectCommandsLayoutEXT)0; - } - layer_data->device_dispatch_table.DestroyIndirectCommandsLayoutEXT(device, indirectCommandsLayout, pAllocator); -} - -void DispatchDestroyIndirectExecutionSetEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, - const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.DestroyIndirectExecutionSetEXT(device, indirectExecutionSet, pAllocator); - - uint64_t indirectExecutionSet_id = CastToUint64(indirectExecutionSet); - auto iter = unique_id_mapping.pop(indirectExecutionSet_id); - if (iter != unique_id_mapping.end()) { - indirectExecutionSet = (VkIndirectExecutionSetEXT)iter->second; - } else { - indirectExecutionSet = (VkIndirectExecutionSetEXT)0; - } - layer_data->device_dispatch_table.DestroyIndirectExecutionSetEXT(device, indirectExecutionSet, pAllocator); -} - -void DispatchUpdateIndirectExecutionSetPipelineEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, - uint32_t executionSetWriteCount, - const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.UpdateIndirectExecutionSetPipelineEXT(device, indirectExecutionSet, - executionSetWriteCount, pExecutionSetWrites); - small_vector var_local_pExecutionSetWrites; - vku::safe_VkWriteIndirectExecutionSetPipelineEXT* local_pExecutionSetWrites = nullptr; - { - indirectExecutionSet = layer_data->Unwrap(indirectExecutionSet); - if (pExecutionSetWrites) { - var_local_pExecutionSetWrites.resize(executionSetWriteCount); - local_pExecutionSetWrites = var_local_pExecutionSetWrites.data(); - for (uint32_t index0 = 0; index0 < executionSetWriteCount; ++index0) { - local_pExecutionSetWrites[index0].initialize(&pExecutionSetWrites[index0]); - - if (pExecutionSetWrites[index0].pipeline) { - local_pExecutionSetWrites[index0].pipeline = layer_data->Unwrap(pExecutionSetWrites[index0].pipeline); - } - } - } - } - layer_data->device_dispatch_table.UpdateIndirectExecutionSetPipelineEXT( - device, indirectExecutionSet, executionSetWriteCount, - (const VkWriteIndirectExecutionSetPipelineEXT*)local_pExecutionSetWrites); -} - -void DispatchUpdateIndirectExecutionSetShaderEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, - uint32_t executionSetWriteCount, - const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.UpdateIndirectExecutionSetShaderEXT(device, indirectExecutionSet, - executionSetWriteCount, pExecutionSetWrites); - small_vector var_local_pExecutionSetWrites; - vku::safe_VkWriteIndirectExecutionSetShaderEXT* local_pExecutionSetWrites = nullptr; - { - indirectExecutionSet = layer_data->Unwrap(indirectExecutionSet); - if (pExecutionSetWrites) { - var_local_pExecutionSetWrites.resize(executionSetWriteCount); - local_pExecutionSetWrites = var_local_pExecutionSetWrites.data(); - for (uint32_t index0 = 0; index0 < executionSetWriteCount; ++index0) { - local_pExecutionSetWrites[index0].initialize(&pExecutionSetWrites[index0]); - - if (pExecutionSetWrites[index0].shader) { - local_pExecutionSetWrites[index0].shader = layer_data->Unwrap(pExecutionSetWrites[index0].shader); - } - } - } - } - layer_data->device_dispatch_table.UpdateIndirectExecutionSetShaderEXT( - device, indirectExecutionSet, executionSetWriteCount, - (const VkWriteIndirectExecutionSetShaderEXT*)local_pExecutionSetWrites); -} - -VkResult DispatchGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( - VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixFlexibleDimensionsPropertiesNV* pProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - - VkResult result = layer_data->instance_dispatch_table.GetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( - physicalDevice, pPropertyCount, pProperties); - - return result; -} - -VkResult DispatchCreateAccelerationStructureKHR(VkDevice device, const VkAccelerationStructureCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkAccelerationStructureKHR* pAccelerationStructure) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CreateAccelerationStructureKHR(device, pCreateInfo, pAllocator, - pAccelerationStructure); - vku::safe_VkAccelerationStructureCreateInfoKHR var_local_pCreateInfo; - vku::safe_VkAccelerationStructureCreateInfoKHR* local_pCreateInfo = nullptr; - { - if (pCreateInfo) { - local_pCreateInfo = &var_local_pCreateInfo; - local_pCreateInfo->initialize(pCreateInfo); - - if (pCreateInfo->buffer) { - local_pCreateInfo->buffer = layer_data->Unwrap(pCreateInfo->buffer); - } - } - } - VkResult result = layer_data->device_dispatch_table.CreateAccelerationStructureKHR( - device, (const VkAccelerationStructureCreateInfoKHR*)local_pCreateInfo, pAllocator, pAccelerationStructure); - if (VK_SUCCESS == result) { - *pAccelerationStructure = layer_data->WrapNew(*pAccelerationStructure); - } - return result; -} - -void DispatchDestroyAccelerationStructureKHR(VkDevice device, VkAccelerationStructureKHR accelerationStructure, - const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.DestroyAccelerationStructureKHR(device, accelerationStructure, pAllocator); - - uint64_t accelerationStructure_id = CastToUint64(accelerationStructure); - auto iter = unique_id_mapping.pop(accelerationStructure_id); - if (iter != unique_id_mapping.end()) { - accelerationStructure = (VkAccelerationStructureKHR)iter->second; - } else { - accelerationStructure = (VkAccelerationStructureKHR)0; - } - layer_data->device_dispatch_table.DestroyAccelerationStructureKHR(device, accelerationStructure, pAllocator); -} - -void DispatchCmdBuildAccelerationStructuresIndirectKHR(VkCommandBuffer commandBuffer, uint32_t infoCount, - const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, - const VkDeviceAddress* pIndirectDeviceAddresses, - const uint32_t* pIndirectStrides, - const uint32_t* const* ppMaxPrimitiveCounts) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdBuildAccelerationStructuresIndirectKHR( - commandBuffer, infoCount, pInfos, pIndirectDeviceAddresses, pIndirectStrides, ppMaxPrimitiveCounts); - small_vector var_local_pInfos; - vku::safe_VkAccelerationStructureBuildGeometryInfoKHR* local_pInfos = nullptr; - { - if (pInfos) { - var_local_pInfos.resize(infoCount); - local_pInfos = var_local_pInfos.data(); - for (uint32_t index0 = 0; index0 < infoCount; ++index0) { - local_pInfos[index0].initialize(&pInfos[index0], false, nullptr); - - if (pInfos[index0].srcAccelerationStructure) { - local_pInfos[index0].srcAccelerationStructure = layer_data->Unwrap(pInfos[index0].srcAccelerationStructure); - } - if (pInfos[index0].dstAccelerationStructure) { - local_pInfos[index0].dstAccelerationStructure = layer_data->Unwrap(pInfos[index0].dstAccelerationStructure); - } - } - } - } - layer_data->device_dispatch_table.CmdBuildAccelerationStructuresIndirectKHR( - commandBuffer, infoCount, (const VkAccelerationStructureBuildGeometryInfoKHR*)local_pInfos, pIndirectDeviceAddresses, - pIndirectStrides, ppMaxPrimitiveCounts); -} - -VkResult DispatchCopyAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, - const VkCopyAccelerationStructureInfoKHR* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CopyAccelerationStructureKHR(device, deferredOperation, pInfo); - vku::safe_VkCopyAccelerationStructureInfoKHR* local_pInfo = nullptr; - { - deferredOperation = layer_data->Unwrap(deferredOperation); - if (pInfo) { - local_pInfo = new vku::safe_VkCopyAccelerationStructureInfoKHR; - local_pInfo->initialize(pInfo); - - if (pInfo->src) { - local_pInfo->src = layer_data->Unwrap(pInfo->src); - } - if (pInfo->dst) { - local_pInfo->dst = layer_data->Unwrap(pInfo->dst); - } - } - } - VkResult result = layer_data->device_dispatch_table.CopyAccelerationStructureKHR( - device, deferredOperation, (const VkCopyAccelerationStructureInfoKHR*)local_pInfo); - if (local_pInfo) { - // Fix check for deferred ray tracing pipeline creation - // https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5817 - const bool is_operation_deferred = (deferredOperation != VK_NULL_HANDLE) && (result == VK_OPERATION_DEFERRED_KHR); - if (is_operation_deferred) { - std::vector> cleanup{[local_pInfo]() { delete local_pInfo; }}; - layer_data->deferred_operation_post_completion.insert(deferredOperation, cleanup); - } else { - delete local_pInfo; - } - } - return result; -} - -VkResult DispatchCopyAccelerationStructureToMemoryKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, - const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CopyAccelerationStructureToMemoryKHR(device, deferredOperation, pInfo); - vku::safe_VkCopyAccelerationStructureToMemoryInfoKHR* local_pInfo = nullptr; - { - deferredOperation = layer_data->Unwrap(deferredOperation); - if (pInfo) { - local_pInfo = new vku::safe_VkCopyAccelerationStructureToMemoryInfoKHR; - local_pInfo->initialize(pInfo); - - if (pInfo->src) { - local_pInfo->src = layer_data->Unwrap(pInfo->src); - } - } - } - VkResult result = layer_data->device_dispatch_table.CopyAccelerationStructureToMemoryKHR( - device, deferredOperation, (const VkCopyAccelerationStructureToMemoryInfoKHR*)local_pInfo); - if (local_pInfo) { - // Fix check for deferred ray tracing pipeline creation - // https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5817 - const bool is_operation_deferred = (deferredOperation != VK_NULL_HANDLE) && (result == VK_OPERATION_DEFERRED_KHR); - if (is_operation_deferred) { - std::vector> cleanup{[local_pInfo]() { delete local_pInfo; }}; - layer_data->deferred_operation_post_completion.insert(deferredOperation, cleanup); - } else { - delete local_pInfo; - } - } - return result; -} - -VkResult DispatchCopyMemoryToAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, - const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CopyMemoryToAccelerationStructureKHR(device, deferredOperation, pInfo); - vku::safe_VkCopyMemoryToAccelerationStructureInfoKHR* local_pInfo = nullptr; - { - deferredOperation = layer_data->Unwrap(deferredOperation); - if (pInfo) { - local_pInfo = new vku::safe_VkCopyMemoryToAccelerationStructureInfoKHR; - local_pInfo->initialize(pInfo); - - if (pInfo->dst) { - local_pInfo->dst = layer_data->Unwrap(pInfo->dst); - } - } - } - VkResult result = layer_data->device_dispatch_table.CopyMemoryToAccelerationStructureKHR( - device, deferredOperation, (const VkCopyMemoryToAccelerationStructureInfoKHR*)local_pInfo); - if (local_pInfo) { - // Fix check for deferred ray tracing pipeline creation - // https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/5817 - const bool is_operation_deferred = (deferredOperation != VK_NULL_HANDLE) && (result == VK_OPERATION_DEFERRED_KHR); - if (is_operation_deferred) { - std::vector> cleanup{[local_pInfo]() { delete local_pInfo; }}; - layer_data->deferred_operation_post_completion.insert(deferredOperation, cleanup); - } else { - delete local_pInfo; - } - } - return result; -} - -VkResult DispatchWriteAccelerationStructuresPropertiesKHR(VkDevice device, uint32_t accelerationStructureCount, - const VkAccelerationStructureKHR* pAccelerationStructures, - VkQueryType queryType, size_t dataSize, void* pData, size_t stride) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.WriteAccelerationStructuresPropertiesKHR( - device, accelerationStructureCount, pAccelerationStructures, queryType, dataSize, pData, stride); - small_vector var_local_pAccelerationStructures; - VkAccelerationStructureKHR* local_pAccelerationStructures = nullptr; - { - if (pAccelerationStructures) { - var_local_pAccelerationStructures.resize(accelerationStructureCount); - local_pAccelerationStructures = var_local_pAccelerationStructures.data(); - for (uint32_t index0 = 0; index0 < accelerationStructureCount; ++index0) { - local_pAccelerationStructures[index0] = layer_data->Unwrap(pAccelerationStructures[index0]); - } - } - } - VkResult result = layer_data->device_dispatch_table.WriteAccelerationStructuresPropertiesKHR( - device, accelerationStructureCount, (const VkAccelerationStructureKHR*)local_pAccelerationStructures, queryType, dataSize, - pData, stride); - - return result; -} - -void DispatchCmdCopyAccelerationStructureKHR(VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureInfoKHR* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdCopyAccelerationStructureKHR(commandBuffer, pInfo); - vku::safe_VkCopyAccelerationStructureInfoKHR var_local_pInfo; - vku::safe_VkCopyAccelerationStructureInfoKHR* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->src) { - local_pInfo->src = layer_data->Unwrap(pInfo->src); - } - if (pInfo->dst) { - local_pInfo->dst = layer_data->Unwrap(pInfo->dst); - } - } - } - layer_data->device_dispatch_table.CmdCopyAccelerationStructureKHR(commandBuffer, - (const VkCopyAccelerationStructureInfoKHR*)local_pInfo); -} - -void DispatchCmdCopyAccelerationStructureToMemoryKHR(VkCommandBuffer commandBuffer, - const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdCopyAccelerationStructureToMemoryKHR(commandBuffer, pInfo); - vku::safe_VkCopyAccelerationStructureToMemoryInfoKHR var_local_pInfo; - vku::safe_VkCopyAccelerationStructureToMemoryInfoKHR* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->src) { - local_pInfo->src = layer_data->Unwrap(pInfo->src); - } - } - } - layer_data->device_dispatch_table.CmdCopyAccelerationStructureToMemoryKHR( - commandBuffer, (const VkCopyAccelerationStructureToMemoryInfoKHR*)local_pInfo); -} - -void DispatchCmdCopyMemoryToAccelerationStructureKHR(VkCommandBuffer commandBuffer, - const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.CmdCopyMemoryToAccelerationStructureKHR(commandBuffer, pInfo); - vku::safe_VkCopyMemoryToAccelerationStructureInfoKHR var_local_pInfo; - vku::safe_VkCopyMemoryToAccelerationStructureInfoKHR* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->dst) { - local_pInfo->dst = layer_data->Unwrap(pInfo->dst); - } - } - } - layer_data->device_dispatch_table.CmdCopyMemoryToAccelerationStructureKHR( - commandBuffer, (const VkCopyMemoryToAccelerationStructureInfoKHR*)local_pInfo); -} - -VkDeviceAddress DispatchGetAccelerationStructureDeviceAddressKHR(VkDevice device, - const VkAccelerationStructureDeviceAddressInfoKHR* pInfo) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) return layer_data->device_dispatch_table.GetAccelerationStructureDeviceAddressKHR(device, pInfo); - vku::safe_VkAccelerationStructureDeviceAddressInfoKHR var_local_pInfo; - vku::safe_VkAccelerationStructureDeviceAddressInfoKHR* local_pInfo = nullptr; - { - if (pInfo) { - local_pInfo = &var_local_pInfo; - local_pInfo->initialize(pInfo); - - if (pInfo->accelerationStructure) { - local_pInfo->accelerationStructure = layer_data->Unwrap(pInfo->accelerationStructure); - } - } - } - VkDeviceAddress result = layer_data->device_dispatch_table.GetAccelerationStructureDeviceAddressKHR( - device, (const VkAccelerationStructureDeviceAddressInfoKHR*)local_pInfo); - - return result; -} - -void DispatchCmdWriteAccelerationStructuresPropertiesKHR(VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, - const VkAccelerationStructureKHR* pAccelerationStructures, - VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdWriteAccelerationStructuresPropertiesKHR( - commandBuffer, accelerationStructureCount, pAccelerationStructures, queryType, queryPool, firstQuery); - small_vector var_local_pAccelerationStructures; - VkAccelerationStructureKHR* local_pAccelerationStructures = nullptr; - { - if (pAccelerationStructures) { - var_local_pAccelerationStructures.resize(accelerationStructureCount); - local_pAccelerationStructures = var_local_pAccelerationStructures.data(); - for (uint32_t index0 = 0; index0 < accelerationStructureCount; ++index0) { - local_pAccelerationStructures[index0] = layer_data->Unwrap(pAccelerationStructures[index0]); - } - } - queryPool = layer_data->Unwrap(queryPool); - } - layer_data->device_dispatch_table.CmdWriteAccelerationStructuresPropertiesKHR( - commandBuffer, accelerationStructureCount, (const VkAccelerationStructureKHR*)local_pAccelerationStructures, queryType, - queryPool, firstQuery); -} - -void DispatchGetDeviceAccelerationStructureCompatibilityKHR(VkDevice device, - const VkAccelerationStructureVersionInfoKHR* pVersionInfo, - VkAccelerationStructureCompatibilityKHR* pCompatibility) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - - layer_data->device_dispatch_table.GetDeviceAccelerationStructureCompatibilityKHR(device, pVersionInfo, pCompatibility); -} - -void DispatchCmdTraceRaysKHR(VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, - const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, - const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, - const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, uint32_t width, uint32_t height, - uint32_t depth) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdTraceRaysKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, - pHitShaderBindingTable, pCallableShaderBindingTable, width, height, depth); -} - -VkResult DispatchGetRayTracingCaptureReplayShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, - uint32_t groupCount, size_t dataSize, void* pData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetRayTracingCaptureReplayShaderGroupHandlesKHR(device, pipeline, firstGroup, - groupCount, dataSize, pData); - { pipeline = layer_data->Unwrap(pipeline); } - VkResult result = layer_data->device_dispatch_table.GetRayTracingCaptureReplayShaderGroupHandlesKHR( - device, pipeline, firstGroup, groupCount, dataSize, pData); - - return result; -} - -void DispatchCmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer, - const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, - const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, - const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, - const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, - VkDeviceAddress indirectDeviceAddress) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdTraceRaysIndirectKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, - pHitShaderBindingTable, pCallableShaderBindingTable, - indirectDeviceAddress); -} - -VkDeviceSize DispatchGetRayTracingShaderGroupStackSizeKHR(VkDevice device, VkPipeline pipeline, uint32_t group, - VkShaderGroupShaderKHR groupShader) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.GetRayTracingShaderGroupStackSizeKHR(device, pipeline, group, groupShader); - { pipeline = layer_data->Unwrap(pipeline); } - VkDeviceSize result = - layer_data->device_dispatch_table.GetRayTracingShaderGroupStackSizeKHR(device, pipeline, group, groupShader); - - return result; -} - -void DispatchCmdSetRayTracingPipelineStackSizeKHR(VkCommandBuffer commandBuffer, uint32_t pipelineStackSize) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdSetRayTracingPipelineStackSizeKHR(commandBuffer, pipelineStackSize); -} - -void DispatchCmdDrawMeshTasksEXT(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - - layer_data->device_dispatch_table.CmdDrawMeshTasksEXT(commandBuffer, groupCountX, groupCountY, groupCountZ); -} - -void DispatchCmdDrawMeshTasksIndirectEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, - uint32_t stride) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdDrawMeshTasksIndirectEXT(commandBuffer, buffer, offset, drawCount, stride); - { buffer = layer_data->Unwrap(buffer); } - layer_data->device_dispatch_table.CmdDrawMeshTasksIndirectEXT(commandBuffer, buffer, offset, drawCount, stride); -} - -void DispatchCmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, - VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, - uint32_t stride) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - if (!wrap_handles) - return layer_data->device_dispatch_table.CmdDrawMeshTasksIndirectCountEXT(commandBuffer, buffer, offset, countBuffer, - countBufferOffset, maxDrawCount, stride); - { - buffer = layer_data->Unwrap(buffer); - countBuffer = layer_data->Unwrap(countBuffer); - } - layer_data->device_dispatch_table.CmdDrawMeshTasksIndirectCountEXT(commandBuffer, buffer, offset, countBuffer, - countBufferOffset, maxDrawCount, stride); -} - -// NOLINTEND diff --git a/layers/vulkan/generated/layer_chassis_dispatch.h b/layers/vulkan/generated/layer_chassis_dispatch.h deleted file mode 100644 index 7d4963a5ac4..00000000000 --- a/layers/vulkan/generated/layer_chassis_dispatch.h +++ /dev/null @@ -1,1284 +0,0 @@ -// *** THIS FILE IS GENERATED - DO NOT EDIT *** -// See layer_chassis_dispatch_generator.py for modifications - -/*************************************************************************** - * - * Copyright (c) 2015-2024 The Khronos Group Inc. - * Copyright (c) 2015-2024 Valve Corporation - * Copyright (c) 2015-2024 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. - ****************************************************************************/ - -// NOLINTBEGIN - -#pragma once -#include - -extern bool wrap_handles; - -class DispatchObject; -void UnwrapPnextChainHandles(DispatchObject* layer_data, const void* pNext); - -VkResult DispatchCreateInstance(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkInstance* pInstance); -void DispatchDestroyInstance(VkInstance instance, const VkAllocationCallbacks* pAllocator); -VkResult DispatchEnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices); -void DispatchGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures); -void DispatchGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, - VkFormatProperties* pFormatProperties); -VkResult DispatchGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, - VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, - VkImageFormatProperties* pImageFormatProperties); -void DispatchGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties); -void DispatchGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, - VkQueueFamilyProperties* pQueueFamilyProperties); -void DispatchGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, - VkPhysicalDeviceMemoryProperties* pMemoryProperties); -PFN_vkVoidFunction DispatchGetInstanceProcAddr(VkInstance instance, const char* pName); -PFN_vkVoidFunction DispatchGetDeviceProcAddr(VkDevice device, const char* pName); -VkResult DispatchCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkDevice* pDevice); -void DispatchDestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator); -VkResult DispatchEnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pPropertyCount, - VkExtensionProperties* pProperties); -VkResult DispatchEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, - uint32_t* pPropertyCount, VkExtensionProperties* pProperties); -VkResult DispatchEnumerateInstanceLayerProperties(uint32_t* pPropertyCount, VkLayerProperties* pProperties); -VkResult DispatchEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, - VkLayerProperties* pProperties); -void DispatchGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue); -VkResult DispatchQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence); -VkResult DispatchQueueWaitIdle(VkQueue queue); -VkResult DispatchDeviceWaitIdle(VkDevice device); -VkResult DispatchAllocateMemory(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, const VkAllocationCallbacks* pAllocator, - VkDeviceMemory* pMemory); -void DispatchFreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator); -VkResult DispatchMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, - void** ppData); -void DispatchUnmapMemory(VkDevice device, VkDeviceMemory memory); -VkResult DispatchFlushMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges); -VkResult DispatchInvalidateMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges); -void DispatchGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes); -VkResult DispatchBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset); -VkResult DispatchBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset); -void DispatchGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements); -void DispatchGetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements); -void DispatchGetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements* pSparseMemoryRequirements); -void DispatchGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, - VkSampleCountFlagBits samples, VkImageUsageFlags usage, - VkImageTiling tiling, uint32_t* pPropertyCount, - VkSparseImageFormatProperties* pProperties); -VkResult DispatchQueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence); -VkResult DispatchCreateFence(VkDevice device, const VkFenceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkFence* pFence); -void DispatchDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator); -VkResult DispatchResetFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences); -VkResult DispatchGetFenceStatus(VkDevice device, VkFence fence); -VkResult DispatchWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout); -VkResult DispatchCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkSemaphore* pSemaphore); -void DispatchDestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator); -VkResult DispatchCreateEvent(VkDevice device, const VkEventCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkEvent* pEvent); -void DispatchDestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator); -VkResult DispatchGetEventStatus(VkDevice device, VkEvent event); -VkResult DispatchSetEvent(VkDevice device, VkEvent event); -VkResult DispatchResetEvent(VkDevice device, VkEvent event); -VkResult DispatchCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkQueryPool* pQueryPool); -void DispatchDestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator); -VkResult DispatchGetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, - size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags); -VkResult DispatchCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkBuffer* pBuffer); -void DispatchDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator); -VkResult DispatchCreateBufferView(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkBufferView* pView); -void DispatchDestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator); -VkResult DispatchCreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkImage* pImage); -void DispatchDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator); -void DispatchGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, - VkSubresourceLayout* pLayout); -VkResult DispatchCreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkImageView* pView); -void DispatchDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator); -VkResult DispatchCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule); -void DispatchDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator); -VkResult DispatchCreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache); -void DispatchDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks* pAllocator); -VkResult DispatchGetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData); -VkResult DispatchMergePipelineCaches(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, - const VkPipelineCache* pSrcCaches); -VkResult DispatchCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, - const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, - VkPipeline* pPipelines); -VkResult DispatchCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, - const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, - VkPipeline* pPipelines); -void DispatchDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator); -VkResult DispatchCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout); -void DispatchDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks* pAllocator); -VkResult DispatchCreateSampler(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkSampler* pSampler); -void DispatchDestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator); -VkResult DispatchCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout); -void DispatchDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, - const VkAllocationCallbacks* pAllocator); -VkResult DispatchCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool); -void DispatchDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks* pAllocator); -VkResult DispatchResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags); -VkResult DispatchAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, - VkDescriptorSet* pDescriptorSets); -VkResult DispatchFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, - const VkDescriptorSet* pDescriptorSets); -void DispatchUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, - uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies); -VkResult DispatchCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer); -void DispatchDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator); -VkResult DispatchCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass); -void DispatchDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator); -void DispatchGetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity); -VkResult DispatchCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool); -void DispatchDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator); -VkResult DispatchResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags); -VkResult DispatchAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, - VkCommandBuffer* pCommandBuffers); -void DispatchFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, - const VkCommandBuffer* pCommandBuffers); -VkResult DispatchBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo, bool is_secondary); -VkResult DispatchEndCommandBuffer(VkCommandBuffer commandBuffer); -VkResult DispatchResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags); -void DispatchCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline); -void DispatchCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, - const VkViewport* pViewports); -void DispatchCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors); -void DispatchCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth); -void DispatchCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, - float depthBiasSlopeFactor); -void DispatchCmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4]); -void DispatchCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds); -void DispatchCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask); -void DispatchCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask); -void DispatchCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference); -void DispatchCmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, - uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, - uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets); -void DispatchCmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType); -void DispatchCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, - const VkBuffer* pBuffers, const VkDeviceSize* pOffsets); -void DispatchCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, - uint32_t firstInstance); -void DispatchCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, - int32_t vertexOffset, uint32_t firstInstance); -void DispatchCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, - uint32_t stride); -void DispatchCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, - uint32_t stride); -void DispatchCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); -void DispatchCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset); -void DispatchCmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, - const VkBufferCopy* pRegions); -void DispatchCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, - VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions); -void DispatchCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, - VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter); -void DispatchCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, - uint32_t regionCount, const VkBufferImageCopy* pRegions); -void DispatchCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, - uint32_t regionCount, const VkBufferImageCopy* pRegions); -void DispatchCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, - const void* pData); -void DispatchCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, - uint32_t data); -void DispatchCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, - const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges); -void DispatchCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, - const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, - const VkImageSubresourceRange* pRanges); -void DispatchCmdClearAttachments(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, - uint32_t rectCount, const VkClearRect* pRects); -void DispatchCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, - VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions); -void DispatchCmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask); -void DispatchCmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask); -void DispatchCmdWaitEvents(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); -void DispatchCmdPipelineBarrier(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); -void DispatchCmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags); -void DispatchCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query); -void DispatchCmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount); -void DispatchCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, - uint32_t query); -void DispatchCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, - VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags); -void DispatchCmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, - uint32_t offset, uint32_t size, const void* pValues); -void DispatchCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, - VkSubpassContents contents); -void DispatchCmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents); -void DispatchCmdEndRenderPass(VkCommandBuffer commandBuffer); -void DispatchCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers); -VkResult DispatchEnumerateInstanceVersion(uint32_t* pApiVersion); -VkResult DispatchBindBufferMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos); -VkResult DispatchBindImageMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos); -void DispatchGetDeviceGroupPeerMemoryFeatures(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, - uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures); -void DispatchCmdSetDeviceMask(VkCommandBuffer commandBuffer, uint32_t deviceMask); -void DispatchCmdDispatchBase(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, - uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); -VkResult DispatchEnumeratePhysicalDeviceGroups(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, - VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties); -void DispatchGetImageMemoryRequirements2(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, - VkMemoryRequirements2* pMemoryRequirements); -void DispatchGetBufferMemoryRequirements2(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, - VkMemoryRequirements2* pMemoryRequirements); -void DispatchGetImageSparseMemoryRequirements2(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, - uint32_t* pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); -void DispatchGetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures); -void DispatchGetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties); -void DispatchGetPhysicalDeviceFormatProperties2(VkPhysicalDevice physicalDevice, VkFormat format, - VkFormatProperties2* pFormatProperties); -VkResult DispatchGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, - VkImageFormatProperties2* pImageFormatProperties); -void DispatchGetPhysicalDeviceQueueFamilyProperties2(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, - VkQueueFamilyProperties2* pQueueFamilyProperties); -void DispatchGetPhysicalDeviceMemoryProperties2(VkPhysicalDevice physicalDevice, - VkPhysicalDeviceMemoryProperties2* pMemoryProperties); -void DispatchGetPhysicalDeviceSparseImageFormatProperties2(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, - uint32_t* pPropertyCount, VkSparseImageFormatProperties2* pProperties); -void DispatchTrimCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags); -void DispatchGetDeviceQueue2(VkDevice device, const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue); -VkResult DispatchCreateSamplerYcbcrConversion(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSamplerYcbcrConversion* pYcbcrConversion); -void DispatchDestroySamplerYcbcrConversion(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, - const VkAllocationCallbacks* pAllocator); -VkResult DispatchCreateDescriptorUpdateTemplate(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate); -void DispatchDestroyDescriptorUpdateTemplate(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, - const VkAllocationCallbacks* pAllocator); -void DispatchUpdateDescriptorSetWithTemplate(VkDevice device, VkDescriptorSet descriptorSet, - VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData); -void DispatchGetPhysicalDeviceExternalBufferProperties(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, - VkExternalBufferProperties* pExternalBufferProperties); -void DispatchGetPhysicalDeviceExternalFenceProperties(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, - VkExternalFenceProperties* pExternalFenceProperties); -void DispatchGetPhysicalDeviceExternalSemaphoreProperties(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, - VkExternalSemaphoreProperties* pExternalSemaphoreProperties); -void DispatchGetDescriptorSetLayoutSupport(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, - VkDescriptorSetLayoutSupport* pSupport); -void DispatchCmdDrawIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, - VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); -void DispatchCmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, - VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); -VkResult DispatchCreateRenderPass2(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass); -void DispatchCmdBeginRenderPass2(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, - const VkSubpassBeginInfo* pSubpassBeginInfo); -void DispatchCmdNextSubpass2(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, - const VkSubpassEndInfo* pSubpassEndInfo); -void DispatchCmdEndRenderPass2(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo); -void DispatchResetQueryPool(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount); -VkResult DispatchGetSemaphoreCounterValue(VkDevice device, VkSemaphore semaphore, uint64_t* pValue); -VkResult DispatchWaitSemaphores(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout); -VkResult DispatchSignalSemaphore(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo); -VkDeviceAddress DispatchGetBufferDeviceAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo); -uint64_t DispatchGetBufferOpaqueCaptureAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo); -uint64_t DispatchGetDeviceMemoryOpaqueCaptureAddress(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo); -VkResult DispatchGetPhysicalDeviceToolProperties(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, - VkPhysicalDeviceToolProperties* pToolProperties); -VkResult DispatchCreatePrivateDataSlot(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot); -void DispatchDestroyPrivateDataSlot(VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator); -VkResult DispatchSetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, - uint64_t data); -void DispatchGetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, - uint64_t* pData); -void DispatchCmdSetEvent2(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo); -void DispatchCmdResetEvent2(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask); -void DispatchCmdWaitEvents2(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, - const VkDependencyInfo* pDependencyInfos); -void DispatchCmdPipelineBarrier2(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo); -void DispatchCmdWriteTimestamp2(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, uint32_t query); -VkResult DispatchQueueSubmit2(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence); -void DispatchCmdCopyBuffer2(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo); -void DispatchCmdCopyImage2(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo); -void DispatchCmdCopyBufferToImage2(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo); -void DispatchCmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo); -void DispatchCmdBlitImage2(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo); -void DispatchCmdResolveImage2(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo); -void DispatchCmdBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo); -void DispatchCmdEndRendering(VkCommandBuffer commandBuffer); -void DispatchCmdSetCullMode(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode); -void DispatchCmdSetFrontFace(VkCommandBuffer commandBuffer, VkFrontFace frontFace); -void DispatchCmdSetPrimitiveTopology(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology); -void DispatchCmdSetViewportWithCount(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports); -void DispatchCmdSetScissorWithCount(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors); -void DispatchCmdBindVertexBuffers2(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, - const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, - const VkDeviceSize* pStrides); -void DispatchCmdSetDepthTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable); -void DispatchCmdSetDepthWriteEnable(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable); -void DispatchCmdSetDepthCompareOp(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp); -void DispatchCmdSetDepthBoundsTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable); -void DispatchCmdSetStencilTestEnable(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable); -void DispatchCmdSetStencilOp(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, - VkStencilOp depthFailOp, VkCompareOp compareOp); -void DispatchCmdSetRasterizerDiscardEnable(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable); -void DispatchCmdSetDepthBiasEnable(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable); -void DispatchCmdSetPrimitiveRestartEnable(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable); -void DispatchGetDeviceBufferMemoryRequirements(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, - VkMemoryRequirements2* pMemoryRequirements); -void DispatchGetDeviceImageMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, - VkMemoryRequirements2* pMemoryRequirements); -void DispatchGetDeviceImageSparseMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, - uint32_t* pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); -void DispatchDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator); -VkResult DispatchGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, - VkSurfaceKHR surface, VkBool32* pSupported); -VkResult DispatchGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, - VkSurfaceCapabilitiesKHR* pSurfaceCapabilities); -VkResult DispatchGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, - uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats); -VkResult DispatchGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, - uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes); -VkResult DispatchCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain); -void DispatchDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator); -VkResult DispatchGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, - VkImage* pSwapchainImages); -VkResult DispatchAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, - VkFence fence, uint32_t* pImageIndex); -VkResult DispatchQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR* pPresentInfo); -VkResult DispatchGetDeviceGroupPresentCapabilitiesKHR(VkDevice device, - VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities); -VkResult DispatchGetDeviceGroupSurfacePresentModesKHR(VkDevice device, VkSurfaceKHR surface, - VkDeviceGroupPresentModeFlagsKHR* pModes); -VkResult DispatchGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pRectCount, - VkRect2D* pRects); -VkResult DispatchAcquireNextImage2KHR(VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, uint32_t* pImageIndex); -VkResult DispatchGetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, - VkDisplayPropertiesKHR* pProperties); -VkResult DispatchGetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, - VkDisplayPlanePropertiesKHR* pProperties); -VkResult DispatchGetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t* pDisplayCount, - VkDisplayKHR* pDisplays); -VkResult DispatchGetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, - VkDisplayModePropertiesKHR* pProperties); -VkResult DispatchCreateDisplayModeKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, - const VkDisplayModeCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkDisplayModeKHR* pMode); -VkResult DispatchGetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex, - VkDisplayPlaneCapabilitiesKHR* pCapabilities); -VkResult DispatchCreateDisplayPlaneSurfaceKHR(VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); -VkResult DispatchCreateSharedSwapchainsKHR(VkDevice device, uint32_t swapchainCount, const VkSwapchainCreateInfoKHR* pCreateInfos, - const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains); -#ifdef VK_USE_PLATFORM_XLIB_KHR -VkResult DispatchCreateXlibSurfaceKHR(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); -VkBool32 DispatchGetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, - Display* dpy, VisualID visualID); -#endif // VK_USE_PLATFORM_XLIB_KHR -#ifdef VK_USE_PLATFORM_XCB_KHR -VkResult DispatchCreateXcbSurfaceKHR(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); -VkBool32 DispatchGetPhysicalDeviceXcbPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, - xcb_connection_t* connection, xcb_visualid_t visual_id); -#endif // VK_USE_PLATFORM_XCB_KHR -#ifdef VK_USE_PLATFORM_WAYLAND_KHR -VkResult DispatchCreateWaylandSurfaceKHR(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); -VkBool32 DispatchGetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, - struct wl_display* display); -#endif // VK_USE_PLATFORM_WAYLAND_KHR -#ifdef VK_USE_PLATFORM_ANDROID_KHR -VkResult DispatchCreateAndroidSurfaceKHR(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); -#endif // VK_USE_PLATFORM_ANDROID_KHR -#ifdef VK_USE_PLATFORM_WIN32_KHR -VkResult DispatchCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); -VkBool32 DispatchGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex); -#endif // VK_USE_PLATFORM_WIN32_KHR -VkResult DispatchGetPhysicalDeviceVideoCapabilitiesKHR(VkPhysicalDevice physicalDevice, const VkVideoProfileInfoKHR* pVideoProfile, - VkVideoCapabilitiesKHR* pCapabilities); -VkResult DispatchGetPhysicalDeviceVideoFormatPropertiesKHR(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceVideoFormatInfoKHR* pVideoFormatInfo, - uint32_t* pVideoFormatPropertyCount, - VkVideoFormatPropertiesKHR* pVideoFormatProperties); -VkResult DispatchCreateVideoSessionKHR(VkDevice device, const VkVideoSessionCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkVideoSessionKHR* pVideoSession); -void DispatchDestroyVideoSessionKHR(VkDevice device, VkVideoSessionKHR videoSession, const VkAllocationCallbacks* pAllocator); -VkResult DispatchGetVideoSessionMemoryRequirementsKHR(VkDevice device, VkVideoSessionKHR videoSession, - uint32_t* pMemoryRequirementsCount, - VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements); -VkResult DispatchBindVideoSessionMemoryKHR(VkDevice device, VkVideoSessionKHR videoSession, uint32_t bindSessionMemoryInfoCount, - const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos); -VkResult DispatchCreateVideoSessionParametersKHR(VkDevice device, const VkVideoSessionParametersCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkVideoSessionParametersKHR* pVideoSessionParameters); -VkResult DispatchUpdateVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, - const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo); -void DispatchDestroyVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, - const VkAllocationCallbacks* pAllocator); -void DispatchCmdBeginVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoBeginCodingInfoKHR* pBeginInfo); -void DispatchCmdEndVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoEndCodingInfoKHR* pEndCodingInfo); -void DispatchCmdControlVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoCodingControlInfoKHR* pCodingControlInfo); -void DispatchCmdDecodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR* pDecodeInfo); -void DispatchCmdBeginRenderingKHR(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo); -void DispatchCmdEndRenderingKHR(VkCommandBuffer commandBuffer); -void DispatchGetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures); -void DispatchGetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties); -void DispatchGetPhysicalDeviceFormatProperties2KHR(VkPhysicalDevice physicalDevice, VkFormat format, - VkFormatProperties2* pFormatProperties); -VkResult DispatchGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, - VkImageFormatProperties2* pImageFormatProperties); -void DispatchGetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, - VkQueueFamilyProperties2* pQueueFamilyProperties); -void DispatchGetPhysicalDeviceMemoryProperties2KHR(VkPhysicalDevice physicalDevice, - VkPhysicalDeviceMemoryProperties2* pMemoryProperties); -void DispatchGetPhysicalDeviceSparseImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, - uint32_t* pPropertyCount, - VkSparseImageFormatProperties2* pProperties); -void DispatchGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, - uint32_t remoteDeviceIndex, VkPeerMemoryFeatureFlags* pPeerMemoryFeatures); -void DispatchCmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, uint32_t deviceMask); -void DispatchCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, uint32_t baseGroupZ, - uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); -void DispatchTrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags); -VkResult DispatchEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, - VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties); -void DispatchGetPhysicalDeviceExternalBufferPropertiesKHR(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, - VkExternalBufferProperties* pExternalBufferProperties); -#ifdef VK_USE_PLATFORM_WIN32_KHR -VkResult DispatchGetMemoryWin32HandleKHR(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, - HANDLE* pHandle); -VkResult DispatchGetMemoryWin32HandlePropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, - VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties); -#endif // VK_USE_PLATFORM_WIN32_KHR -VkResult DispatchGetMemoryFdKHR(VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd); -VkResult DispatchGetMemoryFdPropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, - VkMemoryFdPropertiesKHR* pMemoryFdProperties); -void DispatchGetPhysicalDeviceExternalSemaphorePropertiesKHR(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, - VkExternalSemaphoreProperties* pExternalSemaphoreProperties); -#ifdef VK_USE_PLATFORM_WIN32_KHR -VkResult DispatchImportSemaphoreWin32HandleKHR(VkDevice device, - const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo); -VkResult DispatchGetSemaphoreWin32HandleKHR(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, - HANDLE* pHandle); -#endif // VK_USE_PLATFORM_WIN32_KHR -VkResult DispatchImportSemaphoreFdKHR(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo); -VkResult DispatchGetSemaphoreFdKHR(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd); -void DispatchCmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, - uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites); -void DispatchCmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, - VkPipelineLayout layout, uint32_t set, const void* pData); -VkResult DispatchCreateDescriptorUpdateTemplateKHR(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate); -void DispatchDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, - const VkAllocationCallbacks* pAllocator); -void DispatchUpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, - VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData); -VkResult DispatchCreateRenderPass2KHR(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass); -void DispatchCmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, - const VkSubpassBeginInfo* pSubpassBeginInfo); -void DispatchCmdNextSubpass2KHR(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, - const VkSubpassEndInfo* pSubpassEndInfo); -void DispatchCmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo); -VkResult DispatchGetSwapchainStatusKHR(VkDevice device, VkSwapchainKHR swapchain); -void DispatchGetPhysicalDeviceExternalFencePropertiesKHR(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, - VkExternalFenceProperties* pExternalFenceProperties); -#ifdef VK_USE_PLATFORM_WIN32_KHR -VkResult DispatchImportFenceWin32HandleKHR(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo); -VkResult DispatchGetFenceWin32HandleKHR(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); -#endif // VK_USE_PLATFORM_WIN32_KHR -VkResult DispatchImportFenceFdKHR(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo); -VkResult DispatchGetFenceFdKHR(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd); -VkResult DispatchEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( - VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, uint32_t* pCounterCount, VkPerformanceCounterKHR* pCounters, - VkPerformanceCounterDescriptionKHR* pCounterDescriptions); -void DispatchGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( - VkPhysicalDevice physicalDevice, const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, uint32_t* pNumPasses); -VkResult DispatchAcquireProfilingLockKHR(VkDevice device, const VkAcquireProfilingLockInfoKHR* pInfo); -void DispatchReleaseProfilingLockKHR(VkDevice device); -VkResult DispatchGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, - VkSurfaceCapabilities2KHR* pSurfaceCapabilities); -VkResult DispatchGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, - uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats); -VkResult DispatchGetPhysicalDeviceDisplayProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, - VkDisplayProperties2KHR* pProperties); -VkResult DispatchGetPhysicalDeviceDisplayPlaneProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, - VkDisplayPlaneProperties2KHR* pProperties); -VkResult DispatchGetDisplayModeProperties2KHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, - VkDisplayModeProperties2KHR* pProperties); -VkResult DispatchGetDisplayPlaneCapabilities2KHR(VkPhysicalDevice physicalDevice, const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, - VkDisplayPlaneCapabilities2KHR* pCapabilities); -void DispatchGetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, - VkMemoryRequirements2* pMemoryRequirements); -void DispatchGetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, - VkMemoryRequirements2* pMemoryRequirements); -void DispatchGetImageSparseMemoryRequirements2KHR(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, - uint32_t* pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); -VkResult DispatchCreateSamplerYcbcrConversionKHR(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkSamplerYcbcrConversion* pYcbcrConversion); -void DispatchDestroySamplerYcbcrConversionKHR(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, - const VkAllocationCallbacks* pAllocator); -VkResult DispatchBindBufferMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos); -VkResult DispatchBindImageMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos); -void DispatchGetDescriptorSetLayoutSupportKHR(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, - VkDescriptorSetLayoutSupport* pSupport); -void DispatchCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, - VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); -void DispatchCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, - VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, - uint32_t stride); -VkResult DispatchGetSemaphoreCounterValueKHR(VkDevice device, VkSemaphore semaphore, uint64_t* pValue); -VkResult DispatchWaitSemaphoresKHR(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout); -VkResult DispatchSignalSemaphoreKHR(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo); -VkResult DispatchGetPhysicalDeviceFragmentShadingRatesKHR(VkPhysicalDevice physicalDevice, uint32_t* pFragmentShadingRateCount, - VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates); -void DispatchCmdSetFragmentShadingRateKHR(VkCommandBuffer commandBuffer, const VkExtent2D* pFragmentSize, - const VkFragmentShadingRateCombinerOpKHR combinerOps[2]); -void DispatchCmdSetRenderingAttachmentLocationsKHR(VkCommandBuffer commandBuffer, - const VkRenderingAttachmentLocationInfoKHR* pLocationInfo); -void DispatchCmdSetRenderingInputAttachmentIndicesKHR(VkCommandBuffer commandBuffer, - const VkRenderingInputAttachmentIndexInfoKHR* pInputAttachmentIndexInfo); -VkResult DispatchWaitForPresentKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t presentId, uint64_t timeout); -VkDeviceAddress DispatchGetBufferDeviceAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo); -uint64_t DispatchGetBufferOpaqueCaptureAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo); -uint64_t DispatchGetDeviceMemoryOpaqueCaptureAddressKHR(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo); -VkResult DispatchCreateDeferredOperationKHR(VkDevice device, const VkAllocationCallbacks* pAllocator, - VkDeferredOperationKHR* pDeferredOperation); -void DispatchDestroyDeferredOperationKHR(VkDevice device, VkDeferredOperationKHR operation, - const VkAllocationCallbacks* pAllocator); -uint32_t DispatchGetDeferredOperationMaxConcurrencyKHR(VkDevice device, VkDeferredOperationKHR operation); -VkResult DispatchGetDeferredOperationResultKHR(VkDevice device, VkDeferredOperationKHR operation); -VkResult DispatchDeferredOperationJoinKHR(VkDevice device, VkDeferredOperationKHR operation); -VkResult DispatchGetPipelineExecutablePropertiesKHR(VkDevice device, const VkPipelineInfoKHR* pPipelineInfo, - uint32_t* pExecutableCount, VkPipelineExecutablePropertiesKHR* pProperties); -VkResult DispatchGetPipelineExecutableStatisticsKHR(VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, - uint32_t* pStatisticCount, VkPipelineExecutableStatisticKHR* pStatistics); -VkResult DispatchGetPipelineExecutableInternalRepresentationsKHR( - VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pInternalRepresentationCount, - VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations); -VkResult DispatchMapMemory2KHR(VkDevice device, const VkMemoryMapInfoKHR* pMemoryMapInfo, void** ppData); -VkResult DispatchUnmapMemory2KHR(VkDevice device, const VkMemoryUnmapInfoKHR* pMemoryUnmapInfo); -VkResult DispatchGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( - VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, - VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties); -VkResult DispatchGetEncodedVideoSessionParametersKHR(VkDevice device, - const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo, - VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, - size_t* pDataSize, void* pData); -void DispatchCmdEncodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo); -void DispatchCmdSetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo); -void DispatchCmdResetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask); -void DispatchCmdWaitEvents2KHR(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, - const VkDependencyInfo* pDependencyInfos); -void DispatchCmdPipelineBarrier2KHR(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo); -void DispatchCmdWriteTimestamp2KHR(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, - uint32_t query); -VkResult DispatchQueueSubmit2KHR(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence); -void DispatchCmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo); -void DispatchCmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo); -void DispatchCmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo); -void DispatchCmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo); -void DispatchCmdBlitImage2KHR(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo); -void DispatchCmdResolveImage2KHR(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo); -void DispatchCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress); -void DispatchGetDeviceBufferMemoryRequirementsKHR(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, - VkMemoryRequirements2* pMemoryRequirements); -void DispatchGetDeviceImageMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, - VkMemoryRequirements2* pMemoryRequirements); -void DispatchGetDeviceImageSparseMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, - uint32_t* pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); -void DispatchCmdBindIndexBuffer2KHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkDeviceSize size, - VkIndexType indexType); -void DispatchGetRenderingAreaGranularityKHR(VkDevice device, const VkRenderingAreaInfoKHR* pRenderingAreaInfo, - VkExtent2D* pGranularity); -void DispatchGetDeviceImageSubresourceLayoutKHR(VkDevice device, const VkDeviceImageSubresourceInfoKHR* pInfo, - VkSubresourceLayout2KHR* pLayout); -void DispatchGetImageSubresourceLayout2KHR(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, - VkSubresourceLayout2KHR* pLayout); -VkResult DispatchCreatePipelineBinariesKHR(VkDevice device, const VkPipelineBinaryCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkPipelineBinaryHandlesInfoKHR* pBinaries); -void DispatchDestroyPipelineBinaryKHR(VkDevice device, VkPipelineBinaryKHR pipelineBinary, const VkAllocationCallbacks* pAllocator); -VkResult DispatchGetPipelineKeyKHR(VkDevice device, const VkPipelineCreateInfoKHR* pPipelineCreateInfo, - VkPipelineBinaryKeyKHR* pPipelineKey); -VkResult DispatchGetPipelineBinaryDataKHR(VkDevice device, const VkPipelineBinaryDataInfoKHR* pInfo, - VkPipelineBinaryKeyKHR* pPipelineBinaryKey, size_t* pPipelineBinaryDataSize, - void* pPipelineBinaryData); -VkResult DispatchReleaseCapturedPipelineDataKHR(VkDevice device, const VkReleaseCapturedPipelineDataInfoKHR* pInfo, - const VkAllocationCallbacks* pAllocator); -VkResult DispatchGetPhysicalDeviceCooperativeMatrixPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, - VkCooperativeMatrixPropertiesKHR* pProperties); -void DispatchCmdSetLineStippleKHR(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern); -VkResult DispatchGetPhysicalDeviceCalibrateableTimeDomainsKHR(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, - VkTimeDomainKHR* pTimeDomains); -VkResult DispatchGetCalibratedTimestampsKHR(VkDevice device, uint32_t timestampCount, - const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, - uint64_t* pMaxDeviation); -void DispatchCmdBindDescriptorSets2KHR(VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo); -void DispatchCmdPushConstants2KHR(VkCommandBuffer commandBuffer, const VkPushConstantsInfoKHR* pPushConstantsInfo); -void DispatchCmdPushDescriptorSet2KHR(VkCommandBuffer commandBuffer, const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo); -void DispatchCmdPushDescriptorSetWithTemplate2KHR(VkCommandBuffer commandBuffer, - const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo); -void DispatchCmdSetDescriptorBufferOffsets2EXT(VkCommandBuffer commandBuffer, - const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo); -void DispatchCmdBindDescriptorBufferEmbeddedSamplers2EXT( - VkCommandBuffer commandBuffer, const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo); -VkResult DispatchCreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback); -void DispatchDestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT callback, - const VkAllocationCallbacks* pAllocator); -void DispatchDebugReportMessageEXT(VkInstance instance, VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, - uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, - const char* pMessage); -VkResult DispatchDebugMarkerSetObjectTagEXT(VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo); -VkResult DispatchDebugMarkerSetObjectNameEXT(VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo); -void DispatchCmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); -void DispatchCmdDebugMarkerEndEXT(VkCommandBuffer commandBuffer); -void DispatchCmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo); -void DispatchCmdBindTransformFeedbackBuffersEXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, - const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes); -void DispatchCmdBeginTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, - const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets); -void DispatchCmdEndTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, - const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets); -void DispatchCmdBeginQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, - VkQueryControlFlags flags, uint32_t index); -void DispatchCmdEndQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index); -void DispatchCmdDrawIndirectByteCountEXT(VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, - VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, - uint32_t vertexStride); -VkResult DispatchCreateCuModuleNVX(VkDevice device, const VkCuModuleCreateInfoNVX* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkCuModuleNVX* pModule); -VkResult DispatchCreateCuFunctionNVX(VkDevice device, const VkCuFunctionCreateInfoNVX* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkCuFunctionNVX* pFunction); -void DispatchDestroyCuModuleNVX(VkDevice device, VkCuModuleNVX module, const VkAllocationCallbacks* pAllocator); -void DispatchDestroyCuFunctionNVX(VkDevice device, VkCuFunctionNVX function, const VkAllocationCallbacks* pAllocator); -void DispatchCmdCuLaunchKernelNVX(VkCommandBuffer commandBuffer, const VkCuLaunchInfoNVX* pLaunchInfo); -uint32_t DispatchGetImageViewHandleNVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo); -uint64_t DispatchGetImageViewHandle64NVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo); -VkResult DispatchGetImageViewAddressNVX(VkDevice device, VkImageView imageView, VkImageViewAddressPropertiesNVX* pProperties); -void DispatchCmdDrawIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkBuffer countBuffer, - VkDeviceSize countBufferOffset, uint32_t maxDrawCount, uint32_t stride); -void DispatchCmdDrawIndexedIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, - VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, - uint32_t stride); -VkResult DispatchGetShaderInfoAMD(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, - VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo); -#ifdef VK_USE_PLATFORM_GGP -VkResult DispatchCreateStreamDescriptorSurfaceGGP(VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); -#endif // VK_USE_PLATFORM_GGP -VkResult DispatchGetPhysicalDeviceExternalImageFormatPropertiesNV( - VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, - VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, - VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties); -#ifdef VK_USE_PLATFORM_WIN32_KHR -VkResult DispatchGetMemoryWin32HandleNV(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, - HANDLE* pHandle); -#endif // VK_USE_PLATFORM_WIN32_KHR -#ifdef VK_USE_PLATFORM_VI_NN -VkResult DispatchCreateViSurfaceNN(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); -#endif // VK_USE_PLATFORM_VI_NN -void DispatchCmdBeginConditionalRenderingEXT(VkCommandBuffer commandBuffer, - const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin); -void DispatchCmdEndConditionalRenderingEXT(VkCommandBuffer commandBuffer); -void DispatchCmdSetViewportWScalingNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, - const VkViewportWScalingNV* pViewportWScalings); -VkResult DispatchReleaseDisplayEXT(VkPhysicalDevice physicalDevice, VkDisplayKHR display); -#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT -VkResult DispatchAcquireXlibDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display); -VkResult DispatchGetRandROutputDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay); -#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT -VkResult DispatchGetPhysicalDeviceSurfaceCapabilities2EXT(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, - VkSurfaceCapabilities2EXT* pSurfaceCapabilities); -VkResult DispatchDisplayPowerControlEXT(VkDevice device, VkDisplayKHR display, const VkDisplayPowerInfoEXT* pDisplayPowerInfo); -VkResult DispatchRegisterDeviceEventEXT(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, - const VkAllocationCallbacks* pAllocator, VkFence* pFence); -VkResult DispatchRegisterDisplayEventEXT(VkDevice device, VkDisplayKHR display, const VkDisplayEventInfoEXT* pDisplayEventInfo, - const VkAllocationCallbacks* pAllocator, VkFence* pFence); -VkResult DispatchGetSwapchainCounterEXT(VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, - uint64_t* pCounterValue); -VkResult DispatchGetRefreshCycleDurationGOOGLE(VkDevice device, VkSwapchainKHR swapchain, - VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties); -VkResult DispatchGetPastPresentationTimingGOOGLE(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pPresentationTimingCount, - VkPastPresentationTimingGOOGLE* pPresentationTimings); -void DispatchCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, - uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles); -void DispatchCmdSetDiscardRectangleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 discardRectangleEnable); -void DispatchCmdSetDiscardRectangleModeEXT(VkCommandBuffer commandBuffer, VkDiscardRectangleModeEXT discardRectangleMode); -void DispatchSetHdrMetadataEXT(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, - const VkHdrMetadataEXT* pMetadata); -#ifdef VK_USE_PLATFORM_IOS_MVK -VkResult DispatchCreateIOSSurfaceMVK(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); -#endif // VK_USE_PLATFORM_IOS_MVK -#ifdef VK_USE_PLATFORM_MACOS_MVK -VkResult DispatchCreateMacOSSurfaceMVK(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); -#endif // VK_USE_PLATFORM_MACOS_MVK -VkResult DispatchSetDebugUtilsObjectNameEXT(VkDevice device, const VkDebugUtilsObjectNameInfoEXT* pNameInfo); -VkResult DispatchSetDebugUtilsObjectTagEXT(VkDevice device, const VkDebugUtilsObjectTagInfoEXT* pTagInfo); -void DispatchQueueBeginDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo); -void DispatchQueueEndDebugUtilsLabelEXT(VkQueue queue); -void DispatchQueueInsertDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo); -void DispatchCmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo); -void DispatchCmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer); -void DispatchCmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo); -VkResult DispatchCreateDebugUtilsMessengerEXT(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkDebugUtilsMessengerEXT* pMessenger); -void DispatchDestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT messenger, - const VkAllocationCallbacks* pAllocator); -void DispatchSubmitDebugUtilsMessageEXT(VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, - VkDebugUtilsMessageTypeFlagsEXT messageTypes, - const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData); -#ifdef VK_USE_PLATFORM_ANDROID_KHR -VkResult DispatchGetAndroidHardwareBufferPropertiesANDROID(VkDevice device, const struct AHardwareBuffer* buffer, - VkAndroidHardwareBufferPropertiesANDROID* pProperties); -VkResult DispatchGetMemoryAndroidHardwareBufferANDROID(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, - struct AHardwareBuffer** pBuffer); -#endif // VK_USE_PLATFORM_ANDROID_KHR -#ifdef VK_ENABLE_BETA_EXTENSIONS -VkResult DispatchCreateExecutionGraphPipelinesAMDX(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, - const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos, - const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); -VkResult DispatchGetExecutionGraphPipelineScratchSizeAMDX(VkDevice device, VkPipeline executionGraph, - VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo); -VkResult DispatchGetExecutionGraphPipelineNodeIndexAMDX(VkDevice device, VkPipeline executionGraph, - const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo, - uint32_t* pNodeIndex); -void DispatchCmdInitializeGraphScratchMemoryAMDX(VkCommandBuffer commandBuffer, VkPipeline executionGraph, VkDeviceAddress scratch, - VkDeviceSize scratchSize); -void DispatchCmdDispatchGraphAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, - const VkDispatchGraphCountInfoAMDX* pCountInfo); -void DispatchCmdDispatchGraphIndirectAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, - const VkDispatchGraphCountInfoAMDX* pCountInfo); -void DispatchCmdDispatchGraphIndirectCountAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, - VkDeviceAddress countInfo); -#endif // VK_ENABLE_BETA_EXTENSIONS -void DispatchCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, const VkSampleLocationsInfoEXT* pSampleLocationsInfo); -void DispatchGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, - VkMultisamplePropertiesEXT* pMultisampleProperties); -VkResult DispatchGetImageDrmFormatModifierPropertiesEXT(VkDevice device, VkImage image, - VkImageDrmFormatModifierPropertiesEXT* pProperties); -VkResult DispatchCreateValidationCacheEXT(VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkValidationCacheEXT* pValidationCache); -void DispatchDestroyValidationCacheEXT(VkDevice device, VkValidationCacheEXT validationCache, - const VkAllocationCallbacks* pAllocator); -VkResult DispatchMergeValidationCachesEXT(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, - const VkValidationCacheEXT* pSrcCaches); -VkResult DispatchGetValidationCacheDataEXT(VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, void* pData); -void DispatchCmdBindShadingRateImageNV(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout); -void DispatchCmdSetViewportShadingRatePaletteNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, - const VkShadingRatePaletteNV* pShadingRatePalettes); -void DispatchCmdSetCoarseSampleOrderNV(VkCommandBuffer commandBuffer, VkCoarseSampleOrderTypeNV sampleOrderType, - uint32_t customSampleOrderCount, const VkCoarseSampleOrderCustomNV* pCustomSampleOrders); -VkResult DispatchCreateAccelerationStructureNV(VkDevice device, const VkAccelerationStructureCreateInfoNV* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkAccelerationStructureNV* pAccelerationStructure); -void DispatchDestroyAccelerationStructureNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, - const VkAllocationCallbacks* pAllocator); -void DispatchGetAccelerationStructureMemoryRequirementsNV(VkDevice device, - const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, - VkMemoryRequirements2KHR* pMemoryRequirements); -VkResult DispatchBindAccelerationStructureMemoryNV(VkDevice device, uint32_t bindInfoCount, - const VkBindAccelerationStructureMemoryInfoNV* pBindInfos); -void DispatchCmdBuildAccelerationStructureNV(VkCommandBuffer commandBuffer, const VkAccelerationStructureInfoNV* pInfo, - VkBuffer instanceData, VkDeviceSize instanceOffset, VkBool32 update, - VkAccelerationStructureNV dst, VkAccelerationStructureNV src, VkBuffer scratch, - VkDeviceSize scratchOffset); -void DispatchCmdCopyAccelerationStructureNV(VkCommandBuffer commandBuffer, VkAccelerationStructureNV dst, - VkAccelerationStructureNV src, VkCopyAccelerationStructureModeKHR mode); -void DispatchCmdTraceRaysNV(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); -VkResult DispatchCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, - const VkRayTracingPipelineCreateInfoNV* pCreateInfos, - const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); -VkResult DispatchGetRayTracingShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, - size_t dataSize, void* pData); -VkResult DispatchGetRayTracingShaderGroupHandlesNV(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, - size_t dataSize, void* pData); -VkResult DispatchGetAccelerationStructureHandleNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, size_t dataSize, - void* pData); -void DispatchCmdWriteAccelerationStructuresPropertiesNV(VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, - const VkAccelerationStructureNV* pAccelerationStructures, - VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery); -VkResult DispatchCompileDeferredNV(VkDevice device, VkPipeline pipeline, uint32_t shader); -VkResult DispatchGetMemoryHostPointerPropertiesEXT(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, - const void* pHostPointer, - VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties); -void DispatchCmdWriteBufferMarkerAMD(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkBuffer dstBuffer, - VkDeviceSize dstOffset, uint32_t marker); -void DispatchCmdWriteBufferMarker2AMD(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkBuffer dstBuffer, - VkDeviceSize dstOffset, uint32_t marker); -VkResult DispatchGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, - VkTimeDomainKHR* pTimeDomains); -VkResult DispatchGetCalibratedTimestampsEXT(VkDevice device, uint32_t timestampCount, - const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, - uint64_t* pMaxDeviation); -void DispatchCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask); -void DispatchCmdDrawMeshTasksIndirectNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, - uint32_t stride); -void DispatchCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, - VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, - uint32_t stride); -void DispatchCmdSetExclusiveScissorEnableNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, - uint32_t exclusiveScissorCount, const VkBool32* pExclusiveScissorEnables); -void DispatchCmdSetExclusiveScissorNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, uint32_t exclusiveScissorCount, - const VkRect2D* pExclusiveScissors); -void DispatchCmdSetCheckpointNV(VkCommandBuffer commandBuffer, const void* pCheckpointMarker); -void DispatchGetQueueCheckpointDataNV(VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointDataNV* pCheckpointData); -void DispatchGetQueueCheckpointData2NV(VkQueue queue, uint32_t* pCheckpointDataCount, VkCheckpointData2NV* pCheckpointData); -VkResult DispatchInitializePerformanceApiINTEL(VkDevice device, const VkInitializePerformanceApiInfoINTEL* pInitializeInfo); -void DispatchUninitializePerformanceApiINTEL(VkDevice device); -VkResult DispatchCmdSetPerformanceMarkerINTEL(VkCommandBuffer commandBuffer, const VkPerformanceMarkerInfoINTEL* pMarkerInfo); -VkResult DispatchCmdSetPerformanceStreamMarkerINTEL(VkCommandBuffer commandBuffer, - const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo); -VkResult DispatchCmdSetPerformanceOverrideINTEL(VkCommandBuffer commandBuffer, const VkPerformanceOverrideInfoINTEL* pOverrideInfo); -VkResult DispatchAcquirePerformanceConfigurationINTEL(VkDevice device, - const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, - VkPerformanceConfigurationINTEL* pConfiguration); -VkResult DispatchReleasePerformanceConfigurationINTEL(VkDevice device, VkPerformanceConfigurationINTEL configuration); -VkResult DispatchQueueSetPerformanceConfigurationINTEL(VkQueue queue, VkPerformanceConfigurationINTEL configuration); -VkResult DispatchGetPerformanceParameterINTEL(VkDevice device, VkPerformanceParameterTypeINTEL parameter, - VkPerformanceValueINTEL* pValue); -void DispatchSetLocalDimmingAMD(VkDevice device, VkSwapchainKHR swapChain, VkBool32 localDimmingEnable); -#ifdef VK_USE_PLATFORM_FUCHSIA -VkResult DispatchCreateImagePipeSurfaceFUCHSIA(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); -#endif // VK_USE_PLATFORM_FUCHSIA -#ifdef VK_USE_PLATFORM_METAL_EXT -VkResult DispatchCreateMetalSurfaceEXT(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); -#endif // VK_USE_PLATFORM_METAL_EXT -VkDeviceAddress DispatchGetBufferDeviceAddressEXT(VkDevice device, const VkBufferDeviceAddressInfo* pInfo); -VkResult DispatchGetPhysicalDeviceToolPropertiesEXT(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, - VkPhysicalDeviceToolProperties* pToolProperties); -VkResult DispatchGetPhysicalDeviceCooperativeMatrixPropertiesNV(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, - VkCooperativeMatrixPropertiesNV* pProperties); -VkResult DispatchGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( - VkPhysicalDevice physicalDevice, uint32_t* pCombinationCount, VkFramebufferMixedSamplesCombinationNV* pCombinations); -#ifdef VK_USE_PLATFORM_WIN32_KHR -VkResult DispatchGetPhysicalDeviceSurfacePresentModes2EXT(VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, - uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes); -VkResult DispatchAcquireFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain); -VkResult DispatchReleaseFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain); -VkResult DispatchGetDeviceGroupSurfacePresentModes2EXT(VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, - VkDeviceGroupPresentModeFlagsKHR* pModes); -#endif // VK_USE_PLATFORM_WIN32_KHR -VkResult DispatchCreateHeadlessSurfaceEXT(VkInstance instance, const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); -void DispatchCmdSetLineStippleEXT(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern); -void DispatchResetQueryPoolEXT(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount); -void DispatchCmdSetCullModeEXT(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode); -void DispatchCmdSetFrontFaceEXT(VkCommandBuffer commandBuffer, VkFrontFace frontFace); -void DispatchCmdSetPrimitiveTopologyEXT(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology); -void DispatchCmdSetViewportWithCountEXT(VkCommandBuffer commandBuffer, uint32_t viewportCount, const VkViewport* pViewports); -void DispatchCmdSetScissorWithCountEXT(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors); -void DispatchCmdBindVertexBuffers2EXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, - const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, - const VkDeviceSize* pStrides); -void DispatchCmdSetDepthTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable); -void DispatchCmdSetDepthWriteEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable); -void DispatchCmdSetDepthCompareOpEXT(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp); -void DispatchCmdSetDepthBoundsTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable); -void DispatchCmdSetStencilTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable); -void DispatchCmdSetStencilOpEXT(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, VkStencilOp passOp, - VkStencilOp depthFailOp, VkCompareOp compareOp); -VkResult DispatchCopyMemoryToImageEXT(VkDevice device, const VkCopyMemoryToImageInfoEXT* pCopyMemoryToImageInfo); -VkResult DispatchCopyImageToMemoryEXT(VkDevice device, const VkCopyImageToMemoryInfoEXT* pCopyImageToMemoryInfo); -VkResult DispatchCopyImageToImageEXT(VkDevice device, const VkCopyImageToImageInfoEXT* pCopyImageToImageInfo); -VkResult DispatchTransitionImageLayoutEXT(VkDevice device, uint32_t transitionCount, - const VkHostImageLayoutTransitionInfoEXT* pTransitions); -void DispatchGetImageSubresourceLayout2EXT(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, - VkSubresourceLayout2KHR* pLayout); -VkResult DispatchReleaseSwapchainImagesEXT(VkDevice device, const VkReleaseSwapchainImagesInfoEXT* pReleaseInfo); -void DispatchGetGeneratedCommandsMemoryRequirementsNV(VkDevice device, const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo, - VkMemoryRequirements2* pMemoryRequirements); -void DispatchCmdPreprocessGeneratedCommandsNV(VkCommandBuffer commandBuffer, - const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo); -void DispatchCmdExecuteGeneratedCommandsNV(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, - const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo); -void DispatchCmdBindPipelineShaderGroupNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline, - uint32_t groupIndex); -VkResult DispatchCreateIndirectCommandsLayoutNV(VkDevice device, const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkIndirectCommandsLayoutNV* pIndirectCommandsLayout); -void DispatchDestroyIndirectCommandsLayoutNV(VkDevice device, VkIndirectCommandsLayoutNV indirectCommandsLayout, - const VkAllocationCallbacks* pAllocator); -void DispatchCmdSetDepthBias2EXT(VkCommandBuffer commandBuffer, const VkDepthBiasInfoEXT* pDepthBiasInfo); -VkResult DispatchAcquireDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, VkDisplayKHR display); -VkResult DispatchGetDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, uint32_t connectorId, VkDisplayKHR* display); -VkResult DispatchCreatePrivateDataSlotEXT(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot); -void DispatchDestroyPrivateDataSlotEXT(VkDevice device, VkPrivateDataSlot privateDataSlot, const VkAllocationCallbacks* pAllocator); -VkResult DispatchSetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, - VkPrivateDataSlot privateDataSlot, uint64_t data); -void DispatchGetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, VkPrivateDataSlot privateDataSlot, - uint64_t* pData); -VkResult DispatchCreateCudaModuleNV(VkDevice device, const VkCudaModuleCreateInfoNV* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkCudaModuleNV* pModule); -VkResult DispatchGetCudaModuleCacheNV(VkDevice device, VkCudaModuleNV module, size_t* pCacheSize, void* pCacheData); -VkResult DispatchCreateCudaFunctionNV(VkDevice device, const VkCudaFunctionCreateInfoNV* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkCudaFunctionNV* pFunction); -void DispatchDestroyCudaModuleNV(VkDevice device, VkCudaModuleNV module, const VkAllocationCallbacks* pAllocator); -void DispatchDestroyCudaFunctionNV(VkDevice device, VkCudaFunctionNV function, const VkAllocationCallbacks* pAllocator); -void DispatchCmdCudaLaunchKernelNV(VkCommandBuffer commandBuffer, const VkCudaLaunchInfoNV* pLaunchInfo); -#ifdef VK_USE_PLATFORM_METAL_EXT -void DispatchExportMetalObjectsEXT(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo); -#endif // VK_USE_PLATFORM_METAL_EXT -void DispatchGetDescriptorSetLayoutSizeEXT(VkDevice device, VkDescriptorSetLayout layout, VkDeviceSize* pLayoutSizeInBytes); -void DispatchGetDescriptorSetLayoutBindingOffsetEXT(VkDevice device, VkDescriptorSetLayout layout, uint32_t binding, - VkDeviceSize* pOffset); -void DispatchGetDescriptorEXT(VkDevice device, const VkDescriptorGetInfoEXT* pDescriptorInfo, size_t dataSize, void* pDescriptor); -void DispatchCmdBindDescriptorBuffersEXT(VkCommandBuffer commandBuffer, uint32_t bufferCount, - const VkDescriptorBufferBindingInfoEXT* pBindingInfos); -void DispatchCmdSetDescriptorBufferOffsetsEXT(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, - VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, - const uint32_t* pBufferIndices, const VkDeviceSize* pOffsets); -void DispatchCmdBindDescriptorBufferEmbeddedSamplersEXT(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, - VkPipelineLayout layout, uint32_t set); -VkResult DispatchGetBufferOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkBufferCaptureDescriptorDataInfoEXT* pInfo, - void* pData); -VkResult DispatchGetImageOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkImageCaptureDescriptorDataInfoEXT* pInfo, - void* pData); -VkResult DispatchGetImageViewOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkImageViewCaptureDescriptorDataInfoEXT* pInfo, - void* pData); -VkResult DispatchGetSamplerOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkSamplerCaptureDescriptorDataInfoEXT* pInfo, - void* pData); -VkResult DispatchGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( - VkDevice device, const VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfo, void* pData); -void DispatchCmdSetFragmentShadingRateEnumNV(VkCommandBuffer commandBuffer, VkFragmentShadingRateNV shadingRate, - const VkFragmentShadingRateCombinerOpKHR combinerOps[2]); -VkResult DispatchGetDeviceFaultInfoEXT(VkDevice device, VkDeviceFaultCountsEXT* pFaultCounts, VkDeviceFaultInfoEXT* pFaultInfo); -#ifdef VK_USE_PLATFORM_WIN32_KHR -VkResult DispatchAcquireWinrtDisplayNV(VkPhysicalDevice physicalDevice, VkDisplayKHR display); -VkResult DispatchGetWinrtDisplayNV(VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR* pDisplay); -#endif // VK_USE_PLATFORM_WIN32_KHR -#ifdef VK_USE_PLATFORM_DIRECTFB_EXT -VkResult DispatchCreateDirectFBSurfaceEXT(VkInstance instance, const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); -VkBool32 DispatchGetPhysicalDeviceDirectFBPresentationSupportEXT(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, - IDirectFB* dfb); -#endif // VK_USE_PLATFORM_DIRECTFB_EXT -void DispatchCmdSetVertexInputEXT(VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, - const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, - uint32_t vertexAttributeDescriptionCount, - const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions); -#ifdef VK_USE_PLATFORM_FUCHSIA -VkResult DispatchGetMemoryZirconHandleFUCHSIA(VkDevice device, const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, - zx_handle_t* pZirconHandle); -VkResult DispatchGetMemoryZirconHandlePropertiesFUCHSIA(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, - zx_handle_t zirconHandle, - VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties); -VkResult DispatchImportSemaphoreZirconHandleFUCHSIA( - VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo); -VkResult DispatchGetSemaphoreZirconHandleFUCHSIA(VkDevice device, const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, - zx_handle_t* pZirconHandle); -VkResult DispatchCreateBufferCollectionFUCHSIA(VkDevice device, const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkBufferCollectionFUCHSIA* pCollection); -VkResult DispatchSetBufferCollectionImageConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, - const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo); -VkResult DispatchSetBufferCollectionBufferConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, - const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo); -void DispatchDestroyBufferCollectionFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, - const VkAllocationCallbacks* pAllocator); -VkResult DispatchGetBufferCollectionPropertiesFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, - VkBufferCollectionPropertiesFUCHSIA* pProperties); -#endif // VK_USE_PLATFORM_FUCHSIA -VkResult DispatchGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(VkDevice device, VkRenderPass renderpass, - VkExtent2D* pMaxWorkgroupSize); -void DispatchCmdSubpassShadingHUAWEI(VkCommandBuffer commandBuffer); -void DispatchCmdBindInvocationMaskHUAWEI(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout); -VkResult DispatchGetMemoryRemoteAddressNV(VkDevice device, const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo, - VkRemoteAddressNV* pAddress); -VkResult DispatchGetPipelinePropertiesEXT(VkDevice device, const VkPipelineInfoEXT* pPipelineInfo, - VkBaseOutStructure* pPipelineProperties); -void DispatchCmdSetPatchControlPointsEXT(VkCommandBuffer commandBuffer, uint32_t patchControlPoints); -void DispatchCmdSetRasterizerDiscardEnableEXT(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable); -void DispatchCmdSetDepthBiasEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable); -void DispatchCmdSetLogicOpEXT(VkCommandBuffer commandBuffer, VkLogicOp logicOp); -void DispatchCmdSetPrimitiveRestartEnableEXT(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable); -#ifdef VK_USE_PLATFORM_SCREEN_QNX -VkResult DispatchCreateScreenSurfaceQNX(VkInstance instance, const VkScreenSurfaceCreateInfoQNX* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); -VkBool32 DispatchGetPhysicalDeviceScreenPresentationSupportQNX(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, - struct _screen_window* window); -#endif // VK_USE_PLATFORM_SCREEN_QNX -void DispatchCmdSetColorWriteEnableEXT(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkBool32* pColorWriteEnables); -void DispatchCmdDrawMultiEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawInfoEXT* pVertexInfo, - uint32_t instanceCount, uint32_t firstInstance, uint32_t stride); -void DispatchCmdDrawMultiIndexedEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawIndexedInfoEXT* pIndexInfo, - uint32_t instanceCount, uint32_t firstInstance, uint32_t stride, const int32_t* pVertexOffset); -VkResult DispatchCreateMicromapEXT(VkDevice device, const VkMicromapCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkMicromapEXT* pMicromap); -void DispatchDestroyMicromapEXT(VkDevice device, VkMicromapEXT micromap, const VkAllocationCallbacks* pAllocator); -void DispatchCmdBuildMicromapsEXT(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkMicromapBuildInfoEXT* pInfos); -VkResult DispatchBuildMicromapsEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, - const VkMicromapBuildInfoEXT* pInfos); -VkResult DispatchCopyMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, const VkCopyMicromapInfoEXT* pInfo); -VkResult DispatchCopyMicromapToMemoryEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, - const VkCopyMicromapToMemoryInfoEXT* pInfo); -VkResult DispatchCopyMemoryToMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, - const VkCopyMemoryToMicromapInfoEXT* pInfo); -VkResult DispatchWriteMicromapsPropertiesEXT(VkDevice device, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, - VkQueryType queryType, size_t dataSize, void* pData, size_t stride); -void DispatchCmdCopyMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT* pInfo); -void DispatchCmdCopyMicromapToMemoryEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT* pInfo); -void DispatchCmdCopyMemoryToMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT* pInfo); -void DispatchCmdWriteMicromapsPropertiesEXT(VkCommandBuffer commandBuffer, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, - VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery); -void DispatchGetDeviceMicromapCompatibilityEXT(VkDevice device, const VkMicromapVersionInfoEXT* pVersionInfo, - VkAccelerationStructureCompatibilityKHR* pCompatibility); -void DispatchGetMicromapBuildSizesEXT(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, - const VkMicromapBuildInfoEXT* pBuildInfo, VkMicromapBuildSizesInfoEXT* pSizeInfo); -void DispatchCmdDrawClusterHUAWEI(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); -void DispatchCmdDrawClusterIndirectHUAWEI(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset); -void DispatchSetDeviceMemoryPriorityEXT(VkDevice device, VkDeviceMemory memory, float priority); -void DispatchGetDescriptorSetLayoutHostMappingInfoVALVE(VkDevice device, - const VkDescriptorSetBindingReferenceVALVE* pBindingReference, - VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping); -void DispatchGetDescriptorSetHostMappingVALVE(VkDevice device, VkDescriptorSet descriptorSet, void** ppData); -void DispatchCmdCopyMemoryIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, uint32_t copyCount, - uint32_t stride); -void DispatchCmdCopyMemoryToImageIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, uint32_t copyCount, - uint32_t stride, VkImage dstImage, VkImageLayout dstImageLayout, - const VkImageSubresourceLayers* pImageSubresources); -void DispatchCmdDecompressMemoryNV(VkCommandBuffer commandBuffer, uint32_t decompressRegionCount, - const VkDecompressMemoryRegionNV* pDecompressMemoryRegions); -void DispatchCmdDecompressMemoryIndirectCountNV(VkCommandBuffer commandBuffer, VkDeviceAddress indirectCommandsAddress, - VkDeviceAddress indirectCommandsCountAddress, uint32_t stride); -void DispatchGetPipelineIndirectMemoryRequirementsNV(VkDevice device, const VkComputePipelineCreateInfo* pCreateInfo, - VkMemoryRequirements2* pMemoryRequirements); -void DispatchCmdUpdatePipelineIndirectBufferNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, - VkPipeline pipeline); -VkDeviceAddress DispatchGetPipelineIndirectDeviceAddressNV(VkDevice device, const VkPipelineIndirectDeviceAddressInfoNV* pInfo); -void DispatchCmdSetDepthClampEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClampEnable); -void DispatchCmdSetPolygonModeEXT(VkCommandBuffer commandBuffer, VkPolygonMode polygonMode); -void DispatchCmdSetRasterizationSamplesEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits rasterizationSamples); -void DispatchCmdSetSampleMaskEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits samples, const VkSampleMask* pSampleMask); -void DispatchCmdSetAlphaToCoverageEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToCoverageEnable); -void DispatchCmdSetAlphaToOneEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToOneEnable); -void DispatchCmdSetLogicOpEnableEXT(VkCommandBuffer commandBuffer, VkBool32 logicOpEnable); -void DispatchCmdSetColorBlendEnableEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, - const VkBool32* pColorBlendEnables); -void DispatchCmdSetColorBlendEquationEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, - const VkColorBlendEquationEXT* pColorBlendEquations); -void DispatchCmdSetColorWriteMaskEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, - const VkColorComponentFlags* pColorWriteMasks); -void DispatchCmdSetTessellationDomainOriginEXT(VkCommandBuffer commandBuffer, VkTessellationDomainOrigin domainOrigin); -void DispatchCmdSetRasterizationStreamEXT(VkCommandBuffer commandBuffer, uint32_t rasterizationStream); -void DispatchCmdSetConservativeRasterizationModeEXT(VkCommandBuffer commandBuffer, - VkConservativeRasterizationModeEXT conservativeRasterizationMode); -void DispatchCmdSetExtraPrimitiveOverestimationSizeEXT(VkCommandBuffer commandBuffer, float extraPrimitiveOverestimationSize); -void DispatchCmdSetDepthClipEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClipEnable); -void DispatchCmdSetSampleLocationsEnableEXT(VkCommandBuffer commandBuffer, VkBool32 sampleLocationsEnable); -void DispatchCmdSetColorBlendAdvancedEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, - const VkColorBlendAdvancedEXT* pColorBlendAdvanced); -void DispatchCmdSetProvokingVertexModeEXT(VkCommandBuffer commandBuffer, VkProvokingVertexModeEXT provokingVertexMode); -void DispatchCmdSetLineRasterizationModeEXT(VkCommandBuffer commandBuffer, VkLineRasterizationModeEXT lineRasterizationMode); -void DispatchCmdSetLineStippleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stippledLineEnable); -void DispatchCmdSetDepthClipNegativeOneToOneEXT(VkCommandBuffer commandBuffer, VkBool32 negativeOneToOne); -void DispatchCmdSetViewportWScalingEnableNV(VkCommandBuffer commandBuffer, VkBool32 viewportWScalingEnable); -void DispatchCmdSetViewportSwizzleNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, - const VkViewportSwizzleNV* pViewportSwizzles); -void DispatchCmdSetCoverageToColorEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageToColorEnable); -void DispatchCmdSetCoverageToColorLocationNV(VkCommandBuffer commandBuffer, uint32_t coverageToColorLocation); -void DispatchCmdSetCoverageModulationModeNV(VkCommandBuffer commandBuffer, VkCoverageModulationModeNV coverageModulationMode); -void DispatchCmdSetCoverageModulationTableEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageModulationTableEnable); -void DispatchCmdSetCoverageModulationTableNV(VkCommandBuffer commandBuffer, uint32_t coverageModulationTableCount, - const float* pCoverageModulationTable); -void DispatchCmdSetShadingRateImageEnableNV(VkCommandBuffer commandBuffer, VkBool32 shadingRateImageEnable); -void DispatchCmdSetRepresentativeFragmentTestEnableNV(VkCommandBuffer commandBuffer, VkBool32 representativeFragmentTestEnable); -void DispatchCmdSetCoverageReductionModeNV(VkCommandBuffer commandBuffer, VkCoverageReductionModeNV coverageReductionMode); -void DispatchGetShaderModuleIdentifierEXT(VkDevice device, VkShaderModule shaderModule, VkShaderModuleIdentifierEXT* pIdentifier); -void DispatchGetShaderModuleCreateInfoIdentifierEXT(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, - VkShaderModuleIdentifierEXT* pIdentifier); -VkResult DispatchGetPhysicalDeviceOpticalFlowImageFormatsNV(VkPhysicalDevice physicalDevice, - const VkOpticalFlowImageFormatInfoNV* pOpticalFlowImageFormatInfo, - uint32_t* pFormatCount, - VkOpticalFlowImageFormatPropertiesNV* pImageFormatProperties); -VkResult DispatchCreateOpticalFlowSessionNV(VkDevice device, const VkOpticalFlowSessionCreateInfoNV* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkOpticalFlowSessionNV* pSession); -void DispatchDestroyOpticalFlowSessionNV(VkDevice device, VkOpticalFlowSessionNV session, const VkAllocationCallbacks* pAllocator); -VkResult DispatchBindOpticalFlowSessionImageNV(VkDevice device, VkOpticalFlowSessionNV session, - VkOpticalFlowSessionBindingPointNV bindingPoint, VkImageView view, - VkImageLayout layout); -void DispatchCmdOpticalFlowExecuteNV(VkCommandBuffer commandBuffer, VkOpticalFlowSessionNV session, - const VkOpticalFlowExecuteInfoNV* pExecuteInfo); -void DispatchAntiLagUpdateAMD(VkDevice device, const VkAntiLagDataAMD* pData); -VkResult DispatchCreateShadersEXT(VkDevice device, uint32_t createInfoCount, const VkShaderCreateInfoEXT* pCreateInfos, - const VkAllocationCallbacks* pAllocator, VkShaderEXT* pShaders); -void DispatchDestroyShaderEXT(VkDevice device, VkShaderEXT shader, const VkAllocationCallbacks* pAllocator); -VkResult DispatchGetShaderBinaryDataEXT(VkDevice device, VkShaderEXT shader, size_t* pDataSize, void* pData); -void DispatchCmdBindShadersEXT(VkCommandBuffer commandBuffer, uint32_t stageCount, const VkShaderStageFlagBits* pStages, - const VkShaderEXT* pShaders); -void DispatchCmdSetDepthClampRangeEXT(VkCommandBuffer commandBuffer, VkDepthClampModeEXT depthClampMode, - const VkDepthClampRangeEXT* pDepthClampRange); -VkResult DispatchGetFramebufferTilePropertiesQCOM(VkDevice device, VkFramebuffer framebuffer, uint32_t* pPropertiesCount, - VkTilePropertiesQCOM* pProperties); -VkResult DispatchGetDynamicRenderingTilePropertiesQCOM(VkDevice device, const VkRenderingInfo* pRenderingInfo, - VkTilePropertiesQCOM* pProperties); -VkResult DispatchSetLatencySleepModeNV(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepModeInfoNV* pSleepModeInfo); -VkResult DispatchLatencySleepNV(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepInfoNV* pSleepInfo); -void DispatchSetLatencyMarkerNV(VkDevice device, VkSwapchainKHR swapchain, const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo); -void DispatchGetLatencyTimingsNV(VkDevice device, VkSwapchainKHR swapchain, VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo); -void DispatchQueueNotifyOutOfBandNV(VkQueue queue, const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo); -void DispatchCmdSetAttachmentFeedbackLoopEnableEXT(VkCommandBuffer commandBuffer, VkImageAspectFlags aspectMask); -#ifdef VK_USE_PLATFORM_SCREEN_QNX -VkResult DispatchGetScreenBufferPropertiesQNX(VkDevice device, const struct _screen_buffer* buffer, - VkScreenBufferPropertiesQNX* pProperties); -#endif // VK_USE_PLATFORM_SCREEN_QNX -void DispatchGetGeneratedCommandsMemoryRequirementsEXT(VkDevice device, const VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfo, - VkMemoryRequirements2* pMemoryRequirements); -void DispatchCmdPreprocessGeneratedCommandsEXT(VkCommandBuffer commandBuffer, - const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, - VkCommandBuffer stateCommandBuffer); -void DispatchCmdExecuteGeneratedCommandsEXT(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, - const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo); -VkResult DispatchCreateIndirectCommandsLayoutEXT(VkDevice device, const VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkIndirectCommandsLayoutEXT* pIndirectCommandsLayout); -void DispatchDestroyIndirectCommandsLayoutEXT(VkDevice device, VkIndirectCommandsLayoutEXT indirectCommandsLayout, - const VkAllocationCallbacks* pAllocator); -VkResult DispatchCreateIndirectExecutionSetEXT(VkDevice device, const VkIndirectExecutionSetCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkIndirectExecutionSetEXT* pIndirectExecutionSet); -void DispatchDestroyIndirectExecutionSetEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, - const VkAllocationCallbacks* pAllocator); -void DispatchUpdateIndirectExecutionSetPipelineEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, - uint32_t executionSetWriteCount, - const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites); -void DispatchUpdateIndirectExecutionSetShaderEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, - uint32_t executionSetWriteCount, - const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites); -VkResult DispatchGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( - VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixFlexibleDimensionsPropertiesNV* pProperties); -VkResult DispatchCreateAccelerationStructureKHR(VkDevice device, const VkAccelerationStructureCreateInfoKHR* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkAccelerationStructureKHR* pAccelerationStructure); -void DispatchDestroyAccelerationStructureKHR(VkDevice device, VkAccelerationStructureKHR accelerationStructure, - const VkAllocationCallbacks* pAllocator); -void DispatchCmdBuildAccelerationStructuresKHR(VkCommandBuffer commandBuffer, uint32_t infoCount, - const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, - const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos); -void DispatchCmdBuildAccelerationStructuresIndirectKHR(VkCommandBuffer commandBuffer, uint32_t infoCount, - const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, - const VkDeviceAddress* pIndirectDeviceAddresses, - const uint32_t* pIndirectStrides, - const uint32_t* const* ppMaxPrimitiveCounts); -VkResult DispatchBuildAccelerationStructuresKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, - const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, - const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos); -VkResult DispatchCopyAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, - const VkCopyAccelerationStructureInfoKHR* pInfo); -VkResult DispatchCopyAccelerationStructureToMemoryKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, - const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo); -VkResult DispatchCopyMemoryToAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, - const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo); -VkResult DispatchWriteAccelerationStructuresPropertiesKHR(VkDevice device, uint32_t accelerationStructureCount, - const VkAccelerationStructureKHR* pAccelerationStructures, - VkQueryType queryType, size_t dataSize, void* pData, size_t stride); -void DispatchCmdCopyAccelerationStructureKHR(VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureInfoKHR* pInfo); -void DispatchCmdCopyAccelerationStructureToMemoryKHR(VkCommandBuffer commandBuffer, - const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo); -void DispatchCmdCopyMemoryToAccelerationStructureKHR(VkCommandBuffer commandBuffer, - const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo); -VkDeviceAddress DispatchGetAccelerationStructureDeviceAddressKHR(VkDevice device, - const VkAccelerationStructureDeviceAddressInfoKHR* pInfo); -void DispatchCmdWriteAccelerationStructuresPropertiesKHR(VkCommandBuffer commandBuffer, uint32_t accelerationStructureCount, - const VkAccelerationStructureKHR* pAccelerationStructures, - VkQueryType queryType, VkQueryPool queryPool, uint32_t firstQuery); -void DispatchGetDeviceAccelerationStructureCompatibilityKHR(VkDevice device, - const VkAccelerationStructureVersionInfoKHR* pVersionInfo, - VkAccelerationStructureCompatibilityKHR* pCompatibility); -void DispatchGetAccelerationStructureBuildSizesKHR(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, - const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo, - const uint32_t* pMaxPrimitiveCounts, - VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo); -void DispatchCmdTraceRaysKHR(VkCommandBuffer commandBuffer, const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, - const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, - const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, - const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, uint32_t width, uint32_t height, - uint32_t depth); -VkResult DispatchCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, - VkPipelineCache pipelineCache, uint32_t createInfoCount, - const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, - const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines); -VkResult DispatchGetRayTracingCaptureReplayShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, - uint32_t groupCount, size_t dataSize, void* pData); -void DispatchCmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer, - const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, - const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, - const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, - const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, - VkDeviceAddress indirectDeviceAddress); -VkDeviceSize DispatchGetRayTracingShaderGroupStackSizeKHR(VkDevice device, VkPipeline pipeline, uint32_t group, - VkShaderGroupShaderKHR groupShader); -void DispatchCmdSetRayTracingPipelineStackSizeKHR(VkCommandBuffer commandBuffer, uint32_t pipelineStackSize); -void DispatchCmdDrawMeshTasksEXT(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ); -void DispatchCmdDrawMeshTasksIndirectEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, - uint32_t stride); -void DispatchCmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, - VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, - uint32_t stride); - -// NOLINTEND diff --git a/layers/vulkan/generated/object_tracker.cpp b/layers/vulkan/generated/object_tracker.cpp index d4bcd2bef3b..8af439a9227 100644 --- a/layers/vulkan/generated/object_tracker.cpp +++ b/layers/vulkan/generated/object_tracker.cpp @@ -24,7 +24,6 @@ // NOLINTBEGIN // clang-format off -#include "chassis.h" #include "object_tracker/object_lifetime_validation.h" ReadLockGuard ObjectLifetimes::ReadLock() const { return ReadLockGuard(validation_object_mutex, std::defer_lock); } WriteLockGuard ObjectLifetimes::WriteLock() { return WriteLockGuard(validation_object_mutex, std::defer_lock); } @@ -2909,7 +2908,8 @@ bool ObjectLifetimes::PreCallValidateCreateSwapchainKHR(VkDevice device, const V if (pCreateInfo) { [[maybe_unused]] const Location pCreateInfo_loc = error_obj.location.dot(Field::pCreateInfo); auto instance_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - auto instance_object_lifetimes = instance_data->GetValidationObject(); + auto instance_object_lifetimes = + static_cast(instance_data->GetValidationObject(LayerObjectTypeObjectTracker)); skip |= instance_object_lifetimes->ValidateObject( pCreateInfo->surface, kVulkanObjectTypeSurfaceKHR, false, "VUID-VkSwapchainCreateInfoKHR-surface-parameter", "VUID-VkSwapchainCreateInfoKHR-commonparent", pCreateInfo_loc.dot(Field::surface), kVulkanObjectTypeInstance); @@ -3036,7 +3036,8 @@ bool ObjectLifetimes::PreCallValidateGetDeviceGroupSurfacePresentModesKHR(VkDevi // Checked by chassis: device: "VUID-vkGetDeviceGroupSurfacePresentModesKHR-device-parameter" // Checked by chassis: device: "VUID-vkGetDeviceGroupSurfacePresentModesKHR-commonparent" auto instance_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - auto instance_object_lifetimes = instance_data->GetValidationObject(); + auto instance_object_lifetimes = + static_cast(instance_data->GetValidationObject(LayerObjectTypeObjectTracker)); skip |= instance_object_lifetimes->ValidateObject(surface, kVulkanObjectTypeSurfaceKHR, false, "VUID-vkGetDeviceGroupSurfacePresentModesKHR-surface-parameter", "VUID-vkGetDeviceGroupSurfacePresentModesKHR-commonparent", @@ -3179,7 +3180,8 @@ bool ObjectLifetimes::PreCallValidateCreateSharedSwapchainsKHR(VkDevice device, for (uint32_t index0 = 0; index0 < swapchainCount; ++index0) { [[maybe_unused]] const Location index0_loc = error_obj.location.dot(Field::pCreateInfos, index0); auto instance_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - auto instance_object_lifetimes = instance_data->GetValidationObject(); + auto instance_object_lifetimes = + static_cast(instance_data->GetValidationObject(LayerObjectTypeObjectTracker)); skip |= instance_object_lifetimes->ValidateObject( pCreateInfos[index0].surface, kVulkanObjectTypeSurfaceKHR, false, "VUID-VkSwapchainCreateInfoKHR-surface-parameter", "VUID-VkSwapchainCreateInfoKHR-commonparent", index0_loc.dot(Field::surface), kVulkanObjectTypeInstance); @@ -4992,7 +4994,8 @@ bool ObjectLifetimes::PreCallValidateDisplayPowerControlEXT(VkDevice device, VkD // Checked by chassis: device: "VUID-vkDisplayPowerControlEXT-device-parameter" // Checked by chassis: device: "VUID-vkDisplayPowerControlEXT-commonparent" auto instance_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - auto instance_object_lifetimes = instance_data->GetValidationObject(); + auto instance_object_lifetimes = + static_cast(instance_data->GetValidationObject(LayerObjectTypeObjectTracker)); skip |= instance_object_lifetimes->ValidateObject( display, kVulkanObjectTypeDisplayKHR, false, "VUID-vkDisplayPowerControlEXT-display-parameter", "VUID-vkDisplayPowerControlEXT-commonparent", error_obj.location.dot(Field::display), kVulkanObjectTypePhysicalDevice); @@ -5018,7 +5021,8 @@ bool ObjectLifetimes::PreCallValidateRegisterDisplayEventEXT(VkDevice device, Vk // Checked by chassis: device: "VUID-vkRegisterDisplayEventEXT-device-parameter" // Checked by chassis: device: "VUID-vkRegisterDisplayEventEXT-commonparent" auto instance_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - auto instance_object_lifetimes = instance_data->GetValidationObject(); + auto instance_object_lifetimes = + static_cast(instance_data->GetValidationObject(LayerObjectTypeObjectTracker)); skip |= instance_object_lifetimes->ValidateObject( display, kVulkanObjectTypeDisplayKHR, false, "VUID-vkRegisterDisplayEventEXT-display-parameter", "VUID-vkRegisterDisplayEventEXT-commonparent", error_obj.location.dot(Field::display), kVulkanObjectTypePhysicalDevice); diff --git a/layers/vulkan/generated/stateless_validation_helper.cpp b/layers/vulkan/generated/stateless_validation_helper.cpp index 3b595bba7c6..1bded09116a 100644 --- a/layers/vulkan/generated/stateless_validation_helper.cpp +++ b/layers/vulkan/generated/stateless_validation_helper.cpp @@ -22,11 +22,9 @@ // NOLINTBEGIN -#include "chassis.h" - #include "stateless/stateless_validation.h" #include "generated/enum_flag_bits.h" -#include "generated/layer_chassis_dispatch.h" +#include "generated/dispatch_functions.h" bool StatelessValidation::ValidatePnextFeatureStructContents(const Location& loc, const VkBaseOutStructure* header, const char* pnext_vuid, const VkPhysicalDevice physicalDevice, diff --git a/layers/vulkan/generated/thread_safety.cpp b/layers/vulkan/generated/thread_safety.cpp index c1dad5fe32f..42c83312920 100644 --- a/layers/vulkan/generated/thread_safety.cpp +++ b/layers/vulkan/generated/thread_safety.cpp @@ -23,7 +23,6 @@ // NOLINTBEGIN -#include "chassis.h" #include "thread_tracker/thread_safety_validation.h" void ThreadSafety::PreCallRecordCreateInstance(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance, const RecordObject& record_obj) {} diff --git a/layers/vulkan/generated/validation_object.cpp b/layers/vulkan/generated/validation_object.cpp new file mode 100644 index 00000000000..1a91173523b --- /dev/null +++ b/layers/vulkan/generated/validation_object.cpp @@ -0,0 +1,136 @@ +// *** THIS FILE IS GENERATED - DO NOT EDIT *** +// See layer_chassis_generator.py for modifications + +/*************************************************************************** + * + * Copyright (c) 2015-2024 The Khronos Group Inc. + * Copyright (c) 2015-2024 Valve Corporation + * Copyright (c) 2015-2024 LunarG, Inc. + * Copyright (c) 2015-2024 Google Inc. + * Copyright (c) 2023-2024 RasterGrid Kft. + * + * 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. + ****************************************************************************/ + +// NOLINTBEGIN + +#include +#include +#include + +#include "chassis/validation_object.h" + +thread_local WriteLockGuard* ValidationObject::record_guard{}; + +void ValidationObject::DispatchGetPhysicalDeviceFeatures2Helper(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceFeatures2* pFeatures) const { + if (api_version >= VK_API_VERSION_1_1) { + return dispatch_->GetPhysicalDeviceFeatures2(physicalDevice, pFeatures); + } else { + return dispatch_->GetPhysicalDeviceFeatures2KHR(physicalDevice, pFeatures); + } +} + +void ValidationObject::DispatchGetPhysicalDeviceProperties2Helper(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceProperties2* pProperties) const { + if (api_version >= VK_API_VERSION_1_1) { + return dispatch_->GetPhysicalDeviceProperties2(physicalDevice, pProperties); + } else { + return dispatch_->GetPhysicalDeviceProperties2KHR(physicalDevice, pProperties); + } +} + +void ValidationObject::DispatchGetPhysicalDeviceFormatProperties2Helper(VkPhysicalDevice physicalDevice, VkFormat format, + VkFormatProperties2* pFormatProperties) const { + if (api_version >= VK_API_VERSION_1_1) { + return dispatch_->GetPhysicalDeviceFormatProperties2(physicalDevice, format, pFormatProperties); + } else { + return dispatch_->GetPhysicalDeviceFormatProperties2KHR(physicalDevice, format, pFormatProperties); + } +} + +VkResult ValidationObject::DispatchGetPhysicalDeviceImageFormatProperties2Helper( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, + VkImageFormatProperties2* pImageFormatProperties) const { + if (api_version >= VK_API_VERSION_1_1) { + return dispatch_->GetPhysicalDeviceImageFormatProperties2(physicalDevice, pImageFormatInfo, pImageFormatProperties); + } else { + return dispatch_->GetPhysicalDeviceImageFormatProperties2KHR(physicalDevice, pImageFormatInfo, pImageFormatProperties); + } +} + +void ValidationObject::DispatchGetPhysicalDeviceQueueFamilyProperties2Helper( + VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties2* pQueueFamilyProperties) const { + if (api_version >= VK_API_VERSION_1_1) { + return dispatch_->GetPhysicalDeviceQueueFamilyProperties2(physicalDevice, pQueueFamilyPropertyCount, + pQueueFamilyProperties); + } else { + return dispatch_->GetPhysicalDeviceQueueFamilyProperties2KHR(physicalDevice, pQueueFamilyPropertyCount, + pQueueFamilyProperties); + } +} + +void ValidationObject::DispatchGetPhysicalDeviceMemoryProperties2Helper( + VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2* pMemoryProperties) const { + if (api_version >= VK_API_VERSION_1_1) { + return dispatch_->GetPhysicalDeviceMemoryProperties2(physicalDevice, pMemoryProperties); + } else { + return dispatch_->GetPhysicalDeviceMemoryProperties2KHR(physicalDevice, pMemoryProperties); + } +} + +void ValidationObject::DispatchGetPhysicalDeviceSparseImageFormatProperties2Helper( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, + VkSparseImageFormatProperties2* pProperties) const { + if (api_version >= VK_API_VERSION_1_1) { + return dispatch_->GetPhysicalDeviceSparseImageFormatProperties2(physicalDevice, pFormatInfo, pPropertyCount, pProperties); + } else { + return dispatch_->GetPhysicalDeviceSparseImageFormatProperties2KHR(physicalDevice, pFormatInfo, pPropertyCount, + pProperties); + } +} + +void ValidationObject::DispatchGetPhysicalDeviceExternalSemaphorePropertiesHelper( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, + VkExternalSemaphoreProperties* pExternalSemaphoreProperties) const { + if (api_version >= VK_API_VERSION_1_1) { + return dispatch_->GetPhysicalDeviceExternalSemaphoreProperties(physicalDevice, pExternalSemaphoreInfo, + pExternalSemaphoreProperties); + } else { + return dispatch_->GetPhysicalDeviceExternalSemaphorePropertiesKHR(physicalDevice, pExternalSemaphoreInfo, + pExternalSemaphoreProperties); + } +} + +void ValidationObject::DispatchGetPhysicalDeviceExternalFencePropertiesHelper( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, + VkExternalFenceProperties* pExternalFenceProperties) const { + if (api_version >= VK_API_VERSION_1_1) { + return dispatch_->GetPhysicalDeviceExternalFenceProperties(physicalDevice, pExternalFenceInfo, pExternalFenceProperties); + } else { + return dispatch_->GetPhysicalDeviceExternalFencePropertiesKHR(physicalDevice, pExternalFenceInfo, pExternalFenceProperties); + } +} + +void ValidationObject::DispatchGetPhysicalDeviceExternalBufferPropertiesHelper( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, + VkExternalBufferProperties* pExternalBufferProperties) const { + if (api_version >= VK_API_VERSION_1_1) { + return dispatch_->GetPhysicalDeviceExternalBufferProperties(physicalDevice, pExternalBufferInfo, pExternalBufferProperties); + } else { + return dispatch_->GetPhysicalDeviceExternalBufferPropertiesKHR(physicalDevice, pExternalBufferInfo, + pExternalBufferProperties); + } +} + +// NOLINTEND diff --git a/layers/vulkan/generated/validation_object_methods.h b/layers/vulkan/generated/validation_object_methods.h new file mode 100644 index 00000000000..7e55bd977fe --- /dev/null +++ b/layers/vulkan/generated/validation_object_methods.h @@ -0,0 +1,6955 @@ +// *** THIS FILE IS GENERATED - DO NOT EDIT *** +// See layer_chassis_generator.py for modifications + +/*************************************************************************** + * + * Copyright (c) 2015-2024 The Khronos Group Inc. + * Copyright (c) 2015-2024 Valve Corporation + * Copyright (c) 2015-2024 LunarG, Inc. + * Copyright (c) 2015-2024 Google Inc. + * Copyright (c) 2023-2024 RasterGrid Kft. + * + * 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. + ****************************************************************************/ + +// NOLINTBEGIN +// We make many internal dispatch calls to extended query functions which can depend on the API version +void DispatchGetPhysicalDeviceFeatures2Helper(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures) const; +void DispatchGetPhysicalDeviceProperties2Helper(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties) const; +void DispatchGetPhysicalDeviceFormatProperties2Helper(VkPhysicalDevice physicalDevice, VkFormat format, + VkFormatProperties2* pFormatProperties) const; +VkResult DispatchGetPhysicalDeviceImageFormatProperties2Helper(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, + VkImageFormatProperties2* pImageFormatProperties) const; +void DispatchGetPhysicalDeviceQueueFamilyProperties2Helper(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, + VkQueueFamilyProperties2* pQueueFamilyProperties) const; +void DispatchGetPhysicalDeviceMemoryProperties2Helper(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceMemoryProperties2* pMemoryProperties) const; +void DispatchGetPhysicalDeviceSparseImageFormatProperties2Helper(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, + uint32_t* pPropertyCount, + VkSparseImageFormatProperties2* pProperties) const; +void DispatchGetPhysicalDeviceExternalSemaphorePropertiesHelper(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, + VkExternalSemaphoreProperties* pExternalSemaphoreProperties) const; +void DispatchGetPhysicalDeviceExternalFencePropertiesHelper(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, + VkExternalFenceProperties* pExternalFenceProperties) const; +void DispatchGetPhysicalDeviceExternalBufferPropertiesHelper(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, + VkExternalBufferProperties* pExternalBufferProperties) const; +// Pre/post hook point declarations +virtual bool PreCallValidateCreateInstance(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkInstance* pInstance, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateInstance(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkInstance* pInstance, const RecordObject& record_obj) {} +virtual void PostCallRecordCreateInstance(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + VkInstance* pInstance, const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyInstance(VkInstance instance, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyInstance(VkInstance instance, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyInstance(VkInstance instance, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateEnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount, + VkPhysicalDevice* pPhysicalDevices, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordEnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount, + VkPhysicalDevice* pPhysicalDevices, const RecordObject& record_obj) {} +virtual void PostCallRecordEnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount, + VkPhysicalDevice* pPhysicalDevices, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, + VkFormatProperties* pFormatProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, + VkFormatProperties* pFormatProperties, const RecordObject& record_obj) { +} +virtual void PostCallRecordGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, + VkFormatProperties* pFormatProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, + VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, + VkImageCreateFlags flags, + VkImageFormatProperties* pImageFormatProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, + VkImageTiling tiling, VkImageUsageFlags usage, + VkImageCreateFlags flags, + VkImageFormatProperties* pImageFormatProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, + VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, + VkImageCreateFlags flags, + VkImageFormatProperties* pImageFormatProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, + uint32_t* pQueueFamilyPropertyCount, + VkQueueFamilyProperties* pQueueFamilyProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, + uint32_t* pQueueFamilyPropertyCount, + VkQueueFamilyProperties* pQueueFamilyProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, + uint32_t* pQueueFamilyPropertyCount, + VkQueueFamilyProperties* pQueueFamilyProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceMemoryProperties* pMemoryProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceMemoryProperties* pMemoryProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceMemoryProperties* pMemoryProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetInstanceProcAddr(VkInstance instance, const char* pName, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetInstanceProcAddr(VkInstance instance, const char* pName, const RecordObject& record_obj) {} +virtual void PostCallRecordGetInstanceProcAddr(VkInstance instance, const char* pName, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeviceProcAddr(VkDevice device, const char* pName, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeviceProcAddr(VkDevice device, const char* pName, const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeviceProcAddr(VkDevice device, const char* pName, const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDevice* pDevice, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDevice* pDevice, const RecordObject& record_obj) { +} +virtual void PostCallRecordCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDevice* pDevice, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) { +} +virtual bool PreCallValidateEnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pPropertyCount, + VkExtensionProperties* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordEnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pPropertyCount, + VkExtensionProperties* pProperties, const RecordObject& record_obj) { +} +virtual void PostCallRecordEnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pPropertyCount, + VkExtensionProperties* pProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, + uint32_t* pPropertyCount, VkExtensionProperties* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, + uint32_t* pPropertyCount, VkExtensionProperties* pProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, + uint32_t* pPropertyCount, VkExtensionProperties* pProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateEnumerateInstanceLayerProperties(uint32_t* pPropertyCount, VkLayerProperties* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordEnumerateInstanceLayerProperties(uint32_t* pPropertyCount, VkLayerProperties* pProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordEnumerateInstanceLayerProperties(uint32_t* pPropertyCount, VkLayerProperties* pProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkLayerProperties* pProperties, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkLayerProperties* pProperties, const RecordObject& record_obj) {} +virtual void PostCallRecordEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkLayerProperties* pProperties, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue, + const RecordObject& record_obj) {} +virtual bool PreCallValidateQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence, + const RecordObject& record_obj) {} +virtual void PostCallRecordQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence, + const RecordObject& record_obj) {} +virtual bool PreCallValidateQueueWaitIdle(VkQueue queue, const ErrorObject& error_obj) const { return false; } +virtual void PreCallRecordQueueWaitIdle(VkQueue queue, const RecordObject& record_obj) {} +virtual void PostCallRecordQueueWaitIdle(VkQueue queue, const RecordObject& record_obj) {} +virtual bool PreCallValidateDeviceWaitIdle(VkDevice device, const ErrorObject& error_obj) const { return false; } +virtual void PreCallRecordDeviceWaitIdle(VkDevice device, const RecordObject& record_obj) {} +virtual void PostCallRecordDeviceWaitIdle(VkDevice device, const RecordObject& record_obj) {} +virtual bool PreCallValidateAllocateMemory(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, + const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordAllocateMemory(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, + const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory, + const RecordObject& record_obj) {} +virtual void PostCallRecordAllocateMemory(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, + const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory, + const RecordObject& record_obj) {} +virtual bool PreCallValidateFreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordFreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordFreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, + VkMemoryMapFlags flags, void** ppData, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, + VkMemoryMapFlags flags, void** ppData, const RecordObject& record_obj) {} +virtual void PostCallRecordMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, + VkMemoryMapFlags flags, void** ppData, const RecordObject& record_obj) {} +virtual bool PreCallValidateUnmapMemory(VkDevice device, VkDeviceMemory memory, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordUnmapMemory(VkDevice device, VkDeviceMemory memory, const RecordObject& record_obj) {} +virtual void PostCallRecordUnmapMemory(VkDevice device, VkDeviceMemory memory, const RecordObject& record_obj) {} +virtual bool PreCallValidateFlushMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, + const VkMappedMemoryRange* pMemoryRanges, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordFlushMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, + const VkMappedMemoryRange* pMemoryRanges, const RecordObject& record_obj) {} +virtual void PostCallRecordFlushMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, + const VkMappedMemoryRange* pMemoryRanges, const RecordObject& record_obj) {} +virtual bool PreCallValidateInvalidateMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, + const VkMappedMemoryRange* pMemoryRanges, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordInvalidateMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, + const VkMappedMemoryRange* pMemoryRanges, const RecordObject& record_obj) {} +virtual void PostCallRecordInvalidateMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, + const VkMappedMemoryRange* pMemoryRanges, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes, + const RecordObject& record_obj) {} +virtual bool PreCallValidateBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset, + const RecordObject& record_obj) {} +virtual void PostCallRecordBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset, + const RecordObject& record_obj) {} +virtual bool PreCallValidateBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset, + const RecordObject& record_obj) {} +virtual void PostCallRecordBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetImageSparseMemoryRequirements(VkDevice device, VkImage image, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements* pSparseMemoryRequirements, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements* pSparseMemoryRequirements, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements* pSparseMemoryRequirements, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, + VkImageType type, VkSampleCountFlagBits samples, + VkImageUsageFlags usage, VkImageTiling tiling, + uint32_t* pPropertyCount, + VkSparseImageFormatProperties* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceSparseImageFormatProperties( + VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, + VkImageTiling tiling, uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties, const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceSparseImageFormatProperties( + VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, + VkImageTiling tiling, uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties, const RecordObject& record_obj) {} +virtual bool PreCallValidateQueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordQueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence, + const RecordObject& record_obj) {} +virtual void PostCallRecordQueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateFence(VkDevice device, const VkFenceCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkFence* pFence, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateFence(VkDevice device, const VkFenceCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkFence* pFence, const RecordObject& record_obj) {} +virtual void PostCallRecordCreateFence(VkDevice device, const VkFenceCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkFence* pFence, const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateResetFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordResetFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, + const RecordObject& record_obj) {} +virtual void PostCallRecordResetFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetFenceStatus(VkDevice device, VkFence fence, const ErrorObject& error_obj) const { return false; } +virtual void PreCallRecordGetFenceStatus(VkDevice device, VkFence fence, const RecordObject& record_obj) {} +virtual void PostCallRecordGetFenceStatus(VkDevice device, VkFence fence, const RecordObject& record_obj) {} +virtual bool PreCallValidateWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, + uint64_t timeout, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, + uint64_t timeout, const RecordObject& record_obj) {} +virtual void PostCallRecordWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, + uint64_t timeout, const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateEvent(VkDevice device, const VkEventCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkEvent* pEvent, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateEvent(VkDevice device, const VkEventCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkEvent* pEvent, const RecordObject& record_obj) {} +virtual void PostCallRecordCreateEvent(VkDevice device, const VkEventCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkEvent* pEvent, const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetEventStatus(VkDevice device, VkEvent event, const ErrorObject& error_obj) const { return false; } +virtual void PreCallRecordGetEventStatus(VkDevice device, VkEvent event, const RecordObject& record_obj) {} +virtual void PostCallRecordGetEventStatus(VkDevice device, VkEvent event, const RecordObject& record_obj) {} +virtual bool PreCallValidateSetEvent(VkDevice device, VkEvent event, const ErrorObject& error_obj) const { return false; } +virtual void PreCallRecordSetEvent(VkDevice device, VkEvent event, const RecordObject& record_obj) {} +virtual void PostCallRecordSetEvent(VkDevice device, VkEvent event, const RecordObject& record_obj) {} +virtual bool PreCallValidateResetEvent(VkDevice device, VkEvent event, const ErrorObject& error_obj) const { return false; } +virtual void PreCallRecordResetEvent(VkDevice device, VkEvent event, const RecordObject& record_obj) {} +virtual void PostCallRecordResetEvent(VkDevice device, VkEvent event, const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, + size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, + size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, + size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer, const RecordObject& record_obj) { +} +virtual void PostCallRecordCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateBufferView(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkBufferView* pView, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateBufferView(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkBufferView* pView, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateBufferView(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkBufferView* pView, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkImage* pImage, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkImage* pImage, const RecordObject& record_obj) {} +virtual void PostCallRecordCreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkImage* pImage, const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, + VkSubresourceLayout* pLayout, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, + VkSubresourceLayout* pLayout, const RecordObject& record_obj) {} +virtual void PostCallRecordGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, + VkSubresourceLayout* pLayout, const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkImageView* pView, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkImageView* pView, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkImageView* pView, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, + const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual bool PreCallValidateCreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, + const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData, + const RecordObject& record_obj) {} +virtual bool PreCallValidateMergePipelineCaches(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, + const VkPipelineCache* pSrcCaches, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordMergePipelineCaches(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, + const VkPipelineCache* pSrcCaches, const RecordObject& record_obj) {} +virtual void PostCallRecordMergePipelineCaches(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, + const VkPipelineCache* pSrcCaches, const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkGraphicsPipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkGraphicsPipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkGraphicsPipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkComputePipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkComputePipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkComputePipelineCreateInfo* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout, + const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateSampler(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSampler* pSampler, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateSampler(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSampler* pSampler, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateSampler(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSampler* pSampler, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, + const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, + const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual bool PreCallValidateResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags, + const RecordObject& record_obj) {} +virtual void PostCallRecordResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags, + const RecordObject& record_obj) {} +virtual bool PreCallValidateAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, + VkDescriptorSet* pDescriptorSets, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, + VkDescriptorSet* pDescriptorSets, const RecordObject& record_obj) {} +virtual void PostCallRecordAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, + VkDescriptorSet* pDescriptorSets, const RecordObject& record_obj) {} +virtual bool PreCallValidateFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, + const VkDescriptorSet* pDescriptorSets, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, + const VkDescriptorSet* pDescriptorSets, const RecordObject& record_obj) {} +virtual void PostCallRecordFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, + const VkDescriptorSet* pDescriptorSets, const RecordObject& record_obj) {} +virtual bool PreCallValidateUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, + const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, + const VkCopyDescriptorSet* pDescriptorCopies, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, + const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, + const VkCopyDescriptorSet* pDescriptorCopies, const RecordObject& record_obj) {} +virtual void PostCallRecordUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, + const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, + const VkCopyDescriptorSet* pDescriptorCopies, const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags, + const RecordObject& record_obj) {} +virtual void PostCallRecordResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags, + const RecordObject& record_obj) {} +virtual bool PreCallValidateAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, + VkCommandBuffer* pCommandBuffers, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, + VkCommandBuffer* pCommandBuffers, const RecordObject& record_obj) {} +virtual void PostCallRecordAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, + VkCommandBuffer* pCommandBuffers, const RecordObject& record_obj) {} +virtual bool PreCallValidateFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, + const VkCommandBuffer* pCommandBuffers, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, + const VkCommandBuffer* pCommandBuffers, const RecordObject& record_obj) {} +virtual void PostCallRecordFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, + const VkCommandBuffer* pCommandBuffers, const RecordObject& record_obj) {} +virtual bool PreCallValidateBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateEndCommandBuffer(VkCommandBuffer commandBuffer, const ErrorObject& error_obj) const { return false; } +virtual void PreCallRecordEndCommandBuffer(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} +virtual void PostCallRecordEndCommandBuffer(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} +virtual bool PreCallValidateResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags, + const RecordObject& record_obj) {} +virtual void PostCallRecordResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipeline pipeline, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipeline pipeline, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, + const VkViewport* pViewports, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, + const VkViewport* pViewports, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, + const VkViewport* pViewports, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, + const VkRect2D* pScissors, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, + const VkRect2D* pScissors, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, + const VkRect2D* pScissors, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, + float depthBiasSlopeFactor, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, + float depthBiasSlopeFactor, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, + float depthBiasSlopeFactor, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4], + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4], + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4], + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, + uint32_t compareMask, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, + uint32_t compareMask, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, + const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, + const uint32_t* pDynamicOffsets, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, + const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, + const uint32_t* pDynamicOffsets, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, + const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, + const uint32_t* pDynamicOffsets, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkIndexType indexType, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkIndexType indexType, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkIndexType indexType, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, + const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, + const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, + const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, + uint32_t firstVertex, uint32_t firstInstance, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, + uint32_t firstInstance, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, + uint32_t firstVertex, uint32_t firstInstance, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, + uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, + uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, + uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, + uint32_t stride, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, + uint32_t stride, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, + uint32_t stride, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + uint32_t drawCount, uint32_t stride, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + uint32_t drawCount, uint32_t stride, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + uint32_t drawCount, uint32_t stride, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, + uint32_t groupCountZ, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, + uint32_t groupCountZ, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDispatch(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, + uint32_t groupCountZ, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, + uint32_t regionCount, const VkBufferCopy* pRegions, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, + const VkBufferCopy* pRegions, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, + uint32_t regionCount, const VkBufferCopy* pRegions, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, + VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, + const VkImageCopy* pRegions, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, + VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, + const VkImageCopy* pRegions, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, + VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, + const VkImageCopy* pRegions, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, + VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, + const VkImageBlit* pRegions, VkFilter filter, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, + VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, + const VkImageBlit* pRegions, VkFilter filter, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, + VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, + const VkImageBlit* pRegions, VkFilter filter, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, + VkImageLayout dstImageLayout, uint32_t regionCount, + const VkBufferImageCopy* pRegions, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, + VkImageLayout dstImageLayout, uint32_t regionCount, + const VkBufferImageCopy* pRegions, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, + VkImageLayout dstImageLayout, uint32_t regionCount, + const VkBufferImageCopy* pRegions, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, + VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, + VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, + VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, + VkDeviceSize dataSize, const void* pData, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, + VkDeviceSize dataSize, const void* pData, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, + VkDeviceSize dataSize, const void* pData, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, + VkDeviceSize size, uint32_t data, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, + VkDeviceSize size, uint32_t data, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, + VkDeviceSize size, uint32_t data, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, + const VkClearColorValue* pColor, uint32_t rangeCount, + const VkImageSubresourceRange* pRanges, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, + const VkClearColorValue* pColor, uint32_t rangeCount, + const VkImageSubresourceRange* pRanges, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, + const VkClearColorValue* pColor, uint32_t rangeCount, + const VkImageSubresourceRange* pRanges, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, + const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, + const VkImageSubresourceRange* pRanges, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, + const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, + const VkImageSubresourceRange* pRanges, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, + const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, + const VkImageSubresourceRange* pRanges, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdClearAttachments(VkCommandBuffer commandBuffer, uint32_t attachmentCount, + const VkClearAttachment* pAttachments, uint32_t rectCount, + const VkClearRect* pRects, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdClearAttachments(VkCommandBuffer commandBuffer, uint32_t attachmentCount, + const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdClearAttachments(VkCommandBuffer commandBuffer, uint32_t attachmentCount, + const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, + VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, + const VkImageResolve* pRegions, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, + VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, + const VkImageResolve* pRegions, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, + VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, + const VkImageResolve* pRegions, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdWaitEvents(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, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdWaitEvents(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, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdWaitEvents(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, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdPipelineBarrier(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, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdPipelineBarrier(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, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdPipelineBarrier(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, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, + VkQueryControlFlags flags, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, + VkQueryControlFlags flags, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, + VkQueryControlFlags flags, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, + uint32_t queryCount, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, + uint32_t queryCount, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, + uint32_t queryCount, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, + VkQueryPool queryPool, uint32_t query, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, + VkQueryPool queryPool, uint32_t query, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, + VkQueryPool queryPool, uint32_t query, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, + uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, + VkDeviceSize stride, VkQueryResultFlags flags, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, + uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, + VkDeviceSize stride, VkQueryResultFlags flags, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, + uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, + VkDeviceSize stride, VkQueryResultFlags flags, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, + uint32_t offset, uint32_t size, const void* pValues, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, + uint32_t offset, uint32_t size, const void* pValues, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, + uint32_t offset, uint32_t size, const void* pValues, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, + VkSubpassContents contents, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, + VkSubpassContents contents, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, + VkSubpassContents contents, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdEndRenderPass(VkCommandBuffer commandBuffer, const ErrorObject& error_obj) const { return false; } +virtual void PreCallRecordCmdEndRenderPass(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdEndRenderPass(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, + const VkCommandBuffer* pCommandBuffers, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, + const VkCommandBuffer* pCommandBuffers, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, + const VkCommandBuffer* pCommandBuffers, const RecordObject& record_obj) {} +virtual bool PreCallValidateBindBufferMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordBindBufferMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos, + const RecordObject& record_obj) {} +virtual void PostCallRecordBindBufferMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos, + const RecordObject& record_obj) {} +virtual bool PreCallValidateBindImageMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordBindImageMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos, + const RecordObject& record_obj) {} +virtual void PostCallRecordBindImageMemory2(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeviceGroupPeerMemoryFeatures(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, + uint32_t remoteDeviceIndex, + VkPeerMemoryFeatureFlags* pPeerMemoryFeatures, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeviceGroupPeerMemoryFeatures(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, + uint32_t remoteDeviceIndex, + VkPeerMemoryFeatureFlags* pPeerMemoryFeatures, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeviceGroupPeerMemoryFeatures(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, + uint32_t remoteDeviceIndex, + VkPeerMemoryFeatureFlags* pPeerMemoryFeatures, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDeviceMask(VkCommandBuffer commandBuffer, uint32_t deviceMask, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDeviceMask(VkCommandBuffer commandBuffer, uint32_t deviceMask, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDeviceMask(VkCommandBuffer commandBuffer, uint32_t deviceMask, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDispatchBase(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, + uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDispatchBase(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, + uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDispatchBase(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, + uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, + const RecordObject& record_obj) {} +virtual bool PreCallValidateEnumeratePhysicalDeviceGroups(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, + VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordEnumeratePhysicalDeviceGroups(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, + VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordEnumeratePhysicalDeviceGroups(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, + VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetImageMemoryRequirements2(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetImageMemoryRequirements2(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) {} +virtual void PostCallRecordGetImageMemoryRequirements2(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) { +} +virtual bool PreCallValidateGetBufferMemoryRequirements2(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetBufferMemoryRequirements2(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements, const RecordObject& record_obj) { +} +virtual void PostCallRecordGetBufferMemoryRequirements2(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetImageSparseMemoryRequirements2(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetImageSparseMemoryRequirements2(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetImageSparseMemoryRequirements2(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceFormatProperties2(VkPhysicalDevice physicalDevice, VkFormat format, + VkFormatProperties2* pFormatProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceFormatProperties2(VkPhysicalDevice physicalDevice, VkFormat format, + VkFormatProperties2* pFormatProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceFormatProperties2(VkPhysicalDevice physicalDevice, VkFormat format, + VkFormatProperties2* pFormatProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, + VkImageFormatProperties2* pImageFormatProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, + VkImageFormatProperties2* pImageFormatProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, + VkImageFormatProperties2* pImageFormatProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceQueueFamilyProperties2(VkPhysicalDevice physicalDevice, + uint32_t* pQueueFamilyPropertyCount, + VkQueueFamilyProperties2* pQueueFamilyProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceQueueFamilyProperties2(VkPhysicalDevice physicalDevice, + uint32_t* pQueueFamilyPropertyCount, + VkQueueFamilyProperties2* pQueueFamilyProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceQueueFamilyProperties2(VkPhysicalDevice physicalDevice, + uint32_t* pQueueFamilyPropertyCount, + VkQueueFamilyProperties2* pQueueFamilyProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceMemoryProperties2(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceMemoryProperties2* pMemoryProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceMemoryProperties2(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceMemoryProperties2* pMemoryProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceMemoryProperties2(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceMemoryProperties2* pMemoryProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceSparseImageFormatProperties2(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, + uint32_t* pPropertyCount, + VkSparseImageFormatProperties2* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceSparseImageFormatProperties2(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, + uint32_t* pPropertyCount, + VkSparseImageFormatProperties2* pProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceSparseImageFormatProperties2(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, + uint32_t* pPropertyCount, + VkSparseImageFormatProperties2* pProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateTrimCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordTrimCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags, + const RecordObject& record_obj) {} +virtual void PostCallRecordTrimCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeviceQueue2(VkDevice device, const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeviceQueue2(VkDevice device, const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeviceQueue2(VkDevice device, const VkDeviceQueueInfo2* pQueueInfo, VkQueue* pQueue, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateSamplerYcbcrConversion(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSamplerYcbcrConversion* pYcbcrConversion, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateSamplerYcbcrConversion(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSamplerYcbcrConversion* pYcbcrConversion, const RecordObject& record_obj) { +} +virtual void PostCallRecordCreateSamplerYcbcrConversion(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSamplerYcbcrConversion* pYcbcrConversion, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroySamplerYcbcrConversion(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, + const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroySamplerYcbcrConversion(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual void PostCallRecordDestroySamplerYcbcrConversion(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateDescriptorUpdateTemplate(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateDescriptorUpdateTemplate(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateDescriptorUpdateTemplate(VkDevice device, const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyDescriptorUpdateTemplate(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, + const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyDescriptorUpdateTemplate(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) { +} +virtual void PostCallRecordDestroyDescriptorUpdateTemplate(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, + const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateUpdateDescriptorSetWithTemplate(VkDevice device, VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordUpdateDescriptorSetWithTemplate(VkDevice device, VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, + const RecordObject& record_obj) {} +virtual void PostCallRecordUpdateDescriptorSetWithTemplate(VkDevice device, VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceExternalBufferProperties(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, + VkExternalBufferProperties* pExternalBufferProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceExternalBufferProperties(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, + VkExternalBufferProperties* pExternalBufferProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceExternalBufferProperties(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, + VkExternalBufferProperties* pExternalBufferProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceExternalFenceProperties(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, + VkExternalFenceProperties* pExternalFenceProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceExternalFenceProperties(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, + VkExternalFenceProperties* pExternalFenceProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceExternalFenceProperties(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, + VkExternalFenceProperties* pExternalFenceProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceExternalSemaphoreProperties( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, + VkExternalSemaphoreProperties* pExternalSemaphoreProperties, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceExternalSemaphoreProperties( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, + VkExternalSemaphoreProperties* pExternalSemaphoreProperties, const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceExternalSemaphoreProperties( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, + VkExternalSemaphoreProperties* pExternalSemaphoreProperties, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDescriptorSetLayoutSupport(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, + VkDescriptorSetLayoutSupport* pSupport, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDescriptorSetLayoutSupport(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, + VkDescriptorSetLayoutSupport* pSupport, const RecordObject& record_obj) {} +virtual void PostCallRecordGetDescriptorSetLayoutSupport(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, + VkDescriptorSetLayoutSupport* pSupport, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDrawIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDrawIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDrawIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDrawIndexedIndirectCount(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride, const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateRenderPass2(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateRenderPass2(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateRenderPass2(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBeginRenderPass2(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, + const VkSubpassBeginInfo* pSubpassBeginInfo, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBeginRenderPass2(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, + const VkSubpassBeginInfo* pSubpassBeginInfo, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBeginRenderPass2(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, + const VkSubpassBeginInfo* pSubpassBeginInfo, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdNextSubpass2(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, + const VkSubpassEndInfo* pSubpassEndInfo, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdNextSubpass2(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, + const VkSubpassEndInfo* pSubpassEndInfo, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdNextSubpass2(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, + const VkSubpassEndInfo* pSubpassEndInfo, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdEndRenderPass2(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdEndRenderPass2(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdEndRenderPass2(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateResetQueryPool(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordResetQueryPool(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, + const RecordObject& record_obj) {} +virtual void PostCallRecordResetQueryPool(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetSemaphoreCounterValue(VkDevice device, VkSemaphore semaphore, uint64_t* pValue, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetSemaphoreCounterValue(VkDevice device, VkSemaphore semaphore, uint64_t* pValue, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetSemaphoreCounterValue(VkDevice device, VkSemaphore semaphore, uint64_t* pValue, + const RecordObject& record_obj) {} +virtual bool PreCallValidateWaitSemaphores(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordWaitSemaphores(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout, + const RecordObject& record_obj) {} +virtual void PostCallRecordWaitSemaphores(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout, + const RecordObject& record_obj) {} +virtual bool PreCallValidateSignalSemaphore(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordSignalSemaphore(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordSignalSemaphore(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetBufferDeviceAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetBufferDeviceAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetBufferDeviceAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetBufferOpaqueCaptureAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetBufferOpaqueCaptureAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetBufferOpaqueCaptureAddress(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeviceMemoryOpaqueCaptureAddress(VkDevice device, + const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeviceMemoryOpaqueCaptureAddress(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeviceMemoryOpaqueCaptureAddress(VkDevice device, const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceToolProperties(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, + VkPhysicalDeviceToolProperties* pToolProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceToolProperties(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, + VkPhysicalDeviceToolProperties* pToolProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceToolProperties(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, + VkPhysicalDeviceToolProperties* pToolProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreatePrivateDataSlot(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreatePrivateDataSlot(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreatePrivateDataSlot(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyPrivateDataSlot(VkDevice device, VkPrivateDataSlot privateDataSlot, + const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyPrivateDataSlot(VkDevice device, VkPrivateDataSlot privateDataSlot, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyPrivateDataSlot(VkDevice device, VkPrivateDataSlot privateDataSlot, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual bool PreCallValidateSetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, + VkPrivateDataSlot privateDataSlot, uint64_t data, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordSetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, + VkPrivateDataSlot privateDataSlot, uint64_t data, const RecordObject& record_obj) {} +virtual void PostCallRecordSetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, + VkPrivateDataSlot privateDataSlot, uint64_t data, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, + VkPrivateDataSlot privateDataSlot, uint64_t* pData, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, + VkPrivateDataSlot privateDataSlot, uint64_t* pData, const RecordObject& record_obj) {} +virtual void PostCallRecordGetPrivateData(VkDevice device, VkObjectType objectType, uint64_t objectHandle, + VkPrivateDataSlot privateDataSlot, uint64_t* pData, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetEvent2(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetEvent2(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetEvent2(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdResetEvent2(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdResetEvent2(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdResetEvent2(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdWaitEvents2(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, + const VkDependencyInfo* pDependencyInfos, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdWaitEvents2(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, + const VkDependencyInfo* pDependencyInfos, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdWaitEvents2(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, + const VkDependencyInfo* pDependencyInfos, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdPipelineBarrier2(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdPipelineBarrier2(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdPipelineBarrier2(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdWriteTimestamp2(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, + uint32_t query, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdWriteTimestamp2(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, + uint32_t query, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdWriteTimestamp2(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, + uint32_t query, const RecordObject& record_obj) {} +virtual bool PreCallValidateQueueSubmit2(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordQueueSubmit2(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence, + const RecordObject& record_obj) {} +virtual void PostCallRecordQueueSubmit2(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCopyBuffer2(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCopyBuffer2(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCopyBuffer2(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCopyImage2(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCopyImage2(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCopyImage2(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCopyBufferToImage2(VkCommandBuffer commandBuffer, + const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCopyBufferToImage2(VkCommandBuffer commandBuffer, + const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCopyBufferToImage2(VkCommandBuffer commandBuffer, + const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, + const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, + const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCopyImageToBuffer2(VkCommandBuffer commandBuffer, + const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBlitImage2(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBlitImage2(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBlitImage2(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdResolveImage2(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdResolveImage2(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdResolveImage2(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdEndRendering(VkCommandBuffer commandBuffer, const ErrorObject& error_obj) const { return false; } +virtual void PreCallRecordCmdEndRendering(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdEndRendering(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetCullMode(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetCullMode(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetCullMode(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode, const RecordObject& record_obj) { +} +virtual bool PreCallValidateCmdSetFrontFace(VkCommandBuffer commandBuffer, VkFrontFace frontFace, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetFrontFace(VkCommandBuffer commandBuffer, VkFrontFace frontFace, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetFrontFace(VkCommandBuffer commandBuffer, VkFrontFace frontFace, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetPrimitiveTopology(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetPrimitiveTopology(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetPrimitiveTopology(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetViewportWithCount(VkCommandBuffer commandBuffer, uint32_t viewportCount, + const VkViewport* pViewports, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetViewportWithCount(VkCommandBuffer commandBuffer, uint32_t viewportCount, + const VkViewport* pViewports, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetViewportWithCount(VkCommandBuffer commandBuffer, uint32_t viewportCount, + const VkViewport* pViewports, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetScissorWithCount(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetScissorWithCount(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetScissorWithCount(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBindVertexBuffers2(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, + const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, + const VkDeviceSize* pSizes, const VkDeviceSize* pStrides, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBindVertexBuffers2(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, + const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, + const VkDeviceSize* pStrides, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBindVertexBuffers2(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, + const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, + const VkDeviceSize* pStrides, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDepthTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDepthTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDepthTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDepthWriteEnable(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDepthWriteEnable(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDepthWriteEnable(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDepthCompareOp(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDepthCompareOp(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDepthCompareOp(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDepthBoundsTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDepthBoundsTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDepthBoundsTestEnable(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetStencilTestEnable(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetStencilTestEnable(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetStencilTestEnable(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetStencilOp(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, + VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetStencilOp(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, + VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetStencilOp(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, + VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetRasterizerDiscardEnable(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetRasterizerDiscardEnable(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetRasterizerDiscardEnable(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDepthBiasEnable(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDepthBiasEnable(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDepthBiasEnable(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetPrimitiveRestartEnable(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetPrimitiveRestartEnable(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetPrimitiveRestartEnable(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeviceBufferMemoryRequirements(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeviceBufferMemoryRequirements(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeviceBufferMemoryRequirements(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeviceImageMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeviceImageMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeviceImageMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeviceImageSparseMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeviceImageSparseMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeviceImageSparseMemoryRequirements(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + VkSurfaceKHR surface, VkBool32* pSupported, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + VkSurfaceKHR surface, VkBool32* pSupported, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + VkSurfaceKHR surface, VkBool32* pSupported, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + VkSurfaceCapabilitiesKHR* pSurfaceCapabilities, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + VkSurfaceCapabilitiesKHR* pSurfaceCapabilities, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + VkSurfaceCapabilitiesKHR* pSurfaceCapabilities, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, + VkImage* pSwapchainImages, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, + VkImage* pSwapchainImages, const RecordObject& record_obj) {} +virtual void PostCallRecordGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, + VkImage* pSwapchainImages, const RecordObject& record_obj) {} +virtual bool PreCallValidateAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, + VkFence fence, uint32_t* pImageIndex, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, + VkFence fence, uint32_t* pImageIndex, const RecordObject& record_obj) {} +virtual void PostCallRecordAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, + VkFence fence, uint32_t* pImageIndex, const RecordObject& record_obj) {} +virtual bool PreCallValidateQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR* pPresentInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR* pPresentInfo, const RecordObject& record_obj) {} +virtual void PostCallRecordQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR* pPresentInfo, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeviceGroupPresentCapabilitiesKHR( + VkDevice device, VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeviceGroupPresentCapabilitiesKHR(VkDevice device, + VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeviceGroupPresentCapabilitiesKHR( + VkDevice device, VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeviceGroupSurfacePresentModesKHR(VkDevice device, VkSurfaceKHR surface, + VkDeviceGroupPresentModeFlagsKHR* pModes, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeviceGroupSurfacePresentModesKHR(VkDevice device, VkSurfaceKHR surface, + VkDeviceGroupPresentModeFlagsKHR* pModes, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeviceGroupSurfacePresentModesKHR(VkDevice device, VkSurfaceKHR surface, + VkDeviceGroupPresentModeFlagsKHR* pModes, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + uint32_t* pRectCount, VkRect2D* pRects, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + uint32_t* pRectCount, VkRect2D* pRects, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + uint32_t* pRectCount, VkRect2D* pRects, + const RecordObject& record_obj) {} +virtual bool PreCallValidateAcquireNextImage2KHR(VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, + uint32_t* pImageIndex, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordAcquireNextImage2KHR(VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, + uint32_t* pImageIndex, const RecordObject& record_obj) {} +virtual void PostCallRecordAcquireNextImage2KHR(VkDevice device, const VkAcquireNextImageInfoKHR* pAcquireInfo, + uint32_t* pImageIndex, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkDisplayPropertiesKHR* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkDisplayPropertiesKHR* pProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkDisplayPropertiesKHR* pProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkDisplayPlanePropertiesKHR* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkDisplayPlanePropertiesKHR* pProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkDisplayPlanePropertiesKHR* pProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, uint32_t planeIndex, + uint32_t* pDisplayCount, VkDisplayKHR* pDisplays, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, uint32_t planeIndex, + uint32_t* pDisplayCount, VkDisplayKHR* pDisplays, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, uint32_t planeIndex, + uint32_t* pDisplayCount, VkDisplayKHR* pDisplays, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, + uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, + uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, + uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateDisplayModeKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, + const VkDisplayModeCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateDisplayModeKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, + const VkDisplayModeCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateDisplayModeKHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, + const VkDisplayModeCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, + uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, + uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, + uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateDisplayPlaneSurfaceKHR(VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateDisplayPlaneSurfaceKHR(VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateDisplayPlaneSurfaceKHR(VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateSharedSwapchainsKHR(VkDevice device, uint32_t swapchainCount, + const VkSwapchainCreateInfoKHR* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateSharedSwapchainsKHR(VkDevice device, uint32_t swapchainCount, + const VkSwapchainCreateInfoKHR* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateSharedSwapchainsKHR(VkDevice device, uint32_t swapchainCount, + const VkSwapchainCreateInfoKHR* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchains, + const RecordObject& record_obj) {} +#ifdef VK_USE_PLATFORM_XLIB_KHR +virtual bool PreCallValidateCreateXlibSurfaceKHR(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateXlibSurfaceKHR(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateXlibSurfaceKHR(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + Display* dpy, VisualID visualID, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + Display* dpy, VisualID visualID, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceXlibPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + Display* dpy, VisualID visualID, + const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_XLIB_KHR +#ifdef VK_USE_PLATFORM_XCB_KHR +virtual bool PreCallValidateCreateXcbSurfaceKHR(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateXcbSurfaceKHR(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateXcbSurfaceKHR(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceXcbPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + xcb_connection_t* connection, xcb_visualid_t visual_id, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceXcbPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + xcb_connection_t* connection, xcb_visualid_t visual_id, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceXcbPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + xcb_connection_t* connection, xcb_visualid_t visual_id, + const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_XCB_KHR +#ifdef VK_USE_PLATFORM_WAYLAND_KHR +virtual bool PreCallValidateCreateWaylandSurfaceKHR(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateWaylandSurfaceKHR(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateWaylandSurfaceKHR(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex, struct wl_display* display, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + struct wl_display* display, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex, struct wl_display* display, + const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_WAYLAND_KHR +#ifdef VK_USE_PLATFORM_ANDROID_KHR +virtual bool PreCallValidateCreateAndroidSurfaceKHR(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateAndroidSurfaceKHR(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateAndroidSurfaceKHR(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_ANDROID_KHR +#ifdef VK_USE_PLATFORM_WIN32_KHR +virtual bool PreCallValidateCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceWin32PresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_WIN32_KHR +virtual bool PreCallValidateGetPhysicalDeviceVideoCapabilitiesKHR(VkPhysicalDevice physicalDevice, + const VkVideoProfileInfoKHR* pVideoProfile, + VkVideoCapabilitiesKHR* pCapabilities, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceVideoCapabilitiesKHR(VkPhysicalDevice physicalDevice, + const VkVideoProfileInfoKHR* pVideoProfile, + VkVideoCapabilitiesKHR* pCapabilities, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceVideoCapabilitiesKHR(VkPhysicalDevice physicalDevice, + const VkVideoProfileInfoKHR* pVideoProfile, + VkVideoCapabilitiesKHR* pCapabilities, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceVideoFormatPropertiesKHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceVideoFormatInfoKHR* pVideoFormatInfo, + uint32_t* pVideoFormatPropertyCount, + VkVideoFormatPropertiesKHR* pVideoFormatProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceVideoFormatPropertiesKHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceVideoFormatInfoKHR* pVideoFormatInfo, + uint32_t* pVideoFormatPropertyCount, + VkVideoFormatPropertiesKHR* pVideoFormatProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceVideoFormatPropertiesKHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceVideoFormatInfoKHR* pVideoFormatInfo, + uint32_t* pVideoFormatPropertyCount, + VkVideoFormatPropertiesKHR* pVideoFormatProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateVideoSessionKHR(VkDevice device, const VkVideoSessionCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkVideoSessionKHR* pVideoSession, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateVideoSessionKHR(VkDevice device, const VkVideoSessionCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkVideoSessionKHR* pVideoSession, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateVideoSessionKHR(VkDevice device, const VkVideoSessionCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkVideoSessionKHR* pVideoSession, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyVideoSessionKHR(VkDevice device, VkVideoSessionKHR videoSession, + const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyVideoSessionKHR(VkDevice device, VkVideoSessionKHR videoSession, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyVideoSessionKHR(VkDevice device, VkVideoSessionKHR videoSession, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetVideoSessionMemoryRequirementsKHR(VkDevice device, VkVideoSessionKHR videoSession, + uint32_t* pMemoryRequirementsCount, + VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetVideoSessionMemoryRequirementsKHR(VkDevice device, VkVideoSessionKHR videoSession, + uint32_t* pMemoryRequirementsCount, + VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetVideoSessionMemoryRequirementsKHR(VkDevice device, VkVideoSessionKHR videoSession, + uint32_t* pMemoryRequirementsCount, + VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual bool PreCallValidateBindVideoSessionMemoryKHR(VkDevice device, VkVideoSessionKHR videoSession, + uint32_t bindSessionMemoryInfoCount, + const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordBindVideoSessionMemoryKHR(VkDevice device, VkVideoSessionKHR videoSession, + uint32_t bindSessionMemoryInfoCount, + const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos, + const RecordObject& record_obj) {} +virtual void PostCallRecordBindVideoSessionMemoryKHR(VkDevice device, VkVideoSessionKHR videoSession, + uint32_t bindSessionMemoryInfoCount, + const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateVideoSessionParametersKHR(VkDevice device, + const VkVideoSessionParametersCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkVideoSessionParametersKHR* pVideoSessionParameters, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateVideoSessionParametersKHR(VkDevice device, const VkVideoSessionParametersCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkVideoSessionParametersKHR* pVideoSessionParameters, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateVideoSessionParametersKHR(VkDevice device, + const VkVideoSessionParametersCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkVideoSessionParametersKHR* pVideoSessionParameters, + const RecordObject& record_obj) {} +virtual bool PreCallValidateUpdateVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, + const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordUpdateVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, + const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordUpdateVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, + const VkVideoSessionParametersUpdateInfoKHR* pUpdateInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, + const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, + const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyVideoSessionParametersKHR(VkDevice device, VkVideoSessionParametersKHR videoSessionParameters, + const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBeginVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoBeginCodingInfoKHR* pBeginInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBeginVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoBeginCodingInfoKHR* pBeginInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBeginVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoBeginCodingInfoKHR* pBeginInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdEndVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoEndCodingInfoKHR* pEndCodingInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdEndVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoEndCodingInfoKHR* pEndCodingInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdEndVideoCodingKHR(VkCommandBuffer commandBuffer, const VkVideoEndCodingInfoKHR* pEndCodingInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdControlVideoCodingKHR(VkCommandBuffer commandBuffer, + const VkVideoCodingControlInfoKHR* pCodingControlInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdControlVideoCodingKHR(VkCommandBuffer commandBuffer, + const VkVideoCodingControlInfoKHR* pCodingControlInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdControlVideoCodingKHR(VkCommandBuffer commandBuffer, + const VkVideoCodingControlInfoKHR* pCodingControlInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDecodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR* pDecodeInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDecodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR* pDecodeInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDecodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoDecodeInfoKHR* pDecodeInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBeginRenderingKHR(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBeginRenderingKHR(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBeginRenderingKHR(VkCommandBuffer commandBuffer, const VkRenderingInfo* pRenderingInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdEndRenderingKHR(VkCommandBuffer commandBuffer, const ErrorObject& error_obj) const { return false; } +virtual void PreCallRecordCmdEndRenderingKHR(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdEndRenderingKHR(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures2* pFeatures, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceProperties2* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2* pProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceProperties2KHR(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceProperties2* pProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceFormatProperties2KHR(VkPhysicalDevice physicalDevice, VkFormat format, + VkFormatProperties2* pFormatProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceFormatProperties2KHR(VkPhysicalDevice physicalDevice, VkFormat format, + VkFormatProperties2* pFormatProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceFormatProperties2KHR(VkPhysicalDevice physicalDevice, VkFormat format, + VkFormatProperties2* pFormatProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, + VkImageFormatProperties2* pImageFormatProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, + VkImageFormatProperties2* pImageFormatProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo, + VkImageFormatProperties2* pImageFormatProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice, + uint32_t* pQueueFamilyPropertyCount, + VkQueueFamilyProperties2* pQueueFamilyProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice, + uint32_t* pQueueFamilyPropertyCount, + VkQueueFamilyProperties2* pQueueFamilyProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceQueueFamilyProperties2KHR(VkPhysicalDevice physicalDevice, + uint32_t* pQueueFamilyPropertyCount, + VkQueueFamilyProperties2* pQueueFamilyProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceMemoryProperties2KHR(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceMemoryProperties2* pMemoryProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceMemoryProperties2KHR(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceMemoryProperties2* pMemoryProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceMemoryProperties2KHR(VkPhysicalDevice physicalDevice, + VkPhysicalDeviceMemoryProperties2* pMemoryProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceSparseImageFormatProperties2KHR( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, + VkSparseImageFormatProperties2* pProperties, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceSparseImageFormatProperties2KHR( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, + VkSparseImageFormatProperties2* pProperties, const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceSparseImageFormatProperties2KHR( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo, uint32_t* pPropertyCount, + VkSparseImageFormatProperties2* pProperties, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, + uint32_t remoteDeviceIndex, + VkPeerMemoryFeatureFlags* pPeerMemoryFeatures, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, + uint32_t remoteDeviceIndex, + VkPeerMemoryFeatureFlags* pPeerMemoryFeatures, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeviceGroupPeerMemoryFeaturesKHR(VkDevice device, uint32_t heapIndex, uint32_t localDeviceIndex, + uint32_t remoteDeviceIndex, + VkPeerMemoryFeatureFlags* pPeerMemoryFeatures, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, uint32_t deviceMask, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, uint32_t deviceMask, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDeviceMaskKHR(VkCommandBuffer commandBuffer, uint32_t deviceMask, const RecordObject& record_obj) { +} +virtual bool PreCallValidateCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, + uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, + uint32_t groupCountZ, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, + uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY, + uint32_t baseGroupZ, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ, + const RecordObject& record_obj) {} +virtual bool PreCallValidateTrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordTrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags, + const RecordObject& record_obj) {} +virtual void PostCallRecordTrimCommandPoolKHR(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags, + const RecordObject& record_obj) {} +virtual bool PreCallValidateEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, + VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, + VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordEnumeratePhysicalDeviceGroupsKHR(VkInstance instance, uint32_t* pPhysicalDeviceGroupCount, + VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceExternalBufferPropertiesKHR( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, + VkExternalBufferProperties* pExternalBufferProperties, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceExternalBufferPropertiesKHR( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, + VkExternalBufferProperties* pExternalBufferProperties, const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceExternalBufferPropertiesKHR( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, + VkExternalBufferProperties* pExternalBufferProperties, const RecordObject& record_obj) {} +#ifdef VK_USE_PLATFORM_WIN32_KHR +virtual bool PreCallValidateGetMemoryWin32HandleKHR(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, + HANDLE* pHandle, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetMemoryWin32HandleKHR(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, + HANDLE* pHandle, const RecordObject& record_obj) {} +virtual void PostCallRecordGetMemoryWin32HandleKHR(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, + HANDLE* pHandle, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetMemoryWin32HandlePropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, + HANDLE handle, + VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetMemoryWin32HandlePropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, + HANDLE handle, + VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetMemoryWin32HandlePropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, + HANDLE handle, + VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties, + const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_WIN32_KHR +virtual bool PreCallValidateGetMemoryFdKHR(VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetMemoryFdKHR(VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetMemoryFdKHR(VkDevice device, const VkMemoryGetFdInfoKHR* pGetFdInfo, int* pFd, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetMemoryFdPropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, + VkMemoryFdPropertiesKHR* pMemoryFdProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetMemoryFdPropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, + VkMemoryFdPropertiesKHR* pMemoryFdProperties, const RecordObject& record_obj) {} +virtual void PostCallRecordGetMemoryFdPropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, int fd, + VkMemoryFdPropertiesKHR* pMemoryFdProperties, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceExternalSemaphorePropertiesKHR( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, + VkExternalSemaphoreProperties* pExternalSemaphoreProperties, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceExternalSemaphorePropertiesKHR( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, + VkExternalSemaphoreProperties* pExternalSemaphoreProperties, const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceExternalSemaphorePropertiesKHR( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, + VkExternalSemaphoreProperties* pExternalSemaphoreProperties, const RecordObject& record_obj) {} +#ifdef VK_USE_PLATFORM_WIN32_KHR +virtual bool PreCallValidateImportSemaphoreWin32HandleKHR( + VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordImportSemaphoreWin32HandleKHR(VkDevice device, + const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordImportSemaphoreWin32HandleKHR(VkDevice device, + const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetSemaphoreWin32HandleKHR(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, + HANDLE* pHandle, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetSemaphoreWin32HandleKHR(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, + HANDLE* pHandle, const RecordObject& record_obj) {} +virtual void PostCallRecordGetSemaphoreWin32HandleKHR(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, + HANDLE* pHandle, const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_WIN32_KHR +virtual bool PreCallValidateImportSemaphoreFdKHR(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordImportSemaphoreFdKHR(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordImportSemaphoreFdKHR(VkDevice device, const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetSemaphoreFdKHR(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetSemaphoreFdKHR(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetSemaphoreFdKHR(VkDevice device, const VkSemaphoreGetFdInfoKHR* pGetFdInfo, int* pFd, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, + const VkWriteDescriptorSet* pDescriptorWrites, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, + const VkWriteDescriptorSet* pDescriptorWrites, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdPushDescriptorSetKHR(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, + const VkWriteDescriptorSet* pDescriptorWrites, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, + VkPipelineLayout layout, uint32_t set, const void* pData, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, + VkPipelineLayout layout, uint32_t set, const void* pData, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdPushDescriptorSetWithTemplateKHR(VkCommandBuffer commandBuffer, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, + VkPipelineLayout layout, uint32_t set, const void* pData, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateDescriptorUpdateTemplateKHR(VkDevice device, + const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateDescriptorUpdateTemplateKHR(VkDevice device, + const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateDescriptorUpdateTemplateKHR(VkDevice device, + const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, + const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, + const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyDescriptorUpdateTemplateKHR(VkDevice device, VkDescriptorUpdateTemplate descriptorUpdateTemplate, + const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateUpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, + const void* pData, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordUpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, const void* pData, + const RecordObject& record_obj) {} +virtual void PostCallRecordUpdateDescriptorSetWithTemplateKHR(VkDevice device, VkDescriptorSet descriptorSet, + VkDescriptorUpdateTemplate descriptorUpdateTemplate, + const void* pData, const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateRenderPass2KHR(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateRenderPass2KHR(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateRenderPass2KHR(VkDevice device, const VkRenderPassCreateInfo2* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, + const VkSubpassBeginInfo* pSubpassBeginInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, + const VkSubpassBeginInfo* pSubpassBeginInfo, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBeginRenderPass2KHR(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, + const VkSubpassBeginInfo* pSubpassBeginInfo, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdNextSubpass2KHR(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, + const VkSubpassEndInfo* pSubpassEndInfo, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdNextSubpass2KHR(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, + const VkSubpassEndInfo* pSubpassEndInfo, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdNextSubpass2KHR(VkCommandBuffer commandBuffer, const VkSubpassBeginInfo* pSubpassBeginInfo, + const VkSubpassEndInfo* pSubpassEndInfo, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdEndRenderPass2KHR(VkCommandBuffer commandBuffer, const VkSubpassEndInfo* pSubpassEndInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetSwapchainStatusKHR(VkDevice device, VkSwapchainKHR swapchain, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetSwapchainStatusKHR(VkDevice device, VkSwapchainKHR swapchain, const RecordObject& record_obj) {} +virtual void PostCallRecordGetSwapchainStatusKHR(VkDevice device, VkSwapchainKHR swapchain, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceExternalFencePropertiesKHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, + VkExternalFenceProperties* pExternalFenceProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceExternalFencePropertiesKHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, + VkExternalFenceProperties* pExternalFenceProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceExternalFencePropertiesKHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, + VkExternalFenceProperties* pExternalFenceProperties, + const RecordObject& record_obj) {} +#ifdef VK_USE_PLATFORM_WIN32_KHR +virtual bool PreCallValidateImportFenceWin32HandleKHR(VkDevice device, + const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordImportFenceWin32HandleKHR(VkDevice device, + const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordImportFenceWin32HandleKHR(VkDevice device, + const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetFenceWin32HandleKHR(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, + HANDLE* pHandle, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetFenceWin32HandleKHR(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, + HANDLE* pHandle, const RecordObject& record_obj) {} +virtual void PostCallRecordGetFenceWin32HandleKHR(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, + HANDLE* pHandle, const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_WIN32_KHR +virtual bool PreCallValidateImportFenceFdKHR(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordImportFenceFdKHR(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordImportFenceFdKHR(VkDevice device, const VkImportFenceFdInfoKHR* pImportFenceFdInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetFenceFdKHR(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetFenceFdKHR(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetFenceFdKHR(VkDevice device, const VkFenceGetFdInfoKHR* pGetFdInfo, int* pFd, + const RecordObject& record_obj) {} +virtual bool PreCallValidateEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, uint32_t* pCounterCount, VkPerformanceCounterKHR* pCounters, + VkPerformanceCounterDescriptionKHR* pCounterDescriptions, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, uint32_t* pCounterCount, VkPerformanceCounterKHR* pCounters, + VkPerformanceCounterDescriptionKHR* pCounterDescriptions, const RecordObject& record_obj) {} +virtual void PostCallRecordEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR( + VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, uint32_t* pCounterCount, VkPerformanceCounterKHR* pCounters, + VkPerformanceCounterDescriptionKHR* pCounterDescriptions, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( + VkPhysicalDevice physicalDevice, const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, uint32_t* pNumPasses, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( + VkPhysicalDevice physicalDevice, const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, uint32_t* pNumPasses, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR( + VkPhysicalDevice physicalDevice, const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo, uint32_t* pNumPasses, + const RecordObject& record_obj) {} +virtual bool PreCallValidateAcquireProfilingLockKHR(VkDevice device, const VkAcquireProfilingLockInfoKHR* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordAcquireProfilingLockKHR(VkDevice device, const VkAcquireProfilingLockInfoKHR* pInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordAcquireProfilingLockKHR(VkDevice device, const VkAcquireProfilingLockInfoKHR* pInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateReleaseProfilingLockKHR(VkDevice device, const ErrorObject& error_obj) const { return false; } +virtual void PreCallRecordReleaseProfilingLockKHR(VkDevice device, const RecordObject& record_obj) {} +virtual void PostCallRecordReleaseProfilingLockKHR(VkDevice device, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + VkSurfaceCapabilities2KHR* pSurfaceCapabilities, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + VkSurfaceCapabilities2KHR* pSurfaceCapabilities, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + VkSurfaceCapabilities2KHR* pSurfaceCapabilities, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + uint32_t* pSurfaceFormatCount, VkSurfaceFormat2KHR* pSurfaceFormats, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceDisplayProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkDisplayProperties2KHR* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceDisplayProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkDisplayProperties2KHR* pProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceDisplayProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkDisplayProperties2KHR* pProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceDisplayPlaneProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkDisplayPlaneProperties2KHR* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceDisplayPlaneProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkDisplayPlaneProperties2KHR* pProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceDisplayPlaneProperties2KHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkDisplayPlaneProperties2KHR* pProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDisplayModeProperties2KHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, + uint32_t* pPropertyCount, VkDisplayModeProperties2KHR* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDisplayModeProperties2KHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, + uint32_t* pPropertyCount, VkDisplayModeProperties2KHR* pProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDisplayModeProperties2KHR(VkPhysicalDevice physicalDevice, VkDisplayKHR display, + uint32_t* pPropertyCount, VkDisplayModeProperties2KHR* pProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDisplayPlaneCapabilities2KHR(VkPhysicalDevice physicalDevice, + const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, + VkDisplayPlaneCapabilities2KHR* pCapabilities, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDisplayPlaneCapabilities2KHR(VkPhysicalDevice physicalDevice, + const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, + VkDisplayPlaneCapabilities2KHR* pCapabilities, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDisplayPlaneCapabilities2KHR(VkPhysicalDevice physicalDevice, + const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo, + VkDisplayPlaneCapabilities2KHR* pCapabilities, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetImageMemoryRequirements2KHR(VkDevice device, const VkImageMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetBufferMemoryRequirements2KHR(VkDevice device, const VkBufferMemoryRequirementsInfo2* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetImageSparseMemoryRequirements2KHR(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetImageSparseMemoryRequirements2KHR(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetImageSparseMemoryRequirements2KHR(VkDevice device, const VkImageSparseMemoryRequirementsInfo2* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateSamplerYcbcrConversionKHR(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSamplerYcbcrConversion* pYcbcrConversion, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateSamplerYcbcrConversionKHR(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSamplerYcbcrConversion* pYcbcrConversion, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateSamplerYcbcrConversionKHR(VkDevice device, const VkSamplerYcbcrConversionCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSamplerYcbcrConversion* pYcbcrConversion, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroySamplerYcbcrConversionKHR(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, + const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroySamplerYcbcrConversionKHR(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, + const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroySamplerYcbcrConversionKHR(VkDevice device, VkSamplerYcbcrConversion ycbcrConversion, + const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateBindBufferMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordBindBufferMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos, + const RecordObject& record_obj) {} +virtual void PostCallRecordBindBufferMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos, + const RecordObject& record_obj) {} +virtual bool PreCallValidateBindImageMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordBindImageMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos, + const RecordObject& record_obj) {} +virtual void PostCallRecordBindImageMemory2KHR(VkDevice device, uint32_t bindInfoCount, const VkBindImageMemoryInfo* pBindInfos, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDescriptorSetLayoutSupportKHR(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, + VkDescriptorSetLayoutSupport* pSupport, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDescriptorSetLayoutSupportKHR(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, + VkDescriptorSetLayoutSupport* pSupport, const RecordObject& record_obj) { +} +virtual void PostCallRecordGetDescriptorSetLayoutSupportKHR(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, + VkDescriptorSetLayoutSupport* pSupport, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, uint32_t stride, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetSemaphoreCounterValueKHR(VkDevice device, VkSemaphore semaphore, uint64_t* pValue, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetSemaphoreCounterValueKHR(VkDevice device, VkSemaphore semaphore, uint64_t* pValue, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetSemaphoreCounterValueKHR(VkDevice device, VkSemaphore semaphore, uint64_t* pValue, + const RecordObject& record_obj) {} +virtual bool PreCallValidateWaitSemaphoresKHR(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordWaitSemaphoresKHR(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout, + const RecordObject& record_obj) {} +virtual void PostCallRecordWaitSemaphoresKHR(VkDevice device, const VkSemaphoreWaitInfo* pWaitInfo, uint64_t timeout, + const RecordObject& record_obj) {} +virtual bool PreCallValidateSignalSemaphoreKHR(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordSignalSemaphoreKHR(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordSignalSemaphoreKHR(VkDevice device, const VkSemaphoreSignalInfo* pSignalInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceFragmentShadingRatesKHR(VkPhysicalDevice physicalDevice, + uint32_t* pFragmentShadingRateCount, + VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceFragmentShadingRatesKHR(VkPhysicalDevice physicalDevice, + uint32_t* pFragmentShadingRateCount, + VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceFragmentShadingRatesKHR(VkPhysicalDevice physicalDevice, + uint32_t* pFragmentShadingRateCount, + VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetFragmentShadingRateKHR(VkCommandBuffer commandBuffer, const VkExtent2D* pFragmentSize, + const VkFragmentShadingRateCombinerOpKHR combinerOps[2], + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetFragmentShadingRateKHR(VkCommandBuffer commandBuffer, const VkExtent2D* pFragmentSize, + const VkFragmentShadingRateCombinerOpKHR combinerOps[2], + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetFragmentShadingRateKHR(VkCommandBuffer commandBuffer, const VkExtent2D* pFragmentSize, + const VkFragmentShadingRateCombinerOpKHR combinerOps[2], + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetRenderingAttachmentLocationsKHR(VkCommandBuffer commandBuffer, + const VkRenderingAttachmentLocationInfoKHR* pLocationInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetRenderingAttachmentLocationsKHR(VkCommandBuffer commandBuffer, + const VkRenderingAttachmentLocationInfoKHR* pLocationInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetRenderingAttachmentLocationsKHR(VkCommandBuffer commandBuffer, + const VkRenderingAttachmentLocationInfoKHR* pLocationInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetRenderingInputAttachmentIndicesKHR( + VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfoKHR* pInputAttachmentIndexInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetRenderingInputAttachmentIndicesKHR( + VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfoKHR* pInputAttachmentIndexInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetRenderingInputAttachmentIndicesKHR( + VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfoKHR* pInputAttachmentIndexInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateWaitForPresentKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t presentId, uint64_t timeout, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordWaitForPresentKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t presentId, uint64_t timeout, + const RecordObject& record_obj) {} +virtual void PostCallRecordWaitForPresentKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t presentId, uint64_t timeout, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetBufferDeviceAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetBufferDeviceAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetBufferDeviceAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetBufferOpaqueCaptureAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetBufferOpaqueCaptureAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetBufferOpaqueCaptureAddressKHR(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeviceMemoryOpaqueCaptureAddressKHR(VkDevice device, + const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeviceMemoryOpaqueCaptureAddressKHR(VkDevice device, + const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeviceMemoryOpaqueCaptureAddressKHR(VkDevice device, + const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateDeferredOperationKHR(VkDevice device, const VkAllocationCallbacks* pAllocator, + VkDeferredOperationKHR* pDeferredOperation, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateDeferredOperationKHR(VkDevice device, const VkAllocationCallbacks* pAllocator, + VkDeferredOperationKHR* pDeferredOperation, const RecordObject& record_obj) {} +virtual void PostCallRecordCreateDeferredOperationKHR(VkDevice device, const VkAllocationCallbacks* pAllocator, + VkDeferredOperationKHR* pDeferredOperation, const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyDeferredOperationKHR(VkDevice device, VkDeferredOperationKHR operation, + const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyDeferredOperationKHR(VkDevice device, VkDeferredOperationKHR operation, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyDeferredOperationKHR(VkDevice device, VkDeferredOperationKHR operation, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeferredOperationMaxConcurrencyKHR(VkDevice device, VkDeferredOperationKHR operation, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeferredOperationMaxConcurrencyKHR(VkDevice device, VkDeferredOperationKHR operation, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeferredOperationMaxConcurrencyKHR(VkDevice device, VkDeferredOperationKHR operation, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeferredOperationResultKHR(VkDevice device, VkDeferredOperationKHR operation, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeferredOperationResultKHR(VkDevice device, VkDeferredOperationKHR operation, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeferredOperationResultKHR(VkDevice device, VkDeferredOperationKHR operation, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDeferredOperationJoinKHR(VkDevice device, VkDeferredOperationKHR operation, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDeferredOperationJoinKHR(VkDevice device, VkDeferredOperationKHR operation, + const RecordObject& record_obj) {} +virtual void PostCallRecordDeferredOperationJoinKHR(VkDevice device, VkDeferredOperationKHR operation, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPipelineExecutablePropertiesKHR(VkDevice device, const VkPipelineInfoKHR* pPipelineInfo, + uint32_t* pExecutableCount, + VkPipelineExecutablePropertiesKHR* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPipelineExecutablePropertiesKHR(VkDevice device, const VkPipelineInfoKHR* pPipelineInfo, + uint32_t* pExecutableCount, + VkPipelineExecutablePropertiesKHR* pProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPipelineExecutablePropertiesKHR(VkDevice device, const VkPipelineInfoKHR* pPipelineInfo, + uint32_t* pExecutableCount, + VkPipelineExecutablePropertiesKHR* pProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPipelineExecutableStatisticsKHR(VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, + uint32_t* pStatisticCount, + VkPipelineExecutableStatisticKHR* pStatistics, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPipelineExecutableStatisticsKHR(VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, + uint32_t* pStatisticCount, + VkPipelineExecutableStatisticKHR* pStatistics, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPipelineExecutableStatisticsKHR(VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, + uint32_t* pStatisticCount, + VkPipelineExecutableStatisticKHR* pStatistics, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPipelineExecutableInternalRepresentationsKHR( + VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pInternalRepresentationCount, + VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPipelineExecutableInternalRepresentationsKHR( + VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pInternalRepresentationCount, + VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations, const RecordObject& record_obj) {} +virtual void PostCallRecordGetPipelineExecutableInternalRepresentationsKHR( + VkDevice device, const VkPipelineExecutableInfoKHR* pExecutableInfo, uint32_t* pInternalRepresentationCount, + VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations, const RecordObject& record_obj) {} +virtual bool PreCallValidateMapMemory2KHR(VkDevice device, const VkMemoryMapInfoKHR* pMemoryMapInfo, void** ppData, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordMapMemory2KHR(VkDevice device, const VkMemoryMapInfoKHR* pMemoryMapInfo, void** ppData, + const RecordObject& record_obj) {} +virtual void PostCallRecordMapMemory2KHR(VkDevice device, const VkMemoryMapInfoKHR* pMemoryMapInfo, void** ppData, + const RecordObject& record_obj) {} +virtual bool PreCallValidateUnmapMemory2KHR(VkDevice device, const VkMemoryUnmapInfoKHR* pMemoryUnmapInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordUnmapMemory2KHR(VkDevice device, const VkMemoryUnmapInfoKHR* pMemoryUnmapInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordUnmapMemory2KHR(VkDevice device, const VkMemoryUnmapInfoKHR* pMemoryUnmapInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, + VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, + VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties, const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( + VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, + VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetEncodedVideoSessionParametersKHR( + VkDevice device, const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo, + VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, size_t* pDataSize, void* pData, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetEncodedVideoSessionParametersKHR( + VkDevice device, const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo, + VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, size_t* pDataSize, void* pData, const RecordObject& record_obj) {} +virtual void PostCallRecordGetEncodedVideoSessionParametersKHR( + VkDevice device, const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo, + VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, size_t* pDataSize, void* pData, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdEncodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdEncodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdEncodeVideoKHR(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdResetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdResetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdResetEvent2KHR(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags2 stageMask, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdWaitEvents2KHR(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, + const VkDependencyInfo* pDependencyInfos, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdWaitEvents2KHR(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, + const VkDependencyInfo* pDependencyInfos, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdWaitEvents2KHR(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, + const VkDependencyInfo* pDependencyInfos, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdPipelineBarrier2KHR(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdPipelineBarrier2KHR(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdPipelineBarrier2KHR(VkCommandBuffer commandBuffer, const VkDependencyInfo* pDependencyInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdWriteTimestamp2KHR(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, + uint32_t query, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdWriteTimestamp2KHR(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, + uint32_t query, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdWriteTimestamp2KHR(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkQueryPool queryPool, + uint32_t query, const RecordObject& record_obj) {} +virtual bool PreCallValidateQueueSubmit2KHR(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordQueueSubmit2KHR(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence, + const RecordObject& record_obj) {} +virtual void PostCallRecordQueueSubmit2KHR(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2* pSubmits, VkFence fence, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCopyBuffer2KHR(VkCommandBuffer commandBuffer, const VkCopyBufferInfo2* pCopyBufferInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCopyImage2KHR(VkCommandBuffer commandBuffer, const VkCopyImageInfo2* pCopyImageInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffer, + const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffer, + const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCopyBufferToImage2KHR(VkCommandBuffer commandBuffer, + const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffer, + const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffer, + const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCopyImageToBuffer2KHR(VkCommandBuffer commandBuffer, + const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBlitImage2KHR(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBlitImage2KHR(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBlitImage2KHR(VkCommandBuffer commandBuffer, const VkBlitImageInfo2* pBlitImageInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdResolveImage2KHR(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdResolveImage2KHR(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdResolveImage2KHR(VkCommandBuffer commandBuffer, const VkResolveImageInfo2* pResolveImageInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeviceBufferMemoryRequirementsKHR(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeviceBufferMemoryRequirementsKHR(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeviceBufferMemoryRequirementsKHR(VkDevice device, const VkDeviceBufferMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeviceImageMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeviceImageMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeviceImageMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeviceImageSparseMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeviceImageSparseMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeviceImageSparseMemoryRequirementsKHR(VkDevice device, const VkDeviceImageMemoryRequirements* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBindIndexBuffer2KHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkDeviceSize size, VkIndexType indexType, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBindIndexBuffer2KHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkDeviceSize size, VkIndexType indexType, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBindIndexBuffer2KHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkDeviceSize size, VkIndexType indexType, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetRenderingAreaGranularityKHR(VkDevice device, const VkRenderingAreaInfoKHR* pRenderingAreaInfo, + VkExtent2D* pGranularity, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetRenderingAreaGranularityKHR(VkDevice device, const VkRenderingAreaInfoKHR* pRenderingAreaInfo, + VkExtent2D* pGranularity, const RecordObject& record_obj) {} +virtual void PostCallRecordGetRenderingAreaGranularityKHR(VkDevice device, const VkRenderingAreaInfoKHR* pRenderingAreaInfo, + VkExtent2D* pGranularity, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeviceImageSubresourceLayoutKHR(VkDevice device, const VkDeviceImageSubresourceInfoKHR* pInfo, + VkSubresourceLayout2KHR* pLayout, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeviceImageSubresourceLayoutKHR(VkDevice device, const VkDeviceImageSubresourceInfoKHR* pInfo, + VkSubresourceLayout2KHR* pLayout, const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeviceImageSubresourceLayoutKHR(VkDevice device, const VkDeviceImageSubresourceInfoKHR* pInfo, + VkSubresourceLayout2KHR* pLayout, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetImageSubresourceLayout2KHR(VkDevice device, VkImage image, + const VkImageSubresource2KHR* pSubresource, + VkSubresourceLayout2KHR* pLayout, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetImageSubresourceLayout2KHR(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, + VkSubresourceLayout2KHR* pLayout, const RecordObject& record_obj) {} +virtual void PostCallRecordGetImageSubresourceLayout2KHR(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, + VkSubresourceLayout2KHR* pLayout, const RecordObject& record_obj) {} +virtual bool PreCallValidateCreatePipelineBinariesKHR(VkDevice device, const VkPipelineBinaryCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkPipelineBinaryHandlesInfoKHR* pBinaries, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreatePipelineBinariesKHR(VkDevice device, const VkPipelineBinaryCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkPipelineBinaryHandlesInfoKHR* pBinaries, const RecordObject& record_obj) {} +virtual void PostCallRecordCreatePipelineBinariesKHR(VkDevice device, const VkPipelineBinaryCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkPipelineBinaryHandlesInfoKHR* pBinaries, const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyPipelineBinaryKHR(VkDevice device, VkPipelineBinaryKHR pipelineBinary, + const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyPipelineBinaryKHR(VkDevice device, VkPipelineBinaryKHR pipelineBinary, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyPipelineBinaryKHR(VkDevice device, VkPipelineBinaryKHR pipelineBinary, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPipelineKeyKHR(VkDevice device, const VkPipelineCreateInfoKHR* pPipelineCreateInfo, + VkPipelineBinaryKeyKHR* pPipelineKey, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPipelineKeyKHR(VkDevice device, const VkPipelineCreateInfoKHR* pPipelineCreateInfo, + VkPipelineBinaryKeyKHR* pPipelineKey, const RecordObject& record_obj) {} +virtual void PostCallRecordGetPipelineKeyKHR(VkDevice device, const VkPipelineCreateInfoKHR* pPipelineCreateInfo, + VkPipelineBinaryKeyKHR* pPipelineKey, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPipelineBinaryDataKHR(VkDevice device, const VkPipelineBinaryDataInfoKHR* pInfo, + VkPipelineBinaryKeyKHR* pPipelineBinaryKey, size_t* pPipelineBinaryDataSize, + void* pPipelineBinaryData, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPipelineBinaryDataKHR(VkDevice device, const VkPipelineBinaryDataInfoKHR* pInfo, + VkPipelineBinaryKeyKHR* pPipelineBinaryKey, size_t* pPipelineBinaryDataSize, + void* pPipelineBinaryData, const RecordObject& record_obj) {} +virtual void PostCallRecordGetPipelineBinaryDataKHR(VkDevice device, const VkPipelineBinaryDataInfoKHR* pInfo, + VkPipelineBinaryKeyKHR* pPipelineBinaryKey, size_t* pPipelineBinaryDataSize, + void* pPipelineBinaryData, const RecordObject& record_obj) {} +virtual bool PreCallValidateReleaseCapturedPipelineDataKHR(VkDevice device, const VkReleaseCapturedPipelineDataInfoKHR* pInfo, + const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordReleaseCapturedPipelineDataKHR(VkDevice device, const VkReleaseCapturedPipelineDataInfoKHR* pInfo, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual void PostCallRecordReleaseCapturedPipelineDataKHR(VkDevice device, const VkReleaseCapturedPipelineDataInfoKHR* pInfo, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) { +} +virtual bool PreCallValidateGetPhysicalDeviceCooperativeMatrixPropertiesKHR(VkPhysicalDevice physicalDevice, + uint32_t* pPropertyCount, + VkCooperativeMatrixPropertiesKHR* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceCooperativeMatrixPropertiesKHR(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkCooperativeMatrixPropertiesKHR* pProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceCooperativeMatrixPropertiesKHR(VkPhysicalDevice physicalDevice, + uint32_t* pPropertyCount, + VkCooperativeMatrixPropertiesKHR* pProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetLineStippleKHR(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, + uint16_t lineStipplePattern, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetLineStippleKHR(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, + uint16_t lineStipplePattern, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetLineStippleKHR(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, + uint16_t lineStipplePattern, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceCalibrateableTimeDomainsKHR(VkPhysicalDevice physicalDevice, + uint32_t* pTimeDomainCount, VkTimeDomainKHR* pTimeDomains, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceCalibrateableTimeDomainsKHR(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, + VkTimeDomainKHR* pTimeDomains, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceCalibrateableTimeDomainsKHR(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, + VkTimeDomainKHR* pTimeDomains, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetCalibratedTimestampsKHR(VkDevice device, uint32_t timestampCount, + const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, + uint64_t* pMaxDeviation, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetCalibratedTimestampsKHR(VkDevice device, uint32_t timestampCount, + const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, + uint64_t* pMaxDeviation, const RecordObject& record_obj) {} +virtual void PostCallRecordGetCalibratedTimestampsKHR(VkDevice device, uint32_t timestampCount, + const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, + uint64_t* pMaxDeviation, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBindDescriptorSets2KHR(VkCommandBuffer commandBuffer, + const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBindDescriptorSets2KHR(VkCommandBuffer commandBuffer, + const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBindDescriptorSets2KHR(VkCommandBuffer commandBuffer, + const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdPushConstants2KHR(VkCommandBuffer commandBuffer, const VkPushConstantsInfoKHR* pPushConstantsInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdPushConstants2KHR(VkCommandBuffer commandBuffer, const VkPushConstantsInfoKHR* pPushConstantsInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdPushConstants2KHR(VkCommandBuffer commandBuffer, const VkPushConstantsInfoKHR* pPushConstantsInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdPushDescriptorSet2KHR(VkCommandBuffer commandBuffer, + const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdPushDescriptorSet2KHR(VkCommandBuffer commandBuffer, + const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdPushDescriptorSet2KHR(VkCommandBuffer commandBuffer, + const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdPushDescriptorSetWithTemplate2KHR( + VkCommandBuffer commandBuffer, const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdPushDescriptorSetWithTemplate2KHR( + VkCommandBuffer commandBuffer, const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdPushDescriptorSetWithTemplate2KHR( + VkCommandBuffer commandBuffer, const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDescriptorBufferOffsets2EXT( + VkCommandBuffer commandBuffer, const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDescriptorBufferOffsets2EXT( + VkCommandBuffer commandBuffer, const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDescriptorBufferOffsets2EXT( + VkCommandBuffer commandBuffer, const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBindDescriptorBufferEmbeddedSamplers2EXT( + VkCommandBuffer commandBuffer, const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBindDescriptorBufferEmbeddedSamplers2EXT( + VkCommandBuffer commandBuffer, const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBindDescriptorBufferEmbeddedSamplers2EXT( + VkCommandBuffer commandBuffer, const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDebugReportCallbackEXT* pCallback, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkDebugReportCallbackEXT* pCallback, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDebugReportCallbackEXT* pCallback, const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT callback, + const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT callback, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyDebugReportCallbackEXT(VkInstance instance, VkDebugReportCallbackEXT callback, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual bool PreCallValidateDebugReportMessageEXT(VkInstance instance, VkDebugReportFlagsEXT flags, + VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, + int32_t messageCode, const char* pLayerPrefix, const char* pMessage, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDebugReportMessageEXT(VkInstance instance, VkDebugReportFlagsEXT flags, + VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, + int32_t messageCode, const char* pLayerPrefix, const char* pMessage, + const RecordObject& record_obj) {} +virtual void PostCallRecordDebugReportMessageEXT(VkInstance instance, VkDebugReportFlagsEXT flags, + VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, + int32_t messageCode, const char* pLayerPrefix, const char* pMessage, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDebugMarkerSetObjectTagEXT(VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDebugMarkerSetObjectTagEXT(VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordDebugMarkerSetObjectTagEXT(VkDevice device, const VkDebugMarkerObjectTagInfoEXT* pTagInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDebugMarkerSetObjectNameEXT(VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDebugMarkerSetObjectNameEXT(VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordDebugMarkerSetObjectNameEXT(VkDevice device, const VkDebugMarkerObjectNameInfoEXT* pNameInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDebugMarkerEndEXT(VkCommandBuffer commandBuffer, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDebugMarkerEndEXT(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDebugMarkerEndEXT(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer, const VkDebugMarkerMarkerInfoEXT* pMarkerInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBindTransformFeedbackBuffersEXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, + uint32_t bindingCount, const VkBuffer* pBuffers, + const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBindTransformFeedbackBuffersEXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, + uint32_t bindingCount, const VkBuffer* pBuffers, + const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBindTransformFeedbackBuffersEXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, + uint32_t bindingCount, const VkBuffer* pBuffers, + const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBeginTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, + uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, + const VkDeviceSize* pCounterBufferOffsets, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBeginTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, + uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, + const VkDeviceSize* pCounterBufferOffsets, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBeginTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, + uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, + const VkDeviceSize* pCounterBufferOffsets, const RecordObject& record_obj) { +} +virtual bool PreCallValidateCmdEndTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, + uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, + const VkDeviceSize* pCounterBufferOffsets, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdEndTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, + uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, + const VkDeviceSize* pCounterBufferOffsets, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdEndTransformFeedbackEXT(VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, + uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, + const VkDeviceSize* pCounterBufferOffsets, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBeginQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, + VkQueryControlFlags flags, uint32_t index, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBeginQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, + VkQueryControlFlags flags, uint32_t index, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBeginQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, + VkQueryControlFlags flags, uint32_t index, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdEndQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, + uint32_t index, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdEndQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, + uint32_t index, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdEndQueryIndexedEXT(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, + uint32_t index, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDrawIndirectByteCountEXT(VkCommandBuffer commandBuffer, uint32_t instanceCount, + uint32_t firstInstance, VkBuffer counterBuffer, + VkDeviceSize counterBufferOffset, uint32_t counterOffset, + uint32_t vertexStride, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDrawIndirectByteCountEXT(VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, + VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, + uint32_t counterOffset, uint32_t vertexStride, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDrawIndirectByteCountEXT(VkCommandBuffer commandBuffer, uint32_t instanceCount, + uint32_t firstInstance, VkBuffer counterBuffer, + VkDeviceSize counterBufferOffset, uint32_t counterOffset, + uint32_t vertexStride, const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateCuModuleNVX(VkDevice device, const VkCuModuleCreateInfoNVX* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCuModuleNVX* pModule, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateCuModuleNVX(VkDevice device, const VkCuModuleCreateInfoNVX* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCuModuleNVX* pModule, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateCuModuleNVX(VkDevice device, const VkCuModuleCreateInfoNVX* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCuModuleNVX* pModule, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateCuFunctionNVX(VkDevice device, const VkCuFunctionCreateInfoNVX* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCuFunctionNVX* pFunction, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateCuFunctionNVX(VkDevice device, const VkCuFunctionCreateInfoNVX* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCuFunctionNVX* pFunction, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateCuFunctionNVX(VkDevice device, const VkCuFunctionCreateInfoNVX* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCuFunctionNVX* pFunction, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyCuModuleNVX(VkDevice device, VkCuModuleNVX module, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyCuModuleNVX(VkDevice device, VkCuModuleNVX module, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyCuModuleNVX(VkDevice device, VkCuModuleNVX module, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyCuFunctionNVX(VkDevice device, VkCuFunctionNVX function, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyCuFunctionNVX(VkDevice device, VkCuFunctionNVX function, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyCuFunctionNVX(VkDevice device, VkCuFunctionNVX function, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCuLaunchKernelNVX(VkCommandBuffer commandBuffer, const VkCuLaunchInfoNVX* pLaunchInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCuLaunchKernelNVX(VkCommandBuffer commandBuffer, const VkCuLaunchInfoNVX* pLaunchInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCuLaunchKernelNVX(VkCommandBuffer commandBuffer, const VkCuLaunchInfoNVX* pLaunchInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetImageViewHandleNVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetImageViewHandleNVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetImageViewHandleNVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetImageViewHandle64NVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetImageViewHandle64NVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetImageViewHandle64NVX(VkDevice device, const VkImageViewHandleInfoNVX* pInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetImageViewAddressNVX(VkDevice device, VkImageView imageView, + VkImageViewAddressPropertiesNVX* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetImageViewAddressNVX(VkDevice device, VkImageView imageView, + VkImageViewAddressPropertiesNVX* pProperties, const RecordObject& record_obj) {} +virtual void PostCallRecordGetImageViewAddressNVX(VkDevice device, VkImageView imageView, + VkImageViewAddressPropertiesNVX* pProperties, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDrawIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDrawIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDrawIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, uint32_t maxDrawCount, + uint32_t stride, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDrawIndexedIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, uint32_t stride, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDrawIndexedIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDrawIndexedIndirectCountAMD(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetShaderInfoAMD(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, + VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetShaderInfoAMD(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, + VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetShaderInfoAMD(VkDevice device, VkPipeline pipeline, VkShaderStageFlagBits shaderStage, + VkShaderInfoTypeAMD infoType, size_t* pInfoSize, void* pInfo, + const RecordObject& record_obj) {} +#ifdef VK_USE_PLATFORM_GGP +virtual bool PreCallValidateCreateStreamDescriptorSurfaceGGP(VkInstance instance, + const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateStreamDescriptorSurfaceGGP(VkInstance instance, + const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateStreamDescriptorSurfaceGGP(VkInstance instance, + const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_GGP +virtual bool PreCallValidateGetPhysicalDeviceExternalImageFormatPropertiesNV( + VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, + VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, + VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceExternalImageFormatPropertiesNV( + VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, + VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, + VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties, const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceExternalImageFormatPropertiesNV( + VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, + VkImageCreateFlags flags, VkExternalMemoryHandleTypeFlagsNV externalHandleType, + VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties, const RecordObject& record_obj) {} +#ifdef VK_USE_PLATFORM_WIN32_KHR +virtual bool PreCallValidateGetMemoryWin32HandleNV(VkDevice device, VkDeviceMemory memory, + VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetMemoryWin32HandleNV(VkDevice device, VkDeviceMemory memory, + VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetMemoryWin32HandleNV(VkDevice device, VkDeviceMemory memory, + VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle, + const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_WIN32_KHR +#ifdef VK_USE_PLATFORM_VI_NN +virtual bool PreCallValidateCreateViSurfaceNN(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateViSurfaceNN(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateViSurfaceNN(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_VI_NN +virtual bool PreCallValidateCmdBeginConditionalRenderingEXT(VkCommandBuffer commandBuffer, + const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBeginConditionalRenderingEXT(VkCommandBuffer commandBuffer, + const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBeginConditionalRenderingEXT(VkCommandBuffer commandBuffer, + const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdEndConditionalRenderingEXT(VkCommandBuffer commandBuffer, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdEndConditionalRenderingEXT(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdEndConditionalRenderingEXT(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetViewportWScalingNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, + const VkViewportWScalingNV* pViewportWScalings, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetViewportWScalingNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, + const VkViewportWScalingNV* pViewportWScalings, const RecordObject& record_obj) { +} +virtual void PostCallRecordCmdSetViewportWScalingNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, + const VkViewportWScalingNV* pViewportWScalings, + const RecordObject& record_obj) {} +virtual bool PreCallValidateReleaseDisplayEXT(VkPhysicalDevice physicalDevice, VkDisplayKHR display, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordReleaseDisplayEXT(VkPhysicalDevice physicalDevice, VkDisplayKHR display, const RecordObject& record_obj) { +} +virtual void PostCallRecordReleaseDisplayEXT(VkPhysicalDevice physicalDevice, VkDisplayKHR display, + const RecordObject& record_obj) {} +#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT +virtual bool PreCallValidateAcquireXlibDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordAcquireXlibDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display, + const RecordObject& record_obj) {} +virtual void PostCallRecordAcquireXlibDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetRandROutputDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, + VkDisplayKHR* pDisplay, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetRandROutputDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, + VkDisplayKHR* pDisplay, const RecordObject& record_obj) {} +virtual void PostCallRecordGetRandROutputDisplayEXT(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, + VkDisplayKHR* pDisplay, const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_XLIB_XRANDR_EXT +virtual bool PreCallValidateGetPhysicalDeviceSurfaceCapabilities2EXT(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + VkSurfaceCapabilities2EXT* pSurfaceCapabilities, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceSurfaceCapabilities2EXT(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + VkSurfaceCapabilities2EXT* pSurfaceCapabilities, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceSurfaceCapabilities2EXT(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, + VkSurfaceCapabilities2EXT* pSurfaceCapabilities, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDisplayPowerControlEXT(VkDevice device, VkDisplayKHR display, + const VkDisplayPowerInfoEXT* pDisplayPowerInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDisplayPowerControlEXT(VkDevice device, VkDisplayKHR display, + const VkDisplayPowerInfoEXT* pDisplayPowerInfo, const RecordObject& record_obj) {} +virtual void PostCallRecordDisplayPowerControlEXT(VkDevice device, VkDisplayKHR display, + const VkDisplayPowerInfoEXT* pDisplayPowerInfo, const RecordObject& record_obj) {} +virtual bool PreCallValidateRegisterDeviceEventEXT(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, + const VkAllocationCallbacks* pAllocator, VkFence* pFence, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordRegisterDeviceEventEXT(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, + const VkAllocationCallbacks* pAllocator, VkFence* pFence, + const RecordObject& record_obj) {} +virtual void PostCallRecordRegisterDeviceEventEXT(VkDevice device, const VkDeviceEventInfoEXT* pDeviceEventInfo, + const VkAllocationCallbacks* pAllocator, VkFence* pFence, + const RecordObject& record_obj) {} +virtual bool PreCallValidateRegisterDisplayEventEXT(VkDevice device, VkDisplayKHR display, + const VkDisplayEventInfoEXT* pDisplayEventInfo, + const VkAllocationCallbacks* pAllocator, VkFence* pFence, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordRegisterDisplayEventEXT(VkDevice device, VkDisplayKHR display, + const VkDisplayEventInfoEXT* pDisplayEventInfo, + const VkAllocationCallbacks* pAllocator, VkFence* pFence, + const RecordObject& record_obj) {} +virtual void PostCallRecordRegisterDisplayEventEXT(VkDevice device, VkDisplayKHR display, + const VkDisplayEventInfoEXT* pDisplayEventInfo, + const VkAllocationCallbacks* pAllocator, VkFence* pFence, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetSwapchainCounterEXT(VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, + uint64_t* pCounterValue, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetSwapchainCounterEXT(VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, + uint64_t* pCounterValue, const RecordObject& record_obj) {} +virtual void PostCallRecordGetSwapchainCounterEXT(VkDevice device, VkSwapchainKHR swapchain, VkSurfaceCounterFlagBitsEXT counter, + uint64_t* pCounterValue, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetRefreshCycleDurationGOOGLE(VkDevice device, VkSwapchainKHR swapchain, + VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetRefreshCycleDurationGOOGLE(VkDevice device, VkSwapchainKHR swapchain, + VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetRefreshCycleDurationGOOGLE(VkDevice device, VkSwapchainKHR swapchain, + VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPastPresentationTimingGOOGLE(VkDevice device, VkSwapchainKHR swapchain, + uint32_t* pPresentationTimingCount, + VkPastPresentationTimingGOOGLE* pPresentationTimings, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPastPresentationTimingGOOGLE(VkDevice device, VkSwapchainKHR swapchain, + uint32_t* pPresentationTimingCount, + VkPastPresentationTimingGOOGLE* pPresentationTimings, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPastPresentationTimingGOOGLE(VkDevice device, VkSwapchainKHR swapchain, + uint32_t* pPresentationTimingCount, + VkPastPresentationTimingGOOGLE* pPresentationTimings, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, + uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, + uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDiscardRectangleEXT(VkCommandBuffer commandBuffer, uint32_t firstDiscardRectangle, + uint32_t discardRectangleCount, const VkRect2D* pDiscardRectangles, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDiscardRectangleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 discardRectangleEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDiscardRectangleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 discardRectangleEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDiscardRectangleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 discardRectangleEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDiscardRectangleModeEXT(VkCommandBuffer commandBuffer, + VkDiscardRectangleModeEXT discardRectangleMode, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDiscardRectangleModeEXT(VkCommandBuffer commandBuffer, + VkDiscardRectangleModeEXT discardRectangleMode, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDiscardRectangleModeEXT(VkCommandBuffer commandBuffer, + VkDiscardRectangleModeEXT discardRectangleMode, + const RecordObject& record_obj) {} +virtual bool PreCallValidateSetHdrMetadataEXT(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, + const VkHdrMetadataEXT* pMetadata, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordSetHdrMetadataEXT(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, + const VkHdrMetadataEXT* pMetadata, const RecordObject& record_obj) {} +virtual void PostCallRecordSetHdrMetadataEXT(VkDevice device, uint32_t swapchainCount, const VkSwapchainKHR* pSwapchains, + const VkHdrMetadataEXT* pMetadata, const RecordObject& record_obj) {} +#ifdef VK_USE_PLATFORM_IOS_MVK +virtual bool PreCallValidateCreateIOSSurfaceMVK(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateIOSSurfaceMVK(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateIOSSurfaceMVK(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_IOS_MVK +#ifdef VK_USE_PLATFORM_MACOS_MVK +virtual bool PreCallValidateCreateMacOSSurfaceMVK(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateMacOSSurfaceMVK(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateMacOSSurfaceMVK(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_MACOS_MVK +virtual bool PreCallValidateSetDebugUtilsObjectNameEXT(VkDevice device, const VkDebugUtilsObjectNameInfoEXT* pNameInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordSetDebugUtilsObjectNameEXT(VkDevice device, const VkDebugUtilsObjectNameInfoEXT* pNameInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordSetDebugUtilsObjectNameEXT(VkDevice device, const VkDebugUtilsObjectNameInfoEXT* pNameInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateSetDebugUtilsObjectTagEXT(VkDevice device, const VkDebugUtilsObjectTagInfoEXT* pTagInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordSetDebugUtilsObjectTagEXT(VkDevice device, const VkDebugUtilsObjectTagInfoEXT* pTagInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordSetDebugUtilsObjectTagEXT(VkDevice device, const VkDebugUtilsObjectTagInfoEXT* pTagInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateQueueBeginDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordQueueBeginDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordQueueBeginDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateQueueEndDebugUtilsLabelEXT(VkQueue queue, const ErrorObject& error_obj) const { return false; } +virtual void PreCallRecordQueueEndDebugUtilsLabelEXT(VkQueue queue, const RecordObject& record_obj) {} +virtual void PostCallRecordQueueEndDebugUtilsLabelEXT(VkQueue queue, const RecordObject& record_obj) {} +virtual bool PreCallValidateQueueInsertDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordQueueInsertDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordQueueInsertDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT* pLabelInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT* pLabelInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateDebugUtilsMessengerEXT(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDebugUtilsMessengerEXT* pMessenger, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateDebugUtilsMessengerEXT(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDebugUtilsMessengerEXT* pMessenger, const RecordObject& record_obj) {} +virtual void PostCallRecordCreateDebugUtilsMessengerEXT(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkDebugUtilsMessengerEXT* pMessenger, const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT messenger, + const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT messenger, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT messenger, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual bool PreCallValidateSubmitDebugUtilsMessageEXT(VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, + VkDebugUtilsMessageTypeFlagsEXT messageTypes, + const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordSubmitDebugUtilsMessageEXT(VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, + VkDebugUtilsMessageTypeFlagsEXT messageTypes, + const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData, + const RecordObject& record_obj) {} +virtual void PostCallRecordSubmitDebugUtilsMessageEXT(VkInstance instance, VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, + VkDebugUtilsMessageTypeFlagsEXT messageTypes, + const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData, + const RecordObject& record_obj) {} +#ifdef VK_USE_PLATFORM_ANDROID_KHR +virtual bool PreCallValidateGetAndroidHardwareBufferPropertiesANDROID(VkDevice device, const struct AHardwareBuffer* buffer, + VkAndroidHardwareBufferPropertiesANDROID* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetAndroidHardwareBufferPropertiesANDROID(VkDevice device, const struct AHardwareBuffer* buffer, + VkAndroidHardwareBufferPropertiesANDROID* pProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetAndroidHardwareBufferPropertiesANDROID(VkDevice device, const struct AHardwareBuffer* buffer, + VkAndroidHardwareBufferPropertiesANDROID* pProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetMemoryAndroidHardwareBufferANDROID(VkDevice device, + const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, + struct AHardwareBuffer** pBuffer, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetMemoryAndroidHardwareBufferANDROID(VkDevice device, + const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, + struct AHardwareBuffer** pBuffer, const RecordObject& record_obj) {} +virtual void PostCallRecordGetMemoryAndroidHardwareBufferANDROID(VkDevice device, + const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, + struct AHardwareBuffer** pBuffer, const RecordObject& record_obj) { +} +#endif // VK_USE_PLATFORM_ANDROID_KHR +#ifdef VK_ENABLE_BETA_EXTENSIONS +virtual bool PreCallValidateCreateExecutionGraphPipelinesAMDX(VkDevice device, VkPipelineCache pipelineCache, + uint32_t createInfoCount, + const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateExecutionGraphPipelinesAMDX(VkDevice device, VkPipelineCache pipelineCache, + uint32_t createInfoCount, + const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateExecutionGraphPipelinesAMDX(VkDevice device, VkPipelineCache pipelineCache, + uint32_t createInfoCount, + const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetExecutionGraphPipelineScratchSizeAMDX(VkDevice device, VkPipeline executionGraph, + VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetExecutionGraphPipelineScratchSizeAMDX(VkDevice device, VkPipeline executionGraph, + VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetExecutionGraphPipelineScratchSizeAMDX(VkDevice device, VkPipeline executionGraph, + VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetExecutionGraphPipelineNodeIndexAMDX(VkDevice device, VkPipeline executionGraph, + const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo, + uint32_t* pNodeIndex, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetExecutionGraphPipelineNodeIndexAMDX(VkDevice device, VkPipeline executionGraph, + const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo, + uint32_t* pNodeIndex, const RecordObject& record_obj) {} +virtual void PostCallRecordGetExecutionGraphPipelineNodeIndexAMDX(VkDevice device, VkPipeline executionGraph, + const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo, + uint32_t* pNodeIndex, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdInitializeGraphScratchMemoryAMDX(VkCommandBuffer commandBuffer, VkPipeline executionGraph, + VkDeviceAddress scratch, VkDeviceSize scratchSize, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdInitializeGraphScratchMemoryAMDX(VkCommandBuffer commandBuffer, VkPipeline executionGraph, + VkDeviceAddress scratch, VkDeviceSize scratchSize, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdInitializeGraphScratchMemoryAMDX(VkCommandBuffer commandBuffer, VkPipeline executionGraph, + VkDeviceAddress scratch, VkDeviceSize scratchSize, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDispatchGraphAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, + const VkDispatchGraphCountInfoAMDX* pCountInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDispatchGraphAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, + const VkDispatchGraphCountInfoAMDX* pCountInfo, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDispatchGraphAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, + const VkDispatchGraphCountInfoAMDX* pCountInfo, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDispatchGraphIndirectAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, + VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX* pCountInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDispatchGraphIndirectAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, + VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX* pCountInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDispatchGraphIndirectAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, + VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX* pCountInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDispatchGraphIndirectCountAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, + VkDeviceSize scratchSize, VkDeviceAddress countInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDispatchGraphIndirectCountAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, + VkDeviceSize scratchSize, VkDeviceAddress countInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDispatchGraphIndirectCountAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, + VkDeviceSize scratchSize, VkDeviceAddress countInfo, + const RecordObject& record_obj) {} +#endif // VK_ENABLE_BETA_EXTENSIONS +virtual bool PreCallValidateCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, + const VkSampleLocationsInfoEXT* pSampleLocationsInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, + const VkSampleLocationsInfoEXT* pSampleLocationsInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetSampleLocationsEXT(VkCommandBuffer commandBuffer, + const VkSampleLocationsInfoEXT* pSampleLocationsInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, + VkSampleCountFlagBits samples, + VkMultisamplePropertiesEXT* pMultisampleProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, + VkMultisamplePropertiesEXT* pMultisampleProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceMultisamplePropertiesEXT(VkPhysicalDevice physicalDevice, VkSampleCountFlagBits samples, + VkMultisamplePropertiesEXT* pMultisampleProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetImageDrmFormatModifierPropertiesEXT(VkDevice device, VkImage image, + VkImageDrmFormatModifierPropertiesEXT* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetImageDrmFormatModifierPropertiesEXT(VkDevice device, VkImage image, + VkImageDrmFormatModifierPropertiesEXT* pProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetImageDrmFormatModifierPropertiesEXT(VkDevice device, VkImage image, + VkImageDrmFormatModifierPropertiesEXT* pProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBindShadingRateImageNV(VkCommandBuffer commandBuffer, VkImageView imageView, + VkImageLayout imageLayout, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBindShadingRateImageNV(VkCommandBuffer commandBuffer, VkImageView imageView, VkImageLayout imageLayout, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBindShadingRateImageNV(VkCommandBuffer commandBuffer, VkImageView imageView, + VkImageLayout imageLayout, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetViewportShadingRatePaletteNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, + uint32_t viewportCount, + const VkShadingRatePaletteNV* pShadingRatePalettes, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetViewportShadingRatePaletteNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, + uint32_t viewportCount, + const VkShadingRatePaletteNV* pShadingRatePalettes, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetViewportShadingRatePaletteNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, + uint32_t viewportCount, + const VkShadingRatePaletteNV* pShadingRatePalettes, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetCoarseSampleOrderNV(VkCommandBuffer commandBuffer, VkCoarseSampleOrderTypeNV sampleOrderType, + uint32_t customSampleOrderCount, + const VkCoarseSampleOrderCustomNV* pCustomSampleOrders, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetCoarseSampleOrderNV(VkCommandBuffer commandBuffer, VkCoarseSampleOrderTypeNV sampleOrderType, + uint32_t customSampleOrderCount, + const VkCoarseSampleOrderCustomNV* pCustomSampleOrders, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetCoarseSampleOrderNV(VkCommandBuffer commandBuffer, VkCoarseSampleOrderTypeNV sampleOrderType, + uint32_t customSampleOrderCount, + const VkCoarseSampleOrderCustomNV* pCustomSampleOrders, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateAccelerationStructureNV(VkDevice device, const VkAccelerationStructureCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkAccelerationStructureNV* pAccelerationStructure, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateAccelerationStructureNV(VkDevice device, const VkAccelerationStructureCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkAccelerationStructureNV* pAccelerationStructure, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateAccelerationStructureNV(VkDevice device, const VkAccelerationStructureCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkAccelerationStructureNV* pAccelerationStructure, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyAccelerationStructureNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, + const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyAccelerationStructureNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyAccelerationStructureNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) { +} +virtual bool PreCallValidateGetAccelerationStructureMemoryRequirementsNV( + VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetAccelerationStructureMemoryRequirementsNV(VkDevice device, + const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, + VkMemoryRequirements2KHR* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetAccelerationStructureMemoryRequirementsNV( + VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual bool PreCallValidateBindAccelerationStructureMemoryNV(VkDevice device, uint32_t bindInfoCount, + const VkBindAccelerationStructureMemoryInfoNV* pBindInfos, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordBindAccelerationStructureMemoryNV(VkDevice device, uint32_t bindInfoCount, + const VkBindAccelerationStructureMemoryInfoNV* pBindInfos, + const RecordObject& record_obj) {} +virtual void PostCallRecordBindAccelerationStructureMemoryNV(VkDevice device, uint32_t bindInfoCount, + const VkBindAccelerationStructureMemoryInfoNV* pBindInfos, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBuildAccelerationStructureNV(VkCommandBuffer commandBuffer, + const VkAccelerationStructureInfoNV* pInfo, VkBuffer instanceData, + VkDeviceSize instanceOffset, VkBool32 update, + VkAccelerationStructureNV dst, VkAccelerationStructureNV src, + VkBuffer scratch, VkDeviceSize scratchOffset, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBuildAccelerationStructureNV(VkCommandBuffer commandBuffer, const VkAccelerationStructureInfoNV* pInfo, + VkBuffer instanceData, VkDeviceSize instanceOffset, VkBool32 update, + VkAccelerationStructureNV dst, VkAccelerationStructureNV src, + VkBuffer scratch, VkDeviceSize scratchOffset, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBuildAccelerationStructureNV(VkCommandBuffer commandBuffer, + const VkAccelerationStructureInfoNV* pInfo, VkBuffer instanceData, + VkDeviceSize instanceOffset, VkBool32 update, + VkAccelerationStructureNV dst, VkAccelerationStructureNV src, + VkBuffer scratch, VkDeviceSize scratchOffset, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCopyAccelerationStructureNV(VkCommandBuffer commandBuffer, VkAccelerationStructureNV dst, + VkAccelerationStructureNV src, VkCopyAccelerationStructureModeKHR mode, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCopyAccelerationStructureNV(VkCommandBuffer commandBuffer, VkAccelerationStructureNV dst, + VkAccelerationStructureNV src, VkCopyAccelerationStructureModeKHR mode, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCopyAccelerationStructureNV(VkCommandBuffer commandBuffer, VkAccelerationStructureNV dst, + VkAccelerationStructureNV src, VkCopyAccelerationStructureModeKHR mode, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdTraceRaysNV(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, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdTraceRaysNV(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, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdTraceRaysNV(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, const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoNV* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoNV* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoNV* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetRayTracingShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, + uint32_t groupCount, size_t dataSize, void* pData, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetRayTracingShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, + uint32_t groupCount, size_t dataSize, void* pData, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetRayTracingShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, + uint32_t groupCount, size_t dataSize, void* pData, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetRayTracingShaderGroupHandlesNV(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, + uint32_t groupCount, size_t dataSize, void* pData, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetRayTracingShaderGroupHandlesNV(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, + uint32_t groupCount, size_t dataSize, void* pData, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetRayTracingShaderGroupHandlesNV(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, + uint32_t groupCount, size_t dataSize, void* pData, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetAccelerationStructureHandleNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, + size_t dataSize, void* pData, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetAccelerationStructureHandleNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, + size_t dataSize, void* pData, const RecordObject& record_obj) {} +virtual void PostCallRecordGetAccelerationStructureHandleNV(VkDevice device, VkAccelerationStructureNV accelerationStructure, + size_t dataSize, void* pData, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdWriteAccelerationStructuresPropertiesNV(VkCommandBuffer commandBuffer, + uint32_t accelerationStructureCount, + const VkAccelerationStructureNV* pAccelerationStructures, + VkQueryType queryType, VkQueryPool queryPool, + uint32_t firstQuery, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdWriteAccelerationStructuresPropertiesNV(VkCommandBuffer commandBuffer, + uint32_t accelerationStructureCount, + const VkAccelerationStructureNV* pAccelerationStructures, + VkQueryType queryType, VkQueryPool queryPool, + uint32_t firstQuery, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdWriteAccelerationStructuresPropertiesNV(VkCommandBuffer commandBuffer, + uint32_t accelerationStructureCount, + const VkAccelerationStructureNV* pAccelerationStructures, + VkQueryType queryType, VkQueryPool queryPool, + uint32_t firstQuery, const RecordObject& record_obj) {} +virtual bool PreCallValidateCompileDeferredNV(VkDevice device, VkPipeline pipeline, uint32_t shader, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCompileDeferredNV(VkDevice device, VkPipeline pipeline, uint32_t shader, const RecordObject& record_obj) { +} +virtual void PostCallRecordCompileDeferredNV(VkDevice device, VkPipeline pipeline, uint32_t shader, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetMemoryHostPointerPropertiesEXT(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, + const void* pHostPointer, + VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetMemoryHostPointerPropertiesEXT(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, + const void* pHostPointer, + VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetMemoryHostPointerPropertiesEXT(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, + const void* pHostPointer, + VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdWriteBufferMarkerAMD(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, + VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdWriteBufferMarkerAMD(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, + VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdWriteBufferMarkerAMD(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, + VkBuffer dstBuffer, VkDeviceSize dstOffset, uint32_t marker, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdWriteBufferMarker2AMD(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkBuffer dstBuffer, + VkDeviceSize dstOffset, uint32_t marker, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdWriteBufferMarker2AMD(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkBuffer dstBuffer, + VkDeviceSize dstOffset, uint32_t marker, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdWriteBufferMarker2AMD(VkCommandBuffer commandBuffer, VkPipelineStageFlags2 stage, VkBuffer dstBuffer, + VkDeviceSize dstOffset, uint32_t marker, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, + uint32_t* pTimeDomainCount, VkTimeDomainKHR* pTimeDomains, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, + VkTimeDomainKHR* pTimeDomains, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, uint32_t* pTimeDomainCount, + VkTimeDomainKHR* pTimeDomains, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetCalibratedTimestampsEXT(VkDevice device, uint32_t timestampCount, + const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, + uint64_t* pMaxDeviation, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetCalibratedTimestampsEXT(VkDevice device, uint32_t timestampCount, + const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, + uint64_t* pMaxDeviation, const RecordObject& record_obj) {} +virtual void PostCallRecordGetCalibratedTimestampsEXT(VkDevice device, uint32_t timestampCount, + const VkCalibratedTimestampInfoKHR* pTimestampInfos, uint64_t* pTimestamps, + uint64_t* pMaxDeviation, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDrawMeshTasksIndirectNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + uint32_t drawCount, uint32_t stride, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDrawMeshTasksIndirectNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + uint32_t drawCount, uint32_t stride, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDrawMeshTasksIndirectNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + uint32_t drawCount, uint32_t stride, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, uint32_t stride, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) { +} +virtual bool PreCallValidateCmdSetExclusiveScissorEnableNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, + uint32_t exclusiveScissorCount, const VkBool32* pExclusiveScissorEnables, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetExclusiveScissorEnableNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, + uint32_t exclusiveScissorCount, const VkBool32* pExclusiveScissorEnables, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetExclusiveScissorEnableNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, + uint32_t exclusiveScissorCount, const VkBool32* pExclusiveScissorEnables, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetExclusiveScissorNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, + uint32_t exclusiveScissorCount, const VkRect2D* pExclusiveScissors, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetExclusiveScissorNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, + uint32_t exclusiveScissorCount, const VkRect2D* pExclusiveScissors, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetExclusiveScissorNV(VkCommandBuffer commandBuffer, uint32_t firstExclusiveScissor, + uint32_t exclusiveScissorCount, const VkRect2D* pExclusiveScissors, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetCheckpointNV(VkCommandBuffer commandBuffer, const void* pCheckpointMarker, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetCheckpointNV(VkCommandBuffer commandBuffer, const void* pCheckpointMarker, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetCheckpointNV(VkCommandBuffer commandBuffer, const void* pCheckpointMarker, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetQueueCheckpointDataNV(VkQueue queue, uint32_t* pCheckpointDataCount, + VkCheckpointDataNV* pCheckpointData, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetQueueCheckpointDataNV(VkQueue queue, uint32_t* pCheckpointDataCount, + VkCheckpointDataNV* pCheckpointData, const RecordObject& record_obj) {} +virtual void PostCallRecordGetQueueCheckpointDataNV(VkQueue queue, uint32_t* pCheckpointDataCount, + VkCheckpointDataNV* pCheckpointData, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetQueueCheckpointData2NV(VkQueue queue, uint32_t* pCheckpointDataCount, + VkCheckpointData2NV* pCheckpointData, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetQueueCheckpointData2NV(VkQueue queue, uint32_t* pCheckpointDataCount, + VkCheckpointData2NV* pCheckpointData, const RecordObject& record_obj) {} +virtual void PostCallRecordGetQueueCheckpointData2NV(VkQueue queue, uint32_t* pCheckpointDataCount, + VkCheckpointData2NV* pCheckpointData, const RecordObject& record_obj) {} +virtual bool PreCallValidateInitializePerformanceApiINTEL(VkDevice device, + const VkInitializePerformanceApiInfoINTEL* pInitializeInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordInitializePerformanceApiINTEL(VkDevice device, const VkInitializePerformanceApiInfoINTEL* pInitializeInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordInitializePerformanceApiINTEL(VkDevice device, + const VkInitializePerformanceApiInfoINTEL* pInitializeInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateUninitializePerformanceApiINTEL(VkDevice device, const ErrorObject& error_obj) const { return false; } +virtual void PreCallRecordUninitializePerformanceApiINTEL(VkDevice device, const RecordObject& record_obj) {} +virtual void PostCallRecordUninitializePerformanceApiINTEL(VkDevice device, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetPerformanceMarkerINTEL(VkCommandBuffer commandBuffer, + const VkPerformanceMarkerInfoINTEL* pMarkerInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetPerformanceMarkerINTEL(VkCommandBuffer commandBuffer, + const VkPerformanceMarkerInfoINTEL* pMarkerInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetPerformanceMarkerINTEL(VkCommandBuffer commandBuffer, + const VkPerformanceMarkerInfoINTEL* pMarkerInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetPerformanceStreamMarkerINTEL(VkCommandBuffer commandBuffer, + const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetPerformanceStreamMarkerINTEL(VkCommandBuffer commandBuffer, + const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetPerformanceStreamMarkerINTEL(VkCommandBuffer commandBuffer, + const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetPerformanceOverrideINTEL(VkCommandBuffer commandBuffer, + const VkPerformanceOverrideInfoINTEL* pOverrideInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetPerformanceOverrideINTEL(VkCommandBuffer commandBuffer, + const VkPerformanceOverrideInfoINTEL* pOverrideInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetPerformanceOverrideINTEL(VkCommandBuffer commandBuffer, + const VkPerformanceOverrideInfoINTEL* pOverrideInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateAcquirePerformanceConfigurationINTEL(VkDevice device, + const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, + VkPerformanceConfigurationINTEL* pConfiguration, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordAcquirePerformanceConfigurationINTEL(VkDevice device, + const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, + VkPerformanceConfigurationINTEL* pConfiguration, + const RecordObject& record_obj) {} +virtual void PostCallRecordAcquirePerformanceConfigurationINTEL(VkDevice device, + const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo, + VkPerformanceConfigurationINTEL* pConfiguration, + const RecordObject& record_obj) {} +virtual bool PreCallValidateReleasePerformanceConfigurationINTEL(VkDevice device, VkPerformanceConfigurationINTEL configuration, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordReleasePerformanceConfigurationINTEL(VkDevice device, VkPerformanceConfigurationINTEL configuration, + const RecordObject& record_obj) {} +virtual void PostCallRecordReleasePerformanceConfigurationINTEL(VkDevice device, VkPerformanceConfigurationINTEL configuration, + const RecordObject& record_obj) {} +virtual bool PreCallValidateQueueSetPerformanceConfigurationINTEL(VkQueue queue, VkPerformanceConfigurationINTEL configuration, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordQueueSetPerformanceConfigurationINTEL(VkQueue queue, VkPerformanceConfigurationINTEL configuration, + const RecordObject& record_obj) {} +virtual void PostCallRecordQueueSetPerformanceConfigurationINTEL(VkQueue queue, VkPerformanceConfigurationINTEL configuration, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPerformanceParameterINTEL(VkDevice device, VkPerformanceParameterTypeINTEL parameter, + VkPerformanceValueINTEL* pValue, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPerformanceParameterINTEL(VkDevice device, VkPerformanceParameterTypeINTEL parameter, + VkPerformanceValueINTEL* pValue, const RecordObject& record_obj) {} +virtual void PostCallRecordGetPerformanceParameterINTEL(VkDevice device, VkPerformanceParameterTypeINTEL parameter, + VkPerformanceValueINTEL* pValue, const RecordObject& record_obj) {} +virtual bool PreCallValidateSetLocalDimmingAMD(VkDevice device, VkSwapchainKHR swapChain, VkBool32 localDimmingEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordSetLocalDimmingAMD(VkDevice device, VkSwapchainKHR swapChain, VkBool32 localDimmingEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordSetLocalDimmingAMD(VkDevice device, VkSwapchainKHR swapChain, VkBool32 localDimmingEnable, + const RecordObject& record_obj) {} +#ifdef VK_USE_PLATFORM_FUCHSIA +virtual bool PreCallValidateCreateImagePipeSurfaceFUCHSIA(VkInstance instance, + const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateImagePipeSurfaceFUCHSIA(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateImagePipeSurfaceFUCHSIA(VkInstance instance, + const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_FUCHSIA +#ifdef VK_USE_PLATFORM_METAL_EXT +virtual bool PreCallValidateCreateMetalSurfaceEXT(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateMetalSurfaceEXT(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateMetalSurfaceEXT(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_METAL_EXT +virtual bool PreCallValidateGetBufferDeviceAddressEXT(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetBufferDeviceAddressEXT(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetBufferDeviceAddressEXT(VkDevice device, const VkBufferDeviceAddressInfo* pInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceToolPropertiesEXT(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, + VkPhysicalDeviceToolProperties* pToolProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceToolPropertiesEXT(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, + VkPhysicalDeviceToolProperties* pToolProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceToolPropertiesEXT(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, + VkPhysicalDeviceToolProperties* pToolProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceCooperativeMatrixPropertiesNV(VkPhysicalDevice physicalDevice, + uint32_t* pPropertyCount, + VkCooperativeMatrixPropertiesNV* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceCooperativeMatrixPropertiesNV(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkCooperativeMatrixPropertiesNV* pProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceCooperativeMatrixPropertiesNV(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, + VkCooperativeMatrixPropertiesNV* pProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( + VkPhysicalDevice physicalDevice, uint32_t* pCombinationCount, VkFramebufferMixedSamplesCombinationNV* pCombinations, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( + VkPhysicalDevice physicalDevice, uint32_t* pCombinationCount, VkFramebufferMixedSamplesCombinationNV* pCombinations, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV( + VkPhysicalDevice physicalDevice, uint32_t* pCombinationCount, VkFramebufferMixedSamplesCombinationNV* pCombinations, + const RecordObject& record_obj) {} +#ifdef VK_USE_PLATFORM_WIN32_KHR +virtual bool PreCallValidateGetPhysicalDeviceSurfacePresentModes2EXT(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceSurfacePresentModes2EXT(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceSurfacePresentModes2EXT(VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes, + const RecordObject& record_obj) {} +virtual bool PreCallValidateAcquireFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordAcquireFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain, + const RecordObject& record_obj) {} +virtual void PostCallRecordAcquireFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain, + const RecordObject& record_obj) {} +virtual bool PreCallValidateReleaseFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordReleaseFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain, + const RecordObject& record_obj) {} +virtual void PostCallRecordReleaseFullScreenExclusiveModeEXT(VkDevice device, VkSwapchainKHR swapchain, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeviceGroupSurfacePresentModes2EXT(VkDevice device, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + VkDeviceGroupPresentModeFlagsKHR* pModes, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeviceGroupSurfacePresentModes2EXT(VkDevice device, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + VkDeviceGroupPresentModeFlagsKHR* pModes, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeviceGroupSurfacePresentModes2EXT(VkDevice device, + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, + VkDeviceGroupPresentModeFlagsKHR* pModes, + const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_WIN32_KHR +virtual bool PreCallValidateCreateHeadlessSurfaceEXT(VkInstance instance, const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateHeadlessSurfaceEXT(VkInstance instance, const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateHeadlessSurfaceEXT(VkInstance instance, const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetLineStippleEXT(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, + uint16_t lineStipplePattern, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetLineStippleEXT(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, + uint16_t lineStipplePattern, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetLineStippleEXT(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, + uint16_t lineStipplePattern, const RecordObject& record_obj) {} +virtual bool PreCallValidateResetQueryPoolEXT(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordResetQueryPoolEXT(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, + const RecordObject& record_obj) {} +virtual void PostCallRecordResetQueryPoolEXT(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetCullModeEXT(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetCullModeEXT(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetCullModeEXT(VkCommandBuffer commandBuffer, VkCullModeFlags cullMode, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetFrontFaceEXT(VkCommandBuffer commandBuffer, VkFrontFace frontFace, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetFrontFaceEXT(VkCommandBuffer commandBuffer, VkFrontFace frontFace, const RecordObject& record_obj) { +} +virtual void PostCallRecordCmdSetFrontFaceEXT(VkCommandBuffer commandBuffer, VkFrontFace frontFace, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetPrimitiveTopologyEXT(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetPrimitiveTopologyEXT(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetPrimitiveTopologyEXT(VkCommandBuffer commandBuffer, VkPrimitiveTopology primitiveTopology, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetViewportWithCountEXT(VkCommandBuffer commandBuffer, uint32_t viewportCount, + const VkViewport* pViewports, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetViewportWithCountEXT(VkCommandBuffer commandBuffer, uint32_t viewportCount, + const VkViewport* pViewports, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetViewportWithCountEXT(VkCommandBuffer commandBuffer, uint32_t viewportCount, + const VkViewport* pViewports, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetScissorWithCountEXT(VkCommandBuffer commandBuffer, uint32_t scissorCount, + const VkRect2D* pScissors, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetScissorWithCountEXT(VkCommandBuffer commandBuffer, uint32_t scissorCount, const VkRect2D* pScissors, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetScissorWithCountEXT(VkCommandBuffer commandBuffer, uint32_t scissorCount, + const VkRect2D* pScissors, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBindVertexBuffers2EXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, + const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, + const VkDeviceSize* pSizes, const VkDeviceSize* pStrides, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBindVertexBuffers2EXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, + const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, + const VkDeviceSize* pSizes, const VkDeviceSize* pStrides, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBindVertexBuffers2EXT(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, + const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, + const VkDeviceSize* pSizes, const VkDeviceSize* pStrides, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDepthTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDepthTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDepthTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthTestEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDepthWriteEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDepthWriteEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDepthWriteEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthWriteEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDepthCompareOpEXT(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDepthCompareOpEXT(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDepthCompareOpEXT(VkCommandBuffer commandBuffer, VkCompareOp depthCompareOp, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDepthBoundsTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDepthBoundsTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDepthBoundsTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBoundsTestEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetStencilTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetStencilTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetStencilTestEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stencilTestEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetStencilOpEXT(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, + VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetStencilOpEXT(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, + VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetStencilOpEXT(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, VkStencilOp failOp, + VkStencilOp passOp, VkStencilOp depthFailOp, VkCompareOp compareOp, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCopyMemoryToImageEXT(VkDevice device, const VkCopyMemoryToImageInfoEXT* pCopyMemoryToImageInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCopyMemoryToImageEXT(VkDevice device, const VkCopyMemoryToImageInfoEXT* pCopyMemoryToImageInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCopyMemoryToImageEXT(VkDevice device, const VkCopyMemoryToImageInfoEXT* pCopyMemoryToImageInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCopyImageToMemoryEXT(VkDevice device, const VkCopyImageToMemoryInfoEXT* pCopyImageToMemoryInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCopyImageToMemoryEXT(VkDevice device, const VkCopyImageToMemoryInfoEXT* pCopyImageToMemoryInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCopyImageToMemoryEXT(VkDevice device, const VkCopyImageToMemoryInfoEXT* pCopyImageToMemoryInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCopyImageToImageEXT(VkDevice device, const VkCopyImageToImageInfoEXT* pCopyImageToImageInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCopyImageToImageEXT(VkDevice device, const VkCopyImageToImageInfoEXT* pCopyImageToImageInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCopyImageToImageEXT(VkDevice device, const VkCopyImageToImageInfoEXT* pCopyImageToImageInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateTransitionImageLayoutEXT(VkDevice device, uint32_t transitionCount, + const VkHostImageLayoutTransitionInfoEXT* pTransitions, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordTransitionImageLayoutEXT(VkDevice device, uint32_t transitionCount, + const VkHostImageLayoutTransitionInfoEXT* pTransitions, + const RecordObject& record_obj) {} +virtual void PostCallRecordTransitionImageLayoutEXT(VkDevice device, uint32_t transitionCount, + const VkHostImageLayoutTransitionInfoEXT* pTransitions, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetImageSubresourceLayout2EXT(VkDevice device, VkImage image, + const VkImageSubresource2KHR* pSubresource, + VkSubresourceLayout2KHR* pLayout, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetImageSubresourceLayout2EXT(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, + VkSubresourceLayout2KHR* pLayout, const RecordObject& record_obj) {} +virtual void PostCallRecordGetImageSubresourceLayout2EXT(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, + VkSubresourceLayout2KHR* pLayout, const RecordObject& record_obj) {} +virtual bool PreCallValidateReleaseSwapchainImagesEXT(VkDevice device, const VkReleaseSwapchainImagesInfoEXT* pReleaseInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordReleaseSwapchainImagesEXT(VkDevice device, const VkReleaseSwapchainImagesInfoEXT* pReleaseInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordReleaseSwapchainImagesEXT(VkDevice device, const VkReleaseSwapchainImagesInfoEXT* pReleaseInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetGeneratedCommandsMemoryRequirementsNV(VkDevice device, + const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetGeneratedCommandsMemoryRequirementsNV(VkDevice device, + const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetGeneratedCommandsMemoryRequirementsNV(VkDevice device, + const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdPreprocessGeneratedCommandsNV(VkCommandBuffer commandBuffer, + const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdPreprocessGeneratedCommandsNV(VkCommandBuffer commandBuffer, + const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdPreprocessGeneratedCommandsNV(VkCommandBuffer commandBuffer, + const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdExecuteGeneratedCommandsNV(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, + const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdExecuteGeneratedCommandsNV(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, + const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdExecuteGeneratedCommandsNV(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, + const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBindPipelineShaderGroupNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipeline pipeline, uint32_t groupIndex, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBindPipelineShaderGroupNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipeline pipeline, uint32_t groupIndex, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBindPipelineShaderGroupNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipeline pipeline, uint32_t groupIndex, const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateIndirectCommandsLayoutNV(VkDevice device, const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkIndirectCommandsLayoutNV* pIndirectCommandsLayout, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateIndirectCommandsLayoutNV(VkDevice device, const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkIndirectCommandsLayoutNV* pIndirectCommandsLayout, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateIndirectCommandsLayoutNV(VkDevice device, const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkIndirectCommandsLayoutNV* pIndirectCommandsLayout, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyIndirectCommandsLayoutNV(VkDevice device, VkIndirectCommandsLayoutNV indirectCommandsLayout, + const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyIndirectCommandsLayoutNV(VkDevice device, VkIndirectCommandsLayoutNV indirectCommandsLayout, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) { +} +virtual void PostCallRecordDestroyIndirectCommandsLayoutNV(VkDevice device, VkIndirectCommandsLayoutNV indirectCommandsLayout, + const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDepthBias2EXT(VkCommandBuffer commandBuffer, const VkDepthBiasInfoEXT* pDepthBiasInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDepthBias2EXT(VkCommandBuffer commandBuffer, const VkDepthBiasInfoEXT* pDepthBiasInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDepthBias2EXT(VkCommandBuffer commandBuffer, const VkDepthBiasInfoEXT* pDepthBiasInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateAcquireDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, VkDisplayKHR display, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordAcquireDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, VkDisplayKHR display, + const RecordObject& record_obj) {} +virtual void PostCallRecordAcquireDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, VkDisplayKHR display, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, uint32_t connectorId, + VkDisplayKHR* display, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, uint32_t connectorId, + VkDisplayKHR* display, const RecordObject& record_obj) {} +virtual void PostCallRecordGetDrmDisplayEXT(VkPhysicalDevice physicalDevice, int32_t drmFd, uint32_t connectorId, + VkDisplayKHR* display, const RecordObject& record_obj) {} +virtual bool PreCallValidateCreatePrivateDataSlotEXT(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreatePrivateDataSlotEXT(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreatePrivateDataSlotEXT(VkDevice device, const VkPrivateDataSlotCreateInfo* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkPrivateDataSlot* pPrivateDataSlot, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyPrivateDataSlotEXT(VkDevice device, VkPrivateDataSlot privateDataSlot, + const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyPrivateDataSlotEXT(VkDevice device, VkPrivateDataSlot privateDataSlot, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyPrivateDataSlotEXT(VkDevice device, VkPrivateDataSlot privateDataSlot, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual bool PreCallValidateSetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, + VkPrivateDataSlot privateDataSlot, uint64_t data, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordSetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, + VkPrivateDataSlot privateDataSlot, uint64_t data, const RecordObject& record_obj) {} +virtual void PostCallRecordSetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, + VkPrivateDataSlot privateDataSlot, uint64_t data, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, + VkPrivateDataSlot privateDataSlot, uint64_t* pData, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, + VkPrivateDataSlot privateDataSlot, uint64_t* pData, const RecordObject& record_obj) {} +virtual void PostCallRecordGetPrivateDataEXT(VkDevice device, VkObjectType objectType, uint64_t objectHandle, + VkPrivateDataSlot privateDataSlot, uint64_t* pData, const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateCudaModuleNV(VkDevice device, const VkCudaModuleCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCudaModuleNV* pModule, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateCudaModuleNV(VkDevice device, const VkCudaModuleCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCudaModuleNV* pModule, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateCudaModuleNV(VkDevice device, const VkCudaModuleCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCudaModuleNV* pModule, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetCudaModuleCacheNV(VkDevice device, VkCudaModuleNV module, size_t* pCacheSize, void* pCacheData, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetCudaModuleCacheNV(VkDevice device, VkCudaModuleNV module, size_t* pCacheSize, void* pCacheData, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetCudaModuleCacheNV(VkDevice device, VkCudaModuleNV module, size_t* pCacheSize, void* pCacheData, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateCudaFunctionNV(VkDevice device, const VkCudaFunctionCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCudaFunctionNV* pFunction, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateCudaFunctionNV(VkDevice device, const VkCudaFunctionCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCudaFunctionNV* pFunction, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateCudaFunctionNV(VkDevice device, const VkCudaFunctionCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkCudaFunctionNV* pFunction, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyCudaModuleNV(VkDevice device, VkCudaModuleNV module, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyCudaModuleNV(VkDevice device, VkCudaModuleNV module, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyCudaModuleNV(VkDevice device, VkCudaModuleNV module, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyCudaFunctionNV(VkDevice device, VkCudaFunctionNV function, + const VkAllocationCallbacks* pAllocator, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyCudaFunctionNV(VkDevice device, VkCudaFunctionNV function, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyCudaFunctionNV(VkDevice device, VkCudaFunctionNV function, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCudaLaunchKernelNV(VkCommandBuffer commandBuffer, const VkCudaLaunchInfoNV* pLaunchInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCudaLaunchKernelNV(VkCommandBuffer commandBuffer, const VkCudaLaunchInfoNV* pLaunchInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCudaLaunchKernelNV(VkCommandBuffer commandBuffer, const VkCudaLaunchInfoNV* pLaunchInfo, + const RecordObject& record_obj) {} +#ifdef VK_USE_PLATFORM_METAL_EXT +virtual bool PreCallValidateExportMetalObjectsEXT(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordExportMetalObjectsEXT(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordExportMetalObjectsEXT(VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo, + const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_METAL_EXT +virtual bool PreCallValidateGetDescriptorSetLayoutSizeEXT(VkDevice device, VkDescriptorSetLayout layout, + VkDeviceSize* pLayoutSizeInBytes, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDescriptorSetLayoutSizeEXT(VkDevice device, VkDescriptorSetLayout layout, + VkDeviceSize* pLayoutSizeInBytes, const RecordObject& record_obj) {} +virtual void PostCallRecordGetDescriptorSetLayoutSizeEXT(VkDevice device, VkDescriptorSetLayout layout, + VkDeviceSize* pLayoutSizeInBytes, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDescriptorSetLayoutBindingOffsetEXT(VkDevice device, VkDescriptorSetLayout layout, uint32_t binding, + VkDeviceSize* pOffset, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDescriptorSetLayoutBindingOffsetEXT(VkDevice device, VkDescriptorSetLayout layout, uint32_t binding, + VkDeviceSize* pOffset, const RecordObject& record_obj) {} +virtual void PostCallRecordGetDescriptorSetLayoutBindingOffsetEXT(VkDevice device, VkDescriptorSetLayout layout, uint32_t binding, + VkDeviceSize* pOffset, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDescriptorEXT(VkDevice device, const VkDescriptorGetInfoEXT* pDescriptorInfo, size_t dataSize, + void* pDescriptor, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDescriptorEXT(VkDevice device, const VkDescriptorGetInfoEXT* pDescriptorInfo, size_t dataSize, + void* pDescriptor, const RecordObject& record_obj) {} +virtual void PostCallRecordGetDescriptorEXT(VkDevice device, const VkDescriptorGetInfoEXT* pDescriptorInfo, size_t dataSize, + void* pDescriptor, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBindDescriptorBuffersEXT(VkCommandBuffer commandBuffer, uint32_t bufferCount, + const VkDescriptorBufferBindingInfoEXT* pBindingInfos, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBindDescriptorBuffersEXT(VkCommandBuffer commandBuffer, uint32_t bufferCount, + const VkDescriptorBufferBindingInfoEXT* pBindingInfos, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBindDescriptorBuffersEXT(VkCommandBuffer commandBuffer, uint32_t bufferCount, + const VkDescriptorBufferBindingInfoEXT* pBindingInfos, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDescriptorBufferOffsetsEXT(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, + const uint32_t* pBufferIndices, const VkDeviceSize* pOffsets, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDescriptorBufferOffsetsEXT(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, + const uint32_t* pBufferIndices, const VkDeviceSize* pOffsets, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDescriptorBufferOffsetsEXT(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, uint32_t firstSet, uint32_t setCount, + const uint32_t* pBufferIndices, const VkDeviceSize* pOffsets, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBindDescriptorBufferEmbeddedSamplersEXT(VkCommandBuffer commandBuffer, + VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, uint32_t set, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBindDescriptorBufferEmbeddedSamplersEXT(VkCommandBuffer commandBuffer, + VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, + uint32_t set, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBindDescriptorBufferEmbeddedSamplersEXT(VkCommandBuffer commandBuffer, + VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, uint32_t set, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetBufferOpaqueCaptureDescriptorDataEXT(VkDevice device, + const VkBufferCaptureDescriptorDataInfoEXT* pInfo, void* pData, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetBufferOpaqueCaptureDescriptorDataEXT(VkDevice device, + const VkBufferCaptureDescriptorDataInfoEXT* pInfo, void* pData, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetBufferOpaqueCaptureDescriptorDataEXT(VkDevice device, + const VkBufferCaptureDescriptorDataInfoEXT* pInfo, void* pData, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetImageOpaqueCaptureDescriptorDataEXT(VkDevice device, + const VkImageCaptureDescriptorDataInfoEXT* pInfo, void* pData, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetImageOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkImageCaptureDescriptorDataInfoEXT* pInfo, + void* pData, const RecordObject& record_obj) {} +virtual void PostCallRecordGetImageOpaqueCaptureDescriptorDataEXT(VkDevice device, const VkImageCaptureDescriptorDataInfoEXT* pInfo, + void* pData, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetImageViewOpaqueCaptureDescriptorDataEXT(VkDevice device, + const VkImageViewCaptureDescriptorDataInfoEXT* pInfo, + void* pData, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetImageViewOpaqueCaptureDescriptorDataEXT(VkDevice device, + const VkImageViewCaptureDescriptorDataInfoEXT* pInfo, + void* pData, const RecordObject& record_obj) {} +virtual void PostCallRecordGetImageViewOpaqueCaptureDescriptorDataEXT(VkDevice device, + const VkImageViewCaptureDescriptorDataInfoEXT* pInfo, + void* pData, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetSamplerOpaqueCaptureDescriptorDataEXT(VkDevice device, + const VkSamplerCaptureDescriptorDataInfoEXT* pInfo, + void* pData, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetSamplerOpaqueCaptureDescriptorDataEXT(VkDevice device, + const VkSamplerCaptureDescriptorDataInfoEXT* pInfo, void* pData, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetSamplerOpaqueCaptureDescriptorDataEXT(VkDevice device, + const VkSamplerCaptureDescriptorDataInfoEXT* pInfo, void* pData, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( + VkDevice device, const VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfo, void* pData, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( + VkDevice device, const VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfo, void* pData, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetAccelerationStructureOpaqueCaptureDescriptorDataEXT( + VkDevice device, const VkAccelerationStructureCaptureDescriptorDataInfoEXT* pInfo, void* pData, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetFragmentShadingRateEnumNV(VkCommandBuffer commandBuffer, VkFragmentShadingRateNV shadingRate, + const VkFragmentShadingRateCombinerOpKHR combinerOps[2], + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetFragmentShadingRateEnumNV(VkCommandBuffer commandBuffer, VkFragmentShadingRateNV shadingRate, + const VkFragmentShadingRateCombinerOpKHR combinerOps[2], + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetFragmentShadingRateEnumNV(VkCommandBuffer commandBuffer, VkFragmentShadingRateNV shadingRate, + const VkFragmentShadingRateCombinerOpKHR combinerOps[2], + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeviceFaultInfoEXT(VkDevice device, VkDeviceFaultCountsEXT* pFaultCounts, + VkDeviceFaultInfoEXT* pFaultInfo, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeviceFaultInfoEXT(VkDevice device, VkDeviceFaultCountsEXT* pFaultCounts, + VkDeviceFaultInfoEXT* pFaultInfo, const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeviceFaultInfoEXT(VkDevice device, VkDeviceFaultCountsEXT* pFaultCounts, + VkDeviceFaultInfoEXT* pFaultInfo, const RecordObject& record_obj) {} +#ifdef VK_USE_PLATFORM_WIN32_KHR +virtual bool PreCallValidateAcquireWinrtDisplayNV(VkPhysicalDevice physicalDevice, VkDisplayKHR display, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordAcquireWinrtDisplayNV(VkPhysicalDevice physicalDevice, VkDisplayKHR display, + const RecordObject& record_obj) {} +virtual void PostCallRecordAcquireWinrtDisplayNV(VkPhysicalDevice physicalDevice, VkDisplayKHR display, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetWinrtDisplayNV(VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR* pDisplay, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetWinrtDisplayNV(VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR* pDisplay, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetWinrtDisplayNV(VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR* pDisplay, + const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_WIN32_KHR +#ifdef VK_USE_PLATFORM_DIRECTFB_EXT +virtual bool PreCallValidateCreateDirectFBSurfaceEXT(VkInstance instance, const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateDirectFBSurfaceEXT(VkInstance instance, const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateDirectFBSurfaceEXT(VkInstance instance, const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceDirectFBPresentationSupportEXT(VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex, IDirectFB* dfb, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceDirectFBPresentationSupportEXT(VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex, IDirectFB* dfb, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceDirectFBPresentationSupportEXT(VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex, IDirectFB* dfb, + const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_DIRECTFB_EXT +virtual bool PreCallValidateCmdSetVertexInputEXT(VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, + const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, + uint32_t vertexAttributeDescriptionCount, + const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetVertexInputEXT(VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, + const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, + uint32_t vertexAttributeDescriptionCount, + const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetVertexInputEXT(VkCommandBuffer commandBuffer, uint32_t vertexBindingDescriptionCount, + const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions, + uint32_t vertexAttributeDescriptionCount, + const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions, + const RecordObject& record_obj) {} +#ifdef VK_USE_PLATFORM_FUCHSIA +virtual bool PreCallValidateGetMemoryZirconHandleFUCHSIA(VkDevice device, + const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, + zx_handle_t* pZirconHandle, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetMemoryZirconHandleFUCHSIA(VkDevice device, + const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, + zx_handle_t* pZirconHandle, const RecordObject& record_obj) {} +virtual void PostCallRecordGetMemoryZirconHandleFUCHSIA(VkDevice device, + const VkMemoryGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, + zx_handle_t* pZirconHandle, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetMemoryZirconHandlePropertiesFUCHSIA( + VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, + VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetMemoryZirconHandlePropertiesFUCHSIA( + VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, + VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties, const RecordObject& record_obj) {} +virtual void PostCallRecordGetMemoryZirconHandlePropertiesFUCHSIA( + VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, + VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties, const RecordObject& record_obj) {} +virtual bool PreCallValidateImportSemaphoreZirconHandleFUCHSIA( + VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordImportSemaphoreZirconHandleFUCHSIA( + VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordImportSemaphoreZirconHandleFUCHSIA( + VkDevice device, const VkImportSemaphoreZirconHandleInfoFUCHSIA* pImportSemaphoreZirconHandleInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetSemaphoreZirconHandleFUCHSIA(VkDevice device, + const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, + zx_handle_t* pZirconHandle, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetSemaphoreZirconHandleFUCHSIA(VkDevice device, + const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, + zx_handle_t* pZirconHandle, const RecordObject& record_obj) {} +virtual void PostCallRecordGetSemaphoreZirconHandleFUCHSIA(VkDevice device, + const VkSemaphoreGetZirconHandleInfoFUCHSIA* pGetZirconHandleInfo, + zx_handle_t* pZirconHandle, const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateBufferCollectionFUCHSIA(VkDevice device, const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkBufferCollectionFUCHSIA* pCollection, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateBufferCollectionFUCHSIA(VkDevice device, const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkBufferCollectionFUCHSIA* pCollection, const RecordObject& record_obj) {} +virtual void PostCallRecordCreateBufferCollectionFUCHSIA(VkDevice device, const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkBufferCollectionFUCHSIA* pCollection, const RecordObject& record_obj) {} +virtual bool PreCallValidateSetBufferCollectionImageConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, + const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordSetBufferCollectionImageConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, + const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordSetBufferCollectionImageConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, + const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateSetBufferCollectionBufferConstraintsFUCHSIA( + VkDevice device, VkBufferCollectionFUCHSIA collection, const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordSetBufferCollectionBufferConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, + const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordSetBufferCollectionBufferConstraintsFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, + const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyBufferCollectionFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, + const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyBufferCollectionFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyBufferCollectionFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) { +} +virtual bool PreCallValidateGetBufferCollectionPropertiesFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, + VkBufferCollectionPropertiesFUCHSIA* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetBufferCollectionPropertiesFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, + VkBufferCollectionPropertiesFUCHSIA* pProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetBufferCollectionPropertiesFUCHSIA(VkDevice device, VkBufferCollectionFUCHSIA collection, + VkBufferCollectionPropertiesFUCHSIA* pProperties, + const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_FUCHSIA +virtual bool PreCallValidateGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(VkDevice device, VkRenderPass renderpass, + VkExtent2D* pMaxWorkgroupSize, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(VkDevice device, VkRenderPass renderpass, + VkExtent2D* pMaxWorkgroupSize, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI(VkDevice device, VkRenderPass renderpass, + VkExtent2D* pMaxWorkgroupSize, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSubpassShadingHUAWEI(VkCommandBuffer commandBuffer, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSubpassShadingHUAWEI(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSubpassShadingHUAWEI(VkCommandBuffer commandBuffer, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBindInvocationMaskHUAWEI(VkCommandBuffer commandBuffer, VkImageView imageView, + VkImageLayout imageLayout, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBindInvocationMaskHUAWEI(VkCommandBuffer commandBuffer, VkImageView imageView, + VkImageLayout imageLayout, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBindInvocationMaskHUAWEI(VkCommandBuffer commandBuffer, VkImageView imageView, + VkImageLayout imageLayout, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetMemoryRemoteAddressNV(VkDevice device, + const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo, + VkRemoteAddressNV* pAddress, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetMemoryRemoteAddressNV(VkDevice device, + const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo, + VkRemoteAddressNV* pAddress, const RecordObject& record_obj) {} +virtual void PostCallRecordGetMemoryRemoteAddressNV(VkDevice device, + const VkMemoryGetRemoteAddressInfoNV* pMemoryGetRemoteAddressInfo, + VkRemoteAddressNV* pAddress, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPipelinePropertiesEXT(VkDevice device, const VkPipelineInfoEXT* pPipelineInfo, + VkBaseOutStructure* pPipelineProperties, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPipelinePropertiesEXT(VkDevice device, const VkPipelineInfoEXT* pPipelineInfo, + VkBaseOutStructure* pPipelineProperties, const RecordObject& record_obj) {} +virtual void PostCallRecordGetPipelinePropertiesEXT(VkDevice device, const VkPipelineInfoEXT* pPipelineInfo, + VkBaseOutStructure* pPipelineProperties, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetPatchControlPointsEXT(VkCommandBuffer commandBuffer, uint32_t patchControlPoints, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetPatchControlPointsEXT(VkCommandBuffer commandBuffer, uint32_t patchControlPoints, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetPatchControlPointsEXT(VkCommandBuffer commandBuffer, uint32_t patchControlPoints, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetRasterizerDiscardEnableEXT(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetRasterizerDiscardEnableEXT(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetRasterizerDiscardEnableEXT(VkCommandBuffer commandBuffer, VkBool32 rasterizerDiscardEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDepthBiasEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDepthBiasEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDepthBiasEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthBiasEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetLogicOpEXT(VkCommandBuffer commandBuffer, VkLogicOp logicOp, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetLogicOpEXT(VkCommandBuffer commandBuffer, VkLogicOp logicOp, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetLogicOpEXT(VkCommandBuffer commandBuffer, VkLogicOp logicOp, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetPrimitiveRestartEnableEXT(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetPrimitiveRestartEnableEXT(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetPrimitiveRestartEnableEXT(VkCommandBuffer commandBuffer, VkBool32 primitiveRestartEnable, + const RecordObject& record_obj) {} +#ifdef VK_USE_PLATFORM_SCREEN_QNX +virtual bool PreCallValidateCreateScreenSurfaceQNX(VkInstance instance, const VkScreenSurfaceCreateInfoQNX* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateScreenSurfaceQNX(VkInstance instance, const VkScreenSurfaceCreateInfoQNX* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateScreenSurfaceQNX(VkInstance instance, const VkScreenSurfaceCreateInfoQNX* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceScreenPresentationSupportQNX(VkPhysicalDevice physicalDevice, + uint32_t queueFamilyIndex, struct _screen_window* window, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceScreenPresentationSupportQNX(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + struct _screen_window* window, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceScreenPresentationSupportQNX(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, + struct _screen_window* window, + const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_SCREEN_QNX +virtual bool PreCallValidateCmdSetColorWriteEnableEXT(VkCommandBuffer commandBuffer, uint32_t attachmentCount, + const VkBool32* pColorWriteEnables, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetColorWriteEnableEXT(VkCommandBuffer commandBuffer, uint32_t attachmentCount, + const VkBool32* pColorWriteEnables, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetColorWriteEnableEXT(VkCommandBuffer commandBuffer, uint32_t attachmentCount, + const VkBool32* pColorWriteEnables, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDrawMultiEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, + const VkMultiDrawInfoEXT* pVertexInfo, uint32_t instanceCount, uint32_t firstInstance, + uint32_t stride, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDrawMultiEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawInfoEXT* pVertexInfo, + uint32_t instanceCount, uint32_t firstInstance, uint32_t stride, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDrawMultiEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, const VkMultiDrawInfoEXT* pVertexInfo, + uint32_t instanceCount, uint32_t firstInstance, uint32_t stride, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDrawMultiIndexedEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, + const VkMultiDrawIndexedInfoEXT* pIndexInfo, uint32_t instanceCount, + uint32_t firstInstance, uint32_t stride, const int32_t* pVertexOffset, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDrawMultiIndexedEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, + const VkMultiDrawIndexedInfoEXT* pIndexInfo, uint32_t instanceCount, + uint32_t firstInstance, uint32_t stride, const int32_t* pVertexOffset, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDrawMultiIndexedEXT(VkCommandBuffer commandBuffer, uint32_t drawCount, + const VkMultiDrawIndexedInfoEXT* pIndexInfo, uint32_t instanceCount, + uint32_t firstInstance, uint32_t stride, const int32_t* pVertexOffset, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateMicromapEXT(VkDevice device, const VkMicromapCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkMicromapEXT* pMicromap, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateMicromapEXT(VkDevice device, const VkMicromapCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkMicromapEXT* pMicromap, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateMicromapEXT(VkDevice device, const VkMicromapCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkMicromapEXT* pMicromap, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyMicromapEXT(VkDevice device, VkMicromapEXT micromap, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyMicromapEXT(VkDevice device, VkMicromapEXT micromap, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyMicromapEXT(VkDevice device, VkMicromapEXT micromap, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBuildMicromapsEXT(VkCommandBuffer commandBuffer, uint32_t infoCount, + const VkMicromapBuildInfoEXT* pInfos, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBuildMicromapsEXT(VkCommandBuffer commandBuffer, uint32_t infoCount, + const VkMicromapBuildInfoEXT* pInfos, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBuildMicromapsEXT(VkCommandBuffer commandBuffer, uint32_t infoCount, + const VkMicromapBuildInfoEXT* pInfos, const RecordObject& record_obj) {} +virtual bool PreCallValidateBuildMicromapsEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, + const VkMicromapBuildInfoEXT* pInfos, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordBuildMicromapsEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, + const VkMicromapBuildInfoEXT* pInfos, const RecordObject& record_obj) {} +virtual void PostCallRecordBuildMicromapsEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, uint32_t infoCount, + const VkMicromapBuildInfoEXT* pInfos, const RecordObject& record_obj) {} +virtual bool PreCallValidateCopyMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMicromapInfoEXT* pInfo, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCopyMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMicromapInfoEXT* pInfo, const RecordObject& record_obj) {} +virtual void PostCallRecordCopyMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMicromapInfoEXT* pInfo, const RecordObject& record_obj) {} +virtual bool PreCallValidateCopyMicromapToMemoryEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMicromapToMemoryInfoEXT* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCopyMicromapToMemoryEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMicromapToMemoryInfoEXT* pInfo, const RecordObject& record_obj) {} +virtual void PostCallRecordCopyMicromapToMemoryEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMicromapToMemoryInfoEXT* pInfo, const RecordObject& record_obj) {} +virtual bool PreCallValidateCopyMemoryToMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMemoryToMicromapInfoEXT* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCopyMemoryToMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMemoryToMicromapInfoEXT* pInfo, const RecordObject& record_obj) {} +virtual void PostCallRecordCopyMemoryToMicromapEXT(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMemoryToMicromapInfoEXT* pInfo, const RecordObject& record_obj) {} +virtual bool PreCallValidateWriteMicromapsPropertiesEXT(VkDevice device, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, + VkQueryType queryType, size_t dataSize, void* pData, size_t stride, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordWriteMicromapsPropertiesEXT(VkDevice device, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, + VkQueryType queryType, size_t dataSize, void* pData, size_t stride, + const RecordObject& record_obj) {} +virtual void PostCallRecordWriteMicromapsPropertiesEXT(VkDevice device, uint32_t micromapCount, const VkMicromapEXT* pMicromaps, + VkQueryType queryType, size_t dataSize, void* pData, size_t stride, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCopyMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCopyMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT* pInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCopyMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapInfoEXT* pInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCopyMicromapToMemoryEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCopyMicromapToMemoryEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT* pInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCopyMicromapToMemoryEXT(VkCommandBuffer commandBuffer, const VkCopyMicromapToMemoryInfoEXT* pInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCopyMemoryToMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCopyMemoryToMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT* pInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCopyMemoryToMicromapEXT(VkCommandBuffer commandBuffer, const VkCopyMemoryToMicromapInfoEXT* pInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdWriteMicromapsPropertiesEXT(VkCommandBuffer commandBuffer, uint32_t micromapCount, + const VkMicromapEXT* pMicromaps, VkQueryType queryType, + VkQueryPool queryPool, uint32_t firstQuery, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdWriteMicromapsPropertiesEXT(VkCommandBuffer commandBuffer, uint32_t micromapCount, + const VkMicromapEXT* pMicromaps, VkQueryType queryType, + VkQueryPool queryPool, uint32_t firstQuery, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdWriteMicromapsPropertiesEXT(VkCommandBuffer commandBuffer, uint32_t micromapCount, + const VkMicromapEXT* pMicromaps, VkQueryType queryType, + VkQueryPool queryPool, uint32_t firstQuery, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeviceMicromapCompatibilityEXT(VkDevice device, const VkMicromapVersionInfoEXT* pVersionInfo, + VkAccelerationStructureCompatibilityKHR* pCompatibility, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeviceMicromapCompatibilityEXT(VkDevice device, const VkMicromapVersionInfoEXT* pVersionInfo, + VkAccelerationStructureCompatibilityKHR* pCompatibility, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeviceMicromapCompatibilityEXT(VkDevice device, const VkMicromapVersionInfoEXT* pVersionInfo, + VkAccelerationStructureCompatibilityKHR* pCompatibility, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetMicromapBuildSizesEXT(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, + const VkMicromapBuildInfoEXT* pBuildInfo, + VkMicromapBuildSizesInfoEXT* pSizeInfo, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetMicromapBuildSizesEXT(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, + const VkMicromapBuildInfoEXT* pBuildInfo, VkMicromapBuildSizesInfoEXT* pSizeInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetMicromapBuildSizesEXT(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, + const VkMicromapBuildInfoEXT* pBuildInfo, + VkMicromapBuildSizesInfoEXT* pSizeInfo, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDrawClusterHUAWEI(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, + uint32_t groupCountZ, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDrawClusterHUAWEI(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, + uint32_t groupCountZ, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDrawClusterHUAWEI(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, + uint32_t groupCountZ, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDrawClusterIndirectHUAWEI(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDrawClusterIndirectHUAWEI(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDrawClusterIndirectHUAWEI(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + const RecordObject& record_obj) {} +virtual bool PreCallValidateSetDeviceMemoryPriorityEXT(VkDevice device, VkDeviceMemory memory, float priority, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordSetDeviceMemoryPriorityEXT(VkDevice device, VkDeviceMemory memory, float priority, + const RecordObject& record_obj) {} +virtual void PostCallRecordSetDeviceMemoryPriorityEXT(VkDevice device, VkDeviceMemory memory, float priority, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDescriptorSetLayoutHostMappingInfoVALVE( + VkDevice device, const VkDescriptorSetBindingReferenceVALVE* pBindingReference, + VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDescriptorSetLayoutHostMappingInfoVALVE(VkDevice device, + const VkDescriptorSetBindingReferenceVALVE* pBindingReference, + VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDescriptorSetLayoutHostMappingInfoVALVE(VkDevice device, + const VkDescriptorSetBindingReferenceVALVE* pBindingReference, + VkDescriptorSetLayoutHostMappingInfoVALVE* pHostMapping, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDescriptorSetHostMappingVALVE(VkDevice device, VkDescriptorSet descriptorSet, void** ppData, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDescriptorSetHostMappingVALVE(VkDevice device, VkDescriptorSet descriptorSet, void** ppData, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDescriptorSetHostMappingVALVE(VkDevice device, VkDescriptorSet descriptorSet, void** ppData, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCopyMemoryIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, + uint32_t copyCount, uint32_t stride, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCopyMemoryIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, + uint32_t copyCount, uint32_t stride, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCopyMemoryIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, + uint32_t copyCount, uint32_t stride, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCopyMemoryToImageIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, + uint32_t copyCount, uint32_t stride, VkImage dstImage, + VkImageLayout dstImageLayout, + const VkImageSubresourceLayers* pImageSubresources, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCopyMemoryToImageIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, + uint32_t copyCount, uint32_t stride, VkImage dstImage, + VkImageLayout dstImageLayout, + const VkImageSubresourceLayers* pImageSubresources, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCopyMemoryToImageIndirectNV(VkCommandBuffer commandBuffer, VkDeviceAddress copyBufferAddress, + uint32_t copyCount, uint32_t stride, VkImage dstImage, + VkImageLayout dstImageLayout, + const VkImageSubresourceLayers* pImageSubresources, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDecompressMemoryNV(VkCommandBuffer commandBuffer, uint32_t decompressRegionCount, + const VkDecompressMemoryRegionNV* pDecompressMemoryRegions, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDecompressMemoryNV(VkCommandBuffer commandBuffer, uint32_t decompressRegionCount, + const VkDecompressMemoryRegionNV* pDecompressMemoryRegions, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDecompressMemoryNV(VkCommandBuffer commandBuffer, uint32_t decompressRegionCount, + const VkDecompressMemoryRegionNV* pDecompressMemoryRegions, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDecompressMemoryIndirectCountNV(VkCommandBuffer commandBuffer, + VkDeviceAddress indirectCommandsAddress, + VkDeviceAddress indirectCommandsCountAddress, uint32_t stride, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDecompressMemoryIndirectCountNV(VkCommandBuffer commandBuffer, VkDeviceAddress indirectCommandsAddress, + VkDeviceAddress indirectCommandsCountAddress, uint32_t stride, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDecompressMemoryIndirectCountNV(VkCommandBuffer commandBuffer, + VkDeviceAddress indirectCommandsAddress, + VkDeviceAddress indirectCommandsCountAddress, uint32_t stride, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPipelineIndirectMemoryRequirementsNV(VkDevice device, const VkComputePipelineCreateInfo* pCreateInfo, + VkMemoryRequirements2* pMemoryRequirements, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPipelineIndirectMemoryRequirementsNV(VkDevice device, const VkComputePipelineCreateInfo* pCreateInfo, + VkMemoryRequirements2* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPipelineIndirectMemoryRequirementsNV(VkDevice device, const VkComputePipelineCreateInfo* pCreateInfo, + VkMemoryRequirements2* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdUpdatePipelineIndirectBufferNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipeline pipeline, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdUpdatePipelineIndirectBufferNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipeline pipeline, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdUpdatePipelineIndirectBufferNV(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, + VkPipeline pipeline, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPipelineIndirectDeviceAddressNV(VkDevice device, const VkPipelineIndirectDeviceAddressInfoNV* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPipelineIndirectDeviceAddressNV(VkDevice device, const VkPipelineIndirectDeviceAddressInfoNV* pInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPipelineIndirectDeviceAddressNV(VkDevice device, const VkPipelineIndirectDeviceAddressInfoNV* pInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDepthClampEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClampEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDepthClampEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClampEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDepthClampEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClampEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetPolygonModeEXT(VkCommandBuffer commandBuffer, VkPolygonMode polygonMode, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetPolygonModeEXT(VkCommandBuffer commandBuffer, VkPolygonMode polygonMode, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetPolygonModeEXT(VkCommandBuffer commandBuffer, VkPolygonMode polygonMode, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetRasterizationSamplesEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits rasterizationSamples, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetRasterizationSamplesEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits rasterizationSamples, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetRasterizationSamplesEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits rasterizationSamples, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetSampleMaskEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits samples, + const VkSampleMask* pSampleMask, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetSampleMaskEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits samples, + const VkSampleMask* pSampleMask, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetSampleMaskEXT(VkCommandBuffer commandBuffer, VkSampleCountFlagBits samples, + const VkSampleMask* pSampleMask, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetAlphaToCoverageEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToCoverageEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetAlphaToCoverageEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToCoverageEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetAlphaToCoverageEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToCoverageEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetAlphaToOneEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToOneEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetAlphaToOneEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToOneEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetAlphaToOneEnableEXT(VkCommandBuffer commandBuffer, VkBool32 alphaToOneEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetLogicOpEnableEXT(VkCommandBuffer commandBuffer, VkBool32 logicOpEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetLogicOpEnableEXT(VkCommandBuffer commandBuffer, VkBool32 logicOpEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetLogicOpEnableEXT(VkCommandBuffer commandBuffer, VkBool32 logicOpEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetColorBlendEnableEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, + uint32_t attachmentCount, const VkBool32* pColorBlendEnables, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetColorBlendEnableEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, + uint32_t attachmentCount, const VkBool32* pColorBlendEnables, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetColorBlendEnableEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, + uint32_t attachmentCount, const VkBool32* pColorBlendEnables, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetColorBlendEquationEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, + uint32_t attachmentCount, + const VkColorBlendEquationEXT* pColorBlendEquations, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetColorBlendEquationEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, + uint32_t attachmentCount, const VkColorBlendEquationEXT* pColorBlendEquations, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetColorBlendEquationEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, + uint32_t attachmentCount, + const VkColorBlendEquationEXT* pColorBlendEquations, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetColorWriteMaskEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, + uint32_t attachmentCount, const VkColorComponentFlags* pColorWriteMasks, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetColorWriteMaskEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, + const VkColorComponentFlags* pColorWriteMasks, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetColorWriteMaskEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, + uint32_t attachmentCount, const VkColorComponentFlags* pColorWriteMasks, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetTessellationDomainOriginEXT(VkCommandBuffer commandBuffer, + VkTessellationDomainOrigin domainOrigin, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetTessellationDomainOriginEXT(VkCommandBuffer commandBuffer, VkTessellationDomainOrigin domainOrigin, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetTessellationDomainOriginEXT(VkCommandBuffer commandBuffer, VkTessellationDomainOrigin domainOrigin, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetRasterizationStreamEXT(VkCommandBuffer commandBuffer, uint32_t rasterizationStream, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetRasterizationStreamEXT(VkCommandBuffer commandBuffer, uint32_t rasterizationStream, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetRasterizationStreamEXT(VkCommandBuffer commandBuffer, uint32_t rasterizationStream, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetConservativeRasterizationModeEXT(VkCommandBuffer commandBuffer, + VkConservativeRasterizationModeEXT conservativeRasterizationMode, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetConservativeRasterizationModeEXT(VkCommandBuffer commandBuffer, + VkConservativeRasterizationModeEXT conservativeRasterizationMode, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetConservativeRasterizationModeEXT(VkCommandBuffer commandBuffer, + VkConservativeRasterizationModeEXT conservativeRasterizationMode, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetExtraPrimitiveOverestimationSizeEXT(VkCommandBuffer commandBuffer, + float extraPrimitiveOverestimationSize, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetExtraPrimitiveOverestimationSizeEXT(VkCommandBuffer commandBuffer, + float extraPrimitiveOverestimationSize, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetExtraPrimitiveOverestimationSizeEXT(VkCommandBuffer commandBuffer, + float extraPrimitiveOverestimationSize, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDepthClipEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClipEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDepthClipEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClipEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDepthClipEnableEXT(VkCommandBuffer commandBuffer, VkBool32 depthClipEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetSampleLocationsEnableEXT(VkCommandBuffer commandBuffer, VkBool32 sampleLocationsEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetSampleLocationsEnableEXT(VkCommandBuffer commandBuffer, VkBool32 sampleLocationsEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetSampleLocationsEnableEXT(VkCommandBuffer commandBuffer, VkBool32 sampleLocationsEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetColorBlendAdvancedEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, + uint32_t attachmentCount, + const VkColorBlendAdvancedEXT* pColorBlendAdvanced, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetColorBlendAdvancedEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, + uint32_t attachmentCount, const VkColorBlendAdvancedEXT* pColorBlendAdvanced, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetColorBlendAdvancedEXT(VkCommandBuffer commandBuffer, uint32_t firstAttachment, + uint32_t attachmentCount, const VkColorBlendAdvancedEXT* pColorBlendAdvanced, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetProvokingVertexModeEXT(VkCommandBuffer commandBuffer, + VkProvokingVertexModeEXT provokingVertexMode, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetProvokingVertexModeEXT(VkCommandBuffer commandBuffer, VkProvokingVertexModeEXT provokingVertexMode, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetProvokingVertexModeEXT(VkCommandBuffer commandBuffer, VkProvokingVertexModeEXT provokingVertexMode, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetLineRasterizationModeEXT(VkCommandBuffer commandBuffer, + VkLineRasterizationModeEXT lineRasterizationMode, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetLineRasterizationModeEXT(VkCommandBuffer commandBuffer, + VkLineRasterizationModeEXT lineRasterizationMode, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetLineRasterizationModeEXT(VkCommandBuffer commandBuffer, + VkLineRasterizationModeEXT lineRasterizationMode, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetLineStippleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stippledLineEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetLineStippleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stippledLineEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetLineStippleEnableEXT(VkCommandBuffer commandBuffer, VkBool32 stippledLineEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDepthClipNegativeOneToOneEXT(VkCommandBuffer commandBuffer, VkBool32 negativeOneToOne, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDepthClipNegativeOneToOneEXT(VkCommandBuffer commandBuffer, VkBool32 negativeOneToOne, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDepthClipNegativeOneToOneEXT(VkCommandBuffer commandBuffer, VkBool32 negativeOneToOne, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetViewportWScalingEnableNV(VkCommandBuffer commandBuffer, VkBool32 viewportWScalingEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetViewportWScalingEnableNV(VkCommandBuffer commandBuffer, VkBool32 viewportWScalingEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetViewportWScalingEnableNV(VkCommandBuffer commandBuffer, VkBool32 viewportWScalingEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetViewportSwizzleNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, + const VkViewportSwizzleNV* pViewportSwizzles, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetViewportSwizzleNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, + const VkViewportSwizzleNV* pViewportSwizzles, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetViewportSwizzleNV(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, + const VkViewportSwizzleNV* pViewportSwizzles, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetCoverageToColorEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageToColorEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetCoverageToColorEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageToColorEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetCoverageToColorEnableNV(VkCommandBuffer commandBuffer, VkBool32 coverageToColorEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetCoverageToColorLocationNV(VkCommandBuffer commandBuffer, uint32_t coverageToColorLocation, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetCoverageToColorLocationNV(VkCommandBuffer commandBuffer, uint32_t coverageToColorLocation, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetCoverageToColorLocationNV(VkCommandBuffer commandBuffer, uint32_t coverageToColorLocation, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetCoverageModulationModeNV(VkCommandBuffer commandBuffer, + VkCoverageModulationModeNV coverageModulationMode, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetCoverageModulationModeNV(VkCommandBuffer commandBuffer, + VkCoverageModulationModeNV coverageModulationMode, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetCoverageModulationModeNV(VkCommandBuffer commandBuffer, + VkCoverageModulationModeNV coverageModulationMode, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetCoverageModulationTableEnableNV(VkCommandBuffer commandBuffer, + VkBool32 coverageModulationTableEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetCoverageModulationTableEnableNV(VkCommandBuffer commandBuffer, + VkBool32 coverageModulationTableEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetCoverageModulationTableEnableNV(VkCommandBuffer commandBuffer, + VkBool32 coverageModulationTableEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetCoverageModulationTableNV(VkCommandBuffer commandBuffer, uint32_t coverageModulationTableCount, + const float* pCoverageModulationTable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetCoverageModulationTableNV(VkCommandBuffer commandBuffer, uint32_t coverageModulationTableCount, + const float* pCoverageModulationTable, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetCoverageModulationTableNV(VkCommandBuffer commandBuffer, uint32_t coverageModulationTableCount, + const float* pCoverageModulationTable, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetShadingRateImageEnableNV(VkCommandBuffer commandBuffer, VkBool32 shadingRateImageEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetShadingRateImageEnableNV(VkCommandBuffer commandBuffer, VkBool32 shadingRateImageEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetShadingRateImageEnableNV(VkCommandBuffer commandBuffer, VkBool32 shadingRateImageEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetRepresentativeFragmentTestEnableNV(VkCommandBuffer commandBuffer, + VkBool32 representativeFragmentTestEnable, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetRepresentativeFragmentTestEnableNV(VkCommandBuffer commandBuffer, + VkBool32 representativeFragmentTestEnable, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetRepresentativeFragmentTestEnableNV(VkCommandBuffer commandBuffer, + VkBool32 representativeFragmentTestEnable, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetCoverageReductionModeNV(VkCommandBuffer commandBuffer, + VkCoverageReductionModeNV coverageReductionMode, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetCoverageReductionModeNV(VkCommandBuffer commandBuffer, + VkCoverageReductionModeNV coverageReductionMode, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetCoverageReductionModeNV(VkCommandBuffer commandBuffer, + VkCoverageReductionModeNV coverageReductionMode, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetShaderModuleIdentifierEXT(VkDevice device, VkShaderModule shaderModule, + VkShaderModuleIdentifierEXT* pIdentifier, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetShaderModuleIdentifierEXT(VkDevice device, VkShaderModule shaderModule, + VkShaderModuleIdentifierEXT* pIdentifier, const RecordObject& record_obj) {} +virtual void PostCallRecordGetShaderModuleIdentifierEXT(VkDevice device, VkShaderModule shaderModule, + VkShaderModuleIdentifierEXT* pIdentifier, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetShaderModuleCreateInfoIdentifierEXT(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, + VkShaderModuleIdentifierEXT* pIdentifier, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetShaderModuleCreateInfoIdentifierEXT(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, + VkShaderModuleIdentifierEXT* pIdentifier, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetShaderModuleCreateInfoIdentifierEXT(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, + VkShaderModuleIdentifierEXT* pIdentifier, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceOpticalFlowImageFormatsNV( + VkPhysicalDevice physicalDevice, const VkOpticalFlowImageFormatInfoNV* pOpticalFlowImageFormatInfo, uint32_t* pFormatCount, + VkOpticalFlowImageFormatPropertiesNV* pImageFormatProperties, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceOpticalFlowImageFormatsNV( + VkPhysicalDevice physicalDevice, const VkOpticalFlowImageFormatInfoNV* pOpticalFlowImageFormatInfo, uint32_t* pFormatCount, + VkOpticalFlowImageFormatPropertiesNV* pImageFormatProperties, const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceOpticalFlowImageFormatsNV( + VkPhysicalDevice physicalDevice, const VkOpticalFlowImageFormatInfoNV* pOpticalFlowImageFormatInfo, uint32_t* pFormatCount, + VkOpticalFlowImageFormatPropertiesNV* pImageFormatProperties, const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateOpticalFlowSessionNV(VkDevice device, const VkOpticalFlowSessionCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkOpticalFlowSessionNV* pSession, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateOpticalFlowSessionNV(VkDevice device, const VkOpticalFlowSessionCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkOpticalFlowSessionNV* pSession, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateOpticalFlowSessionNV(VkDevice device, const VkOpticalFlowSessionCreateInfoNV* pCreateInfo, + const VkAllocationCallbacks* pAllocator, VkOpticalFlowSessionNV* pSession, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyOpticalFlowSessionNV(VkDevice device, VkOpticalFlowSessionNV session, + const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyOpticalFlowSessionNV(VkDevice device, VkOpticalFlowSessionNV session, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyOpticalFlowSessionNV(VkDevice device, VkOpticalFlowSessionNV session, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual bool PreCallValidateBindOpticalFlowSessionImageNV(VkDevice device, VkOpticalFlowSessionNV session, + VkOpticalFlowSessionBindingPointNV bindingPoint, VkImageView view, + VkImageLayout layout, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordBindOpticalFlowSessionImageNV(VkDevice device, VkOpticalFlowSessionNV session, + VkOpticalFlowSessionBindingPointNV bindingPoint, VkImageView view, + VkImageLayout layout, const RecordObject& record_obj) {} +virtual void PostCallRecordBindOpticalFlowSessionImageNV(VkDevice device, VkOpticalFlowSessionNV session, + VkOpticalFlowSessionBindingPointNV bindingPoint, VkImageView view, + VkImageLayout layout, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdOpticalFlowExecuteNV(VkCommandBuffer commandBuffer, VkOpticalFlowSessionNV session, + const VkOpticalFlowExecuteInfoNV* pExecuteInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdOpticalFlowExecuteNV(VkCommandBuffer commandBuffer, VkOpticalFlowSessionNV session, + const VkOpticalFlowExecuteInfoNV* pExecuteInfo, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdOpticalFlowExecuteNV(VkCommandBuffer commandBuffer, VkOpticalFlowSessionNV session, + const VkOpticalFlowExecuteInfoNV* pExecuteInfo, const RecordObject& record_obj) { +} +virtual bool PreCallValidateAntiLagUpdateAMD(VkDevice device, const VkAntiLagDataAMD* pData, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordAntiLagUpdateAMD(VkDevice device, const VkAntiLagDataAMD* pData, const RecordObject& record_obj) {} +virtual void PostCallRecordAntiLagUpdateAMD(VkDevice device, const VkAntiLagDataAMD* pData, const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateShadersEXT(VkDevice device, uint32_t createInfoCount, const VkShaderCreateInfoEXT* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkShaderEXT* pShaders, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateShadersEXT(VkDevice device, uint32_t createInfoCount, const VkShaderCreateInfoEXT* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkShaderEXT* pShaders, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateShadersEXT(VkDevice device, uint32_t createInfoCount, const VkShaderCreateInfoEXT* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkShaderEXT* pShaders, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyShaderEXT(VkDevice device, VkShaderEXT shader, const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyShaderEXT(VkDevice device, VkShaderEXT shader, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyShaderEXT(VkDevice device, VkShaderEXT shader, const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetShaderBinaryDataEXT(VkDevice device, VkShaderEXT shader, size_t* pDataSize, void* pData, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetShaderBinaryDataEXT(VkDevice device, VkShaderEXT shader, size_t* pDataSize, void* pData, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetShaderBinaryDataEXT(VkDevice device, VkShaderEXT shader, size_t* pDataSize, void* pData, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBindShadersEXT(VkCommandBuffer commandBuffer, uint32_t stageCount, + const VkShaderStageFlagBits* pStages, const VkShaderEXT* pShaders, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBindShadersEXT(VkCommandBuffer commandBuffer, uint32_t stageCount, + const VkShaderStageFlagBits* pStages, const VkShaderEXT* pShaders, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBindShadersEXT(VkCommandBuffer commandBuffer, uint32_t stageCount, + const VkShaderStageFlagBits* pStages, const VkShaderEXT* pShaders, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetDepthClampRangeEXT(VkCommandBuffer commandBuffer, VkDepthClampModeEXT depthClampMode, + const VkDepthClampRangeEXT* pDepthClampRange, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetDepthClampRangeEXT(VkCommandBuffer commandBuffer, VkDepthClampModeEXT depthClampMode, + const VkDepthClampRangeEXT* pDepthClampRange, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetDepthClampRangeEXT(VkCommandBuffer commandBuffer, VkDepthClampModeEXT depthClampMode, + const VkDepthClampRangeEXT* pDepthClampRange, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetFramebufferTilePropertiesQCOM(VkDevice device, VkFramebuffer framebuffer, uint32_t* pPropertiesCount, + VkTilePropertiesQCOM* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetFramebufferTilePropertiesQCOM(VkDevice device, VkFramebuffer framebuffer, uint32_t* pPropertiesCount, + VkTilePropertiesQCOM* pProperties, const RecordObject& record_obj) {} +virtual void PostCallRecordGetFramebufferTilePropertiesQCOM(VkDevice device, VkFramebuffer framebuffer, uint32_t* pPropertiesCount, + VkTilePropertiesQCOM* pProperties, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDynamicRenderingTilePropertiesQCOM(VkDevice device, const VkRenderingInfo* pRenderingInfo, + VkTilePropertiesQCOM* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDynamicRenderingTilePropertiesQCOM(VkDevice device, const VkRenderingInfo* pRenderingInfo, + VkTilePropertiesQCOM* pProperties, const RecordObject& record_obj) { +} +virtual void PostCallRecordGetDynamicRenderingTilePropertiesQCOM(VkDevice device, const VkRenderingInfo* pRenderingInfo, + VkTilePropertiesQCOM* pProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateSetLatencySleepModeNV(VkDevice device, VkSwapchainKHR swapchain, + const VkLatencySleepModeInfoNV* pSleepModeInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordSetLatencySleepModeNV(VkDevice device, VkSwapchainKHR swapchain, + const VkLatencySleepModeInfoNV* pSleepModeInfo, const RecordObject& record_obj) {} +virtual void PostCallRecordSetLatencySleepModeNV(VkDevice device, VkSwapchainKHR swapchain, + const VkLatencySleepModeInfoNV* pSleepModeInfo, const RecordObject& record_obj) {} +virtual bool PreCallValidateLatencySleepNV(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepInfoNV* pSleepInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordLatencySleepNV(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepInfoNV* pSleepInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordLatencySleepNV(VkDevice device, VkSwapchainKHR swapchain, const VkLatencySleepInfoNV* pSleepInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateSetLatencyMarkerNV(VkDevice device, VkSwapchainKHR swapchain, + const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordSetLatencyMarkerNV(VkDevice device, VkSwapchainKHR swapchain, + const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo, const RecordObject& record_obj) {} +virtual void PostCallRecordSetLatencyMarkerNV(VkDevice device, VkSwapchainKHR swapchain, + const VkSetLatencyMarkerInfoNV* pLatencyMarkerInfo, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetLatencyTimingsNV(VkDevice device, VkSwapchainKHR swapchain, + VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetLatencyTimingsNV(VkDevice device, VkSwapchainKHR swapchain, + VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo, const RecordObject& record_obj) {} +virtual void PostCallRecordGetLatencyTimingsNV(VkDevice device, VkSwapchainKHR swapchain, + VkGetLatencyMarkerInfoNV* pLatencyMarkerInfo, const RecordObject& record_obj) {} +virtual bool PreCallValidateQueueNotifyOutOfBandNV(VkQueue queue, const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordQueueNotifyOutOfBandNV(VkQueue queue, const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordQueueNotifyOutOfBandNV(VkQueue queue, const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetAttachmentFeedbackLoopEnableEXT(VkCommandBuffer commandBuffer, VkImageAspectFlags aspectMask, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetAttachmentFeedbackLoopEnableEXT(VkCommandBuffer commandBuffer, VkImageAspectFlags aspectMask, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetAttachmentFeedbackLoopEnableEXT(VkCommandBuffer commandBuffer, VkImageAspectFlags aspectMask, + const RecordObject& record_obj) {} +#ifdef VK_USE_PLATFORM_SCREEN_QNX +virtual bool PreCallValidateGetScreenBufferPropertiesQNX(VkDevice device, const struct _screen_buffer* buffer, + VkScreenBufferPropertiesQNX* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetScreenBufferPropertiesQNX(VkDevice device, const struct _screen_buffer* buffer, + VkScreenBufferPropertiesQNX* pProperties, const RecordObject& record_obj) {} +virtual void PostCallRecordGetScreenBufferPropertiesQNX(VkDevice device, const struct _screen_buffer* buffer, + VkScreenBufferPropertiesQNX* pProperties, const RecordObject& record_obj) {} +#endif // VK_USE_PLATFORM_SCREEN_QNX +virtual bool PreCallValidateGetGeneratedCommandsMemoryRequirementsEXT(VkDevice device, + const VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetGeneratedCommandsMemoryRequirementsEXT(VkDevice device, + const VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetGeneratedCommandsMemoryRequirementsEXT(VkDevice device, + const VkGeneratedCommandsMemoryRequirementsInfoEXT* pInfo, + VkMemoryRequirements2* pMemoryRequirements, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdPreprocessGeneratedCommandsEXT(VkCommandBuffer commandBuffer, + const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, + VkCommandBuffer stateCommandBuffer, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdPreprocessGeneratedCommandsEXT(VkCommandBuffer commandBuffer, + const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, + VkCommandBuffer stateCommandBuffer, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdPreprocessGeneratedCommandsEXT(VkCommandBuffer commandBuffer, + const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, + VkCommandBuffer stateCommandBuffer, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdExecuteGeneratedCommandsEXT(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, + const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdExecuteGeneratedCommandsEXT(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, + const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdExecuteGeneratedCommandsEXT(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed, + const VkGeneratedCommandsInfoEXT* pGeneratedCommandsInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateIndirectCommandsLayoutEXT(VkDevice device, + const VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkIndirectCommandsLayoutEXT* pIndirectCommandsLayout, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateIndirectCommandsLayoutEXT(VkDevice device, const VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkIndirectCommandsLayoutEXT* pIndirectCommandsLayout, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateIndirectCommandsLayoutEXT(VkDevice device, + const VkIndirectCommandsLayoutCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkIndirectCommandsLayoutEXT* pIndirectCommandsLayout, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyIndirectCommandsLayoutEXT(VkDevice device, VkIndirectCommandsLayoutEXT indirectCommandsLayout, + const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyIndirectCommandsLayoutEXT(VkDevice device, VkIndirectCommandsLayoutEXT indirectCommandsLayout, + const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyIndirectCommandsLayoutEXT(VkDevice device, VkIndirectCommandsLayoutEXT indirectCommandsLayout, + const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateIndirectExecutionSetEXT(VkDevice device, const VkIndirectExecutionSetCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkIndirectExecutionSetEXT* pIndirectExecutionSet, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateIndirectExecutionSetEXT(VkDevice device, const VkIndirectExecutionSetCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkIndirectExecutionSetEXT* pIndirectExecutionSet, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateIndirectExecutionSetEXT(VkDevice device, const VkIndirectExecutionSetCreateInfoEXT* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkIndirectExecutionSetEXT* pIndirectExecutionSet, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyIndirectExecutionSetEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, + const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyIndirectExecutionSetEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) {} +virtual void PostCallRecordDestroyIndirectExecutionSetEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) { +} +virtual bool PreCallValidateUpdateIndirectExecutionSetPipelineEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, + uint32_t executionSetWriteCount, + const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordUpdateIndirectExecutionSetPipelineEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, + uint32_t executionSetWriteCount, + const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites, + const RecordObject& record_obj) {} +virtual void PostCallRecordUpdateIndirectExecutionSetPipelineEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, + uint32_t executionSetWriteCount, + const VkWriteIndirectExecutionSetPipelineEXT* pExecutionSetWrites, + const RecordObject& record_obj) {} +virtual bool PreCallValidateUpdateIndirectExecutionSetShaderEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, + uint32_t executionSetWriteCount, + const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordUpdateIndirectExecutionSetShaderEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, + uint32_t executionSetWriteCount, + const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites, + const RecordObject& record_obj) {} +virtual void PostCallRecordUpdateIndirectExecutionSetShaderEXT(VkDevice device, VkIndirectExecutionSetEXT indirectExecutionSet, + uint32_t executionSetWriteCount, + const VkWriteIndirectExecutionSetShaderEXT* pExecutionSetWrites, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( + VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixFlexibleDimensionsPropertiesNV* pProperties, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( + VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixFlexibleDimensionsPropertiesNV* pProperties, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetPhysicalDeviceCooperativeMatrixFlexibleDimensionsPropertiesNV( + VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixFlexibleDimensionsPropertiesNV* pProperties, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateAccelerationStructureKHR(VkDevice device, const VkAccelerationStructureCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkAccelerationStructureKHR* pAccelerationStructure, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateAccelerationStructureKHR(VkDevice device, const VkAccelerationStructureCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkAccelerationStructureKHR* pAccelerationStructure, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateAccelerationStructureKHR(VkDevice device, const VkAccelerationStructureCreateInfoKHR* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkAccelerationStructureKHR* pAccelerationStructure, + const RecordObject& record_obj) {} +virtual bool PreCallValidateDestroyAccelerationStructureKHR(VkDevice device, VkAccelerationStructureKHR accelerationStructure, + const VkAllocationCallbacks* pAllocator, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordDestroyAccelerationStructureKHR(VkDevice device, VkAccelerationStructureKHR accelerationStructure, + const VkAllocationCallbacks* pAllocator, const RecordObject& record_obj) { +} +virtual void PostCallRecordDestroyAccelerationStructureKHR(VkDevice device, VkAccelerationStructureKHR accelerationStructure, + const VkAllocationCallbacks* pAllocator, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBuildAccelerationStructuresKHR( + VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, + const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBuildAccelerationStructuresKHR( + VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, + const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBuildAccelerationStructuresKHR( + VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, + const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdBuildAccelerationStructuresIndirectKHR(VkCommandBuffer commandBuffer, uint32_t infoCount, + const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, + const VkDeviceAddress* pIndirectDeviceAddresses, + const uint32_t* pIndirectStrides, + const uint32_t* const* ppMaxPrimitiveCounts, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdBuildAccelerationStructuresIndirectKHR(VkCommandBuffer commandBuffer, uint32_t infoCount, + const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, + const VkDeviceAddress* pIndirectDeviceAddresses, + const uint32_t* pIndirectStrides, + const uint32_t* const* ppMaxPrimitiveCounts, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdBuildAccelerationStructuresIndirectKHR(VkCommandBuffer commandBuffer, uint32_t infoCount, + const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, + const VkDeviceAddress* pIndirectDeviceAddresses, + const uint32_t* pIndirectStrides, + const uint32_t* const* ppMaxPrimitiveCounts, + const RecordObject& record_obj) {} +virtual bool PreCallValidateBuildAccelerationStructuresKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + uint32_t infoCount, + const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, + const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordBuildAccelerationStructuresKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + uint32_t infoCount, + const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, + const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos, + const RecordObject& record_obj) {} +virtual void PostCallRecordBuildAccelerationStructuresKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + uint32_t infoCount, + const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, + const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCopyAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyAccelerationStructureInfoKHR* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCopyAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyAccelerationStructureInfoKHR* pInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCopyAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyAccelerationStructureInfoKHR* pInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCopyAccelerationStructureToMemoryKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCopyAccelerationStructureToMemoryKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCopyAccelerationStructureToMemoryKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCopyMemoryToAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCopyMemoryToAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCopyMemoryToAccelerationStructureKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateWriteAccelerationStructuresPropertiesKHR(VkDevice device, uint32_t accelerationStructureCount, + const VkAccelerationStructureKHR* pAccelerationStructures, + VkQueryType queryType, size_t dataSize, void* pData, + size_t stride, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordWriteAccelerationStructuresPropertiesKHR(VkDevice device, uint32_t accelerationStructureCount, + const VkAccelerationStructureKHR* pAccelerationStructures, + VkQueryType queryType, size_t dataSize, void* pData, + size_t stride, const RecordObject& record_obj) {} +virtual void PostCallRecordWriteAccelerationStructuresPropertiesKHR(VkDevice device, uint32_t accelerationStructureCount, + const VkAccelerationStructureKHR* pAccelerationStructures, + VkQueryType queryType, size_t dataSize, void* pData, + size_t stride, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCopyAccelerationStructureKHR(VkCommandBuffer commandBuffer, + const VkCopyAccelerationStructureInfoKHR* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCopyAccelerationStructureKHR(VkCommandBuffer commandBuffer, + const VkCopyAccelerationStructureInfoKHR* pInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCopyAccelerationStructureKHR(VkCommandBuffer commandBuffer, + const VkCopyAccelerationStructureInfoKHR* pInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCopyAccelerationStructureToMemoryKHR(VkCommandBuffer commandBuffer, + const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCopyAccelerationStructureToMemoryKHR(VkCommandBuffer commandBuffer, + const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCopyAccelerationStructureToMemoryKHR(VkCommandBuffer commandBuffer, + const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdCopyMemoryToAccelerationStructureKHR(VkCommandBuffer commandBuffer, + const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdCopyMemoryToAccelerationStructureKHR(VkCommandBuffer commandBuffer, + const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdCopyMemoryToAccelerationStructureKHR(VkCommandBuffer commandBuffer, + const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetAccelerationStructureDeviceAddressKHR(VkDevice device, + const VkAccelerationStructureDeviceAddressInfoKHR* pInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetAccelerationStructureDeviceAddressKHR(VkDevice device, + const VkAccelerationStructureDeviceAddressInfoKHR* pInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetAccelerationStructureDeviceAddressKHR(VkDevice device, + const VkAccelerationStructureDeviceAddressInfoKHR* pInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdWriteAccelerationStructuresPropertiesKHR(VkCommandBuffer commandBuffer, + uint32_t accelerationStructureCount, + const VkAccelerationStructureKHR* pAccelerationStructures, + VkQueryType queryType, VkQueryPool queryPool, + uint32_t firstQuery, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdWriteAccelerationStructuresPropertiesKHR(VkCommandBuffer commandBuffer, + uint32_t accelerationStructureCount, + const VkAccelerationStructureKHR* pAccelerationStructures, + VkQueryType queryType, VkQueryPool queryPool, + uint32_t firstQuery, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdWriteAccelerationStructuresPropertiesKHR(VkCommandBuffer commandBuffer, + uint32_t accelerationStructureCount, + const VkAccelerationStructureKHR* pAccelerationStructures, + VkQueryType queryType, VkQueryPool queryPool, + uint32_t firstQuery, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetDeviceAccelerationStructureCompatibilityKHR( + VkDevice device, const VkAccelerationStructureVersionInfoKHR* pVersionInfo, + VkAccelerationStructureCompatibilityKHR* pCompatibility, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetDeviceAccelerationStructureCompatibilityKHR(VkDevice device, + const VkAccelerationStructureVersionInfoKHR* pVersionInfo, + VkAccelerationStructureCompatibilityKHR* pCompatibility, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetDeviceAccelerationStructureCompatibilityKHR(VkDevice device, + const VkAccelerationStructureVersionInfoKHR* pVersionInfo, + VkAccelerationStructureCompatibilityKHR* pCompatibility, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetAccelerationStructureBuildSizesKHR(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, + const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo, + const uint32_t* pMaxPrimitiveCounts, + VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetAccelerationStructureBuildSizesKHR(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, + const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo, + const uint32_t* pMaxPrimitiveCounts, + VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetAccelerationStructureBuildSizesKHR(VkDevice device, VkAccelerationStructureBuildTypeKHR buildType, + const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo, + const uint32_t* pMaxPrimitiveCounts, + VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdTraceRaysKHR(VkCommandBuffer commandBuffer, + const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, uint32_t width, + uint32_t height, uint32_t depth, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdTraceRaysKHR(VkCommandBuffer commandBuffer, + const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, uint32_t width, + uint32_t height, uint32_t depth, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdTraceRaysKHR(VkCommandBuffer commandBuffer, + const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, uint32_t width, + uint32_t height, uint32_t depth, const RecordObject& record_obj) {} +virtual bool PreCallValidateCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const RecordObject& record_obj) {} +virtual void PostCallRecordCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, + VkPipelineCache pipelineCache, uint32_t createInfoCount, + const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, + const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, + const RecordObject& record_obj) {} +virtual bool PreCallValidateGetRayTracingCaptureReplayShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, + uint32_t firstGroup, uint32_t groupCount, + size_t dataSize, void* pData, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetRayTracingCaptureReplayShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, + uint32_t groupCount, size_t dataSize, void* pData, + const RecordObject& record_obj) {} +virtual void PostCallRecordGetRayTracingCaptureReplayShaderGroupHandlesKHR(VkDevice device, VkPipeline pipeline, + uint32_t firstGroup, uint32_t groupCount, + size_t dataSize, void* pData, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer, + const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, + VkDeviceAddress indirectDeviceAddress, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer, + const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, + VkDeviceAddress indirectDeviceAddress, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer, + const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable, + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable, + VkDeviceAddress indirectDeviceAddress, const RecordObject& record_obj) {} +virtual bool PreCallValidateGetRayTracingShaderGroupStackSizeKHR(VkDevice device, VkPipeline pipeline, uint32_t group, + VkShaderGroupShaderKHR groupShader, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordGetRayTracingShaderGroupStackSizeKHR(VkDevice device, VkPipeline pipeline, uint32_t group, + VkShaderGroupShaderKHR groupShader, const RecordObject& record_obj) { +} +virtual void PostCallRecordGetRayTracingShaderGroupStackSizeKHR(VkDevice device, VkPipeline pipeline, uint32_t group, + VkShaderGroupShaderKHR groupShader, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdSetRayTracingPipelineStackSizeKHR(VkCommandBuffer commandBuffer, uint32_t pipelineStackSize, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdSetRayTracingPipelineStackSizeKHR(VkCommandBuffer commandBuffer, uint32_t pipelineStackSize, + const RecordObject& record_obj) {} +virtual void PostCallRecordCmdSetRayTracingPipelineStackSizeKHR(VkCommandBuffer commandBuffer, uint32_t pipelineStackSize, + const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDrawMeshTasksEXT(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, + uint32_t groupCountZ, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDrawMeshTasksEXT(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, + uint32_t groupCountZ, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDrawMeshTasksEXT(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, + uint32_t groupCountZ, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDrawMeshTasksIndirectEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + uint32_t drawCount, uint32_t stride, const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDrawMeshTasksIndirectEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + uint32_t drawCount, uint32_t stride, const RecordObject& record_obj) {} +virtual void PostCallRecordCmdDrawMeshTasksIndirectEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + uint32_t drawCount, uint32_t stride, const RecordObject& record_obj) {} +virtual bool PreCallValidateCmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, uint32_t stride, + const ErrorObject& error_obj) const { + return false; +} +virtual void PreCallRecordCmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, uint32_t stride, const RecordObject& record_obj) { +} +virtual void PostCallRecordCmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, + VkBuffer countBuffer, VkDeviceSize countBufferOffset, + uint32_t maxDrawCount, uint32_t stride, + const RecordObject& record_obj) {} + +// NOLINTEND diff --git a/scripts/generate_source.py b/scripts/generate_source.py index 622687aef82..9bba137296e 100755 --- a/scripts/generate_source.py +++ b/scripts/generate_source.py @@ -66,7 +66,8 @@ def RunGenerators(api: str, registry: str, grammar: str, directory: str, styleFi from generators.api_version_generator import ApiVersionOutputGenerator from generators.layer_dispatch_table_generator import LayerDispatchTableOutputGenerator from generators.layer_chassis_generator import LayerChassisOutputGenerator - from generators.layer_chassis_dispatch_generator import LayerChassisDispatchOutputGenerator + from generators.dispatch_object_generator import DispatchObjectGenerator + from generators.dispatch_vector_generator import DispatchVectorGenerator from generators.function_pointers_generator import FunctionPointersOutputGenerator from generators.best_practices_generator import BestPracticesOutputGenerator from generators.spirv_validation_generator import SpirvValidationHelperOutputGenerator @@ -201,24 +202,36 @@ def RunGenerators(api: str, registry: str, grammar: str, directory: str, styleFi 'generator' : ApiVersionOutputGenerator, 'genCombined': True, }, - 'chassis.h' : { + 'validation_object_methods.h' : { 'generator' : LayerChassisOutputGenerator, 'genCombined': True, }, - 'chassis.cpp' : { + 'validation_object.cpp' : { 'generator' : LayerChassisOutputGenerator, 'genCombined': True, }, - 'chassis_dispatch_helper.h' : { + 'chassis.cpp' : { 'generator' : LayerChassisOutputGenerator, 'genCombined': True, }, - 'layer_chassis_dispatch.h' : { - 'generator' : LayerChassisDispatchOutputGenerator, + 'dispatch_object_methods.h' : { + 'generator' : DispatchObjectGenerator, + 'genCombined': True, + }, + 'dispatch_functions.h' : { + 'generator' : DispatchObjectGenerator, + 'genCombined': True, + }, + 'dispatch_object.cpp' : { + 'generator' : DispatchObjectGenerator, + 'genCombined': True, + }, + 'dispatch_vector.h' : { + 'generator' : DispatchVectorGenerator, 'genCombined': True, }, - 'layer_chassis_dispatch.cpp' : { - 'generator' : LayerChassisDispatchOutputGenerator, + 'dispatch_vector.cpp' : { + 'generator' : DispatchVectorGenerator, 'genCombined': True, }, 'best_practices.h' : { diff --git a/scripts/generators/best_practices_generator.py b/scripts/generators/best_practices_generator.py index 6e892fcd59c..37c73a7afa7 100644 --- a/scripts/generators/best_practices_generator.py +++ b/scripts/generators/best_practices_generator.py @@ -140,7 +140,6 @@ def generateSource(self): guard_helper = PlatformGuardHelper() out = [] out.append(''' - #include "chassis.h" #include "best_practices/best_practices_validation.h" DeprecationData GetDeprecatedData(vvl::Extension extension_name) { diff --git a/scripts/generators/layer_chassis_dispatch_generator.py b/scripts/generators/dispatch_object_generator.py similarity index 78% rename from scripts/generators/layer_chassis_dispatch_generator.py rename to scripts/generators/dispatch_object_generator.py index 300114c2576..e39c47894d1 100644 --- a/scripts/generators/layer_chassis_dispatch_generator.py +++ b/scripts/generators/dispatch_object_generator.py @@ -23,12 +23,65 @@ from generators.base_generator import BaseGenerator from generators.generator_utils import PlatformGuardHelper -class LayerChassisDispatchOutputGenerator(BaseGenerator): +# This class is a container for any source code, data, or other behavior that is necessary to +# customize the generator script for a specific target API variant (e.g. Vulkan SC). As such, +# all of these API-specific interfaces and their use in the generator script are part of the +# contract between this repository and its downstream users. Changing or removing any of these +# interfaces or their use in the generator script will have downstream effects and thus +# should be avoided unless absolutely necessary. +class APISpecific: + # Returns the list of validation layers for the target API + @staticmethod + def getValidationLayerList(targetApiName: str) -> list[dict[str, str]]: + match targetApiName: + + # Vulkan specific validation layer list + case 'vulkan': + return [ + { + 'include': 'thread_tracker/thread_safety_validation.h', + 'class': 'ThreadSafety', + 'enabled': '!disabled[thread_safety]' + }, + { + 'include': 'stateless/stateless_validation.h', + 'class': 'StatelessValidation', + 'enabled': '!disabled[stateless_checks]' + }, + { + 'include': 'object_tracker/object_lifetime_validation.h', + 'class': 'ObjectLifetimes', + 'enabled': '!disabled[object_tracking]' + }, + { + 'include': 'core_checks/core_validation.h', + 'class': 'CoreChecks', + 'enabled': '!disabled[core_checks]' + }, + { + 'include': 'best_practices/best_practices_validation.h', + 'class': 'BestPractices', + 'enabled': 'enabled[best_practices]' + }, + { + 'include': 'gpu/core/gpuav.h', + 'class': 'gpuav::Validator', + 'enabled': 'enabled[gpu_validation] || enabled[debug_printf_validation]' + }, + { + 'include': 'sync/sync_validation.h', + 'class': 'SyncValidator', + 'enabled': 'enabled[sync_validation]' + } + ] + + +class DispatchObjectGenerator(BaseGenerator): def __init__(self): BaseGenerator.__init__(self) # Commands which are not autogenerated but still intercepted - self.no_autogen_list = [ + self.no_autogen_list = ( 'vkCreateInstance', 'vkDestroyInstance', 'vkCreateDevice', @@ -104,7 +157,7 @@ def __init__(self): # need to handle binaries in VkPipelineBinaryHandlesInfoKHR as output, not input. 'vkCreatePipelineBinariesKHR', 'vkGetPipelineKeyKHR', - ] + ) # List of all extension structs strings containing handles self.ndo_extension_structs = [ @@ -116,9 +169,7 @@ def __init__(self): ] # Dispatch functions that need special state tracking variables passed in - self.custom_definition = { - 'vkBeginCommandBuffer' : ', bool is_secondary' - } + self.custom_definition = {} def isNonDispatchable(self, name: str) -> bool: return name in self.vk.handles and not self.vk.handles[name].dispatchable @@ -159,38 +210,64 @@ def generate(self): ****************************************************************************/\n''') self.write('// NOLINTBEGIN') # Wrap for clang-tidy to ignore - if self.filename == 'layer_chassis_dispatch.h': - self.generateHeader() - elif self.filename == 'layer_chassis_dispatch.cpp': + if self.filename == 'dispatch_object_methods.h': + self.generateMethods() + elif self.filename == 'dispatch_functions.h': + self.generateFunctions() + elif self.filename == 'dispatch_object.cpp': self.generateSource() else: self.write(f'\nFile name {self.filename} has no code to generate\n') self.write('// NOLINTEND') # Wrap for clang-tidy to ignore - def generateHeader(self): + def generateMethods(self): out = [] out.append(''' - #pragma once - #include - - extern bool wrap_handles; - - class DispatchObject; - void UnwrapPnextChainHandles(DispatchObject *layer_data, const void *pNext); - + // This file contains methods for class DispatchObject and it is designed to ONLY be + // included into dispatch_object.h. ''') + guard_helper = PlatformGuardHelper() for command in self.vk.commands.values(): prototype = command.cPrototype - prototype = prototype.replace("VKAPI_ATTR ", "") - prototype = prototype.replace("VKAPI_CALL vk", "Dispatch") + prototype = prototype.replace('VKAPI_ATTR ', '') + prototype = prototype.replace('VKAPI_CALL vk', '') if command.name in self.custom_definition: prototype = prototype.replace(');', f'{self.custom_definition[command.name]});') out.extend(guard_helper.add_guard(command.protect)) out.append(f'{prototype}\n') out.extend(guard_helper.add_guard(None)) + self.write("".join(out)) + + def generateFunctions(self): + out = [] + out.append(''' + // This file contains contains convience functions for non-chassis code that needs to + // make vulkan calls. + + #include "chassis/dispatch_object.h" + ''') + guard_helper = PlatformGuardHelper() + for command in self.vk.commands.values(): + prototype = command.cPrototype + prototype = prototype.replace('VKAPI_ATTR ', 'static inline ') + prototype = prototype.replace('VKAPI_CALL vk', 'Dispatch') + proto_extra = '' + call_extra = '' + if command.name in self.custom_definition: + proto_extra = self.custom_definition[command.name] + call_extra = ', ' + proto_extra.split(' ')[-1] + prototype = prototype.replace(');', f'{proto_extra}) {{') + out.extend(guard_helper.add_guard(command.protect)) + out.append(f'\n{prototype}\n') + out.append(f'auto dispatch = GetLayerDataPtr(GetDispatchKey({command.params[0].name}), layer_data_map);\n') + returnResult = f'return ' if (command.returnType != 'void') else '' + paramsList = ', '.join([param.name for param in command.params]) + out.append(f'{returnResult}{command.name.replace("vk", "dispatch->")}({paramsList}{call_extra});\n') + out.append('}\n') + out.extend(guard_helper.add_guard(None)) self.write("".join(out)) def generateSource(self): @@ -203,17 +280,56 @@ def generateSource(self): out = [] out.append(''' + #include "chassis/dispatch_object.h" #include "utils/cast_utils.h" - #include "chassis.h" - #include "layer_chassis_dispatch.h" #include #include "state_tracker/pipeline_state.h" #include "containers/custom_containers.h" + ''') + for layer in APISpecific.getValidationLayerList(self.targetApiName): + include_file = layer['include'] + out.append(f'#include "{include_file}"\n') + out.append('\n') + out.append(''' #define DISPATCH_MAX_STACK_ALLOCATIONS 32 + std::atomic DispatchObject::global_unique_id{1}; + vvl::concurrent_unordered_map DispatchObject::unique_id_mapping; + bool DispatchObject::wrap_handles{true}; + + void DispatchObject::InitInstanceValidationObjects() { + // Note that this DEFINES THE ORDER IN WHICH THE LAYER VALIDATION OBJECTS ARE CALLED + ''') + for layer in APISpecific.getValidationLayerList(self.targetApiName): + constructor = layer['class'] + if layer['class'] == 'ThreadSafety': + constructor += '(nullptr)' + out.append(f''' + if ({layer["enabled"]}) {{ + object_dispatch.emplace_back(new {constructor}); + }}''') + + out.append('\n') + out.append('}\n') + out.append(''' + void DispatchObject::InitDeviceValidationObjects(DispatchObject* instance_dispatch) { + // Note that this DEFINES THE ORDER IN WHICH THE LAYER VALIDATION OBJECTS ARE CALLED + ''') + for layer in APISpecific.getValidationLayerList(self.targetApiName): + constructor = layer['class'] + if layer['class'] == 'ThreadSafety': + constructor += '(static_cast(instance_dispatch->GetValidationObject(LayerObjectTypeThreading)))' + out.append(f''' + if ({layer["enabled"]}) {{ + object_dispatch.emplace_back(new {constructor}); + }}''') + out.append('\n') + out.append('}\n') + + out.append(''' // Unique Objects pNext extension handling function - void UnwrapPnextChainHandles(DispatchObject *layer_data, const void *pNext) { + void DispatchObject::UnwrapPnextChainHandles(const void *pNext) { void *cur_pnext = const_cast(pNext); while (cur_pnext != nullptr) { VkBaseOutStructure *header = reinterpret_cast(cur_pnext); @@ -289,7 +405,7 @@ def generateSource(self): if ndo_array: create_ndo_code += f'for (uint32_t index0 = 0; index0 < {lastParam.length}; index0++) {{\n' ndo_dest = f'{lastParam.name}[index0]' - create_ndo_code += f'{ndo_dest} = layer_data->{wrap_call}({ndo_dest});\n' + create_ndo_code += f'{ndo_dest} = {wrap_call}({ndo_dest});\n' if ndo_array: create_ndo_code += '}\n' create_ndo_code += '}\n' @@ -321,8 +437,8 @@ def generateSource(self): down_chain_call_only = True prototype = command.cPrototype[:-1] - prototype = prototype.replace("VKAPI_ATTR ", "") - prototype = prototype.replace("VKAPI_CALL vk", "Dispatch") + prototype = prototype.replace('VKAPI_ATTR ', '') + prototype = prototype.replace('VKAPI_CALL vk', 'DispatchObject::') out.append(f'\n{prototype} {{\n')\ # Pull out the text for each of the parameters, separate them by commas in a list @@ -345,11 +461,9 @@ def generateSource(self): # First, add check and down-chain call. Use correct dispatch table dispatch_table = 'instance_dispatch_table' if command.instance else 'device_dispatch_table' - # first parameter is always dispatchable - out.append(f'auto layer_data = GetLayerDataPtr(GetDispatchKey({command.params[0].name}), layer_data_map);\n') # Put all this together for the final down-chain call if not down_chain_call_only: - out.append(f'if (!wrap_handles) return layer_data->{dispatch_table}.{command.name[2:]}({paramstext});\n') + out.append(f'if (!wrap_handles) return {dispatch_table}.{command.name[2:]}({paramstext});\n') # Handle return values, if any assignResult = f'{command.returnType} result = ' if command.returnType != 'void' else '' @@ -361,7 +475,7 @@ def generateSource(self): out.append("\n".join(str(api_pre).rstrip().split("\n"))) out.append('\n') # Generate the wrapped dispatch call - out.append(f'{assignResult}layer_data->{dispatch_table}.{command.name[2:]}({wrapped_paramstext});\n') + out.append(f'{assignResult}{dispatch_table}.{command.name[2:]}({wrapped_paramstext});\n') out.append("\n".join(str(api_post).rstrip().split("\n"))) out.append('\n') @@ -390,7 +504,7 @@ def cleanUpLocalDeclarations(self, prefix, name, len, deferred_name): const bool is_operation_deferred = ({deferred_name} != VK_NULL_HANDLE) && (result == VK_OPERATION_DEFERRED_KHR); if (is_operation_deferred) {{ std::vector> cleanup{{[{delete_var}](){{ {delete_code}; }}}}; - layer_data->deferred_operation_post_completion.insert({deferred_name}, cleanup); + deferred_operation_post_completion.insert({deferred_name}, cleanup); }} else {{ {delete_code}; }}''' @@ -426,24 +540,24 @@ def uniquifyMembers(self, members: list[Member], prefix: str, arrayIndex: int, i var_local_{prefix}{member.name}.resize({count_name}); local_{prefix}{member.name} = var_local_{prefix}{member.name}.data(); for (uint32_t {index} = 0; {index} < {count_name}; ++{index}) {{ - local_{prefix}{member.name}[{index}] = layer_data->Unwrap({member.name}[{index}]);''' + local_{prefix}{member.name}[{index}] = Unwrap({member.name}[{index}]);''' else: pre_code += f''' for (uint32_t {index} = 0; {index} < {count_name}; ++{index}) {{ - {prefix}{member.name}[{index}] = layer_data->Unwrap({prefix}{member.name}[{index}]);''' + {prefix}{member.name}[{index}] = Unwrap({prefix}{member.name}[{index}]);''' pre_code += '}\n' pre_code += '}\n' else: if topLevel: if not isDestroy: - pre_code += f'{member.name} = layer_data->Unwrap({member.name});\n' + pre_code += f'{member.name} = Unwrap({member.name});\n' else: # Make temp copy of this var with the 'local' removed. It may be better to not pass in 'local_' # as part of the string and explicitly print it fix = str(prefix).strip('local_') pre_code += f''' if ({fix}{member.name}) {{ - {prefix}{member.name} = layer_data->Unwrap({fix}{member.name}); + {prefix}{member.name} = Unwrap({fix}{member.name}); }}''' # Handle Structs that contain NDOs at some level elif member.type in self.vk.structs: @@ -484,7 +598,7 @@ def uniquifyMembers(self, members: list[Member], prefix: str, arrayIndex: int, i else: pre_code += f'{new_prefix}[{index}] = {member.name}[{index}];\n' if process_pnext: - pre_code += f'UnwrapPnextChainHandles(layer_data, {new_prefix}[{index}].pNext);\n' + pre_code += f'UnwrapPnextChainHandles({new_prefix}[{index}].pNext);\n' local_prefix = f'{new_prefix}[{index}].' # Process sub-structs in this struct (tmp_decl, tmp_pre, tmp_post) = self.uniquifyMembers(struct.members, local_prefix, arrayIndex, isCreate, isDestroy, False) @@ -528,7 +642,7 @@ def uniquifyMembers(self, members: list[Member], prefix: str, arrayIndex: int, i pre_code += tmp_pre post_code += tmp_post if process_pnext: - pre_code += f'UnwrapPnextChainHandles(layer_data, {new_prefix}pNext);\n' + pre_code += f'UnwrapPnextChainHandles({new_prefix}pNext);\n' pre_code += '}\n' if topLevel: post_code += self.cleanUpLocalDeclarations(prefix, member.name, member.length, deferred_name) @@ -544,11 +658,11 @@ def uniquifyMembers(self, members: list[Member], prefix: str, arrayIndex: int, i pre_code += tmp_pre post_code += tmp_post if process_pnext: - pre_code += f'UnwrapPnextChainHandles(layer_data, {prefix}{member.name}.pNext);\n' + pre_code += f'UnwrapPnextChainHandles({prefix}{member.name}.pNext);\n' elif member.type == 'VkObjectType' and member.name == 'objectType' and any(m.name == 'objectHandle' for m in members): pre_code += ''' if (NotDispatchableHandle(objectType)) { - objectHandle = layer_data->Unwrap(objectHandle); + objectHandle = Unwrap(objectHandle); } ''' return decls, pre_code, post_code diff --git a/scripts/generators/dispatch_vector_generator.py b/scripts/generators/dispatch_vector_generator.py new file mode 100644 index 00000000000..4390b4933ae --- /dev/null +++ b/scripts/generators/dispatch_vector_generator.py @@ -0,0 +1,231 @@ +#!/usr/bin/python3 -i +# +# Copyright (c) 2015-2024 Valve Corporation +# Copyright (c) 2015-2024 LunarG, Inc. +# Copyright (c) 2015-2024 Google Inc. +# Copyright (c) 2023-2024 RasterGrid Kft. +# +# 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 script generates the dispatch portion of a factory layer which intercepts +# all Vulkan functions. The resultant factory layer allows rapid development of +# layers and interceptors. + +import os +from generators.vulkan_object import Command +from generators.base_generator import BaseGenerator +from generators.generator_utils import PlatformGuardHelper + +# This class is a container for any source code, data, or other behavior that is necessary to +# customize the generator script for a specific target API variant (e.g. Vulkan SC). As such, +# all of these API-specific interfaces and their use in the generator script are part of the +# contract between this repository and its downstream users. Changing or removing any of these +# interfaces or their use in the generator script will have downstream effects and thus +# should be avoided unless absolutely necessary. +class APISpecific: + # Generates source code for InitObjectDispatchVector + @staticmethod + def genInitObjectDispatchVectorSource(targetApiName: str) -> str: + match targetApiName: + + # Vulkan specific InitObjectDispatchVector + case 'vulkan': + return ''' +// Include layer validation object definitions +#include "generated/dispatch_vector.h" +#include "chassis/dispatch_object.h" +#include "thread_tracker/thread_safety_validation.h" +#include "stateless/stateless_validation.h" +#include "object_tracker/object_lifetime_validation.h" +#include "core_checks/core_validation.h" +#include "best_practices/best_practices_validation.h" +#include "gpu/core/gpuav.h" +#include "sync/sync_validation.h" + +void DispatchObject::InitObjectDispatchVectors() { + +#define BUILD_DISPATCH_VECTOR(name) \\ + init_object_dispatch_vector(InterceptId ## name, \\ + typeid(&ValidationObject::name), \\ + typeid(&ThreadSafety::name), \\ + typeid(&StatelessValidation::name), \\ + typeid(&ObjectLifetimes::name), \\ + typeid(&CoreChecks::name), \\ + typeid(&BestPractices::name), \\ + typeid(&gpuav::Validator::name), \\ + typeid(&SyncValidator::name)); + + auto init_object_dispatch_vector = [this](InterceptId id, + const std::type_info& vo_typeid, + const std::type_info& tt_typeid, + const std::type_info& tpv_typeid, + const std::type_info& tot_typeid, + const std::type_info& tcv_typeid, + const std::type_info& tbp_typeid, + const std::type_info& tga_typeid, + const std::type_info& tsv_typeid) { + for (auto item : this->object_dispatch) { + auto intercept_vector = &this->intercept_vectors[id]; + switch (item->container_type) { + case LayerObjectTypeThreading: + if (tt_typeid != vo_typeid) intercept_vector->push_back(item); + break; + case LayerObjectTypeParameterValidation: + if (tpv_typeid != vo_typeid) intercept_vector->push_back(item); + break; + case LayerObjectTypeObjectTracker: + if (tot_typeid != vo_typeid) intercept_vector->push_back(item); + break; + case LayerObjectTypeCoreValidation: + if (tcv_typeid != vo_typeid) intercept_vector->push_back(item); + break; + case LayerObjectTypeBestPractices: + if (tbp_typeid != vo_typeid) intercept_vector->push_back(item); + break; + case LayerObjectTypeGpuAssisted: + if (tga_typeid != vo_typeid) intercept_vector->push_back(item); + break; + case LayerObjectTypeSyncValidation: + if (tsv_typeid != vo_typeid) intercept_vector->push_back(item); + break; + default: + /* Chassis codegen needs to be updated for unknown validation object type */ + assert(0); + } + } + }; + + intercept_vectors.resize(InterceptIdCount); +''' + +class DispatchVectorGenerator(BaseGenerator): + # will skip all 3 functions + skip_intercept_id_functions = ( + 'vkGetDeviceProcAddr', + 'vkDestroyDevice', + 'vkCreateValidationCacheEXT', + 'vkDestroyValidationCacheEXT', + 'vkMergeValidationCachesEXT', + 'vkGetValidationCacheDataEXT', + # have all 3 calls have dual signatures being used + 'vkCreateShaderModule', + 'vkCreateShadersEXT', + 'vkCreateGraphicsPipelines', + 'vkCreateComputePipelines', + 'vkCreateRayTracingPipelinesNV', + 'vkCreateRayTracingPipelinesKHR', + ) + + # We need to skip any signatures that pass around chassis_modification_state structs + # and therefore can't easily create the intercept id + skip_intercept_id_pre_validate = ( + 'vkAllocateDescriptorSets' + ) + skip_intercept_id_pre_record = ( + 'vkCreatePipelineLayout', + 'vkCreateBuffer', + ) + skip_intercept_id_post_record = ( + 'vkAllocateDescriptorSets' + ) + + def __init__(self): + BaseGenerator.__init__(self) + + def generate(self): + self.write(f'''// *** THIS FILE IS GENERATED - DO NOT EDIT *** + // See {os.path.basename(__file__)} for modifications + + /*************************************************************************** + * + * Copyright (c) 2015-2024 The Khronos Group Inc. + * Copyright (c) 2015-2024 Valve Corporation + * Copyright (c) 2015-2024 LunarG, Inc. + * Copyright (c) 2015-2024 Google Inc. + * Copyright (c) 2023-2024 RasterGrid Kft. + * + * 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. + ****************************************************************************/\n''') + self.write('// NOLINTBEGIN') # Wrap for clang-tidy to ignore + + if self.filename == 'dispatch_vector.h': + self.generateHeader() + elif self.filename == 'dispatch_vector.cpp': + self.generateSource() + else: + self.write(f'\nFile name {self.filename} has no code to generate\n') + + self.write('// NOLINTEND') # Wrap for clang-tidy to ignore + + def generateHeader(self): + out = [] + out.append(''' + #pragma once + + // This source code creates dispatch vectors for each chassis api intercept, + // i.e., PreCallValidateFoo, PreCallRecordFoo, PostCallRecordFoo, etc., ensuring that + // each vector contains only the validation objects that override that particular base + // class virtual function. Preventing non-overridden calls from reaching the default + // functions saved about 5% in multithreaded applications. + + ''') + + out.append('typedef enum InterceptId{\n') + for command in [x for x in self.vk.commands.values() if not x.instance and x.name not in self.skip_intercept_id_functions]: + if command.name not in self.skip_intercept_id_pre_validate: + out.append(f' InterceptIdPreCallValidate{command.name[2:]},\n') + if command.name not in self.skip_intercept_id_pre_record: + out.append(f' InterceptIdPreCallRecord{command.name[2:]},\n') + if command.name not in self.skip_intercept_id_post_record: + out.append(f' InterceptIdPostCallRecord{command.name[2:]},\n') + out.append(' InterceptIdCount,\n') + out.append('} InterceptId;\n') + self.write("".join(out)) + + def generateSource(self): + out = [] + out.append(''' + // This source code creates dispatch vectors for each chassis api intercept, + // i.e., PreCallValidateFoo, PreCallRecordFoo, PostCallRecordFoo, etc., ensuring that + // each vector contains only the validation objects that override that particular base + // class virtual function. Preventing non-overridden calls from reaching the default + // functions saved about 5% in multithreaded applications. + + #include "generated/dispatch_vector.h" + #include "chassis/dispatch_object.h" + ''') + + out.append(APISpecific.genInitObjectDispatchVectorSource(self.targetApiName)) + + guard_helper = PlatformGuardHelper() + for command in [x for x in self.vk.commands.values() if not x.instance and x.name not in self.skip_intercept_id_functions]: + out.extend(guard_helper.add_guard(command.protect)) + if command.name not in self.skip_intercept_id_pre_validate: + out.append(f' BUILD_DISPATCH_VECTOR(PreCallValidate{command.name[2:]});\n') + if command.name not in self.skip_intercept_id_pre_record: + out.append(f' BUILD_DISPATCH_VECTOR(PreCallRecord{command.name[2:]});\n') + if command.name not in self.skip_intercept_id_post_record: + out.append(f' BUILD_DISPATCH_VECTOR(PostCallRecord{command.name[2:]});\n') + out.extend(guard_helper.add_guard(None)) + out.append('}\n') + self.write("".join(out)) diff --git a/scripts/generators/layer_chassis_generator.py b/scripts/generators/layer_chassis_generator.py index 94003f5f8ea..4066e9f8a3d 100644 --- a/scripts/generators/layer_chassis_generator.py +++ b/scripts/generators/layer_chassis_generator.py @@ -33,51 +33,6 @@ # interfaces or their use in the generator script will have downstream effects and thus # should be avoided unless absolutely necessary. class APISpecific: - # Returns the list of validation layers for the target API - @staticmethod - def getValidationLayerList(targetApiName: str) -> list[dict[str, str]]: - match targetApiName: - - # Vulkan specific validation layer list - case 'vulkan': - return [ - { - 'include': 'thread_tracker/thread_safety_validation.h', - 'class': 'ThreadSafety', - 'enabled': '!disables[thread_safety]' - }, - { - 'include': 'stateless/stateless_validation.h', - 'class': 'StatelessValidation', - 'enabled': '!disables[stateless_checks]' - }, - { - 'include': 'object_tracker/object_lifetime_validation.h', - 'class': 'ObjectLifetimes', - 'enabled': '!disables[object_tracking]' - }, - { - 'include': 'core_checks/core_validation.h', - 'class': 'CoreChecks', - 'enabled': '!disables[core_checks]' - }, - { - 'include': 'best_practices/best_practices_validation.h', - 'class': 'BestPractices', - 'enabled': 'enables[best_practices]' - }, - { - 'include': 'gpu/core/gpuav.h', - 'class': 'gpuav::Validator', - 'enabled': 'enables[gpu_validation] || enables[debug_printf_validation]' - }, - { - 'include': 'sync/sync_validation.h', - 'class': 'SyncValidator', - 'enabled': 'enables[sync_validation]' - } - ] - # Returns the list of instance extensions exposed by the validation layers @staticmethod @@ -108,80 +63,12 @@ def getDeviceExtensionList(targetApiName: str) -> list[str]: ] - # Generates source code for InitObjectDispatchVector - @staticmethod - def genInitObjectDispatchVectorSource(targetApiName: str) -> str: - match targetApiName: - - # Vulkan specific InitObjectDispatchVector - case 'vulkan': - return ''' -// clang-format off -void DispatchObject::InitObjectDispatchVectors() { - -#define BUILD_DISPATCH_VECTOR(name) \\ - init_object_dispatch_vector(InterceptId ## name, \\ - typeid(&ValidationObject::name), \\ - typeid(&ThreadSafety::name), \\ - typeid(&StatelessValidation::name), \\ - typeid(&ObjectLifetimes::name), \\ - typeid(&CoreChecks::name), \\ - typeid(&BestPractices::name), \\ - typeid(&gpuav::Validator::name), \\ - typeid(&SyncValidator::name)); - - auto init_object_dispatch_vector = [this](InterceptId id, - const std::type_info& vo_typeid, - const std::type_info& tt_typeid, - const std::type_info& tpv_typeid, - const std::type_info& tot_typeid, - const std::type_info& tcv_typeid, - const std::type_info& tbp_typeid, - const std::type_info& tga_typeid, - const std::type_info& tsv_typeid) { - for (auto item : this->object_dispatch) { - auto intercept_vector = &this->intercept_vectors[id]; - switch (item->container_type) { - case LayerObjectTypeThreading: - if (tt_typeid != vo_typeid) intercept_vector->push_back(item); - break; - case LayerObjectTypeParameterValidation: - if (tpv_typeid != vo_typeid) intercept_vector->push_back(item); - break; - case LayerObjectTypeObjectTracker: - if (tot_typeid != vo_typeid) intercept_vector->push_back(item); - break; - case LayerObjectTypeCoreValidation: - if (tcv_typeid != vo_typeid) intercept_vector->push_back(item); - break; - case LayerObjectTypeBestPractices: - if (tbp_typeid != vo_typeid) intercept_vector->push_back(item); - break; - case LayerObjectTypeGpuAssisted: - if (tga_typeid != vo_typeid) intercept_vector->push_back(item); - break; - case LayerObjectTypeSyncValidation: - if (tsv_typeid != vo_typeid) intercept_vector->push_back(item); - break; - default: - /* Chassis codegen needs to be updated for unknown validation object type */ - assert(0); - } - } - }; - // clang-format on - - intercept_vectors.resize(InterceptIdCount); -''' - -# Generates a LayerFactory layer that intercepts all API entrypoints -# This is intended to be used as a starting point for creating custom layers class LayerChassisOutputGenerator(BaseGenerator): - ignore_functions = [ + ignore_functions = ( 'vkEnumerateInstanceVersion', - ] + ) - manual_functions = [ + manual_functions = ( # Include functions here to be interecpted w/ manually implemented function bodies 'vkGetDeviceProcAddr', 'vkGetInstanceProcAddr', @@ -214,14 +101,14 @@ class LayerChassisOutputGenerator(BaseGenerator): 'vkGetValidationCacheDataEXT', 'vkGetPhysicalDeviceToolProperties', 'vkGetPhysicalDeviceToolPropertiesEXT', - ] + ) - extended_query_exts = [ + extended_query_exts = ( 'VK_KHR_get_physical_device_properties2', 'VK_KHR_external_semaphore_capabilities', 'VK_KHR_external_fence_capabilities', 'VK_KHR_external_memory_capabilities', - ] + ) def __init__(self): BaseGenerator.__init__(self) @@ -267,448 +154,33 @@ def generate(self): ****************************************************************************/\n''') self.write('// NOLINTBEGIN') # Wrap for clang-tidy to ignore - if self.filename == 'chassis.h': - self.generateHeader() + if self.filename == 'validation_object_methods.h': + self.generateMethods() + elif self.filename == 'validation_object.cpp': + self.generateVOSource() elif self.filename == 'chassis.cpp': self.generateSource() - elif self.filename == 'chassis_dispatch_helper.h': - self.generateHelper() else: self.write(f'\nFile name {self.filename} has no code to generate\n') self.write('// NOLINTEND') # Wrap for clang-tidy to ignore - def generateHeader(self): + def generateMethods(self): out = [] out.append(''' - #pragma once - - #include - #include - #include - #include - #include - #include - #include - #include - #include - - #include - #include - #include - #include - #include - #include "utils/cast_utils.h" - #include "layer_options.h" - #include "containers/custom_containers.h" - #include "error_message/logging.h" - #include "error_message/error_location.h" - #include "error_message/record_object.h" - #include "error_message/log_message_type.h" - #include "utils/vk_layer_extension_utils.h" - #include "utils/vk_layer_utils.h" - #include "vk_dispatch_table_helper.h" - #include "vk_extension_helper.h" - #include "gpu/core/gpuav_settings.h" - #include "sync/sync_settings.h" - - extern std::atomic global_unique_id; - - // To avoid re-hashing unique ids on each use, we precompute the hash and store the - // hash's LSBs in the high 24 bits. - struct HashedUint64 { - static const int HASHED_UINT64_SHIFT = 40; - size_t operator()(const uint64_t& t) const { return t >> HASHED_UINT64_SHIFT; } - - static uint64_t hash(uint64_t id) { - uint64_t h = (uint64_t)vvl::hash()(id); - id |= h << HASHED_UINT64_SHIFT; - return id; - } - }; - - namespace chassis { - struct CreateGraphicsPipelines; - struct CreateComputePipelines; - struct CreateRayTracingPipelinesNV; - struct CreateRayTracingPipelinesKHR; - struct CreateShaderModule; - struct ShaderObject; - struct CreatePipelineLayout; - struct CreateBuffer; - } // namespace chassis - - namespace vvl { - struct AllocateDescriptorSetsData; - class Pipeline; - } // namespace vvl - - // Because of GPL, we currently create our Pipeline state objects before the PreCallValidate - // Each chassis layer will need to track its own state - using PipelineStates = std::vector>; - - extern vvl::concurrent_unordered_map unique_id_mapping; - - std::vector>& GetCustomStypeInfo(); - - VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetPhysicalDeviceProcAddr(VkInstance instance, const char* funcName);\n - ''') - - guard_helper = PlatformGuardHelper() - for command in [x for x in self.vk.commands.values() if x.name not in self.ignore_functions]: - out.extend(guard_helper.add_guard(command.protect)) - out.append(f'{command.cPrototype.replace("VKAPI_CALL vk", "VKAPI_CALL ")}\n\n') - out.extend(guard_helper.add_guard(None)) - - out.append(''' - // Layer object type identifiers - enum LayerObjectTypeId { - LayerObjectTypeThreading, // Instance or device threading layer object - LayerObjectTypeParameterValidation, // Instance or device parameter validation layer object - LayerObjectTypeObjectTracker, // Instance or device object tracker layer object - LayerObjectTypeCoreValidation, // Instance or device core validation layer object - LayerObjectTypeBestPractices, // Instance or device best practices layer object - LayerObjectTypeGpuAssisted, // Instance or device gpu assisted validation layer object - LayerObjectTypeSyncValidation, // Instance or device synchronization validation layer object - LayerObjectTypeMaxEnum, // Max enum count - }; - - struct TemplateState { - VkDescriptorUpdateTemplate desc_update_template; - vku::safe_VkDescriptorUpdateTemplateCreateInfo create_info; - bool destroyed; - - TemplateState(VkDescriptorUpdateTemplate update_template, vku::safe_VkDescriptorUpdateTemplateCreateInfo* pCreateInfo) - : desc_update_template(update_template), create_info(*pCreateInfo), destroyed(false) {} - }; - - // When testing for a valid value, allow a way to right away return how it might not be valid - enum class ValidValue { - Valid = 0, - NotFound, // example, trying to use a random int for an enum - NoExtension, // trying to use a proper value, but the extension is required - }; - - #if defined(__clang__) - #define DECORATE_PRINTF(_fmt_argnum, _first_param_num) __attribute__((format(printf, _fmt_argnum, _first_param_num))) - #elif defined(__GNUC__) - #define DECORATE_PRINTF(_fmt_argnum, _first_param_num) __attribute__((format(gnu_printf, _fmt_argnum, _first_param_num))) - #else - #define DECORATE_PRINTF(_fmt_num, _first_param_num) - #endif - - class ValidationObject; - - class DispatchObject { - public: - APIVersion api_version; - DebugReport* debug_report = nullptr; - VkInstance instance = VK_NULL_HANDLE; - VkPhysicalDevice physical_device = VK_NULL_HANDLE; - VkDevice device = VK_NULL_HANDLE; - - VkLayerInstanceDispatchTable instance_dispatch_table; - VkLayerDispatchTable device_dispatch_table; - - InstanceExtensions instance_extensions; - DeviceExtensions device_extensions = {}; - GlobalSettings global_settings = {}; - GpuAVSettings gpuav_settings = {}; - SyncValSettings syncval_settings = {}; - - CHECK_DISABLED disabled = {}; - CHECK_ENABLED enabled = {}; - - mutable std::vector> intercept_vectors; - mutable std::vector object_dispatch; - mutable std::vector aborted_object_dispatch; - - // Handle Wrapping Data - // Reverse map display handles - vvl::concurrent_unordered_map display_id_reverse_mapping; - // Wrapping Descriptor Template Update structures requires access to the template createinfo structs - vvl::unordered_map> desc_template_createinfo_map; - struct SubpassesUsageStates { - vvl::unordered_set subpasses_using_color_attachment; - vvl::unordered_set subpasses_using_depthstencil_attachment; - }; - // Uses unwrapped handles - vvl::unordered_map renderpasses_states; - // Map of wrapped swapchain handles to arrays of wrapped swapchain image IDs - // Each swapchain has an immutable list of wrapped swapchain image IDs -- always return these IDs if they exist - vvl::unordered_map> swapchain_wrapped_image_handle_map; - // Map of wrapped descriptor pools to set of wrapped descriptor sets allocated from each pool - vvl::unordered_map> pool_descriptor_sets_map; - - vvl::concurrent_unordered_map>, 0> deferred_operation_post_completion; - vvl::concurrent_unordered_map&)>>, 0> - deferred_operation_post_check; - vvl::concurrent_unordered_map, 0> deferred_operation_pipelines; - - void InitObjectDispatchVectors(); - void ReleaseDeviceValidationObject(LayerObjectTypeId type_id) const; - void ReleaseAllValidationObjects() const; - - ValidationObject* GetValidationObject(LayerObjectTypeId object_type) const; - - template - ValidationObjectType* GetValidationObject() const; - // Unwrap a handle. - template - HandleType Unwrap(HandleType wrapped_handle) { - if (wrapped_handle == (HandleType)VK_NULL_HANDLE) return wrapped_handle; - auto iter = unique_id_mapping.find(CastToUint64(wrapped_handle)); - if (iter == unique_id_mapping.end()) return (HandleType)0; - return (HandleType)iter->second; - } - - // Wrap a newly created handle with a new unique ID, and return the new ID. - template - HandleType WrapNew(HandleType new_created_handle) { - if (new_created_handle == (HandleType)VK_NULL_HANDLE) return new_created_handle; - auto unique_id = global_unique_id++; - unique_id = HashedUint64::hash(unique_id); - assert(unique_id != 0); // can't be 0, otherwise unwrap will apply special rule for VK_NULL_HANDLE - unique_id_mapping.insert_or_assign(unique_id, CastToUint64(new_created_handle)); - return (HandleType)unique_id; - } - - // VkDisplayKHR objects are statically created in the driver at VkCreateInstance. - // They live with the PhyiscalDevice and apps never created/destroy them. - // Apps needs will query for them and the first time we see it we wrap it - VkDisplayKHR MaybeWrapDisplay(VkDisplayKHR handle) { - // See if this display is already known - auto it = display_id_reverse_mapping.find(handle); - if (it != display_id_reverse_mapping.end()) return (VkDisplayKHR)it->second; - - // First time see this VkDisplayKHR, so wrap - const uint64_t unique_id = (uint64_t)WrapNew(handle); - display_id_reverse_mapping.insert_or_assign(handle, unique_id); - return (VkDisplayKHR)unique_id; - } - // Debug Logging Helpers - bool DECORATE_PRINTF(5, 6) - LogError(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kErrorBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - // Currently works like LogWarning, but allows developer to better categorize the warning - bool DECORATE_PRINTF(5, 6) LogUndefinedValue(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, - const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kWarningBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - bool DECORATE_PRINTF(5, 6) - LogWarning(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kWarningBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - bool DECORATE_PRINTF(5, 6) LogPerformanceWarning(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, - const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kPerformanceWarningBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - bool DECORATE_PRINTF(5, 6) - LogInfo(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kInformationBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - bool DECORATE_PRINTF(5, 6) - LogVerbose(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kVerboseBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - void LogInternalError(std::string_view failure_location, const LogObjectList& obj_list, const Location& loc, - std::string_view entrypoint, VkResult err) const { - const std::string_view err_string = string_VkResult(err); - std::string vuid = "INTERNAL-ERROR-"; - vuid += entrypoint; - LogError(vuid, obj_list, loc, "at %s: %s() was called in the Validation Layer state tracking and failed with result = %s.", - failure_location.data(), entrypoint.data(), err_string.data()); - } - }; - - // Layer chassis validation object base class definition - class ValidationObject { - public: - APIVersion api_version; - DebugReport* debug_report = nullptr; - template - std::string FormatHandle(T&& h) const { - return debug_report->FormatHandle(std::forward(h)); - } - DispatchObject* dispatch_{}; - - VkLayerInstanceDispatchTable instance_dispatch_table; - VkLayerDispatchTable device_dispatch_table; - - InstanceExtensions instance_extensions; - DeviceExtensions device_extensions = {}; - GlobalSettings global_settings = {}; - GpuAVSettings gpuav_settings = {}; - SyncValSettings syncval_settings = {}; - - CHECK_DISABLED disabled = {}; - CHECK_ENABLED enabled = {}; - - VkInstance instance = VK_NULL_HANDLE; - VkPhysicalDevice physical_device = VK_NULL_HANDLE; - VkDevice device = VK_NULL_HANDLE; - bool is_device_lost = false; - - LayerObjectTypeId container_type; - - std::string layer_name = "CHASSIS"; - - ValidationObject( ) {} - virtual ~ValidationObject() {} - - mutable std::shared_mutex validation_object_mutex; - virtual ReadLockGuard ReadLock() const { return ReadLockGuard(validation_object_mutex); } - virtual WriteLockGuard WriteLock() { return WriteLockGuard(validation_object_mutex); } - - // If the Record phase calls a function that blocks, we might need to release - // the lock that protects Record itself in order to avoid mutual waiting. - static thread_local WriteLockGuard* record_guard; - - // Should be used instead of WriteLock() if the Record phase wants to release - // its lock during the blocking operation. - struct BlockingOperationGuard { - WriteLockGuard lock; - ValidationObject* validation_object = nullptr; - - BlockingOperationGuard(ValidationObject* validation_object) : validation_object(validation_object) { - // This assert detects recursive calls. It is here mostly for documentation purposes - // because WriteLock() also triggers errors during recursion. - // Recursion is not allowed since record_guard is a thread-local variable and it can - // reference only one frame of the callstack. - assert(validation_object->record_guard == nullptr); - - lock = validation_object->WriteLock(); - - // Initialize record_guard only when Record is actually protected by the - // mutex. It's not the case when fine grained locking is enabled. - record_guard = lock.owns_lock() ? &lock : nullptr; - } - - ~BlockingOperationGuard() { validation_object->record_guard = nullptr; } - }; - - // The following Begin/End methods should be called during the Record phase - // around blocking operation that causes mutual waiting (deadlock). - void BeginBlockingOperation() { - if (record_guard) { - record_guard->unlock(); - } - } - void EndBlockingOperation() { - if (record_guard) { - record_guard->lock(); - } - } - - // Debug Logging Helpers - bool DECORATE_PRINTF(5, 6) - LogError(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kErrorBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - // Currently works like LogWarning, but allows developer to better categorize the warning - bool DECORATE_PRINTF(5, 6) LogUndefinedValue(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, - const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kWarningBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - bool DECORATE_PRINTF(5, 6) - LogWarning(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kWarningBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - bool DECORATE_PRINTF(5, 6) LogPerformanceWarning(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, - const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kPerformanceWarningBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - bool DECORATE_PRINTF(5, 6) - LogInfo(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kInformationBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - bool DECORATE_PRINTF(5, 6) - LogVerbose(std::string_view vuid_text, const LogObjectList& objlist, const Location& loc, const char* format, ...) const { - va_list argptr; - va_start(argptr, format); - const bool result = debug_report->LogMsg(kVerboseBit, objlist, loc, vuid_text, format, argptr); - va_end(argptr); - return result; - } - - void LogInternalError(std::string_view failure_location, const LogObjectList& obj_list, const Location& loc, - std::string_view entrypoint, VkResult err) const { - const std::string_view err_string = string_VkResult(err); - std::string vuid = "INTERNAL-ERROR-"; - vuid += entrypoint; - LogError(vuid, obj_list, loc, "at %s: %s() was called in the Validation Layer state tracking and failed with result = %s.", - failure_location.data(), entrypoint.data(), err_string.data()); - } + // This file contains methods for class ValidationObject and it is designed to ONLY be + // included into validation_object.h. ''') - - + out = [] out.append('// We make many internal dispatch calls to extended query functions which can depend on the API version\n') for extended_query_ext in self.extended_query_exts: for command in self.vk.extensions[extended_query_ext].commands: parameters = (command.cPrototype.split('(')[1])[:-2] # leaves just the parameters out.append(f'{command.returnType} Dispatch{command.alias[2:]}Helper({parameters}) const;\n') - out.append(''' - // clang-format off - // Pre/post hook point declarations -''') + out.append('// Pre/post hook point declarations\n') + guard_helper = PlatformGuardHelper() for command in [x for x in self.vk.commands.values() if x.name not in self.ignore_functions and 'ValidationCache' not in x.name]: parameters = (command.cPrototype.split('(')[1])[:-2] # leaves just the parameters parameters = parameters.replace('\n', '') @@ -719,143 +191,54 @@ class ValidationObject { out.append(f' virtual void PreCallRecord{command.name[2:]}({parameters}, const RecordObject& record_obj) {{}}\n') out.append(f' virtual void PostCallRecord{command.name[2:]}({parameters}, const RecordObject& record_obj) {{}}\n') out.extend(guard_helper.add_guard(None)) + self.write("".join(out)) + def generateVOSource(self): + out = [] out.append(''' - virtual void CoreLayerDestroyValidationCacheEXT(VkDevice device, VkValidationCacheEXT validationCache, const VkAllocationCallbacks* pAllocator) {} - virtual VkResult CoreLayerMergeValidationCachesEXT(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, const VkValidationCacheEXT* pSrcCaches) { return VK_SUCCESS; } - virtual VkResult CoreLayerGetValidationCacheDataEXT(VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, void* pData) { return VK_SUCCESS; } - - // Allow additional state parameter for CreateGraphicsPipelines - virtual bool PreCallValidateCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const ErrorObject& error_obj, PipelineStates& pipeline_states, chassis::CreateGraphicsPipelines& chassis_state) const { - return PreCallValidateCreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, error_obj); - } - virtual void PreCallRecordCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj, PipelineStates& pipeline_states, chassis::CreateGraphicsPipelines& chassis_state) { - PreCallRecordCreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, record_obj); - } - virtual void PostCallRecordCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj, PipelineStates& pipeline_states, chassis::CreateGraphicsPipelines& chassis_state) { - PostCallRecordCreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, record_obj); - } - - // Allow additional state parameter for CreateComputePipelines - virtual bool PreCallValidateCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const ErrorObject& error_obj, PipelineStates& pipeline_states, chassis::CreateComputePipelines& chassis_state) const { - return PreCallValidateCreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, error_obj); - } - virtual void PreCallRecordCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj, PipelineStates& pipeline_states, chassis::CreateComputePipelines& chassis_state) { - PreCallRecordCreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, record_obj); - } - virtual void PostCallRecordCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj, PipelineStates& pipeline_states, chassis::CreateComputePipelines& chassis_state) { - PostCallRecordCreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, record_obj); - } - - // Allow additional state parameter for CreateRayTracingPipelinesNV - virtual bool PreCallValidateCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoNV* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const ErrorObject& error_obj, PipelineStates& pipeline_states, chassis::CreateRayTracingPipelinesNV& chassis_state) const { - return PreCallValidateCreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, error_obj); - } - virtual void PreCallRecordCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoNV* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj, PipelineStates& pipeline_states, chassis::CreateRayTracingPipelinesNV& chassis_state) { - PreCallRecordCreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, record_obj); - } - virtual void PostCallRecordCreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoNV* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj, PipelineStates& pipeline_states, chassis::CreateRayTracingPipelinesNV& chassis_state) { - PostCallRecordCreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, record_obj); - } - - // Allow additional state parameter for CreateRayTracingPipelinesKHR - virtual bool PreCallValidateCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const ErrorObject& error_obj, PipelineStates& pipeline_states, chassis::CreateRayTracingPipelinesKHR& chassis_state) const { - return PreCallValidateCreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, error_obj); - } - virtual void PreCallRecordCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj, PipelineStates& pipeline_states, chassis::CreateRayTracingPipelinesKHR& chassis_state) { - PreCallRecordCreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, record_obj); - } - virtual void PostCallRecordCreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines, const RecordObject& record_obj, PipelineStates& pipeline_states, std::shared_ptr chassis_state) { - PostCallRecordCreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, record_obj); - } - - // Allow modification of a down-chain parameter for CreatePipelineLayout - virtual void PreCallRecordCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout, const RecordObject& record_obj, chassis::CreatePipelineLayout& chassis_state) { - PreCallRecordCreatePipelineLayout(device, pCreateInfo, pAllocator, pPipelineLayout, record_obj); - } - - // Enable the CreateShaderModule/CreateShaderEXT API to take an extra argument for state preservation and paramter modification - virtual void PreCallRecordCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule, const RecordObject& record_obj, chassis::CreateShaderModule& chassis_state) { - PreCallRecordCreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule, record_obj); - } - virtual void PostCallRecordCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule, const RecordObject& record_obj, chassis::CreateShaderModule& chassis_state) { - PostCallRecordCreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule, record_obj); - } - virtual void PreCallRecordCreateShadersEXT(VkDevice device, uint32_t createInfoCount, const VkShaderCreateInfoEXT* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkShaderEXT* pShaders, const RecordObject& record_obj, chassis::ShaderObject& chassis_state) { - PreCallRecordCreateShadersEXT(device, createInfoCount, pCreateInfos, pAllocator, pShaders, record_obj); - } - virtual void PostCallRecordCreateShadersEXT(VkDevice device, uint32_t createInfoCount, const VkShaderCreateInfoEXT* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkShaderEXT* pShaders, const RecordObject& record_obj, chassis::ShaderObject& chassis_state) { - PostCallRecordCreateShadersEXT(device, createInfoCount, pCreateInfos, pAllocator, pShaders, record_obj); - } - - // Allow AllocateDescriptorSets to use some local stack storage for performance purposes - virtual bool PreCallValidateAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, VkDescriptorSet* pDescriptorSets, const ErrorObject& error_obj, vvl::AllocateDescriptorSetsData& ads_state) const { - return PreCallValidateAllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets, error_obj); - } - virtual void PostCallRecordAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, VkDescriptorSet* pDescriptorSets, const RecordObject& record_obj, vvl::AllocateDescriptorSetsData& ads_state) { - PostCallRecordAllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets, record_obj); - } - - // Allow modification of a down-chain parameter for CreateBuffer - virtual void PreCallRecordCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer, const RecordObject& record_obj, chassis::CreateBuffer& chassis_state) { - PreCallRecordCreateBuffer(device, pCreateInfo, pAllocator, pBuffer, record_obj); - } - - // Modify a parameter to CreateDevice - virtual void PreCallRecordCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDevice* pDevice, const RecordObject& record_obj, vku::safe_VkDeviceCreateInfo *modified_create_info) { - PreCallRecordCreateDevice(physicalDevice, pCreateInfo, pAllocator, pDevice, record_obj); - } -}; -// clang-format on -''') + #include + #include + #include + + #include "chassis/validation_object.h" + + thread_local WriteLockGuard* ValidationObject::record_guard{}; - out.append('extern small_unordered_map layer_data_map;') + ''') + for extended_query_ext in self.extended_query_exts: + for command in self.vk.extensions[extended_query_ext].commands: + parameters = (command.cPrototype.split('(')[1])[:-2] # leaves just the parameters + arguments = ','.join([x.name for x in command.params]) + out.append(f'''\n{command.returnType} ValidationObject::Dispatch{command.alias[2:]}Helper({parameters}) const {{ + if (api_version >= VK_API_VERSION_1_1) {{ + return dispatch_->{command.alias[2:]}({arguments}); + }} else {{ + return dispatch_->{command.name[2:]}({arguments}); + }} + }} + ''') self.write("".join(out)) + def generateSource(self): out = [] out.append(''' + #include "chassis/chassis.h" #include #include #include - #include "chassis.h" + #include "chassis/dispatch_object.h" + #include "chassis/validation_object.h" #include "layer_options.h" - #include "layer_chassis_dispatch.h" #include "state_tracker/descriptor_sets.h" #include "chassis/chassis_modification_state.h" + #include "core_checks/core_validation.h" #include "profiling/profiling.h" - thread_local WriteLockGuard* ValidationObject::record_guard{}; - - small_unordered_map layer_data_map; - - // Global unique object identifier. - std::atomic global_unique_id(1ULL); - // Map uniqueID to actual object handle. Accesses to the map itself are - // internally synchronized. - vvl::concurrent_unordered_map unique_id_mapping; - - // State we track in order to populate HandleData for things such as ignored pointers - static vvl::unordered_map secondary_cb_map{}; - static std::shared_mutex secondary_cb_map_mutex; - - bool wrap_handles = true; - - #define OBJECT_LAYER_DESCRIPTION "khronos_validation"\n ''') - out.append('// Include layer validation object definitions\n') - # Add #include directives for the used layers - for layer in APISpecific.getValidationLayerList(self.targetApiName): - out.append(f'#include "{layer["include"]}"\n') - out.append('\n') - - out.append('// This header file must be included after the above validation object class definitions\n') - out.append('#include "chassis_dispatch_helper.h"\n') - out.append('\n') - out.append('// Extension exposed by the validation layer\n') instance_exts = APISpecific.getInstanceExtensionList(self.targetApiName) @@ -870,1345 +253,48 @@ def generateSource(self): out.append(f' VkExtensionProperties{{{ext}_EXTENSION_NAME, {ext}_SPEC_VERSION}},\n') out.append('};\n') + out.append('namespace vulkan_layer_chassis {') + guard_helper = PlatformGuardHelper() out.append(''' - // Layer registration code - static std::vector CreateObjectDispatch(const CHECK_ENABLED &enables, const CHECK_DISABLED &disables) { - std::vector object_dispatch{}; - - // Add VOs to dispatch vector. Order here will be the validation dispatch order! - ''') - - for layer in APISpecific.getValidationLayerList(self.targetApiName): - constructor = layer['class'] - constructor += '(nullptr)' if layer['class'] == 'ThreadSafety' else '' - out.append(f''' - if ({layer["enabled"]}) {{ - object_dispatch.emplace_back(new {constructor}); - }}''') - out.append('\n') - out.append(' return object_dispatch;\n') - out.append('}\n') - - out.append(''' - static void InitDeviceDispatchObject(DispatchObject *instance_interceptor, DispatchObject *device_interceptor) { - auto disables = instance_interceptor->disabled; - auto enables = instance_interceptor->enabled; - - // Note that this DEFINES THE ORDER IN WHICH THE LAYER VALIDATION OBJECTS ARE CALLED - ''') - for layer in APISpecific.getValidationLayerList(self.targetApiName): - constructor = layer['class'] - if layer['class'] == 'ThreadSafety': - constructor += '(instance_interceptor->GetValidationObject())' - out.append(f''' - if ({layer["enabled"]}) {{ - device_interceptor->object_dispatch.emplace_back(new {constructor}); - }}''') - out.append('\n') - out.append('}\n') - - for extended_query_ext in self.extended_query_exts: - for command in self.vk.extensions[extended_query_ext].commands: - parameters = (command.cPrototype.split('(')[1])[:-2] # leaves just the parameters - arguments = ','.join([x.name for x in command.params]) - out.append(f'''\n{command.returnType} ValidationObject::Dispatch{command.alias[2:]}Helper({parameters}) const {{ - if (api_version >= VK_API_VERSION_1_1) {{ - return Dispatch{command.alias[2:]}({arguments}); - }} else {{ - return Dispatch{command.name[2:]}({arguments}); - }} - }} - ''') - - out.append(''' - // Global list of sType,size identifiers - std::vector>& GetCustomStypeInfo() { - static std::vector> custom_stype_info{}; - return custom_stype_info; - } - - ValidationObject* DispatchObject::GetValidationObject(LayerObjectTypeId object_type) const { - for (auto validation_object : object_dispatch) { - if (validation_object->container_type == object_type) { - return validation_object; - } - } - return nullptr; - } - - template - ValidationObjectType* DispatchObject::GetValidationObject() const { - LayerObjectTypeId type_id; - if constexpr (std::is_same_v) { - type_id = LayerObjectTypeThreading; - } else if constexpr (std::is_same_v) { - type_id = LayerObjectTypeParameterValidation; - } else if constexpr (std::is_same_v) { - type_id = LayerObjectTypeObjectTracker; - } else if constexpr (std::is_same_v) { - type_id = LayerObjectTypeCoreValidation; - } else { - static_assert(vvl::dependent_false_v, "unsupported validation object type"); - } - return static_cast(GetValidationObject(type_id)); - } - - template ThreadSafety* DispatchObject::GetValidationObject() const; - template StatelessValidation* DispatchObject::GetValidationObject() const; - template ObjectLifetimes* DispatchObject::GetValidationObject() const; - template CoreChecks* DispatchObject::GetValidationObject() const; - - // Takes the validation type and removes it from the chassis so it will not be called anymore - // Designed for things like GPU-AV to remove itself while keeping everything else alive - void DispatchObject::ReleaseDeviceValidationObject(LayerObjectTypeId type_id) const { - for (auto object_it = object_dispatch.begin(); object_it != object_dispatch.end(); object_it++) { - if ((*object_it)->container_type == type_id) { - ValidationObject* object = *object_it; - - object_dispatch.erase(object_it); - - for (auto intercept_vector_it = intercept_vectors.begin(); - intercept_vector_it != intercept_vectors.end(); intercept_vector_it++) { - for (auto intercept_object_it = intercept_vector_it->begin(); intercept_object_it != intercept_vector_it->end(); - intercept_object_it++) { - if (object == *intercept_object_it) { - intercept_vector_it->erase(intercept_object_it); - break; - } - } - } - - // We can't destroy the object itself now as it might be unsafe (things are still being used) - // If the rare case happens we need to release, we will cleanup later when we normally would have cleaned this up - aborted_object_dispatch.push_back(object); - break; - } - } - } - - // Incase we need to teardown things early, we want to do it safely, so we will keep the entrypoints into layer, but just remove all - // the internal chassis hooks so that any call becomes a no-op (but still dispatches into the driver) - void DispatchObject::ReleaseAllValidationObjects() const { - - // Some chassis loops use the intercept_vectors instead of looking up the object - for (auto& intercept_vector : intercept_vectors) { - intercept_vector.clear(); - } - - for (auto object_it = object_dispatch.begin(); object_it != object_dispatch.end(); object_it++) { - ValidationObject* object = *object_it; - aborted_object_dispatch.push_back(object); - } - object_dispatch.clear(); - } - - namespace vulkan_layer_chassis { - - static const VkLayerProperties global_layer = { - OBJECT_LAYER_NAME, - VK_LAYER_API_VERSION, - 1, - "LunarG validation Layer", - }; - - typedef enum ApiFunctionType { kFuncTypeInst = 0, kFuncTypePdev = 1, kFuncTypeDev = 2 } ApiFunctionType; - - typedef struct { - ApiFunctionType function_type; - void* funcptr; - } function_data; - - const vvl::unordered_map& GetNameToFuncPtrMap(); - ''') - - out.append(''' - // Manually written functions - - // Check enabled instance extensions against supported instance extension whitelist - static void InstanceExtensionWhitelist(DispatchObject* layer_data, const VkInstanceCreateInfo* pCreateInfo, VkInstance instance) { - for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) { - // Check for recognized instance extensions - vvl::Extension extension = GetExtension(pCreateInfo->ppEnabledExtensionNames[i]); - if (!IsInstanceExtension(extension)) { - Location loc(vvl::Func::vkCreateInstance); - layer_data->LogWarning(kVUIDUndefined, layer_data->instance, - loc.dot(vvl::Field::pCreateInfo).dot(vvl::Field::ppEnabledExtensionNames, i), - "%s is not supported by this layer. Using this extension may adversely affect validation " - "results and/or produce undefined behavior.", pCreateInfo->ppEnabledExtensionNames[i]); - } - } - } - - // Check enabled device extensions against supported device extension whitelist - static void DeviceExtensionWhitelist(DispatchObject* layer_data, const VkDeviceCreateInfo* pCreateInfo, VkDevice device) { - for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) { - // Check for recognized device extensions - vvl::Extension extension = GetExtension(pCreateInfo->ppEnabledExtensionNames[i]); - if (!IsDeviceExtension(extension)) { - Location loc(vvl::Func::vkCreateDevice); - layer_data->LogWarning(kVUIDUndefined, layer_data->device, - loc.dot(vvl::Field::pCreateInfo).dot(vvl::Field::ppEnabledExtensionNames, i), - "%s is not supported by this layer. Using this extension may adversely affect validation " - "results and/or produce undefined behavior.", pCreateInfo->ppEnabledExtensionNames[i]); - } - } - } - - void OutputLayerStatusInfo(DispatchObject* context) { - std::string list_of_enables; - std::string list_of_disables; - for (uint32_t i = 0; i < kMaxEnableFlags; i++) { - if (context->enabled[i]) { - if (list_of_enables.size()) list_of_enables.append(", "); - list_of_enables.append(GetEnableFlagNameHelper()[i]); - } - } - if (list_of_enables.empty()) { - list_of_enables.append("None"); - } - for (uint32_t i = 0; i < kMaxDisableFlags; i++) { - if (context->disabled[i]) { - if (list_of_disables.size()) list_of_disables.append(", "); - list_of_disables.append(GetDisableFlagNameHelper()[i]); - } - } - if (list_of_disables.empty()) { - list_of_disables.append("None"); - } - - Location loc(vvl::Func::vkCreateInstance); - // Output layer status information message - // TODO - We should just dump all settings to a file (see https://github.com/KhronosGroup/Vulkan-Utility-Libraries/issues/188) - context->LogInfo("WARNING-CreateInstance-status-message", context->instance, loc, - "Khronos Validation Layer Active:\\n Current Enables: %s.\\n Current Disables: %s.\\n", - list_of_enables.c_str(), list_of_disables.c_str()); - - // Create warning message if user is running debug layers. - #ifndef NDEBUG - context->LogPerformanceWarning( - "WARNING-CreateInstance-debug-warning", context->instance, loc, - "Using debug builds of the validation layers *will* adversely affect performance."); - #endif - if (!context->global_settings.fine_grained_locking) { - context->LogPerformanceWarning( - "WARNING-CreateInstance-locking-warning", context->instance, loc, - "Fine-grained locking is disabled, this will adversely affect performance of multithreaded applications."); - } - } - - // Non-code-generated chassis API functions - - VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetDeviceProcAddr(VkDevice device, const char* funcName) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (!ApiParentExtensionEnabled(funcName, &layer_data->device_extensions)) { - return nullptr; - } - const auto& item = GetNameToFuncPtrMap().find(funcName); - if (item != GetNameToFuncPtrMap().end()) { - if (item->second.function_type != kFuncTypeDev) { - Location loc(vvl::Func::vkGetDeviceProcAddr); - // Was discussed in https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/6583 - // This has "valid" behavior to return null, but still worth warning users for this unqiue function - layer_data->LogWarning("WARNING-vkGetDeviceProcAddr-device", device, loc.dot(vvl::Field::pName), - "is trying to grab %s which is an instance level function", funcName); - return nullptr; - } else { - return reinterpret_cast(item->second.funcptr); - } - } - auto& table = layer_data->device_dispatch_table; - if (!table.GetDeviceProcAddr) return nullptr; - return table.GetDeviceProcAddr(device, funcName); - } - - VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetInstanceProcAddr(VkInstance instance, const char* funcName) { - const auto& item = GetNameToFuncPtrMap().find(funcName); - if (item != GetNameToFuncPtrMap().end()) { - return reinterpret_cast(item->second.funcptr); - } - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - auto& table = layer_data->instance_dispatch_table; - if (!table.GetInstanceProcAddr) return nullptr; - return table.GetInstanceProcAddr(instance, funcName); - } - - VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetPhysicalDeviceProcAddr(VkInstance instance, const char* funcName) { - const auto& item = GetNameToFuncPtrMap().find(funcName); - if (item != GetNameToFuncPtrMap().end()) { - if (item->second.function_type != kFuncTypePdev) { - return nullptr; - } else { - return reinterpret_cast(item->second.funcptr); - } - } - auto layer_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map); - auto& table = layer_data->instance_dispatch_table; - if (!table.GetPhysicalDeviceProcAddr) return nullptr; - return table.GetPhysicalDeviceProcAddr(instance, funcName); - } - - VKAPI_ATTR VkResult VKAPI_CALL EnumerateInstanceLayerProperties(uint32_t* pCount, VkLayerProperties* pProperties) { - return util_GetLayerProperties(1, &global_layer, pCount, pProperties); - } - - VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, - VkLayerProperties* pProperties) { - return util_GetLayerProperties(1, &global_layer, pCount, pProperties); - } - - VKAPI_ATTR VkResult VKAPI_CALL EnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pCount, - VkExtensionProperties* pProperties) { - if (pLayerName && !strcmp(pLayerName, global_layer.layerName)) { - return util_GetExtensionProperties(static_cast(kInstanceExtensions.size()), kInstanceExtensions.data(), pCount, - pProperties); - } - - return VK_ERROR_LAYER_NOT_PRESENT; - } - - VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, - uint32_t* pCount, VkExtensionProperties* pProperties) { - if (pLayerName && !strcmp(pLayerName, global_layer.layerName)) { - return util_GetExtensionProperties(static_cast(kDeviceExtensions.size()), kDeviceExtensions.data(), pCount, - pProperties); - } - - assert(physicalDevice); - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - return layer_data->instance_dispatch_table.EnumerateDeviceExtensionProperties(physicalDevice, pLayerName, pCount, pProperties); - } - - // This is here as some applications will call exit() which results in all our static allocations (like std::map) having their - // destructor called and destroyed from under us. It is not possible to detect as sometimes (when using things like robin hood) the - // size()/empty() will give false positive that memory is there there. We add this global hook that will go through and remove all - // the function calls such that things can safely run in the case the applicaiton still wants to make Vulkan calls in their atexit() - // handler - void ApplicationAtExit() { - // On a "normal" application, this function is called after vkDestroyInstance and layer_data_map is empty - // - // If there are multiple devices we still want to delete them all as exit() is a global scope call - for (auto object : layer_data_map) { - object.second->ReleaseAllValidationObjects(); - } - } - - VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, - VkInstance* pInstance) { - - atexit(ApplicationAtExit); - - VVL_ZoneScoped; - VkLayerInstanceCreateInfo* chain_info = GetChainInfo(pCreateInfo, VK_LAYER_LINK_INFO); - - assert(chain_info->u.pLayerInfo); - PFN_vkGetInstanceProcAddr fpGetInstanceProcAddr = chain_info->u.pLayerInfo->pfnNextGetInstanceProcAddr; - PFN_vkCreateInstance fpCreateInstance = (PFN_vkCreateInstance)fpGetInstanceProcAddr(nullptr, "vkCreateInstance"); - if (fpCreateInstance == nullptr) return VK_ERROR_INITIALIZATION_FAILED; - chain_info->u.pLayerInfo = chain_info->u.pLayerInfo->pNext; - uint32_t specified_version = (pCreateInfo->pApplicationInfo ? pCreateInfo->pApplicationInfo->apiVersion : VK_API_VERSION_1_0); - APIVersion api_version = VK_MAKE_API_VERSION(VK_API_VERSION_VARIANT(specified_version), VK_API_VERSION_MAJOR(specified_version), - VK_API_VERSION_MINOR(specified_version), 0); - - auto debug_report = new DebugReport{}; - debug_report->instance_pnext_chain = vku::SafePnextCopy(pCreateInfo->pNext); - ActivateInstanceDebugCallbacks(debug_report); - - // Set up enable and disable features flags - CHECK_ENABLED local_enables{}; - CHECK_DISABLED local_disables{}; - GlobalSettings local_global_settings = {}; - GpuAVSettings local_gpuav_settings = {}; - SyncValSettings local_syncval_settings = {}; - ConfigAndEnvSettings config_and_env_settings_data{ - OBJECT_LAYER_DESCRIPTION, pCreateInfo, local_enables, local_disables, debug_report, - // All settings for various internal layers - &local_global_settings, &local_gpuav_settings, &local_syncval_settings}; - ProcessConfigAndEnvSettings(&config_and_env_settings_data); - - // Create temporary dispatch vector for pre-calls until instance is created - std::vector local_object_dispatch = CreateObjectDispatch(local_enables, local_disables); - - // If handle wrapping is disabled via the ValidationFeatures extension, override build flag - if (local_disables[handle_wrapping]) { - wrap_handles = false; - } - - DispatchObject* framework = new DispatchObject(); - - framework->api_version = api_version; - framework->object_dispatch = local_object_dispatch; - framework->disabled = local_disables; - framework->enabled = local_enables; - framework->global_settings = local_global_settings; - framework->gpuav_settings = local_gpuav_settings; - framework->syncval_settings = local_syncval_settings; - framework->debug_report = debug_report; - framework->instance_extensions.InitFromInstanceCreateInfo(specified_version, pCreateInfo); - - // Initialize the validation objects - for (auto* intercept : local_object_dispatch) { - intercept->api_version = api_version; - intercept->debug_report = debug_report; - intercept->dispatch_ = framework; - } - - // Define logic to cleanup everything in case of an error - auto cleanup_allocations = [debug_report, framework, &local_object_dispatch]() { - DeactivateInstanceDebugCallbacks(debug_report); - vku::FreePnextChain(debug_report->instance_pnext_chain); - LayerDebugUtilsDestroyInstance(debug_report); - for (ValidationObject* object : local_object_dispatch) { - delete object; - } - delete framework; - }; - - // Init dispatch array and call registration functions - bool skip = false; - ErrorObject error_obj(vvl::Func::vkCreateInstance, VulkanTypedHandle()); - for (const ValidationObject* intercept : local_object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateInstance(pCreateInfo, pAllocator, pInstance, error_obj); - if (skip) { - cleanup_allocations(); - return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - - RecordObject record_obj(vvl::Func::vkCreateInstance); - for (ValidationObject* intercept : local_object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateInstance(pCreateInfo, pAllocator, pInstance, record_obj); - } - - VkResult result = fpCreateInstance(pCreateInfo, pAllocator, pInstance); - if (result != VK_SUCCESS) { - cleanup_allocations(); - return result; - } - record_obj.result = result; - framework->instance = *pInstance; - - layer_init_instance_dispatch_table(*pInstance, &framework->instance_dispatch_table, fpGetInstanceProcAddr); - - // We need to call this to properly check which device extensions have been promoted when validating query functions - // that take as input a physical device, which can be called before a logical device has been created. - framework->device_extensions.InitFromDeviceCreateInfo(&framework->instance_extensions, specified_version); - - layer_data_map[GetDispatchKey(*pInstance)] = framework; - OutputLayerStatusInfo(framework); - - for (auto* intercept : framework->object_dispatch) { - intercept->instance_dispatch_table = framework->instance_dispatch_table; - intercept->enabled = framework->enabled; - intercept->disabled = framework->disabled; - intercept->global_settings = framework->global_settings; - intercept->gpuav_settings = framework->gpuav_settings; - intercept->syncval_settings = framework->syncval_settings; - intercept->instance = *pInstance; - intercept->debug_report = debug_report; - intercept->api_version = api_version; - } - - for (ValidationObject* intercept : framework->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateInstance(pCreateInfo, pAllocator, pInstance, record_obj); - } - - InstanceExtensionWhitelist(framework, pCreateInfo, *pInstance); - DeactivateInstanceDebugCallbacks(debug_report); - return result; - } - - VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocationCallbacks* pAllocator) { - VVL_TracyCZone(tracy_zone_precall, true); - dispatch_key key = GetDispatchKey(instance); - auto layer_data = GetLayerDataPtr(key, layer_data_map); - ActivateInstanceDebugCallbacks(layer_data->debug_report); - ErrorObject error_obj(vvl::Func::vkDestroyInstance, VulkanTypedHandle(instance, kVulkanObjectTypeInstance)); - - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - intercept->PreCallValidateDestroyInstance(instance, pAllocator, error_obj); - } - - RecordObject record_obj(vvl::Func::vkDestroyInstance); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyInstance(instance, pAllocator, record_obj); - } - - // Before instance is destroyed, allow aborted objects to clean up - for (ValidationObject* intercept : layer_data->aborted_object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyInstance(instance, pAllocator, record_obj); - } - - VVL_TracyCZoneEnd(tracy_zone_precall); - VVL_TracyCZone(tracy_zone_dispatch, true); - layer_data->instance_dispatch_table.DestroyInstance(instance, pAllocator); - VVL_TracyCZoneEnd(tracy_zone_dispatch); - - VVL_TracyCZone(tracy_zone_postcall, true); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyInstance(instance, pAllocator, record_obj); - } - - DeactivateInstanceDebugCallbacks(layer_data->debug_report); - vku::FreePnextChain(layer_data->debug_report->instance_pnext_chain); - - LayerDebugUtilsDestroyInstance(layer_data->debug_report); - - for (auto item = layer_data->object_dispatch.begin(); item != layer_data->object_dispatch.end(); item++) { - delete *item; - } - for (auto item = layer_data->aborted_object_dispatch.begin(); item != layer_data->aborted_object_dispatch.end(); item++) { - delete *item; - } - - FreeLayerDataPtr(key, layer_data_map); - VVL_TracyCZoneEnd(tracy_zone_postcall); - -#if TRACY_MANUAL_LIFETIME - tracy::ShutdownProfiler(); -#endif - } - - VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice gpu, const VkDeviceCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkDevice* pDevice) { - VkLayerDeviceCreateInfo* chain_info = GetChainInfo(pCreateInfo, VK_LAYER_LINK_INFO); - - auto instance_interceptor = GetLayerDataPtr(GetDispatchKey(gpu), layer_data_map); - - PFN_vkGetInstanceProcAddr fpGetInstanceProcAddr = chain_info->u.pLayerInfo->pfnNextGetInstanceProcAddr; - PFN_vkGetDeviceProcAddr fpGetDeviceProcAddr = chain_info->u.pLayerInfo->pfnNextGetDeviceProcAddr; - PFN_vkCreateDevice fpCreateDevice = (PFN_vkCreateDevice)fpGetInstanceProcAddr(instance_interceptor->instance, "vkCreateDevice"); - if (fpCreateDevice == nullptr) { - return VK_ERROR_INITIALIZATION_FAILED; - } - chain_info->u.pLayerInfo = chain_info->u.pLayerInfo->pNext; - - // Get physical device limits for device - VkPhysicalDeviceProperties device_properties = {}; - instance_interceptor->instance_dispatch_table.GetPhysicalDeviceProperties(gpu, &device_properties); - - // Setup the validation tables based on the application API version from the instance and the capabilities of the device driver - auto effective_api_version = std::min(APIVersion(device_properties.apiVersion), instance_interceptor->api_version); - - - DispatchObject* device_interceptor = new DispatchObject(); - - device_interceptor->device_extensions.InitFromDeviceCreateInfo(&instance_interceptor->instance_extensions, - effective_api_version, pCreateInfo); - device_interceptor->instance_dispatch_table = instance_interceptor->instance_dispatch_table; - device_interceptor->instance_extensions = instance_interceptor->instance_extensions; - device_interceptor->physical_device = gpu; - device_interceptor->instance = instance_interceptor->instance; - device_interceptor->debug_report = instance_interceptor->debug_report; - - // This is odd but we need to set the current device_extensions in all of the - // instance validation objects so that they are available for validating CreateDevice - for (auto* object : instance_interceptor->object_dispatch) { - object->device_extensions = device_interceptor->device_extensions; - } - - // Make copy to modify as some ValidationObjects will want to add extensions/features on - vku::safe_VkDeviceCreateInfo modified_create_info(pCreateInfo); - - bool skip = false; - ErrorObject error_obj(vvl::Func::vkCreateDevice, VulkanTypedHandle(gpu, kVulkanObjectTypePhysicalDevice)); - for (const ValidationObject* intercept : instance_interceptor->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateDevice(gpu, pCreateInfo, pAllocator, pDevice, error_obj); - if (skip) { - delete device_interceptor; - return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - - RecordObject record_obj(vvl::Func::vkCreateDevice); - for (ValidationObject* intercept : instance_interceptor->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateDevice(gpu, pCreateInfo, pAllocator, pDevice, record_obj, &modified_create_info); - } - - VkResult result = fpCreateDevice(gpu, reinterpret_cast(&modified_create_info), pAllocator, pDevice); - if (result != VK_SUCCESS) { - delete device_interceptor; - return result; - } - record_obj.result = result; - device_interceptor->device = *pDevice; - - // Save local info in device object - device_interceptor->api_version = device_interceptor->device_extensions.InitFromDeviceCreateInfo( - &instance_interceptor->instance_extensions, effective_api_version, reinterpret_cast(&modified_create_info)); - - layer_init_device_dispatch_table(*pDevice, &device_interceptor->device_dispatch_table, fpGetDeviceProcAddr); - layer_data_map[GetDispatchKey(*pDevice)] = device_interceptor; - - instance_interceptor->debug_report->device_created++; - - InitDeviceDispatchObject(instance_interceptor, device_interceptor); - - // Initialize all of the objects with the appropriate data - for (auto* object : device_interceptor->object_dispatch) { - object->dispatch_ = device_interceptor; - object->device = device_interceptor->device; - object->physical_device = device_interceptor->physical_device; - object->instance = instance_interceptor->instance; - object->debug_report = instance_interceptor->debug_report; - object->device_dispatch_table = device_interceptor->device_dispatch_table; - object->api_version = device_interceptor->api_version; - object->disabled = instance_interceptor->disabled; - object->enabled = instance_interceptor->enabled; - object->global_settings = instance_interceptor->global_settings; - object->gpuav_settings = instance_interceptor->gpuav_settings; - object->syncval_settings = instance_interceptor->syncval_settings; - object->instance_dispatch_table = instance_interceptor->instance_dispatch_table; - object->instance_extensions = instance_interceptor->instance_extensions; - object->device_extensions = device_interceptor->device_extensions; - } - - for (ValidationObject* intercept : instance_interceptor->object_dispatch) { - auto lock = intercept->WriteLock(); - // Send down modified create info as we want to mark enabled features that we sent down on behalf of the app - intercept->PostCallRecordCreateDevice(gpu, reinterpret_cast(&modified_create_info), pAllocator, pDevice, record_obj); - } - - device_interceptor->InitObjectDispatchVectors(); - - DeviceExtensionWhitelist(device_interceptor, pCreateInfo, *pDevice); - - return result; - } - - // NOTE: Do _not_ skip the dispatch call when destroying a device. Whether or not there was a validation error, - // the loader will destroy the device, and know nothing about future references to this device making it - // impossible for the caller to use this device handle further. IOW, this is our _only_ chance to (potentially) - // dispatch the driver's DestroyDevice function. - VKAPI_ATTR void VKAPI_CALL DestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator) { - dispatch_key key = GetDispatchKey(device); - auto layer_data = GetLayerDataPtr(key, layer_data_map); - ErrorObject error_obj(vvl::Func::vkDestroyDevice, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - intercept->PreCallValidateDestroyDevice(device, pAllocator, error_obj); - } - - RecordObject record_obj(vvl::Func::vkDestroyDevice); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyDevice(device, pAllocator, record_obj); - } - - // Before device is destroyed, allow aborted objects to clean up - for (ValidationObject* intercept : layer_data->aborted_object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordDestroyDevice(device, pAllocator, record_obj); - } - - layer_data->device_dispatch_table.DestroyDevice(device, pAllocator); - - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordDestroyDevice(device, pAllocator, record_obj); - } - - auto instance_interceptor = GetLayerDataPtr(GetDispatchKey(layer_data->physical_device), layer_data_map); - instance_interceptor->debug_report->device_created--; - - for (auto item = layer_data->object_dispatch.begin(); item != layer_data->object_dispatch.end(); item++) { - delete *item; - } - for (auto item = layer_data->aborted_object_dispatch.begin(); item != layer_data->aborted_object_dispatch.end(); item++) { - delete *item; - } - - FreeLayerDataPtr(key, layer_data_map); - } - - // Special-case APIs for which core_validation needs custom parameter lists and/or modifies parameters - - VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, - const VkGraphicsPipelineCreateInfo* pCreateInfos, - const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { - VVL_ZoneScoped; - - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkCreateGraphicsPipelines, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); - - PipelineStates pipeline_states[LayerObjectTypeMaxEnum]; - chassis::CreateGraphicsPipelines chassis_state(pCreateInfos); - - { - VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, - pPipelines, error_obj, pipeline_states[intercept->container_type], chassis_state); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - - RecordObject record_obj(vvl::Func::vkCreateGraphicsPipelines); - { - VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, - pPipelines, record_obj, pipeline_states[intercept->container_type], chassis_state); - } - } - - VkResult result; - { - VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateGraphicsPipelines(device, pipelineCache, createInfoCount, chassis_state.pCreateInfos, pAllocator, pPipelines); - } - record_obj.result = result; - - { - VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, - pPipelines, record_obj, pipeline_states[intercept->container_type], chassis_state); - } - } - return result; - } - - // This API saves some core_validation pipeline state state on the stack for performance purposes - VKAPI_ATTR VkResult VKAPI_CALL CreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, - const VkComputePipelineCreateInfo* pCreateInfos, - const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { - VVL_ZoneScoped; - - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkCreateComputePipelines, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); - - PipelineStates pipeline_states[LayerObjectTypeMaxEnum]; - chassis::CreateComputePipelines chassis_state(pCreateInfos); - - { - VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, - pPipelines, error_obj, pipeline_states[intercept->container_type], chassis_state); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - - RecordObject record_obj(vvl::Func::vkCreateComputePipelines); - { - VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines, record_obj, - pipeline_states[intercept->container_type], chassis_state); - } - } - - VkResult result; - { - VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateComputePipelines(device, pipelineCache, createInfoCount, chassis_state.pCreateInfos, pAllocator, pPipelines); - } - record_obj.result = result; - - { - VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, - pPipelines, record_obj, pipeline_states[intercept->container_type], chassis_state); - } - } - return result; - } - - VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesNV(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, - const VkRayTracingPipelineCreateInfoNV* pCreateInfos, - const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkCreateRayTracingPipelinesNV, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); - - PipelineStates pipeline_states[LayerObjectTypeMaxEnum]; - chassis::CreateRayTracingPipelinesNV chassis_state(pCreateInfos); - - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateCreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, - pPipelines, error_obj, pipeline_states[intercept->container_type], chassis_state); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - - RecordObject record_obj(vvl::Func::vkCreateRayTracingPipelinesNV); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, - pPipelines, record_obj, pipeline_states[intercept->container_type], chassis_state); - } - - VkResult result = - DispatchCreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, chassis_state.pCreateInfos, pAllocator, pPipelines); - record_obj.result = result; - - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateRayTracingPipelinesNV(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, - pPipelines, record_obj, pipeline_states[intercept->container_type], chassis_state); - } - return result; - } - - VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesKHR(VkDevice device, VkDeferredOperationKHR deferredOperation, - VkPipelineCache pipelineCache, uint32_t createInfoCount, - const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, - const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { - VVL_ZoneScoped; - - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkCreateRayTracingPipelinesKHR, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); - - PipelineStates pipeline_states[LayerObjectTypeMaxEnum]; - auto chassis_state = std::make_shared(pCreateInfos); - - { - VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, - pCreateInfos, pAllocator, pPipelines, error_obj, - pipeline_states[intercept->container_type], *chassis_state); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - - RecordObject record_obj(vvl::Func::vkCreateRayTracingPipelinesKHR); - { - VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, - pCreateInfos, pAllocator, pPipelines, record_obj, - pipeline_states[intercept->container_type], *chassis_state); - } - } - - - VkResult result; - { - VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, - chassis_state->pCreateInfos, pAllocator, pPipelines); - } - record_obj.result = result; - - { - VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateRayTracingPipelinesKHR(device, deferredOperation, pipelineCache, createInfoCount, - pCreateInfos, pAllocator, pPipelines, record_obj, - pipeline_states[intercept->container_type], chassis_state); - } - } - return result; - } - - // This API needs the ability to modify a down-chain parameter - VKAPI_ATTR VkResult VKAPI_CALL CreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout) { - VVL_ZoneScoped; - - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkCreatePipelineLayout, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); - - { - VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreatePipelineLayout]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreatePipelineLayout(device, pCreateInfo, pAllocator, pPipelineLayout, error_obj); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - - chassis::CreatePipelineLayout chassis_state{}; - chassis_state.modified_create_info = *pCreateInfo; - - RecordObject record_obj(vvl::Func::vkCreatePipelineLayout); - { - VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreatePipelineLayout(device, pCreateInfo, pAllocator, pPipelineLayout, record_obj, chassis_state); - } - } - - VkResult result; - { - VVL_ZoneScopedN("Dispatch"); - result = DispatchCreatePipelineLayout(device, &chassis_state.modified_create_info, pAllocator, pPipelineLayout); - } - record_obj.result = result; - - { - VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreatePipelineLayout]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreatePipelineLayout(device, pCreateInfo, pAllocator, pPipelineLayout, record_obj); - } - } - return result; - } - - // This API needs some local stack data for performance reasons and also may modify a parameter - VKAPI_ATTR VkResult VKAPI_CALL CreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule) { - VVL_ZoneScoped; - - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkCreateShaderModule, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); - - { - VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule, error_obj); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - - chassis::CreateShaderModule chassis_state{}; - - RecordObject record_obj(vvl::Func::vkCreateShaderModule); - { - VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule, record_obj, chassis_state); - } - } - - // Special extra check if SPIR-V itself fails runtime validation in PreCallRecord - if (chassis_state.skip) return VK_ERROR_VALIDATION_FAILED_EXT; - VkResult result; - { - VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule); - } - record_obj.result = result; - { - VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule, record_obj, chassis_state); - } - } - return result; - } - - VKAPI_ATTR VkResult VKAPI_CALL CreateShadersEXT(VkDevice device, uint32_t createInfoCount, - const VkShaderCreateInfoEXT* pCreateInfos, const VkAllocationCallbacks* pAllocator, - VkShaderEXT* pShaders) { - VVL_ZoneScoped; - - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkCreateShadersEXT, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); - - chassis::ShaderObject chassis_state(createInfoCount, pCreateInfos); - - { - VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateShadersEXT(device, createInfoCount, pCreateInfos, pAllocator, pShaders, error_obj); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - - RecordObject record_obj(vvl::Func::vkCreateShadersEXT); - { - VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateShadersEXT(device, createInfoCount, pCreateInfos, pAllocator, pShaders, record_obj, chassis_state); - } - } - - // Special extra check if SPIR-V itself fails runtime validation in PreCallRecord - if (chassis_state.skip) return VK_ERROR_VALIDATION_FAILED_EXT; - - VkResult result; - { - VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateShadersEXT(device, createInfoCount, chassis_state.pCreateInfos, pAllocator, pShaders); - } - record_obj.result = result; - - { - VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateShadersEXT(device, createInfoCount, pCreateInfos, pAllocator, pShaders, record_obj, - chassis_state); - } - } - return result; - } - - VKAPI_ATTR VkResult VKAPI_CALL AllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, - VkDescriptorSet* pDescriptorSets) { - VVL_ZoneScoped; - - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkAllocateDescriptorSets, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); - - vvl::AllocateDescriptorSetsData ads_state[LayerObjectTypeMaxEnum]; - - { - VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->object_dispatch) { - ads_state[intercept->container_type].Init(pAllocateInfo->descriptorSetCount); - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateAllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets, error_obj, - ads_state[intercept->container_type]); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - - RecordObject record_obj(vvl::Func::vkAllocateDescriptorSets); - { - VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordAllocateDescriptorSets]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordAllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets, record_obj); - } - } - - VkResult result; - { - VVL_ZoneScopedN("Dispatch"); - result = DispatchAllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets); - } - record_obj.result = result; - - { - VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordAllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets, record_obj, - ads_state[intercept->container_type]); - } - } - return result; - } - - // This API needs the ability to modify a down-chain parameter - VKAPI_ATTR VkResult VKAPI_CALL CreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, - const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer) { - VVL_ZoneScoped; - - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkCreateBuffer, VulkanTypedHandle(device, kVulkanObjectTypeDevice)); - - { - VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateCreateBuffer]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateCreateBuffer(device, pCreateInfo, pAllocator, pBuffer, error_obj); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - - chassis::CreateBuffer chassis_state{}; - chassis_state.modified_create_info = *pCreateInfo; - - RecordObject record_obj(vvl::Func::vkCreateBuffer); - { - VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordCreateBuffer(device, pCreateInfo, pAllocator, pBuffer, record_obj, chassis_state); - } - } - - VkResult result; - { - VVL_ZoneScopedN("Dispatch"); - result = DispatchCreateBuffer(device, &chassis_state.modified_create_info, pAllocator, pBuffer); - } - record_obj.result = result; - - { - VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordCreateBuffer]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordCreateBuffer(device, pCreateInfo, pAllocator, pBuffer, record_obj); - } - } - return result; - } - - // This API needs to ensure that per-swapchain VkResult results are available - VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR(VkQueue queue, const VkPresentInfoKHR* pPresentInfo) { - VVL_ZoneScoped; - - auto layer_data = GetLayerDataPtr(GetDispatchKey(queue), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkQueuePresentKHR, VulkanTypedHandle(queue, kVulkanObjectTypeQueue)); - { - VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateQueuePresentKHR]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateQueuePresentKHR(queue, pPresentInfo, error_obj); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - RecordObject record_obj(vvl::Func::vkQueuePresentKHR); - { - VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordQueuePresentKHR]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordQueuePresentKHR(queue, pPresentInfo, record_obj); - } - } - - // Track per-swapchain results when there is more than one swapchain and VkPresentInfoKHR::pResults is null - small_vector present_results; - VkPresentInfoKHR modified_present_info; - if (pPresentInfo && pPresentInfo->swapchainCount > 1 && pPresentInfo->pResults == nullptr) { - present_results.resize(pPresentInfo->swapchainCount); - modified_present_info = *pPresentInfo; - modified_present_info.pResults = present_results.data(); - pPresentInfo = &modified_present_info; - } - - VkResult result; - { - VVL_ZoneScopedN("Dispatch"); - result = DispatchQueuePresentKHR(queue, pPresentInfo); - } - VVL_TracyCFrameMark; - record_obj.result = result; - { - VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordQueuePresentKHR]) { - auto lock = intercept->WriteLock(); - - if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; - } - intercept->PostCallRecordQueuePresentKHR(queue, pPresentInfo, record_obj); - } - } - return result; - } - - VKAPI_ATTR VkResult VKAPI_CALL BeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo) { - VVL_ZoneScoped; - - auto layer_data = GetLayerDataPtr(GetDispatchKey(commandBuffer), layer_data_map); - bool skip = false; - chassis::HandleData handle_data; - { - auto lock = ReadLockGuard(secondary_cb_map_mutex); - handle_data.command_buffer.is_secondary = (secondary_cb_map.find(commandBuffer) != secondary_cb_map.end()); - } - - ErrorObject error_obj(vvl::Func::vkBeginCommandBuffer, VulkanTypedHandle(commandBuffer, kVulkanObjectTypeCommandBuffer), - &handle_data); - { - VVL_ZoneScopedN("PreCallValidate"); - for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidateBeginCommandBuffer]) { - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidateBeginCommandBuffer(commandBuffer, pBeginInfo, error_obj); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - } - - RecordObject record_obj(vvl::Func::vkBeginCommandBuffer, &handle_data); - { - VVL_ZoneScopedN("PreCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecordBeginCommandBuffer]) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordBeginCommandBuffer(commandBuffer, pBeginInfo, record_obj); - } - } - - VkResult result; - { - VVL_ZoneScopedN("Dispatch"); - result = DispatchBeginCommandBuffer(commandBuffer, pBeginInfo, handle_data.command_buffer.is_secondary); - } - record_obj.result = result; - - { - VVL_ZoneScopedN("PostCallRecord"); - for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecordBeginCommandBuffer]) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordBeginCommandBuffer(commandBuffer, pBeginInfo, record_obj); - } - } - return result; - } - - // Handle tooling queries manually as this is a request for layer information - static const VkPhysicalDeviceToolPropertiesEXT khronos_layer_tool_props = { - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TOOL_PROPERTIES_EXT, - nullptr, - "Khronos Validation Layer", - STRINGIFY(VK_HEADER_VERSION), - VK_TOOL_PURPOSE_VALIDATION_BIT_EXT | VK_TOOL_PURPOSE_ADDITIONAL_FEATURES_BIT_EXT | VK_TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT | VK_TOOL_PURPOSE_DEBUG_MARKERS_BIT_EXT, - "Khronos Validation Layer", - OBJECT_LAYER_NAME - }; - - VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceToolPropertiesEXT(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, - VkPhysicalDeviceToolPropertiesEXT* pToolProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceToolPropertiesEXT, - VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); - - auto original_pToolProperties = pToolProperties; - - if (pToolProperties != nullptr && *pToolCount > 0) { - *pToolProperties = khronos_layer_tool_props; - pToolProperties = ((*pToolCount > 1) ? &pToolProperties[1] : nullptr); - (*pToolCount)--; - } - - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateGetPhysicalDeviceToolPropertiesEXT(physicalDevice, pToolCount, pToolProperties, error_obj); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - - RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceToolPropertiesEXT); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceToolPropertiesEXT(physicalDevice, pToolCount, pToolProperties, record_obj); - } - - VkResult result = DispatchGetPhysicalDeviceToolPropertiesEXT(physicalDevice, pToolCount, pToolProperties); - record_obj.result = result; - - if (original_pToolProperties != nullptr) { - pToolProperties = original_pToolProperties; - } - assert(*pToolCount != std::numeric_limits::max()); - (*pToolCount)++; - - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceToolPropertiesEXT(physicalDevice, pToolCount, pToolProperties, record_obj); - } - return result; - } - - VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceToolProperties(VkPhysicalDevice physicalDevice, uint32_t* pToolCount, - VkPhysicalDeviceToolProperties* pToolProperties) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); - bool skip = false; - ErrorObject error_obj(vvl::Func::vkGetPhysicalDeviceToolProperties, - VulkanTypedHandle(physicalDevice, kVulkanObjectTypePhysicalDevice)); - - auto original_pToolProperties = pToolProperties; - - if (pToolProperties != nullptr && *pToolCount > 0) { - *pToolProperties = khronos_layer_tool_props; - pToolProperties = ((*pToolCount > 1) ? &pToolProperties[1] : nullptr); - (*pToolCount)--; - } - - for (const ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->ReadLock(); - skip |= - intercept->PreCallValidateGetPhysicalDeviceToolProperties(physicalDevice, pToolCount, pToolProperties, error_obj); - if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; - } - - RecordObject record_obj(vvl::Func::vkGetPhysicalDeviceToolProperties); - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PreCallRecordGetPhysicalDeviceToolProperties(physicalDevice, pToolCount, pToolProperties, record_obj); - } - - VkResult result = DispatchGetPhysicalDeviceToolProperties(physicalDevice, pToolCount, pToolProperties); - record_obj.result = result; - - if (original_pToolProperties != nullptr) { - pToolProperties = original_pToolProperties; - } - assert(*pToolCount != std::numeric_limits::max()); - (*pToolCount)++; - - for (ValidationObject* intercept : layer_data->object_dispatch) { - auto lock = intercept->WriteLock(); - intercept->PostCallRecordGetPhysicalDeviceToolProperties(physicalDevice, pToolCount, pToolProperties, record_obj); - } - return result; - } - - // ValidationCache APIs do not dispatch - - VKAPI_ATTR VkResult VKAPI_CALL CreateValidationCacheEXT(VkDevice device, const VkValidationCacheCreateInfoEXT* pCreateInfo, - const VkAllocationCallbacks* pAllocator, - VkValidationCacheEXT* pValidationCache) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (auto core_checks = layer_data->GetValidationObject()) { - auto lock = core_checks->WriteLock(); - return core_checks->CoreLayerCreateValidationCacheEXT(device, pCreateInfo, pAllocator, pValidationCache); - } - return VK_SUCCESS; - } - - VKAPI_ATTR void VKAPI_CALL DestroyValidationCacheEXT(VkDevice device, VkValidationCacheEXT validationCache, - const VkAllocationCallbacks* pAllocator) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (auto core_checks = layer_data->GetValidationObject()) { - auto lock = core_checks->WriteLock(); - core_checks->CoreLayerDestroyValidationCacheEXT(device, validationCache, pAllocator); - } - } - - VKAPI_ATTR VkResult VKAPI_CALL MergeValidationCachesEXT(VkDevice device, VkValidationCacheEXT dstCache, uint32_t srcCacheCount, - const VkValidationCacheEXT* pSrcCaches) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (auto core_checks = layer_data->GetValidationObject()) { - auto lock = core_checks->WriteLock(); - return core_checks->CoreLayerMergeValidationCachesEXT(device, dstCache, srcCacheCount, pSrcCaches); - } - return VK_SUCCESS; - } +static const VkLayerProperties global_layer = { + OBJECT_LAYER_NAME, + VK_LAYER_API_VERSION, + 1, + "LunarG validation Layer", +}; - VKAPI_ATTR VkResult VKAPI_CALL GetValidationCacheDataEXT(VkDevice device, VkValidationCacheEXT validationCache, size_t* pDataSize, - void* pData) { - auto layer_data = GetLayerDataPtr(GetDispatchKey(device), layer_data_map); - if (auto core_checks = layer_data->GetValidationObject()) { - auto lock = core_checks->WriteLock(); - return core_checks->CoreLayerGetValidationCacheDataEXT(device, validationCache, pDataSize, pData); - } - return VK_SUCCESS; - } +// These functions reference generated data so they cannot be part of chassis_main.cpp +VKAPI_ATTR VkResult VKAPI_CALL EnumerateInstanceLayerProperties(uint32_t* pCount, VkLayerProperties* pProperties) { + return util_GetLayerProperties(1, &global_layer, pCount, pProperties); +} + +VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pCount, + VkLayerProperties* pProperties) { + return util_GetLayerProperties(1, &global_layer, pCount, pProperties); +} + +VKAPI_ATTR VkResult VKAPI_CALL EnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pCount, + VkExtensionProperties* pProperties) { + if (pLayerName && !strcmp(pLayerName, global_layer.layerName)) { + return util_GetExtensionProperties(static_cast(kInstanceExtensions.size()), kInstanceExtensions.data(), pCount, + pProperties); + } + + return VK_ERROR_LAYER_NOT_PRESENT; +} + +VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, + uint32_t* pCount, VkExtensionProperties* pProperties) { + if (pLayerName && !strcmp(pLayerName, global_layer.layerName)) { + return util_GetExtensionProperties(static_cast(kDeviceExtensions.size()), kDeviceExtensions.data(), pCount, + pProperties); + } + + assert(physicalDevice); + auto layer_data = GetLayerDataPtr(GetDispatchKey(physicalDevice), layer_data_map); + return layer_data->instance_dispatch_table.EnumerateDeviceExtensionProperties(physicalDevice, pLayerName, pCount, pProperties); +} ''') - guard_helper = PlatformGuardHelper() for command in [x for x in self.vk.commands.values() if x.name not in self.ignore_functions and x.name not in self.manual_functions]: out.extend(guard_helper.add_guard(command.protect)) @@ -2217,9 +303,10 @@ def generateSource(self): paramsList = ', '.join([param.name for param in command.params]) + dispatch = 'device_dispatch' if not command.instance else 'instance_dispatch' # Setup common to call wrappers. First parameter is always dispatchable out.append('VVL_ZoneScoped;\n\n') - out.append(f'auto layer_data = GetLayerDataPtr(GetDispatchKey({command.params[0].name}), layer_data_map);\n') + out.append(f'auto {dispatch} = GetLayerDataPtr(GetDispatchKey({command.params[0].name}), layer_data_map);\n') # Declare result variable, if any. return_map = { @@ -2243,12 +330,12 @@ def generateSource(self): VVL_ZoneScopedN("PreCallValidate"); ''') if not command.instance: - out.append(f' for (const ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallValidate{command.name[2:]}]) {{\n') + out.append(f' for (const auto* vo : {dispatch}->intercept_vectors[InterceptIdPreCallValidate{command.name[2:]}]) {{\n') else: - out.append(' for (const ValidationObject* intercept : layer_data->object_dispatch) {\n') + out.append(f' for (const auto* vo : {dispatch}->object_dispatch) {{\n') out.append(f''' - auto lock = intercept->ReadLock(); - skip |= intercept->PreCallValidate{command.name[2:]}({paramsList}, error_obj); + auto lock = vo->ReadLock(); + skip |= vo->PreCallValidate{command.name[2:]}({paramsList}, error_obj); if (skip) {return_map[command.returnType]} }}\n''') out.append('}\n') @@ -2259,21 +346,21 @@ def generateSource(self): VVL_ZoneScopedN("PreCallRecord"); ''') if not command.instance: - out.append(f' for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPreCallRecord{command.name[2:]}]) {{\n') + out.append(f' for (auto* vo : {dispatch}->intercept_vectors[InterceptIdPreCallRecord{command.name[2:]}]) {{\n') else: - out.append(' for (ValidationObject* intercept : layer_data->object_dispatch) {\n') + out.append(f' for (auto* vo : {dispatch}->object_dispatch) {{\n') out.append(f''' - auto lock = intercept->WriteLock(); - intercept->PreCallRecord{command.name[2:]}({paramsList}, record_obj); + auto lock = vo->WriteLock(); + vo->PreCallRecord{command.name[2:]}({paramsList}, record_obj); }}\n''') out.append('}\n') # Insert pre-dispatch debug utils function call pre_dispatch_debug_utils_functions = { - 'vkDebugMarkerSetObjectNameEXT' : 'layer_data->debug_report->SetMarkerObjectName(pNameInfo);', - 'vkSetDebugUtilsObjectNameEXT' : 'layer_data->debug_report->SetUtilsObjectName(pNameInfo);', - 'vkQueueBeginDebugUtilsLabelEXT' : 'layer_data->debug_report->BeginQueueDebugUtilsLabel(queue, pLabelInfo);', - 'vkQueueInsertDebugUtilsLabelEXT' : 'layer_data->debug_report->InsertQueueDebugUtilsLabel(queue, pLabelInfo);', + 'vkDebugMarkerSetObjectNameEXT' : f'{dispatch}->debug_report->SetMarkerObjectName(pNameInfo);', + 'vkSetDebugUtilsObjectNameEXT' : f'{dispatch}->debug_report->SetUtilsObjectName(pNameInfo);', + 'vkQueueBeginDebugUtilsLabelEXT' : f'{dispatch}->debug_report->BeginQueueDebugUtilsLabel(queue, pLabelInfo);', + 'vkQueueInsertDebugUtilsLabelEXT' : f'{dispatch}->debug_report->InsertQueueDebugUtilsLabel(queue, pLabelInfo);', } if command.name in pre_dispatch_debug_utils_functions: out.append(f' {pre_dispatch_debug_utils_functions[command.name]}\n') @@ -2285,7 +372,8 @@ def generateSource(self): VVL_ZoneScopedN("Dispatch"); ''') assignResult = f'result = ' if (command.returnType != 'void') else '' - out.append(f' {assignResult}{command.name.replace("vk", "Dispatch")}({paramsList});\n') + method_name = command.name.replace('vk', f'{dispatch}->') + out.append(f' {assignResult}{method_name}({paramsList});\n') out.append('}\n') @@ -2294,11 +382,11 @@ def generateSource(self): # Insert post-dispatch debug utils function call post_dispatch_debug_utils_functions = { - 'vkQueueEndDebugUtilsLabelEXT' : 'layer_data->debug_report->EndQueueDebugUtilsLabel(queue);', - 'vkCreateDebugReportCallbackEXT' : 'LayerCreateReportCallback(layer_data->debug_report, false, pCreateInfo, pCallback);', - 'vkDestroyDebugReportCallbackEXT' : 'LayerDestroyCallback(layer_data->debug_report, callback);', - 'vkCreateDebugUtilsMessengerEXT' : 'LayerCreateMessengerCallback(layer_data->debug_report, false, pCreateInfo, pMessenger);', - 'vkDestroyDebugUtilsMessengerEXT' : 'LayerDestroyCallback(layer_data->debug_report, messenger);', + 'vkQueueEndDebugUtilsLabelEXT' : f'{dispatch}->debug_report->EndQueueDebugUtilsLabel(queue);', + 'vkCreateDebugReportCallbackEXT' : f'LayerCreateReportCallback({dispatch}->debug_report, false, pCreateInfo, pCallback);', + 'vkDestroyDebugReportCallbackEXT' : f'LayerDestroyCallback({dispatch}->debug_report, callback);', + 'vkCreateDebugUtilsMessengerEXT' : f'LayerCreateMessengerCallback({dispatch}->debug_report, false, pCreateInfo, pMessenger);', + 'vkDestroyDebugUtilsMessengerEXT' : f'LayerDestroyCallback({dispatch}->debug_report, messenger);', } if command.name in post_dispatch_debug_utils_functions: out.append(f' {post_dispatch_debug_utils_functions[command.name]}\n') @@ -2314,9 +402,9 @@ def generateSource(self): ''') if not command.instance: - out.append(f'for (ValidationObject* intercept : layer_data->intercept_vectors[InterceptIdPostCallRecord{command.name[2:]}]) {{\n') + out.append(f'for (auto* vo : {dispatch}->intercept_vectors[InterceptIdPostCallRecord{command.name[2:]}]) {{\n') else: - out.append('for (ValidationObject* intercept : layer_data->object_dispatch) {\n') + out.append(f'for (auto* vo : {dispatch}->object_dispatch) {{\n') # These commands perform blocking operations during PostRecord phase. We might need to # release ValidationObject's lock for the period of blocking operation to avoid deadlocks. @@ -2333,55 +421,22 @@ def generateSource(self): ] if command.name not in commands_with_blocking_operations: - out.append('auto lock = intercept->WriteLock();\n') + out.append('auto lock = vo->WriteLock();\n') else: - out.append('ValidationObject::BlockingOperationGuard lock(intercept);\n') + out.append('ValidationObject::BlockingOperationGuard lock(vo);\n') # Because each intercept is a copy of ValidationObject, we need to update it for each if command.errorCodes and 'VK_ERROR_DEVICE_LOST' in command.errorCodes: out.append(''' if (result == VK_ERROR_DEVICE_LOST) { - intercept->is_device_lost = true; + vo->is_device_lost = true; } ''') - out.append(f'intercept->PostCallRecord{command.name[2:]}({paramsList}, record_obj);\n') + out.append(f'vo->PostCallRecord{command.name[2:]}({paramsList}, record_obj);\n') out.append(' }\n') out.append('}\n') - # Special state tracking logic to do as a chassis level PostCallRecord call - if command.name == 'vkAllocateCommandBuffers': - out.append(''' - if ((result == VK_SUCCESS) && pAllocateInfo && (pAllocateInfo->level == VK_COMMAND_BUFFER_LEVEL_SECONDARY)) { - auto lock = WriteLockGuard(secondary_cb_map_mutex); - for (uint32_t cb_index = 0; cb_index < pAllocateInfo->commandBufferCount; cb_index++) { - secondary_cb_map.emplace(pCommandBuffers[cb_index], pAllocateInfo->commandPool); - } - } - ''') - elif command.name == 'vkFreeCommandBuffers': - out.append(''' - { - auto lock = WriteLockGuard(secondary_cb_map_mutex); - for (uint32_t cb_index = 0; cb_index < commandBufferCount; cb_index++) { - secondary_cb_map.erase(pCommandBuffers[cb_index]); - } - } - ''') - elif command.name == 'vkDestroyCommandPool': - out.append(''' - { - auto lock = WriteLockGuard(secondary_cb_map_mutex); - for (auto item = secondary_cb_map.begin(); item != secondary_cb_map.end();) { - if (item->second == commandPool) { - item = secondary_cb_map.erase(item); - } else { - ++item; - } - } - } - ''') - # Return result variable, if any. if command.returnType != 'void': out.append(' return result;\n') @@ -2395,7 +450,6 @@ def generateSource(self): #ifdef _MSC_VER #pragma warning( suppress: 6262 ) // VS analysis: this uses more than 16 kiB, which is fine here at global scope #endif -// clang-format off const vvl::unordered_map &GetNameToFuncPtrMap() { static const vvl::unordered_map name_to_func_ptr_map = { @@ -2409,7 +463,6 @@ def generateSource(self): out.append(' return name_to_func_ptr_map;\n') out.append('}\n') out.append('} // namespace vulkan_layer_chassis\n') - out.append('// clang-format on\n') out.append(''' VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_layerGetPhysicalDeviceProcAddr(VkInstance instance, const char *funcName) { @@ -2474,71 +527,3 @@ def generateSource(self): ''') self.write("".join(out)) - def generateHelper(self): - # will skip all 3 functions - skip_intercept_id_functions = [ - 'vkGetDeviceProcAddr', - 'vkDestroyDevice', - 'vkCreateValidationCacheEXT', - 'vkDestroyValidationCacheEXT', - 'vkMergeValidationCachesEXT', - 'vkGetValidationCacheDataEXT', - # have all 3 calls have dual signatures being used - 'vkCreateShaderModule', - 'vkCreateShadersEXT', - 'vkCreateGraphicsPipelines', - 'vkCreateComputePipelines', - 'vkCreateRayTracingPipelinesNV', - 'vkCreateRayTracingPipelinesKHR', - ] - - # We need to skip any signatures that pass around chassis_modification_state structs - # and therefore can't easily create the intercept id - skip_intercept_id_pre_validate = [ - 'vkAllocateDescriptorSets' - ] - skip_intercept_id_pre_record = [ - 'vkCreatePipelineLayout', - 'vkCreateBuffer', - ] - skip_intercept_id_post_record = [ - 'vkAllocateDescriptorSets' - ] - - out = [] - out.append(''' - #pragma once - - // This source code creates dispatch vectors for each chassis api intercept, - // i.e., PreCallValidateFoo, PreCallRecordFoo, PostCallRecordFoo, etc., ensuring that - // each vector contains only the validation objects that override that particular base - // class virtual function. Preventing non-overridden calls from reaching the default - // functions saved about 5% in multithreaded applications. - - ''') - - out.append('typedef enum InterceptId{\n') - for command in [x for x in self.vk.commands.values() if not x.instance and x.name not in skip_intercept_id_functions]: - if command.name not in skip_intercept_id_pre_validate: - out.append(f' InterceptIdPreCallValidate{command.name[2:]},\n') - if command.name not in skip_intercept_id_pre_record: - out.append(f' InterceptIdPreCallRecord{command.name[2:]},\n') - if command.name not in skip_intercept_id_post_record: - out.append(f' InterceptIdPostCallRecord{command.name[2:]},\n') - out.append(' InterceptIdCount,\n') - out.append('} InterceptId;\n') - - out.append(APISpecific.genInitObjectDispatchVectorSource(self.targetApiName)) - - guard_helper = PlatformGuardHelper() - for command in [x for x in self.vk.commands.values() if not x.instance and x.name not in skip_intercept_id_functions]: - out.extend(guard_helper.add_guard(command.protect)) - if command.name not in skip_intercept_id_pre_validate: - out.append(f' BUILD_DISPATCH_VECTOR(PreCallValidate{command.name[2:]});\n') - if command.name not in skip_intercept_id_pre_record: - out.append(f' BUILD_DISPATCH_VECTOR(PreCallRecord{command.name[2:]});\n') - if command.name not in skip_intercept_id_post_record: - out.append(f' BUILD_DISPATCH_VECTOR(PostCallRecord{command.name[2:]});\n') - out.extend(guard_helper.add_guard(None)) - out.append('}\n') - self.write("".join(out)) diff --git a/scripts/generators/object_tracker_generator.py b/scripts/generators/object_tracker_generator.py index b5d20c9bd3a..b3285d74167 100644 --- a/scripts/generators/object_tracker_generator.py +++ b/scripts/generators/object_tracker_generator.py @@ -358,7 +358,6 @@ def generateSource(self): out = [] out.append('// clang-format off') out.append(''' -#include "chassis.h" #include "object_tracker/object_lifetime_validation.h" ReadLockGuard ObjectLifetimes::ReadLock() const { return ReadLockGuard(validation_object_mutex, std::defer_lock); } WriteLockGuard ObjectLifetimes::WriteLock() { return WriteLockGuard(validation_object_mutex, std::defer_lock); } @@ -943,7 +942,7 @@ def validateObjects(self, members: list[Member], prefix: str, arrayIndex: int, p if self.vk.commands[topCommand].device and self.vk.handles[member.type].instance: # Use case when for device-level API call we should use instance-level validation object pre_call_validate += 'auto instance_data = GetLayerDataPtr(GetDispatchKey(instance), layer_data_map);\n' - pre_call_validate += 'auto instance_object_lifetimes = instance_data->GetValidationObject();\n' + pre_call_validate += 'auto instance_object_lifetimes = static_cast(instance_data->GetValidationObject(LayerObjectTypeObjectTracker));\n' pre_call_validate += f'skip |= instance_object_lifetimes->ValidateObject({prefix}{member.name}, kVulkanObjectType{member.type[2:]}, {nullAllowed}, {param_vuid}, {parent_vuid}, {location}{parent_object_type});\n' else: pre_call_validate += f'skip |= ValidateObject({prefix}{member.name}, kVulkanObjectType{member.type[2:]}, {nullAllowed}, {param_vuid}, {parent_vuid}, {location}{parent_object_type});\n' diff --git a/scripts/generators/stateless_validation_helper_generator.py b/scripts/generators/stateless_validation_helper_generator.py index bf9a9a757ea..0ebb62e4925 100644 --- a/scripts/generators/stateless_validation_helper_generator.py +++ b/scripts/generators/stateless_validation_helper_generator.py @@ -415,11 +415,9 @@ def generateSource(self): out = [] out.append(''' - #include "chassis.h" - #include "stateless/stateless_validation.h" #include "generated/enum_flag_bits.h" - #include "generated/layer_chassis_dispatch.h" + #include "generated/dispatch_functions.h" ''') # The reason we split this up into Feature and Properties struct is before be had a 450 case, 10k line function that broke MSVC diff --git a/scripts/generators/thread_safety_generator.py b/scripts/generators/thread_safety_generator.py index c8d4cb751dd..d1b627a1359 100644 --- a/scripts/generators/thread_safety_generator.py +++ b/scripts/generators/thread_safety_generator.py @@ -256,7 +256,6 @@ def makeThreadUseBlock(self, command: Command, start: bool = False, finish: bool def generateSource(self): out = [] out.append(''' - #include "chassis.h" #include "thread_tracker/thread_safety_validation.h" ''') guard_helper = PlatformGuardHelper() diff --git a/tests/layers/device_profile_api.cpp b/tests/layers/device_profile_api.cpp index 053858e0bbd..e5fc8893030 100644 --- a/tests/layers/device_profile_api.cpp +++ b/tests/layers/device_profile_api.cpp @@ -50,6 +50,32 @@ struct layer_data { static std::unordered_map device_profile_api_dev_data_map; +// For the given data key, look up the layer_data instance from given layer_data_map +template +DATA_T *GetLayerDataPtr(void *data_key, std::unordered_map &layer_data_map) { + DATA_T *debug_data; + /* TODO: We probably should lock here, or have caller lock */ + auto got = layer_data_map.find(data_key); + + if (got == layer_data_map.end()) { + debug_data = new DATA_T; + layer_data_map[(void *)data_key] = debug_data; + } else { + debug_data = got->second; + } + + return debug_data; +} + +template +void FreeLayerDataPtr(void *data_key, std::unordered_map &layer_data_map) { + auto got = layer_data_map.find(data_key); + assert(got != layer_data_map.end()); + + delete got->second; + layer_data_map.erase(got); +} + // device_profile_api Layer EXT APIs typedef void(VKAPI_PTR *PFN_vkGetOriginalPhysicalDeviceLimitsEXT)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceLimits *limits);