mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-17 16:30:30 +02:00
GPU: Block mipmap autogen for matching size.
If the mips don't get smaller, we can't autogen - the bias in that case is used to select a different texture. Fixes #9731. This also may improve a minor performance issue on PowerVR in some games.
This commit is contained in:
1 parent
9687873417
commit
b6375638f5
5 files changed
+59
-19
No files matched your search
@@ -212,7 +212,8 @@ void TextureCacheVulkan::UpdateSamplingParams(TexCacheEntry &entry, SamplerCache
|
||||
bool tClamp;
|
||||
float lodBias;
|
||||
bool autoMip;
|
||||
GetSamplingParams(minFilt, magFilt, sClamp, tClamp, lodBias, entry.maxLevel, entry.addr, autoMip);
|
||||
u8 maxLevel = (entry.status & TexCacheEntry::STATUS_BAD_MIPS) ? 0 : entry.maxLevel;
|
||||
GetSamplingParams(minFilt, magFilt, sClamp, tClamp, lodBias, maxLevel, entry.addr, autoMip);
|
||||
key.minFilt = minFilt & 1;
|
||||
key.mipEnable = (minFilt >> 2) & 1;
|
||||
key.mipFilt = (minFilt >> 1) & 1;
|
||||
@@ -661,6 +662,11 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry, bool replaceIm
|
||||
entry->vkTex->texture_->UploadMip(i, mipWidth, mipHeight, texBuf, bufferOffset, stride / bpp);
|
||||
}
|
||||
|
||||
if (maxLevel == 0) {
|
||||
entry->status |= TexCacheEntry::STATUS_BAD_MIPS;
|
||||
} else {
|
||||
entry->status &= ~TexCacheEntry::STATUS_BAD_MIPS;
|
||||
}
|
||||
if (replaced.Valid()) {
|
||||
entry->SetAlphaStatus(TexCacheEntry::Status(replaced.AlphaStatus()));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user