Skip to content

Commit 63ae33f

Browse files
Vulkan: commit viewports only when graphics pipeline is bound
1 parent 7979193 commit 63ae33f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1720,7 +1720,12 @@ void DeviceContextVkImpl::SetViewports(Uint32 NumViewports, const Viewport* pVie
17201720
m_FramebufferSamples = 1;
17211721
}
17221722

1723-
CommitViewports();
1723+
// If no graphics PSO is currently bound, viewports will be committed by
1724+
// the SetPipelineState() when a graphics PSO is set.
1725+
if (m_pPipelineState && m_pPipelineState->GetDesc().IsAnyGraphicsPipeline())
1726+
{
1727+
CommitViewports();
1728+
}
17241729
}
17251730

17261731
void DeviceContextVkImpl::CommitScissorRects()

0 commit comments

Comments
 (0)