summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D12
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2021-03-04 20:46:21 +0000
committerassiduous <assiduous@diligentgraphics.com>2021-03-19 00:38:15 +0000
commit4f5a4499cf0eee3761788eb6a422cd25e02ace40 (patch)
treea4caf790bcb35483de2eaa56b7735230a0f1b7a5 /Graphics/GraphicsEngineD3D12
parentMinor updates to ValidatePipelineResourceSignatureDesc (diff)
downloadDiligentCore-4f5a4499cf0eee3761788eb6a422cd25e02ace40.tar.gz
DiligentCore-4f5a4499cf0eee3761788eb6a422cd25e02ace40.zip
Refactored passing template arguments to base classes
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
-rw-r--r--Graphics/GraphicsEngineD3D12/CMakeLists.txt1
-rw-r--r--Graphics/GraphicsEngineD3D12/include/BottomLevelASD3D12Impl.hpp4
-rw-r--r--Graphics/GraphicsEngineD3D12/include/BufferD3D12Impl.hpp6
-rw-r--r--Graphics/GraphicsEngineD3D12/include/BufferViewD3D12Impl.hpp6
-rw-r--r--Graphics/GraphicsEngineD3D12/include/DeviceContextD3D12Impl.hpp18
-rw-r--r--Graphics/GraphicsEngineD3D12/include/EngineD3D12ImplTraits.hpp122
-rw-r--r--Graphics/GraphicsEngineD3D12/include/FenceD3D12Impl.hpp4
-rw-r--r--Graphics/GraphicsEngineD3D12/include/FramebufferD3D12Impl.hpp4
-rw-r--r--Graphics/GraphicsEngineD3D12/include/PipelineResourceSignatureD3D12Impl.hpp7
-rw-r--r--Graphics/GraphicsEngineD3D12/include/PipelineStateD3D12Impl.hpp6
-rw-r--r--Graphics/GraphicsEngineD3D12/include/QueryD3D12Impl.hpp4
-rw-r--r--Graphics/GraphicsEngineD3D12/include/RenderDeviceD3D12Impl.hpp49
-rw-r--r--Graphics/GraphicsEngineD3D12/include/RenderPassD3D12Impl.hpp4
-rw-r--r--Graphics/GraphicsEngineD3D12/include/SamplerD3D12Impl.hpp4
-rw-r--r--Graphics/GraphicsEngineD3D12/include/ShaderBindingTableD3D12Impl.hpp4
-rw-r--r--Graphics/GraphicsEngineD3D12/include/ShaderD3D12Impl.hpp4
-rw-r--r--Graphics/GraphicsEngineD3D12/include/ShaderResourceBindingD3D12Impl.hpp4
-rw-r--r--Graphics/GraphicsEngineD3D12/include/TextureD3D12Impl.hpp6
-rw-r--r--Graphics/GraphicsEngineD3D12/include/TextureViewD3D12Impl.hpp4
-rw-r--r--Graphics/GraphicsEngineD3D12/include/TopLevelASD3D12Impl.hpp4
-rw-r--r--Graphics/GraphicsEngineD3D12/src/BufferViewD3D12Impl.cpp3
21 files changed, 165 insertions, 103 deletions
diff --git a/Graphics/GraphicsEngineD3D12/CMakeLists.txt b/Graphics/GraphicsEngineD3D12/CMakeLists.txt
index a5c643c1..a497ad68 100644
--- a/Graphics/GraphicsEngineD3D12/CMakeLists.txt
+++ b/Graphics/GraphicsEngineD3D12/CMakeLists.txt
@@ -16,6 +16,7 @@ set(INCLUDE
include/d3dx12_win.h
include/DescriptorHeap.hpp
include/DeviceContextD3D12Impl.hpp
+ include/EngineD3D12ImplTraits.hpp
include/D3D12DynamicHeap.hpp
include/FenceD3D12Impl.hpp
include/FramebufferD3D12Impl.hpp
diff --git a/Graphics/GraphicsEngineD3D12/include/BottomLevelASD3D12Impl.hpp b/Graphics/GraphicsEngineD3D12/include/BottomLevelASD3D12Impl.hpp
index 2017b0f3..9ffba139 100644
--- a/Graphics/GraphicsEngineD3D12/include/BottomLevelASD3D12Impl.hpp
+++ b/Graphics/GraphicsEngineD3D12/include/BottomLevelASD3D12Impl.hpp
@@ -40,10 +40,10 @@ namespace Diligent
{
/// Bottom-level acceleration structure object implementation in Direct3D12 backend.
-class BottomLevelASD3D12Impl final : public BottomLevelASBase<IBottomLevelASD3D12, RenderDeviceD3D12Impl>, public D3D12ResourceBase
+class BottomLevelASD3D12Impl final : public BottomLevelASBase<EngineD3D12ImplTraits>, public D3D12ResourceBase
{
public:
- using TBottomLevelASBase = BottomLevelASBase<IBottomLevelASD3D12, RenderDeviceD3D12Impl>;
+ using TBottomLevelASBase = BottomLevelASBase<EngineD3D12ImplTraits>;
BottomLevelASD3D12Impl(IReferenceCounters* pRefCounters,
class RenderDeviceD3D12Impl* pDeviceD3D12,
diff --git a/Graphics/GraphicsEngineD3D12/include/BufferD3D12Impl.hpp b/Graphics/GraphicsEngineD3D12/include/BufferD3D12Impl.hpp
index 33dde6e4..49dbb25b 100644
--- a/Graphics/GraphicsEngineD3D12/include/BufferD3D12Impl.hpp
+++ b/Graphics/GraphicsEngineD3D12/include/BufferD3D12Impl.hpp
@@ -41,13 +41,11 @@
namespace Diligent
{
-class FixedBlockMemoryAllocator;
-
/// Buffer object implementation in Direct3D12 backend.
-class BufferD3D12Impl final : public BufferBase<IBufferD3D12, RenderDeviceD3D12Impl, BufferViewD3D12Impl, FixedBlockMemoryAllocator>, public D3D12ResourceBase
+class BufferD3D12Impl final : public BufferBase<EngineD3D12ImplTraits>, public D3D12ResourceBase
{
public:
- using TBufferBase = BufferBase<IBufferD3D12, RenderDeviceD3D12Impl, BufferViewD3D12Impl, FixedBlockMemoryAllocator>;
+ using TBufferBase = BufferBase<EngineD3D12ImplTraits>;
BufferD3D12Impl(IReferenceCounters* pRefCounters,
FixedBlockMemoryAllocator& BuffViewObjMemAllocator,
diff --git a/Graphics/GraphicsEngineD3D12/include/BufferViewD3D12Impl.hpp b/Graphics/GraphicsEngineD3D12/include/BufferViewD3D12Impl.hpp
index 74d541e1..beeeeb49 100644
--- a/Graphics/GraphicsEngineD3D12/include/BufferViewD3D12Impl.hpp
+++ b/Graphics/GraphicsEngineD3D12/include/BufferViewD3D12Impl.hpp
@@ -40,15 +40,15 @@ namespace Diligent
{
/// Buffer view implementation in Direct3D12 backend.
-class BufferViewD3D12Impl final : public BufferViewBase<IBufferViewD3D12, RenderDeviceD3D12Impl>
+class BufferViewD3D12Impl final : public BufferViewBase<EngineD3D12ImplTraits>
{
public:
- using TBufferViewBase = BufferViewBase<IBufferViewD3D12, RenderDeviceD3D12Impl>;
+ using TBufferViewBase = BufferViewBase<EngineD3D12ImplTraits>;
BufferViewD3D12Impl(IReferenceCounters* pRefCounters,
RenderDeviceD3D12Impl* pDevice,
const BufferViewDesc& ViewDesc,
- IBuffer* pBuffer,
+ BufferD3D12Impl* pBuffer,
DescriptorHeapAllocation&& HandleAlloc,
bool bIsDefaultView);
diff --git a/Graphics/GraphicsEngineD3D12/include/DeviceContextD3D12Impl.hpp b/Graphics/GraphicsEngineD3D12/include/DeviceContextD3D12Impl.hpp
index 91c3f6f7..7fb46e60 100644
--- a/Graphics/GraphicsEngineD3D12/include/DeviceContextD3D12Impl.hpp
+++ b/Graphics/GraphicsEngineD3D12/include/DeviceContextD3D12Impl.hpp
@@ -48,25 +48,11 @@
namespace Diligent
{
-struct DeviceContextD3D12ImplTraits
-{
- using BufferType = BufferD3D12Impl;
- using TextureType = TextureD3D12Impl;
- using PipelineStateType = PipelineStateD3D12Impl;
- using DeviceType = RenderDeviceD3D12Impl;
- using ICommandQueueType = ICommandQueueD3D12;
- using QueryType = QueryD3D12Impl;
- using FramebufferType = FramebufferD3D12Impl;
- using RenderPassType = RenderPassD3D12Impl;
- using BottomLevelASType = BottomLevelASD3D12Impl;
- using TopLevelASType = TopLevelASD3D12Impl;
-};
-
/// Device context implementation in Direct3D12 backend.
-class DeviceContextD3D12Impl final : public DeviceContextNextGenBase<IDeviceContextD3D12, DeviceContextD3D12ImplTraits>
+class DeviceContextD3D12Impl final : public DeviceContextNextGenBase<EngineD3D12ImplTraits>
{
public:
- using TDeviceContextBase = DeviceContextNextGenBase<IDeviceContextD3D12, DeviceContextD3D12ImplTraits>;
+ using TDeviceContextBase = DeviceContextNextGenBase<EngineD3D12ImplTraits>;
DeviceContextD3D12Impl(IReferenceCounters* pRefCounters,
RenderDeviceD3D12Impl* pDevice,
diff --git a/Graphics/GraphicsEngineD3D12/include/EngineD3D12ImplTraits.hpp b/Graphics/GraphicsEngineD3D12/include/EngineD3D12ImplTraits.hpp
new file mode 100644
index 00000000..deb6d970
--- /dev/null
+++ b/Graphics/GraphicsEngineD3D12/include/EngineD3D12ImplTraits.hpp
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2019-2021 Diligent Graphics LLC
+ * Copyright 2015-2019 Egor Yusov
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * In no event and under no legal theory, whether in tort (including negligence),
+ * contract, or otherwise, unless required by applicable law (such as deliberate
+ * and grossly negligent acts) or agreed to in writing, shall any Contributor be
+ * liable for any damages, including any direct, indirect, special, incidental,
+ * or consequential damages of any character arising as a result of this License or
+ * out of the use or inability to use the software (including but not limited to damages
+ * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
+ * all other commercial damages or losses), even if such Contributor has been advised
+ * of the possibility of such damages.
+ */
+
+#pragma once
+
+/// \file
+/// Declaration of Diligent::EngineD3D12ImplTraits struct
+
+#include "RenderDeviceD3D12.h"
+#include "PipelineStateD3D12.h"
+#include "ShaderResourceBindingD3D12.h"
+#include "BufferD3D12.h"
+#include "BufferViewD3D12.h"
+#include "TextureD3D12.h"
+#include "TextureViewD3D12.h"
+#include "ShaderD3D12.h"
+#include "SamplerD3D12.h"
+#include "FenceD3D12.h"
+#include "QueryD3D12.h"
+#include "RenderPass.h"
+#include "Framebuffer.h"
+#include "BottomLevelASD3D12.h"
+#include "TopLevelASD3D12.h"
+#include "ShaderBindingTableD3D12.h"
+#include "PipelineResourceSignature.h"
+#include "CommandQueueD3D12.h"
+#include "DeviceContextD3D12.h"
+
+namespace Diligent
+{
+
+class RenderDeviceD3D12Impl;
+class DeviceContextD3D12Impl;
+class PipelineStateD3D12Impl;
+class ShaderResourceBindingD3D12Impl;
+class BufferD3D12Impl;
+class BufferViewD3D12Impl;
+class TextureD3D12Impl;
+class TextureViewD3D12Impl;
+class ShaderD3D12Impl;
+class SamplerD3D12Impl;
+class FenceD3D12Impl;
+class QueryD3D12Impl;
+class RenderPassD3D12Impl;
+class FramebufferD3D12Impl;
+class BottomLevelASD3D12Impl;
+class TopLevelASD3D12Impl;
+class ShaderBindingTableD3D12Impl;
+class PipelineResourceSignatureD3D12Impl;
+
+class FixedBlockMemoryAllocator;
+
+struct EngineD3D12ImplTraits
+{
+ using RenderDeviceInterface = IRenderDeviceD3D12;
+ using DeviceContextInterface = IDeviceContextD3D12;
+ using PipelineStateInterface = IPipelineStateD3D12;
+ using ShaderResourceBindingInterface = IShaderResourceBindingD3D12;
+ using BufferInterface = IBufferD3D12;
+ using BufferViewInterface = IBufferViewD3D12;
+ using TextureInterface = ITextureD3D12;
+ using TextureViewInterface = ITextureViewD3D12;
+ using ShaderInterface = IShaderD3D12;
+ using SamplerInterface = ISamplerD3D12;
+ using FenceInterface = IFenceD3D12;
+ using QueryInterface = IQueryD3D12;
+ using RenderPassInterface = IRenderPass;
+ using FramebufferInterface = IFramebuffer;
+ using BottomLevelASInterface = IBottomLevelASD3D12;
+ using TopLevelASInterface = ITopLevelASD3D12;
+ using ShaderBindingTableInterface = IShaderBindingTableD3D12;
+ using PipelineResourceSignatureInterface = IPipelineResourceSignature;
+ using CommandQueueInterface = ICommandQueueD3D12;
+
+ using RenderDeviceImplType = RenderDeviceD3D12Impl;
+ using DeviceContextImplType = DeviceContextD3D12Impl;
+ using PipelineStateImplType = PipelineStateD3D12Impl;
+ using ShaderResourceBindingImplType = ShaderResourceBindingD3D12Impl;
+ using BufferImplType = BufferD3D12Impl;
+ using BufferViewImplType = BufferViewD3D12Impl;
+ using TextureImplType = TextureD3D12Impl;
+ using TextureViewImplType = TextureViewD3D12Impl;
+ using ShaderImplType = ShaderD3D12Impl;
+ using SamplerImplType = SamplerD3D12Impl;
+ using FenceImplType = FenceD3D12Impl;
+ using QueryImplType = QueryD3D12Impl;
+ using RenderPassImplType = RenderPassD3D12Impl;
+ using FramebufferImplType = FramebufferD3D12Impl;
+ using BottomLevelASImplType = BottomLevelASD3D12Impl;
+ using TopLevelASImplType = TopLevelASD3D12Impl;
+ using ShaderBindingTableImplType = ShaderBindingTableD3D12Impl;
+ using PipelineResourceSignatureImplType = PipelineResourceSignatureD3D12Impl;
+
+ using BuffViewObjAllocatorType = FixedBlockMemoryAllocator;
+ using TexViewObjAllocatorType = FixedBlockMemoryAllocator;
+};
+
+} // namespace Diligent
diff --git a/Graphics/GraphicsEngineD3D12/include/FenceD3D12Impl.hpp b/Graphics/GraphicsEngineD3D12/include/FenceD3D12Impl.hpp
index e4ce0b8f..81437a65 100644
--- a/Graphics/GraphicsEngineD3D12/include/FenceD3D12Impl.hpp
+++ b/Graphics/GraphicsEngineD3D12/include/FenceD3D12Impl.hpp
@@ -39,10 +39,10 @@ namespace Diligent
{
/// Fence implementation in Direct3D12 backend.
-class FenceD3D12Impl final : public FenceBase<IFenceD3D12, RenderDeviceD3D12Impl>
+class FenceD3D12Impl final : public FenceBase<EngineD3D12ImplTraits>
{
public:
- using TFenceBase = FenceBase<IFenceD3D12, RenderDeviceD3D12Impl>;
+ using TFenceBase = FenceBase<EngineD3D12ImplTraits>;
FenceD3D12Impl(IReferenceCounters* pRefCounters,
RenderDeviceD3D12Impl* pDevice,
diff --git a/Graphics/GraphicsEngineD3D12/include/FramebufferD3D12Impl.hpp b/Graphics/GraphicsEngineD3D12/include/FramebufferD3D12Impl.hpp
index 38ac63cc..243107e4 100644
--- a/Graphics/GraphicsEngineD3D12/include/FramebufferD3D12Impl.hpp
+++ b/Graphics/GraphicsEngineD3D12/include/FramebufferD3D12Impl.hpp
@@ -38,10 +38,10 @@ namespace Diligent
{
/// Render pass implementation in Direct3D12 backend.
-class FramebufferD3D12Impl final : public FramebufferBase<IFramebuffer, RenderDeviceD3D12Impl>
+class FramebufferD3D12Impl final : public FramebufferBase<EngineD3D12ImplTraits>
{
public:
- using TFramebufferBase = FramebufferBase<IFramebuffer, RenderDeviceD3D12Impl>;
+ using TFramebufferBase = FramebufferBase<EngineD3D12ImplTraits>;
FramebufferD3D12Impl(IReferenceCounters* pRefCounters,
RenderDeviceD3D12Impl* pDevice,
diff --git a/Graphics/GraphicsEngineD3D12/include/PipelineResourceSignatureD3D12Impl.hpp b/Graphics/GraphicsEngineD3D12/include/PipelineResourceSignatureD3D12Impl.hpp
index 4dc06446..abfd1b1f 100644
--- a/Graphics/GraphicsEngineD3D12/include/PipelineResourceSignatureD3D12Impl.hpp
+++ b/Graphics/GraphicsEngineD3D12/include/PipelineResourceSignatureD3D12Impl.hpp
@@ -32,6 +32,7 @@
#include <array>
+#include "EngineD3D12ImplTraits.hpp"
#include "PipelineResourceSignatureBase.hpp"
#include "SRBMemoryAllocator.hpp"
#include "RootParamsManager.hpp"
@@ -42,16 +43,14 @@ namespace Diligent
{
class CommandContext;
-class RenderDeviceD3D12Impl;
-class DeviceContextD3D12Impl;
class ShaderVariableManagerD3D12;
struct D3DShaderResourceAttribs;
/// Implementation of the Diligent::PipelineResourceSignatureD3D12Impl class
-class PipelineResourceSignatureD3D12Impl final : public PipelineResourceSignatureBase<IPipelineResourceSignature, RenderDeviceD3D12Impl>
+class PipelineResourceSignatureD3D12Impl final : public PipelineResourceSignatureBase<EngineD3D12ImplTraits>
{
public:
- using TPipelineResourceSignatureBase = PipelineResourceSignatureBase<IPipelineResourceSignature, RenderDeviceD3D12Impl>;
+ using TPipelineResourceSignatureBase = PipelineResourceSignatureBase<EngineD3D12ImplTraits>;
PipelineResourceSignatureD3D12Impl(IReferenceCounters* pRefCounters,
RenderDeviceD3D12Impl* pDevice,
diff --git a/Graphics/GraphicsEngineD3D12/include/PipelineStateD3D12Impl.hpp b/Graphics/GraphicsEngineD3D12/include/PipelineStateD3D12Impl.hpp
index dd9f2344..c9e938c3 100644
--- a/Graphics/GraphicsEngineD3D12/include/PipelineStateD3D12Impl.hpp
+++ b/Graphics/GraphicsEngineD3D12/include/PipelineStateD3D12Impl.hpp
@@ -42,15 +42,13 @@
namespace Diligent
{
-class ShaderD3D12Impl;
class ShaderResourcesD3D12;
-class ShaderResourceBindingD3D12Impl;
/// Pipeline state object implementation in Direct3D12 backend.
-class PipelineStateD3D12Impl final : public PipelineStateBase<IPipelineStateD3D12, RenderDeviceD3D12Impl>
+class PipelineStateD3D12Impl final : public PipelineStateBase<EngineD3D12ImplTraits>
{
public:
- using TPipelineStateBase = PipelineStateBase<IPipelineStateD3D12, RenderDeviceD3D12Impl>;
+ using TPipelineStateBase = PipelineStateBase<EngineD3D12ImplTraits>;
PipelineStateD3D12Impl(IReferenceCounters* pRefCounters, RenderDeviceD3D12Impl* pDeviceD3D12, const GraphicsPipelineStateCreateInfo& CreateInfo);
PipelineStateD3D12Impl(IReferenceCounters* pRefCounters, RenderDeviceD3D12Impl* pDeviceD3D12, const ComputePipelineStateCreateInfo& CreateInfo);
diff --git a/Graphics/GraphicsEngineD3D12/include/QueryD3D12Impl.hpp b/Graphics/GraphicsEngineD3D12/include/QueryD3D12Impl.hpp
index f9317aec..b39b37c5 100644
--- a/Graphics/GraphicsEngineD3D12/include/QueryD3D12Impl.hpp
+++ b/Graphics/GraphicsEngineD3D12/include/QueryD3D12Impl.hpp
@@ -42,10 +42,10 @@ namespace Diligent
// https://microsoft.github.io/DirectX-Specs/d3d/CountersAndQueries.html#queries
/// Query implementation in Direct3D12 backend.
-class QueryD3D12Impl final : public QueryBase<IQueryD3D12, RenderDeviceD3D12Impl>
+class QueryD3D12Impl final : public QueryBase<EngineD3D12ImplTraits>
{
public:
- using TQueryBase = QueryBase<IQueryD3D12, RenderDeviceD3D12Impl>;
+ using TQueryBase = QueryBase<EngineD3D12ImplTraits>;
QueryD3D12Impl(IReferenceCounters* pRefCounters,
RenderDeviceD3D12Impl* pDevice,
diff --git a/Graphics/GraphicsEngineD3D12/include/RenderDeviceD3D12Impl.hpp b/Graphics/GraphicsEngineD3D12/include/RenderDeviceD3D12Impl.hpp
index 5224d50c..0a63ed51 100644
--- a/Graphics/GraphicsEngineD3D12/include/RenderDeviceD3D12Impl.hpp
+++ b/Graphics/GraphicsEngineD3D12/include/RenderDeviceD3D12Impl.hpp
@@ -32,19 +32,19 @@
#include <atomic>
-#include "RenderDeviceD3D12.h"
+#include "EngineD3D12ImplTraits.hpp"
#include "RenderDeviceD3DBase.hpp"
#include "RenderDeviceNextGenBase.hpp"
#include "DescriptorHeap.hpp"
#include "CommandListManager.hpp"
#include "CommandContext.hpp"
#include "D3D12DynamicHeap.hpp"
-#include "CommandQueueD3D12.h"
#include "GenerateMips.hpp"
#include "QueryManagerD3D12.hpp"
#include "DXCompiler.hpp"
#include "RootSignature.hpp"
+
// The macros below are only defined in Win SDK 19041+ and are missing in 17763
#ifndef D3D12_RAYTRACING_MAX_RAY_GENERATION_SHADER_THREADS
# define D3D12_RAYTRACING_MAX_RAY_GENERATION_SHADER_THREADS (1073741824)
@@ -66,53 +66,12 @@
namespace Diligent
{
-class RenderDeviceD3D12Impl;
-class PipelineStateD3D12Impl;
-class ShaderResourceBindingD3D12Impl;
-class BufferD3D12Impl;
-class BufferViewD3D12Impl;
-class TextureD3D12Impl;
-class TextureViewD3D12Impl;
-class ShaderD3D12Impl;
-class SamplerD3D12Impl;
-class FenceD3D12Impl;
-class QueryD3D12Impl;
-class RenderPassD3D12Impl;
-class FramebufferD3D12Impl;
-class BottomLevelASD3D12Impl;
-class TopLevelASD3D12Impl;
-class ShaderBindingTableD3D12Impl;
-class PipelineResourceSignatureD3D12Impl;
-
-struct RenderDeviceD3D12ImplTraits
-{
- using BaseInterface = IRenderDeviceD3D12;
-
- using RenderDeviceImplType = RenderDeviceD3D12Impl;
- using PipelineStateImplType = PipelineStateD3D12Impl;
- using ShaderResourceBindingImplType = ShaderResourceBindingD3D12Impl;
- using BufferImplType = BufferD3D12Impl;
- using BufferViewImplType = BufferViewD3D12Impl;
- using TextureImplType = TextureD3D12Impl;
- using TextureViewImplType = TextureViewD3D12Impl;
- using ShaderImplType = ShaderD3D12Impl;
- using SamplerImplType = SamplerD3D12Impl;
- using FenceImplType = FenceD3D12Impl;
- using QueryImplType = QueryD3D12Impl;
- using RenderPassImplType = RenderPassD3D12Impl;
- using FramebufferImplType = FramebufferD3D12Impl;
- using BottomLevelASImplType = BottomLevelASD3D12Impl;
- using TopLevelASImplType = TopLevelASD3D12Impl;
- using ShaderBindingTableImplType = ShaderBindingTableD3D12Impl;
- using PipelineResourceSignatureImplType = PipelineResourceSignatureD3D12Impl;
-};
-
/// Render device implementation in Direct3D12 backend.
-class RenderDeviceD3D12Impl final : public RenderDeviceNextGenBase<RenderDeviceD3DBase<RenderDeviceD3D12ImplTraits>, ICommandQueueD3D12>
+class RenderDeviceD3D12Impl final : public RenderDeviceNextGenBase<RenderDeviceD3DBase<EngineD3D12ImplTraits>, ICommandQueueD3D12>
{
public:
using BaseInterface = IRenderDeviceD3D12;
- using TRenderDeviceBase = RenderDeviceNextGenBase<RenderDeviceD3DBase<RenderDeviceD3D12ImplTraits>, ICommandQueueD3D12>;
+ using TRenderDeviceBase = RenderDeviceNextGenBase<RenderDeviceD3DBase<EngineD3D12ImplTraits>, ICommandQueueD3D12>;
RenderDeviceD3D12Impl(IReferenceCounters* pRefCounters,
IMemoryAllocator& RawMemAllocator,
diff --git a/Graphics/GraphicsEngineD3D12/include/RenderPassD3D12Impl.hpp b/Graphics/GraphicsEngineD3D12/include/RenderPassD3D12Impl.hpp
index 43d505d0..750a3381 100644
--- a/Graphics/GraphicsEngineD3D12/include/RenderPassD3D12Impl.hpp
+++ b/Graphics/GraphicsEngineD3D12/include/RenderPassD3D12Impl.hpp
@@ -38,10 +38,10 @@ namespace Diligent
{
/// Render pass implementation in Direct3D12 backend.
-class RenderPassD3D12Impl final : public RenderPassBase<IRenderPass, RenderDeviceD3D12Impl>
+class RenderPassD3D12Impl final : public RenderPassBase<EngineD3D12ImplTraits>
{
public:
- using TRenderPassBase = RenderPassBase<IRenderPass, RenderDeviceD3D12Impl>;
+ using TRenderPassBase = RenderPassBase<EngineD3D12ImplTraits>;
RenderPassD3D12Impl(IReferenceCounters* pRefCounters,
RenderDeviceD3D12Impl* pDevice,
diff --git a/Graphics/GraphicsEngineD3D12/include/SamplerD3D12Impl.hpp b/Graphics/GraphicsEngineD3D12/include/SamplerD3D12Impl.hpp
index d427916a..19c11df9 100644
--- a/Graphics/GraphicsEngineD3D12/include/SamplerD3D12Impl.hpp
+++ b/Graphics/GraphicsEngineD3D12/include/SamplerD3D12Impl.hpp
@@ -40,10 +40,10 @@ namespace Diligent
{
/// Sampler object implementation in Direct3D12 backend.
-class SamplerD3D12Impl final : public SamplerBase<ISamplerD3D12, RenderDeviceD3D12Impl>
+class SamplerD3D12Impl final : public SamplerBase<EngineD3D12ImplTraits>
{
public:
- using TSamplerBase = SamplerBase<ISamplerD3D12, RenderDeviceD3D12Impl>;
+ using TSamplerBase = SamplerBase<EngineD3D12ImplTraits>;
SamplerD3D12Impl(IReferenceCounters* pRefCounters,
RenderDeviceD3D12Impl* pRenderDeviceD3D12,
diff --git a/Graphics/GraphicsEngineD3D12/include/ShaderBindingTableD3D12Impl.hpp b/Graphics/GraphicsEngineD3D12/include/ShaderBindingTableD3D12Impl.hpp
index 92fa88ce..ced783ba 100644
--- a/Graphics/GraphicsEngineD3D12/include/ShaderBindingTableD3D12Impl.hpp
+++ b/Graphics/GraphicsEngineD3D12/include/ShaderBindingTableD3D12Impl.hpp
@@ -42,10 +42,10 @@ namespace Diligent
{
/// Shader binding table object implementation in Direct3D12 backend.
-class ShaderBindingTableD3D12Impl final : public ShaderBindingTableBase<IShaderBindingTableD3D12, PipelineStateD3D12Impl, TopLevelASD3D12Impl, RenderDeviceD3D12Impl>, public D3D12ResourceBase
+class ShaderBindingTableD3D12Impl final : public ShaderBindingTableBase<EngineD3D12ImplTraits>, public D3D12ResourceBase
{
public:
- using TShaderBindingTableBase = ShaderBindingTableBase<IShaderBindingTableD3D12, PipelineStateD3D12Impl, TopLevelASD3D12Impl, RenderDeviceD3D12Impl>;
+ using TShaderBindingTableBase = ShaderBindingTableBase<EngineD3D12ImplTraits>;
ShaderBindingTableD3D12Impl(IReferenceCounters* pRefCounters,
class RenderDeviceD3D12Impl* pDeviceD3D12,
diff --git a/Graphics/GraphicsEngineD3D12/include/ShaderD3D12Impl.hpp b/Graphics/GraphicsEngineD3D12/include/ShaderD3D12Impl.hpp
index 9a4b8f9d..cbdb0df3 100644
--- a/Graphics/GraphicsEngineD3D12/include/ShaderD3D12Impl.hpp
+++ b/Graphics/GraphicsEngineD3D12/include/ShaderD3D12Impl.hpp
@@ -43,10 +43,10 @@ namespace Diligent
class ResourceMapping;
/// Implementation of a shader object in Direct3D12 backend.
-class ShaderD3D12Impl final : public ShaderBase<IShaderD3D12, RenderDeviceD3D12Impl>, public ShaderD3DBase
+class ShaderD3D12Impl final : public ShaderBase<EngineD3D12ImplTraits>, public ShaderD3DBase
{
public:
- using TShaderBase = ShaderBase<IShaderD3D12, RenderDeviceD3D12Impl>;
+ using TShaderBase = ShaderBase<EngineD3D12ImplTraits>;
ShaderD3D12Impl(IReferenceCounters* pRefCounters,
RenderDeviceD3D12Impl* pRenderDeviceD3D12,
diff --git a/Graphics/GraphicsEngineD3D12/include/ShaderResourceBindingD3D12Impl.hpp b/Graphics/GraphicsEngineD3D12/include/ShaderResourceBindingD3D12Impl.hpp
index 498c6ea4..105f6e8d 100644
--- a/Graphics/GraphicsEngineD3D12/include/ShaderResourceBindingD3D12Impl.hpp
+++ b/Graphics/GraphicsEngineD3D12/include/ShaderResourceBindingD3D12Impl.hpp
@@ -42,10 +42,10 @@ namespace Diligent
/// Implementation of the Diligent::IShaderResourceBindingD3D12 interface
// sizeof(ShaderResourceBindingD3D12Impl) == 96 (x64, msvc, Release)
-class ShaderResourceBindingD3D12Impl final : public ShaderResourceBindingBase<IShaderResourceBindingD3D12, PipelineResourceSignatureD3D12Impl>
+class ShaderResourceBindingD3D12Impl final : public ShaderResourceBindingBase<EngineD3D12ImplTraits>
{
public:
- using TBase = ShaderResourceBindingBase<IShaderResourceBindingD3D12, PipelineResourceSignatureD3D12Impl>;
+ using TBase = ShaderResourceBindingBase<EngineD3D12ImplTraits>;
ShaderResourceBindingD3D12Impl(IReferenceCounters* pRefCounters,
PipelineResourceSignatureD3D12Impl* pPRS);
diff --git a/Graphics/GraphicsEngineD3D12/include/TextureD3D12Impl.hpp b/Graphics/GraphicsEngineD3D12/include/TextureD3D12Impl.hpp
index 203af1fe..8a911fd3 100644
--- a/Graphics/GraphicsEngineD3D12/include/TextureD3D12Impl.hpp
+++ b/Graphics/GraphicsEngineD3D12/include/TextureD3D12Impl.hpp
@@ -40,13 +40,11 @@
namespace Diligent
{
-class FixedBlockMemoryAllocator;
-
/// Implementation of a texture object in Direct3D12 backend.
-class TextureD3D12Impl final : public TextureBase<ITextureD3D12, RenderDeviceD3D12Impl, TextureViewD3D12Impl, FixedBlockMemoryAllocator>, public D3D12ResourceBase
+class TextureD3D12Impl final : public TextureBase<EngineD3D12ImplTraits>, public D3D12ResourceBase
{
public:
- using TTextureBase = TextureBase<ITextureD3D12, RenderDeviceD3D12Impl, TextureViewD3D12Impl, FixedBlockMemoryAllocator>;
+ using TTextureBase = TextureBase<EngineD3D12ImplTraits>;
using ViewImplType = TextureViewD3D12Impl;
// Creates a new D3D12 resource
diff --git a/Graphics/GraphicsEngineD3D12/include/TextureViewD3D12Impl.hpp b/Graphics/GraphicsEngineD3D12/include/TextureViewD3D12Impl.hpp
index 9d6627ed..6fa2bdb2 100644
--- a/Graphics/GraphicsEngineD3D12/include/TextureViewD3D12Impl.hpp
+++ b/Graphics/GraphicsEngineD3D12/include/TextureViewD3D12Impl.hpp
@@ -40,10 +40,10 @@ namespace Diligent
{
/// Texture view object implementation in Direct3D12 backend.
-class TextureViewD3D12Impl final : public TextureViewBase<ITextureViewD3D12, RenderDeviceD3D12Impl>
+class TextureViewD3D12Impl final : public TextureViewBase<EngineD3D12ImplTraits>
{
public:
- using TTextureViewBase = TextureViewBase<ITextureViewD3D12, RenderDeviceD3D12Impl>;
+ using TTextureViewBase = TextureViewBase<EngineD3D12ImplTraits>;
TextureViewD3D12Impl(IReferenceCounters* pRefCounters,
RenderDeviceD3D12Impl* pDevice,
diff --git a/Graphics/GraphicsEngineD3D12/include/TopLevelASD3D12Impl.hpp b/Graphics/GraphicsEngineD3D12/include/TopLevelASD3D12Impl.hpp
index 166c52a4..a62bd7ce 100644
--- a/Graphics/GraphicsEngineD3D12/include/TopLevelASD3D12Impl.hpp
+++ b/Graphics/GraphicsEngineD3D12/include/TopLevelASD3D12Impl.hpp
@@ -41,10 +41,10 @@ namespace Diligent
{
/// Top-level acceleration structure object implementation in Direct3D12 backend.
-class TopLevelASD3D12Impl final : public TopLevelASBase<ITopLevelASD3D12, BottomLevelASD3D12Impl, RenderDeviceD3D12Impl>, public D3D12ResourceBase
+class TopLevelASD3D12Impl final : public TopLevelASBase<EngineD3D12ImplTraits>, public D3D12ResourceBase
{
public:
- using TTopLevelASBase = TopLevelASBase<ITopLevelASD3D12, BottomLevelASD3D12Impl, RenderDeviceD3D12Impl>;
+ using TTopLevelASBase = TopLevelASBase<EngineD3D12ImplTraits>;
TopLevelASD3D12Impl(IReferenceCounters* pRefCounters,
class RenderDeviceD3D12Impl* pDeviceD3D12,
diff --git a/Graphics/GraphicsEngineD3D12/src/BufferViewD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/BufferViewD3D12Impl.cpp
index a59d9cf5..ee40368c 100644
--- a/Graphics/GraphicsEngineD3D12/src/BufferViewD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/BufferViewD3D12Impl.cpp
@@ -27,6 +27,7 @@
#include "pch.h"
#include "BufferViewD3D12Impl.hpp"
+#include "BufferD3D12Impl.hpp"
namespace Diligent
{
@@ -34,7 +35,7 @@ namespace Diligent
BufferViewD3D12Impl::BufferViewD3D12Impl(IReferenceCounters* pRefCounters,
RenderDeviceD3D12Impl* pDevice,
const BufferViewDesc& ViewDesc,
- IBuffer* pBuffer,
+ BufferD3D12Impl* pBuffer,
DescriptorHeapAllocation&& HandleAlloc,
bool bIsDefaultView) :
// clang-format off