summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineMetal
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics/GraphicsEngineMetal')
-rw-r--r--Graphics/GraphicsEngineMetal/include/RenderDeviceMtlImpl.h1
-rw-r--r--Graphics/GraphicsEngineMetal/src/EngineFactoryMtl.mm2
-rw-r--r--Graphics/GraphicsEngineMetal/src/RenderDeviceMtlImpl.mm23
3 files changed, 16 insertions, 10 deletions
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<IObject**>(ppDevice));
RefCntAutoPtr<DeviceContextMtlImpl> 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)
{