From d6251dd66fbc2bb356d6aef4bf954a3b0c97483d Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 15 Aug 2014 15:01:10 +0100 Subject: [PATCH] Don't rely on WrapperMap when iterating current resources --- renderdoc/core/resource_manager.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/renderdoc/core/resource_manager.h b/renderdoc/core/resource_manager.h index 1b89b5216..ca97547bf 100644 --- a/renderdoc/core/resource_manager.h +++ b/renderdoc/core/resource_manager.h @@ -808,16 +808,12 @@ void ResourceManager::PrepareInitialContents() Prepare_InitialState(res); } - // need to save the structure count for unordered access views - - for(auto it=m_WrapperMap.begin(); it != m_WrapperMap.end(); ++it) + for(auto it=m_CurrentResourceMap.begin(); it != m_CurrentResourceMap.end(); ++it) { if(it->second == (ResourceType)RecordType::NullResource) continue; if(Force_InitialState(it->second)) { - RDCDEBUG("UAV %llu - %p", GetID(it->second), it->second); - Prepare_InitialState(it->second); } } @@ -861,16 +857,12 @@ void ResourceManager::InsertInitialContentsChunks(Seri fileSerialiser->Insert(scope.Get(true)); } - // need to save the structure count for unordered access views - - for(auto it=m_WrapperMap.begin(); it != m_WrapperMap.end(); ++it) + for(auto it=m_CurrentResourceMap.begin(); it != m_CurrentResourceMap.end(); ++it) { if(it->second == (ResourceType)RecordType::NullResource) continue; if(Force_InitialState(it->second)) { - RDCDEBUG("Referenced UAV %llu - %p", GetID(it->second), it->second); - ScopedContext scope(chunkSerialiser, NULL, "Initial Contents", "Initial Contents", INITIAL_CONTENTS, false); Serialise_InitialState(it->second);