From 696a3cbb5a5f30d2f5000c0db90125d614ea09ca Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sat, 6 Apr 2019 08:49:17 -0700 Subject: Made IShaderSourceInputStreamFactory derived from IObject (upgraded API Version to 240021) --- .../include/RenderDeviceD3D12Impl.h | 3 ++- .../GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp | 2 +- .../src/RenderDeviceD3D12Impl.cpp | 23 +++++++++++++--------- 3 files changed, 17 insertions(+), 11 deletions(-) (limited to 'Graphics/GraphicsEngineD3D12') 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, 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(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(ppDevice) ); RefCntAutoPtr 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), -- cgit v1.2.3