mirror of
https://github.com/libretro/ppsspp.git
synced 2025-01-27 03:35:14 +00:00
D3D11: Correct non-palette 16 bit textures on Win7.
These weren't being expanded.
This commit is contained in:
parent
41dacb792c
commit
18484bed3d
@ -1139,9 +1139,17 @@ void TextureCacheCommon::DecodeTextureLevel(u8 *out, int outPitch, GETextureForm
|
||||
}
|
||||
}
|
||||
} else if (h >= 8) {
|
||||
UnswizzleFromMem((u32 *)out, outPitch, texptr, bufw, h, 2);
|
||||
if (reverseColors) {
|
||||
ReverseColors(out, out, format, h * outPitch / 2, useBGRA);
|
||||
// Note: this is always safe since h must be a power of 2, so a multiple of 8.
|
||||
if (!expandTo32bit) {
|
||||
UnswizzleFromMem((u32 *)out, outPitch, texptr, bufw, h, 2);
|
||||
if (reverseColors) {
|
||||
ReverseColors(out, out, format, h * outPitch / 2, useBGRA);
|
||||
}
|
||||
} else if (expandTo32bit) {
|
||||
UnswizzleFromMem((u32 *)out, outPitch / 2, texptr, bufw, h, 2);
|
||||
for (int y = h - 1; y >= 0; --y) {
|
||||
ConvertFormatToRGBA8888(format, (u32 *)(out + outPitch * y), (const u16 *)(out + outPitch / 2 * y), w);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// We don't have enough space for all rows in out, so use a temp buffer.
|
||||
|
Loading…
x
Reference in New Issue
Block a user