Merge pull request #6260 from unknownbrackets/gpu-blocktransfer

Fix block transfer download with bpp mismatch
This commit is contained in:
Henrik Rydgård 2014-06-09 00:15:25 +02:00
commit 019757a2b8

View File

@ -2207,7 +2207,9 @@ bool FramebufferManager::NotifyBlockTransferBefore(u32 dstBasePtr, int dstStride
} else if (srcBuffer) {
WARN_LOG_ONCE(btd, G3D, "Block transfer download %08x -> %08x", srcBasePtr, dstBasePtr);
if (g_Config.bBlockTransferGPU && (srcBuffer == currentRenderVfb_ || !srcBuffer->memoryUpdated)) {
ReadFramebufferToMemory(srcBuffer, true, srcX, srcY, srcWidth, srcHeight);
int srcBpp = srcBuffer->format == GE_FORMAT_8888 ? 4 : 2;
float srcXFactor = (float)bpp / srcBpp;
ReadFramebufferToMemory(srcBuffer, true, srcX * srcXFactor, srcY, srcWidth * srcXFactor, srcHeight);
}
return false; // Let the bit copy happen
} else {