From d06553e2b4700aa026acd4445a598eadf10dfb35 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sun, 8 Sep 2019 17:42:51 -0700 Subject: Added IDeviceContext::WaitForIdle() method (updated API version to 240028) --- Graphics/GraphicsEngineMetal/include/DeviceContextMtlImpl.h | 6 ++++-- Graphics/GraphicsEngineMetal/src/DeviceContextMtlImpl.mm | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'Graphics/GraphicsEngineMetal') diff --git a/Graphics/GraphicsEngineMetal/include/DeviceContextMtlImpl.h b/Graphics/GraphicsEngineMetal/include/DeviceContextMtlImpl.h index ab0e6a3b..96b1ca0f 100644 --- a/Graphics/GraphicsEngineMetal/include/DeviceContextMtlImpl.h +++ b/Graphics/GraphicsEngineMetal/include/DeviceContextMtlImpl.h @@ -99,8 +99,6 @@ public: virtual void ClearRenderTarget(ITextureView* pView, const float* RGBA, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode)override final; - virtual void Flush()override final; - virtual void UpdateBuffer(IBuffer* pBuffer, Uint32 Offset, Uint32 Size, @@ -154,6 +152,10 @@ public: virtual void WaitForFence(IFence* pFence, Uint64 Value, bool FlushContext)override final; + virtual void WaitForIdle()override final; + + virtual void Flush()override final; + private: }; diff --git a/Graphics/GraphicsEngineMetal/src/DeviceContextMtlImpl.mm b/Graphics/GraphicsEngineMetal/src/DeviceContextMtlImpl.mm index 7c4aeacd..a104efb2 100644 --- a/Graphics/GraphicsEngineMetal/src/DeviceContextMtlImpl.mm +++ b/Graphics/GraphicsEngineMetal/src/DeviceContextMtlImpl.mm @@ -384,6 +384,14 @@ namespace Diligent LOG_ERROR_MESSAGE("DeviceContextMtlImpl::Wait() is not implemented"); } + void DeviceContextMtlImpl::WaitForIdle() + { + VERIFY(!m_bIsDeferred, "Only immediate contexts can be idled"); + Flush(); + + LOG_ERROR_MESSAGE("DeviceContextMtlImpl::WaitForIdle() is not implemented"); + } + void DeviceContextMtlImpl::TransitionResourceStates(Uint32 BarrierCount, StateTransitionDesc* pResourceBarriers) { LOG_ERROR_MESSAGE("DeviceContextMtlImpl::TransitionResourceStates() is not implemented"); -- cgit v1.2.3