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

+8 -2
View File
@@ -282,8 +282,14 @@ void TextureCacheGLES::BuildTexture(TexCacheEntry *const entry) {
}
if (!gstate_c.Supports(GPU_SUPPORTS_TEXTURE_LOD_CONTROL)) {
// Force no additional mipmaps.
plan.levelsToCreate = plan.levelsToLoad;
// If the mip chain is not full..
if (plan.levelsToCreate != plan.maxPossibleLevels) {
// We need to avoid creating mips at all, or generate them all - can't be incomplete
// on this hardware (strict OpenGL rules).
plan.levelsToCreate = 1;
plan.levelsToLoad = 1;
entry->status |= TexCacheEntry::STATUS_NO_MIPS;
}
}
if (plan.depth == 1) {