From 0d20de05385f89a607ee479d5a63511c9e35beaa Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sun, 29 Sep 2019 12:52:55 -0700 Subject: Vulkan backend: fixed minor issue in CommitScissorRects() --- Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Graphics/GraphicsEngineVulkan') diff --git a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp index dd186277..7103818f 100644 --- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp @@ -974,6 +974,9 @@ namespace Diligent { VERIFY(m_pPipelineState && m_pPipelineState->GetDesc().GraphicsPipeline.RasterizerDesc.ScissorEnable, "Scissor test must be enabled in the graphics pipeline"); + if (m_NumScissorRects == 0) + return; // Scissors have not been set in the context yet + VkRect2D VkScissorRects[MaxViewports]; // Do not waste time initializing array with zeroes for (Uint32 sr = 0; sr < m_NumScissorRects; ++sr) { -- cgit v1.2.3