mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
VK: Only autogenerate mipmaps for R8G8B8A8 format textures.
Quickfix for bug with Auto High Quality texture filtering. Fixes #14804 (good enough for now at least).
This commit is contained in:
parent
f83cf9fd0d
commit
e2b0137400
1 changed files with 4 additions and 4 deletions
|
@ -751,15 +751,15 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry) {
|
|||
// such as when using replacement textures - but let's keep the same amount of levels.
|
||||
int maxLevelToGenerate = maxLevel;
|
||||
|
||||
if (g_Config.iTexFiltering == TEX_FILTER_AUTO_MAX_QUALITY) {
|
||||
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) {
|
||||
// Boost the number of mipmaps.
|
||||
int maxPossibleMipmaps = log2i(std::min(gstate.getTextureWidth(0), gstate.getTextureHeight(0)));
|
||||
maxLevelToGenerate = maxPossibleMipmaps;
|
||||
}
|
||||
|
||||
// If GLES3 is available, we can preallocate the storage, which makes texture loading more efficient.
|
||||
VkFormat dstFmt = GetDestFormat(GETextureFormat(entry->format), gstate.getClutPaletteFormat());
|
||||
|
||||
int scaleFactor = standardScaleFactor_;
|
||||
if (scaleFactor > maxScaleFactor_)
|
||||
scaleFactor = maxScaleFactor_;
|
||||
|
|
Loading…
Add table
Reference in a new issue