From 05d8752a64560939632f5112132afd85de72ce77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 7 Sep 2023 15:19:44 +0200 Subject: [PATCH] Vulkan: Correct the calculation for max possible mip levels --- GPU/Common/TextureCacheCommon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPU/Common/TextureCacheCommon.cpp b/GPU/Common/TextureCacheCommon.cpp index d035825a59..10e8968ef5 100644 --- a/GPU/Common/TextureCacheCommon.cpp +++ b/GPU/Common/TextureCacheCommon.cpp @@ -2921,7 +2921,7 @@ bool TextureCacheCommon::PrepareBuildTexture(BuildTexturePlan &plan, TexCacheEnt plan.levelsToLoad = 1; plan.maxPossibleLevels = 1; } else { - plan.maxPossibleLevels = log2i(std::min(plan.createW, plan.createH)) + 1; + plan.maxPossibleLevels = log2i(std::max(plan.createW, plan.createH)) + 1; } if (plan.levelsToCreate == 1) {