From 5508bfb596226f439218160024abb74ee4ac6520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 26 Apr 2020 12:44:11 +0200 Subject: [PATCH] Vulkan: Discard negative width/height framebuffer blits. Will likely help #12531. --- GPU/Vulkan/FramebufferVulkan.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GPU/Vulkan/FramebufferVulkan.cpp b/GPU/Vulkan/FramebufferVulkan.cpp index 532c00dfb8..9989b7056c 100644 --- a/GPU/Vulkan/FramebufferVulkan.cpp +++ b/GPU/Vulkan/FramebufferVulkan.cpp @@ -493,8 +493,10 @@ void FramebufferManagerVulkan::BlitFramebuffer(VirtualFramebuffer *dst, int dstX h -= srcY + h - src->bufferHeight; } - if (w == 0 || h == 0) + if (w <= 0 || h <= 0) { + // The whole rectangle got clipped. return; + } float srcXFactor = (float)src->renderWidth / (float)src->bufferWidth; float srcYFactor = (float)src->renderHeight / (float)src->bufferHeight;