mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 15:30:35 +00:00
Minor optimizations, add a failsafe
This commit is contained in:
parent
f1b57dabf5
commit
48e4d1edae
@ -255,7 +255,7 @@ void ConvertRGBA5551ToRGBA8888(u32 *dst32, const u16 *src, int numPixels) {
|
||||
dst[x * 4] = Convert5To8((col)& 0x1f);
|
||||
dst[x * 4 + 1] = Convert5To8((col >> 5) & 0x1f);
|
||||
dst[x * 4 + 2] = Convert5To8((col >> 10) & 0x1f);
|
||||
dst[x * 4 + 3] = (col >> 15) ? 255 : 0;
|
||||
dst[x * 4 + 3] = (col & 0x8000) ? 255 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -468,7 +468,6 @@ const u8 *Jit::DoJit(u32 em_address, JitBlock *b)
|
||||
}
|
||||
|
||||
b->codeSize = (u32)(GetCodePtr() - b->normalEntry);
|
||||
NOP();
|
||||
AlignCode4();
|
||||
if (js.lastContinuedPC == 0)
|
||||
b->originalSize = js.numInstructions;
|
||||
|
@ -2009,14 +2009,17 @@ void TextureCache::LoadTextureLevel(TexCacheEntry &entry, int level, bool replac
|
||||
case GL_UNSIGNED_SHORT_4_4_4_4: dstFormat = GE_FORMAT_4444; break;
|
||||
case GL_UNSIGNED_SHORT_5_6_5: dstFormat = GE_FORMAT_565; break;
|
||||
case GL_UNSIGNED_SHORT_5_5_5_1: dstFormat = GE_FORMAT_5551; break;
|
||||
default: goto dontScale;
|
||||
}
|
||||
scaler.Scale(pixelData, dstFormat, w, h, scaleFactor);
|
||||
switch (dstFormat) {
|
||||
case GE_FORMAT_8888: dstFmt = GL_UNSIGNED_BYTE; break;
|
||||
case GE_FORMAT_565: dstFmt = GL_UNSIGNED_SHORT_5_6_5; break;
|
||||
case GE_FORMAT_5551: dstFmt = GL_UNSIGNED_SHORT_5_5_5_1; break;
|
||||
case GE_FORMAT_4444: dstFmt = GL_UNSIGNED_SHORT_4_4_4_4; break;
|
||||
case GE_FORMAT_8888: dstFmt = GL_UNSIGNED_BYTE; break;
|
||||
}
|
||||
dontScale:
|
||||
;
|
||||
}
|
||||
|
||||
if ((entry.status & TexCacheEntry::STATUS_CHANGE_FREQUENT) == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user