mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Remove unused useBGRA parameter
This commit is contained in:
parent
c41b780c8c
commit
6f484d0aee
6 changed files with 13 additions and 13 deletions
|
@ -1434,7 +1434,7 @@ inline u32 TfmtRawToFullAlpha(GETextureFormat fmt) {
|
|||
}
|
||||
}
|
||||
|
||||
CheckAlphaResult TextureCacheCommon::DecodeTextureLevel(u8 *out, int outPitch, GETextureFormat format, GEPaletteFormat clutformat, uint32_t texaddr, int level, int bufw, bool reverseColors, bool useBGRA, bool expandTo32bit) {
|
||||
CheckAlphaResult TextureCacheCommon::DecodeTextureLevel(u8 *out, int outPitch, GETextureFormat format, GEPaletteFormat clutformat, uint32_t texaddr, int level, int bufw, bool reverseColors, bool expandTo32bit) {
|
||||
u32 alphaSum = 0xFFFFFFFF;
|
||||
u32 fullAlphaMask = 0x0;
|
||||
|
||||
|
@ -1549,7 +1549,7 @@ CheckAlphaResult TextureCacheCommon::DecodeTextureLevel(u8 *out, int outPitch, G
|
|||
// Just check the input's alpha to reuse code. TODO: make a specialized ReverseColors that checks as we go.
|
||||
for (int y = 0; y < h; ++y) {
|
||||
CheckMask16((const u16 *)(texptr + bufw * sizeof(u16) * y), w, &alphaSum);
|
||||
ReverseColors(out + outPitch * y, texptr + bufw * sizeof(u16) * y, format, w, useBGRA);
|
||||
ReverseColors(out + outPitch * y, texptr + bufw * sizeof(u16) * y, format, w, false);
|
||||
}
|
||||
} else if (expandTo32bit) {
|
||||
for (int y = 0; y < h; ++y) {
|
||||
|
@ -1579,7 +1579,7 @@ CheckAlphaResult TextureCacheCommon::DecodeTextureLevel(u8 *out, int outPitch, G
|
|||
// Just check the swizzled input's alpha to reuse code. TODO: make a specialized ReverseColors that checks as we go.
|
||||
for (int y = 0; y < h; ++y) {
|
||||
CheckMask16((const u16 *)(unswizzled + bufw * sizeof(u16) * y), w, &alphaSum);
|
||||
ReverseColors(out + outPitch * y, unswizzled + bufw * sizeof(u16) * y, format, w, useBGRA);
|
||||
ReverseColors(out + outPitch * y, unswizzled + bufw * sizeof(u16) * y, format, w, false);
|
||||
}
|
||||
} else if (expandTo32bit) {
|
||||
// Just check the swizzled input's alpha to reuse code. TODO: make a specialized ConvertFormatToRGBA8888 that checks as we go.
|
||||
|
@ -1604,7 +1604,7 @@ CheckAlphaResult TextureCacheCommon::DecodeTextureLevel(u8 *out, int outPitch, G
|
|||
if (reverseColors) {
|
||||
for (int y = 0; y < h; ++y) {
|
||||
CheckMask32((const u32 *)(texptr + bufw * sizeof(u32) * y), w, &alphaSum);
|
||||
ReverseColors(out + outPitch * y, texptr + bufw * sizeof(u32) * y, format, w, useBGRA);
|
||||
ReverseColors(out + outPitch * y, texptr + bufw * sizeof(u32) * y, format, w, false);
|
||||
}
|
||||
} else {
|
||||
for (int y = 0; y < h; ++y) {
|
||||
|
@ -1626,7 +1626,7 @@ CheckAlphaResult TextureCacheCommon::DecodeTextureLevel(u8 *out, int outPitch, G
|
|||
if (reverseColors) {
|
||||
for (int y = 0; y < h; ++y) {
|
||||
CheckMask32((const u32 *)(unswizzled + bufw * sizeof(u32) * y), w, &alphaSum);
|
||||
ReverseColors(out + outPitch * y, unswizzled + bufw * sizeof(u32) * y, format, w, useBGRA);
|
||||
ReverseColors(out + outPitch * y, unswizzled + bufw * sizeof(u32) * y, format, w, false);
|
||||
}
|
||||
} else {
|
||||
for (int y = 0; y < h; ++y) {
|
||||
|
@ -1637,13 +1637,13 @@ CheckAlphaResult TextureCacheCommon::DecodeTextureLevel(u8 *out, int outPitch, G
|
|||
break;
|
||||
|
||||
case GE_TFMT_DXT1:
|
||||
return DecodeDXTBlocks<DXT1Block, 1>(out, outPitch, texaddr, texptr, w, h, bufw, reverseColors, useBGRA);
|
||||
return DecodeDXTBlocks<DXT1Block, 1>(out, outPitch, texaddr, texptr, w, h, bufw, reverseColors, false);
|
||||
|
||||
case GE_TFMT_DXT3:
|
||||
return DecodeDXTBlocks<DXT3Block, 3>(out, outPitch, texaddr, texptr, w, h, bufw, reverseColors, useBGRA);
|
||||
return DecodeDXTBlocks<DXT3Block, 3>(out, outPitch, texaddr, texptr, w, h, bufw, reverseColors, false);
|
||||
|
||||
case GE_TFMT_DXT5:
|
||||
return DecodeDXTBlocks<DXT5Block, 5>(out, outPitch, texaddr, texptr, w, h, bufw, reverseColors, useBGRA);
|
||||
return DecodeDXTBlocks<DXT5Block, 5>(out, outPitch, texaddr, texptr, w, h, bufw, reverseColors, false);
|
||||
|
||||
default:
|
||||
ERROR_LOG_REPORT(G3D, "Unknown Texture Format %d!!!", format);
|
||||
|
|
|
@ -283,7 +283,7 @@ protected:
|
|||
virtual void UpdateCurrentClut(GEPaletteFormat clutFormat, u32 clutBase, bool clutIndexIsSimple) = 0;
|
||||
bool CheckFullHash(TexCacheEntry *entry, bool &doDelete);
|
||||
|
||||
CheckAlphaResult DecodeTextureLevel(u8 *out, int outPitch, GETextureFormat format, GEPaletteFormat clutformat, uint32_t texaddr, int level, int bufw, bool reverseColors, bool useBGRA, bool expandTo32Bit);
|
||||
CheckAlphaResult DecodeTextureLevel(u8 *out, int outPitch, GETextureFormat format, GEPaletteFormat clutformat, uint32_t texaddr, int level, int bufw, bool reverseColors, bool expandTo32Bit);
|
||||
void UnswizzleFromMem(u32 *dest, u32 destPitch, const u8 *texptr, u32 bufw, u32 height, u32 bytesPerPixel);
|
||||
CheckAlphaResult ReadIndexedTex(u8 *out, int outPitch, int level, const u8 *texptr, int bytesPerIndex, int bufw, bool reverseColors, bool expandTo32Bit);
|
||||
ReplacedTexture &FindReplacement(TexCacheEntry *entry, int &w, int &h);
|
||||
|
|
|
@ -696,7 +696,7 @@ void TextureCacheD3D11::LoadTextureLevel(TexCacheEntry &entry, ReplacedTexture &
|
|||
|
||||
bool expand32 = !gstate_c.Supports(GPU_SUPPORTS_16BIT_FORMATS);
|
||||
|
||||
CheckAlphaResult alphaResult = DecodeTextureLevel((u8 *)pixelData, decPitch, tfmt, clutformat, texaddr, level, bufw, false, false, expand32);
|
||||
CheckAlphaResult alphaResult = DecodeTextureLevel((u8 *)pixelData, decPitch, tfmt, clutformat, texaddr, level, bufw, false, expand32);
|
||||
entry.SetAlphaStatus(alphaResult, level);
|
||||
|
||||
if (scaleFactor > 1) {
|
||||
|
|
|
@ -621,7 +621,7 @@ void TextureCacheDX9::LoadTextureLevel(TexCacheEntry &entry, ReplacedTexture &re
|
|||
decPitch = w * bpp;
|
||||
}
|
||||
|
||||
CheckAlphaResult alphaResult = DecodeTextureLevel((u8 *)pixelData, decPitch, tfmt, clutformat, texaddr, level, bufw, false, false, false);
|
||||
CheckAlphaResult alphaResult = DecodeTextureLevel((u8 *)pixelData, decPitch, tfmt, clutformat, texaddr, level, bufw, false, false);
|
||||
entry.SetAlphaStatus(alphaResult, level);
|
||||
|
||||
if (scaleFactor > 1) {
|
||||
|
|
|
@ -649,7 +649,7 @@ void TextureCacheGLES::LoadTextureLevel(TexCacheEntry &entry, ReplacedTexture &r
|
|||
|
||||
pixelData = (uint8_t *)AllocateAlignedMemory(decPitch * h * pixelSize, 16);
|
||||
|
||||
CheckAlphaResult alphaStatus = DecodeTextureLevel(pixelData, decPitch, GETextureFormat(entry.format), clutformat, texaddr, level, bufw, true, false, false);
|
||||
CheckAlphaResult alphaStatus = DecodeTextureLevel(pixelData, decPitch, GETextureFormat(entry.format), clutformat, texaddr, level, bufw, true, false);
|
||||
entry.SetAlphaStatus(alphaStatus, level);
|
||||
|
||||
if (scaleFactor > 1) {
|
||||
|
|
|
@ -999,7 +999,7 @@ void TextureCacheVulkan::LoadTextureLevel(TexCacheEntry &entry, uint8_t *writePt
|
|||
|
||||
bool expand32 = !gstate_c.Supports(GPU_SUPPORTS_16BIT_FORMATS) || dstFmt == VK_FORMAT_R8G8B8A8_UNORM;
|
||||
|
||||
CheckAlphaResult alphaResult = DecodeTextureLevel((u8 *)pixelData, decPitch, tfmt, clutformat, texaddr, level, bufw, false, false, expand32);
|
||||
CheckAlphaResult alphaResult = DecodeTextureLevel((u8 *)pixelData, decPitch, tfmt, clutformat, texaddr, level, bufw, false, expand32);
|
||||
|
||||
// WARN_LOG(G3D, "Alpha: full=%d w=%d h=%d level=%d %s/%s", (int)(alphaResult == CHECKALPHA_FULL), w, h, level, GeTextureFormatToString(tfmt), GEPaletteFormatToString(clutformat));
|
||||
entry.SetAlphaStatus(alphaResult, level);
|
||||
|
|
Loading…
Add table
Reference in a new issue