diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-10-24 16:29:51 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-10-24 16:29:51 +0000 |
| commit | de8120ed75510f7e5a98243156eced9ba96f84ca (patch) | |
| tree | 79e07829a5811dc34c09592df9a6da5208794944 /Graphics/GraphicsEngineVulkan | |
| parent | Another attempt to fix gcc/clang build (diff) | |
| download | DiligentCore-de8120ed75510f7e5a98243156eced9ba96f84ca.tar.gz DiligentCore-de8120ed75510f7e5a98243156eced9ba96f84ca.zip | |
Vk backend: few minor updates
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
| -rw-r--r-- | Graphics/GraphicsEngineVulkan/include/PipelineLayout.h | 3 | ||||
| -rw-r--r-- | Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp | 11 | ||||
| -rw-r--r-- | Graphics/GraphicsEngineVulkan/src/PipelineLayout.cpp | 2 |
3 files changed, 11 insertions, 5 deletions
diff --git a/Graphics/GraphicsEngineVulkan/include/PipelineLayout.h b/Graphics/GraphicsEngineVulkan/include/PipelineLayout.h index 5198e293..1b059ce9 100644 --- a/Graphics/GraphicsEngineVulkan/include/PipelineLayout.h +++ b/Graphics/GraphicsEngineVulkan/include/PipelineLayout.h @@ -94,7 +94,7 @@ public: VkPipelineBindPoint BindPoint = VK_PIPELINE_BIND_POINT_MAX_ENUM; Uint32 SetCout = 0; Uint32 DynamicOffsetCount = 0; - bool DynamicBuffersBound = false; + bool DynamicBuffersPresent = false; bool DynamicDescriptorsBound = false; #ifdef _DEBUG const PipelineLayout* pDbgPipelineLayout = nullptr; @@ -111,6 +111,7 @@ public: BindPoint = VK_PIPELINE_BIND_POINT_MAX_ENUM; SetCout = 0; DynamicOffsetCount = 0; + DynamicBuffersPresent = false; DynamicDescriptorsBound = false; #ifdef _DEBUG diff --git a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp index ebbb3dd4..6b3a5a82 100644 --- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp @@ -426,7 +426,7 @@ namespace Diligent // If there are no dynamic buffers bound in the resource cache, for all subsequent // cals we do not need to bind the sets again. if (!m_DescrSetBindInfo.DynamicDescriptorsBound || - (m_DescrSetBindInfo.DynamicBuffersBound && (Flags & DRAW_FLAG_DYNAMIC_RESOURCE_BUFFERS_INTACT) == 0)) + (m_DescrSetBindInfo.DynamicBuffersPresent && (Flags & DRAW_FLAG_DYNAMIC_RESOURCE_BUFFERS_INTACT) == 0)) { m_pPipelineState->BindDescriptorSetsWithDynamicOffsets(GetCommandBuffer(), m_ContextId, this, m_DescrSetBindInfo); } @@ -544,7 +544,12 @@ namespace Diligent m_CommandBuffer.EndRenderPass(); if (m_DescrSetBindInfo.DynamicOffsetCount != 0) - m_pPipelineState->BindDescriptorSetsWithDynamicOffsets(GetCommandBuffer(), m_ContextId, this, m_DescrSetBindInfo); + { + if (!m_DescrSetBindInfo.DynamicDescriptorsBound || m_DescrSetBindInfo.DynamicBuffersPresent) + { + m_pPipelineState->BindDescriptorSetsWithDynamicOffsets(GetCommandBuffer(), m_ContextId, this, m_DescrSetBindInfo); + } + } #if 0 #ifdef _DEBUG else @@ -1198,7 +1203,7 @@ namespace Diligent VkBufferCopy CopyRegion; CopyRegion.srcOffset = SrcOffset; CopyRegion.dstOffset = DstOffset; - CopyRegion.size = NumBytes; + CopyRegion.size = NumBytes; VERIFY(pBuffVk->m_VulkanBuffer != VK_NULL_HANDLE, "Copy destination buffer must not be suballocated"); m_CommandBuffer.CopyBuffer(vkSrcBuffer, pBuffVk->GetVkBuffer(), 1, &CopyRegion); ++m_State.NumCommands; diff --git a/Graphics/GraphicsEngineVulkan/src/PipelineLayout.cpp b/Graphics/GraphicsEngineVulkan/src/PipelineLayout.cpp index d91a860b..5179f38f 100644 --- a/Graphics/GraphicsEngineVulkan/src/PipelineLayout.cpp +++ b/Graphics/GraphicsEngineVulkan/src/PipelineLayout.cpp @@ -486,7 +486,7 @@ void PipelineLayout::PrepareDescriptorSets(DeviceContextVkImpl* pCtxVkI #ifdef _DEBUG BindInfo.pDbgPipelineLayout = this; #endif - BindInfo.DynamicBuffersBound = ResourceCache.GetNumDynamicBuffers() > 0; + BindInfo.DynamicBuffersPresent = ResourceCache.GetNumDynamicBuffers() > 0; if (TotalDynamicDescriptors == 0) { |
