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/RenderDeviceD3D11Impl.h | 1 + .../GraphicsEngineD3D11/src/EngineFactoryD3D11.cpp | 2 +- .../src/RenderDeviceD3D11Impl.cpp | 23 +++++++++++++--------- 3 files changed, 16 insertions(+), 10 deletions(-) (limited to 'Graphics/GraphicsEngineD3D11') diff --git a/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.h b/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.h index b325554f..5416d9b1 100644 --- a/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.h +++ b/Graphics/GraphicsEngineD3D11/include/RenderDeviceD3D11Impl.h @@ -41,6 +41,7 @@ public: RenderDeviceD3D11Impl( IReferenceCounters* pRefCounters, IMemoryAllocator& RawMemAllocator, + IEngineFactory* pEngineFactory, const EngineD3D11CreateInfo& EngineAttribs, ID3D11Device* pd3d11Device, Uint32 NumDeferredContexts ); diff --git a/Graphics/GraphicsEngineD3D11/src/EngineFactoryD3D11.cpp b/Graphics/GraphicsEngineD3D11/src/EngineFactoryD3D11.cpp index 581250f8..7be30f0c 100644 --- a/Graphics/GraphicsEngineD3D11/src/EngineFactoryD3D11.cpp +++ b/Graphics/GraphicsEngineD3D11/src/EngineFactoryD3D11.cpp @@ -234,7 +234,7 @@ void EngineFactoryD3D11Impl::AttachToD3D11Device(void* pd SetRawAllocator(EngineCI.pRawMemAllocator); auto &RawAlloctor = GetRawAllocator(); RenderDeviceD3D11Impl *pRenderDeviceD3D11(NEW_RC_OBJ(RawAlloctor, "RenderDeviceD3D11Impl instance", RenderDeviceD3D11Impl) - (RawAlloctor, EngineCI, pd3d11Device, EngineCI.NumDeferredContexts)); + (RawAlloctor, this, EngineCI, pd3d11Device, EngineCI.NumDeferredContexts)); pRenderDeviceD3D11->QueryInterface(IID_RenderDevice, reinterpret_cast(ppDevice)); RefCntAutoPtr pDeviceContextD3D11(NEW_RC_OBJ(RawAlloctor, "DeviceContextD3D11Impl instance", DeviceContextD3D11Impl) diff --git a/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp index 04f54ad5..ebae97fc 100644 --- a/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/RenderDeviceD3D11Impl.cpp @@ -42,6 +42,7 @@ namespace Diligent RenderDeviceD3D11Impl :: RenderDeviceD3D11Impl(IReferenceCounters* pRefCounters, IMemoryAllocator& RawMemAllocator, + IEngineFactory* pEngineFactory, const EngineD3D11CreateInfo& EngineAttribs, ID3D11Device* pd3d11Device, Uint32 NumDeferredContexts) : @@ -49,16 +50,20 @@ RenderDeviceD3D11Impl :: RenderDeviceD3D11Impl(IReferenceCounters* pRef { pRefCounters, RawMemAllocator, + pEngineFactory, NumDeferredContexts, - sizeof(TextureBaseD3D11), - sizeof(TextureViewD3D11Impl), - sizeof(BufferD3D11Impl), - sizeof(BufferViewD3D11Impl), - sizeof(ShaderD3D11Impl), - sizeof(SamplerD3D11Impl), - sizeof(PipelineStateD3D11Impl), - sizeof(ShaderResourceBindingD3D11Impl), - sizeof(FenceD3D11Impl) + DeviceObjectSizes + { + sizeof(TextureBaseD3D11), + sizeof(TextureViewD3D11Impl), + sizeof(BufferD3D11Impl), + sizeof(BufferViewD3D11Impl), + sizeof(ShaderD3D11Impl), + sizeof(SamplerD3D11Impl), + sizeof(PipelineStateD3D11Impl), + sizeof(ShaderResourceBindingD3D11Impl), + sizeof(FenceD3D11Impl) + } }, m_EngineAttribs(EngineAttribs), m_pd3d11Device(pd3d11Device) -- cgit v1.2.3