summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-06-20 06:18:21 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-06-20 06:18:21 +0000
commit2a3a427170700eeeaae4848f9417c4a260802a0a (patch)
tree9f95262c93e346142f412f01b8189d5d20b28314 /Graphics/GraphicsEngineVulkan
parentUpdaed code formatting of D3D11 backend source (diff)
downloadDiligentCore-2a3a427170700eeeaae4848f9417c4a260802a0a.tar.gz
DiligentCore-2a3a427170700eeeaae4848f9417c4a260802a0a.zip
Updated vulkan backend source formatting
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/include/BufferViewVkImpl.h14
-rw-r--r--Graphics/GraphicsEngineVulkan/include/BufferVkImpl.h33
-rw-r--r--Graphics/GraphicsEngineVulkan/include/CommandPoolManager.h2
-rw-r--r--Graphics/GraphicsEngineVulkan/include/CommandQueueVkImpl.h6
-rw-r--r--Graphics/GraphicsEngineVulkan/include/DescriptorPoolManager.h38
-rw-r--r--Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.h46
-rw-r--r--Graphics/GraphicsEngineVulkan/include/FramebufferCache.h13
-rw-r--r--Graphics/GraphicsEngineVulkan/include/PipelineLayout.h30
-rw-r--r--Graphics/GraphicsEngineVulkan/include/PipelineStateVkImpl.h12
-rw-r--r--Graphics/GraphicsEngineVulkan/include/RenderDeviceVkImpl.h36
-rw-r--r--Graphics/GraphicsEngineVulkan/include/SamplerVkImpl.h2
-rw-r--r--Graphics/GraphicsEngineVulkan/include/ShaderResourceBindingVkImpl.h4
-rw-r--r--Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.h6
-rw-r--r--Graphics/GraphicsEngineVulkan/include/SwapChainVkImpl.h14
-rw-r--r--Graphics/GraphicsEngineVulkan/include/TextureViewVkImpl.h16
-rw-r--r--Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h38
-rw-r--r--Graphics/GraphicsEngineVulkan/include/VulkanTypeConversions.h18
-rw-r--r--Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanCommandBuffer.h14
-rw-r--r--Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanCommandBufferPool.h12
-rw-r--r--Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanDescriptorPool.h5
-rw-r--r--Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanFencePool.h8
-rw-r--r--Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanInstance.h12
-rw-r--r--Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanLogicalDevice.h19
-rw-r--r--Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanObjectWrappers.h14
-rw-r--r--Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanPhysicalDevice.h8
-rw-r--r--Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanUploadHeap.h2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/BufferViewVkImpl.cpp12
-rw-r--r--Graphics/GraphicsEngineVulkan/src/BufferVkImpl.cpp20
-rw-r--r--Graphics/GraphicsEngineVulkan/src/CommandPoolManager.cpp2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/CommandQueueVkImpl.cpp4
-rw-r--r--Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp4
-rw-r--r--Graphics/GraphicsEngineVulkan/src/RenderDeviceFactoryVk.cpp54
-rw-r--r--Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/SamplerVkImpl.cpp2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/ShaderResourceBindingVkImpl.cpp2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/ShaderResourceCacheVk.cpp6
-rw-r--r--Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp13
-rw-r--r--Graphics/GraphicsEngineVulkan/src/TextureViewVkImpl.cpp10
-rw-r--r--Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp40
-rw-r--r--Graphics/GraphicsEngineVulkan/src/VulkanDynamicHeap.cpp6
-rw-r--r--Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanCommandBufferPool.cpp6
-rw-r--r--Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanDescriptorPool.cpp2
-rw-r--r--Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanInstance.cpp16
-rw-r--r--Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanLogicalDevice.cpp62
45 files changed, 352 insertions, 335 deletions
diff --git a/Graphics/GraphicsEngineVulkan/include/BufferViewVkImpl.h b/Graphics/GraphicsEngineVulkan/include/BufferViewVkImpl.h
index 675bc145..8f7e74b4 100644
--- a/Graphics/GraphicsEngineVulkan/include/BufferViewVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/BufferViewVkImpl.h
@@ -43,15 +43,15 @@ class BufferViewVkImpl : public BufferViewBase<IBufferViewVk>
public:
typedef BufferViewBase<IBufferViewVk> TBufferViewBase;
- BufferViewVkImpl( IReferenceCounters *pRefCounters,
- IRenderDevice *pDevice,
- const BufferViewDesc& ViewDesc,
- class IBuffer *pBuffer,
- VulkanUtilities::BufferViewWrapper &&BuffView,
- bool bIsDefaultView);
+ BufferViewVkImpl( IReferenceCounters* pRefCounters,
+ IRenderDevice* pDevice,
+ const BufferViewDesc& ViewDesc,
+ class IBuffer* pBuffer,
+ VulkanUtilities::BufferViewWrapper&& BuffView,
+ bool bIsDefaultView);
~BufferViewVkImpl();
- virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface );
+ virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject** ppInterface );
virtual VkBufferView GetVkBufferView()const override final{return m_BuffView;}
const BufferVkImpl* GetBufferVk()const;
diff --git a/Graphics/GraphicsEngineVulkan/include/BufferVkImpl.h b/Graphics/GraphicsEngineVulkan/include/BufferVkImpl.h
index 75d0d944..716e722e 100644
--- a/Graphics/GraphicsEngineVulkan/include/BufferVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/BufferVkImpl.h
@@ -46,24 +46,25 @@ class BufferVkImpl : public BufferBase<IBufferVk, BufferViewVkImpl, FixedBlockMe
{
public:
typedef BufferBase<IBufferVk, BufferViewVkImpl, FixedBlockMemoryAllocator> TBufferBase;
- BufferVkImpl(IReferenceCounters *pRefCounters,
- FixedBlockMemoryAllocator &BuffViewObjMemAllocator,
- class RenderDeviceVkImpl *pDeviceVk,
- const BufferDesc& BuffDesc,
- const BufferData &BuffData = BufferData());
- BufferVkImpl(IReferenceCounters *pRefCounters,
- FixedBlockMemoryAllocator &BuffViewObjMemAllocator,
- class RenderDeviceVkImpl *pDeviceVk,
- const BufferDesc& BuffDesc,
- void *pVkBuffer);
+ BufferVkImpl(IReferenceCounters* pRefCounters,
+ FixedBlockMemoryAllocator& BuffViewObjMemAllocator,
+ class RenderDeviceVkImpl* pDeviceVk,
+ const BufferDesc& BuffDesc,
+ const BufferData& BuffData = BufferData());
+
+ BufferVkImpl(IReferenceCounters* pRefCounters,
+ FixedBlockMemoryAllocator& BuffViewObjMemAllocator,
+ class RenderDeviceVkImpl* pDeviceVk,
+ const BufferDesc& BuffDesc,
+ void* pVkBuffer);
~BufferVkImpl();
- virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface )override;
+ virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject** ppInterface )override;
- virtual void UpdateData( IDeviceContext *pContext, Uint32 Offset, Uint32 Size, const PVoid pData )override;
- virtual void CopyData( IDeviceContext *pContext, IBuffer *pSrcBuffer, Uint32 SrcOffset, Uint32 DstOffset, Uint32 Size )override;
- virtual void Map( IDeviceContext *pContext, MAP_TYPE MapType, Uint32 MapFlags, PVoid &pMappedData )override;
- virtual void Unmap( IDeviceContext *pContext, MAP_TYPE MapType, Uint32 MapFlags )override;
+ virtual void UpdateData( IDeviceContext* pContext, Uint32 Offset, Uint32 Size, const PVoid pData )override;
+ virtual void CopyData( IDeviceContext* pContext, IBuffer* pSrcBuffer, Uint32 SrcOffset, Uint32 DstOffset, Uint32 Size )override;
+ virtual void Map( IDeviceContext* pContext, MAP_TYPE MapType, Uint32 MapFlags, PVoid& pMappedData )override;
+ virtual void Unmap( IDeviceContext* pContext, MAP_TYPE MapType, Uint32 MapFlags )override;
#ifdef _DEBUG
void DbgVerifyDynamicAllocation(Uint32 ContextId)const;
@@ -100,7 +101,7 @@ public:
private:
friend class DeviceContextVkImpl;
- virtual void CreateViewInternal( const struct BufferViewDesc &ViewDesc, IBufferView **ppView, bool bIsDefaultView )override;
+ virtual void CreateViewInternal( const struct BufferViewDesc& ViewDesc, IBufferView** ppView, bool bIsDefaultView )override;
VulkanUtilities::BufferViewWrapper CreateView(struct BufferViewDesc &ViewDesc);
VkAccessFlags m_AccessFlags = 0;
diff --git a/Graphics/GraphicsEngineVulkan/include/CommandPoolManager.h b/Graphics/GraphicsEngineVulkan/include/CommandPoolManager.h
index 19c66148..6b27d2b4 100644
--- a/Graphics/GraphicsEngineVulkan/include/CommandPoolManager.h
+++ b/Graphics/GraphicsEngineVulkan/include/CommandPoolManager.h
@@ -38,8 +38,8 @@ public:
uint32_t queueFamilyIndex,
VkCommandPoolCreateFlags flags)noexcept;
- CommandPoolManager (CommandPoolManager&& ) = delete;
CommandPoolManager (const CommandPoolManager&) = delete;
+ CommandPoolManager (CommandPoolManager&&) = delete;
CommandPoolManager& operator = (const CommandPoolManager&) = delete;
CommandPoolManager& operator = (CommandPoolManager&&) = delete;
diff --git a/Graphics/GraphicsEngineVulkan/include/CommandQueueVkImpl.h b/Graphics/GraphicsEngineVulkan/include/CommandQueueVkImpl.h
index 99db417c..eab3d101 100644
--- a/Graphics/GraphicsEngineVulkan/include/CommandQueueVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/CommandQueueVkImpl.h
@@ -43,12 +43,12 @@ class CommandQueueVkImpl : public ObjectBase<ICommandQueueVk>
public:
typedef ObjectBase<ICommandQueueVk> TBase;
- CommandQueueVkImpl(IReferenceCounters *pRefCounters,
+ CommandQueueVkImpl(IReferenceCounters* pRefCounters,
std::shared_ptr<VulkanUtilities::VulkanLogicalDevice> LogicalDevice,
- uint32_t QueueFamilyIndex);
+ uint32_t QueueFamilyIndex);
~CommandQueueVkImpl();
- virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface )override;
+ virtual void QueryInterface( const Diligent::INTERFACE_ID& IID, IObject** ppInterface )override;
// Returns the fence value that will be signaled next time
virtual UINT64 GetNextFenceValue()override final { return m_NextFenceValue; }
diff --git a/Graphics/GraphicsEngineVulkan/include/DescriptorPoolManager.h b/Graphics/GraphicsEngineVulkan/include/DescriptorPoolManager.h
index c29dcad9..9f029f24 100644
--- a/Graphics/GraphicsEngineVulkan/include/DescriptorPoolManager.h
+++ b/Graphics/GraphicsEngineVulkan/include/DescriptorPoolManager.h
@@ -39,19 +39,19 @@ class DescriptorPoolManager;
class DescriptorPoolAllocation
{
public:
- DescriptorPoolAllocation(VkDescriptorSet _Set,
+ DescriptorPoolAllocation(VkDescriptorSet _Set,
VulkanUtilities::VulkanDescriptorPool& _ParentPool,
- DescriptorPoolManager& _ParentPoolMgr) :
- Set(_Set),
- ParentPool(&_ParentPool),
+ DescriptorPoolManager& _ParentPoolMgr)noexcept :
+ Set (_Set),
+ ParentPool (&_ParentPool),
ParentPoolMgr(&_ParentPoolMgr)
{}
- DescriptorPoolAllocation(){}
+ DescriptorPoolAllocation()noexcept{}
- DescriptorPoolAllocation(const DescriptorPoolAllocation&) = delete;
+ DescriptorPoolAllocation (const DescriptorPoolAllocation&) = delete;
DescriptorPoolAllocation& operator = (const DescriptorPoolAllocation&) = delete;
- DescriptorPoolAllocation(DescriptorPoolAllocation&& rhs) :
+ DescriptorPoolAllocation(DescriptorPoolAllocation&& rhs)noexcept :
Set (rhs.Set),
ParentPool (rhs.ParentPool),
ParentPoolMgr(rhs.ParentPoolMgr)
@@ -61,7 +61,7 @@ public:
rhs.ParentPoolMgr = nullptr;
}
- DescriptorPoolAllocation& operator = (DescriptorPoolAllocation&& rhs)
+ DescriptorPoolAllocation& operator = (DescriptorPoolAllocation&& rhs)noexcept
{
Release();
@@ -91,20 +91,20 @@ public:
VkDescriptorSet GetVkDescriptorSet()const {return Set;}
private:
- VkDescriptorSet Set = VK_NULL_HANDLE;
- VulkanUtilities::VulkanDescriptorPool* ParentPool = nullptr;
- DescriptorPoolManager* ParentPoolMgr = nullptr;
+ VkDescriptorSet Set = VK_NULL_HANDLE;
+ VulkanUtilities::VulkanDescriptorPool* ParentPool = nullptr;
+ DescriptorPoolManager* ParentPoolMgr = nullptr;
};
class DescriptorPoolManager
{
public:
DescriptorPoolManager(std::shared_ptr<const VulkanUtilities::VulkanLogicalDevice> LogicalDevice,
- std::vector<VkDescriptorPoolSize> PoolSizes,
- uint32_t MaxSets)noexcept:
+ std::vector<VkDescriptorPoolSize> PoolSizes,
+ uint32_t MaxSets) noexcept:
m_LogicalDevice(std::move(LogicalDevice)),
- m_PoolSizes(std::move(PoolSizes)),
- m_MaxSets(MaxSets)
+ m_PoolSizes (std::move(PoolSizes)),
+ m_MaxSets (MaxSets)
{
CreateNewPool();
}
@@ -112,11 +112,11 @@ public:
// Move constructor must be noexcept, otherwise vector<DescriptorPoolManager> will fail to compile on MSVC
// So we have to implement it manually. = default also does not work
DescriptorPoolManager(DescriptorPoolManager&& rhs)noexcept :
- m_PoolSizes(std::move(rhs.m_PoolSizes)),
- m_MaxSets(std::move(rhs.m_MaxSets)),
+ m_PoolSizes (std::move(rhs.m_PoolSizes)),
+ m_MaxSets (std::move(rhs.m_MaxSets)),
//m_Mutex(std::move(rhs.m_Mutex)), mutex is not movable
- m_LogicalDevice(std::move(rhs.m_LogicalDevice)),
- m_DescriptorPools(std::move(rhs.m_DescriptorPools)),
+ m_LogicalDevice (std::move(rhs.m_LogicalDevice)),
+ m_DescriptorPools (std::move(rhs.m_DescriptorPools)),
m_ReleasedAllocations(std::move(rhs.m_ReleasedAllocations))
{
}
diff --git a/Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.h b/Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.h
index 170cbcc7..ecd6d4a4 100644
--- a/Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.h
@@ -51,52 +51,56 @@ class DeviceContextVkImpl : public DeviceContextBase<IDeviceContextVk>
public:
typedef DeviceContextBase<IDeviceContextVk> TDeviceContextBase;
- DeviceContextVkImpl(IReferenceCounters *pRefCounters, class RenderDeviceVkImpl *pDevice, bool bIsDeferred, const EngineVkAttribs &Attribs, Uint32 ContextId);
+ DeviceContextVkImpl(IReferenceCounters* pRefCounters,
+ class RenderDeviceVkImpl* pDevice,
+ bool bIsDeferred,
+ const EngineVkAttribs& Attribs,
+ Uint32 ContextId);
~DeviceContextVkImpl();
- 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 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, Uint32 Flags)override final;
+ virtual void CommitShaderResources(IShaderResourceBinding* pShaderResourceBinding, Uint32 Flags)override final;
virtual void SetStencilRef(Uint32 StencilRef)override final;
virtual void SetBlendFactors(const float* pBlendFactors = nullptr)override final;
- virtual void SetVertexBuffers( Uint32 StartSlot, Uint32 NumBuffersSet, IBuffer **ppBuffers, Uint32 *pOffsets, Uint32 Flags )override final;
+ virtual void SetVertexBuffers( Uint32 StartSlot, Uint32 NumBuffersSet, IBuffer **ppBuffers, Uint32* pOffsets, Uint32 Flags )override final;
virtual void InvalidateState()override final;
- virtual void SetIndexBuffer( IBuffer *pIndexBuffer, Uint32 ByteOffset )override final;
+ virtual void SetIndexBuffer( IBuffer* pIndexBuffer, Uint32 ByteOffset )override final;
- virtual void SetViewports( Uint32 NumViewports, const Viewport *pViewports, 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 SetScissorRects( Uint32 NumRects, const Rect* pRects, Uint32 RTWidth, Uint32 RTHeight )override final;
- virtual void SetRenderTargets( Uint32 NumRenderTargets, ITextureView *ppRenderTargets[], ITextureView *pDepthStencil )override final;
+ virtual void SetRenderTargets( Uint32 NumRenderTargets, ITextureView* ppRenderTargets[], ITextureView* pDepthStencil )override final;
virtual void Draw( DrawAttribs &DrawAttribs )override final;
virtual void DispatchCompute( const DispatchComputeAttribs &DispatchAttrs )override final;
- virtual void ClearDepthStencil( ITextureView *pView, Uint32 ClearFlags, float fDepth, Uint8 Stencil)override final;
+ virtual void ClearDepthStencil( ITextureView* pView, Uint32 ClearFlags, float fDepth, Uint8 Stencil)override final;
- virtual void ClearRenderTarget( ITextureView *pView, const float *RGBA )override final;
+ virtual void ClearRenderTarget( ITextureView* pView, const float *RGBA )override final;
virtual void Flush()override final;
virtual void FinishCommandList(class ICommandList **ppCommandList)override final;
- virtual void ExecuteCommandList(class ICommandList *pCommandList)override final;
+ virtual void ExecuteCommandList(class ICommandList* pCommandList)override final;
void TransitionImageLayout(class TextureVkImpl &TextureVk, VkImageLayout NewLayout);
- virtual void TransitionImageLayout(ITexture *pTexture, VkImageLayout NewLayout)override final;
+ virtual void TransitionImageLayout(ITexture* pTexture, VkImageLayout NewLayout)override final;
void BufferMemoryBarrier(class BufferVkImpl &BufferVk, VkAccessFlags NewAccessFlags);
- virtual void BufferMemoryBarrier(IBuffer *pBuffer, VkAccessFlags NewAccessFlags)override final;
+ virtual void BufferMemoryBarrier(IBuffer* pBuffer, VkAccessFlags NewAccessFlags)override final;
void AddWaitSemaphore(VkSemaphore Semaphore, VkPipelineStageFlags WaitDstStageMask)
{
@@ -117,14 +121,14 @@ public:
//static constexpr int NumShaderTypes = 6;
void UpdateBufferRegion(class BufferVkImpl* pBuffVk, Uint64 DstOffset, Uint64 NumBytes, VkBuffer vkSrcBuffer, Uint64 SrcOffset);
- void UpdateBufferRegion(class BufferVkImpl* pBuffVk, const void *pData, Uint64 DstOffset, Uint64 NumBytes);
+ void UpdateBufferRegion(class BufferVkImpl* pBuffVk, const void* pData, Uint64 DstOffset, Uint64 NumBytes);
- void CopyBufferRegion(class BufferVkImpl *pSrcBuffVk, class BufferVkImpl *pDstBuffVk, Uint64 SrcOffset, Uint64 DstOffset, Uint64 NumBytes);
- void CopyTextureRegion(class TextureVkImpl *pSrcTexture, class TextureVkImpl *pDstTexture, const VkImageCopy &CopyRegion);
+ void CopyBufferRegion(class BufferVkImpl* pSrcBuffVk, class BufferVkImpl* pDstBuffVk, Uint64 SrcOffset, Uint64 DstOffset, Uint64 NumBytes);
+ void CopyTextureRegion(class TextureVkImpl* pSrcTexture, class TextureVkImpl* pDstTexture, const VkImageCopy &CopyRegion);
#if 0
- void CopyTextureRegion(IBuffer *pSrcBuffer, Uint32 SrcStride, Uint32 SrcDepthStride, class TextureVkImpl *pTextureVk, Uint32 DstSubResIndex, const Box &DstBox);
+ void CopyTextureRegion(IBuffer* pSrcBuffer, Uint32 SrcStride, Uint32 SrcDepthStride, class TextureVkImpl* pTextureVk, Uint32 DstSubResIndex, const Box &DstBox);
#endif
- void GenerateMips(class TextureViewVkImpl *pTexView);
+ void GenerateMips(class TextureViewVkImpl* pTexView);
void* AllocateUploadSpace(BufferVkImpl* pBuffer, size_t NumBytes);
void CopyAndFreeDynamicUploadData(BufferVkImpl* pBuffer);
@@ -151,7 +155,7 @@ public:
VulkanDynamicAllocation AllocateDynamicSpace(Uint32 SizeInBytes);
private:
- void CommitRenderPassAndFramebuffer(class PipelineStateVkImpl *pPipelineStateVk);
+ void CommitRenderPassAndFramebuffer(class PipelineStateVkImpl* pPipelineStateVk);
void CommitVkVertexBuffers();
void TransitionVkVertexBuffers();
void CommitRenderTargets();
diff --git a/Graphics/GraphicsEngineVulkan/include/FramebufferCache.h b/Graphics/GraphicsEngineVulkan/include/FramebufferCache.h
index db9861da..97871607 100644
--- a/Graphics/GraphicsEngineVulkan/include/FramebufferCache.h
+++ b/Graphics/GraphicsEngineVulkan/include/FramebufferCache.h
@@ -41,10 +41,10 @@ public:
m_DeviceVk(DeviceVKImpl)
{}
- FramebufferCache(const FramebufferCache&) = delete;
- FramebufferCache(FramebufferCache&&) = delete;
+ FramebufferCache (const FramebufferCache&) = delete;
+ FramebufferCache (FramebufferCache&&) = delete;
FramebufferCache& operator = (const FramebufferCache&) = delete;
- FramebufferCache& operator = (FramebufferCache&&) = delete;
+ FramebufferCache& operator = (FramebufferCache&&) = delete;
~FramebufferCache();
@@ -53,9 +53,10 @@ public:
{
// Default memeber initialization is intentionally omitted
VkRenderPass Pass;
- Uint32 NumRenderTargets;
- VkImageView DSV;
- VkImageView RTVs[MaxRenderTargets];
+ Uint32 NumRenderTargets;
+ VkImageView DSV;
+ VkImageView RTVs[MaxRenderTargets];
+
bool operator == (const FramebufferCacheKey &rhs)const;
size_t GetHash()const;
diff --git a/Graphics/GraphicsEngineVulkan/include/PipelineLayout.h b/Graphics/GraphicsEngineVulkan/include/PipelineLayout.h
index eafdf192..0003c5f8 100644
--- a/Graphics/GraphicsEngineVulkan/include/PipelineLayout.h
+++ b/Graphics/GraphicsEngineVulkan/include/PipelineLayout.h
@@ -47,11 +47,11 @@ public:
static VkDescriptorType GetVkDescriptorType(const SPIRVShaderResourceAttribs &Res);
PipelineLayout();
- void Release(RenderDeviceVkImpl *pDeviceVkImpl);
+ void Release(RenderDeviceVkImpl* pDeviceVkImpl);
void Finalize(const VulkanUtilities::VulkanLogicalDevice& LogicalDevice);
VkPipelineLayout GetVkPipelineLayout()const{return m_LayoutMgr.GetVkPipelineLayout();}
- void InitResourceCache(RenderDeviceVkImpl *pDeviceVkImpl, class ShaderResourceCacheVk& ResourceCache, IMemoryAllocator &CacheMemAllocator)const;
+ void InitResourceCache(RenderDeviceVkImpl* pDeviceVkImpl, class ShaderResourceCacheVk& ResourceCache, IMemoryAllocator& CacheMemAllocator)const;
void AllocateResourceSlot(const SPIRVShaderResourceAttribs& ResAttribs,
VkSampler vkStaticSampler,
@@ -90,7 +90,7 @@ public:
Uint32 SetCout = 0;
Uint32 DynamicOffsetCount = 0;
#ifdef _DEBUG
- const PipelineLayout *pDbgPipelineLayout = nullptr;
+ const PipelineLayout* pDbgPipelineLayout = nullptr;
#endif
DescriptorSetBindInfo() :
vkSets(2),
@@ -136,11 +136,11 @@ private:
public:
struct DescriptorSetLayout
{
- DescriptorSetLayout() = default;
- DescriptorSetLayout(DescriptorSetLayout&&) = default;
- DescriptorSetLayout(const DescriptorSetLayout&) = delete;
+ DescriptorSetLayout() noexcept {}
+ DescriptorSetLayout (DescriptorSetLayout&&) = default;
+ DescriptorSetLayout (const DescriptorSetLayout&) = delete;
DescriptorSetLayout& operator = (const DescriptorSetLayout&) = delete;
- DescriptorSetLayout& operator = (DescriptorSetLayout&&) = delete;
+ DescriptorSetLayout& operator = (DescriptorSetLayout&&) = delete;
uint32_t TotalDescriptors = 0;
int8_t SetIndex = -1;
@@ -150,9 +150,9 @@ private:
VulkanUtilities::DescriptorSetLayoutWrapper VkLayout;
~DescriptorSetLayout();
- void AddBinding(const VkDescriptorSetLayoutBinding &Binding, IMemoryAllocator &MemAllocator);
- void Finalize(const VulkanUtilities::VulkanLogicalDevice &LogicalDevice, IMemoryAllocator &MemAllocator, VkDescriptorSetLayoutBinding* pNewBindings);
- void Release(RenderDeviceVkImpl *pRenderDeviceVk, IMemoryAllocator &MemAllocator);
+ void AddBinding(const VkDescriptorSetLayoutBinding& Binding, IMemoryAllocator& MemAllocator);
+ void Finalize(const VulkanUtilities::VulkanLogicalDevice& LogicalDevice, IMemoryAllocator& MemAllocator, VkDescriptorSetLayoutBinding* pNewBindings);
+ void Release(RenderDeviceVkImpl* pRenderDeviceVk, IMemoryAllocator& MemAllocator);
bool operator == (const DescriptorSetLayout& rhs)const;
bool operator != (const DescriptorSetLayout& rhs)const{return !(*this == rhs);}
@@ -166,15 +166,15 @@ private:
DescriptorSetLayoutManager(IMemoryAllocator &MemAllocator);
~DescriptorSetLayoutManager();
- DescriptorSetLayoutManager(const DescriptorSetLayoutManager&) = delete;
+ DescriptorSetLayoutManager (const DescriptorSetLayoutManager&) = delete;
DescriptorSetLayoutManager& operator= (const DescriptorSetLayoutManager&) = delete;
- DescriptorSetLayoutManager(DescriptorSetLayoutManager&&) = delete;
- DescriptorSetLayoutManager& operator= (DescriptorSetLayoutManager&&) = delete;
+ DescriptorSetLayoutManager (DescriptorSetLayoutManager&&) = delete;
+ DescriptorSetLayoutManager& operator= (DescriptorSetLayoutManager&&) = delete;
void Finalize(const VulkanUtilities::VulkanLogicalDevice &LogicalDevice);
- void Release(RenderDeviceVkImpl *pRenderDeviceVk);
+ void Release(RenderDeviceVkImpl* pRenderDeviceVk);
- DescriptorSetLayout& GetDescriptorSet(SHADER_VARIABLE_TYPE VarType){return m_DescriptorSetLayouts[VarType == SHADER_VARIABLE_TYPE_DYNAMIC ? 1 : 0];}
+ DescriptorSetLayout& GetDescriptorSet(SHADER_VARIABLE_TYPE VarType) { return m_DescriptorSetLayouts[VarType == SHADER_VARIABLE_TYPE_DYNAMIC ? 1 : 0]; }
const DescriptorSetLayout& GetDescriptorSet(SHADER_VARIABLE_TYPE VarType)const { return m_DescriptorSetLayouts[VarType == SHADER_VARIABLE_TYPE_DYNAMIC ? 1 : 0]; }
bool operator == (const DescriptorSetLayoutManager& rhs)const;
diff --git a/Graphics/GraphicsEngineVulkan/include/PipelineStateVkImpl.h b/Graphics/GraphicsEngineVulkan/include/PipelineStateVkImpl.h
index b355809d..061aaa23 100644
--- a/Graphics/GraphicsEngineVulkan/include/PipelineStateVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/PipelineStateVkImpl.h
@@ -49,16 +49,16 @@ class PipelineStateVkImpl : public PipelineStateBase<IPipelineStateVk, IRenderDe
public:
typedef PipelineStateBase<IPipelineStateVk, IRenderDeviceVk> TPipelineStateBase;
- PipelineStateVkImpl( IReferenceCounters *pRefCounters, class RenderDeviceVkImpl *pDeviceVk, const PipelineStateDesc &PipelineDesc );
+ PipelineStateVkImpl( IReferenceCounters* pRefCounters, class RenderDeviceVkImpl* pDeviceVk, const PipelineStateDesc &PipelineDesc );
~PipelineStateVkImpl();
- virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface );
+ virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject** ppInterface );
- virtual void BindShaderResources( IResourceMapping *pResourceMapping, Uint32 Flags )override;
+ virtual void BindShaderResources( IResourceMapping* pResourceMapping, Uint32 Flags )override;
virtual void CreateShaderResourceBinding( IShaderResourceBinding **ppShaderResourceBinding )override;
- virtual bool IsCompatibleWith(const IPipelineState *pPSO)const override final;
+ virtual bool IsCompatibleWith(const IPipelineState* pPSO)const override final;
virtual VkRenderPass GetVkRenderPass()const override final{return m_RenderPass;}
@@ -88,8 +88,8 @@ public:
IMemoryAllocator& GetShaderVariableDataAllocator(Uint32 ActiveShaderInd)
{
VERIFY_EXPR(ActiveShaderInd < m_NumShaders);
- auto *pAllocator = m_VariableDataAllocators.GetAllocator(ActiveShaderInd);
- return pAllocator != nullptr ? *pAllocator : GetRawAllocator();
+ auto* pAllocator = m_VariableDataAllocators.GetAllocator(ActiveShaderInd);
+ return pAllocator != nullptr ?* pAllocator : GetRawAllocator();
}
IShaderVariable *GetDummyShaderVar(){return &m_DummyVar;}
diff --git a/Graphics/GraphicsEngineVulkan/include/RenderDeviceVkImpl.h b/Graphics/GraphicsEngineVulkan/include/RenderDeviceVkImpl.h
index a076d6ff..7c200d79 100644
--- a/Graphics/GraphicsEngineVulkan/include/RenderDeviceVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/RenderDeviceVkImpl.h
@@ -56,35 +56,35 @@ class RenderDeviceVkImpl : public RenderDeviceBase<IRenderDeviceVk>
public:
typedef RenderDeviceBase<IRenderDeviceVk> TRenderDeviceBase;
- RenderDeviceVkImpl( IReferenceCounters *pRefCounters,
- IMemoryAllocator &RawMemAllocator,
- const EngineVkAttribs &CreationAttribs,
- ICommandQueueVk *pCmdQueue,
- std::shared_ptr<VulkanUtilities::VulkanInstance> Instance,
- std::unique_ptr<VulkanUtilities::VulkanPhysicalDevice> PhysicalDevice,
- std::shared_ptr<VulkanUtilities::VulkanLogicalDevice> LogicalDevice,
- Uint32 NumDeferredContexts );
+ RenderDeviceVkImpl( IReferenceCounters* pRefCounters,
+ IMemoryAllocator& RawMemAllocator,
+ const EngineVkAttribs& CreationAttribs,
+ ICommandQueueVk* pCmdQueue,
+ std::shared_ptr<VulkanUtilities::VulkanInstance> Instance,
+ std::unique_ptr<VulkanUtilities::VulkanPhysicalDevice> PhysicalDevice,
+ std::shared_ptr<VulkanUtilities::VulkanLogicalDevice> LogicalDevice,
+ Uint32 NumDeferredContexts );
~RenderDeviceVkImpl();
- 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 CreatePipelineState( const PipelineStateDesc &PipelineDesc, IPipelineState **ppPipelineState )override final;
+ virtual void CreatePipelineState( const PipelineStateDesc &PipelineDesc, IPipelineState** ppPipelineState )override final;
- virtual void CreateBuffer(const BufferDesc& BuffDesc, const BufferData &BuffData, IBuffer **ppBuffer)override final;
+ virtual void CreateBuffer(const BufferDesc& BuffDesc, const BufferData& BuffData, IBuffer** ppBuffer)override final;
- virtual void CreateShader(const ShaderCreationAttribs &ShaderCreationAttribs, IShader **ppShader)override final;
+ virtual void CreateShader(const ShaderCreationAttribs& ShaderCreationAttribs, IShader** ppShader)override final;
- virtual void CreateTexture(const TextureDesc& TexDesc, const TextureData &Data, ITexture **ppTexture)override final;
+ virtual void CreateTexture(const TextureDesc& TexDesc, const TextureData& Data, ITexture** ppTexture)override final;
- void CreateTexture(const TextureDesc& TexDesc, VkImage vkImgHandle, class TextureVkImpl **ppTexture);
+ void CreateTexture(const TextureDesc& TexDesc, VkImage vkImgHandle, class TextureVkImpl** ppTexture);
- virtual void CreateSampler(const SamplerDesc& SamplerDesc, ISampler **ppSampler)override final;
+ virtual void CreateSampler(const SamplerDesc& SamplerDesc, ISampler** ppSampler)override final;
virtual VkDevice GetVkDevice()override final{ return m_LogicalVkDevice->GetVkDevice();}
- //virtual void CreateTextureFromD3DResource(IVkResource *pVkTexture, ITexture **ppTexture)override final;
+ //virtual void CreateTextureFromD3DResource(IVkResource* pVkTexture, ITexture** ppTexture)override final;
- //virtual void CreateBufferFromD3DResource(IVkResource *pVkBuffer, const BufferDesc& BuffDesc, IBuffer **ppBuffer)override final;
+ //virtual void CreateBufferFromD3DResource(IVkResource* pVkBuffer, const BufferDesc& BuffDesc, IBuffer** ppBuffer)override final;
Uint64 GetCompletedFenceValue();
virtual Uint64 GetNextFenceValue() override final
@@ -122,7 +122,7 @@ public:
std::shared_ptr<const VulkanUtilities::VulkanInstance> GetVulkanInstance()const{return m_VulkanInstance;}
const VulkanUtilities::VulkanPhysicalDevice& GetPhysicalDevice(){return *m_PhysicalDevice;}
- const VulkanUtilities::VulkanLogicalDevice& GetLogicalDevice(){return *m_LogicalVkDevice;}
+ const VulkanUtilities::VulkanLogicalDevice& GetLogicalDevice() {return *m_LogicalVkDevice;}
FramebufferCache& GetFramebufferCache(){return m_FramebufferCache;}
VulkanUtilities::VulkanMemoryAllocation AllocateMemory(const VkMemoryRequirements& MemReqs, VkMemoryPropertyFlags MemoryProperties)
diff --git a/Graphics/GraphicsEngineVulkan/include/SamplerVkImpl.h b/Graphics/GraphicsEngineVulkan/include/SamplerVkImpl.h
index 14bcf32e..23d4c713 100644
--- a/Graphics/GraphicsEngineVulkan/include/SamplerVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/SamplerVkImpl.h
@@ -40,7 +40,7 @@ class SamplerVkImpl : public SamplerBase<ISamplerVk, IRenderDeviceVk>
public:
typedef SamplerBase<ISamplerVk, IRenderDeviceVk> TSamplerBase;
- SamplerVkImpl(IReferenceCounters *pRefCounters, class RenderDeviceVkImpl *pRenderDeviceVk, const SamplerDesc& SamplerDesc);
+ SamplerVkImpl(IReferenceCounters* pRefCounters, class RenderDeviceVkImpl* pRenderDeviceVk, const SamplerDesc& SamplerDesc);
~SamplerVkImpl();
virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface )override;
diff --git a/Graphics/GraphicsEngineVulkan/include/ShaderResourceBindingVkImpl.h b/Graphics/GraphicsEngineVulkan/include/ShaderResourceBindingVkImpl.h
index b71a071b..978a967d 100644
--- a/Graphics/GraphicsEngineVulkan/include/ShaderResourceBindingVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/ShaderResourceBindingVkImpl.h
@@ -44,12 +44,12 @@ class ShaderResourceBindingVkImpl : public ShaderResourceBindingBase<IShaderReso
{
public:
typedef ShaderResourceBindingBase<IShaderResourceBindingVk> TBase;
- ShaderResourceBindingVkImpl(IReferenceCounters *pRefCounters, class PipelineStateVkImpl *pPSO, bool IsPSOInternal);
+ ShaderResourceBindingVkImpl(IReferenceCounters* pRefCounters, class PipelineStateVkImpl* pPSO, bool IsPSOInternal);
~ShaderResourceBindingVkImpl();
virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface )override;
- virtual void BindResources(Uint32 ShaderFlags, IResourceMapping *pResMapping, Uint32 Flags)override;
+ virtual void BindResources(Uint32 ShaderFlags, IResourceMapping* pResMapping, Uint32 Flags)override;
virtual IShaderVariable *GetVariable(SHADER_TYPE ShaderType, const char *Name)override;
diff --git a/Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.h b/Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.h
index e70adf59..3daa9d20 100644
--- a/Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/ShaderVkImpl.h
@@ -49,7 +49,7 @@ class ShaderVkImpl : public ShaderBase<IShaderVk, IRenderDeviceVk>
public:
typedef ShaderBase<IShaderVk, IRenderDeviceVk> TShaderBase;
- ShaderVkImpl(IReferenceCounters *pRefCounters, class RenderDeviceVkImpl *pRenderDeviceVk, const ShaderCreationAttribs &CreationAttribs);
+ ShaderVkImpl(IReferenceCounters* pRefCounters, class RenderDeviceVkImpl* pRenderDeviceVk, const ShaderCreationAttribs &CreationAttribs);
~ShaderVkImpl();
//virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface )override;
@@ -78,8 +78,8 @@ private:
// ShaderResources class instance must be referenced through the shared pointer, because
// it is referenced by ShaderResourceLayoutVk class instances
std::shared_ptr<const SPIRVShaderResources> m_pShaderResources;
- ShaderResourceLayoutVk m_StaticResLayout;
- ShaderResourceCacheVk m_StaticResCache;
+ ShaderResourceLayoutVk m_StaticResLayout;
+ ShaderResourceCacheVk m_StaticResCache;
ShaderVariableManagerVk m_StaticVarsMgr;
std::vector<uint32_t> m_SPIRV;
diff --git a/Graphics/GraphicsEngineVulkan/include/SwapChainVkImpl.h b/Graphics/GraphicsEngineVulkan/include/SwapChainVkImpl.h
index d5832b79..6fce88a9 100644
--- a/Graphics/GraphicsEngineVulkan/include/SwapChainVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/SwapChainVkImpl.h
@@ -41,14 +41,14 @@ class SwapChainVkImpl : public SwapChainBase<ISwapChainVk>
{
public:
typedef SwapChainBase<ISwapChainVk> TSwapChainBase;
- SwapChainVkImpl(IReferenceCounters *pRefCounters,
- const SwapChainDesc& SwapChainDesc,
- class RenderDeviceVkImpl* pRenderDeviceVk,
- class DeviceContextVkImpl* pDeviceContextVk,
- void* pNativeWndHandle);
+ SwapChainVkImpl(IReferenceCounters* pRefCounters,
+ const SwapChainDesc& SwapChainDesc,
+ class RenderDeviceVkImpl* pRenderDeviceVk,
+ class DeviceContextVkImpl* pDeviceContextVk,
+ void* pNativeWndHandle);
~SwapChainVkImpl();
- virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface );
+ virtual void QueryInterface( const Diligent::INTERFACE_ID& IID, IObject** ppInterface );
virtual void Present(Uint32 SyncInterval)override final;
virtual void Resize( Uint32 NewWidth, Uint32 NewHeight )override final;
@@ -64,7 +64,7 @@ public:
private:
void CreateVulkanSwapChain();
void InitBuffersAndViews();
- void AcquireNextImage(DeviceContextVkImpl *pDeviceCtxVk);
+ void AcquireNextImage(DeviceContextVkImpl* pDeviceCtxVk);
std::shared_ptr<const VulkanUtilities::VulkanInstance> m_VulkanInstance;
VkSurfaceKHR m_VkSurface = VK_NULL_HANDLE;
diff --git a/Graphics/GraphicsEngineVulkan/include/TextureViewVkImpl.h b/Graphics/GraphicsEngineVulkan/include/TextureViewVkImpl.h
index 681785a5..63d66ac0 100644
--- a/Graphics/GraphicsEngineVulkan/include/TextureViewVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/TextureViewVkImpl.h
@@ -41,17 +41,17 @@ class TextureViewVkImpl : public TextureViewBase<ITextureViewVk>
public:
typedef TextureViewBase<ITextureViewVk> TTextureViewBase;
- TextureViewVkImpl( IReferenceCounters *pRefCounters,
- IRenderDevice *pDevice,
- const TextureViewDesc& ViewDesc,
- class ITexture *pTexture,
- VulkanUtilities::ImageViewWrapper &&ImgView,
- bool bIsDefaultView);
+ TextureViewVkImpl( IReferenceCounters* pRefCounters,
+ IRenderDevice* pDevice,
+ const TextureViewDesc& ViewDesc,
+ class ITexture* pTexture,
+ VulkanUtilities::ImageViewWrapper&& ImgView,
+ bool bIsDefaultView);
~TextureViewVkImpl();
- virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface )override;
+ virtual void QueryInterface( const Diligent::INTERFACE_ID& IID, IObject** ppInterface )override;
- void GenerateMips( IDeviceContext *pContext )override;
+ void GenerateMips( IDeviceContext* pContext )override;
VkImageView GetVulkanImageView()const override final{return m_ImageView;}
diff --git a/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h b/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h
index 293e0966..11085b13 100644
--- a/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/TextureVkImpl.h
@@ -44,28 +44,28 @@ public:
typedef TextureBase<ITextureVk, TextureViewVkImpl, FixedBlockMemoryAllocator> TTextureBase;
// Creates a new Vk resource
- TextureVkImpl(IReferenceCounters *pRefCounters,
- FixedBlockMemoryAllocator &TexViewObjAllocator,
- class RenderDeviceVkImpl *pDeviceVk,
- const TextureDesc& TexDesc,
- const TextureData &InitData = TextureData());
+ TextureVkImpl(IReferenceCounters* pRefCounters,
+ FixedBlockMemoryAllocator& TexViewObjAllocator,
+ class RenderDeviceVkImpl* pDeviceVk,
+ const TextureDesc& TexDesc,
+ const TextureData& InitData = TextureData());
// Attaches to an existing Vk resource
- TextureVkImpl(IReferenceCounters *pRefCounters,
- FixedBlockMemoryAllocator &TexViewObjAllocator,
- class RenderDeviceVkImpl *pDeviceVk,
- const TextureDesc& TexDesc,
- VkImage&& VkImageHandle);
+ TextureVkImpl(IReferenceCounters* pRefCounters,
+ FixedBlockMemoryAllocator& TexViewObjAllocator,
+ class RenderDeviceVkImpl* pDeviceVk,
+ const TextureDesc& TexDesc,
+ VkImage&& VkImageHandle);
~TextureVkImpl();
- virtual void QueryInterface( const Diligent::INTERFACE_ID &IID, IObject **ppInterface )override;
+ virtual void QueryInterface( const Diligent::INTERFACE_ID& IID, IObject** ppInterface )override;
- virtual void UpdateData( IDeviceContext *pContext, Uint32 MipLevel, Uint32 Slice, const Box &DstBox, const TextureSubResData &SubresData )override;
+ virtual void UpdateData( IDeviceContext* pContext, Uint32 MipLevel, Uint32 Slice, const Box& DstBox, const TextureSubResData& SubresData )override;
- //virtual void CopyData(CTexture *pSrcTexture, Uint32 SrcOffset, Uint32 DstOffset, Uint32 Size);
- virtual void Map( IDeviceContext *pContext, Uint32 Subresource, MAP_TYPE MapType, Uint32 MapFlags, MappedTextureSubresource &MappedData )override;
- virtual void Unmap( IDeviceContext *pContext, Uint32 Subresource, MAP_TYPE MapType, Uint32 MapFlags )override;
+ //virtual void CopyData(CTexture* pSrcTexture, Uint32 SrcOffset, Uint32 DstOffset, Uint32 Size);
+ virtual void Map( IDeviceContext* pContext, Uint32 Subresource, MAP_TYPE MapType, Uint32 MapFlags, MappedTextureSubresource& MappedData )override;
+ virtual void Unmap( IDeviceContext* pContext, Uint32 Subresource, MAP_TYPE MapType, Uint32 MapFlags )override;
virtual VkImage GetVkImage(){ return m_VulkanImage; }
virtual void* GetNativeHandle()override final { return GetVkImage(); }
@@ -73,11 +73,11 @@ public:
virtual void SetVkResourceState(Vk_RESOURCE_STATES state)override final{ SetState(state); }
*/
- void CopyData(IDeviceContext *pContext,
- ITexture *pSrcTexture,
+ void CopyData(IDeviceContext* pContext,
+ ITexture* pSrcTexture,
Uint32 SrcMipLevel,
Uint32 SrcSlice,
- const Box *pSrcBox,
+ const Box* pSrcBox,
Uint32 DstMipLevel,
Uint32 DstSlice,
Uint32 DstX,
@@ -100,7 +100,7 @@ public:
protected:
- void CreateViewInternal( const struct TextureViewDesc &ViewDesc, ITextureView **ppView, bool bIsDefaultView )override;
+ void CreateViewInternal( const struct TextureViewDesc& ViewDesc, ITextureView** ppView, bool bIsDefaultView )override;
//void PrepareVkInitData(const TextureData &InitData, Uint32 NumSubresources, std::vector<Vk_SUBRESOURCE_DATA> &VkInitData);
VulkanUtilities::ImageViewWrapper CreateImageView(TextureViewDesc &ViewDesc);
diff --git a/Graphics/GraphicsEngineVulkan/include/VulkanTypeConversions.h b/Graphics/GraphicsEngineVulkan/include/VulkanTypeConversions.h
index cc2f794a..cfd1bc12 100644
--- a/Graphics/GraphicsEngineVulkan/include/VulkanTypeConversions.h
+++ b/Graphics/GraphicsEngineVulkan/include/VulkanTypeConversions.h
@@ -39,18 +39,18 @@ VkFormat TypeToVkFormat(VALUE_TYPE ValType, Uint32 NumComponents, Bool bIsNormal
VkPipelineRasterizationStateCreateInfo RasterizerStateDesc_To_VkRasterizationStateCI(const RasterizerStateDesc &RasterizerDesc);
VkPipelineDepthStencilStateCreateInfo DepthStencilStateDesc_To_VkDepthStencilStateCI(const DepthStencilStateDesc &DepthStencilDesc);
-void BlendStateDesc_To_VkBlendStateCI(const BlendStateDesc &BSDesc,
- VkPipelineColorBlendStateCreateInfo &ColorBlendStateCI,
- std::vector<VkPipelineColorBlendAttachmentState> &ColorBlendAttachments);
+void BlendStateDesc_To_VkBlendStateCI(const BlendStateDesc& BSDesc,
+ VkPipelineColorBlendStateCreateInfo& ColorBlendStateCI,
+ std::vector<VkPipelineColorBlendAttachmentState>& ColorBlendAttachments);
-void InputLayoutDesc_To_VkVertexInputStateCI(const InputLayoutDesc& LayoutDesc,
- VkPipelineVertexInputStateCreateInfo &VertexInputStateCI,
- std::array<VkVertexInputBindingDescription, iMaxLayoutElements>& BindingDescriptions,
+void InputLayoutDesc_To_VkVertexInputStateCI(const InputLayoutDesc& LayoutDesc,
+ VkPipelineVertexInputStateCreateInfo& VertexInputStateCI,
+ std::array<VkVertexInputBindingDescription, iMaxLayoutElements>& BindingDescriptions,
std::array<VkVertexInputAttributeDescription, iMaxLayoutElements>& AttributeDescription);
-void PrimitiveTopology_To_VkPrimitiveTopologyAndPatchCPCount(PRIMITIVE_TOPOLOGY PrimTopology,
- VkPrimitiveTopology &VkPrimTopology,
- uint32_t &PatchControlPoints);
+void PrimitiveTopology_To_VkPrimitiveTopologyAndPatchCPCount(PRIMITIVE_TOPOLOGY PrimTopology,
+ VkPrimitiveTopology& VkPrimTopology,
+ uint32_t& PatchControlPoints);
VkCompareOp ComparisonFuncToVkCompareOp(COMPARISON_FUNCTION CmpFunc);
VkFilter FilterTypeToVkFilter(FILTER_TYPE FilterType);
diff --git a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanCommandBuffer.h b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanCommandBuffer.h
index b4d3269c..cda2bb73 100644
--- a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanCommandBuffer.h
+++ b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanCommandBuffer.h
@@ -31,13 +31,13 @@ namespace VulkanUtilities
class VulkanCommandBuffer
{
public:
- VulkanCommandBuffer(){}
- VulkanCommandBuffer(const VulkanCommandBuffer&) = delete;
- VulkanCommandBuffer(VulkanCommandBuffer&&) = delete;
+ VulkanCommandBuffer()noexcept{}
+ VulkanCommandBuffer (const VulkanCommandBuffer&) = delete;
+ VulkanCommandBuffer (VulkanCommandBuffer&&) = delete;
VulkanCommandBuffer& operator = (const VulkanCommandBuffer&) = delete;
- VulkanCommandBuffer& operator = (VulkanCommandBuffer&&) = delete;
+ VulkanCommandBuffer& operator = (VulkanCommandBuffer&&) = delete;
- void ClearColorImage(VkImage Image, const VkClearColorValue &Color, const VkImageSubresourceRange& Subresource)
+ void ClearColorImage(VkImage Image, const VkClearColorValue& Color, const VkImageSubresourceRange& Subresource)
{
VERIFY_EXPR(m_VkCmdBuffer != VK_NULL_HANDLE);
VERIFY(m_State.RenderPass == VK_NULL_HANDLE, "vkCmdClearColorImage() must be called outside of render pass (17.1)");
@@ -53,7 +53,7 @@ namespace VulkanUtilities
);
}
- void ClearDepthStencilImage(VkImage Image, const VkClearDepthStencilValue &DepthStencil, const VkImageSubresourceRange& Subresource)
+ void ClearDepthStencilImage(VkImage Image, const VkClearDepthStencilValue& DepthStencil, const VkImageSubresourceRange& Subresource)
{
VERIFY_EXPR(m_VkCmdBuffer != VK_NULL_HANDLE);
VERIFY(m_State.RenderPass == VK_NULL_HANDLE, "vkCmdClearDepthStencilImage() must be called outside of render pass (17.1)");
@@ -69,7 +69,7 @@ namespace VulkanUtilities
);
}
- void ClearAttachment(const VkClearAttachment& Attachment, const VkClearRect &ClearRect)
+ void ClearAttachment(const VkClearAttachment& Attachment, const VkClearRect& ClearRect)
{
VERIFY_EXPR(m_VkCmdBuffer != VK_NULL_HANDLE);
VERIFY(m_State.RenderPass != VK_NULL_HANDLE, "vkCmdClearAttachments() must be called inside render pass (17.2)");
diff --git a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanCommandBufferPool.h b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanCommandBufferPool.h
index 464b1e56..f37727d5 100644
--- a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanCommandBufferPool.h
+++ b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanCommandBufferPool.h
@@ -36,13 +36,15 @@ namespace VulkanUtilities
{
public:
VulkanCommandBufferPool(std::shared_ptr<const VulkanUtilities::VulkanLogicalDevice> LogicalDevice,
- uint32_t queueFamilyIndex,
+ uint32_t queueFamilyIndex,
VkCommandPoolCreateFlags flags,
- bool IsThreadSafe);
- VulkanCommandBufferPool(const VulkanCommandBufferPool&) = delete;
- VulkanCommandBufferPool(VulkanCommandBufferPool&&) = delete;
+ bool IsThreadSafe);
+
+ VulkanCommandBufferPool (const VulkanCommandBufferPool&) = delete;
+ VulkanCommandBufferPool (VulkanCommandBufferPool&&) = delete;
VulkanCommandBufferPool& operator = (const VulkanCommandBufferPool&) = delete;
- VulkanCommandBufferPool& operator = (VulkanCommandBufferPool&&) = delete;
+ VulkanCommandBufferPool& operator = (VulkanCommandBufferPool&&) = delete;
+
~VulkanCommandBufferPool();
VkCommandBuffer GetCommandBuffer(uint64_t LastCompletedFence, const char* DebugName = "");
diff --git a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanDescriptorPool.h b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanDescriptorPool.h
index a05433e8..97cd7f94 100644
--- a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanDescriptorPool.h
+++ b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanDescriptorPool.h
@@ -36,10 +36,11 @@ namespace VulkanUtilities
public:
VulkanDescriptorPool(std::shared_ptr<const VulkanUtilities::VulkanLogicalDevice> LogicalDevice,
const VkDescriptorPoolCreateInfo &DescriptorPoolCI)noexcept;
+
VulkanDescriptorPool (const VulkanDescriptorPool&) = delete;
VulkanDescriptorPool& operator = (const VulkanDescriptorPool&) = delete;
- VulkanDescriptorPool (VulkanDescriptorPool&&) = default;
- VulkanDescriptorPool& operator = (VulkanDescriptorPool&&) = default;
+ VulkanDescriptorPool (VulkanDescriptorPool&&) = default;
+ VulkanDescriptorPool& operator = (VulkanDescriptorPool&&) = default;
~VulkanDescriptorPool();
VkDescriptorSet AllocateDescriptorSet(VkDescriptorSetLayout SetLayout, const char* DebugName = "");
diff --git a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanFencePool.h b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanFencePool.h
index 3e4f5168..4c79a868 100644
--- a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanFencePool.h
+++ b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanFencePool.h
@@ -35,10 +35,12 @@ namespace VulkanUtilities
{
public:
VulkanFencePool(std::shared_ptr<const VulkanLogicalDevice> LogicalDevice);
- VulkanFencePool(const VulkanFencePool&) = delete;
- VulkanFencePool(VulkanFencePool&&) = delete;
+
+ VulkanFencePool (const VulkanFencePool&) = delete;
+ VulkanFencePool (VulkanFencePool&&) = delete;
VulkanFencePool& operator = (const VulkanFencePool&) = delete;
- VulkanFencePool& operator = (VulkanFencePool&&) = delete;
+ VulkanFencePool& operator = (VulkanFencePool&&) = delete;
+
~VulkanFencePool();
VulkanUtilities::FenceWrapper GetFence();
diff --git a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanInstance.h b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanInstance.h
index f0ff0080..4738c7e7 100644
--- a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanInstance.h
+++ b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanInstance.h
@@ -32,14 +32,14 @@ namespace VulkanUtilities
class VulkanInstance : public std::enable_shared_from_this<VulkanInstance>
{
public:
- VulkanInstance(const VulkanInstance&) = delete;
- VulkanInstance(VulkanInstance&&) = delete;
+ VulkanInstance (const VulkanInstance&) = delete;
+ VulkanInstance (VulkanInstance&&) = delete;
VulkanInstance& operator = (const VulkanInstance&) = delete;
- VulkanInstance& operator = (VulkanInstance&&) = delete;
+ VulkanInstance& operator = (VulkanInstance&&) = delete;
- static std::shared_ptr<VulkanInstance> Create(bool EnableValidation,
- uint32_t GlobalExtensionCount,
- const char* const* ppGlobalExtensionNames,
+ static std::shared_ptr<VulkanInstance> Create(bool EnableValidation,
+ uint32_t GlobalExtensionCount,
+ const char* const* ppGlobalExtensionNames,
VkAllocationCallbacks* pVkAllocator);
~VulkanInstance();
diff --git a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanLogicalDevice.h b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanLogicalDevice.h
index 2ed955c0..e40b357c 100644
--- a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanLogicalDevice.h
+++ b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanLogicalDevice.h
@@ -32,14 +32,15 @@ namespace VulkanUtilities
class VulkanLogicalDevice : public std::enable_shared_from_this<VulkanLogicalDevice>
{
public:
- static std::shared_ptr<VulkanLogicalDevice> Create(VkPhysicalDevice vkPhysicalDevice,
- const VkDeviceCreateInfo &DeviceCI,
+ static std::shared_ptr<VulkanLogicalDevice> Create(VkPhysicalDevice vkPhysicalDevice,
+ const VkDeviceCreateInfo& DeviceCI,
const VkAllocationCallbacks* vkAllocator,
- bool EnableDebugMarkers);
- VulkanLogicalDevice(const VulkanLogicalDevice&) = delete;
- VulkanLogicalDevice(VulkanLogicalDevice&&) = delete;
+ bool EnableDebugMarkers);
+
+ VulkanLogicalDevice (const VulkanLogicalDevice&) = delete;
+ VulkanLogicalDevice (VulkanLogicalDevice&&) = delete;
VulkanLogicalDevice& operator = (const VulkanLogicalDevice&) = delete;
- VulkanLogicalDevice& operator = (VulkanLogicalDevice&&) = delete;
+ VulkanLogicalDevice& operator = (VulkanLogicalDevice&&) = delete;
~VulkanLogicalDevice();
@@ -129,10 +130,10 @@ namespace VulkanUtilities
bool EnableDebugMarkers);
template<typename VkObjectType, typename VkCreateObjectFuncType, typename VkObjectCreateInfoType>
- VulkanObjectWrapper<VkObjectType> CreateVulkanObject(VkCreateObjectFuncType VkCreateObject,
+ VulkanObjectWrapper<VkObjectType> CreateVulkanObject(VkCreateObjectFuncType VkCreateObject,
const VkObjectCreateInfoType& CreateInfo,
- const char *DebugName,
- const char *ObjectType)const;
+ const char* DebugName,
+ const char* ObjectType)const;
VkDevice m_VkDevice = VK_NULL_HANDLE;
const VkAllocationCallbacks* const m_VkAllocator;
diff --git a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanObjectWrappers.h b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanObjectWrappers.h
index 5507d94e..36a7b645 100644
--- a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanObjectWrappers.h
+++ b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanObjectWrappers.h
@@ -38,23 +38,25 @@ namespace VulkanUtilities
VulkanObjectWrapper() :
m_pLogicalDevice(nullptr),
- m_VkObject(VK_NULL_HANDLE)
+ m_VkObject (VK_NULL_HANDLE)
{}
VulkanObjectWrapper(std::shared_ptr<const VulkanLogicalDevice> pLogicalDevice, VulkanObjectType&& vkObject) :
m_pLogicalDevice(pLogicalDevice),
- m_VkObject(vkObject)
+ m_VkObject (vkObject)
{
vkObject = VK_NULL_HANDLE;
}
- VulkanObjectWrapper(const VulkanObjectWrapper&) = delete;
+
+ VulkanObjectWrapper (const VulkanObjectWrapper&) = delete;
VulkanObjectWrapper& operator = (const VulkanObjectWrapper&) = delete;
- VulkanObjectWrapper(VulkanObjectWrapper&& rhs) :
+
+ VulkanObjectWrapper(VulkanObjectWrapper&& rhs)noexcept :
m_pLogicalDevice(std::move(rhs.m_pLogicalDevice)),
- m_VkObject(rhs.m_VkObject)
+ m_VkObject (rhs.m_VkObject)
{
rhs.m_VkObject = VK_NULL_HANDLE;
}
- VulkanObjectWrapper& operator = (VulkanObjectWrapper&& rhs)
+ VulkanObjectWrapper& operator = (VulkanObjectWrapper&& rhs)noexcept
{
Release();
m_pLogicalDevice = std::move(rhs.m_pLogicalDevice);
diff --git a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanPhysicalDevice.h b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanPhysicalDevice.h
index 9dd9e6f6..829ccd45 100644
--- a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanPhysicalDevice.h
+++ b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanPhysicalDevice.h
@@ -32,16 +32,16 @@ namespace VulkanUtilities
class VulkanPhysicalDevice
{
public:
- VulkanPhysicalDevice(const VulkanPhysicalDevice&) = delete;
- VulkanPhysicalDevice(VulkanPhysicalDevice&&) = delete;
+ VulkanPhysicalDevice (const VulkanPhysicalDevice&) = delete;
+ VulkanPhysicalDevice (VulkanPhysicalDevice&&) = delete;
VulkanPhysicalDevice& operator = (const VulkanPhysicalDevice&) = delete;
- VulkanPhysicalDevice& operator = (VulkanPhysicalDevice&&) = delete;
+ VulkanPhysicalDevice& operator = (VulkanPhysicalDevice&&) = delete;
static std::unique_ptr<VulkanPhysicalDevice> Create(VkPhysicalDevice vkDevice);
uint32_t FindQueueFamily(VkQueueFlags QueueFlags)const;
VkPhysicalDevice GetVkDeviceHandle()const{return m_VkDevice;}
- bool IsExtensionSupported(const char *ExtensionName)const;
+ bool IsExtensionSupported(const char* ExtensionName)const;
bool CheckPresentSupport(uint32_t queueFamilyIndex, VkSurfaceKHR VkSurface)const;
static constexpr uint32_t InvalidMemoryTypeIndex = static_cast<uint32_t>(-1);
diff --git a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanUploadHeap.h b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanUploadHeap.h
index a1f07a11..19282886 100644
--- a/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanUploadHeap.h
+++ b/Graphics/GraphicsEngineVulkan/include/VulkanUtilities/VulkanUploadHeap.h
@@ -34,7 +34,7 @@ struct VulkanUploadAllocation
VulkanUploadAllocation(){}
VulkanUploadAllocation(VulkanMemoryAllocation&& _MemAllocation, VkBuffer _vkBuffer) :
MemAllocation(std::move(_MemAllocation)),
- vkBuffer(_vkBuffer)
+ vkBuffer (_vkBuffer)
{}
VulkanUploadAllocation (const VulkanUploadAllocation&) = delete;
VulkanUploadAllocation& operator = (const VulkanUploadAllocation&) = delete;
diff --git a/Graphics/GraphicsEngineVulkan/src/BufferViewVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/BufferViewVkImpl.cpp
index ec4b22ce..fe8778c8 100644
--- a/Graphics/GraphicsEngineVulkan/src/BufferViewVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/BufferViewVkImpl.cpp
@@ -29,12 +29,12 @@
namespace Diligent
{
-BufferViewVkImpl::BufferViewVkImpl( IReferenceCounters *pRefCounters,
- IRenderDevice *pDevice,
- const BufferViewDesc& ViewDesc,
- IBuffer *pBuffer,
- VulkanUtilities::BufferViewWrapper &&BuffView,
- bool bIsDefaultView ) :
+BufferViewVkImpl::BufferViewVkImpl( IReferenceCounters* pRefCounters,
+ IRenderDevice* pDevice,
+ const BufferViewDesc& ViewDesc,
+ IBuffer* pBuffer,
+ VulkanUtilities::BufferViewWrapper&& BuffView,
+ bool bIsDefaultView ) :
TBufferViewBase( pRefCounters, pDevice, ViewDesc, pBuffer, bIsDefaultView ),
m_BuffView(std::move(BuffView))
{
diff --git a/Graphics/GraphicsEngineVulkan/src/BufferVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/BufferVkImpl.cpp
index a5bf6c38..cd254899 100644
--- a/Graphics/GraphicsEngineVulkan/src/BufferVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/BufferVkImpl.cpp
@@ -279,11 +279,11 @@ static BufferDesc BufferDescFromVkResource(BufferDesc BuffDesc, void *pVkBuffer)
return BuffDesc;
}
-BufferVkImpl :: BufferVkImpl(IReferenceCounters *pRefCounters,
- FixedBlockMemoryAllocator &BuffViewObjMemAllocator,
- RenderDeviceVkImpl *pRenderDeviceVk,
- const BufferDesc& BuffDesc,
- void *pVkBuffer) :
+BufferVkImpl :: BufferVkImpl(IReferenceCounters* pRefCounters,
+ FixedBlockMemoryAllocator& BuffViewObjMemAllocator,
+ RenderDeviceVkImpl* pRenderDeviceVk,
+ const BufferDesc& BuffDesc,
+ void* pVkBuffer) :
TBufferBase(pRefCounters, BuffViewObjMemAllocator, pRenderDeviceVk, BufferDescFromVkResource(BuffDesc, pVkBuffer), false),
m_AccessFlags(0),
#ifdef _DEBUG
@@ -325,14 +325,14 @@ void BufferVkImpl::UpdateData( IDeviceContext *pContext, Uint32 Offset, Uint32 S
pDeviceContextVk->UpdateBufferRegion(this, pData, Offset, Size);
}
-void BufferVkImpl :: CopyData(IDeviceContext *pContext, IBuffer *pSrcBuffer, Uint32 SrcOffset, Uint32 DstOffset, Uint32 Size)
+void BufferVkImpl :: CopyData(IDeviceContext* pContext, IBuffer* pSrcBuffer, Uint32 SrcOffset, Uint32 DstOffset, Uint32 Size)
{
TBufferBase::CopyData( pContext, pSrcBuffer, SrcOffset, DstOffset, Size );
auto *pDeviceContextVk = ValidatedCast<DeviceContextVkImpl>(pContext);
pDeviceContextVk->CopyBufferRegion(ValidatedCast<BufferVkImpl>(pSrcBuffer), this, SrcOffset, DstOffset, Size);
}
-void BufferVkImpl :: Map(IDeviceContext *pContext, MAP_TYPE MapType, Uint32 MapFlags, PVoid &pMappedData)
+void BufferVkImpl :: Map(IDeviceContext* pContext, MAP_TYPE MapType, Uint32 MapFlags, PVoid &pMappedData)
{
TBufferBase::Map( pContext, MapType, MapFlags, pMappedData );
@@ -402,7 +402,7 @@ void BufferVkImpl :: Map(IDeviceContext *pContext, MAP_TYPE MapType, Uint32 MapF
}
}
-void BufferVkImpl::Unmap( IDeviceContext *pContext, MAP_TYPE MapType, Uint32 MapFlags )
+void BufferVkImpl::Unmap( IDeviceContext* pContext, MAP_TYPE MapType, Uint32 MapFlags )
{
TBufferBase::Unmap( pContext, MapType, MapFlags );
@@ -455,7 +455,7 @@ void BufferVkImpl::Unmap( IDeviceContext *pContext, MAP_TYPE MapType, Uint32 Map
#endif
}
-void BufferVkImpl::CreateViewInternal( const BufferViewDesc &OrigViewDesc, IBufferView **ppView, bool bIsDefaultView )
+void BufferVkImpl::CreateViewInternal( const BufferViewDesc& OrigViewDesc, IBufferView** ppView, bool bIsDefaultView )
{
VERIFY( ppView != nullptr, "Null pointer provided" );
if( !ppView )return;
@@ -488,7 +488,7 @@ void BufferVkImpl::CreateViewInternal( const BufferViewDesc &OrigViewDesc, IBuff
}
-VulkanUtilities::BufferViewWrapper BufferVkImpl::CreateView(struct BufferViewDesc &ViewDesc)
+VulkanUtilities::BufferViewWrapper BufferVkImpl::CreateView(struct BufferViewDesc& ViewDesc)
{
VulkanUtilities::BufferViewWrapper BuffView;
CorrectBufferViewDesc(ViewDesc);
diff --git a/Graphics/GraphicsEngineVulkan/src/CommandPoolManager.cpp b/Graphics/GraphicsEngineVulkan/src/CommandPoolManager.cpp
index 638b749a..c118b788 100644
--- a/Graphics/GraphicsEngineVulkan/src/CommandPoolManager.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/CommandPoolManager.cpp
@@ -37,7 +37,7 @@ CommandPoolManager ::CommandPoolManager(const VulkanUtilities::VulkanLogicalDevi
{
}
-VulkanUtilities::CommandPoolWrapper CommandPoolManager::AllocateCommandPool(uint64_t CompletedFenceValue, const char *DebugName)
+VulkanUtilities::CommandPoolWrapper CommandPoolManager::AllocateCommandPool(uint64_t CompletedFenceValue, const char* DebugName)
{
std::lock_guard<std::mutex> LockGuard(m_Mutex);
diff --git a/Graphics/GraphicsEngineVulkan/src/CommandQueueVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/CommandQueueVkImpl.cpp
index 35bd779f..3ca86233 100644
--- a/Graphics/GraphicsEngineVulkan/src/CommandQueueVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/CommandQueueVkImpl.cpp
@@ -28,9 +28,9 @@
namespace Diligent
{
-CommandQueueVkImpl::CommandQueueVkImpl(IReferenceCounters *pRefCounters,
+CommandQueueVkImpl::CommandQueueVkImpl(IReferenceCounters* pRefCounters,
std::shared_ptr<VulkanUtilities::VulkanLogicalDevice> LogicalDevice,
- uint32_t QueueFamilyIndex) :
+ uint32_t QueueFamilyIndex) :
TBase(pRefCounters),
m_LogicalDevice(LogicalDevice),
m_VkQueue(LogicalDevice->GetQueue(QueueFamilyIndex, 0)),
diff --git a/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp
index ad2b497d..dafd736f 100644
--- a/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp
@@ -124,7 +124,9 @@ void PipelineStateVkImpl::CreateRenderPass(const VulkanUtilities::VulkanLogicalD
m_RenderPass = LogicalDevice.CreateRenderPass(RenderPassCI, RenderPassName.c_str());
}
-PipelineStateVkImpl :: PipelineStateVkImpl(IReferenceCounters *pRefCounters, RenderDeviceVkImpl *pDeviceVk, const PipelineStateDesc &PipelineDesc) :
+PipelineStateVkImpl :: PipelineStateVkImpl(IReferenceCounters* pRefCounters,
+ RenderDeviceVkImpl* pDeviceVk,
+ const PipelineStateDesc& PipelineDesc) :
TPipelineStateBase(pRefCounters, pDeviceVk, PipelineDesc),
m_DummyVar(*this),
m_ResourceCacheDataAllocator(GetRawAllocator(), PipelineDesc.SRBAllocationGranularity),
diff --git a/Graphics/GraphicsEngineVulkan/src/RenderDeviceFactoryVk.cpp b/Graphics/GraphicsEngineVulkan/src/RenderDeviceFactoryVk.cpp
index 7bc2d843..68367d72 100644
--- a/Graphics/GraphicsEngineVulkan/src/RenderDeviceFactoryVk.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/RenderDeviceFactoryVk.cpp
@@ -48,24 +48,24 @@ public:
}
void CreateDeviceAndContextsVk( const EngineVkAttribs& CreationAttribs,
- IRenderDevice **ppDevice,
- IDeviceContext **ppContexts,
- Uint32 NumDeferredContexts)override final;
+ IRenderDevice** ppDevice,
+ IDeviceContext** ppContexts,
+ Uint32 NumDeferredContexts)override final;
- void AttachToVulkanDevice(std::shared_ptr<VulkanUtilities::VulkanInstance>,
+ void AttachToVulkanDevice(std::shared_ptr<VulkanUtilities::VulkanInstance> Instance,
std::unique_ptr<VulkanUtilities::VulkanPhysicalDevice> PhysicalDevice,
- std::shared_ptr<VulkanUtilities::VulkanLogicalDevice> LogicalDevice,
- ICommandQueueVk *pCommandQueue,
+ std::shared_ptr<VulkanUtilities::VulkanLogicalDevice> LogicalDevice,
+ ICommandQueueVk* pCommandQueue,
const EngineVkAttribs& EngineAttribs,
- IRenderDevice **ppDevice,
- IDeviceContext **ppContexts,
- Uint32 NumDeferredContexts);//override final;
+ IRenderDevice** ppDevice,
+ IDeviceContext** ppContexts,
+ Uint32 NumDeferredContexts);//override final;
- void CreateSwapChainVk( IRenderDevice *pDevice,
- IDeviceContext *pImmediateContext,
+ void CreateSwapChainVk( IRenderDevice* pDevice,
+ IDeviceContext* pImmediateContext,
const SwapChainDesc& SwapChainDesc,
- void* pNativeWndHandle,
- ISwapChain **ppSwapChain )override final;
+ void* pNativeWndHandle,
+ ISwapChain** ppSwapChain )override final;
};
/// Creates render device and device contexts for Vulkan backend
@@ -82,9 +82,9 @@ public:
/// contexts are written to ppContexts array starting
/// at position 1
void EngineFactoryVkImpl::CreateDeviceAndContextsVk( const EngineVkAttribs& CreationAttribs,
- IRenderDevice **ppDevice,
- IDeviceContext **ppContexts,
- Uint32 NumDeferredContexts)
+ IRenderDevice** ppDevice,
+ IDeviceContext** ppContexts,
+ Uint32 NumDeferredContexts)
{
VERIFY( ppDevice && ppContexts, "Null pointer provided" );
if( !ppDevice || !ppContexts )
@@ -216,14 +216,14 @@ void EngineFactoryVkImpl::CreateDeviceAndContextsVk( const EngineVkAttribs& Crea
/// of deferred contexts is requested, pointers to the
/// contexts are written to ppContexts array starting
/// at position 1
-void EngineFactoryVkImpl::AttachToVulkanDevice(std::shared_ptr<VulkanUtilities::VulkanInstance> Instance,
+void EngineFactoryVkImpl::AttachToVulkanDevice(std::shared_ptr<VulkanUtilities::VulkanInstance> Instance,
std::unique_ptr<VulkanUtilities::VulkanPhysicalDevice> PhysicalDevice,
- std::shared_ptr<VulkanUtilities::VulkanLogicalDevice> LogicalDevice,
- ICommandQueueVk *pCommandQueue,
+ std::shared_ptr<VulkanUtilities::VulkanLogicalDevice> LogicalDevice,
+ ICommandQueueVk* pCommandQueue,
const EngineVkAttribs& EngineAttribs,
- IRenderDevice **ppDevice,
- IDeviceContext **ppContexts,
- Uint32 NumDeferredContexts)
+ IRenderDevice** ppDevice,
+ IDeviceContext** ppContexts,
+ Uint32 NumDeferredContexts)
{
VERIFY( pCommandQueue && ppDevice && ppContexts, "Null pointer provided" );
if(!LogicalDevice || !pCommandQueue || !ppDevice || !ppContexts )
@@ -287,11 +287,11 @@ void EngineFactoryVkImpl::AttachToVulkanDevice(std::shared_ptr<VulkanUtilities::
///
/// \param [out] ppSwapChain - Address of the memory location where pointer to the new
/// swap chain will be written
-void EngineFactoryVkImpl::CreateSwapChainVk( IRenderDevice *pDevice,
- IDeviceContext *pImmediateContext,
- const SwapChainDesc& SCDesc,
- void* pNativeWndHandle,
- ISwapChain **ppSwapChain )
+void EngineFactoryVkImpl::CreateSwapChainVk( IRenderDevice* pDevice,
+ IDeviceContext* pImmediateContext,
+ const SwapChainDesc& SCDesc,
+ void* pNativeWndHandle,
+ ISwapChain** ppSwapChain )
{
VERIFY( ppSwapChain, "Null pointer provided" );
if( !ppSwapChain )
diff --git a/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp
index 3526631d..59befce3 100644
--- a/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp
@@ -215,7 +215,7 @@ void RenderDeviceVkImpl::SubmitCommandBuffer(const VkSubmitInfo& SubmitInfo,
Atomics::AtomicIncrement(m_NextCmdBuffNumber);
}
-Uint64 RenderDeviceVkImpl::ExecuteCommandBuffer(const VkSubmitInfo &SubmitInfo, DeviceContextVkImpl* pImmediateCtx)
+Uint64 RenderDeviceVkImpl::ExecuteCommandBuffer(const VkSubmitInfo& SubmitInfo, DeviceContextVkImpl* pImmediateCtx)
{
// pImmediateCtx parameter is only used to make sure the command buffer is submitted from the immediate context
// Stale objects MUST only be discarded when submitting cmd list from the immediate context
diff --git a/Graphics/GraphicsEngineVulkan/src/SamplerVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/SamplerVkImpl.cpp
index e6b481a3..91a82c0c 100644
--- a/Graphics/GraphicsEngineVulkan/src/SamplerVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/SamplerVkImpl.cpp
@@ -30,7 +30,7 @@
namespace Diligent
{
-SamplerVkImpl::SamplerVkImpl(IReferenceCounters *pRefCounters, RenderDeviceVkImpl *pRenderDeviceVk, const SamplerDesc& SamplerDesc) :
+SamplerVkImpl::SamplerVkImpl(IReferenceCounters* pRefCounters, RenderDeviceVkImpl* pRenderDeviceVk, const SamplerDesc& SamplerDesc) :
TSamplerBase(pRefCounters, pRenderDeviceVk, SamplerDesc)
{
const auto &LogicalDevice = pRenderDeviceVk->GetLogicalDevice();
diff --git a/Graphics/GraphicsEngineVulkan/src/ShaderResourceBindingVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/ShaderResourceBindingVkImpl.cpp
index c238beb2..6e26bcb3 100644
--- a/Graphics/GraphicsEngineVulkan/src/ShaderResourceBindingVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/ShaderResourceBindingVkImpl.cpp
@@ -31,7 +31,7 @@
namespace Diligent
{
-ShaderResourceBindingVkImpl::ShaderResourceBindingVkImpl( IReferenceCounters *pRefCounters, PipelineStateVkImpl *pPSO, bool IsPSOInternal) :
+ShaderResourceBindingVkImpl::ShaderResourceBindingVkImpl( IReferenceCounters* pRefCounters, PipelineStateVkImpl* pPSO, bool IsPSOInternal) :
TBase( pRefCounters, pPSO, IsPSOInternal ),
m_ShaderResourceCache(ShaderResourceCacheVk::DbgCacheContentType::SRBResources)
{
diff --git a/Graphics/GraphicsEngineVulkan/src/ShaderResourceCacheVk.cpp b/Graphics/GraphicsEngineVulkan/src/ShaderResourceCacheVk.cpp
index 9f548fa4..5f162ddd 100644
--- a/Graphics/GraphicsEngineVulkan/src/ShaderResourceCacheVk.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/ShaderResourceCacheVk.cpp
@@ -34,7 +34,7 @@
namespace Diligent
{
-void ShaderResourceCacheVk::InitializeSets(IMemoryAllocator &MemAllocator, Uint32 NumSets, Uint32 SetSizes[])
+void ShaderResourceCacheVk::InitializeSets(IMemoryAllocator& MemAllocator, Uint32 NumSets, Uint32 SetSizes[])
{
// Memory layout:
//
@@ -186,8 +186,8 @@ void ShaderResourceCacheVk::TransitionResources(DeviceContextVkImpl *pCtxVkImpl)
}
}
-template void ShaderResourceCacheVk::TransitionResources<false>(DeviceContextVkImpl *pCtxVkImpl);
-template void ShaderResourceCacheVk::TransitionResources<true>(DeviceContextVkImpl *pCtxVkImpl);
+template void ShaderResourceCacheVk::TransitionResources<false>(DeviceContextVkImpl* pCtxVkImpl);
+template void ShaderResourceCacheVk::TransitionResources<true>(DeviceContextVkImpl* pCtxVkImpl);
VkDescriptorBufferInfo ShaderResourceCacheVk::Resource::GetUniformBufferDescriptorWriteInfo()const
diff --git a/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp
index ed1eabc0..e875a923 100644
--- a/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp
@@ -36,7 +36,7 @@ namespace Diligent
{
-ShaderVkImpl::ShaderVkImpl(IReferenceCounters *pRefCounters, RenderDeviceVkImpl *pRenderDeviceVk, const ShaderCreationAttribs &CreationAttribs) :
+ShaderVkImpl::ShaderVkImpl(IReferenceCounters* pRefCounters, RenderDeviceVkImpl* pRenderDeviceVk, const ShaderCreationAttribs& CreationAttribs) :
TShaderBase(pRefCounters, pRenderDeviceVk, CreationAttribs.Desc),
m_DummyShaderVar(*this),
m_StaticResLayout(*this, pRenderDeviceVk->GetLogicalDevice(), GetRawAllocator()),
diff --git a/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp
index cb00e700..d9222767 100644
--- a/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/SwapChainVkImpl.cpp
@@ -32,11 +32,11 @@
namespace Diligent
{
-SwapChainVkImpl::SwapChainVkImpl(IReferenceCounters *pRefCounters,
- const SwapChainDesc& SCDesc,
- RenderDeviceVkImpl* pRenderDeviceVk,
- DeviceContextVkImpl* pDeviceContextVk,
- void* pNativeWndHandle) :
+SwapChainVkImpl::SwapChainVkImpl(IReferenceCounters* pRefCounters,
+ const SwapChainDesc& SCDesc,
+ RenderDeviceVkImpl* pRenderDeviceVk,
+ DeviceContextVkImpl* pDeviceContextVk,
+ void* pNativeWndHandle) :
TSwapChainBase(pRefCounters, pRenderDeviceVk, pDeviceContextVk, SCDesc),
m_VulkanInstance(pRenderDeviceVk->GetVulkanInstance()),
m_pBackBufferRTV(STD_ALLOCATOR_RAW_MEM(RefCntAutoPtr<ITextureView>, GetRawAllocator(), "Allocator for vector<RefCntAutoPtr<ITextureView>>"))
@@ -421,7 +421,8 @@ void SwapChainVkImpl::Present(Uint32 SyncInterval)
// TransitionImageLayout() never triggers flush
pImmediateCtxVk->TransitionImageLayout(GetCurrentBackBufferRTV()->GetTexture(), VK_IMAGE_LAYOUT_PRESENT_SRC_KHR);
- VERIFY(pImmediateCtxVk->GetNumCommandsInCtx() != 0, "The context must not be flushed");
+ // The context can be empty if no render commands were issued by the app
+ //VERIFY(pImmediateCtxVk->GetNumCommandsInCtx() != 0, "The context must not be flushed");
pImmediateCtxVk->AddSignalSemaphore(m_DrawCompleteSemaphores[m_SemaphoreIndex]);
pImmediateCtxVk->Flush();
diff --git a/Graphics/GraphicsEngineVulkan/src/TextureViewVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/TextureViewVkImpl.cpp
index 4b2b8db1..f798e3b2 100644
--- a/Graphics/GraphicsEngineVulkan/src/TextureViewVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/TextureViewVkImpl.cpp
@@ -29,11 +29,11 @@
namespace Diligent
{
-TextureViewVkImpl::TextureViewVkImpl( IReferenceCounters *pRefCounters,
- IRenderDevice *pDevice,
- const TextureViewDesc& ViewDesc,
- ITexture *pTexture,
- VulkanUtilities::ImageViewWrapper &&ImgView,
+TextureViewVkImpl::TextureViewVkImpl( IReferenceCounters* pRefCounters,
+ IRenderDevice* pDevice,
+ const TextureViewDesc& ViewDesc,
+ ITexture* pTexture,
+ VulkanUtilities::ImageViewWrapper&& ImgView,
bool bIsDefaultView ) :
TTextureViewBase( pRefCounters, pDevice, ViewDesc, pTexture, bIsDefaultView ),
m_ImageView(std::move(ImgView))
diff --git a/Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp
index 86248839..94000d3a 100644
--- a/Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/TextureVkImpl.cpp
@@ -57,11 +57,11 @@ DXGI_FORMAT GetClearFormat(DXGI_FORMAT Fmt, Vk_RESOURCE_FLAGS Flags)
}
#endif
-TextureVkImpl :: TextureVkImpl(IReferenceCounters *pRefCounters,
- FixedBlockMemoryAllocator &TexViewObjAllocator,
- RenderDeviceVkImpl *pRenderDeviceVk,
- const TextureDesc& TexDesc,
- const TextureData &InitData /*= TextureData()*/) :
+TextureVkImpl :: TextureVkImpl(IReferenceCounters* pRefCounters,
+ FixedBlockMemoryAllocator& TexViewObjAllocator,
+ RenderDeviceVkImpl* pRenderDeviceVk,
+ const TextureDesc& TexDesc,
+ const TextureData& InitData /*= TextureData()*/) :
TTextureBase(pRefCounters, TexViewObjAllocator, pRenderDeviceVk, TexDesc)
{
if( m_Desc.Usage == USAGE_STATIC && InitData.pSubResources == nullptr )
@@ -428,11 +428,11 @@ static TextureDesc InitTexDescFromVkImage(VkImage vkImg, const TextureDesc& SrcT
}
-TextureVkImpl::TextureVkImpl(IReferenceCounters *pRefCounters,
- FixedBlockMemoryAllocator &TexViewObjAllocator,
- RenderDeviceVkImpl *pDeviceVk,
- const TextureDesc& TexDesc,
- VkImage&& VkImageHandle) :
+TextureVkImpl::TextureVkImpl(IReferenceCounters* pRefCounters,
+ FixedBlockMemoryAllocator& TexViewObjAllocator,
+ RenderDeviceVkImpl* pDeviceVk,
+ const TextureDesc& TexDesc,
+ VkImage&& VkImageHandle) :
TTextureBase(pRefCounters, TexViewObjAllocator, pDeviceVk, InitTexDescFromVkImage(VkImageHandle, TexDesc)),
m_VulkanImage(nullptr, std::move(VkImageHandle))
{
@@ -503,16 +503,16 @@ void TextureVkImpl::UpdateData( IDeviceContext *pContext, Uint32 MipLevel, Uint3
#endif
}
-void TextureVkImpl :: CopyData(IDeviceContext *pContext,
- ITexture *pSrcTexture,
- Uint32 SrcMipLevel,
- Uint32 SrcSlice,
- const Box *pSrcBox,
- Uint32 DstMipLevel,
- Uint32 DstSlice,
- Uint32 DstX,
- Uint32 DstY,
- Uint32 DstZ)
+void TextureVkImpl :: CopyData(IDeviceContext* pContext,
+ ITexture* pSrcTexture,
+ Uint32 SrcMipLevel,
+ Uint32 SrcSlice,
+ const Box* pSrcBox,
+ Uint32 DstMipLevel,
+ Uint32 DstSlice,
+ Uint32 DstX,
+ Uint32 DstY,
+ Uint32 DstZ)
{
TTextureBase::CopyData( pContext, pSrcTexture, SrcMipLevel, SrcSlice, pSrcBox,
DstMipLevel, DstSlice, DstX, DstY, DstZ );
diff --git a/Graphics/GraphicsEngineVulkan/src/VulkanDynamicHeap.cpp b/Graphics/GraphicsEngineVulkan/src/VulkanDynamicHeap.cpp
index 60f5368c..2799ec52 100644
--- a/Graphics/GraphicsEngineVulkan/src/VulkanDynamicHeap.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/VulkanDynamicHeap.cpp
@@ -37,9 +37,9 @@ static VkDeviceSize GetDefaultAlignment(const VulkanUtilities::VulkanPhysicalDev
return std::max(std::max(Limits.minUniformBufferOffsetAlignment, Limits.minTexelBufferOffsetAlignment), Limits.minStorageBufferOffsetAlignment);
}
-VulkanRingBuffer::VulkanRingBuffer(IMemoryAllocator& Allocator,
- RenderDeviceVkImpl& DeviceVk,
- Uint32 Size) :
+VulkanRingBuffer::VulkanRingBuffer(IMemoryAllocator& Allocator,
+ RenderDeviceVkImpl& DeviceVk,
+ Uint32 Size) :
m_RingBuffer(Size, Allocator),
m_DeviceVk(DeviceVk),
m_DefaultAlignment(GetDefaultAlignment(DeviceVk.GetPhysicalDevice()))
diff --git a/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanCommandBufferPool.cpp b/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanCommandBufferPool.cpp
index bf120f88..16180a54 100644
--- a/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanCommandBufferPool.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanCommandBufferPool.cpp
@@ -31,9 +31,9 @@
namespace VulkanUtilities
{
VulkanCommandBufferPool::VulkanCommandBufferPool(std::shared_ptr<const VulkanUtilities::VulkanLogicalDevice> LogicalDevice,
- uint32_t queueFamilyIndex,
- VkCommandPoolCreateFlags flags,
- bool IsThreadSafe) :
+ uint32_t queueFamilyIndex,
+ VkCommandPoolCreateFlags flags,
+ bool IsThreadSafe) :
m_LogicalDevice(LogicalDevice),
m_IsThreadSafe(IsThreadSafe)
{
diff --git a/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanDescriptorPool.cpp b/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanDescriptorPool.cpp
index c31bd96d..b8c2dc1d 100644
--- a/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanDescriptorPool.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanDescriptorPool.cpp
@@ -31,7 +31,7 @@
namespace VulkanUtilities
{
VulkanDescriptorPool::VulkanDescriptorPool(std::shared_ptr<const VulkanUtilities::VulkanLogicalDevice> LogicalDevice,
- const VkDescriptorPoolCreateInfo &DescriptorPoolCI)noexcept :
+ const VkDescriptorPoolCreateInfo& DescriptorPoolCI)noexcept :
m_LogicalDevice(LogicalDevice)
{
VERIFY_EXPR(DescriptorPoolCI.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO);
diff --git a/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanInstance.cpp b/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanInstance.cpp
index a8e34a82..6a3642f1 100644
--- a/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanInstance.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanInstance.cpp
@@ -30,7 +30,7 @@
namespace VulkanUtilities
{
- bool VulkanInstance::IsLayerAvailable(const char *LayerName)const
+ bool VulkanInstance::IsLayerAvailable(const char* LayerName)const
{
for(const auto& Layer : m_Layers)
if(strcmp(Layer.layerName, LayerName) == 0)
@@ -39,7 +39,7 @@ namespace VulkanUtilities
return false;
}
- bool VulkanInstance::IsExtensionAvailable(const char *ExtensionName)const
+ bool VulkanInstance::IsExtensionAvailable(const char* ExtensionName)const
{
for (const auto& Extension : m_Extensions)
if (strcmp(Extension.extensionName, ExtensionName) == 0)
@@ -48,18 +48,18 @@ namespace VulkanUtilities
return false;
}
- std::shared_ptr<VulkanInstance> VulkanInstance::Create(bool EnableValidation,
- uint32_t GlobalExtensionCount,
- const char* const* ppGlobalExtensionNames,
+ std::shared_ptr<VulkanInstance> VulkanInstance::Create(bool EnableValidation,
+ uint32_t GlobalExtensionCount,
+ const char* const* ppGlobalExtensionNames,
VkAllocationCallbacks* pVkAllocator)
{
auto Instance = new VulkanInstance(EnableValidation, GlobalExtensionCount, ppGlobalExtensionNames, pVkAllocator);
return std::shared_ptr<VulkanInstance>(Instance);
}
- VulkanInstance::VulkanInstance(bool EnableValidation,
- uint32_t GlobalExtensionCount,
- const char* const* ppGlobalExtensionNames,
+ VulkanInstance::VulkanInstance(bool EnableValidation,
+ uint32_t GlobalExtensionCount,
+ const char* const* ppGlobalExtensionNames,
VkAllocationCallbacks* pVkAllocator) :
m_pVkAllocator(pVkAllocator)
{
diff --git a/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanLogicalDevice.cpp b/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanLogicalDevice.cpp
index 46365c51..71329665 100644
--- a/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanLogicalDevice.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanLogicalDevice.cpp
@@ -28,10 +28,10 @@
namespace VulkanUtilities
{
- std::shared_ptr<VulkanLogicalDevice> VulkanLogicalDevice::Create(VkPhysicalDevice vkPhysicalDevice,
- const VkDeviceCreateInfo &DeviceCI,
+ std::shared_ptr<VulkanLogicalDevice> VulkanLogicalDevice::Create(VkPhysicalDevice vkPhysicalDevice,
+ const VkDeviceCreateInfo& DeviceCI,
const VkAllocationCallbacks* vkAllocator,
- bool EnableDebugMarkers)
+ bool EnableDebugMarkers)
{
auto *LogicalDevice = new VulkanLogicalDevice(vkPhysicalDevice, DeviceCI, vkAllocator, EnableDebugMarkers);
return std::shared_ptr<VulkanLogicalDevice>(LogicalDevice);
@@ -42,10 +42,10 @@ namespace VulkanUtilities
vkDestroyDevice(m_VkDevice, m_VkAllocator);
}
- VulkanLogicalDevice::VulkanLogicalDevice(VkPhysicalDevice vkPhysicalDevice,
- const VkDeviceCreateInfo &DeviceCI,
+ VulkanLogicalDevice::VulkanLogicalDevice(VkPhysicalDevice vkPhysicalDevice,
+ const VkDeviceCreateInfo& DeviceCI,
const VkAllocationCallbacks* vkAllocator,
- bool EnableDebugMarkers) :
+ bool EnableDebugMarkers) :
m_VkAllocator(vkAllocator)
{
auto res = vkCreateDevice(vkPhysicalDevice, &DeviceCI, vkAllocator, &m_VkDevice);
@@ -75,10 +75,10 @@ namespace VulkanUtilities
}
template<typename VkObjectType, typename VkCreateObjectFuncType, typename VkObjectCreateInfoType>
- VulkanObjectWrapper<VkObjectType> VulkanLogicalDevice::CreateVulkanObject(VkCreateObjectFuncType VkCreateObject,
+ VulkanObjectWrapper<VkObjectType> VulkanLogicalDevice::CreateVulkanObject(VkCreateObjectFuncType VkCreateObject,
const VkObjectCreateInfoType& CreateInfo,
- const char *DebugName,
- const char *ObjectType)const
+ const char* DebugName,
+ const char* ObjectType)const
{
if (DebugName == nullptr)
DebugName = "";
@@ -94,60 +94,60 @@ namespace VulkanUtilities
}
CommandPoolWrapper VulkanLogicalDevice::CreateCommandPool(const VkCommandPoolCreateInfo &CmdPoolCI,
- const char *DebugName) const
+ const char* DebugName) const
{
VERIFY_EXPR(CmdPoolCI.sType == VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO);
return CreateVulkanObject<VkCommandPool>(vkCreateCommandPool, CmdPoolCI, DebugName, "command pool");
}
BufferWrapper VulkanLogicalDevice::CreateBuffer(const VkBufferCreateInfo &BufferCI,
- const char *DebugName)const
+ const char* DebugName)const
{
VERIFY_EXPR(BufferCI.sType == VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO);
return CreateVulkanObject<VkBuffer>(vkCreateBuffer, BufferCI, DebugName, "buffer");
}
BufferViewWrapper VulkanLogicalDevice::CreateBufferView(const VkBufferViewCreateInfo &BuffViewCI,
- const char *DebugName)const
+ const char* DebugName)const
{
VERIFY_EXPR(BuffViewCI.sType == VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO);
return CreateVulkanObject<VkBufferView>(vkCreateBufferView, BuffViewCI, DebugName, "buffer view");
}
ImageWrapper VulkanLogicalDevice::CreateImage(const VkImageCreateInfo &ImageCI,
- const char *DebugName)const
+ const char* DebugName)const
{
VERIFY_EXPR(ImageCI.sType == VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO);
return CreateVulkanObject<VkImage>(vkCreateImage, ImageCI, DebugName, "image");
}
ImageViewWrapper VulkanLogicalDevice::CreateImageView(const VkImageViewCreateInfo &ImageViewCI,
- const char *DebugName)const
+ const char* DebugName)const
{
VERIFY_EXPR(ImageViewCI.sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO);
return CreateVulkanObject<VkImageView>(vkCreateImageView, ImageViewCI, DebugName, "image view");
}
- SamplerWrapper VulkanLogicalDevice::CreateSampler(const VkSamplerCreateInfo &SamplerCI, const char *DebugName)const
+ SamplerWrapper VulkanLogicalDevice::CreateSampler(const VkSamplerCreateInfo &SamplerCI, const char* DebugName)const
{
VERIFY_EXPR(SamplerCI.sType == VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO);
return CreateVulkanObject<VkSampler>(vkCreateSampler, SamplerCI, DebugName, "sampler");
}
- FenceWrapper VulkanLogicalDevice::CreateFence(const VkFenceCreateInfo &FenceCI, const char *DebugName)const
+ FenceWrapper VulkanLogicalDevice::CreateFence(const VkFenceCreateInfo &FenceCI, const char* DebugName)const
{
VERIFY_EXPR(FenceCI.sType == VK_STRUCTURE_TYPE_FENCE_CREATE_INFO);
return CreateVulkanObject<VkFence>(vkCreateFence, FenceCI, DebugName, "fence");
}
- RenderPassWrapper VulkanLogicalDevice::CreateRenderPass(const VkRenderPassCreateInfo &RenderPassCI, const char *DebugName)const
+ RenderPassWrapper VulkanLogicalDevice::CreateRenderPass(const VkRenderPassCreateInfo &RenderPassCI, const char* DebugName)const
{
VERIFY_EXPR(RenderPassCI.sType == VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO);
return CreateVulkanObject<VkRenderPass>(vkCreateRenderPass, RenderPassCI, DebugName, "render pass");
}
- DeviceMemoryWrapper VulkanLogicalDevice::AllocateDeviceMemory(const VkMemoryAllocateInfo &AllocInfo,
- const char *DebugName)const
+ DeviceMemoryWrapper VulkanLogicalDevice::AllocateDeviceMemory(const VkMemoryAllocateInfo& AllocInfo,
+ const char* DebugName)const
{
VERIFY_EXPR(AllocInfo.sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO);
@@ -167,7 +167,7 @@ namespace VulkanUtilities
PipelineWrapper VulkanLogicalDevice::CreateComputePipeline(const VkComputePipelineCreateInfo &PipelineCI,
VkPipelineCache cache,
- const char *DebugName)const
+ const char* DebugName)const
{
VERIFY_EXPR(PipelineCI.sType == VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO);
@@ -184,9 +184,9 @@ namespace VulkanUtilities
return PipelineWrapper{ GetSharedPtr(), std::move(vkPipeline) };
}
- PipelineWrapper VulkanLogicalDevice::CreateGraphicsPipeline(const VkGraphicsPipelineCreateInfo &PipelineCI,
- VkPipelineCache cache,
- const char *DebugName)const
+ PipelineWrapper VulkanLogicalDevice::CreateGraphicsPipeline(const VkGraphicsPipelineCreateInfo& PipelineCI,
+ VkPipelineCache cache,
+ const char* DebugName)const
{
VERIFY_EXPR(PipelineCI.sType == VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO);
@@ -203,43 +203,43 @@ namespace VulkanUtilities
return PipelineWrapper{ GetSharedPtr(), std::move(vkPipeline) };
}
- ShaderModuleWrapper VulkanLogicalDevice::CreateShaderModule(const VkShaderModuleCreateInfo &ShaderModuleCI, const char *DebugName)const
+ ShaderModuleWrapper VulkanLogicalDevice::CreateShaderModule(const VkShaderModuleCreateInfo& ShaderModuleCI, const char* DebugName)const
{
VERIFY_EXPR(ShaderModuleCI.sType == VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO);
return CreateVulkanObject<VkShaderModule>(vkCreateShaderModule, ShaderModuleCI, DebugName, "shader module");
}
- PipelineLayoutWrapper VulkanLogicalDevice::CreatePipelineLayout(const VkPipelineLayoutCreateInfo &PipelineLayoutCI, const char *DebugName)const
+ PipelineLayoutWrapper VulkanLogicalDevice::CreatePipelineLayout(const VkPipelineLayoutCreateInfo &PipelineLayoutCI, const char* DebugName)const
{
VERIFY_EXPR(PipelineLayoutCI.sType == VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO);
return CreateVulkanObject<VkPipelineLayout>(vkCreatePipelineLayout, PipelineLayoutCI, DebugName, "pipeline layout");
}
- FramebufferWrapper VulkanLogicalDevice::CreateFramebuffer(const VkFramebufferCreateInfo &FramebufferCI, const char *DebugName)const
+ FramebufferWrapper VulkanLogicalDevice::CreateFramebuffer(const VkFramebufferCreateInfo &FramebufferCI, const char* DebugName)const
{
VERIFY_EXPR(FramebufferCI.sType == VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO);
return CreateVulkanObject<VkFramebuffer>(vkCreateFramebuffer, FramebufferCI, DebugName, "framebuffer");
}
- DescriptorPoolWrapper VulkanLogicalDevice::CreateDescriptorPool(const VkDescriptorPoolCreateInfo &DescrPoolCI, const char *DebugName)const
+ DescriptorPoolWrapper VulkanLogicalDevice::CreateDescriptorPool(const VkDescriptorPoolCreateInfo &DescrPoolCI, const char* DebugName)const
{
VERIFY_EXPR(DescrPoolCI.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO);
return CreateVulkanObject<VkDescriptorPool>(vkCreateDescriptorPool, DescrPoolCI, DebugName, "descriptor pool");
}
- DescriptorSetLayoutWrapper VulkanLogicalDevice::CreateDescriptorSetLayout(const VkDescriptorSetLayoutCreateInfo &LayoutCI, const char *DebugName)const
+ DescriptorSetLayoutWrapper VulkanLogicalDevice::CreateDescriptorSetLayout(const VkDescriptorSetLayoutCreateInfo &LayoutCI, const char* DebugName)const
{
VERIFY_EXPR(LayoutCI.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO);
return CreateVulkanObject<VkDescriptorSetLayout>(vkCreateDescriptorSetLayout, LayoutCI, DebugName, "descriptor set layout");
}
- SemaphoreWrapper VulkanLogicalDevice::CreateSemaphore(const VkSemaphoreCreateInfo &SemaphoreCI, const char *DebugName)const
+ SemaphoreWrapper VulkanLogicalDevice::CreateSemaphore(const VkSemaphoreCreateInfo &SemaphoreCI, const char* DebugName)const
{
VERIFY_EXPR(SemaphoreCI.sType == VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO);
return CreateVulkanObject<VkSemaphore>(vkCreateSemaphore, SemaphoreCI, DebugName, "semaphore");
}
- VkCommandBuffer VulkanLogicalDevice::AllocateVkCommandBuffer(const VkCommandBufferAllocateInfo &AllocInfo, const char *DebugName)const
+ VkCommandBuffer VulkanLogicalDevice::AllocateVkCommandBuffer(const VkCommandBufferAllocateInfo& AllocInfo, const char* DebugName)const
{
VERIFY_EXPR(AllocInfo.sType == VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO);
@@ -256,7 +256,7 @@ namespace VulkanUtilities
return CmdBuff;
}
- VkDescriptorSet VulkanLogicalDevice::AllocateVkDescriptorSet(const VkDescriptorSetAllocateInfo &AllocInfo, const char *DebugName)const
+ VkDescriptorSet VulkanLogicalDevice::AllocateVkDescriptorSet(const VkDescriptorSetAllocateInfo& AllocInfo, const char* DebugName)const
{
VERIFY_EXPR(AllocInfo.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO);
VERIFY_EXPR(AllocInfo.descriptorSetCount == 1);