Skip to content
Permalink
Browse files

Framebuffer blit: Clip src rectangle as well

  • Loading branch information...
hrydgard committed Nov 4, 2018
1 parent 7561af3 commit 67d6e3d384784ac052a9fdf63c5da3a9be14abca
Showing with 7 additions and 0 deletions.
  1. +7 −0 GPU/Vulkan/FramebufferVulkan.cpp
@@ -468,6 +468,13 @@ void FramebufferManagerVulkan::BlitFramebuffer(VirtualFramebuffer *dst, int dstX
if (dstY + h > dst->bufferHeight) {
h -= dstY + h - dst->bufferHeight;
}
if (srcX + w > src->bufferWidth) {
w -= srcX + w - src->bufferWidth;
}
if (srcY + h > src->bufferHeight) {
h -= srcY + h - src->bufferHeight;
}

if (w == 0 || h == 0)
return;

0 comments on commit 67d6e3d

Please sign in to comment.
You can’t perform that action at this time.