diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-12-30 03:36:42 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-12-30 03:36:42 +0000 |
| commit | 3abffc834159ca667ef22abbc7ac8614730bbc46 (patch) | |
| tree | ed30800a7e6f8799d0e09a6c5002d5cfe7dcc8d4 /Graphics/GraphicsEngineMetal | |
| parent | Enabled build of Metal backend stub (diff) | |
| download | DiligentCore-3abffc834159ca667ef22abbc7ac8614730bbc46.tar.gz DiligentCore-3abffc834159ca667ef22abbc7ac8614730bbc46.zip | |
Few fixes to Metal back-end stub
Diffstat (limited to 'Graphics/GraphicsEngineMetal')
5 files changed, 29 insertions, 16 deletions
diff --git a/Graphics/GraphicsEngineMetal/include/SwapChainMtlImpl.h b/Graphics/GraphicsEngineMetal/include/SwapChainMtlImpl.h index 95d89e07..c1ca1b35 100644 --- a/Graphics/GraphicsEngineMetal/include/SwapChainMtlImpl.h +++ b/Graphics/GraphicsEngineMetal/include/SwapChainMtlImpl.h @@ -41,7 +41,6 @@ public: SwapChainMtlImpl(IReferenceCounters* pRefCounters, const SwapChainDesc& SCDesc, - const FullScreenModeDesc& FSDesc, class RenderDeviceMtlImpl* pRenderDeviceMtl, class DeviceContextMtlImpl* pDeviceContextMtl, void* pView); diff --git a/Graphics/GraphicsEngineMetal/interface/RenderDeviceFactoryMtl.h b/Graphics/GraphicsEngineMetal/interface/RenderDeviceFactoryMtl.h index 1cad56e9..0f915353 100644 --- a/Graphics/GraphicsEngineMetal/interface/RenderDeviceFactoryMtl.h +++ b/Graphics/GraphicsEngineMetal/interface/RenderDeviceFactoryMtl.h @@ -50,7 +50,6 @@ public: virtual void CreateSwapChainMtl( IRenderDevice* pDevice, IDeviceContext* pImmediateContext, const SwapChainDesc& SCDesc, - const FullScreenModeDesc& FSDesc, void* pView, ISwapChain** ppSwapChain ) = 0; diff --git a/Graphics/GraphicsEngineMetal/src/DeviceContextMtlImpl.mm b/Graphics/GraphicsEngineMetal/src/DeviceContextMtlImpl.mm index bcd1a6ce..53c12adb 100644 --- a/Graphics/GraphicsEngineMetal/src/DeviceContextMtlImpl.mm +++ b/Graphics/GraphicsEngineMetal/src/DeviceContextMtlImpl.mm @@ -287,12 +287,19 @@ namespace Diligent LOG_ERROR_MESSAGE("DeviceContextMtlImpl::FinishFrame() is not implemented"); } + void DeviceContextMtlImpl::InvalidateState() + { + TDeviceContextBase::InvalidateState(); + + LOG_ERROR_MESSAGE("DeviceContextMtlImpl::InvalidateState() is not implemented"); + } + void DeviceContextMtlImpl::SetVertexBuffers( Uint32 StartSlot, - Uint32 NumBuffersSet, - IBuffer** ppBuffers, - Uint32* pOffsets, - RESOURCE_STATE_TRANSITION_MODE StateTransitionMode, - SET_VERTEX_BUFFERS_FLAGS Flags ) + Uint32 NumBuffersSet, + IBuffer** ppBuffers, + Uint32* pOffsets, + RESOURCE_STATE_TRANSITION_MODE StateTransitionMode, + SET_VERTEX_BUFFERS_FLAGS Flags ) { TDeviceContextBase::SetVertexBuffers( StartSlot, NumBuffersSet, ppBuffers, pOffsets, StateTransitionMode, Flags ); @@ -322,7 +329,7 @@ namespace Diligent void DeviceContextMtlImpl::SetViewports( Uint32 NumViewports, const Viewport* pViewports, Uint32 RTWidth, Uint32 RTHeight ) { TDeviceContextBase::SetViewports( NumViewports, pViewports, RTWidth, RTHeight ); - + LOG_ERROR_MESSAGE("DeviceContextMtlImpl::SetViewports() is not implemented"); } @@ -332,7 +339,18 @@ namespace Diligent LOG_ERROR_MESSAGE("DeviceContextMtlImpl::SetScissorRects() is not implemented"); } - + + void DeviceContextMtlImpl::SetRenderTargets(Uint32 NumRenderTargets, + ITextureView* ppRenderTargets[], + ITextureView* pDepthStencil, + RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) + { + if( TDeviceContextBase::SetRenderTargets( NumRenderTargets, ppRenderTargets, pDepthStencil ) ) + { + LOG_ERROR_MESSAGE("DeviceContextMtlImpl::SetRenderTargets() is not implemented"); + } + } + void DeviceContextMtlImpl::FinishCommandList(ICommandList **ppCommandList) { LOG_ERROR_MESSAGE("DeviceContextMtlImpl::FinishCommandList() is not implemented"); diff --git a/Graphics/GraphicsEngineMetal/src/RenderDeviceFactoryMtl.mm b/Graphics/GraphicsEngineMetal/src/RenderDeviceFactoryMtl.mm index e5735aed..69d7474f 100644 --- a/Graphics/GraphicsEngineMetal/src/RenderDeviceFactoryMtl.mm +++ b/Graphics/GraphicsEngineMetal/src/RenderDeviceFactoryMtl.mm @@ -52,8 +52,7 @@ public: void CreateSwapChainMtl( IRenderDevice* pDevice, IDeviceContext* pImmediateContext, const SwapChainDesc& SCDesc, - const FullScreenModeDesc& FSDesc, - void* pView, + void* pView, ISwapChain** ppSwapChain )override final; void AttachToMtlDevice(void* pMtlNativeDevice, @@ -189,7 +188,6 @@ void EngineFactoryMtlImpl::AttachToMtlDevice(void* pMtlNativ void EngineFactoryMtlImpl::CreateSwapChainMtl( IRenderDevice* pDevice, IDeviceContext* pImmediateContext, const SwapChainDesc& SCDesc, - const FullScreenModeDesc& FSDesc, void* pView, ISwapChain** ppSwapChain ) { @@ -206,7 +204,7 @@ void EngineFactoryMtlImpl::CreateSwapChainMtl( IRenderDevice* pDevice auto &RawMemAllocator = GetRawAllocator(); auto *pSwapChainMtl = NEW_RC_OBJ(RawMemAllocator, "SwapChainMtlImpl instance", SwapChainMtlImpl) - (SCDesc, FSDesc, pDeviceMtl, pDeviceContextMtl, pView); + (SCDesc, pDeviceMtl, pDeviceContextMtl, pView); pSwapChainMtl->QueryInterface( IID_SwapChain, reinterpret_cast<IObject**>(ppSwapChain) ); pDeviceContextMtl->SetSwapChain(pSwapChainMtl); diff --git a/Graphics/GraphicsEngineMetal/src/SwapChainMtlImpl.mm b/Graphics/GraphicsEngineMetal/src/SwapChainMtlImpl.mm index 3a49d912..1bba506d 100644 --- a/Graphics/GraphicsEngineMetal/src/SwapChainMtlImpl.mm +++ b/Graphics/GraphicsEngineMetal/src/SwapChainMtlImpl.mm @@ -30,7 +30,6 @@ namespace Diligent SwapChainMtlImpl::SwapChainMtlImpl(IReferenceCounters* pRefCounters, const SwapChainDesc& SCDesc, - const FullScreenModeDesc& FSDesc, RenderDeviceMtlImpl* pRenderDeviceMtl, DeviceContextMtlImpl* pDeviceContextMtl, void* pNativeWndHandle) : @@ -69,13 +68,13 @@ void SwapChainMtlImpl::SetWindowedMode() LOG_ERROR_MESSAGE("SwapChainMtlImpl::SetWindowedMode() is not implemented"); } -ITextureView* GetCurrentBackBufferRTV() +ITextureView* SwapChainMtlImpl::GetCurrentBackBufferRTV() { LOG_ERROR_MESSAGE("SwapChainMtlImpl::GetCurrentBackBufferRTV() is not implemented"); return nullptr; } -ITextureView* GetDepthBufferDSV() +ITextureView* SwapChainMtlImpl::GetDepthBufferDSV() { LOG_ERROR_MESSAGE("SwapChainMtlImpl::GetDepthBufferDSV() is not implemented"); return nullptr; |
