summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D12
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-11-28 18:00:29 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-11-28 18:00:29 +0000
commit094e13588e6029354386f31e49b795a7fada6a58 (patch)
treef0dd43f74731c1f5ff37699de6d5456026a2fefc /Graphics/GraphicsEngineD3D12
parentFixed leftover issues from clang-formatting (diff)
downloadDiligentCore-094e13588e6029354386f31e49b795a7fada6a58.tar.gz
DiligentCore-094e13588e6029354386f31e49b795a7fada6a58.zip
Fixed few vector initialization issues
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
-rw-r--r--Graphics/GraphicsEngineD3D12/src/BufferD3D12Impl.cpp8
-rw-r--r--Graphics/GraphicsEngineD3D12/src/CommandContext.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D12/src/CommandListManager.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D12/src/D3D12DynamicHeap.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D12/src/DescriptorHeap.cpp6
-rw-r--r--Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D12/src/RootSignature.cpp6
-rw-r--r--Graphics/GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp2
9 files changed, 16 insertions, 16 deletions
diff --git a/Graphics/GraphicsEngineD3D12/src/BufferD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/BufferD3D12Impl.cpp
index b3000d83..1aadc071 100644
--- a/Graphics/GraphicsEngineD3D12/src/BufferD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/BufferD3D12Impl.cpp
@@ -50,11 +50,11 @@ BufferD3D12Impl::BufferD3D12Impl(IReferenceCounters* pRefCounters,
false
},
m_DynamicData
- {
+ (
BuffDesc.Usage == USAGE_DYNAMIC ? (1 + pRenderDeviceD3D12->GetNumDeferredContexts()) : 0,
D3D12DynamicAllocation{},
STD_ALLOCATOR_RAW_MEM(D3D12DynamicAllocation, GetRawAllocator(), "Allocator for vector<DynamicAllocation>")
- }
+ )
// clang-format on
{
#define LOG_BUFFER_ERROR_AND_THROW(...) LOG_ERROR_AND_THROW("Buffer \"", BuffDesc.Name ? BuffDesc.Name : "", "\": ", ##__VA_ARGS__)
@@ -275,11 +275,11 @@ BufferD3D12Impl::BufferD3D12Impl(IReferenceCounters* pRefCounters,
false
},
m_DynamicData
- {
+ (
BuffDesc.Usage == USAGE_DYNAMIC ? (1 + pRenderDeviceD3D12->GetNumDeferredContexts()) : 0,
D3D12DynamicAllocation{},
STD_ALLOCATOR_RAW_MEM(D3D12DynamicAllocation, GetRawAllocator(), "Allocator for vector<DynamicAllocation>")
- }
+ )
// clang-format on
{
m_pd3d12Resource = pd3d12Buffer;
diff --git a/Graphics/GraphicsEngineD3D12/src/CommandContext.cpp b/Graphics/GraphicsEngineD3D12/src/CommandContext.cpp
index 666d538e..cf38652a 100644
--- a/Graphics/GraphicsEngineD3D12/src/CommandContext.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/CommandContext.cpp
@@ -38,7 +38,7 @@ CommandContext::CommandContext(CommandListManager& CmdListManager) :
m_pCurGraphicsRootSignature {nullptr},
m_pCurPipelineState {nullptr},
m_pCurComputeRootSignature {nullptr},
- m_PendingResourceBarriers {STD_ALLOCATOR_RAW_MEM(D3D12_RESOURCE_BARRIER, GetRawAllocator(), "Allocator for vector<D3D12_RESOURCE_BARRIER>")}
+ m_PendingResourceBarriers (STD_ALLOCATOR_RAW_MEM(D3D12_RESOURCE_BARRIER, GetRawAllocator(), "Allocator for vector<D3D12_RESOURCE_BARRIER>"))
// clang-format on
{
m_PendingResourceBarriers.reserve(MaxPendingBarriers);
diff --git a/Graphics/GraphicsEngineD3D12/src/CommandListManager.cpp b/Graphics/GraphicsEngineD3D12/src/CommandListManager.cpp
index c39f77fd..e909d1e5 100644
--- a/Graphics/GraphicsEngineD3D12/src/CommandListManager.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/CommandListManager.cpp
@@ -31,7 +31,7 @@ namespace Diligent
CommandListManager::CommandListManager(RenderDeviceD3D12Impl& DeviceD3D12Impl) :
// clang-format off
m_DeviceD3D12Impl{DeviceD3D12Impl},
- m_FreeAllocators {STD_ALLOCATOR_RAW_MEM(CComPtr<ID3D12CommandAllocator>, GetRawAllocator(), "Allocator for vector<CComPtr<ID3D12CommandAllocator>>")}
+ m_FreeAllocators (STD_ALLOCATOR_RAW_MEM(CComPtr<ID3D12CommandAllocator>, GetRawAllocator(), "Allocator for vector<CComPtr<ID3D12CommandAllocator>>"))
// clang-format on
{
}
diff --git a/Graphics/GraphicsEngineD3D12/src/D3D12DynamicHeap.cpp b/Graphics/GraphicsEngineD3D12/src/D3D12DynamicHeap.cpp
index 8ef02a34..17091b60 100644
--- a/Graphics/GraphicsEngineD3D12/src/D3D12DynamicHeap.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/D3D12DynamicHeap.cpp
@@ -75,7 +75,7 @@ D3D12DynamicMemoryManager::D3D12DynamicMemoryManager(IMemoryAllocator& Allo
Uint32 NumPagesToReserve,
Uint64 PageSize) :
m_DeviceD3D12Impl{DeviceD3D12Impl},
- m_AvailablePages{STD_ALLOCATOR_RAW_MEM(AvailablePagesMapElemType, Allocator, "Allocator for multimap<AvailablePagesMapElemType>")}
+ m_AvailablePages(STD_ALLOCATOR_RAW_MEM(AvailablePagesMapElemType, Allocator, "Allocator for multimap<AvailablePagesMapElemType>"))
{
for (Uint32 i = 0; i < NumPagesToReserve; ++i)
{
diff --git a/Graphics/GraphicsEngineD3D12/src/DescriptorHeap.cpp b/Graphics/GraphicsEngineD3D12/src/DescriptorHeap.cpp
index a2671346..a8234961 100644
--- a/Graphics/GraphicsEngineD3D12/src/DescriptorHeap.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/DescriptorHeap.cpp
@@ -158,8 +158,8 @@ CPUDescriptorHeap::CPUDescriptorHeap(IMemoryAllocator& Allocator,
// clang-format off
m_MemAllocator {Allocator },
m_DeviceD3D12Impl{DeviceD3D12Impl},
- m_HeapPool {STD_ALLOCATOR_RAW_MEM(DescriptorHeapAllocationManager, GetRawAllocator(), "Allocator for vector<DescriptorHeapAllocationManager>")},
- m_AvailableHeaps {STD_ALLOCATOR_RAW_MEM(size_t, GetRawAllocator(), "Allocator for unordered_set<size_t>")},
+ m_HeapPool (STD_ALLOCATOR_RAW_MEM(DescriptorHeapAllocationManager, GetRawAllocator(), "Allocator for vector<DescriptorHeapAllocationManager>")),
+ m_AvailableHeaps (STD_ALLOCATOR_RAW_MEM(size_t, GetRawAllocator(), "Allocator for unordered_set<size_t>")),
m_HeapDesc
{
Type,
@@ -403,7 +403,7 @@ DynamicSuballocationsManager::DynamicSuballocationsManager(IMemoryAllocator& Al
// clang-format off
m_ParentGPUHeap {ParentGPUHeap },
m_DynamicChunkSize{DynamicChunkSize},
- m_Suballocations {STD_ALLOCATOR_RAW_MEM(DescriptorHeapAllocation, GetRawAllocator(), "Allocator for vector<DescriptorHeapAllocation>")},
+ m_Suballocations (STD_ALLOCATOR_RAW_MEM(DescriptorHeapAllocation, GetRawAllocator(), "Allocator for vector<DescriptorHeapAllocation>")),
m_ManagerName {std::move(ManagerName)}
// clang-format on
{
diff --git a/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp
index 731af7bb..be8e06b9 100644
--- a/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp
@@ -223,7 +223,7 @@ PipelineStateD3D12Impl ::PipelineStateD3D12Impl(IReferenceCounters* pRefCou
RasterizerStateDesc_To_D3D12_RASTERIZER_DESC(GraphicsPipeline.RasterizerDesc, d3d12PSODesc.RasterizerState);
DepthStencilStateDesc_To_D3D12_DEPTH_STENCIL_DESC(GraphicsPipeline.DepthStencilDesc, d3d12PSODesc.DepthStencilState);
- std::vector<D3D12_INPUT_ELEMENT_DESC, STDAllocatorRawMem<D3D12_INPUT_ELEMENT_DESC>> d312InputElements{STD_ALLOCATOR_RAW_MEM(D3D12_INPUT_ELEMENT_DESC, GetRawAllocator(), "Allocator for vector<D3D12_INPUT_ELEMENT_DESC>")};
+ std::vector<D3D12_INPUT_ELEMENT_DESC, STDAllocatorRawMem<D3D12_INPUT_ELEMENT_DESC>> d312InputElements(STD_ALLOCATOR_RAW_MEM(D3D12_INPUT_ELEMENT_DESC, GetRawAllocator(), "Allocator for vector<D3D12_INPUT_ELEMENT_DESC>"));
const auto& InputLayout = m_Desc.GraphicsPipeline.InputLayout;
if (InputLayout.NumElements > 0)
diff --git a/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp
index 3b9d9907..9e9ce33d 100644
--- a/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp
@@ -100,7 +100,7 @@ RenderDeviceD3D12Impl ::RenderDeviceD3D12Impl(IReferenceCounters* pRefC
{RawMemAllocator, *this, EngineCI.GPUDescriptorHeapSize[0], EngineCI.GPUDescriptorHeapDynamicSize[0], D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE},
{RawMemAllocator, *this, EngineCI.GPUDescriptorHeapSize[1], EngineCI.GPUDescriptorHeapDynamicSize[1], D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER, D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE}
},
- m_ContextPool {STD_ALLOCATOR_RAW_MEM(PooledCommandContext, GetRawAllocator(), "Allocator for vector<PooledCommandContext>")},
+ m_ContextPool (STD_ALLOCATOR_RAW_MEM(PooledCommandContext, GetRawAllocator(), "Allocator for vector<PooledCommandContext>")),
m_DynamicMemoryManager{GetRawAllocator(), *this, EngineCI.NumDynamicHeapPagesToReserve, EngineCI.DynamicHeapPageSize},
m_MipsGenerator {pd3d12Device}
// clang-format on
diff --git a/Graphics/GraphicsEngineD3D12/src/RootSignature.cpp b/Graphics/GraphicsEngineD3D12/src/RootSignature.cpp
index 26134228..c3000945 100644
--- a/Graphics/GraphicsEngineD3D12/src/RootSignature.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/RootSignature.cpp
@@ -160,8 +160,8 @@ size_t RootSignature::RootParamsManager::GetHash() const
}
RootSignature::RootSignature() :
- m_RootParams(GetRawAllocator()),
- m_MemAllocator(GetRawAllocator()),
+ m_RootParams{GetRawAllocator()},
+ m_MemAllocator{GetRawAllocator()},
m_StaticSamplers(STD_ALLOCATOR_RAW_MEM(StaticSamplerAttribs, GetRawAllocator(), "Allocator for vector<StaticSamplerAttribs>"))
{
for (size_t i = 0; i < m_SrvCbvUavRootTablesMap.size(); ++i)
@@ -478,7 +478,7 @@ void RootSignature::Finalize(ID3D12Device* pd3d12Device)
auto TotalParams = m_RootParams.GetNumRootTables() + m_RootParams.GetNumRootViews();
- std::vector<D3D12_ROOT_PARAMETER, STDAllocatorRawMem<D3D12_ROOT_PARAMETER>> D3D12Parameters(TotalParams, D3D12_ROOT_PARAMETER(), STD_ALLOCATOR_RAW_MEM(D3D12_ROOT_PARAMETER, GetRawAllocator(), "Allocator for vector<D3D12_ROOT_PARAMETER>"));
+ std::vector<D3D12_ROOT_PARAMETER, STDAllocatorRawMem<D3D12_ROOT_PARAMETER>> D3D12Parameters(TotalParams, D3D12_ROOT_PARAMETER{}, STD_ALLOCATOR_RAW_MEM(D3D12_ROOT_PARAMETER, GetRawAllocator(), "Allocator for vector<D3D12_ROOT_PARAMETER>"));
for (Uint32 rt = 0; rt < m_RootParams.GetNumRootTables(); ++rt)
{
const auto& RootTable = m_RootParams.GetRootTable(rt);
diff --git a/Graphics/GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp
index 86c2a068..fe9d135f 100644
--- a/Graphics/GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp
@@ -48,7 +48,7 @@ SwapChainD3D12Impl::SwapChainD3D12Impl(IReferenceCounters* pRefCounters,
FSDesc,
pNativeWndHandle
},
- m_pBackBufferRTV{STD_ALLOCATOR_RAW_MEM(RefCntAutoPtr<ITextureView>, GetRawAllocator(), "Allocator for vector<RefCntAutoPtr<ITextureView>>")}
+ m_pBackBufferRTV(STD_ALLOCATOR_RAW_MEM(RefCntAutoPtr<ITextureView>, GetRawAllocator(), "Allocator for vector<RefCntAutoPtr<ITextureView>>"))
// clang-format on
{
pRenderDeviceD3D12->LockCmdQueueAndRun(