From 9cfb2acdfa96d2065fd5fd3be02b1d372b5c7d7f Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 16 Jan 2025 12:31:03 +0000 Subject: [PATCH] Strip any skipped resources (with no initial content data) on vulkan --- renderdoc/driver/vulkan/vk_manager.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/renderdoc/driver/vulkan/vk_manager.cpp b/renderdoc/driver/vulkan/vk_manager.cpp index 4d57e82078..ab6a6bdb32 100644 --- a/renderdoc/driver/vulkan/vk_manager.cpp +++ b/renderdoc/driver/vulkan/vk_manager.cpp @@ -1063,6 +1063,14 @@ rdcarray VulkanResourceManager::InitialContentResources() return aData.type < bData.type; }); + + // remove any initial contents we don't want to serialise. This can happen if a resource is + // postponed, then not prepared, so we don't want to fail. + resources.removeIf([this](ResourceId a) { + const InitialContentData &aData = m_InitialContents[a].data; + return aData.type == eResUnknown; + }); + return resources; }