Skip to content

Commit

Permalink
Framebuffer blit: Clip src rectangle as well
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Nov 4, 2018
1 parent 7561af3 commit 67d6e3d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions GPU/Vulkan/FramebufferVulkan.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -468,6 +468,13 @@ void FramebufferManagerVulkan::BlitFramebuffer(VirtualFramebuffer *dst, int dstX
if (dstY + h > dst->bufferHeight) { if (dstY + h > dst->bufferHeight) {
h -= 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) if (w == 0 || h == 0)
return; return;


Expand Down

0 comments on commit 67d6e3d

Please sign in to comment.