Skip to content
Permalink
Browse files

Merge pull request #12158 from unknownbrackets/clut-download

GPU: Download CLUTs when loading at 256 stride
  • Loading branch information...
hrydgard committed Jul 7, 2019
2 parents 7de4640 + dc03050 commit 7a51c1960e8ebc6896af3bdbf5d729ab2d6865e9
Showing with 5 additions and 0 deletions.
  1. +5 −0 GPU/Common/FramebufferCommon.cpp
@@ -2082,6 +2082,11 @@ void FramebufferManagerCommon::DownloadFramebufferForClut(u32 fb_address, u32 lo
int w = std::min(pixels % vfb->fb_stride, (int)vfb->width);
int h = std::min((pixels + vfb->fb_stride - 1) / vfb->fb_stride, (int)vfb->height);

if (w == 0 && h > 0) {
// Exactly aligned (means pixels == vfb->fb_stride, so modulus gave zero.)
w = std::min(vfb->fb_stride, (int)vfb->width);
}

// We might still have a pending draw to the fb in question, flush if so.
FlushBeforeCopy();

0 comments on commit 7a51c19

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