Vulkan: Discard negative width/height framebuffer blits. Will likely help #12531.

This commit is contained in:
Henrik Rydgård 2020-04-26 12:44:11 +02:00
parent 4d420c5121
commit 5508bfb596

View File

@ -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;