From fb333ebc9b1bc3ed0e7616b09b737ba4849d9649 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 9 May 2019 12:13:56 +0100 Subject: [PATCH] Remove 'using std::map' * This will make it easier to replace std::map in future --- renderdoc/core/core.cpp | 8 ++-- renderdoc/core/core.h | 15 ++++---- renderdoc/core/replay_proxy.h | 6 +-- renderdoc/core/resource_manager.h | 23 ++++++----- renderdoc/driver/d3d11/d3d11_context.h | 11 +++--- renderdoc/driver/d3d11/d3d11_debug.h | 1 - renderdoc/driver/d3d11/d3d11_device.h | 8 ++-- renderdoc/driver/d3d11/d3d11_manager.h | 2 +- renderdoc/driver/d3d11/d3d11_postvs.cpp | 2 +- renderdoc/driver/d3d11/d3d11_resources.cpp | 10 ++--- renderdoc/driver/d3d11/d3d11_resources.h | 6 +-- renderdoc/driver/d3d12/d3d12_commands.h | 6 +-- renderdoc/driver/d3d12/d3d12_device.cpp | 2 +- renderdoc/driver/d3d12/d3d12_device.h | 17 +++++---- renderdoc/driver/d3d12/d3d12_manager.cpp | 14 +++---- renderdoc/driver/d3d12/d3d12_manager.h | 4 +- renderdoc/driver/d3d12/d3d12_overlay.cpp | 2 +- renderdoc/driver/d3d12/d3d12_postvs.cpp | 2 +- renderdoc/driver/d3d12/d3d12_resources.h | 2 +- renderdoc/driver/d3d8/d3d8_resources.cpp | 4 +- renderdoc/driver/d3d8/d3d8_resources.h | 2 +- renderdoc/driver/gl/gl_common.h | 2 +- renderdoc/driver/gl/gl_driver.cpp | 2 +- renderdoc/driver/gl/gl_driver.h | 10 ++--- renderdoc/driver/gl/gl_manager.h | 10 ++--- renderdoc/driver/gl/gl_postvs.cpp | 2 +- renderdoc/driver/gl/gl_program_iterate.cpp | 8 ++-- renderdoc/driver/gl/gl_replay.h | 7 ++-- .../driver/shaders/dxbc/dxbc_inspect.cpp | 2 +- renderdoc/driver/shaders/dxbc/dxbc_inspect.h | 5 +-- renderdoc/driver/shaders/dxbc/dxbc_sdbg.h | 1 - renderdoc/driver/shaders/dxbc/dxbc_spdb.cpp | 6 +-- renderdoc/driver/shaders/dxbc/dxbc_spdb.h | 1 - renderdoc/driver/vulkan/vk_core.h | 10 ++--- renderdoc/driver/vulkan/vk_info.h | 38 +++++++++---------- renderdoc/driver/vulkan/vk_manager.cpp | 4 +- renderdoc/driver/vulkan/vk_manager.h | 4 +- renderdoc/driver/vulkan/vk_overlay.cpp | 4 +- renderdoc/driver/vulkan/vk_postvs.cpp | 2 +- renderdoc/driver/vulkan/vk_replay.h | 3 +- renderdoc/driver/vulkan/vk_resources.h | 4 +- .../driver/vulkan/vk_sparse_initstate.cpp | 4 +- renderdoc/os/os_specific.h | 1 - renderdoc/os/posix/posix_process.cpp | 8 ++-- renderdoc/os/win32/win32_hook.cpp | 5 +-- 45 files changed, 140 insertions(+), 150 deletions(-) diff --git a/renderdoc/core/core.cpp b/renderdoc/core/core.cpp index 0d8cfd788..f5418aee8 100644 --- a/renderdoc/core/core.cpp +++ b/renderdoc/core/core.cpp @@ -1222,17 +1222,17 @@ std::map RenderDoc::GetActiveDrivers() return ret; } -map RenderDoc::GetReplayDrivers() +std::map RenderDoc::GetReplayDrivers() { - map ret; + std::map ret; for(auto it = m_ReplayDriverProviders.begin(); it != m_ReplayDriverProviders.end(); ++it) ret[it->first] = ToStr(it->first); return ret; } -map RenderDoc::GetRemoteDrivers() +std::map RenderDoc::GetRemoteDrivers() { - map ret; + std::map ret; for(auto it = m_RemoteDriverProviders.begin(); it != m_RemoteDriverProviders.end(); ++it) ret[it->first] = ToStr(it->first); diff --git a/renderdoc/core/core.h b/renderdoc/core/core.h index efac20fd6..af6612592 100644 --- a/renderdoc/core/core.h +++ b/renderdoc/core/core.h @@ -40,7 +40,6 @@ using std::string; using std::vector; -using std::map; using std::pair; using std::set; @@ -508,8 +507,8 @@ public: bool HasReplaySupport(RDCDriver driverType); - map GetReplayDrivers(); - map GetRemoteDrivers(); + std::map GetReplayDrivers(); + std::map GetRemoteDrivers(); bool HasReplayDriver(RDCDriver driver) const; bool HasRemoteDriver(RDCDriver driver) const; @@ -623,10 +622,10 @@ private: Threading::CriticalSection m_ChildLock; vector > m_Children; - map m_ConfigSettings; + std::map m_ConfigSettings; - map m_ReplayDriverProviders; - map m_RemoteDriverProviders; + std::map m_ReplayDriverProviders; + std::map m_RemoteDriverProviders; std::map m_StructProcesssors; @@ -679,9 +678,9 @@ private: int m_CapturesActive; - map m_WindowFrameCapturers; + std::map m_WindowFrameCapturers; DeviceWnd m_ActiveWindow; - map m_DeviceFrameCapturers; + std::map m_DeviceFrameCapturers; IFrameCapturer *MatchFrameCapturer(void *dev, void *wnd); diff --git a/renderdoc/core/replay_proxy.h b/renderdoc/core/replay_proxy.h index 487f45088..de870521a 100644 --- a/renderdoc/core/replay_proxy.h +++ b/renderdoc/core/replay_proxy.h @@ -610,8 +610,8 @@ private: }; // this cache only exists on the client side, with the proxy renderer. It contains the created // proxy textures to stand-in for remote real textures. - map m_ProxyTextures; - map m_ProxyBufferIds; + std::map m_ProxyTextures; + std::map m_ProxyBufferIds; // this cache exists on *both* sides of the proxy connection, and must be kept in sync. It is used // on the remote side to determine which deltas are necessary, and then each time on the client @@ -623,7 +623,7 @@ private: // should not be treated as proxied. std::set m_LocalTextures; - map m_LiveIDs; + std::map m_LiveIDs; struct ShaderReflKey { diff --git a/renderdoc/core/resource_manager.h b/renderdoc/core/resource_manager.h index 4e7dc0e96..a592b7b4e 100644 --- a/renderdoc/core/resource_manager.h +++ b/renderdoc/core/resource_manager.h @@ -34,7 +34,6 @@ #include "serialise/serialiser.h" using std::set; -using std::map; // In what way (read, write, etc) was a resource referenced in a frame - // used to determine if initial contents are needed and to what degree. @@ -261,7 +260,7 @@ struct ResourceRecord } void MarkDataUnwritten() { DataWritten = false; } - void Insert(map &recordlist) + void Insert(std::map &recordlist) { bool dataWritten = DataWritten; @@ -423,7 +422,7 @@ protected: std::vector> m_Chunks; Threading::CriticalSection *m_ChunkLock; - map m_FrameRefs; + std::map m_FrameRefs; }; template @@ -586,10 +585,10 @@ protected: // used during capture - map from real resource to its wrapper (other way can be done just with an // Unwrap) - map m_WrapperMap; + std::map m_WrapperMap; // used during capture - holds resources referenced in current frame (and how they're referenced) - map m_FrameReferencedResources; + std::map m_FrameReferencedResources; // used during capture - holds resources marked as dirty, needing initial contents set m_DirtyResources; @@ -612,23 +611,23 @@ protected: }; // used during capture or replay - holds initial contents - map m_InitialContents; + std::map m_InitialContents; // used during capture or replay - map of resources currently alive with their real IDs, used in // capture and replay. - map m_CurrentResourceMap; + std::map m_CurrentResourceMap; // used during replay - maps back and forth from original id to live id and vice-versa - map m_OriginalIDs, m_LiveIDs; + std::map m_OriginalIDs, m_LiveIDs; // used during replay - holds resources allocated and the original id that they represent - map m_LiveResourceMap; + std::map m_LiveResourceMap; // used during capture - holds resource records by id. - map m_ResourceRecords; + std::map m_ResourceRecords; // used during replay - holds current resource replacements - map m_Replacements; + std::map m_Replacements; }; template @@ -920,7 +919,7 @@ void ResourceManager::MarkUnwrittenResources() template void ResourceManager::InsertReferencedChunks(WriteSerialiser &ser) { - map sortedChunks; + std::map sortedChunks; SCOPED_LOCK(m_Lock); diff --git a/renderdoc/driver/d3d11/d3d11_context.h b/renderdoc/driver/d3d11/d3d11_context.h index 5488aacb0..1370bbff4 100644 --- a/renderdoc/driver/d3d11/d3d11_context.h +++ b/renderdoc/driver/d3d11/d3d11_context.h @@ -33,7 +33,6 @@ #include "d3d11_manager.h" #include "d3d11_video.h" -using std::map; using std::list; struct MapIntercept @@ -125,7 +124,7 @@ private: set m_DeferredReferences; set m_HighTrafficResources; - map m_OpenMaps; + std::map m_OpenMaps; struct StreamOutData { @@ -135,9 +134,9 @@ private: uint64_t numPrims; }; - map m_StreamOutCounters; + std::map m_StreamOutCounters; - map > m_ResourceUses; + std::map > m_ResourceUses; WrappedID3D11Device *m_pDevice; ID3D11DeviceContext *m_pRealContext; @@ -159,7 +158,7 @@ private: StreamReader *m_FrameReader = NULL; - map m_MapResourceRecordAllocs; + std::map m_MapResourceRecordAllocs; ResourceId m_ResourceID; D3D11ResourceRecord *m_ContextRecord; @@ -219,7 +218,7 @@ private: ReplayStatus m_FailedReplayStatus = ReplayStatus::APIReplayFailed; DrawcallDescription m_ParentDrawcall; - map m_CmdLists; + std::map m_CmdLists; list m_DrawcallStack; diff --git a/renderdoc/driver/d3d11/d3d11_debug.h b/renderdoc/driver/d3d11/d3d11_debug.h index 42b054248..342bac614 100644 --- a/renderdoc/driver/d3d11/d3d11_debug.h +++ b/renderdoc/driver/d3d11/d3d11_debug.h @@ -33,7 +33,6 @@ #include "driver/shaders/dxbc/dxbc_debug.h" #include "replay/replay_driver.h" -using std::map; using std::pair; class Camera; diff --git a/renderdoc/driver/d3d11/d3d11_device.h b/renderdoc/driver/d3d11/d3d11_device.h index 781581054..580e40b36 100644 --- a/renderdoc/driver/d3d11/d3d11_device.h +++ b/renderdoc/driver/d3d11/d3d11_device.h @@ -44,8 +44,6 @@ class D3D11ShaderCache; #define D3D11_1_UAV_SLOT_COUNT 64 #endif -using std::map; - enum TextureDisplayType { TEXDISPLAY_UNKNOWN = 0, @@ -368,12 +366,12 @@ private: void CachedObjectsGarbageCollect(); set m_DeferredContexts; - map > m_LayoutDescs; - map m_LayoutShaders; + std::map > m_LayoutDescs; + std::map m_LayoutShaders; static WrappedID3D11Device *m_pCurrentWrappedDevice; - map m_SwapChains; + std::map m_SwapChains; uint32_t m_FrameCounter; uint32_t m_FailedFrame; diff --git a/renderdoc/driver/d3d11/d3d11_manager.h b/renderdoc/driver/d3d11/d3d11_manager.h index 1517301fc..7ca76dc78 100644 --- a/renderdoc/driver/d3d11/d3d11_manager.h +++ b/renderdoc/driver/d3d11/d3d11_manager.h @@ -158,7 +158,7 @@ struct D3D11ResourceRecord : public ResourceRecord SubResources[i]->SetDataPtr(ptr); } - void Insert(map &recordlist) + void Insert(std::map &recordlist) { bool dataWritten = DataWritten; diff --git a/renderdoc/driver/d3d11/d3d11_postvs.cpp b/renderdoc/driver/d3d11/d3d11_postvs.cpp index 9d25a8566..5137d773d 100644 --- a/renderdoc/driver/d3d11/d3d11_postvs.cpp +++ b/renderdoc/driver/d3d11/d3d11_postvs.cpp @@ -408,7 +408,7 @@ void D3D11Replay::InitPostVSBuffers(uint32_t eventId) // we use a map here since the indices may be sparse. Especially considering if an index // is 'invalid' like 0xcccccccc then we don't want an array of 3.4 billion entries. - map indexRemap; + std::map indexRemap; for(size_t i = 0; i < indices.size(); i++) { // by definition, this index will only appear once in indices[] diff --git a/renderdoc/driver/d3d11/d3d11_resources.cpp b/renderdoc/driver/d3d11/d3d11_resources.cpp index f090224db..0d43b33a9 100644 --- a/renderdoc/driver/d3d11/d3d11_resources.cpp +++ b/renderdoc/driver/d3d11/d3d11_resources.cpp @@ -58,14 +58,14 @@ WRAPPED_POOL_INST(WrappedID3D11ClassLinkage); WRAPPED_POOL_INST(WrappedID3DDeviceContextState); WRAPPED_POOL_INST(WrappedID3D11Fence); -map +std::map WrappedTexture::m_TextureList; -map +std::map WrappedTexture::m_TextureList; -map +std::map WrappedTexture::m_TextureList; -map WrappedID3D11Buffer::m_BufferList; -map WrappedShader::m_ShaderList; +std::map WrappedID3D11Buffer::m_BufferList; +std::map WrappedShader::m_ShaderList; Threading::CriticalSection WrappedShader::m_ShaderListLock; std::vector WrappedID3DDeviceContextState::m_List; Threading::CriticalSection WrappedID3DDeviceContextState::m_Lock; diff --git a/renderdoc/driver/d3d11/d3d11_resources.h b/renderdoc/driver/d3d11/d3d11_resources.h index db385ea0c..7f920c00a 100644 --- a/renderdoc/driver/d3d11/d3d11_resources.h +++ b/renderdoc/driver/d3d11/d3d11_resources.h @@ -432,7 +432,7 @@ public: uint32_t length; }; - static map m_BufferList; + static std::map m_BufferList; static const int AllocPoolCount = 128 * 1024; static const int AllocPoolMaxByteSize = 13 * 1024 * 1024; @@ -478,7 +478,7 @@ public: TextureDisplayType m_Type; }; - static map m_TextureList; + static std::map m_TextureList; WrappedTexture(NestedType *real, WrappedID3D11Device *device, TextureDisplayType type) : WrappedResource11(real, device) @@ -948,7 +948,7 @@ public: ShaderBindpointMapping m_Mapping; }; - static map m_ShaderList; + static std::map m_ShaderList; static Threading::CriticalSection m_ShaderListLock; WrappedShader(WrappedID3D11Device *device, ResourceId origId, ResourceId liveId, const byte *code, diff --git a/renderdoc/driver/d3d12/d3d12_commands.h b/renderdoc/driver/d3d12/d3d12_commands.h index 027777625..fd775b4c3 100644 --- a/renderdoc/driver/d3d12/d3d12_commands.h +++ b/renderdoc/driver/d3d12/d3d12_commands.h @@ -235,13 +235,13 @@ struct D3D12CommandData ResourceId m_LastCmdListID; - map m_CrackedAllocators; + std::map m_CrackedAllocators; vector m_IndirectBuffers; static const uint64_t m_IndirectSize = 4 * 1024 * 1024; uint64_t m_IndirectOffset; - map m_BakedCmdListInfo; + std::map m_BakedCmdListInfo; D3D12RenderState m_RenderState; @@ -340,7 +340,7 @@ struct D3D12CommandData SDFile *m_StructuredFile; - map > m_ResourceUses; + std::map > m_ResourceUses; D3D12DrawcallTreeNode m_ParentDrawcall; diff --git a/renderdoc/driver/d3d12/d3d12_device.cpp b/renderdoc/driver/d3d12/d3d12_device.cpp index ff246303a..5633b9034 100644 --- a/renderdoc/driver/d3d12/d3d12_device.cpp +++ b/renderdoc/driver/d3d12/d3d12_device.cpp @@ -1798,7 +1798,7 @@ bool WrappedID3D12Device::EndFrameCapture(void *dev, void *wnd) // in capframe (the transition is thread-protected) so nothing will be // pushed to the vector - map recordlist; + std::map recordlist; for(auto it = queues.begin(); it != queues.end(); ++it) { diff --git a/renderdoc/driver/d3d12/d3d12_device.h b/renderdoc/driver/d3d12/d3d12_device.h index 621d96273..4453d4d89 100644 --- a/renderdoc/driver/d3d12/d3d12_device.h +++ b/renderdoc/driver/d3d12/d3d12_device.h @@ -322,7 +322,7 @@ private: D3D12TextRenderer *m_TextRenderer = NULL; set m_UploadResourceIds; - map m_UploadBuffers; + std::map m_UploadBuffers; Threading::CriticalSection m_MapsLock; vector m_Maps; @@ -391,12 +391,12 @@ private: // used both on capture and replay side to track resource states. Only locked // in capture - map m_ResourceStates; + std::map m_ResourceStates; Threading::CriticalSection m_ResourceStatesLock; set m_Cubemaps; - map m_ResourceNames; + std::map m_ResourceNames; struct SwapPresentInfo { @@ -407,8 +407,8 @@ private: int32_t lastPresentedBuffer; }; - map m_SwapChains; - map m_BackbufferFormat; + std::map m_SwapChains; + std::map m_BackbufferFormat; WrappedIDXGISwapChain4 *m_LastSwap; @@ -478,8 +478,11 @@ public: { return m_ResourceStates[id]; } - const map &GetSubresourceStates() { return m_ResourceStates; } - const map &GetBackbufferFormats() { return m_BackbufferFormat; } + const std::map &GetSubresourceStates() + { + return m_ResourceStates; + } + const std::map &GetBackbufferFormats() { return m_BackbufferFormat; } void SetLogFile(const char *logfile); void SetInitParams(const D3D12InitParams ¶ms, uint64_t sectionVersion) { diff --git a/renderdoc/driver/d3d12/d3d12_manager.cpp b/renderdoc/driver/d3d12/d3d12_manager.cpp index 61431c2fe..02c082529 100644 --- a/renderdoc/driver/d3d12/d3d12_manager.cpp +++ b/renderdoc/driver/d3d12/d3d12_manager.cpp @@ -165,7 +165,7 @@ void D3D12Descriptor::Create(D3D12_DESCRIPTOR_HEAP_TYPE heapType, WrappedID3D12D { desc = res ? NULL : defaultSRV(); - const map &bbs = dev->GetBackbufferFormats(); + const std::map &bbs = dev->GetBackbufferFormats(); auto it = bbs.find(GetResID(res)); @@ -189,7 +189,7 @@ void D3D12Descriptor::Create(D3D12_DESCRIPTOR_HEAP_TYPE heapType, WrappedID3D12D } else if(desc->Format == DXGI_FORMAT_UNKNOWN) { - const map &bbs = dev->GetBackbufferFormats(); + const std::map &bbs = dev->GetBackbufferFormats(); auto it = bbs.find(GetResID(res)); @@ -257,7 +257,7 @@ void D3D12Descriptor::Create(D3D12_DESCRIPTOR_HEAP_TYPE heapType, WrappedID3D12D { desc = res ? NULL : defaultRTV(); - const map &bbs = dev->GetBackbufferFormats(); + const std::map &bbs = dev->GetBackbufferFormats(); auto it = bbs.find(GetResID(res)); @@ -279,7 +279,7 @@ void D3D12Descriptor::Create(D3D12_DESCRIPTOR_HEAP_TYPE heapType, WrappedID3D12D } else if(desc->Format == DXGI_FORMAT_UNKNOWN) { - const map &bbs = dev->GetBackbufferFormats(); + const std::map &bbs = dev->GetBackbufferFormats(); auto it = bbs.find(GetResID(res)); @@ -366,7 +366,7 @@ void D3D12Descriptor::Create(D3D12_DESCRIPTOR_HEAP_TYPE heapType, WrappedID3D12D { desc = res ? NULL : defaultUAV(); - const map &bbs = dev->GetBackbufferFormats(); + const std::map &bbs = dev->GetBackbufferFormats(); auto it = bbs.find(GetResID(res)); @@ -388,7 +388,7 @@ void D3D12Descriptor::Create(D3D12_DESCRIPTOR_HEAP_TYPE heapType, WrappedID3D12D } else if(desc->Format == DXGI_FORMAT_UNKNOWN) { - const map &bbs = dev->GetBackbufferFormats(); + const std::map &bbs = dev->GetBackbufferFormats(); auto it = bbs.find(GetResID(res)); @@ -651,7 +651,7 @@ D3D12Descriptor *DescriptorFromPortableHandle(D3D12ResourceManager *manager, Por #endif void D3D12ResourceManager::ApplyBarriers(vector &barriers, - map &states) + std::map &states) { for(size_t b = 0; b < barriers.size(); b++) { diff --git a/renderdoc/driver/d3d12/d3d12_manager.h b/renderdoc/driver/d3d12/d3d12_manager.h index a15238799..c839b71cd 100644 --- a/renderdoc/driver/d3d12/d3d12_manager.h +++ b/renderdoc/driver/d3d12/d3d12_manager.h @@ -563,7 +563,7 @@ struct D3D12ResourceRecord : public ResourceRecord cmdInfo->bundles.swap(bakedCommands->cmdInfo->bundles); } - void Insert(map &recordlist) + void Insert(std::map &recordlist) { bool dataWritten = DataWritten; @@ -713,7 +713,7 @@ public: } void ApplyBarriers(vector &barriers, - map &states); + std::map &states); template void SerialiseResourceStates(SerialiserType &ser, std::vector &barriers, diff --git a/renderdoc/driver/d3d12/d3d12_overlay.cpp b/renderdoc/driver/d3d12/d3d12_overlay.cpp index 4257c8fab..785abc74a 100644 --- a/renderdoc/driver/d3d12/d3d12_overlay.cpp +++ b/renderdoc/driver/d3d12/d3d12_overlay.cpp @@ -262,7 +262,7 @@ struct D3D12QuadOverdrawCallback : public D3D12DrawcallCallback uint32_t sigElem; ID3D12PipelineState *pipe; }; - map m_PipelineCache; + std::map m_PipelineCache; std::set m_CopiedHeaps; D3D12RenderState m_PrevState; }; diff --git a/renderdoc/driver/d3d12/d3d12_postvs.cpp b/renderdoc/driver/d3d12/d3d12_postvs.cpp index 49373cfb9..9896d8e92 100644 --- a/renderdoc/driver/d3d12/d3d12_postvs.cpp +++ b/renderdoc/driver/d3d12/d3d12_postvs.cpp @@ -433,7 +433,7 @@ void D3D12Replay::InitPostVSBuffers(uint32_t eventId) // we use a map here since the indices may be sparse. Especially considering if an index // is 'invalid' like 0xcccccccc then we don't want an array of 3.4 billion entries. - map indexRemap; + std::map indexRemap; for(size_t i = 0; i < indices.size(); i++) { // by definition, this index will only appear once in indices[] diff --git a/renderdoc/driver/d3d12/d3d12_resources.h b/renderdoc/driver/d3d12/d3d12_resources.h index c3bb35d4e..975539768 100644 --- a/renderdoc/driver/d3d12/d3d12_resources.h +++ b/renderdoc/driver/d3d12/d3d12_resources.h @@ -767,7 +767,7 @@ public: ShaderReflection m_Details; ShaderBindpointMapping m_Mapping; - static map m_Shaders; + static std::map m_Shaders; }; enum diff --git a/renderdoc/driver/d3d8/d3d8_resources.cpp b/renderdoc/driver/d3d8/d3d8_resources.cpp index b0e0910e4..bb2d42da0 100644 --- a/renderdoc/driver/d3d8/d3d8_resources.cpp +++ b/renderdoc/driver/d3d8/d3d8_resources.cpp @@ -29,9 +29,9 @@ ALL_D3D8_TYPES; -map +std::map WrappedD3DBuffer8::m_BufferList; -map +std::map WrappedD3DBuffer8::m_BufferList; D3D8ResourceType IdentifyTypeByPtr(IUnknown *ptr) diff --git a/renderdoc/driver/d3d8/d3d8_resources.h b/renderdoc/driver/d3d8/d3d8_resources.h index 64cb961d2..b18f8239c 100644 --- a/renderdoc/driver/d3d8/d3d8_resources.h +++ b/renderdoc/driver/d3d8/d3d8_resources.h @@ -171,7 +171,7 @@ public: uint32_t length; }; - static map m_BufferList; + static std::map m_BufferList; WrappedD3DBuffer8(NestedType *real, uint32_t byteLength, WrappedD3DDevice8 *device) : WrappedIDirect3DResource8(real, device) diff --git a/renderdoc/driver/gl/gl_common.h b/renderdoc/driver/gl/gl_common.h index ef3dee57c..a88806a8f 100644 --- a/renderdoc/driver/gl/gl_common.h +++ b/renderdoc/driver/gl/gl_common.h @@ -843,7 +843,7 @@ struct ShaderReflection; void CopyProgramUniforms(GLuint progSrc, GLuint progDst); template void SerialiseProgramUniforms(SerialiserType &ser, CaptureState state, GLuint prog, - map *locTranslate); + std::map *locTranslate); void CopyProgramAttribBindings(GLuint progsrc, GLuint progdst, ShaderReflection *refl); void CopyProgramFragDataBindings(GLuint progsrc, GLuint progdst, ShaderReflection *refl); template diff --git a/renderdoc/driver/gl/gl_driver.cpp b/renderdoc/driver/gl/gl_driver.cpp index f1b3c8917..14a0ad8c5 100644 --- a/renderdoc/driver/gl/gl_driver.cpp +++ b/renderdoc/driver/gl/gl_driver.cpp @@ -2020,7 +2020,7 @@ bool WrappedOpenGL::EndFrameCapture(void *dev, void *wnd) { RDCDEBUG("Accumulating context resource list"); - map recordlist; + std::map recordlist; m_ContextRecord->Insert(recordlist); for(auto it = m_ContextData.begin(); it != m_ContextData.end(); ++it) diff --git a/renderdoc/driver/gl/gl_driver.h b/renderdoc/driver/gl/gl_driver.h index 2b0174f05..8a224a674 100644 --- a/renderdoc/driver/gl/gl_driver.h +++ b/renderdoc/driver/gl/gl_driver.h @@ -240,7 +240,7 @@ private: list m_DrawcallStack; - map> m_ResourceUses; + std::map> m_ResourceUses; bool m_FetchCounters; @@ -255,7 +255,7 @@ private: uint64_t size; }; - map m_Buffers; + std::map m_Buffers; vector> m_DependentReplacements; @@ -356,7 +356,7 @@ private: // the last time a window was seen/associated with this context. // Decays after a few seconds since there's no good explicit // 'remove' type call for GL, only wglCreateContext/wglMakeCurrent - map windows; + std::map windows; // a window is only associated with one context at once, so any // time we associate a window, it broadcasts to all other @@ -500,7 +500,7 @@ private: std::string bbname); RenderDoc::FramePixels *SaveBackbufferImage(); - map m_BackbufferImages; + std::map m_BackbufferImages; void BuildGLExtensions(); void BuildGLESExtensions(); @@ -637,7 +637,7 @@ public: ProgramData() : linked(false) { RDCEraseEl(stageShaders); } vector shaders; - map locationTranslate; + std::map locationTranslate; // this flag indicates the program was created with glCreateShaderProgram and cannot be relinked // again (because that function implicitly detaches and destroys the shader). However we only diff --git a/renderdoc/driver/gl/gl_manager.h b/renderdoc/driver/gl/gl_manager.h index 6c756c334..ae49b70a0 100644 --- a/renderdoc/driver/gl/gl_manager.h +++ b/renderdoc/driver/gl/gl_manager.h @@ -267,15 +267,15 @@ private: void Create_InitialState(ResourceId id, GLResource live, bool hasData); void Apply_InitialState(GLResource live, const GLInitialContents &initial); - map m_GLResourceRecords; + std::map m_GLResourceRecords; - map m_CurrentResourceIds; + std::map m_CurrentResourceIds; // sync objects must be treated differently as they're not GLuint names, but pointer sized. // We manually give them GLuint names so they're otherwise namespaced as (eResSync, GLuint) - map m_SyncIDs; - map m_CurrentSyncs; - map m_Names; + std::map m_SyncIDs; + std::map m_CurrentSyncs; + std::map m_Names; volatile int64_t m_SyncName; CaptureState m_State; diff --git a/renderdoc/driver/gl/gl_postvs.cpp b/renderdoc/driver/gl/gl_postvs.cpp index 018b6f6d2..85d6447c8 100644 --- a/renderdoc/driver/gl/gl_postvs.cpp +++ b/renderdoc/driver/gl/gl_postvs.cpp @@ -572,7 +572,7 @@ void GLReplay::InitPostVSBuffers(uint32_t eventId) // we use a map here since the indices may be sparse. Especially considering if an index // is 'invalid' like 0xcccccccc then we don't want an array of 3.4 billion entries. - map indexRemap; + std::map indexRemap; for(size_t i = 0; i < indices.size(); i++) { // by definition, this index will only appear once in indices[] diff --git a/renderdoc/driver/gl/gl_program_iterate.cpp b/renderdoc/driver/gl/gl_program_iterate.cpp index 6233fed94..d045dc7fa 100644 --- a/renderdoc/driver/gl/gl_program_iterate.cpp +++ b/renderdoc/driver/gl/gl_program_iterate.cpp @@ -296,7 +296,7 @@ void DoSerialise(SerialiserType &ser, ProgramUniforms &el) template static void ForAllProgramUniforms(SerialiserType *ser, CaptureState state, GLuint progSrc, - GLuint progDst, map *locTranslate) + GLuint progDst, std::map *locTranslate) { const bool ReadSourceProgram = CopyUniforms || (SerialiseUniforms && ser && ser->IsWriting()); const bool WriteDestProgram = CopyUniforms || (SerialiseUniforms && ser && ser->IsReading()); @@ -798,7 +798,7 @@ void CopyProgramUniforms(GLuint progSrc, GLuint progDst) template void SerialiseProgramUniforms(SerialiserType &ser, CaptureState state, GLuint prog, - map *locTranslate) + std::map *locTranslate) { const bool CopyUniforms = false; const bool SerialiseUniforms = true; @@ -806,9 +806,9 @@ void SerialiseProgramUniforms(SerialiserType &ser, CaptureState state, GLuint pr } template void SerialiseProgramUniforms(ReadSerialiser &ser, CaptureState state, GLuint prog, - map *locTranslate); + std::map *locTranslate); template void SerialiseProgramUniforms(WriteSerialiser &ser, CaptureState state, GLuint prog, - map *locTranslate); + std::map *locTranslate); void CopyProgramAttribBindings(GLuint progsrc, GLuint progdst, ShaderReflection *refl) { diff --git a/renderdoc/driver/gl/gl_replay.h b/renderdoc/driver/gl/gl_replay.h index 05d3cd83c..9b76aec19 100644 --- a/renderdoc/driver/gl/gl_replay.h +++ b/renderdoc/driver/gl/gl_replay.h @@ -30,7 +30,6 @@ #include "replay/replay_driver.h" #include "gl_common.h" -using std::map; using std::pair; class AMDCounters; @@ -387,7 +386,7 @@ private: HighlightCache m_HighlightCache; // eventId -> data - map m_PostVSData; + std::map m_PostVSData; void ClearPostVSCache(); @@ -425,13 +424,13 @@ private: void CloseReplayContext(); uint64_t m_OutputWindowID; - map m_OutputWindows; + std::map m_OutputWindows; bool m_Proxy; void CacheTexture(ResourceId id); - map m_CachedTextures; + std::map m_CachedTextures; WrappedOpenGL *m_pDriver; diff --git a/renderdoc/driver/shaders/dxbc/dxbc_inspect.cpp b/renderdoc/driver/shaders/dxbc/dxbc_inspect.cpp index ad9051bea..a5476233e 100644 --- a/renderdoc/driver/shaders/dxbc/dxbc_inspect.cpp +++ b/renderdoc/driver/shaders/dxbc/dxbc_inspect.cpp @@ -612,7 +612,7 @@ DXBCFile::DXBCFile(const void *ByteCode, size_t ByteCodeLength) uint32_t reg, space, bindCount; }; - map cbufferbinds; + std::map cbufferbinds; uint32_t resourceStride = sizeof(RDEFResource); diff --git a/renderdoc/driver/shaders/dxbc/dxbc_inspect.h b/renderdoc/driver/shaders/dxbc/dxbc_inspect.h index fe2805472..1032c7f76 100644 --- a/renderdoc/driver/shaders/dxbc/dxbc_inspect.h +++ b/renderdoc/driver/shaders/dxbc/dxbc_inspect.h @@ -36,7 +36,6 @@ using std::vector; using std::pair; using std::string; -using std::map; // matches D3D11_SHADER_VERSION_TYPE from d3d11shader.h enum D3D11_ShaderType @@ -369,7 +368,7 @@ public: CBuffer m_Interfaces; - map m_ResourceBinds; + std::map m_ResourceBinds; vector m_InputSig; vector m_OutputSig; @@ -418,7 +417,7 @@ private: bool IsDeclaration(OpcodeType op); CBufferVariableType ParseRDEFType(RDEFHeader *h, char *chunk, uint32_t offset); - map m_Variables; + std::map m_Variables; bool m_Disassembled; diff --git a/renderdoc/driver/shaders/dxbc/dxbc_sdbg.h b/renderdoc/driver/shaders/dxbc/dxbc_sdbg.h index bb8a40429..c9a7fcf02 100644 --- a/renderdoc/driver/shaders/dxbc/dxbc_sdbg.h +++ b/renderdoc/driver/shaders/dxbc/dxbc_sdbg.h @@ -30,7 +30,6 @@ using std::vector; using std::pair; using std::string; -using std::map; #pragma once diff --git a/renderdoc/driver/shaders/dxbc/dxbc_spdb.cpp b/renderdoc/driver/shaders/dxbc/dxbc_spdb.cpp index ee9fffe7d..396c1772b 100644 --- a/renderdoc/driver/shaders/dxbc/dxbc_spdb.cpp +++ b/renderdoc/driver/shaders/dxbc/dxbc_spdb.cpp @@ -132,7 +132,7 @@ SPDBChunk::SPDBChunk(DXBCFile *dxbc, void *chunk) RDCASSERT(hashtable[0] == 0); hashtable++; - map StreamNames; + std::map StreamNames; uint32_t numset = 0; for(uint32_t i = 0; i < maxBit; i++) @@ -675,7 +675,7 @@ SPDBChunk::SPDBChunk(DXBCFile *dxbc, void *chunk) m_Functions[0] = mainFunc; } - map Names; + std::map Names; if(StreamNames.find("/names") != StreamNames.end()) { @@ -756,7 +756,7 @@ SPDBChunk::SPDBChunk(DXBCFile *dxbc, void *chunk) PROCSYM32 main = {}; - map FileMapping; // mapping from hash chunk to index in Files[], or -1 + std::map FileMapping; // mapping from hash chunk to index in Files[], or -1 for(size_t m = 0; m < modules.size(); m++) { diff --git a/renderdoc/driver/shaders/dxbc/dxbc_spdb.h b/renderdoc/driver/shaders/dxbc/dxbc_spdb.h index 07aaf6e6b..0f04b4e66 100644 --- a/renderdoc/driver/shaders/dxbc/dxbc_spdb.h +++ b/renderdoc/driver/shaders/dxbc/dxbc_spdb.h @@ -35,7 +35,6 @@ using std::vector; using std::pair; using std::string; -using std::map; namespace DXBC { diff --git a/renderdoc/driver/vulkan/vk_core.h b/renderdoc/driver/vulkan/vk_core.h index a3017d18b..ede047c94 100644 --- a/renderdoc/driver/vulkan/vk_core.h +++ b/renderdoc/driver/vulkan/vk_core.h @@ -742,23 +742,23 @@ private: // used both on capture and replay side to track image layouts. Only locked // in capture - map m_ImageLayouts; + std::map m_ImageLayouts; Threading::CriticalSection m_ImageLayoutsLock; // find swapchain for an image - map m_SwapLookup; + std::map m_SwapLookup; Threading::CriticalSection m_SwapLookupLock; // below are replay-side data only, doesn't have to be thread protected // current descriptor set contents - map m_DescriptorSetState; + std::map m_DescriptorSetState; // data for a baked command buffer - its drawcalls and events, ready to submit - map m_BakedCmdBufferInfo; + std::map m_BakedCmdBufferInfo; // immutable creation data VulkanCreationInfo m_CreationInfo; - map> m_ResourceUses; + std::map> m_ResourceUses; // returns thread-local temporary memory byte *GetTempMemory(size_t s); diff --git a/renderdoc/driver/vulkan/vk_info.h b/renderdoc/driver/vulkan/vk_info.h index fe15439ed..952c43a19 100644 --- a/renderdoc/driver/vulkan/vk_info.h +++ b/renderdoc/driver/vulkan/vk_info.h @@ -278,7 +278,7 @@ struct VulkanCreationInfo std::vector discardRectangles; VkDiscardRectangleModeEXT discardMode; }; - map m_Pipeline; + std::map m_Pipeline; struct PipelineLayout { @@ -288,7 +288,7 @@ struct VulkanCreationInfo vector pushRanges; vector descSetLayouts; }; - map m_PipelineLayout; + std::map m_PipelineLayout; struct RenderPass { @@ -335,7 +335,7 @@ struct VulkanCreationInfo // in the layout that the subpass uses vector loadRPs; }; - map m_RenderPass; + std::map m_RenderPass; struct Framebuffer { @@ -354,7 +354,7 @@ struct VulkanCreationInfo // See above in loadRPs - we need to duplicate and make framebuffer equivalents for each vector loadFBs; }; - map m_Framebuffer; + std::map m_Framebuffer; struct Memory { @@ -366,7 +366,7 @@ struct VulkanCreationInfo VkBuffer wholeMemBuf; }; - map m_Memory; + std::map m_Memory; struct Buffer { @@ -376,7 +376,7 @@ struct VulkanCreationInfo VkBufferUsageFlags usage; uint64_t size; }; - map m_Buffer; + std::map m_Buffer; struct BufferView { @@ -388,7 +388,7 @@ struct VulkanCreationInfo uint64_t offset; uint64_t size; }; - map m_BufferView; + std::map m_BufferView; struct Image { @@ -404,7 +404,7 @@ struct VulkanCreationInfo bool cube; TextureCategory creationFlags; }; - map m_Image; + std::map m_Image; struct Sampler { @@ -427,7 +427,7 @@ struct VulkanCreationInfo ResourceId ycbcr; }; - map m_Sampler; + std::map m_Sampler; struct YCbCrSampler { @@ -442,7 +442,7 @@ struct VulkanCreationInfo FilterMode chromaFilter; bool forceExplicitReconstruction; }; - map m_YCbCrSampler; + std::map m_YCbCrSampler; struct ImageView { @@ -454,7 +454,7 @@ struct VulkanCreationInfo VkImageSubresourceRange range; TextureSwizzle swizzle[4]; }; - map m_ImageView; + std::map m_ImageView; struct ShaderModule { @@ -477,9 +477,9 @@ struct VulkanCreationInfo void Init(VulkanResourceManager *resourceMan, ResourceId id, const SPVModule &spv, const std::string &entry, VkShaderStageFlagBits stage); }; - map m_Reflections; + std::map m_Reflections; }; - map m_ShaderModule; + std::map m_ShaderModule; struct DescSetPool { @@ -493,13 +493,13 @@ struct VulkanCreationInfo std::vector overflow; }; - map m_DescSetPool; + std::map m_DescSetPool; - map m_Names; - map m_SwapChain; - map m_DescSetLayout; - map m_DescUpdateTemplate; + std::map m_Names; + std::map m_SwapChain; + std::map m_DescSetLayout; + std::map m_DescUpdateTemplate; // just contains the queueFamilyIndex (after remapping) - map m_Queue; + std::map m_Queue; }; diff --git a/renderdoc/driver/vulkan/vk_manager.cpp b/renderdoc/driver/vulkan/vk_manager.cpp index 2b7d32cc5..115ce6440 100644 --- a/renderdoc/driver/vulkan/vk_manager.cpp +++ b/renderdoc/driver/vulkan/vk_manager.cpp @@ -185,7 +185,7 @@ void VulkanResourceManager::RecordSingleBarrier(vector > &states, - const map &layouts, + const std::map &layouts, uint32_t numBarriers, const VkImageMemoryBarrier *barriers) { TRDBG("Recording %u barriers", numBarriers); @@ -467,7 +467,7 @@ void VulkanResourceManager::SetInternalResource(ResourceId id) void VulkanResourceManager::ApplyBarriers(uint32_t queueFamilyIndex, vector > &states, - map &layouts) + std::map &layouts) { TRDBG("Applying %u barriers", (uint32_t)states.size()); diff --git a/renderdoc/driver/vulkan/vk_manager.h b/renderdoc/driver/vulkan/vk_manager.h index c5e6e0584..62266d710 100644 --- a/renderdoc/driver/vulkan/vk_manager.h +++ b/renderdoc/driver/vulkan/vk_manager.h @@ -258,14 +258,14 @@ public: const SrcBarrierType &t, uint32_t nummips, uint32_t numslices); void RecordBarriers(vector > &states, - const map &layouts, uint32_t numBarriers, + const std::map &layouts, uint32_t numBarriers, const VkImageMemoryBarrier *barriers); void MergeBarriers(vector > &dststates, vector > &srcstates); void ApplyBarriers(uint32_t queueFamilyIndex, vector > &states, - map &layouts); + std::map &layouts); template void SerialiseImageStates(SerialiserType &ser, std::map &states, diff --git a/renderdoc/driver/vulkan/vk_overlay.cpp b/renderdoc/driver/vulkan/vk_overlay.cpp index 9a3b0fdf2..08338f7c6 100644 --- a/renderdoc/driver/vulkan/vk_overlay.cpp +++ b/renderdoc/driver/vulkan/vk_overlay.cpp @@ -266,7 +266,7 @@ struct VulkanQuadOverdrawCallback : public VulkanDrawcallCallback const vector &m_Events; // cache modified pipelines - map > m_PipelineCache; + std::map > m_PipelineCache; VulkanRenderState m_PrevState; }; @@ -2146,7 +2146,7 @@ ResourceId VulkanReplay::RenderOverlay(ResourceId texid, CompType typeHint, Debu typedef std::pair PipeKey; - map pipes; + std::map pipes; cmd = m_pDriver->GetNextCmd(); diff --git a/renderdoc/driver/vulkan/vk_postvs.cpp b/renderdoc/driver/vulkan/vk_postvs.cpp index 5fa8b6079..885d82c08 100644 --- a/renderdoc/driver/vulkan/vk_postvs.cpp +++ b/renderdoc/driver/vulkan/vk_postvs.cpp @@ -1847,7 +1847,7 @@ void VulkanReplay::FetchVSOut(uint32_t eventId) // we use a map here since the indices may be sparse. Especially considering if an index // is 'invalid' like 0xcccccccc then we don't want an array of 3.4 billion entries. - map indexRemap; + std::map indexRemap; for(size_t i = 0; i < indices.size(); i++) { // by definition, this index will only appear once in indices[] diff --git a/renderdoc/driver/vulkan/vk_replay.h b/renderdoc/driver/vulkan/vk_replay.h index 67f5bd353..db3e60dbc 100644 --- a/renderdoc/driver/vulkan/vk_replay.h +++ b/renderdoc/driver/vulkan/vk_replay.h @@ -99,7 +99,6 @@ #endif #include -using std::map; // similar to RDCUNIMPLEMENTED but for things that are hit often so we don't want to fire the // debugbreak. @@ -451,7 +450,7 @@ private: VulkanResourceManager *m_ResourceManager; }; - map m_OutputWindows; + std::map m_OutputWindows; uint64_t m_OutputWinID; uint64_t m_ActiveWinID; bool m_BindDepth; diff --git a/renderdoc/driver/vulkan/vk_resources.h b/renderdoc/driver/vulkan/vk_resources.h index 6df7a1be4..5d75da0ea 100644 --- a/renderdoc/driver/vulkan/vk_resources.h +++ b/renderdoc/driver/vulkan/vk_resources.h @@ -966,8 +966,8 @@ struct DescriptorSetData // the refcount has the high-bit set if this resource has sparse // mapping information static const uint32_t SPARSE_REF_BIT = 0x80000000; - map > bindFrameRefs; - map bindMemRefs; + std::map > bindFrameRefs; + std::map bindMemRefs; }; struct PipelineLayoutData diff --git a/renderdoc/driver/vulkan/vk_sparse_initstate.cpp b/renderdoc/driver/vulkan/vk_sparse_initstate.cpp index 5f982356b..f0ff9b94e 100644 --- a/renderdoc/driver/vulkan/vk_sparse_initstate.cpp +++ b/renderdoc/driver/vulkan/vk_sparse_initstate.cpp @@ -79,7 +79,7 @@ bool WrappedVulkan::Prepare_SparseInitialState(WrappedVkBuffer *buf) // VKTODOLOW this is a bit conservative, as we save the whole memory object rather than just the // bound range. - map boundMems; + std::map boundMems; // value will be filled out later once all memories are added for(size_t i = 0; i < buf->record->resInfo->opaquemappings.size(); i++) @@ -205,7 +205,7 @@ bool WrappedVulkan::Prepare_SparseInitialState(WrappedVkImage *im) // VKTODOLOW this is a bit conservative, as we save the whole memory object rather than just the // bound range. - map boundMems; + std::map boundMems; // value will be filled out later once all memories are added for(size_t i = 0; i < sparse->opaquemappings.size(); i++) diff --git a/renderdoc/os/os_specific.h b/renderdoc/os/os_specific.h index 373cdc85a..f03e6ea55 100644 --- a/renderdoc/os/os_specific.h +++ b/renderdoc/os/os_specific.h @@ -43,7 +43,6 @@ using std::string; using std::vector; -using std::map; struct CaptureOptions; diff --git a/renderdoc/os/posix/posix_process.cpp b/renderdoc/os/posix/posix_process.cpp index 1dba6409a..1c728eed8 100644 --- a/renderdoc/os/posix/posix_process.cpp +++ b/renderdoc/os/posix/posix_process.cpp @@ -253,9 +253,9 @@ static vector &GetEnvModifications() return envCallbacks; } -static map EnvStringToEnvMap(const char **envstring) +static std::map EnvStringToEnvMap(const char **envstring) { - map ret; + std::map ret; const char **e = envstring; @@ -346,7 +346,7 @@ void Process::ApplyEnvironmentModification() { // turn environment string to a UTF-8 map char **currentEnvironment = GetCurrentEnvironment(); - map currentEnv = EnvStringToEnvMap((const char **)currentEnvironment); + std::map currentEnv = EnvStringToEnvMap((const char **)currentEnvironment); vector &modifications = GetEnvModifications(); for(size_t i = 0; i < modifications.size(); i++) @@ -706,7 +706,7 @@ ExecuteResult Process::LaunchAndInjectIntoProcess(const char *app, const char *w // turn environment string to a UTF-8 map char **currentEnvironment = GetCurrentEnvironment(); - map env = EnvStringToEnvMap((const char **)currentEnvironment); + std::map env = EnvStringToEnvMap((const char **)currentEnvironment); vector modifications = GetEnvModifications(); for(const EnvironmentModification &e : envList) diff --git a/renderdoc/os/win32/win32_hook.cpp b/renderdoc/os/win32/win32_hook.cpp index 4a8bc8a02..6f486cea9 100644 --- a/renderdoc/os/win32/win32_hook.cpp +++ b/renderdoc/os/win32/win32_hook.cpp @@ -40,10 +40,9 @@ #define VERBOSE_DEBUG_HOOK OPTION_OFF using std::vector; -using std::map; // map from address of IAT entry, to original contents -map s_InstalledHooks; +std::map s_InstalledHooks; Threading::CriticalSection installedLock; bool ApplyHook(FunctionHook &hook, void **IATentry, bool &already) @@ -160,7 +159,7 @@ struct CachedHookData RDCEraseEl(lowername); } - map DllHooks; + std::map DllHooks; HMODULE ownmodule; Threading::CriticalSection lock; char lowername[512];