Careful with mipmaps on old OpenGL ES. Lost this check in the refactor, made it clearer than before at least.

Fixes Burnout rendering issue mentioned in #15818
This commit is contained in:
Henrik Rydgård committed 2022-08-09 17:26:39 +02:00
1 parent 6c46095c3a
commit 1913930541
4 files changed
+19 -11

No files matched your search

+2 -9
View File
@@ -438,13 +438,6 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry) {
return;
}
int maxPossibleMipLevels;
if (plan.isVideo || plan.depth != 1) {
maxPossibleMipLevels = 1;
} else {
maxPossibleMipLevels = log2i(std::min(plan.w * plan.scaleFactor, plan.h * plan.scaleFactor)) + 1;
}
VkFormat dstFmt = GetDestFormat(GETextureFormat(entry->format), gstate.getClutPaletteFormat());
if (plan.scaleFactor > 1) {
@@ -456,11 +449,11 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry) {
// and similar, which don't really need it.
if (g_Config.iTexFiltering == TEX_FILTER_AUTO_MAX_QUALITY && plan.w <= 256 && plan.h <= 256) {
// Boost the number of mipmaps.
if (maxPossibleMipLevels > plan.levelsToCreate) {
if (plan.maxPossibleLevels > plan.levelsToCreate) {
// We have to generate mips with a shader. This requires decoding to R8G8B8A8_UNORM format to avoid extra complications.
dstFmt = VULKAN_8888_FORMAT;
}
plan.levelsToCreate = maxPossibleMipLevels;
plan.levelsToCreate = plan.maxPossibleLevels;
}
// Any texture scaling is gonna move away from the original 16-bit format, if any.