summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-08-15 22:39:38 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-08-15 22:39:38 +0000
commite9b03b3adc24d569f3ca5e16629daf2d05d5aabc (patch)
tree6f67919092b671b4a0fb637db26f75293f849886 /Graphics/GraphicsEngineVulkan
parentGL backend: a number of minor updates (diff)
downloadDiligentCore-e9b03b3adc24d569f3ca5e16629daf2d05d5aabc.tar.gz
DiligentCore-e9b03b3adc24d569f3ca5e16629daf2d05d5aabc.zip
Vk backend: not setting render pass in SetPipelineState
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
index 2310109f..619ec23c 100644
--- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
@@ -283,14 +283,6 @@ void DeviceContextVkImpl::SetPipelineState(IPipelineState* pPipelineState)
{
m_CommandBuffer.SetStencilReference(m_StencilRef);
m_CommandBuffer.SetBlendConstants(m_BlendFactors);
- if (PSODesc.GraphicsPipeline.pRenderPass == nullptr)
- {
- CommitRenderPassAndFramebuffer(true);
- }
- else
- {
- // Render pass must be committed explicitly
- }
CommitViewports();
}
@@ -434,6 +426,9 @@ void DeviceContextVkImpl::PrepareForDraw(DRAW_FLAGS Flags)
#ifdef DILIGENT_DEVELOPMENT
if ((Flags & DRAW_FLAG_VERIFY_RENDER_TARGETS) != 0)
DvpVerifyRenderTargets();
+
+ VERIFY(m_vkRenderPass != VK_NULL_HANDLE, "No render pass is active while executing draw command");
+ VERIFY(m_vkFramebuffer != VK_NULL_HANDLE, "No framebuffer is bound while executing draw command");
#endif
EnsureVkCmdBuffer();
@@ -477,15 +472,17 @@ void DeviceContextVkImpl::PrepareForDraw(DRAW_FLAGS Flags)
# endif
#endif
-#ifdef DILIGENT_DEVELOPMENT
- if (m_pPipelineState->GetRenderPass()->GetVkRenderPass() != m_vkRenderPass)
+ if (m_pPipelineState->GetDesc().GraphicsPipeline.pRenderPass == nullptr)
{
- DvpLogRenderPass_PSOMismatch();
- }
+#ifdef DILIGENT_DEVELOPMENT
+ if (m_pPipelineState->GetRenderPass()->GetVkRenderPass() != m_vkRenderPass)
+ {
+ // Note that different Vulkan render passes may still be compatible,
+ // so we should only verify implicit render passes
+ DvpLogRenderPass_PSOMismatch();
+ }
#endif
- if (m_pPipelineState->GetDesc().GraphicsPipeline.pRenderPass == nullptr)
- {
CommitRenderPassAndFramebuffer((Flags & DRAW_FLAG_VERIFY_STATES) != 0);
}
}