summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D12
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-10-08 03:07:45 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-10-08 03:07:45 +0000
commitd9bbb0a115a3b8f33045ffb3c9029cb36ad9b42a (patch)
treea4ea203e305074efff1cefc402b9b21a7444974a /Graphics/GraphicsEngineD3D12
parentOpenGL backend: cosmetic code changes (diff)
downloadDiligentCore-d9bbb0a115a3b8f33045ffb3c9029cb36ad9b42a.tar.gz
DiligentCore-d9bbb0a115a3b8f33045ffb3c9029cb36ad9b42a.zip
D3D12 backend: cosmetic code changes + fixed clang build error
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
-rw-r--r--Graphics/GraphicsEngineD3D12/include/BufferD3D12Impl.h6
-rw-r--r--Graphics/GraphicsEngineD3D12/include/CommandListD3D12Impl.h12
-rw-r--r--Graphics/GraphicsEngineD3D12/include/CommandQueueD3D12Impl.h2
-rw-r--r--Graphics/GraphicsEngineD3D12/include/D3D12DynamicHeap.h10
-rw-r--r--Graphics/GraphicsEngineD3D12/include/DescriptorHeap.h66
-rw-r--r--Graphics/GraphicsEngineD3D12/include/RootSignature.h52
-rw-r--r--Graphics/GraphicsEngineD3D12/include/ShaderResourceCacheD3D12.h6
-rw-r--r--Graphics/GraphicsEngineD3D12/include/ShaderResourceLayoutD3D12.h14
-rw-r--r--Graphics/GraphicsEngineD3D12/include/ShaderVariableD3D12.h4
-rw-r--r--Graphics/GraphicsEngineD3D12/include/TextureD3D12Impl.h8
-rw-r--r--Graphics/GraphicsEngineD3D12/src/BufferViewD3D12Impl.cpp11
-rw-r--r--Graphics/GraphicsEngineD3D12/src/CommandContext.cpp8
-rw-r--r--Graphics/GraphicsEngineD3D12/src/CommandListManager.cpp4
-rw-r--r--Graphics/GraphicsEngineD3D12/src/CommandQueueD3D12Impl.cpp10
-rw-r--r--Graphics/GraphicsEngineD3D12/src/DescriptorHeap.cpp53
-rw-r--r--Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp3
-rw-r--r--Graphics/GraphicsEngineD3D12/src/FenceD3D12Impl.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp4
-rw-r--r--Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp12
-rw-r--r--Graphics/GraphicsEngineD3D12/src/RootSignature.cpp4
-rw-r--r--Graphics/GraphicsEngineD3D12/src/SamplerD3D12Impl.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D12/src/ShaderD3D12Impl.cpp9
-rw-r--r--Graphics/GraphicsEngineD3D12/src/ShaderResourceBindingD3D12Impl.cpp11
-rw-r--r--Graphics/GraphicsEngineD3D12/src/ShaderResourceLayoutD3D12.cpp6
-rw-r--r--Graphics/GraphicsEngineD3D12/src/ShaderResourcesD3D12.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D12/src/ShaderVariableD3D12.cpp6
-rw-r--r--Graphics/GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp12
-rw-r--r--Graphics/GraphicsEngineD3D12/src/TextureD3D12Impl.cpp4
-rw-r--r--Graphics/GraphicsEngineD3D12/src/TextureViewD3D12Impl.cpp11
30 files changed, 197 insertions, 159 deletions
diff --git a/Graphics/GraphicsEngineD3D12/include/BufferD3D12Impl.h b/Graphics/GraphicsEngineD3D12/include/BufferD3D12Impl.h
index a66deb45..1b92a511 100644
--- a/Graphics/GraphicsEngineD3D12/include/BufferD3D12Impl.h
+++ b/Graphics/GraphicsEngineD3D12/include/BufferD3D12Impl.h
@@ -84,10 +84,10 @@ public:
D3D12_CPU_DESCRIPTOR_HANDLE GetCBVHandle(){return m_CBVDescriptorAllocation.GetCpuHandle();}
private:
- virtual void CreateViewInternal( const struct BufferViewDesc &ViewDesc, IBufferView **ppView, bool bIsDefaultView )override;
+ virtual void CreateViewInternal( const struct BufferViewDesc& ViewDesc, IBufferView** ppView, bool bIsDefaultView )override;
- void CreateUAV( struct BufferViewDesc &UAVDesc, D3D12_CPU_DESCRIPTOR_HANDLE UAVDescriptor );
- void CreateSRV( struct BufferViewDesc &SRVDesc, D3D12_CPU_DESCRIPTOR_HANDLE SRVDescriptor );
+ void CreateUAV( struct BufferViewDesc& UAVDesc, D3D12_CPU_DESCRIPTOR_HANDLE UAVDescriptor );
+ void CreateSRV( struct BufferViewDesc& SRVDesc, D3D12_CPU_DESCRIPTOR_HANDLE SRVDescriptor );
void CreateCBV( D3D12_CPU_DESCRIPTOR_HANDLE CBVDescriptor );
DescriptorHeapAllocation m_CBVDescriptorAllocation;
diff --git a/Graphics/GraphicsEngineD3D12/include/CommandListD3D12Impl.h b/Graphics/GraphicsEngineD3D12/include/CommandListD3D12Impl.h
index 5bb92d51..8fe3342a 100644
--- a/Graphics/GraphicsEngineD3D12/include/CommandListD3D12Impl.h
+++ b/Graphics/GraphicsEngineD3D12/include/CommandListD3D12Impl.h
@@ -45,9 +45,13 @@ public:
RenderDeviceD3D12Impl* pDevice,
DeviceContextD3D12Impl* pDeferredCtx,
RenderDeviceD3D12Impl::PooledCommandContext&& pCmdContext) :
- TCommandListBase(pRefCounters, pDevice),
- m_pDeferredCtx (pDeferredCtx),
- m_pCmdContext (std::move(pCmdContext))
+ TCommandListBase
+ {
+ pRefCounters,
+ pDevice
+ },
+ m_pDeferredCtx {pDeferredCtx },
+ m_pCmdContext {std::move(pCmdContext)}
{
}
@@ -66,7 +70,7 @@ public:
RenderDeviceD3D12Impl::PooledCommandContext Close(RefCntAutoPtr<DeviceContextD3D12Impl>& pDeferredCtx)
{
- pDeferredCtx = std::move(m_pDeferredCtx);
+ pDeferredCtx = std::move(m_pDeferredCtx);
return std::move(m_pCmdContext);
}
diff --git a/Graphics/GraphicsEngineD3D12/include/CommandQueueD3D12Impl.h b/Graphics/GraphicsEngineD3D12/include/CommandQueueD3D12Impl.h
index d299b8e6..647fffe8 100644
--- a/Graphics/GraphicsEngineD3D12/include/CommandQueueD3D12Impl.h
+++ b/Graphics/GraphicsEngineD3D12/include/CommandQueueD3D12Impl.h
@@ -39,7 +39,7 @@ class CommandQueueD3D12Impl final : public ObjectBase<ICommandQueueD3D12>
public:
using TBase = ObjectBase<ICommandQueueD3D12>;
- CommandQueueD3D12Impl(IReferenceCounters *pRefCounters, ID3D12CommandQueue *pd3d12NativeCmdQueue, ID3D12Fence *pd3d12Fence);
+ CommandQueueD3D12Impl(IReferenceCounters* pRefCounters, ID3D12CommandQueue* pd3d12NativeCmdQueue, ID3D12Fence* pd3d12Fence);
~CommandQueueD3D12Impl();
virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface)override final;
diff --git a/Graphics/GraphicsEngineD3D12/include/D3D12DynamicHeap.h b/Graphics/GraphicsEngineD3D12/include/D3D12DynamicHeap.h
index c0ab8a2f..c6a1a5f6 100644
--- a/Graphics/GraphicsEngineD3D12/include/D3D12DynamicHeap.h
+++ b/Graphics/GraphicsEngineD3D12/include/D3D12DynamicHeap.h
@@ -45,11 +45,11 @@ struct D3D12DynamicAllocation
, Uint64 _DvpCtxFrameNumber
#endif
)noexcept :
- pBuffer (pBuff),
- Offset (_Offset),
- Size (_Size),
- CPUAddress (_CPUAddress),
- GPUAddress (_GPUAddress)
+ pBuffer {pBuff },
+ Offset {_Offset },
+ Size {_Size },
+ CPUAddress {_CPUAddress },
+ GPUAddress {_GPUAddress }
#ifdef DEVELOPMENT
, DvpCtxFrameNumber(_DvpCtxFrameNumber)
#endif
diff --git a/Graphics/GraphicsEngineD3D12/include/DescriptorHeap.h b/Graphics/GraphicsEngineD3D12/include/DescriptorHeap.h
index ddab7122..2f992c9b 100644
--- a/Graphics/GraphicsEngineD3D12/include/DescriptorHeap.h
+++ b/Graphics/GraphicsEngineD3D12/include/DescriptorHeap.h
@@ -65,27 +65,27 @@ class DescriptorHeapAllocation
public:
// Creates null allocation
DescriptorHeapAllocation() noexcept :
- m_NumHandles (1), // One null descriptor handle
- m_pDescriptorHeap (nullptr),
- m_DescriptorSize (0)
+ m_NumHandles {1 }, // One null descriptor handle
+ m_pDescriptorHeap {nullptr},
+ m_DescriptorSize {0 }
{
m_FirstCpuHandle.ptr = 0;
m_FirstGpuHandle.ptr = 0;
}
// Initializes non-null allocation
- DescriptorHeapAllocation( IDescriptorAllocator& Allocator,
- ID3D12DescriptorHeap* pHeap,
- D3D12_CPU_DESCRIPTOR_HANDLE CpuHandle,
- D3D12_GPU_DESCRIPTOR_HANDLE GpuHandle,
- Uint32 NHandles,
- Uint16 AllocationManagerId )noexcept :
- m_FirstCpuHandle (CpuHandle),
- m_FirstGpuHandle (GpuHandle),
- m_pAllocator (&Allocator),
- m_NumHandles (NHandles),
- m_pDescriptorHeap (pHeap),
- m_AllocationManagerId (AllocationManagerId)
+ DescriptorHeapAllocation(IDescriptorAllocator& Allocator,
+ ID3D12DescriptorHeap* pHeap,
+ D3D12_CPU_DESCRIPTOR_HANDLE CpuHandle,
+ D3D12_GPU_DESCRIPTOR_HANDLE GpuHandle,
+ Uint32 NHandles,
+ Uint16 AllocationManagerId)noexcept :
+ m_FirstCpuHandle {CpuHandle },
+ m_FirstGpuHandle {GpuHandle },
+ m_pAllocator {&Allocator },
+ m_NumHandles {NHandles },
+ m_pDescriptorHeap {pHeap },
+ m_AllocationManagerId {AllocationManagerId}
{
VERIFY_EXPR(m_pAllocator != nullptr && m_pDescriptorHeap != nullptr);
auto DescriptorSize = m_pAllocator->GetDescriptorSize();
@@ -95,13 +95,13 @@ public:
// Move constructor (copy is not allowed)
DescriptorHeapAllocation(DescriptorHeapAllocation&& Allocation)noexcept :
- m_FirstCpuHandle (std::move(Allocation.m_FirstCpuHandle)),
- m_FirstGpuHandle (std::move(Allocation.m_FirstGpuHandle)),
- m_NumHandles (std::move(Allocation.m_NumHandles)),
- m_pAllocator (std::move(Allocation.m_pAllocator)),
- m_AllocationManagerId (std::move(Allocation.m_AllocationManagerId)),
- m_pDescriptorHeap (std::move(Allocation.m_pDescriptorHeap) ),
- m_DescriptorSize (std::move(Allocation.m_DescriptorSize) )
+ m_FirstCpuHandle {std::move(Allocation.m_FirstCpuHandle) },
+ m_FirstGpuHandle {std::move(Allocation.m_FirstGpuHandle) },
+ m_NumHandles {std::move(Allocation.m_NumHandles) },
+ m_pAllocator {std::move(Allocation.m_pAllocator) },
+ m_AllocationManagerId {std::move(Allocation.m_AllocationManagerId)},
+ m_pDescriptorHeap {std::move(Allocation.m_pDescriptorHeap) },
+ m_DescriptorSize {std::move(Allocation.m_DescriptorSize) }
{
Allocation.Reset();
}
@@ -240,19 +240,19 @@ public:
// = default causes compiler error when instantiating std::vector::emplace_back() in Visual Studio 2015 (Version 14.0.23107.0 D14REL)
DescriptorHeapAllocationManager(DescriptorHeapAllocationManager&& rhs)noexcept :
- m_ParentAllocator (rhs.m_ParentAllocator),
- m_DeviceD3D12Impl (rhs.m_DeviceD3D12Impl),
- m_ThisManagerId (rhs.m_ThisManagerId),
- m_HeapDesc (rhs.m_HeapDesc),
- m_DescriptorSize (rhs.m_DescriptorSize),
- m_NumDescriptorsInAllocation(rhs.m_NumDescriptorsInAllocation),
- m_FirstCPUHandle (rhs.m_FirstCPUHandle),
- m_FirstGPUHandle (rhs.m_FirstGPUHandle),
- m_MaxAllocatedSize (rhs.m_MaxAllocatedSize),
+ m_ParentAllocator {rhs.m_ParentAllocator },
+ m_DeviceD3D12Impl {rhs.m_DeviceD3D12Impl },
+ m_ThisManagerId {rhs.m_ThisManagerId },
+ m_HeapDesc {rhs.m_HeapDesc },
+ m_DescriptorSize {rhs.m_DescriptorSize },
+ m_NumDescriptorsInAllocation{rhs.m_NumDescriptorsInAllocation},
+ m_FirstCPUHandle {rhs.m_FirstCPUHandle },
+ m_FirstGPUHandle {rhs.m_FirstGPUHandle },
+ m_MaxAllocatedSize {rhs.m_MaxAllocatedSize },
// Mutex is not movable
//m_FreeBlockManagerMutex (std::move(rhs.m_FreeBlockManagerMutex))
- m_FreeBlockManager (std::move(rhs.m_FreeBlockManager)),
- m_pd3d12DescriptorHeap (std::move(rhs.m_pd3d12DescriptorHeap))
+ m_FreeBlockManager {std::move(rhs.m_FreeBlockManager) },
+ m_pd3d12DescriptorHeap {std::move(rhs.m_pd3d12DescriptorHeap)}
{
rhs.m_NumDescriptorsInAllocation = 0; // Must be set to zero so that debug check in dtor passes
rhs.m_ThisManagerId = static_cast<size_t>(-1);
diff --git a/Graphics/GraphicsEngineD3D12/include/RootSignature.h b/Graphics/GraphicsEngineD3D12/include/RootSignature.h
index 60ca5424..817dfd21 100644
--- a/Graphics/GraphicsEngineD3D12/include/RootSignature.h
+++ b/Graphics/GraphicsEngineD3D12/include/RootSignature.h
@@ -46,8 +46,8 @@ public:
UINT RegisterSpace,
D3D12_SHADER_VISIBILITY Visibility,
SHADER_RESOURCE_VARIABLE_TYPE VarType)noexcept :
- m_RootIndex (RootIndex),
- m_ShaderVarType(VarType)
+ m_RootIndex {RootIndex},
+ m_ShaderVarType{VarType }
{
VERIFY(ParameterType == D3D12_ROOT_PARAMETER_TYPE_CBV || ParameterType == D3D12_ROOT_PARAMETER_TYPE_SRV || ParameterType == D3D12_ROOT_PARAMETER_TYPE_UAV, "Unexpected parameter type - verify argument list");
m_RootParam.ParameterType = ParameterType;
@@ -63,8 +63,8 @@ public:
UINT NumDwords,
D3D12_SHADER_VISIBILITY Visibility,
SHADER_RESOURCE_VARIABLE_TYPE VarType)noexcept :
- m_RootIndex (RootIndex),
- m_ShaderVarType(VarType)
+ m_RootIndex {RootIndex},
+ m_ShaderVarType{VarType }
{
VERIFY(ParameterType == D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS, "Unexpected parameter type - verify argument list");
m_RootParam.ParameterType = ParameterType;
@@ -80,8 +80,8 @@ public:
D3D12_DESCRIPTOR_RANGE* pRanges,
D3D12_SHADER_VISIBILITY Visibility,
SHADER_RESOURCE_VARIABLE_TYPE VarType)noexcept :
- m_RootIndex (RootIndex),
- m_ShaderVarType(VarType)
+ m_RootIndex {RootIndex},
+ m_ShaderVarType{VarType }
{
VERIFY(ParameterType == D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE, "Unexpected parameter type - verify argument list");
VERIFY_EXPR(pRanges != nullptr);
@@ -107,24 +107,24 @@ public:
RootParameter(const RootParameter& RP,
UINT NumRanges,
D3D12_DESCRIPTOR_RANGE* pRanges)noexcept :
- m_RootParam (RP.m_RootParam),
- m_DescriptorTableSize(RP.m_DescriptorTableSize),
- m_ShaderVarType (RP.m_ShaderVarType),
- m_RootIndex (RP.m_RootIndex)
+ m_RootParam {RP.m_RootParam },
+ m_DescriptorTableSize{RP.m_DescriptorTableSize},
+ m_ShaderVarType {RP.m_ShaderVarType },
+ m_RootIndex {RP.m_RootIndex }
{
VERIFY(m_RootParam.ParameterType == D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE, "Root parameter is expected to be a descriptor table");
VERIFY(NumRanges >= m_RootParam.DescriptorTable.NumDescriptorRanges, "New table must be larger than source one");
- auto &DstTbl = m_RootParam.DescriptorTable;
+ auto& DstTbl = m_RootParam.DescriptorTable;
DstTbl.NumDescriptorRanges = NumRanges;
DstTbl.pDescriptorRanges = pRanges;
- const auto &SrcTbl = RP.m_RootParam.DescriptorTable;
+ const auto& SrcTbl = RP.m_RootParam.DescriptorTable;
memcpy(pRanges, SrcTbl.pDescriptorRanges, SrcTbl.NumDescriptorRanges * sizeof(D3D12_DESCRIPTOR_RANGE));
#ifdef _DEBUG
{
Uint32 dbgTableSize = 0;
for (Uint32 r = 0; r < SrcTbl.NumDescriptorRanges; ++r)
{
- const auto &Range = SrcTbl.pDescriptorRanges[r];
+ const auto& Range = SrcTbl.pDescriptorRanges[r];
dbgTableSize = std::max(dbgTableSize, Range.OffsetInDescriptorsFromTableStart + Range.NumDescriptors);
}
VERIFY(dbgTableSize == m_DescriptorTableSize, "Incorrect descriptor table size");
@@ -146,7 +146,7 @@ public:
UINT OffsetFromTableStart = D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND)
{
VERIFY(m_RootParam.ParameterType == D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE, "Incorrect parameter table: descriptor table is expected");
- auto &Tbl = m_RootParam.DescriptorTable;
+ auto& Tbl = m_RootParam.DescriptorTable;
VERIFY(RangeIndex < Tbl.NumDescriptorRanges, "Invalid descriptor range index");
D3D12_DESCRIPTOR_RANGE &range = const_cast<D3D12_DESCRIPTOR_RANGE &>(Tbl.pDescriptorRanges[RangeIndex]);
VERIFY(range.RangeType == static_cast<D3D12_DESCRIPTOR_RANGE_TYPE>(-1), "Descriptor range has already been initialized. m_DescriptorTableSize may be updated incorrectly");
@@ -186,14 +186,14 @@ public:
{
case D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE:
{
- const auto &tbl0 = m_RootParam.DescriptorTable;
- const auto &tbl1 = rhs.m_RootParam.DescriptorTable;
+ const auto& tbl0 = m_RootParam.DescriptorTable;
+ const auto& tbl1 = rhs.m_RootParam.DescriptorTable;
if(tbl0.NumDescriptorRanges != tbl1.NumDescriptorRanges)
return false;
for(UINT r=0; r < tbl0.NumDescriptorRanges; ++r)
{
- const auto &rng0 = tbl0.pDescriptorRanges[r];
- const auto &rng1 = tbl1.pDescriptorRanges[r];
+ const auto& rng0 = tbl0.pDescriptorRanges[r];
+ const auto& rng1 = tbl1.pDescriptorRanges[r];
if( memcmp(&rng0, &rng1, sizeof(rng0)) != 0)
return false;
}
@@ -202,8 +202,8 @@ public:
case D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS:
{
- const auto &cnst0 = m_RootParam.Constants;
- const auto &cnst1 = rhs.m_RootParam.Constants;
+ const auto& cnst0 = m_RootParam.Constants;
+ const auto& cnst1 = rhs.m_RootParam.Constants;
if (memcmp(&cnst0, &cnst1, sizeof(cnst0)) != 0)
return false;
}
@@ -213,8 +213,8 @@ public:
case D3D12_ROOT_PARAMETER_TYPE_SRV:
case D3D12_ROOT_PARAMETER_TYPE_UAV:
{
- const auto &dscr0 = m_RootParam.Descriptor;
- const auto &dscr1 = rhs.m_RootParam.Descriptor;
+ const auto& dscr0 = m_RootParam.Descriptor;
+ const auto& dscr1 = rhs.m_RootParam.Descriptor;
if (memcmp(&dscr0, &dscr1, sizeof(dscr0)) != 0)
return false;
}
@@ -240,11 +240,11 @@ public:
{
case D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE:
{
- const auto &tbl = m_RootParam.DescriptorTable;
+ const auto& tbl = m_RootParam.DescriptorTable;
HashCombine(hash, tbl.NumDescriptorRanges);
for (UINT r = 0; r < tbl.NumDescriptorRanges; ++r)
{
- const auto &rng = tbl.pDescriptorRanges[r];
+ const auto& rng = tbl.pDescriptorRanges[r];
HashCombine(hash, rng.BaseShaderRegister, rng.NumDescriptors, rng.OffsetInDescriptorsFromTableStart, rng.RangeType, rng.RegisterSpace);
}
}
@@ -252,7 +252,7 @@ public:
case D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS:
{
- const auto &cnst = m_RootParam.Constants;
+ const auto& cnst = m_RootParam.Constants;
HashCombine(hash, cnst.Num32BitValues, cnst.RegisterSpace, cnst.ShaderRegister);
}
break;
@@ -261,7 +261,7 @@ public:
case D3D12_ROOT_PARAMETER_TYPE_SRV:
case D3D12_ROOT_PARAMETER_TYPE_UAV:
{
- const auto &dscr = m_RootParam.Descriptor;
+ const auto& dscr = m_RootParam.Descriptor;
HashCombine(hash, dscr.RegisterSpace, dscr.ShaderRegister);
}
break;
diff --git a/Graphics/GraphicsEngineD3D12/include/ShaderResourceCacheD3D12.h b/Graphics/GraphicsEngineD3D12/include/ShaderResourceCacheD3D12.h
index 0a2418a2..1c65fb66 100644
--- a/Graphics/GraphicsEngineD3D12/include/ShaderResourceCacheD3D12.h
+++ b/Graphics/GraphicsEngineD3D12/include/ShaderResourceCacheD3D12.h
@@ -108,7 +108,7 @@ public:
ShaderResourceCacheD3D12(DbgCacheContentType dbgContentType)
#ifdef _DEBUG
- : m_DbgContentType(dbgContentType)
+ : m_DbgContentType{dbgContentType}
#endif
{
}
@@ -138,8 +138,8 @@ public:
{
public:
RootTable(Uint32 NumResources, Resource *pResources)noexcept :
- m_NumResources(NumResources),
- m_pResources (pResources)
+ m_NumResources{NumResources},
+ m_pResources {pResources }
{}
inline const Resource& GetResource(Uint32 OffsetFromTableStart,
diff --git a/Graphics/GraphicsEngineD3D12/include/ShaderResourceLayoutD3D12.h b/Graphics/GraphicsEngineD3D12/include/ShaderResourceLayoutD3D12.h
index c268e71c..53f7bb01 100644
--- a/Graphics/GraphicsEngineD3D12/include/ShaderResourceLayoutD3D12.h
+++ b/Graphics/GraphicsEngineD3D12/include/ShaderResourceLayoutD3D12.h
@@ -169,13 +169,13 @@ public:
Uint32 _RootIndex,
Uint32 _OffsetFromTableStart,
Uint32 _SamplerId)noexcept :
- ParentResLayout (_ParentLayout),
- Attribs (_Attribs),
- ResourceType (static_cast<Uint16>(_ResType)),
- VariableType (static_cast<Uint16>(_VariableType)),
- RootIndex (static_cast<Uint16>(_RootIndex)),
- SamplerId (static_cast<Uint16>(_SamplerId)),
- OffsetFromTableStart( _OffsetFromTableStart )
+ ParentResLayout {_ParentLayout },
+ Attribs {_Attribs },
+ ResourceType {static_cast<Uint16>(_ResType) },
+ VariableType {static_cast<Uint16>(_VariableType)},
+ RootIndex {static_cast<Uint16>(_RootIndex) },
+ SamplerId {static_cast<Uint16>(_SamplerId) },
+ OffsetFromTableStart{ _OffsetFromTableStart }
{
VERIFY(IsValidOffset(), "Offset must be valid");
VERIFY(IsValidRootIndex(), "Root index must be valid");
diff --git a/Graphics/GraphicsEngineD3D12/include/ShaderVariableD3D12.h b/Graphics/GraphicsEngineD3D12/include/ShaderVariableD3D12.h
index 3dde8259..d3a80679 100644
--- a/Graphics/GraphicsEngineD3D12/include/ShaderVariableD3D12.h
+++ b/Graphics/GraphicsEngineD3D12/include/ShaderVariableD3D12.h
@@ -123,8 +123,8 @@ class ShaderVariableD3D12Impl final : public IShaderResourceVariableD3D
public:
ShaderVariableD3D12Impl(ShaderVariableManagerD3D12& ParentManager,
const ShaderResourceLayoutD3D12::D3D12Resource& Resource) :
- m_ParentManager(ParentManager),
- m_Resource(Resource)
+ m_ParentManager{ParentManager},
+ m_Resource {Resource }
{}
ShaderVariableD3D12Impl (const ShaderVariableD3D12Impl&) = delete;
diff --git a/Graphics/GraphicsEngineD3D12/include/TextureD3D12Impl.h b/Graphics/GraphicsEngineD3D12/include/TextureD3D12Impl.h
index aa305072..e179a81d 100644
--- a/Graphics/GraphicsEngineD3D12/include/TextureD3D12Impl.h
+++ b/Graphics/GraphicsEngineD3D12/include/TextureD3D12Impl.h
@@ -83,10 +83,10 @@ protected:
void CreateViewInternal( const struct TextureViewDesc &ViewDesc, ITextureView **ppView, bool bIsDefaultView )override final;
//void PrepareD3D12InitData(const TextureData &InitData, Uint32 NumSubresources, std::vector<D3D12_SUBRESOURCE_DATA> &D3D12InitData);
- void CreateSRV( TextureViewDesc &SRVDesc, D3D12_CPU_DESCRIPTOR_HANDLE SRVHandle );
- void CreateRTV( TextureViewDesc &RTVDesc, D3D12_CPU_DESCRIPTOR_HANDLE RTVHandle );
- void CreateDSV( TextureViewDesc &DSVDesc, D3D12_CPU_DESCRIPTOR_HANDLE DSVHandle );
- void CreateUAV( TextureViewDesc &UAVDesc, D3D12_CPU_DESCRIPTOR_HANDLE UAVHandle );
+ void CreateSRV( TextureViewDesc& SRVDesc, D3D12_CPU_DESCRIPTOR_HANDLE SRVHandle );
+ void CreateRTV( TextureViewDesc& RTVDesc, D3D12_CPU_DESCRIPTOR_HANDLE RTVHandle );
+ void CreateDSV( TextureViewDesc& DSVDesc, D3D12_CPU_DESCRIPTOR_HANDLE DSVHandle );
+ void CreateUAV( TextureViewDesc& UAVDesc, D3D12_CPU_DESCRIPTOR_HANDLE UAVHandle );
D3D12_PLACED_SUBRESOURCE_FOOTPRINT* m_StagingFootprints = nullptr;
diff --git a/Graphics/GraphicsEngineD3D12/src/BufferViewD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/BufferViewD3D12Impl.cpp
index 19b827bb..32dd5d89 100644
--- a/Graphics/GraphicsEngineD3D12/src/BufferViewD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/BufferViewD3D12Impl.cpp
@@ -33,8 +33,15 @@ BufferViewD3D12Impl::BufferViewD3D12Impl( IReferenceCounters* pRefCounter
IBuffer* pBuffer,
DescriptorHeapAllocation&& HandleAlloc,
bool bIsDefaultView ) :
- TBufferViewBase( pRefCounters, pDevice, ViewDesc, pBuffer, bIsDefaultView ),
- m_DescriptorHandle( std::move(HandleAlloc) )
+ TBufferViewBase
+ {
+ pRefCounters,
+ pDevice,
+ ViewDesc,
+ pBuffer,
+ bIsDefaultView
+ },
+ m_DescriptorHandle{std::move(HandleAlloc)}
{
}
diff --git a/Graphics/GraphicsEngineD3D12/src/CommandContext.cpp b/Graphics/GraphicsEngineD3D12/src/CommandContext.cpp
index 6c1de874..4d327ecd 100644
--- a/Graphics/GraphicsEngineD3D12/src/CommandContext.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/CommandContext.cpp
@@ -34,10 +34,10 @@ namespace Diligent
{
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_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.reserve(MaxPendingBarriers);
CmdListManager.CreateNewCommandList(&m_pCommandList, &m_pCurrentAllocator);
diff --git a/Graphics/GraphicsEngineD3D12/src/CommandListManager.cpp b/Graphics/GraphicsEngineD3D12/src/CommandListManager.cpp
index 3d570824..764a3c23 100644
--- a/Graphics/GraphicsEngineD3D12/src/CommandListManager.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/CommandListManager.cpp
@@ -29,8 +29,8 @@ namespace Diligent
{
CommandListManager::CommandListManager(RenderDeviceD3D12Impl& DeviceD3D12Impl) :
- m_DeviceD3D12Impl(DeviceD3D12Impl),
- m_FreeAllocators(STD_ALLOCATOR_RAW_MEM(CComPtr<ID3D12CommandAllocator>, GetRawAllocator(), "Allocator for vector<CComPtr<ID3D12CommandAllocator>>"))
+ m_DeviceD3D12Impl{DeviceD3D12Impl},
+ m_FreeAllocators {STD_ALLOCATOR_RAW_MEM(CComPtr<ID3D12CommandAllocator>, GetRawAllocator(), "Allocator for vector<CComPtr<ID3D12CommandAllocator>>")}
{
}
diff --git a/Graphics/GraphicsEngineD3D12/src/CommandQueueD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/CommandQueueD3D12Impl.cpp
index 35ee1ef9..71857946 100644
--- a/Graphics/GraphicsEngineD3D12/src/CommandQueueD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/CommandQueueD3D12Impl.cpp
@@ -30,11 +30,11 @@ namespace Diligent
CommandQueueD3D12Impl::CommandQueueD3D12Impl(IReferenceCounters* pRefCounters,
ID3D12CommandQueue* pd3d12NativeCmdQueue,
ID3D12Fence* pd3d12Fence) :
- TBase(pRefCounters),
- m_pd3d12CmdQueue(pd3d12NativeCmdQueue),
- m_d3d12Fence(pd3d12Fence),
- m_NextFenceValue(1),
- m_WaitForGPUEventHandle( CreateEvent(nullptr, false, false, nullptr) )
+ TBase{pRefCounters},
+ m_pd3d12CmdQueue {pd3d12NativeCmdQueue},
+ m_d3d12Fence {pd3d12Fence },
+ m_NextFenceValue {1 },
+ m_WaitForGPUEventHandle{CreateEvent(nullptr, false, false, nullptr)}
{
VERIFY_EXPR(m_WaitForGPUEventHandle != INVALID_HANDLE_VALUE);
m_d3d12Fence->Signal(0);
diff --git a/Graphics/GraphicsEngineD3D12/src/DescriptorHeap.cpp b/Graphics/GraphicsEngineD3D12/src/DescriptorHeap.cpp
index b7822e71..c16e75a2 100644
--- a/Graphics/GraphicsEngineD3D12/src/DescriptorHeap.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/DescriptorHeap.cpp
@@ -35,13 +35,13 @@ DescriptorHeapAllocationManager::DescriptorHeapAllocationManager(IMemoryAllocato
IDescriptorAllocator& ParentAllocator,
size_t ThisManagerId,
const D3D12_DESCRIPTOR_HEAP_DESC& HeapDesc) :
- m_ParentAllocator (ParentAllocator),
- m_DeviceD3D12Impl (DeviceD3D12Impl),
- m_ThisManagerId (ThisManagerId),
- m_HeapDesc (HeapDesc),
- m_DescriptorSize (DeviceD3D12Impl.GetD3D12Device()->GetDescriptorHandleIncrementSize(m_HeapDesc.Type)),
- m_NumDescriptorsInAllocation (HeapDesc.NumDescriptors),
- m_FreeBlockManager (HeapDesc.NumDescriptors, Allocator)
+ m_ParentAllocator {ParentAllocator},
+ m_DeviceD3D12Impl {DeviceD3D12Impl},
+ m_ThisManagerId {ThisManagerId },
+ m_HeapDesc {HeapDesc },
+ m_DescriptorSize {DeviceD3D12Impl.GetD3D12Device()->GetDescriptorHandleIncrementSize(m_HeapDesc.Type)},
+ m_NumDescriptorsInAllocation {HeapDesc.NumDescriptors},
+ m_FreeBlockManager {HeapDesc.NumDescriptors, Allocator}
{
auto pDevice = DeviceD3D12Impl.GetD3D12Device();
@@ -63,14 +63,14 @@ DescriptorHeapAllocationManager::DescriptorHeapAllocationManager(IMemoryAllocato
ID3D12DescriptorHeap* pd3d12DescriptorHeap,
Uint32 FirstDescriptor,
Uint32 NumDescriptors):
- m_ParentAllocator (ParentAllocator),
- m_DeviceD3D12Impl (DeviceD3D12Impl),
- m_ThisManagerId (ThisManagerId),
- m_HeapDesc (pd3d12DescriptorHeap->GetDesc()),
- m_DescriptorSize (DeviceD3D12Impl.GetD3D12Device()->GetDescriptorHandleIncrementSize(m_HeapDesc.Type)),
- m_NumDescriptorsInAllocation (NumDescriptors),
- m_FreeBlockManager (NumDescriptors, Allocator),
- m_pd3d12DescriptorHeap (pd3d12DescriptorHeap)
+ m_ParentAllocator {ParentAllocator},
+ m_DeviceD3D12Impl {DeviceD3D12Impl},
+ m_ThisManagerId {ThisManagerId },
+ m_HeapDesc {pd3d12DescriptorHeap->GetDesc()},
+ m_DescriptorSize {DeviceD3D12Impl.GetD3D12Device()->GetDescriptorHandleIncrementSize(m_HeapDesc.Type)},
+ m_NumDescriptorsInAllocation {NumDescriptors},
+ m_FreeBlockManager {NumDescriptors, Allocator},
+ m_pd3d12DescriptorHeap {pd3d12DescriptorHeap}
{
m_FirstCPUHandle = pd3d12DescriptorHeap->GetCPUDescriptorHandleForHeapStart();
m_FirstCPUHandle.ptr += m_DescriptorSize * FirstDescriptor;
@@ -151,10 +151,10 @@ CPUDescriptorHeap::CPUDescriptorHeap(IMemoryAllocator& Allocator,
Uint32 NumDescriptorsInHeap,
D3D12_DESCRIPTOR_HEAP_TYPE Type,
D3D12_DESCRIPTOR_HEAP_FLAGS Flags) :
- 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_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_HeapDesc
{
Type,
@@ -162,7 +162,7 @@ CPUDescriptorHeap::CPUDescriptorHeap(IMemoryAllocator& Allocator,
Flags,
1 // NodeMask
},
- m_DescriptorSize(DeviceD3D12Impl.GetD3D12Device()->GetDescriptorHandleIncrementSize(Type))
+ m_DescriptorSize{DeviceD3D12Impl.GetD3D12Device()->GetDescriptorHandleIncrementSize(Type)}
{
// Create one pool
m_HeapPool.emplace_back(m_MemAllocator, m_DeviceD3D12Impl, *this, 0, m_HeapDesc);
@@ -302,7 +302,7 @@ GPUDescriptorHeap::GPUDescriptorHeap(IMemoryAllocator& Allocator,
Uint32 NumDynamicDescriptors,
D3D12_DESCRIPTOR_HEAP_TYPE Type,
D3D12_DESCRIPTOR_HEAP_FLAGS Flags) :
- m_DeviceD3D12Impl(Device),
+ m_DeviceD3D12Impl{Device},
m_HeapDesc
{
Type,
@@ -310,17 +310,18 @@ GPUDescriptorHeap::GPUDescriptorHeap(IMemoryAllocator& Allocator,
Flags,
1 // UINT NodeMask;
},
- m_pd3d12DescriptorHeap(
+ m_pd3d12DescriptorHeap
+ {
[&]
{
CComPtr<ID3D12DescriptorHeap> pHeap;
Device.GetD3D12Device()->CreateDescriptorHeap(&m_HeapDesc, __uuidof(pHeap), reinterpret_cast<void**>(&pHeap));
return pHeap;
}()
- ),
- m_DescriptorSize( Device.GetD3D12Device()->GetDescriptorHandleIncrementSize(Type) ),
- m_HeapAllocationManager(Allocator, Device, *this, 0, m_pd3d12DescriptorHeap, 0, NumDescriptorsInHeap),
- m_DynamicAllocationsManager(Allocator, Device, *this, 1, m_pd3d12DescriptorHeap, NumDescriptorsInHeap, NumDynamicDescriptors )
+ },
+ m_DescriptorSize {Device.GetD3D12Device()->GetDescriptorHandleIncrementSize(Type)},
+ m_HeapAllocationManager {Allocator, Device, *this, 0, m_pd3d12DescriptorHeap, 0, NumDescriptorsInHeap},
+ m_DynamicAllocationsManager{Allocator, Device, *this, 1, m_pd3d12DescriptorHeap, NumDescriptorsInHeap, NumDynamicDescriptors}
{
}
diff --git a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp
index 42532555..9562e9f0 100644
--- a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp
@@ -87,7 +87,7 @@ namespace Diligent
GetContextObjectName("SAMPLER dynamic descriptor allocator", bIsDeferred, ContextId)
}
},
- m_CmdListAllocator(GetRawAllocator(), sizeof(CommandListD3D12Impl), 64 )
+ m_CmdListAllocator{GetRawAllocator(), sizeof(CommandListD3D12Impl), 64}
{
RequestCommandContext(pDeviceD3D12Impl);
diff --git a/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp b/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp
index a11d698a..845e7d19 100644
--- a/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp
@@ -54,7 +54,7 @@ public:
using TBase = EngineFactoryD3DBase<IEngineFactoryD3D12, DeviceType::D3D12>;
EngineFactoryD3D12Impl() :
- TBase(IID_EngineFactoryD3D12)
+ TBase{IID_EngineFactoryD3D12}
{}
void CreateDeviceAndContextsD3D12(const EngineD3D12CreateInfo& EngineCI,
@@ -154,6 +154,7 @@ void EngineFactoryD3D12Impl::CreateDeviceAndContextsD3D12(const EngineD3D12Creat
if (SUCCEEDED(D3D12GetDebugInterface(__uuidof(debugController), reinterpret_cast<void**>(static_cast<ID3D12Debug**>(&debugController)) )))
{
debugController->EnableDebugLayer();
+ //static_cast<ID3D12Debug1*>(debugController.p)->SetEnableSynchronizedCommandQueueValidation(FALSE);
}
}
diff --git a/Graphics/GraphicsEngineD3D12/src/FenceD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/FenceD3D12Impl.cpp
index 603e28b9..06a052c7 100644
--- a/Graphics/GraphicsEngineD3D12/src/FenceD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/FenceD3D12Impl.cpp
@@ -34,7 +34,7 @@ namespace Diligent
FenceD3D12Impl :: FenceD3D12Impl(IReferenceCounters* pRefCounters,
RenderDeviceD3D12Impl* pDevice,
const FenceDesc& Desc) :
- TFenceBase(pRefCounters, pDevice, Desc)
+ TFenceBase{pRefCounters, pDevice, Desc}
{
auto* pd3d12Device = ValidatedCast<RenderDeviceD3D12Impl>(pDevice)->GetD3D12Device();
auto hr = pd3d12Device->CreateFence(0, D3D12_FENCE_FLAG_NONE, __uuidof(m_pd3d12Fence), reinterpret_cast<void**>(static_cast<ID3D12Fence**>(&m_pd3d12Fence)));
diff --git a/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp
index 443219e8..f6e576dc 100644
--- a/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp
@@ -63,8 +63,8 @@ private:
PipelineStateD3D12Impl :: PipelineStateD3D12Impl(IReferenceCounters* pRefCounters,
RenderDeviceD3D12Impl* pDeviceD3D12,
const PipelineStateDesc& PipelineDesc) :
- TPipelineStateBase(pRefCounters, pDeviceD3D12, PipelineDesc),
- m_SRBMemAllocator(GetRawAllocator())
+ TPipelineStateBase{pRefCounters, pDeviceD3D12, PipelineDesc},
+ m_SRBMemAllocator {GetRawAllocator()}
{
auto pd3d12Device = pDeviceD3D12->GetD3D12Device();
const auto& ResourceLayout = m_Desc.ResourceLayout;
diff --git a/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp
index 78a6dfb8..3100da7b 100644
--- a/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp
@@ -65,9 +65,9 @@ RenderDeviceD3D12Impl :: RenderDeviceD3D12Impl(IReferenceCounters* pRe
sizeof(FenceD3D12Impl)
}
},
- m_pd3d12Device (pd3d12Device),
- m_EngineAttribs (EngineCI),
- m_CmdListManager(*this),
+ m_pd3d12Device {pd3d12Device},
+ m_EngineAttribs {EngineCI },
+ m_CmdListManager{*this },
m_CPUDescriptorHeaps
{
{RawMemAllocator, *this, EngineCI.CPUDescriptorHeapAllocationSize[0], D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, D3D12_DESCRIPTOR_HEAP_FLAG_NONE},
@@ -80,9 +80,9 @@ RenderDeviceD3D12Impl :: RenderDeviceD3D12Impl(IReferenceCounters* pRe
{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_DynamicMemoryManager(GetRawAllocator(), *this, EngineCI.NumDynamicHeapPagesToReserve, EngineCI.DynamicHeapPageSize),
- m_MipsGenerator(pd3d12Device)
+ m_ContextPool {STD_ALLOCATOR_RAW_MEM(PooledCommandContext, GetRawAllocator(), "Allocator for vector<PooledCommandContext>")},
+ m_DynamicMemoryManager{GetRawAllocator(), *this, EngineCI.NumDynamicHeapPagesToReserve, EngineCI.DynamicHeapPageSize},
+ m_MipsGenerator {pd3d12Device}
{
m_DeviceCaps.DevType = DeviceType::D3D12;
m_DeviceCaps.MajorVersion = 12;
diff --git a/Graphics/GraphicsEngineD3D12/src/RootSignature.cpp b/Graphics/GraphicsEngineD3D12/src/RootSignature.cpp
index cc9174e6..a4895d33 100644
--- a/Graphics/GraphicsEngineD3D12/src/RootSignature.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/RootSignature.cpp
@@ -37,8 +37,8 @@ namespace Diligent
{
RootSignature::RootParamsManager::RootParamsManager(IMemoryAllocator &MemAllocator):
- m_MemAllocator(MemAllocator),
- m_pMemory(nullptr, STDDeleter<void, IMemoryAllocator>(MemAllocator))
+ m_MemAllocator{MemAllocator},
+ m_pMemory{nullptr, STDDeleter<void, IMemoryAllocator>(MemAllocator)}
{}
size_t RootSignature::RootParamsManager::GetRequiredMemorySize(Uint32 NumExtraRootTables,
diff --git a/Graphics/GraphicsEngineD3D12/src/SamplerD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/SamplerD3D12Impl.cpp
index 3bbe42d3..b7fd54e5 100644
--- a/Graphics/GraphicsEngineD3D12/src/SamplerD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/SamplerD3D12Impl.cpp
@@ -32,7 +32,7 @@ namespace Diligent
SamplerD3D12Impl::SamplerD3D12Impl(IReferenceCounters* pRefCounters,
RenderDeviceD3D12Impl* pRenderDeviceD3D12,
const SamplerDesc& SamplerDesc) :
- TSamplerBase(pRefCounters, pRenderDeviceD3D12, SamplerDesc)
+ TSamplerBase{pRefCounters, pRenderDeviceD3D12, SamplerDesc}
{
auto *pD3D12Device = pRenderDeviceD3D12->GetD3D12Device();
D3D12_SAMPLER_DESC D3D12SamplerDesc =
diff --git a/Graphics/GraphicsEngineD3D12/src/ShaderD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/ShaderD3D12Impl.cpp
index d7505a04..509ef10b 100644
--- a/Graphics/GraphicsEngineD3D12/src/ShaderD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/ShaderD3D12Impl.cpp
@@ -35,8 +35,13 @@ namespace Diligent
ShaderD3D12Impl::ShaderD3D12Impl(IReferenceCounters* pRefCounters,
RenderDeviceD3D12Impl* pRenderDeviceD3D12,
const ShaderCreateInfo& ShaderCI) :
- TShaderBase(pRefCounters, pRenderDeviceD3D12, ShaderCI.Desc),
- ShaderD3DBase(ShaderCI)
+ TShaderBase
+ {
+ pRefCounters,
+ pRenderDeviceD3D12,
+ ShaderCI.Desc
+ },
+ ShaderD3DBase{ShaderCI}
{
// Load shader resources
auto& Allocator = GetRawAllocator();
diff --git a/Graphics/GraphicsEngineD3D12/src/ShaderResourceBindingD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/ShaderResourceBindingD3D12Impl.cpp
index 3084821e..b5c465a8 100644
--- a/Graphics/GraphicsEngineD3D12/src/ShaderResourceBindingD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/ShaderResourceBindingD3D12Impl.cpp
@@ -33,9 +33,14 @@ namespace Diligent
ShaderResourceBindingD3D12Impl::ShaderResourceBindingD3D12Impl(IReferenceCounters* pRefCounters,
PipelineStateD3D12Impl* pPSO,
bool IsPSOInternal) :
- TBase( pRefCounters, pPSO, IsPSOInternal ),
- m_ShaderResourceCache(ShaderResourceCacheD3D12::DbgCacheContentType::SRBResources),
- m_NumShaders(static_cast<decltype(m_NumShaders)>(pPSO->GetNumShaders()))
+ TBase
+ {
+ pRefCounters,
+ pPSO,
+ IsPSOInternal
+ },
+ m_ShaderResourceCache{ShaderResourceCacheD3D12::DbgCacheContentType::SRBResources},
+ m_NumShaders {static_cast<decltype(m_NumShaders)>(pPSO->GetNumShaders())}
{
auto* ppShaders = pPSO->GetShaders();
diff --git a/Graphics/GraphicsEngineD3D12/src/ShaderResourceLayoutD3D12.cpp b/Graphics/GraphicsEngineD3D12/src/ShaderResourceLayoutD3D12.cpp
index a6e9abac..5eebd84f 100644
--- a/Graphics/GraphicsEngineD3D12/src/ShaderResourceLayoutD3D12.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/ShaderResourceLayoutD3D12.cpp
@@ -115,9 +115,9 @@ ShaderResourceLayoutD3D12::ShaderResourceLayoutD3D12(IObject&
Uint32 NumAllowedTypes,
ShaderResourceCacheD3D12* pResourceCache,
RootSignature* pRootSig) :
- m_Owner (Owner),
- m_pd3d12Device (pd3d12Device),
- m_pResources (std::move(pSrcResources))
+ m_Owner {Owner},
+ m_pd3d12Device {pd3d12Device},
+ m_pResources {std::move(pSrcResources)}
{
VERIFY_EXPR( (pResourceCache != nullptr) ^ (pRootSig != nullptr) );
diff --git a/Graphics/GraphicsEngineD3D12/src/ShaderResourcesD3D12.cpp b/Graphics/GraphicsEngineD3D12/src/ShaderResourcesD3D12.cpp
index c27d8258..75acee70 100644
--- a/Graphics/GraphicsEngineD3D12/src/ShaderResourcesD3D12.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/ShaderResourcesD3D12.cpp
@@ -33,7 +33,7 @@ namespace Diligent
ShaderResourcesD3D12::ShaderResourcesD3D12(ID3DBlob* pShaderBytecode, const ShaderDesc& ShdrDesc, const char* CombinedSamplerSuffix) :
- ShaderResources(ShdrDesc.ShaderType)
+ ShaderResources{ShdrDesc.ShaderType}
{
class NewResourceHandler
{
diff --git a/Graphics/GraphicsEngineD3D12/src/ShaderVariableD3D12.cpp b/Graphics/GraphicsEngineD3D12/src/ShaderVariableD3D12.cpp
index cf057aeb..851d0fdd 100644
--- a/Graphics/GraphicsEngineD3D12/src/ShaderVariableD3D12.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/ShaderVariableD3D12.cpp
@@ -56,10 +56,10 @@ ShaderVariableManagerD3D12::ShaderVariableManagerD3D12(IObject&
const SHADER_RESOURCE_VARIABLE_TYPE* AllowedVarTypes,
Uint32 NumAllowedTypes,
ShaderResourceCacheD3D12& ResourceCache) :
- m_Owner (Owner),
- m_ResourceCache (ResourceCache)
+ m_Owner {Owner},
+ m_ResourceCache {ResourceCache}
#ifdef _DEBUG
- , m_DbgAllocator (Allocator)
+ , m_DbgAllocator {Allocator}
#endif
{
diff --git a/Graphics/GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp
index c8bb6068..d9790df6 100644
--- a/Graphics/GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/SwapChainD3D12Impl.cpp
@@ -38,8 +38,16 @@ SwapChainD3D12Impl::SwapChainD3D12Impl(IReferenceCounters* pRefCounters,
RenderDeviceD3D12Impl* pRenderDeviceD3D12,
DeviceContextD3D12Impl* pDeviceContextD3D12,
void* pNativeWndHandle) :
- TSwapChainBase(pRefCounters, pRenderDeviceD3D12, pDeviceContextD3D12, SCDesc, FSDesc, pNativeWndHandle),
- m_pBackBufferRTV(STD_ALLOCATOR_RAW_MEM(RefCntAutoPtr<ITextureView>, GetRawAllocator(), "Allocator for vector<RefCntAutoPtr<ITextureView>>"))
+ TSwapChainBase
+ {
+ pRefCounters,
+ pRenderDeviceD3D12,
+ pDeviceContextD3D12,
+ SCDesc,
+ FSDesc,
+ pNativeWndHandle
+ },
+ m_pBackBufferRTV{STD_ALLOCATOR_RAW_MEM(RefCntAutoPtr<ITextureView>, GetRawAllocator(), "Allocator for vector<RefCntAutoPtr<ITextureView>>")}
{
pRenderDeviceD3D12->LockCommandQueue(0,
[this](ICommandQueueD3D12 *pCmdQueue)
diff --git a/Graphics/GraphicsEngineD3D12/src/TextureD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/TextureD3D12Impl.cpp
index 92d8f9b0..945e4428 100644
--- a/Graphics/GraphicsEngineD3D12/src/TextureD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/TextureD3D12Impl.cpp
@@ -125,7 +125,7 @@ TextureD3D12Impl :: TextureD3D12Impl(IReferenceCounters* pRefCounters,
RenderDeviceD3D12Impl* pRenderDeviceD3D12,
const TextureDesc& TexDesc,
const TextureData* pInitData /*= nullptr*/) :
- TTextureBase(pRefCounters, TexViewObjAllocator, pRenderDeviceD3D12, TexDesc)
+ TTextureBase{pRefCounters, TexViewObjAllocator, pRenderDeviceD3D12, TexDesc}
{
if (m_Desc.Usage == USAGE_STATIC && (pInitData == nullptr || pInitData->pSubResources == nullptr))
LOG_ERROR_AND_THROW("Static textures must be initialized with data at creation time: pInitData can't be null");
@@ -384,7 +384,7 @@ TextureD3D12Impl::TextureD3D12Impl(IReferenceCounters* pRefCounters,
const TextureDesc& TexDesc,
RESOURCE_STATE InitialState,
ID3D12Resource* pTexture) :
- TTextureBase(pRefCounters, TexViewObjAllocator, pDeviceD3D12, InitTexDescFromD3D12Resource(pTexture, TexDesc))
+ TTextureBase{pRefCounters, TexViewObjAllocator, pDeviceD3D12, InitTexDescFromD3D12Resource(pTexture, TexDesc)}
{
m_pd3d12Resource = pTexture;
SetState(InitialState);
diff --git a/Graphics/GraphicsEngineD3D12/src/TextureViewD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/TextureViewD3D12Impl.cpp
index 4966f54d..93090b3e 100644
--- a/Graphics/GraphicsEngineD3D12/src/TextureViewD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/TextureViewD3D12Impl.cpp
@@ -36,8 +36,15 @@ TextureViewD3D12Impl::TextureViewD3D12Impl( IReferenceCounters* pRefCount
DescriptorHeapAllocation&& TexArraySRVDescriptor,
DescriptorHeapAllocation&& MipLevelUAVDescriptors,
bool bIsDefaultView) :
- TTextureViewBase( pRefCounters, pDevice, ViewDesc, pTexture, bIsDefaultView ),
- m_Descriptor(std::move(Descriptor))
+ TTextureViewBase
+ {
+ pRefCounters,
+ pDevice,
+ ViewDesc,
+ pTexture,
+ bIsDefaultView
+ },
+ m_Descriptor{std::move(Descriptor)}
{
if (!TexArraySRVDescriptor.IsNull() && !MipLevelUAVDescriptors.IsNull())
{