From e55f3cd48a7aa73b780537de6e484fde3892ba6b Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Mon, 18 Feb 2019 20:45:48 -0800 Subject: Minor updates in D3D12 and Vk backends: not committing vertex buffers when PSO doesn't use any --- Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp | 2 +- Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Graphics') diff --git a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp index 83f93a83..7e8eeeed 100644 --- a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp @@ -385,7 +385,7 @@ namespace Diligent #endif } - if (!m_State.bCommittedD3D12VBsUpToDate) + if (!m_State.bCommittedD3D12VBsUpToDate && m_pPipelineState->GetNumBufferSlotsUsed() > 0) { CommitD3D12VertexBuffers(GraphCtx); } diff --git a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp index c6378abe..0200476d 100644 --- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp @@ -411,7 +411,7 @@ namespace Diligent m_CommandBuffer.BindIndexBuffer(m_pIndexBuffer->GetVkBuffer(), m_IndexDataStartOffset + m_pIndexBuffer->GetDynamicOffset(m_ContextId, this), vkIndexType); } - if (!m_State.CommittedVBsUpToDate) + if (!m_State.CommittedVBsUpToDate && m_pPipelineState->GetNumBufferSlotsUsed() > 0) { CommitVkVertexBuffers(); } -- cgit v1.2.3