mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-15 02:29:51 +01:00
Fix issues with scaling ARGB1555 textures in OpenGL, introduced by the recent merge
This commit is contained in:
1 parent
48e4d1edae
commit
08eaa6e1f7
6 files changed
+58
-31
No files matched your search
@@ -2003,21 +2003,17 @@ void TextureCache::LoadTextureLevel(TexCacheEntry &entry, int level, bool replac
|
||||
|
||||
u32 *pixelData = (u32 *)finalBuf;
|
||||
if (scaleFactor > 1 && (entry.status & TexCacheEntry::STATUS_CHANGE_FREQUENT) == 0) {
|
||||
GEBufferFormat dstFormat;
|
||||
ScalerPixelFormat dstFormat;
|
||||
switch (dstFmt) {
|
||||
case GL_UNSIGNED_BYTE: dstFormat = GE_FORMAT_8888; break;
|
||||
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;
|
||||
case GL_UNSIGNED_BYTE: dstFormat = SCALER_FORMAT_8888; break;
|
||||
case GL_UNSIGNED_SHORT_4_4_4_4: dstFormat = SCALER_FORMAT_4444; break;
|
||||
case GL_UNSIGNED_SHORT_5_6_5: dstFormat = SCALER_FORMAT_565; break;
|
||||
case GL_UNSIGNED_SHORT_5_5_5_1: dstFormat = SCALER_FORMAT_1555; 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;
|
||||
}
|
||||
// The scaler currently always outputs this.
|
||||
dstFmt = GL_UNSIGNED_BYTE;
|
||||
dontScale:
|
||||
;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user