diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-10-19 19:28:34 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-10-19 19:28:34 +0000 |
| commit | 92ecf571e1a837ba076a555f9b473c134ab8b928 (patch) | |
| tree | 35c42820fef2ef646bc24dfc9075e4cdc0178c09 /Graphics/GraphicsEngineMetal | |
| parent | Updated definition of __forceinline on gcc/clang (diff) | |
| download | DiligentCore-92ecf571e1a837ba076a555f9b473c134ab8b928.tar.gz DiligentCore-92ecf571e1a837ba076a555f9b473c134ab8b928.zip | |
Fixed Metal backend
Diffstat (limited to 'Graphics/GraphicsEngineMetal')
| -rw-r--r-- | Graphics/GraphicsEngineMetal/include/DeviceContextMtlImpl.h | 8 | ||||
| -rw-r--r-- | Graphics/GraphicsEngineMetal/src/DeviceContextMtlImpl.mm | 47 |
2 files changed, 44 insertions, 11 deletions
diff --git a/Graphics/GraphicsEngineMetal/include/DeviceContextMtlImpl.h b/Graphics/GraphicsEngineMetal/include/DeviceContextMtlImpl.h index 96b1ca0f..43abc690 100644 --- a/Graphics/GraphicsEngineMetal/include/DeviceContextMtlImpl.h +++ b/Graphics/GraphicsEngineMetal/include/DeviceContextMtlImpl.h @@ -87,9 +87,13 @@ public: ITextureView* pDepthStencil, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode)override final; - virtual void Draw(DrawAttribs& DrawAttribs)override final; + virtual void Draw (const DrawAttribs& Attribs)override final; + virtual void DrawIndexed (const DrawIndexedAttribs& Attribs)override final; + virtual void DrawIndirect (const DrawIndirectAttribs& Attribs, IBuffer* pAttribsBuffer)override final; + virtual void DrawIndexedIndirect(const DrawIndexedIndirectAttribs& Attribs, IBuffer* pAttribsBuffer)override final; - virtual void DispatchCompute(const DispatchComputeAttribs& DispatchAttrs)override final; + virtual void DispatchCompute (const DispatchComputeAttribs& Attribs)override final; + virtual void DispatchComputeIndirect(const DispatchComputeIndirectAttribs& Attribs, IBuffer* pAttribsBuffer)override final; virtual void ClearDepthStencil(ITextureView* pView, CLEAR_DEPTH_STENCIL_FLAGS ClearFlags, diff --git a/Graphics/GraphicsEngineMetal/src/DeviceContextMtlImpl.mm b/Graphics/GraphicsEngineMetal/src/DeviceContextMtlImpl.mm index a104efb2..8edcd8e1 100644 --- a/Graphics/GraphicsEngineMetal/src/DeviceContextMtlImpl.mm +++ b/Graphics/GraphicsEngineMetal/src/DeviceContextMtlImpl.mm @@ -97,26 +97,55 @@ namespace Diligent } } - void DeviceContextMtlImpl::Draw( DrawAttribs &drawAttribs ) + void DeviceContextMtlImpl::Draw(const DrawAttribs& Attribs) { -#ifdef DEVELOPMENT - if (!DvpVerifyDrawArguments(drawAttribs)) + if (!DvpVerifyDrawArguments(Attribs)) return; -#endif - + LOG_ERROR_MESSAGE("DeviceContextMtlImpl::Draw() is not implemented"); } - void DeviceContextMtlImpl::DispatchCompute( const DispatchComputeAttribs &DispatchAttrs ) + void DeviceContextMtlImpl::DrawIndexed(const DrawIndexedAttribs& Attribs) { -#ifdef DEVELOPMENT - if (!DvpVerifyDispatchArguments(DispatchAttrs)) + if (!DvpVerifyDrawIndexedArguments(Attribs)) return; -#endif + LOG_ERROR_MESSAGE("DeviceContextMtlImpl::DrawIndexed() is not implemented"); + } + + void DeviceContextMtlImpl::DrawIndirect(const DrawIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) + { + if (!DvpVerifyDrawIndirectArguments(Attribs, pAttribsBuffer)) + return; + + + LOG_ERROR_MESSAGE("DeviceContextMtlImpl::DrawIndirect() is not implemented"); + } + + void DeviceContextMtlImpl::DrawIndexedIndirect(const DrawIndexedIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) + { + if (!DvpVerifyDrawIndexedIndirectArguments(Attribs, pAttribsBuffer)) + return; + + LOG_ERROR_MESSAGE("DeviceContextMtlImpl::DrawIndexedIndirect() is not implemented"); + } + + void DeviceContextMtlImpl::DispatchCompute(const DispatchComputeAttribs& Attribs) + { + if (!DvpVerifyDispatchArguments(Attribs)) + return; + LOG_ERROR_MESSAGE("DeviceContextMtlImpl::DispatchCompute() is not implemented"); } + void DeviceContextMtlImpl::DispatchComputeIndirect(const DispatchComputeIndirectAttribs& Attribs, IBuffer* pAttribsBuffer) + { + if (!DvpVerifyDispatchIndirectArguments(Attribs, pAttribsBuffer)) + return; + + LOG_ERROR_MESSAGE("DeviceContextMtlImpl::DispatchComputeIndirect() is not implemented"); + } + void DeviceContextMtlImpl::ClearDepthStencil(ITextureView* pView, CLEAR_DEPTH_STENCIL_FLAGS ClearFlags, float fDepth, |
