mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-28 00:33:34 +01:00
Pass new vulkan validation layers. Fix math in FindTransferFramebuffers.
This commit is contained in:
1 parent
778beb6cd9
commit
0ee058320a
2 files changed
+11
-3
No files matched your search
@@ -1355,7 +1355,7 @@ void FramebufferManagerCommon::FindTransferFramebuffers(VirtualFramebuffer *&dst
|
||||
|
||||
// Some games use mismatching bitdepths. But make sure the stride matches.
|
||||
// If it doesn't, generally this means we detected the framebuffer with too large a height.
|
||||
bool match = yOffset < dstYOffset && yOffset < vfb->height;
|
||||
bool match = yOffset < dstYOffset && (int)yOffset <= (int)vfb->height - dstHeight;
|
||||
if (match && vfb_byteStride != byteStride) {
|
||||
// Grand Knights History copies with a mismatching stride but a full line at a time.
|
||||
// Makes it hard to detect the wrong transfers in e.g. God of War.
|
||||
@@ -1385,7 +1385,7 @@ void FramebufferManagerCommon::FindTransferFramebuffers(VirtualFramebuffer *&dst
|
||||
const u32 byteOffset = srcBasePtr - vfb_address;
|
||||
const u32 byteStride = srcStride * bpp;
|
||||
const u32 yOffset = byteOffset / byteStride;
|
||||
bool match = yOffset < srcYOffset && yOffset < vfb->height;
|
||||
bool match = yOffset < srcYOffset && (int)yOffset <= (int)vfb->height - srcHeight;
|
||||
if (match && vfb_byteStride != byteStride) {
|
||||
if (width != srcStride || (byteStride * height != vfb_byteStride && byteStride * height != vfb_byteWidth)) {
|
||||
match = false;
|
||||
|
||||
Reference in new issue
Block a user