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/RenderDeviceMtlImpl.h | 1 + .../GraphicsEngineMetal/src/EngineFactoryMtl.mm | 2 +- .../GraphicsEngineMetal/src/RenderDeviceMtlImpl.mm | 23 +++++++++++++--------- 3 files changed, 16 insertions(+), 10 deletions(-) (limited to 'Graphics/GraphicsEngineMetal') diff --git a/Graphics/GraphicsEngineMetal/include/RenderDeviceMtlImpl.h b/Graphics/GraphicsEngineMetal/include/RenderDeviceMtlImpl.h index 9760c92a..0b10967f 100644 --- a/Graphics/GraphicsEngineMetal/include/RenderDeviceMtlImpl.h +++ b/Graphics/GraphicsEngineMetal/include/RenderDeviceMtlImpl.h @@ -41,6 +41,7 @@ public: RenderDeviceMtlImpl( IReferenceCounters* pRefCounters, IMemoryAllocator& RawMemAllocator, + IEngineFactory* pEngineFactory, const EngineMtlCreateInfo& EngineAttribs, void* pMtlDevice); diff --git a/Graphics/GraphicsEngineMetal/src/EngineFactoryMtl.mm b/Graphics/GraphicsEngineMetal/src/EngineFactoryMtl.mm index ebead420..e87dbc27 100644 --- a/Graphics/GraphicsEngineMetal/src/EngineFactoryMtl.mm +++ b/Graphics/GraphicsEngineMetal/src/EngineFactoryMtl.mm @@ -123,7 +123,7 @@ void EngineFactoryMtlImpl::AttachToMtlDevice(void* pMtlNat SetRawAllocator(EngineCI.pRawMemAllocator); auto& RawAlloctor = GetRawAllocator(); RenderDeviceMtlImpl* pRenderDeviceMtl(NEW_RC_OBJ(RawAlloctor, "RenderDeviceMtlImpl instance", RenderDeviceMtlImpl) - (RawAlloctor, EngineCI, pMtlNativeDevice)); + (RawAlloctor, this, EngineCI, pMtlNativeDevice)); pRenderDeviceMtl->QueryInterface(IID_RenderDevice, reinterpret_cast(ppDevice)); RefCntAutoPtr pDeviceContextMtl(NEW_RC_OBJ(RawAlloctor, "DeviceContextMtlImpl instance", DeviceContextMtlImpl) diff --git a/Graphics/GraphicsEngineMetal/src/RenderDeviceMtlImpl.mm b/Graphics/GraphicsEngineMetal/src/RenderDeviceMtlImpl.mm index 55f57208..181314db 100644 --- a/Graphics/GraphicsEngineMetal/src/RenderDeviceMtlImpl.mm +++ b/Graphics/GraphicsEngineMetal/src/RenderDeviceMtlImpl.mm @@ -39,22 +39,27 @@ namespace Diligent RenderDeviceMtlImpl :: RenderDeviceMtlImpl(IReferenceCounters* pRefCounters, IMemoryAllocator& RawMemAllocator, + IEngineFactory* pEngineFactory, const EngineMtlCreateInfo& EngineAttribs, void* pMtlDevice) : TRenderDeviceBase { pRefCounters, RawMemAllocator, + pEngineFactory, EngineAttribs.NumDeferredContexts, - sizeof(TextureMtlImpl), - sizeof(TextureViewMtlImpl), - sizeof(BufferMtlImpl), - sizeof(BufferViewMtlImpl), - sizeof(ShaderMtlImpl), - sizeof(SamplerMtlImpl), - sizeof(PipelineStateMtlImpl), - sizeof(ShaderResourceBindingMtlImpl), - sizeof(FenceMtlImpl) + DeviceObjectSizes + { + sizeof(TextureMtlImpl), + sizeof(TextureViewMtlImpl), + sizeof(BufferMtlImpl), + sizeof(BufferViewMtlImpl), + sizeof(ShaderMtlImpl), + sizeof(SamplerMtlImpl), + sizeof(PipelineStateMtlImpl), + sizeof(ShaderResourceBindingMtlImpl), + sizeof(FenceMtlImpl) + } }, m_EngineAttribs(EngineAttribs) { -- cgit v1.2.3