summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D12
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-04-06 15:49:17 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-04-06 15:49:17 +0000
commit696a3cbb5a5f30d2f5000c0db90125d614ea09ca (patch)
treef1c03f120f1cccfa94a583801179212d32d20711 /Graphics/GraphicsEngineD3D12
parentAdded API info query (diff)
downloadDiligentCore-696a3cbb5a5f30d2f5000c0db90125d614ea09ca.tar.gz
DiligentCore-696a3cbb5a5f30d2f5000c0db90125d614ea09ca.zip
Made IShaderSourceInputStreamFactory derived from IObject (upgraded API Version to 240021)
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
-rw-r--r--Graphics/GraphicsEngineD3D12/include/RenderDeviceD3D12Impl.h3
-rw-r--r--Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp2
-rw-r--r--Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp23
3 files changed, 17 insertions, 11 deletions
diff --git a/Graphics/GraphicsEngineD3D12/include/RenderDeviceD3D12Impl.h b/Graphics/GraphicsEngineD3D12/include/RenderDeviceD3D12Impl.h
index a44d40ff..0551f7d0 100644
--- a/Graphics/GraphicsEngineD3D12/include/RenderDeviceD3D12Impl.h
+++ b/Graphics/GraphicsEngineD3D12/include/RenderDeviceD3D12Impl.h
@@ -46,7 +46,8 @@ public:
using TRenderDeviceBase = RenderDeviceNextGenBase< RenderDeviceD3DBase<IRenderDeviceD3D12>, ICommandQueueD3D12 >;
RenderDeviceD3D12Impl(IReferenceCounters* pRefCounters,
- IMemoryAllocator& RawMemAllocator,
+ IMemoryAllocator& RawMemAllocator,
+ IEngineFactory* pEngineFactory,
const EngineD3D12CreateInfo& EngineCI,
ID3D12Device* pD3D12Device,
size_t CommandQueueCount,
diff --git a/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp b/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp
index 6806fafc..53ede9e3 100644
--- a/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp
@@ -300,7 +300,7 @@ void EngineFactoryD3D12Impl::AttachToD3D12Device(void* pd
SetRawAllocator(EngineCI.pRawMemAllocator);
auto &RawMemAllocator = GetRawAllocator();
auto d3d12Device = reinterpret_cast<ID3D12Device*>(pd3d12NativeDevice);
- RenderDeviceD3D12Impl *pRenderDeviceD3D12( NEW_RC_OBJ(RawMemAllocator, "RenderDeviceD3D12Impl instance", RenderDeviceD3D12Impl)(RawMemAllocator, EngineCI, d3d12Device, CommandQueueCount, ppCommandQueues) );
+ RenderDeviceD3D12Impl *pRenderDeviceD3D12( NEW_RC_OBJ(RawMemAllocator, "RenderDeviceD3D12Impl instance", RenderDeviceD3D12Impl)(RawMemAllocator, this, EngineCI, d3d12Device, CommandQueueCount, ppCommandQueues) );
pRenderDeviceD3D12->QueryInterface(IID_RenderDevice, reinterpret_cast<IObject**>(ppDevice) );
RefCntAutoPtr<DeviceContextD3D12Impl> pImmediateCtxD3D12( NEW_RC_OBJ(RawMemAllocator, "DeviceContextD3D12Impl instance", DeviceContextD3D12Impl)(pRenderDeviceD3D12, false, EngineCI, 0, 0) );
diff --git a/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp
index 3d35d334..15e48743 100644
--- a/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp
@@ -39,6 +39,7 @@ namespace Diligent
RenderDeviceD3D12Impl :: RenderDeviceD3D12Impl(IReferenceCounters* pRefCounters,
IMemoryAllocator& RawMemAllocator,
+ IEngineFactory* pEngineFactory,
const EngineD3D12CreateInfo& EngineCI,
ID3D12Device* pd3d12Device,
size_t CommandQueueCount,
@@ -47,18 +48,22 @@ RenderDeviceD3D12Impl :: RenderDeviceD3D12Impl(IReferenceCounters* pRe
{
pRefCounters,
RawMemAllocator,
+ pEngineFactory,
CommandQueueCount,
ppCmdQueues,
EngineCI.NumDeferredContexts,
- sizeof(TextureD3D12Impl),
- sizeof(TextureViewD3D12Impl),
- sizeof(BufferD3D12Impl),
- sizeof(BufferViewD3D12Impl),
- sizeof(ShaderD3D12Impl),
- sizeof(SamplerD3D12Impl),
- sizeof(PipelineStateD3D12Impl),
- sizeof(ShaderResourceBindingD3D12Impl),
- sizeof(FenceD3D12Impl)
+ DeviceObjectSizes
+ {
+ sizeof(TextureD3D12Impl),
+ sizeof(TextureViewD3D12Impl),
+ sizeof(BufferD3D12Impl),
+ sizeof(BufferViewD3D12Impl),
+ sizeof(ShaderD3D12Impl),
+ sizeof(SamplerD3D12Impl),
+ sizeof(PipelineStateD3D12Impl),
+ sizeof(ShaderResourceBindingD3D12Impl),
+ sizeof(FenceD3D12Impl)
+ }
},
m_pd3d12Device (pd3d12Device),
m_EngineAttribs (EngineCI),