diff --git a/framework/generated/generated_vulkan_api_call_encoders.cpp b/framework/generated/generated_vulkan_api_call_encoders.cpp index f0b5e9ec71..191951d854 100644 --- a/framework/generated/generated_vulkan_api_call_encoders.cpp +++ b/framework/generated/generated_vulkan_api_call_encoders.cpp @@ -8601,7 +8601,17 @@ VKAPI_ATTR VkResult VKAPI_CALL QueuePresentKHR( { VulkanCaptureManager* manager = VulkanCaptureManager::Get(); GFXRECON_ASSERT(manager != nullptr); - auto api_call_lock = VulkanCaptureManager::AcquireExclusiveApiCallLock(); + auto force_command_serialization = manager->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = VulkanCaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = VulkanCaptureManager::AcquireSharedApiCallLock(); + } CustomEncoderPreCall::Dispatch(manager, queue, pPresentInfo); diff --git a/framework/generated/vulkan_generators/vulkan_api_call_encoders_body_generator.py b/framework/generated/vulkan_generators/vulkan_api_call_encoders_body_generator.py index 7d006837b9..2ab6e91611 100644 --- a/framework/generated/vulkan_generators/vulkan_api_call_encoders_body_generator.py +++ b/framework/generated/vulkan_generators/vulkan_api_call_encoders_body_generator.py @@ -237,7 +237,7 @@ def make_cmd_body(self, return_type, name, values): if name != "vkCreateInstance": body += indent + 'VulkanCaptureManager* manager = VulkanCaptureManager::Get();\n' body += indent + 'GFXRECON_ASSERT(manager != nullptr);\n' - if name == "vkCreateInstance" or name == "vkQueuePresentKHR": + if name == "vkCreateInstance": body += indent + 'auto api_call_lock = VulkanCaptureManager::AcquireExclusiveApiCallLock();\n' else: body += indent + 'auto force_command_serialization = manager->GetForceCommandSerialization();\n'