summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineMetal
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-03-07 02:58:56 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-03-07 02:58:56 +0000
commitbc9fc76496034a50faf3d7fe7be868d5d62f6663 (patch)
treee9438fe09533409c57c9c63b2f69a895e2cf8615 /Graphics/GraphicsEngineMetal
parentMerge pull request #67 from StarshipVendingMachine/android-vulkan (diff)
parentMinor comment updates (diff)
downloadDiligentCore-bc9fc76496034a50faf3d7fe7be868d5d62f6663.tar.gz
DiligentCore-bc9fc76496034a50faf3d7fe7be868d5d62f6663.zip
Merged var_type_refactor into master
Diffstat (limited to 'Graphics/GraphicsEngineMetal')
-rw-r--r--Graphics/GraphicsEngineMetal/CMakeLists.txt7
-rw-r--r--Graphics/GraphicsEngineMetal/include/DeviceContextMtlImpl.h12
-rw-r--r--Graphics/GraphicsEngineMetal/include/PipelineStateMtlImpl.h24
-rw-r--r--Graphics/GraphicsEngineMetal/include/RenderDeviceMtlImpl.h16
-rw-r--r--Graphics/GraphicsEngineMetal/include/ShaderMtlImpl.h27
-rw-r--r--Graphics/GraphicsEngineMetal/include/ShaderResourceBindingMtlImpl.h4
-rw-r--r--Graphics/GraphicsEngineMetal/interface/EngineFactoryMtl.h (renamed from Graphics/GraphicsEngineMetal/interface/RenderDeviceFactoryMtl.h)19
-rw-r--r--Graphics/GraphicsEngineMetal/interface/EngineMtlAttribs.h38
-rw-r--r--Graphics/GraphicsEngineMetal/src/DeviceContextMtlImpl.mm11
-rw-r--r--Graphics/GraphicsEngineMetal/src/EngineFactoryMtl.mm (renamed from Graphics/GraphicsEngineMetal/src/RenderDeviceFactoryMtl.mm)48
-rw-r--r--Graphics/GraphicsEngineMetal/src/RenderDeviceMtlImpl.mm16
-rw-r--r--Graphics/GraphicsEngineMetal/src/ShaderMtlImpl.mm8
-rw-r--r--Graphics/GraphicsEngineMetal/src/ShaderResourceBindingMtlImpl.mm4
-rw-r--r--Graphics/GraphicsEngineMetal/src/TextureMtlImpl.mm2
14 files changed, 103 insertions, 133 deletions
diff --git a/Graphics/GraphicsEngineMetal/CMakeLists.txt b/Graphics/GraphicsEngineMetal/CMakeLists.txt
index 6a2bb29d..294d7276 100644
--- a/Graphics/GraphicsEngineMetal/CMakeLists.txt
+++ b/Graphics/GraphicsEngineMetal/CMakeLists.txt
@@ -9,7 +9,7 @@ set(INCLUDE
include/CommandListMtlImpl.h
include/MtlTypeConversions.h
include/DeviceContextMtlImpl.h
- include/FenceMtlImpl.h
+ include/FenceMtlImpl.h
include/PipelineStateMtlImpl.h
include/RenderDeviceMtlImpl.h
include/SamplerMtlImpl.h
@@ -24,11 +24,10 @@ set(INTERFACE
interface/BufferMtl.h
interface/BufferViewMtl.h
interface/DeviceContextMtl.h
- interface/EngineMtlAttribs.h
+ interface/EngineFactoryMtl.h
interface/FenceMtl.h
interface/PipelineStateMtl.h
interface/RenderDeviceMtl.h
- interface/RenderDeviceFactoryMtl.h
interface/SamplerMtl.h
interface/ShaderMtl.h
interface/ShaderResourceBindingMtl.h
@@ -44,10 +43,10 @@ set(SRC
src/CommandListMtlImpl.mm
src/MtlTypeConversions.mm
src/DeviceContextMtlImpl.mm
+ src/EngineFactoryMtl.mm
src/FenceMtlImpl.mm
src/PipelineStateMtlImpl.mm
src/RenderDeviceMtlImpl.mm
- src/RenderDeviceFactoryMtl.mm
src/SamplerMtlImpl.mm
src/ShaderMtlImpl.mm
src/ShaderResourceBindingMtlImpl.mm
diff --git a/Graphics/GraphicsEngineMetal/include/DeviceContextMtlImpl.h b/Graphics/GraphicsEngineMetal/include/DeviceContextMtlImpl.h
index b6f26154..f3d711a2 100644
--- a/Graphics/GraphicsEngineMetal/include/DeviceContextMtlImpl.h
+++ b/Graphics/GraphicsEngineMetal/include/DeviceContextMtlImpl.h
@@ -49,13 +49,13 @@ class DeviceContextMtlImpl final : public DeviceContextBase<IDeviceContextMtl, D
public:
using TDeviceContextBase = DeviceContextBase<IDeviceContextMtl, DeviceContextMtlImplTraits>;
- DeviceContextMtlImpl(IReferenceCounters* pRefCounters,
- IMemoryAllocator& Allocator,
- IRenderDevice* pDevice,
- const struct EngineMtlAttribs& EngineAttribs,
- bool bIsDeferred);
+ DeviceContextMtlImpl(IReferenceCounters* pRefCounters,
+ IMemoryAllocator& Allocator,
+ IRenderDevice* pDevice,
+ const struct EngineMtlCreateInfo& EngineAttribs,
+ bool bIsDeferred);
- virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface )override final;
+ virtual void QueryInterface( const INTERFACE_ID &IID, IObject **ppInterface )override final;
virtual void SetPipelineState(IPipelineState* pPipelineState)override final;
diff --git a/Graphics/GraphicsEngineMetal/include/PipelineStateMtlImpl.h b/Graphics/GraphicsEngineMetal/include/PipelineStateMtlImpl.h
index 5117cf28..94a3a943 100644
--- a/Graphics/GraphicsEngineMetal/include/PipelineStateMtlImpl.h
+++ b/Graphics/GraphicsEngineMetal/include/PipelineStateMtlImpl.h
@@ -54,6 +54,30 @@ public:
virtual bool IsCompatibleWith(const IPipelineState *pPSO)const override final;
+ virtual void BindStaticResources(Uint32 ShaderFlags, IResourceMapping* pResourceMapping, Uint32 Flags)override final
+ {
+ LOG_ERROR_MESSAGE("PipelineStateMtlImpl::BindStaticResources() is not implemented");
+ }
+
+ virtual Uint32 GetStaticVariableCount(SHADER_TYPE ShaderType) const override final
+ {
+ LOG_ERROR_MESSAGE("PipelineStateMtlImpl::GetStaticVariableCount() is not implemented");
+ return 0;
+ }
+
+ virtual IShaderResourceVariable* GetStaticShaderVariable(SHADER_TYPE ShaderType, const Char* Name) override final
+ {
+ LOG_ERROR_MESSAGE("PipelineStateMtlImpl::GetStaticShaderVariable() is not implemented");
+ return nullptr;
+ }
+
+ virtual IShaderResourceVariable* GetStaticShaderVariable(SHADER_TYPE ShaderType, Uint32 Index) override final
+ {
+ LOG_ERROR_MESSAGE("PipelineStateMtlImpl::GetStaticShaderVariable() is not implemented");
+ return nullptr;
+ }
+
+
private:
};
diff --git a/Graphics/GraphicsEngineMetal/include/RenderDeviceMtlImpl.h b/Graphics/GraphicsEngineMetal/include/RenderDeviceMtlImpl.h
index 05a3e8d4..0f49380f 100644
--- a/Graphics/GraphicsEngineMetal/include/RenderDeviceMtlImpl.h
+++ b/Graphics/GraphicsEngineMetal/include/RenderDeviceMtlImpl.h
@@ -29,7 +29,6 @@
#include "RenderDeviceMtl.h"
#include "RenderDeviceBase.h"
#include "DeviceContextMtl.h"
-#include "EngineMtlAttribs.h"
namespace Diligent
{
@@ -40,16 +39,16 @@ class RenderDeviceMtlImpl final : public RenderDeviceBase<IRenderDeviceMtl>
public:
using TRenderDeviceBase = RenderDeviceBase<IRenderDeviceMtl>;
- RenderDeviceMtlImpl( IReferenceCounters* pRefCounters,
- IMemoryAllocator& RawMemAllocator,
- const EngineMtlAttribs& EngineAttribs,
- void* pMtlDevice,
- Uint32 NumDeferredContexts );
+ RenderDeviceMtlImpl( IReferenceCounters* pRefCounters,
+ IMemoryAllocator& RawMemAllocator,
+ const EngineMtlCreateInfo& EngineAttribs,
+ void* pMtlDevice,
+ Uint32 NumDeferredContexts );
virtual void QueryInterface( const INTERFACE_ID& IID, IObject **ppInterface )override final;
virtual void CreateBuffer(const BufferDesc& BuffDesc, const BufferData* pBuffData, IBuffer** ppBuffer)override final;
- virtual void CreateShader(const ShaderCreationAttribs& ShaderCreationAttribs, IShader** ppShader)override final;
+ virtual void CreateShader(const ShaderCreateInfo& ShaderCI, IShader** ppShader)override final;
virtual void CreateTexture(const TextureDesc& TexDesc, const TextureData* pData, ITexture** ppTexture)override final;
@@ -67,8 +66,7 @@ public:
private:
virtual void TestTextureFormat( TEXTURE_FORMAT TexFormat )override final;
- EngineMtlAttribs m_EngineAttribs;
-
+ EngineMtlCreateInfo m_EngineAttribs;
};
}
diff --git a/Graphics/GraphicsEngineMetal/include/ShaderMtlImpl.h b/Graphics/GraphicsEngineMetal/include/ShaderMtlImpl.h
index 8d3f09a2..1752f59b 100644
--- a/Graphics/GraphicsEngineMetal/include/ShaderMtlImpl.h
+++ b/Graphics/GraphicsEngineMetal/include/ShaderMtlImpl.h
@@ -44,34 +44,23 @@ public:
ShaderMtlImpl(IReferenceCounters* pRefCounters,
class RenderDeviceMtlImpl* pRenderDeviceMtl,
- const ShaderCreationAttribs& CreationAttribs);
+ const ShaderCreateInfo& ShaderCI);
~ShaderMtlImpl();
- virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject** ppInterface )override final;
+ virtual void QueryInterface( const INTERFACE_ID& IID, IObject** ppInterface )override final;
- virtual void BindResources( IResourceMapping* pResourceMapping, Uint32 Flags )override final
+ virtual Uint32 GetResourceCount()const override final
{
- LOG_ERROR_MESSAGE("ShaderMtlImpl::BindResources() is not implemented");
- }
-
- virtual IShaderVariable* GetShaderVariable( const Char* Name )override final
- {
- LOG_ERROR_MESSAGE("ShaderMtlImpl::GetShaderVariable() is not implemented");
- return nullptr;
- }
-
- virtual Uint32 GetVariableCount() const override final
- {
- LOG_ERROR_MESSAGE("ShaderMtlImpl::GetVariableCount() is not implemented");
+ LOG_ERROR_MESSAGE("ShaderMtlImpl::GetResourceCount() is not implemented");
return 0;
}
- virtual IShaderVariable* GetShaderVariable(Uint32 Index)override final
+ virtual ShaderResourceDesc GetResource(Uint32 Index)const override final
{
- LOG_ERROR_MESSAGE("ShaderMtlImpl::GetShaderVariable() is not implemented");
- return nullptr;
+ LOG_ERROR_MESSAGE("ShaderMtlImpl::GetResource() is not implemented");
+ return ShaderResourceDesc{};
}
-
+
private:
};
diff --git a/Graphics/GraphicsEngineMetal/include/ShaderResourceBindingMtlImpl.h b/Graphics/GraphicsEngineMetal/include/ShaderResourceBindingMtlImpl.h
index 95642031..89431cee 100644
--- a/Graphics/GraphicsEngineMetal/include/ShaderResourceBindingMtlImpl.h
+++ b/Graphics/GraphicsEngineMetal/include/ShaderResourceBindingMtlImpl.h
@@ -50,11 +50,11 @@ public:
virtual void BindResources(Uint32 ShaderFlags, IResourceMapping* pResMapping, Uint32 Flags)override final;
- virtual IShaderVariable* GetVariable(SHADER_TYPE ShaderType, const char *Name)override final;
+ virtual IShaderResourceVariable* GetVariable(SHADER_TYPE ShaderType, const char *Name)override final;
virtual Uint32 GetVariableCount(SHADER_TYPE ShaderType) const override final;
- virtual IShaderVariable* GetVariable(SHADER_TYPE ShaderType, Uint32 Index)override final;
+ virtual IShaderResourceVariable* GetVariable(SHADER_TYPE ShaderType, Uint32 Index)override final;
virtual void InitializeStaticResources(const IPipelineState* pPipelineState)override final;
diff --git a/Graphics/GraphicsEngineMetal/interface/RenderDeviceFactoryMtl.h b/Graphics/GraphicsEngineMetal/interface/EngineFactoryMtl.h
index e0e9bffc..ca6088b6 100644
--- a/Graphics/GraphicsEngineMetal/interface/RenderDeviceFactoryMtl.h
+++ b/Graphics/GraphicsEngineMetal/interface/EngineFactoryMtl.h
@@ -31,7 +31,6 @@
#include "../../GraphicsEngine/interface/RenderDevice.h"
#include "../../GraphicsEngine/interface/DeviceContext.h"
#include "../../GraphicsEngine/interface/SwapChain.h"
-#include "EngineMtlAttribs.h"
// https://gcc.gnu.org/wiki/Visibility
#define API_QUALIFIER __attribute__((visibility("default")))
@@ -42,10 +41,10 @@ namespace Diligent
class IEngineFactoryMtl
{
public:
- virtual void CreateDeviceAndContextsMtl( const EngineMtlAttribs& Attribs,
- IRenderDevice** ppDevice,
- IDeviceContext** ppContexts,
- Uint32 NumDeferredContexts ) = 0;
+ virtual void CreateDeviceAndContextsMtl(const EngineMtlCreateInfo& Attribs,
+ IRenderDevice** ppDevice,
+ IDeviceContext** ppContexts,
+ Uint32 NumDeferredContexts ) = 0;
virtual void CreateSwapChainMtl( IRenderDevice* pDevice,
IDeviceContext* pImmediateContext,
@@ -53,11 +52,11 @@ public:
void* pView,
ISwapChain** ppSwapChain ) = 0;
- virtual void AttachToMtlDevice(void* pMtlNativeDevice,
- const EngineMtlAttribs& EngineAttribs,
- IRenderDevice** ppDevice,
- IDeviceContext** ppContexts,
- Uint32 NumDeferredContexts) = 0;
+ virtual void AttachToMtlDevice(void* pMtlNativeDevice,
+ const EngineMtlCreateInfo& EngineAttribs,
+ IRenderDevice** ppDevice,
+ IDeviceContext** ppContexts,
+ Uint32 NumDeferredContexts) = 0;
};
diff --git a/Graphics/GraphicsEngineMetal/interface/EngineMtlAttribs.h b/Graphics/GraphicsEngineMetal/interface/EngineMtlAttribs.h
deleted file mode 100644
index 935716df..00000000
--- a/Graphics/GraphicsEngineMetal/interface/EngineMtlAttribs.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright 2015-2019 Egor Yusov
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS.
- *
- * In no event and under no legal theory, whether in tort (including negligence),
- * contract, or otherwise, unless required by applicable law (such as deliberate
- * and grossly negligent acts) or agreed to in writing, shall any Contributor be
- * liable for any damages, including any direct, indirect, special, incidental,
- * or consequential damages of any character arising as a result of this License or
- * out of the use or inability to use the software (including but not limited to damages
- * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
- * all other commercial damages or losses), even if such Contributor has been advised
- * of the possibility of such damages.
- */
-
-#pragma once
-
-/// \file
-/// Definition of the Engine Mtl attribs
-
-#include "../../GraphicsEngine/interface/GraphicsTypes.h"
-
-namespace Diligent
-{
- /// Attributes of the Metal-based engine implementation
- struct EngineMtlAttribs : public EngineCreationAttribs
- {
-
- };
-}
diff --git a/Graphics/GraphicsEngineMetal/src/DeviceContextMtlImpl.mm b/Graphics/GraphicsEngineMetal/src/DeviceContextMtlImpl.mm
index 93532ab0..978fccf7 100644
--- a/Graphics/GraphicsEngineMetal/src/DeviceContextMtlImpl.mm
+++ b/Graphics/GraphicsEngineMetal/src/DeviceContextMtlImpl.mm
@@ -30,18 +30,17 @@
#include "PipelineStateMtlImpl.h"
#include "SwapChainMtl.h"
#include "ShaderResourceBindingMtlImpl.h"
-#include "EngineMtlAttribs.h"
#include "CommandListMtlImpl.h"
#include "RenderDeviceMtlImpl.h"
#include "FenceMtlImpl.h"
namespace Diligent
{
- DeviceContextMtlImpl::DeviceContextMtlImpl( IReferenceCounters* pRefCounters,
- IMemoryAllocator& Allocator,
- IRenderDevice* pDevice,
- const struct EngineMtlAttribs& EngineAttribs,
- bool bIsDeferred ) :
+ DeviceContextMtlImpl::DeviceContextMtlImpl( IReferenceCounters* pRefCounters,
+ IMemoryAllocator& Allocator,
+ IRenderDevice* pDevice,
+ const struct EngineMtlCreateInfo& EngineAttribs,
+ bool bIsDeferred ) :
TDeviceContextBase(pRefCounters, pDevice, bIsDeferred)
{
}
diff --git a/Graphics/GraphicsEngineMetal/src/RenderDeviceFactoryMtl.mm b/Graphics/GraphicsEngineMetal/src/EngineFactoryMtl.mm
index 900a288b..7516d45e 100644
--- a/Graphics/GraphicsEngineMetal/src/RenderDeviceFactoryMtl.mm
+++ b/Graphics/GraphicsEngineMetal/src/EngineFactoryMtl.mm
@@ -24,7 +24,7 @@
/// \file
/// Routines that initialize Mtl-based engine implementation
-#include "RenderDeviceFactoryMtl.h"
+#include "EngineFactoryMtl.h"
#include "RenderDeviceMtlImpl.h"
#include "DeviceContextMtlImpl.h"
#include "SwapChainMtlImpl.h"
@@ -44,10 +44,10 @@ public:
return &TheFactory;
}
- void CreateDeviceAndContextsMtl( const EngineMtlAttribs& EngineAttribs,
- IRenderDevice** ppDevice,
- IDeviceContext** ppContexts,
- Uint32 NumDeferredContexts )override final;
+ void CreateDeviceAndContextsMtl(const EngineMtlCreateInfo& EngineAttribs,
+ IRenderDevice** ppDevice,
+ IDeviceContext** ppContexts,
+ Uint32 NumDeferredContexts )override final;
void CreateSwapChainMtl( IRenderDevice* pDevice,
IDeviceContext* pImmediateContext,
@@ -55,11 +55,11 @@ public:
void* pView,
ISwapChain** ppSwapChain )override final;
- void AttachToMtlDevice(void* pMtlNativeDevice,
- const EngineMtlAttribs& EngineAttribs,
- IRenderDevice** ppDevice,
- IDeviceContext** ppContexts,
- Uint32 NumDeferredContexts)override final;
+ void AttachToMtlDevice(void* pMtlNativeDevice,
+ const EngineMtlCreateInfo& EngineAttribs,
+ IRenderDevice** ppDevice,
+ IDeviceContext** ppContexts,
+ Uint32 NumDeferredContexts)override final;
};
@@ -76,10 +76,10 @@ public:
/// of deferred contexts is requested, pointers to the
/// contexts are written to ppContexts array starting
/// at position 1
-void EngineFactoryMtlImpl::CreateDeviceAndContextsMtl( const EngineMtlAttribs& EngineAttribs,
- IRenderDevice** ppDevice,
- IDeviceContext** ppContexts,
- Uint32 NumDeferredContexts )
+void EngineFactoryMtlImpl::CreateDeviceAndContextsMtl(const EngineMtlCreateInfo& EngineAttribs,
+ IRenderDevice** ppDevice,
+ IDeviceContext** ppContexts,
+ Uint32 NumDeferredContexts )
{
if (EngineAttribs.DebugMessageCallback != nullptr)
SetDebugMessageCallback(EngineAttribs.DebugMessageCallback);
@@ -111,11 +111,11 @@ void EngineFactoryMtlImpl::CreateDeviceAndContextsMtl( const EngineMtlAttribs&
/// of deferred contexts is requested, pointers to the
/// contexts are written to ppContexts array starting
/// at position 1
-void EngineFactoryMtlImpl::AttachToMtlDevice(void* pMtlNativeDevice,
- const EngineMtlAttribs& EngineAttribs,
- IRenderDevice** ppDevice,
- IDeviceContext** ppContexts,
- Uint32 NumDeferredContexts)
+void EngineFactoryMtlImpl::AttachToMtlDevice(void* pMtlNativeDevice,
+ const EngineMtlCreateInfo& EngineAttribs,
+ IRenderDevice** ppDevice,
+ IDeviceContext** ppContexts,
+ Uint32 NumDeferredContexts)
{
if (EngineAttribs.DebugMessageCallback != nullptr)
SetDebugMessageCallback(EngineAttribs.DebugMessageCallback);
@@ -185,11 +185,11 @@ void EngineFactoryMtlImpl::AttachToMtlDevice(void* pMtlNativ
///
/// \param [out] ppSwapChain - Address of the memory location where pointer to the new
/// swap chain will be written
-void EngineFactoryMtlImpl::CreateSwapChainMtl( IRenderDevice* pDevice,
- IDeviceContext* pImmediateContext,
- const SwapChainDesc& SCDesc,
- void* pView,
- ISwapChain** ppSwapChain )
+void EngineFactoryMtlImpl::CreateSwapChainMtl(IRenderDevice* pDevice,
+ IDeviceContext* pImmediateContext,
+ const SwapChainDesc& SCDesc,
+ void* pView,
+ ISwapChain** ppSwapChain )
{
VERIFY( ppSwapChain, "Null pointer provided" );
if( !ppSwapChain )
diff --git a/Graphics/GraphicsEngineMetal/src/RenderDeviceMtlImpl.mm b/Graphics/GraphicsEngineMetal/src/RenderDeviceMtlImpl.mm
index df94eb0f..99ab0240 100644
--- a/Graphics/GraphicsEngineMetal/src/RenderDeviceMtlImpl.mm
+++ b/Graphics/GraphicsEngineMetal/src/RenderDeviceMtlImpl.mm
@@ -37,11 +37,11 @@
namespace Diligent
{
-RenderDeviceMtlImpl :: RenderDeviceMtlImpl(IReferenceCounters* pRefCounters,
- IMemoryAllocator& RawMemAllocator,
- const EngineMtlAttribs& EngineAttribs,
- void* pMtlDevice,
- Uint32 NumDeferredContexts) :
+RenderDeviceMtlImpl :: RenderDeviceMtlImpl(IReferenceCounters* pRefCounters,
+ IMemoryAllocator& RawMemAllocator,
+ const EngineMtlCreateInfo& EngineAttribs,
+ void* pMtlDevice,
+ Uint32 NumDeferredContexts) :
TRenderDeviceBase
{
pRefCounters,
@@ -92,13 +92,13 @@ void RenderDeviceMtlImpl :: CreateBuffer(const BufferDesc& BuffDesc, const Buffe
);
}
-void RenderDeviceMtlImpl :: CreateShader(const ShaderCreationAttribs& ShaderCreationAttribs, IShader** ppShader)
+void RenderDeviceMtlImpl :: CreateShader(const ShaderCreateInfo& ShaderCI, IShader** ppShader)
{
- CreateDeviceObject( "shader", ShaderCreationAttribs.Desc, ppShader,
+ CreateDeviceObject( "shader", ShaderCI.Desc, ppShader,
[&]()
{
ShaderMtlImpl* pShaderMtl( NEW_RC_OBJ(m_ShaderObjAllocator, "ShaderMtlImpl instance", ShaderMtlImpl)
- (this, ShaderCreationAttribs ) );
+ (this, ShaderCI ) );
pShaderMtl->QueryInterface( IID_Shader, reinterpret_cast<IObject**>(ppShader) );
OnCreateDeviceObject( pShaderMtl );
diff --git a/Graphics/GraphicsEngineMetal/src/ShaderMtlImpl.mm b/Graphics/GraphicsEngineMetal/src/ShaderMtlImpl.mm
index 489c3004..7f9f04f6 100644
--- a/Graphics/GraphicsEngineMetal/src/ShaderMtlImpl.mm
+++ b/Graphics/GraphicsEngineMetal/src/ShaderMtlImpl.mm
@@ -28,10 +28,10 @@
namespace Diligent
{
-ShaderMtlImpl::ShaderMtlImpl(IReferenceCounters* pRefCounters,
- RenderDeviceMtlImpl* pRenderDeviceMtl,
- const ShaderCreationAttribs& CreationAttribs) :
- TShaderBase(pRefCounters, pRenderDeviceMtl, CreationAttribs.Desc)
+ShaderMtlImpl::ShaderMtlImpl(IReferenceCounters* pRefCounters,
+ RenderDeviceMtlImpl* pRenderDeviceMtl,
+ const ShaderCreateInfo& ShaderCI) :
+ TShaderBase(pRefCounters, pRenderDeviceMtl, ShaderCI.Desc)
{
LOG_ERROR_AND_THROW("Shaders are not implemented in Metal backend");
}
diff --git a/Graphics/GraphicsEngineMetal/src/ShaderResourceBindingMtlImpl.mm b/Graphics/GraphicsEngineMetal/src/ShaderResourceBindingMtlImpl.mm
index 1206c528..aa9cc788 100644
--- a/Graphics/GraphicsEngineMetal/src/ShaderResourceBindingMtlImpl.mm
+++ b/Graphics/GraphicsEngineMetal/src/ShaderResourceBindingMtlImpl.mm
@@ -55,7 +55,7 @@ void ShaderResourceBindingMtlImpl::InitializeStaticResources(const IPipelineStat
LOG_ERROR_MESSAGE("ShaderResourceBindingMtlImpl::InitializeStaticResources() is not implemented");
}
-IShaderVariable* ShaderResourceBindingMtlImpl::GetVariable(SHADER_TYPE ShaderType, const char* Name)
+IShaderResourceVariable* ShaderResourceBindingMtlImpl::GetVariable(SHADER_TYPE ShaderType, const char* Name)
{
LOG_ERROR_MESSAGE("ShaderResourceBindingMtlImpl::GetVariable() is not implemented");
return nullptr;
@@ -67,7 +67,7 @@ Uint32 ShaderResourceBindingMtlImpl::GetVariableCount(SHADER_TYPE ShaderType) co
return 0;
}
-IShaderVariable* ShaderResourceBindingMtlImpl::GetVariable(SHADER_TYPE ShaderType, Uint32 Index)
+IShaderResourceVariable* ShaderResourceBindingMtlImpl::GetVariable(SHADER_TYPE ShaderType, Uint32 Index)
{
LOG_ERROR_MESSAGE("ShaderResourceBindingMtlImpl::GetVariable() is not implemented");
return nullptr;
diff --git a/Graphics/GraphicsEngineMetal/src/TextureMtlImpl.mm b/Graphics/GraphicsEngineMetal/src/TextureMtlImpl.mm
index 70f54ac8..b89b0c35 100644
--- a/Graphics/GraphicsEngineMetal/src/TextureMtlImpl.mm
+++ b/Graphics/GraphicsEngineMetal/src/TextureMtlImpl.mm
@@ -40,7 +40,7 @@ TextureMtlImpl :: TextureMtlImpl(IReferenceCounters* pRefCounters,
{
LOG_ERROR_AND_THROW("Textures are not implemented in Metal backend");
- if( TexDesc.Usage == USAGE_STATIC && pInitData == nullptr || pInitData->pSubResources == nullptr )
+ if( (TexDesc.Usage == USAGE_STATIC && pInitData == nullptr) || pInitData->pSubResources == nullptr )
LOG_ERROR_AND_THROW("Static Texture must be initialized with data at creation time");
SetState(RESOURCE_STATE_UNDEFINED);
}