diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-11-24 20:20:08 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-11-24 20:20:08 +0000 |
| commit | 1d18b653a921e3d71775f336eea92a6eb9c446cd (patch) | |
| tree | cc44c8f74419c67426050569e47651560236a685 /Graphics/GraphicsEngineMetal | |
| parent | clang-formatted GraphicsEngineOpenGL project (diff) | |
| download | DiligentCore-1d18b653a921e3d71775f336eea92a6eb9c446cd.tar.gz DiligentCore-1d18b653a921e3d71775f336eea92a6eb9c446cd.zip | |
clang-formatted GraphicsEngineMetal project
Diffstat (limited to 'Graphics/GraphicsEngineMetal')
26 files changed, 207 insertions, 231 deletions
diff --git a/Graphics/GraphicsEngineMetal/include/BufferMtlImpl.h b/Graphics/GraphicsEngineMetal/include/BufferMtlImpl.h index 779be0fa..6608a5eb 100644 --- a/Graphics/GraphicsEngineMetal/include/BufferMtlImpl.h +++ b/Graphics/GraphicsEngineMetal/include/BufferMtlImpl.h @@ -43,24 +43,24 @@ class BufferMtlImpl final : public BufferBase<IBufferMtl, RenderDeviceMtlImpl, B public: using TBufferBase = BufferBase<IBufferMtl, RenderDeviceMtlImpl, BufferViewMtlImpl, FixedBlockMemoryAllocator>; - BufferMtlImpl(IReferenceCounters* pRefCounters, - FixedBlockMemoryAllocator& BuffViewObjMemAllocator, - class RenderDeviceMtlImpl* pDeviceMtl, - const BufferDesc& BuffDesc, - const BufferData* pBuffData = nullptr); + BufferMtlImpl(IReferenceCounters* pRefCounters, + FixedBlockMemoryAllocator& BuffViewObjMemAllocator, + class RenderDeviceMtlImpl* pDeviceMtl, + const BufferDesc& BuffDesc, + const BufferData* pBuffData = nullptr); BufferMtlImpl(IReferenceCounters* pRefCounters, FixedBlockMemoryAllocator& BuffViewObjMemAllocator, - class RenderDeviceMtlImpl* pDeviceMtl, - const BufferDesc& BuffDesc, + class RenderDeviceMtlImpl* pDeviceMtl, + const BufferDesc& BuffDesc, RESOURCE_STATE InitialState, void* pMetalBuffer); ~BufferMtlImpl(); - virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface )override final; + virtual void QueryInterface(const Diligent::INTERFACE_ID& IID, IObject** ppInterface) override final; - virtual void* GetNativeHandle()override final + virtual void* GetNativeHandle() override final { LOG_ERROR_MESSAGE("BufferMtlImpl::GetNativeHandle() is not implemented"); return nullptr; @@ -69,8 +69,7 @@ public: private: friend class DeviceContextMtlImpl; - virtual void CreateViewInternal( const struct BufferViewDesc &ViewDesc, IBufferView **ppView, bool bIsDefaultView )override; - + virtual void CreateViewInternal(const struct BufferViewDesc& ViewDesc, IBufferView** ppView, bool bIsDefaultView) override; }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/include/BufferViewMtlImpl.h b/Graphics/GraphicsEngineMetal/include/BufferViewMtlImpl.h index 2e18e2f6..6c7ee77b 100644 --- a/Graphics/GraphicsEngineMetal/include/BufferViewMtlImpl.h +++ b/Graphics/GraphicsEngineMetal/include/BufferViewMtlImpl.h @@ -41,17 +41,16 @@ class BufferViewMtlImpl final : public BufferViewBase<IBufferViewMtl, RenderDevi public: using TBufferViewBase = BufferViewBase<IBufferViewMtl, RenderDeviceMtlImpl>; - BufferViewMtlImpl( IReferenceCounters* pRefCounters, - RenderDeviceMtlImpl* pDevice, - const BufferViewDesc& ViewDesc, - class IBuffer* pBuffer, - void* pMtlView, - bool bIsDefaultView); + BufferViewMtlImpl(IReferenceCounters* pRefCounters, + RenderDeviceMtlImpl* pDevice, + const BufferViewDesc& ViewDesc, + class IBuffer* pBuffer, + void* pMtlView, + bool bIsDefaultView); - virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface ) final; + virtual void QueryInterface(const Diligent::INTERFACE_ID& IID, IObject** ppInterface) final; protected: - }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/include/CommandListMtlImpl.h b/Graphics/GraphicsEngineMetal/include/CommandListMtlImpl.h index 0599c53c..259545b6 100644 --- a/Graphics/GraphicsEngineMetal/include/CommandListMtlImpl.h +++ b/Graphics/GraphicsEngineMetal/include/CommandListMtlImpl.h @@ -41,13 +41,12 @@ class CommandListMtlImpl final : public CommandListBase<ICommandList, RenderDevi public: using TCommandListBase = CommandListBase<ICommandList, RenderDeviceMtlImpl>; - CommandListMtlImpl(IReferenceCounters* pRefCounters, - RenderDeviceMtlImpl* pDevice, - void* pMtlCommandList); + CommandListMtlImpl(IReferenceCounters* pRefCounters, + RenderDeviceMtlImpl* pDevice, + void* pMtlCommandList); ~CommandListMtlImpl(); private: - }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/include/DeviceContextMtlImpl.h b/Graphics/GraphicsEngineMetal/include/DeviceContextMtlImpl.h index b15a3adb..32020922 100644 --- a/Graphics/GraphicsEngineMetal/include/DeviceContextMtlImpl.h +++ b/Graphics/GraphicsEngineMetal/include/DeviceContextMtlImpl.h @@ -58,59 +58,59 @@ public: const struct EngineMtlCreateInfo& EngineAttribs, bool bIsDeferred); - virtual void QueryInterface( const 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; + virtual void SetPipelineState(IPipelineState* pPipelineState) override final; - virtual void TransitionShaderResources(IPipelineState* pPipelineState, IShaderResourceBinding* pShaderResourceBinding)override final; + virtual void TransitionShaderResources(IPipelineState* pPipelineState, IShaderResourceBinding* pShaderResourceBinding) override final; - virtual void CommitShaderResources(IShaderResourceBinding* pShaderResourceBinding, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode)override final; + virtual void CommitShaderResources(IShaderResourceBinding* pShaderResourceBinding, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final; - virtual void SetStencilRef(Uint32 StencilRef)override final; + virtual void SetStencilRef(Uint32 StencilRef) override final; - virtual void SetBlendFactors(const float* pBlendFactors = nullptr)override final; + virtual void SetBlendFactors(const float* pBlendFactors = nullptr) override final; virtual void SetVertexBuffers(Uint32 StartSlot, Uint32 NumBuffersSet, IBuffer** ppBuffers, Uint32* pOffsets, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode, - SET_VERTEX_BUFFERS_FLAGS Flags)override final; - - virtual void InvalidateState()override final; + SET_VERTEX_BUFFERS_FLAGS Flags) override final; - virtual void SetIndexBuffer(IBuffer* pIndexBuffer, Uint32 ByteOffset, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode)override final; + virtual void InvalidateState() override final; - virtual void SetViewports(Uint32 NumViewports, const Viewport* pViewports, Uint32 RTWidth, Uint32 RTHeight)override final; + virtual void SetIndexBuffer(IBuffer* pIndexBuffer, Uint32 ByteOffset, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final; - virtual void SetScissorRects(Uint32 NumRects, const Rect* pRects, Uint32 RTWidth, Uint32 RTHeight)override final; + virtual void SetViewports(Uint32 NumViewports, const Viewport* pViewports, Uint32 RTWidth, Uint32 RTHeight) override final; + + virtual void SetScissorRects(Uint32 NumRects, const Rect* pRects, Uint32 RTWidth, Uint32 RTHeight) override final; virtual void SetRenderTargets(Uint32 NumRenderTargets, ITextureView* ppRenderTargets[], ITextureView* pDepthStencil, - RESOURCE_STATE_TRANSITION_MODE StateTransitionMode)override final; + RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) 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 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& Attribs)override final; - virtual void DispatchComputeIndirect(const DispatchComputeIndirectAttribs& Attribs, IBuffer* pAttribsBuffer)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, float fDepth, Uint8 Stencil, - RESOURCE_STATE_TRANSITION_MODE StateTransitionMode)override final; + RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final; - virtual void ClearRenderTarget(ITextureView* pView, const float* RGBA, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode)override final; + virtual void ClearRenderTarget(ITextureView* pView, const float* RGBA, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final; virtual void UpdateBuffer(IBuffer* pBuffer, Uint32 Offset, Uint32 Size, const PVoid pData, - RESOURCE_STATE_TRANSITION_MODE StateTransitionMode)override final; + RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final; virtual void CopyBuffer(IBuffer* pSrcBuffer, Uint32 SrcOffset, @@ -118,11 +118,11 @@ public: IBuffer* pDstBuffer, Uint32 DstOffset, Uint32 Size, - RESOURCE_STATE_TRANSITION_MODE DstBufferTransitionMode)override final; + RESOURCE_STATE_TRANSITION_MODE DstBufferTransitionMode) override final; - virtual void MapBuffer(IBuffer* pBuffer, MAP_TYPE MapType, MAP_FLAGS MapFlags, PVoid& pMappedData)override final; + virtual void MapBuffer(IBuffer* pBuffer, MAP_TYPE MapType, MAP_FLAGS MapFlags, PVoid& pMappedData) override final; - virtual void UnmapBuffer(IBuffer* pBuffer, MAP_TYPE MapType)override final; + virtual void UnmapBuffer(IBuffer* pBuffer, MAP_TYPE MapType) override final; virtual void UpdateTexture(ITexture* pTexture, Uint32 MipLevel, @@ -130,45 +130,44 @@ public: const Box& DstBox, const TextureSubResData& SubresData, RESOURCE_STATE_TRANSITION_MODE SrcBufferTransitionMode, - RESOURCE_STATE_TRANSITION_MODE StateTransitionMode)override final; + RESOURCE_STATE_TRANSITION_MODE StateTransitionMode) override final; + + virtual void CopyTexture(const CopyTextureAttribs& CopyAttribs) override final; - virtual void CopyTexture(const CopyTextureAttribs& CopyAttribs)override final; + virtual void MapTextureSubresource(ITexture* pTexture, + Uint32 MipLevel, + Uint32 ArraySlice, + MAP_TYPE MapType, + MAP_FLAGS MapFlags, + const Box* pMapRegion, + MappedTextureSubresource& MappedData) override final; - virtual void MapTextureSubresource( ITexture* pTexture, - Uint32 MipLevel, - Uint32 ArraySlice, - MAP_TYPE MapType, - MAP_FLAGS MapFlags, - const Box* pMapRegion, - MappedTextureSubresource& MappedData )override final; + virtual void UnmapTextureSubresource(ITexture* pTexture, Uint32 MipLevel, Uint32 ArraySlice) override final; - virtual void UnmapTextureSubresource(ITexture* pTexture, Uint32 MipLevel, Uint32 ArraySlice)override final; + virtual void GenerateMips(ITextureView* pTextureView) override final; - virtual void GenerateMips(ITextureView* pTextureView)override final; + virtual void FinishFrame() override final; - virtual void FinishFrame()override final; + virtual void TransitionResourceStates(Uint32 BarrierCount, StateTransitionDesc* pResourceBarriers) override final; - virtual void TransitionResourceStates(Uint32 BarrierCount, StateTransitionDesc* pResourceBarriers)override final; - virtual void ResolveTextureSubresource(ITexture* pSrcTexture, ITexture* pDstTexture, - const ResolveTextureSubresourceAttribs& ResolveAttribs)override final; + const ResolveTextureSubresourceAttribs& ResolveAttribs) override final; - void FinishCommandList(class ICommandList** ppCommandList)override final; + void FinishCommandList(class ICommandList** ppCommandList) override final; - virtual void ExecuteCommandList(class ICommandList* pCommandList)override final; + virtual void ExecuteCommandList(class ICommandList* pCommandList) override final; - virtual void SignalFence(IFence* pFence, Uint64 Value)override final; + virtual void SignalFence(IFence* pFence, Uint64 Value) override final; - virtual void WaitForFence(IFence* pFence, Uint64 Value, bool FlushContext)override final; + virtual void WaitForFence(IFence* pFence, Uint64 Value, bool FlushContext) override final; - virtual void WaitForIdle()override final; + virtual void WaitForIdle() override final; - virtual void Flush()override final; + virtual void Flush() override final; private: - }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/include/FenceMtlImpl.h b/Graphics/GraphicsEngineMetal/include/FenceMtlImpl.h index 3715f8aa..c39fa659 100644 --- a/Graphics/GraphicsEngineMetal/include/FenceMtlImpl.h +++ b/Graphics/GraphicsEngineMetal/include/FenceMtlImpl.h @@ -43,18 +43,17 @@ class FenceMtlImpl final : public FenceBase<IFenceMtl, RenderDeviceMtlImpl> public: using TFenceBase = FenceBase<IFenceMtl, RenderDeviceMtlImpl>; - FenceMtlImpl(IReferenceCounters* pRefCounters, - RenderDeviceMtlImpl* pDevice, - const FenceDesc& Desc); + FenceMtlImpl(IReferenceCounters* pRefCounters, + RenderDeviceMtlImpl* pDevice, + const FenceDesc& Desc); ~FenceMtlImpl(); - virtual Uint64 GetCompletedValue()override final; + virtual Uint64 GetCompletedValue() override final; - /// Resets the fence to the specified value. - virtual void Reset(Uint64 Value)override final; + /// Resets the fence to the specified value. + virtual void Reset(Uint64 Value) override final; private: - }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/include/PipelineStateMtlImpl.h b/Graphics/GraphicsEngineMetal/include/PipelineStateMtlImpl.h index b8fa5cc8..ad6f5c7a 100644 --- a/Graphics/GraphicsEngineMetal/include/PipelineStateMtlImpl.h +++ b/Graphics/GraphicsEngineMetal/include/PipelineStateMtlImpl.h @@ -43,22 +43,22 @@ class PipelineStateMtlImpl final : public PipelineStateBase<IPipelineStateMtl, R public: using TPipelineStateBase = PipelineStateBase<IPipelineStateMtl, RenderDeviceMtlImpl>; - PipelineStateMtlImpl(IReferenceCounters* pRefCounters, - class RenderDeviceMtlImpl* pDeviceMtl, - const PipelineStateDesc& PipelineDesc); + PipelineStateMtlImpl(IReferenceCounters* pRefCounters, + class RenderDeviceMtlImpl* pDeviceMtl, + const PipelineStateDesc& PipelineDesc); ~PipelineStateMtlImpl(); - virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface )override final; - - virtual void CreateShaderResourceBinding( IShaderResourceBinding **ppShaderResourceBinding, bool InitStaticResources )override final; + virtual void QueryInterface(const Diligent::INTERFACE_ID& IID, IObject** ppInterface) override final; - virtual bool IsCompatibleWith(const IPipelineState *pPSO)const override final; + virtual void CreateShaderResourceBinding(IShaderResourceBinding** ppShaderResourceBinding, bool InitStaticResources) override final; - virtual void BindStaticResources(Uint32 ShaderFlags, IResourceMapping* pResourceMapping, Uint32 Flags)override final + 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"); @@ -79,7 +79,6 @@ public: private: - }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/include/RenderDeviceMtlImpl.h b/Graphics/GraphicsEngineMetal/include/RenderDeviceMtlImpl.h index 5b49c291..b3953aea 100644 --- a/Graphics/GraphicsEngineMetal/include/RenderDeviceMtlImpl.h +++ b/Graphics/GraphicsEngineMetal/include/RenderDeviceMtlImpl.h @@ -39,37 +39,37 @@ class RenderDeviceMtlImpl final : public RenderDeviceBase<IRenderDeviceMtl> public: using TRenderDeviceBase = RenderDeviceBase<IRenderDeviceMtl>; - RenderDeviceMtlImpl( IReferenceCounters* pRefCounters, - IMemoryAllocator& RawMemAllocator, - IEngineFactory* pEngineFactory, - const EngineMtlCreateInfo& EngineAttribs, - void* pMtlDevice); + RenderDeviceMtlImpl(IReferenceCounters* pRefCounters, + IMemoryAllocator& RawMemAllocator, + IEngineFactory* pEngineFactory, + const EngineMtlCreateInfo& EngineAttribs, + void* pMtlDevice); - virtual void QueryInterface( const INTERFACE_ID& IID, IObject **ppInterface )override final; + 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 CreateBuffer(const BufferDesc& BuffDesc, const BufferData* pBuffData, IBuffer** ppBuffer) override final; - virtual void CreateShader(const ShaderCreateInfo& ShaderCI, 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; - - virtual void CreateSampler(const SamplerDesc& SamplerDesc, ISampler** ppSampler)override final; + virtual void CreateTexture(const TextureDesc& TexDesc, const TextureData* pData, ITexture** ppTexture) override final; - virtual void CreatePipelineState(const PipelineStateDesc &PipelineDesc, IPipelineState **ppPipelineState)override final; + virtual void CreateSampler(const SamplerDesc& SamplerDesc, ISampler** ppSampler) override final; - virtual void CreateFence(const FenceDesc& Desc, IFence** ppFence)override final; + virtual void CreatePipelineState(const PipelineStateDesc& PipelineDesc, IPipelineState** ppPipelineState) override final; - virtual void ReleaseStaleResources(bool ForceRelease = false)override final {} + virtual void CreateFence(const FenceDesc& Desc, IFence** ppFence) override final; - virtual void IdleGPU()override final; + virtual void ReleaseStaleResources(bool ForceRelease = false) override final {} - size_t GetCommandQueueCount()const { return 1; } - Uint64 GetCommandQueueMask()const { return Uint64{1};} + virtual void IdleGPU() override final; + + size_t GetCommandQueueCount() const { return 1; } + Uint64 GetCommandQueueMask() const { return Uint64{1}; } private: - virtual void TestTextureFormat( TEXTURE_FORMAT TexFormat )override final; + virtual void TestTextureFormat(TEXTURE_FORMAT TexFormat) override final; EngineMtlCreateInfo m_EngineAttribs; }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/include/SamplerMtlImpl.h b/Graphics/GraphicsEngineMetal/include/SamplerMtlImpl.h index 2b20163f..48ac4c97 100644 --- a/Graphics/GraphicsEngineMetal/include/SamplerMtlImpl.h +++ b/Graphics/GraphicsEngineMetal/include/SamplerMtlImpl.h @@ -46,10 +46,9 @@ public: const SamplerDesc& SamplerDesc); ~SamplerMtlImpl(); - virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject** ppInterface ) final; + virtual void QueryInterface(const Diligent::INTERFACE_ID& IID, IObject** ppInterface) final; private: - }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/include/ShaderMtlImpl.h b/Graphics/GraphicsEngineMetal/include/ShaderMtlImpl.h index 1752f59b..2120b59b 100644 --- a/Graphics/GraphicsEngineMetal/include/ShaderMtlImpl.h +++ b/Graphics/GraphicsEngineMetal/include/ShaderMtlImpl.h @@ -42,27 +42,26 @@ class ShaderMtlImpl final : public ShaderBase<IShaderMtl, RenderDeviceMtlImpl> public: using TShaderBase = ShaderBase<IShaderMtl, RenderDeviceMtlImpl>; - ShaderMtlImpl(IReferenceCounters* pRefCounters, - class RenderDeviceMtlImpl* pRenderDeviceMtl, - const ShaderCreateInfo& ShaderCI); + ShaderMtlImpl(IReferenceCounters* pRefCounters, + class RenderDeviceMtlImpl* pRenderDeviceMtl, + const ShaderCreateInfo& ShaderCI); ~ShaderMtlImpl(); - - virtual void QueryInterface( const INTERFACE_ID& IID, IObject** ppInterface )override final; - virtual Uint32 GetResourceCount()const override final + virtual void QueryInterface(const INTERFACE_ID& IID, IObject** ppInterface) override final; + + virtual Uint32 GetResourceCount() const override final { LOG_ERROR_MESSAGE("ShaderMtlImpl::GetResourceCount() is not implemented"); return 0; } - virtual ShaderResourceDesc GetResource(Uint32 Index)const override final + virtual ShaderResourceDesc GetResource(Uint32 Index) const override final { LOG_ERROR_MESSAGE("ShaderMtlImpl::GetResource() is not implemented"); return ShaderResourceDesc{}; } - -private: +private: }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/include/ShaderResourceBindingMtlImpl.h b/Graphics/GraphicsEngineMetal/include/ShaderResourceBindingMtlImpl.h index 8cb2b239..67bf6adf 100644 --- a/Graphics/GraphicsEngineMetal/include/ShaderResourceBindingMtlImpl.h +++ b/Graphics/GraphicsEngineMetal/include/ShaderResourceBindingMtlImpl.h @@ -41,25 +41,24 @@ class ShaderResourceBindingMtlImpl final : public ShaderResourceBindingBase<ISha public: using TBase = ShaderResourceBindingBase<IShaderResourceBindingMtl>; - ShaderResourceBindingMtlImpl(IReferenceCounters* pRefCounters, - class PipelineStateMtlImpl* pPSO, - bool IsInternal); + ShaderResourceBindingMtlImpl(IReferenceCounters* pRefCounters, + class PipelineStateMtlImpl* pPSO, + bool IsInternal); ~ShaderResourceBindingMtlImpl(); - virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject** ppInterface )override final; + virtual void QueryInterface(const Diligent::INTERFACE_ID& IID, IObject** ppInterface) override final; - virtual void BindResources(Uint32 ShaderFlags, IResourceMapping* pResMapping, Uint32 Flags)override final; + virtual void BindResources(Uint32 ShaderFlags, IResourceMapping* pResMapping, Uint32 Flags) override final; - virtual IShaderResourceVariable* GetVariableByName(SHADER_TYPE ShaderType, const char *Name)override final; + virtual IShaderResourceVariable* GetVariableByName(SHADER_TYPE ShaderType, const char* Name) override final; virtual Uint32 GetVariableCount(SHADER_TYPE ShaderType) const override final; - virtual IShaderResourceVariable* GetVariableByIndex(SHADER_TYPE ShaderType, Uint32 Index)override final; + virtual IShaderResourceVariable* GetVariableByIndex(SHADER_TYPE ShaderType, Uint32 Index) override final; - virtual void InitializeStaticResources(const IPipelineState* pPipelineState)override final; + virtual void InitializeStaticResources(const IPipelineState* pPipelineState) override final; private: - }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/include/SwapChainMtlImpl.h b/Graphics/GraphicsEngineMetal/include/SwapChainMtlImpl.h index 66ea2bac..b850e6c5 100644 --- a/Graphics/GraphicsEngineMetal/include/SwapChainMtlImpl.h +++ b/Graphics/GraphicsEngineMetal/include/SwapChainMtlImpl.h @@ -39,27 +39,26 @@ class SwapChainMtlImpl final : public SwapChainBase<ISwapChainMtl> public: using TSwapChainBase = SwapChainBase<ISwapChainMtl>; - SwapChainMtlImpl(IReferenceCounters* pRefCounters, - const SwapChainDesc& SCDesc, - class RenderDeviceMtlImpl* pRenderDeviceMtl, - class DeviceContextMtlImpl* pDeviceContextMtl, - void* pView); + SwapChainMtlImpl(IReferenceCounters* pRefCounters, + const SwapChainDesc& SCDesc, + class RenderDeviceMtlImpl* pRenderDeviceMtl, + class DeviceContextMtlImpl* pDeviceContextMtl, + void* pView); ~SwapChainMtlImpl(); - virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface )override final; + virtual void QueryInterface(const Diligent::INTERFACE_ID& IID, IObject** ppInterface) override final; - virtual void Present(Uint32 SyncInterval)override final; - virtual void Resize( Uint32 NewWidth, Uint32 NewHeight )override final; + virtual void Present(Uint32 SyncInterval) override final; + virtual void Resize(Uint32 NewWidth, Uint32 NewHeight) override final; - virtual void SetFullscreenMode(const DisplayModeAttribs &DisplayMode)override final; + virtual void SetFullscreenMode(const DisplayModeAttribs& DisplayMode) override final; - virtual void SetWindowedMode()override final; + virtual void SetWindowedMode() override final; - virtual ITextureView* GetCurrentBackBufferRTV()override final; - virtual ITextureView* GetDepthBufferDSV()override final; + virtual ITextureView* GetCurrentBackBufferRTV() override final; + virtual ITextureView* GetDepthBufferDSV() override final; private: - }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/include/TextureMtlImpl.h b/Graphics/GraphicsEngineMetal/include/TextureMtlImpl.h index d54f4a7d..bfd428b2 100644 --- a/Graphics/GraphicsEngineMetal/include/TextureMtlImpl.h +++ b/Graphics/GraphicsEngineMetal/include/TextureMtlImpl.h @@ -44,24 +44,23 @@ public: using TTextureBase = TextureBase<ITextureMtl, RenderDeviceMtlImpl, TextureViewMtlImpl, FixedBlockMemoryAllocator>; using ViewImplType = TextureViewMtlImpl; - TextureMtlImpl(IReferenceCounters* pRefCounters, - FixedBlockMemoryAllocator& TexViewObjAllocator, - class RenderDeviceMtlImpl* pDeviceMtl, - const TextureDesc& TexDesc, - const TextureData* pInitData = nullptr); + TextureMtlImpl(IReferenceCounters* pRefCounters, + FixedBlockMemoryAllocator& TexViewObjAllocator, + class RenderDeviceMtlImpl* pDeviceMtl, + const TextureDesc& TexDesc, + const TextureData* pInitData = nullptr); ~TextureMtlImpl(); - virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface )override final; + virtual void QueryInterface(const Diligent::INTERFACE_ID& IID, IObject** ppInterface) override final; - virtual void* GetNativeHandle()override final + virtual void* GetNativeHandle() override final { LOG_ERROR_MESSAGE("TextureMtlImpl::GetNativeHandle() is not implemented"); return nullptr; } protected: - void CreateViewInternal( const struct TextureViewDesc &ViewDesc, ITextureView **ppView, bool bIsDefaultView )override final; - + void CreateViewInternal(const struct TextureViewDesc& ViewDesc, ITextureView** ppView, bool bIsDefaultView) override final; }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/include/TextureViewMtlImpl.h b/Graphics/GraphicsEngineMetal/include/TextureViewMtlImpl.h index 8ed14a3d..7f4e60a7 100644 --- a/Graphics/GraphicsEngineMetal/include/TextureViewMtlImpl.h +++ b/Graphics/GraphicsEngineMetal/include/TextureViewMtlImpl.h @@ -42,18 +42,17 @@ class TextureViewMtlImpl final : public TextureViewBase<ITextureViewMtl, RenderD public: using TTextureViewBase = TextureViewBase<ITextureViewMtl, RenderDeviceMtlImpl>; - TextureViewMtlImpl( IReferenceCounters* pRefCounters, - RenderDeviceMtlImpl* pDevice, - const TextureViewDesc& ViewDesc, - class ITexture* pTexture, - void* pMtlView, - bool bIsDefaultView); + TextureViewMtlImpl(IReferenceCounters* pRefCounters, + RenderDeviceMtlImpl* pDevice, + const TextureViewDesc& ViewDesc, + class ITexture* pTexture, + void* pMtlView, + bool bIsDefaultView); - virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface )override final; + virtual void QueryInterface(const Diligent::INTERFACE_ID& IID, IObject** ppInterface) override final; - -protected: +protected: }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/interface/BufferMtl.h b/Graphics/GraphicsEngineMetal/interface/BufferMtl.h index c3dbff1f..72ec4fd6 100644 --- a/Graphics/GraphicsEngineMetal/interface/BufferMtl.h +++ b/Graphics/GraphicsEngineMetal/interface/BufferMtl.h @@ -32,14 +32,13 @@ namespace Diligent { // {F8A1A3AC-923A-419D-AB9D-FE9E35DC654B} -static const INTERFACE_ID IID_BufferMtl = -{ 0xf8a1a3ac, 0x923a, 0x419d, { 0xab, 0x9d, 0xfe, 0x9e, 0x35, 0xdc, 0x65, 0x4b } }; +static const INTERFACE_ID IID_BufferMtl = + {0xf8a1a3ac, 0x923a, 0x419d, {0xab, 0x9d, 0xfe, 0x9e, 0x35, 0xdc, 0x65, 0x4b}}; /// Exposes Metal-specific functionality of a buffer object. class IBufferMtl : public IBuffer { public: - }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/interface/BufferViewMtl.h b/Graphics/GraphicsEngineMetal/interface/BufferViewMtl.h index 6661daf5..d799ea92 100644 --- a/Graphics/GraphicsEngineMetal/interface/BufferViewMtl.h +++ b/Graphics/GraphicsEngineMetal/interface/BufferViewMtl.h @@ -32,14 +32,13 @@ namespace Diligent { // {6D8B8199-1011-42B6-80DF-A9FA8B4F33FF} -static const INTERFACE_ID IID_BufferViewMtl = -{ 0x6d8b8199, 0x1011, 0x42b6, { 0x80, 0xdf, 0xa9, 0xfa, 0x8b, 0x4f, 0x33, 0xff } }; +static const INTERFACE_ID IID_BufferViewMtl = + {0x6d8b8199, 0x1011, 0x42b6, {0x80, 0xdf, 0xa9, 0xfa, 0x8b, 0x4f, 0x33, 0xff}}; /// Exposes Metal-specific functionality of a buffer view object. class IBufferViewMtl : public IBufferView { public: - }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/interface/DeviceContextMtl.h b/Graphics/GraphicsEngineMetal/interface/DeviceContextMtl.h index 775423d3..569fc3f8 100644 --- a/Graphics/GraphicsEngineMetal/interface/DeviceContextMtl.h +++ b/Graphics/GraphicsEngineMetal/interface/DeviceContextMtl.h @@ -32,14 +32,13 @@ namespace Diligent { // {2DEA7704-C586-4BA7-B938-93B239DFA268} -static const INTERFACE_ID IID_DeviceContextMtl = -{ 0x2dea7704, 0xc586, 0x4ba7, { 0xb9, 0x38, 0x93, 0xb2, 0x39, 0xdf, 0xa2, 0x68 } }; +static const INTERFACE_ID IID_DeviceContextMtl = + {0x2dea7704, 0xc586, 0x4ba7, {0xb9, 0x38, 0x93, 0xb2, 0x39, 0xdf, 0xa2, 0x68}}; /// Exposes Metal-specific functionality of a device context. class IDeviceContextMtl : public IDeviceContext { public: - }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/interface/EngineFactoryMtl.h b/Graphics/GraphicsEngineMetal/interface/EngineFactoryMtl.h index 67879536..7509f082 100644 --- a/Graphics/GraphicsEngineMetal/interface/EngineFactoryMtl.h +++ b/Graphics/GraphicsEngineMetal/interface/EngineFactoryMtl.h @@ -40,29 +40,29 @@ namespace Diligent { // {CF4A590D-2E40-4F48-9579-0D25991F963B} -static const INTERFACE_ID IID_EngineFactoryMtl = -{ 0xcf4a590d, 0x2e40, 0x4f48, { 0x95, 0x79, 0xd, 0x25, 0x99, 0x1f, 0x96, 0x3b } }; +static const INTERFACE_ID IID_EngineFactoryMtl = + {0xcf4a590d, 0x2e40, 0x4f48, {0x95, 0x79, 0xd, 0x25, 0x99, 0x1f, 0x96, 0x3b}}; class IEngineFactoryMtl : public IEngineFactory { public: - virtual void CreateDeviceAndContextsMtl(const EngineMtlCreateInfo& Attribs, - IRenderDevice** ppDevice, + virtual void CreateDeviceAndContextsMtl(const EngineMtlCreateInfo& Attribs, + IRenderDevice** ppDevice, IDeviceContext** ppContexts) = 0; - virtual void CreateSwapChainMtl( IRenderDevice* pDevice, - IDeviceContext* pImmediateContext, - const SwapChainDesc& SCDesc, - void* pView, - ISwapChain** ppSwapChain ) = 0; + virtual void CreateSwapChainMtl(IRenderDevice* pDevice, + IDeviceContext* pImmediateContext, + const SwapChainDesc& SCDesc, + void* pView, + ISwapChain** ppSwapChain) = 0; - virtual void AttachToMtlDevice(void* pMtlNativeDevice, - const EngineMtlCreateInfo& EngineAttribs, - IRenderDevice** ppDevice, - IDeviceContext** ppContexts) = 0; + virtual void AttachToMtlDevice(void* pMtlNativeDevice, + const EngineMtlCreateInfo& EngineAttribs, + IRenderDevice** ppDevice, + IDeviceContext** ppContexts) = 0; }; API_QUALIFIER IEngineFactoryMtl* GetEngineFactoryMtl(); -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/interface/FenceMtl.h b/Graphics/GraphicsEngineMetal/interface/FenceMtl.h index 3db81121..562f848a 100644 --- a/Graphics/GraphicsEngineMetal/interface/FenceMtl.h +++ b/Graphics/GraphicsEngineMetal/interface/FenceMtl.h @@ -32,14 +32,13 @@ namespace Diligent { // {54FE9F8F-FBBF-4ABB-8280-D980982DA364} -static const INTERFACE_ID IID_FenceMtl = -{ 0x54fe9f8f, 0xfbbf, 0x4abb, { 0x82, 0x80, 0xd9, 0x80, 0x98, 0x2d, 0xa3, 0x64 } }; +static const INTERFACE_ID IID_FenceMtl = + {0x54fe9f8f, 0xfbbf, 0x4abb, {0x82, 0x80, 0xd9, 0x80, 0x98, 0x2d, 0xa3, 0x64}}; /// Exposes Metal-specific functionality of a fence object. class IFenceMtl : public IFence { public: - }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/interface/PipelineStateMtl.h b/Graphics/GraphicsEngineMetal/interface/PipelineStateMtl.h index 988c43dc..aaa51ca7 100644 --- a/Graphics/GraphicsEngineMetal/interface/PipelineStateMtl.h +++ b/Graphics/GraphicsEngineMetal/interface/PipelineStateMtl.h @@ -32,14 +32,13 @@ namespace Diligent { // {B6A17C51-CCA9-44E1-A2DC-5DE250CF85AD} -static const INTERFACE_ID IID_PipelineStateMtl = -{ 0xb6a17c51, 0xcca9, 0x44e1, { 0xa2, 0xdc, 0x5d, 0xe2, 0x50, 0xcf, 0x85, 0xad } }; +static const INTERFACE_ID IID_PipelineStateMtl = + {0xb6a17c51, 0xcca9, 0x44e1, {0xa2, 0xdc, 0x5d, 0xe2, 0x50, 0xcf, 0x85, 0xad}}; /// Exposes Metal-specific functionality of a pipeline state object. class IPipelineStateMtl : public IPipelineState { public: - }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/interface/RenderDeviceMtl.h b/Graphics/GraphicsEngineMetal/interface/RenderDeviceMtl.h index c4ea311a..b23450af 100644 --- a/Graphics/GraphicsEngineMetal/interface/RenderDeviceMtl.h +++ b/Graphics/GraphicsEngineMetal/interface/RenderDeviceMtl.h @@ -32,14 +32,13 @@ namespace Diligent { // {8D483E4A-2D53-47B2-B8D7-276F4CE57F68} -static const INTERFACE_ID IID_RenderDeviceMtl = -{ 0x8d483e4a, 0x2d53, 0x47b2, { 0xb8, 0xd7, 0x27, 0x6f, 0x4c, 0xe5, 0x7f, 0x68 } }; +static const INTERFACE_ID IID_RenderDeviceMtl = + {0x8d483e4a, 0x2d53, 0x47b2, {0xb8, 0xd7, 0x27, 0x6f, 0x4c, 0xe5, 0x7f, 0x68}}; /// Exposes Metal-specific functionality of a render device. class IRenderDeviceMtl : public IRenderDevice { public: - }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/interface/SamplerMtl.h b/Graphics/GraphicsEngineMetal/interface/SamplerMtl.h index c445e17e..681888a2 100644 --- a/Graphics/GraphicsEngineMetal/interface/SamplerMtl.h +++ b/Graphics/GraphicsEngineMetal/interface/SamplerMtl.h @@ -32,14 +32,13 @@ namespace Diligent { // {73F8C099-049B-4C81-AD19-C98963AC7FEB} -static const INTERFACE_ID IID_SamplerMtl = -{ 0x73f8c099, 0x49b, 0x4c81, { 0xad, 0x19, 0xc9, 0x89, 0x63, 0xac, 0x7f, 0xeb } }; +static const INTERFACE_ID IID_SamplerMtl = + {0x73f8c099, 0x49b, 0x4c81, {0xad, 0x19, 0xc9, 0x89, 0x63, 0xac, 0x7f, 0xeb}}; /// Exposes Metal-specific functionality of a sampler object. class ISamplerMtl : public ISampler { public: - }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/interface/ShaderMtl.h b/Graphics/GraphicsEngineMetal/interface/ShaderMtl.h index 2f791541..205e5bb0 100644 --- a/Graphics/GraphicsEngineMetal/interface/ShaderMtl.h +++ b/Graphics/GraphicsEngineMetal/interface/ShaderMtl.h @@ -32,14 +32,13 @@ namespace Diligent { // {07182C29-CC3B-43B2-99D8-A77F6FECBA82} -static const INTERFACE_ID IID_ShaderMtl = -{ 0x7182c29, 0xcc3b, 0x43b2, { 0x99, 0xd8, 0xa7, 0x7f, 0x6f, 0xec, 0xba, 0x82 } }; +static const INTERFACE_ID IID_ShaderMtl = + {0x7182c29, 0xcc3b, 0x43b2, {0x99, 0xd8, 0xa7, 0x7f, 0x6f, 0xec, 0xba, 0x82}}; /// Exposes Metal-specific functionality of a shader object. class IShaderMtl : public IShader { public: - }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/interface/ShaderResourceBindingMtl.h b/Graphics/GraphicsEngineMetal/interface/ShaderResourceBindingMtl.h index 66a6fe06..badbe093 100644 --- a/Graphics/GraphicsEngineMetal/interface/ShaderResourceBindingMtl.h +++ b/Graphics/GraphicsEngineMetal/interface/ShaderResourceBindingMtl.h @@ -32,14 +32,13 @@ namespace Diligent { // {4D7AF38E-4650-4A11-B33B-FFC70A8CD68B} -static const INTERFACE_ID IID_ShaderResourceBindingMtl = -{ 0x4d7af38e, 0x4650, 0x4a11, { 0xb3, 0x3b, 0xff, 0xc7, 0xa, 0x8c, 0xd6, 0x8b } }; +static const INTERFACE_ID IID_ShaderResourceBindingMtl = + {0x4d7af38e, 0x4650, 0x4a11, {0xb3, 0x3b, 0xff, 0xc7, 0xa, 0x8c, 0xd6, 0x8b}}; /// Exposes Metal-specific functionality of a shader resource binding object. class IShaderResourceBindingMtl : public IShaderResourceBinding { public: - }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/interface/SwapChainMtl.h b/Graphics/GraphicsEngineMetal/interface/SwapChainMtl.h index 4e5676ac..edf37816 100644 --- a/Graphics/GraphicsEngineMetal/interface/SwapChainMtl.h +++ b/Graphics/GraphicsEngineMetal/interface/SwapChainMtl.h @@ -33,14 +33,13 @@ namespace Diligent { // {8ACDD0D9-FF1C-4A78-9866-924459A0D456} -static const INTERFACE_ID IID_SwapChainMtl = -{ 0x8acdd0d9, 0xff1c, 0x4a78, { 0x98, 0x66, 0x92, 0x44, 0x59, 0xa0, 0xd4, 0x56 } }; +static const INTERFACE_ID IID_SwapChainMtl = + {0x8acdd0d9, 0xff1c, 0x4a78, {0x98, 0x66, 0x92, 0x44, 0x59, 0xa0, 0xd4, 0x56}}; /// Exposes Metal-specific functionality of a swap chain. class ISwapChainMtl : public ISwapChain { public: - }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/interface/TextureMtl.h b/Graphics/GraphicsEngineMetal/interface/TextureMtl.h index 7a650dc1..16c78d4f 100644 --- a/Graphics/GraphicsEngineMetal/interface/TextureMtl.h +++ b/Graphics/GraphicsEngineMetal/interface/TextureMtl.h @@ -32,14 +32,13 @@ namespace Diligent { // {D3A85032-224D-45E5-9825-3AABD61A5EA5} -static const INTERFACE_ID IID_TextureMtl = -{ 0xd3a85032, 0x224d, 0x45e5, { 0x98, 0x25, 0x3a, 0xab, 0xd6, 0x1a, 0x5e, 0xa5 } }; +static const INTERFACE_ID IID_TextureMtl = + {0xd3a85032, 0x224d, 0x45e5, {0x98, 0x25, 0x3a, 0xab, 0xd6, 0x1a, 0x5e, 0xa5}}; /// Exposes Metal-specific functionality of a texture object. class ITextureMtl : public ITexture { public: - }; -} +} // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/interface/TextureViewMtl.h b/Graphics/GraphicsEngineMetal/interface/TextureViewMtl.h index bf6eda82..0227bda6 100644 --- a/Graphics/GraphicsEngineMetal/interface/TextureViewMtl.h +++ b/Graphics/GraphicsEngineMetal/interface/TextureViewMtl.h @@ -32,14 +32,13 @@ namespace Diligent { // {94C0D9C3-61E7-4358-AB9F-066EAD84D6F1} -static const INTERFACE_ID IID_TextureViewMtl = -{ 0x94c0d9c3, 0x61e7, 0x4358, { 0xab, 0x9f, 0x6, 0x6e, 0xad, 0x84, 0xd6, 0xf1 } }; +static const INTERFACE_ID IID_TextureViewMtl = + {0x94c0d9c3, 0x61e7, 0x4358, {0xab, 0x9f, 0x6, 0x6e, 0xad, 0x84, 0xd6, 0xf1}}; /// Exposes Metal-specific functionality of a texture view object. class ITextureViewMtl : public ITextureView { public: - }; -} +} // namespace Diligent |
