mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Merge pull request #14842 from unknownbrackets/texfilt
Vulkan: Expand 16-bit textures to generate mips
This commit is contained in:
1 file changed
+6
-3
@@ -754,10 +754,13 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry) {
|
||||
VkFormat dstFmt = GetDestFormat(GETextureFormat(entry->format), gstate.getClutPaletteFormat());
|
||||
|
||||
// TODO: Really should inspect the format capabilities.
|
||||
if (g_Config.iTexFiltering == TEX_FILTER_AUTO_MAX_QUALITY && dstFmt == VK_FORMAT_R8G8B8A8_UNORM) {
|
||||
if (g_Config.iTexFiltering == TEX_FILTER_AUTO_MAX_QUALITY) {
|
||||
// Boost the number of mipmaps.
|
||||
int maxPossibleMipmaps = log2i(std::min(gstate.getTextureWidth(0), gstate.getTextureHeight(0)));
|
||||
maxLevelToGenerate = maxPossibleMipmaps;
|
||||
if (maxPossibleMipmaps > maxLevelToGenerate) {
|
||||
maxLevelToGenerate = maxPossibleMipmaps;
|
||||
dstFmt = VK_FORMAT_R8G8B8A8_UNORM;
|
||||
}
|
||||
}
|
||||
|
||||
int scaleFactor = standardScaleFactor_;
|
||||
@@ -1092,7 +1095,7 @@ void TextureCacheVulkan::LoadTextureLevel(TexCacheEntry &entry, uint8_t *writePt
|
||||
decPitch = w * bpp;
|
||||
}
|
||||
|
||||
bool expand32 = !gstate_c.Supports(GPU_SUPPORTS_16BIT_FORMATS);
|
||||
bool expand32 = !gstate_c.Supports(GPU_SUPPORTS_16BIT_FORMATS) || dstFmt == VK_FORMAT_R8G8B8A8_UNORM;
|
||||
DecodeTextureLevel((u8 *)pixelData, decPitch, tfmt, clutformat, texaddr, level, bufw, false, false, expand32);
|
||||
gpuStats.numTexturesDecoded++;
|
||||
|
||||
|
||||
Reference in new issue
Block a user