Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Yoshi Sugawara 2015-12-29 11:04:41 -05:00
commit e63d01e287
2 changed files with 17 additions and 14 deletions

View File

@ -404,20 +404,19 @@ void JitBlockCache::LinkBlockExits(int i) {
int destinationBlock = GetBlockNumberFromStartAddress(b.exitAddress[e]);
if (destinationBlock != -1) {
#if defined(ARM)
//break Yu-Gi-Oh 6 crash with edit card in Android version
//const u8 *nextExit = b.exitPtrs[e + 1];
//if (!nextExit) {
// nextExit = b.normalEntry + b.codeSize;
//}
const u8 *nextExit = b.exitPtrs[e + 1];
if (!nextExit) {
nextExit = b.normalEntry + b.codeSize;
}
ARMXEmitter emit(b.exitPtrs[e]);
emit.B(blocks_[destinationBlock].checkedEntry);
//u32 op = *((const u32 *)emit.GetCodePtr());
//// Overwrite with nops until the next unconditional branch.
//while ((op & 0xFF000000) != 0xEA000000) {
// emit.BKPT(1);
// op = *((const u32 *)emit.GetCodePtr());
//}
//emit.BKPT(1);
u32 op = *((const u32 *)emit.GetCodePtr());
// Overwrite with nops until the next unconditional branch.
while ((op & 0xFF000000) != 0xEA000000) {
emit.BKPT(1);
op = *((const u32 *)emit.GetCodePtr());
}
emit.BKPT(1);
emit.FlushIcache();
b.linkStatus[e] = true;
#elif defined(_M_IX86) || defined(_M_X64)

View File

@ -1375,8 +1375,12 @@ void FramebufferManager::BlitFramebuffer(VirtualFramebuffer *dst, int dstX, int
int dstY2 = (dstY + h) * dstYFactor;
if (gstate_c.Supports(GPU_SUPPORTS_ANY_COPY_IMAGE)) {
// Only if it's the same size.
if (dstX2 - dstX1 == srcX2 - srcX1 && dstY2 - dstY1 == srcY2 - srcY1) {
// glBlitFramebuffer can clip, but glCopyImageSubData is more restricted.
// In case the src goes outside, we just skip the optimization in that case.
const bool sameSize = dstX2 - dstX1 == srcX2 - srcX1 && dstY2 - dstY1 == srcY2 - srcY1;
const bool srcInsideBounds = srcX2 <= src->renderWidth && srcY2 <= src->renderHeight;
const bool dstInsideBounds = dstX2 <= dst->renderWidth && dstY2 <= dst->renderHeight;
if (sameSize && srcInsideBounds && dstInsideBounds) {
#if defined(USING_GLES2)
#ifndef IOS
glCopyImageSubDataOES(