summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineMetal
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/GraphicsEngineMetal
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/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)
{