Vulkan: Correct the calculation for max possible mip levels

This commit is contained in:
Henrik Rydgård 2023-09-07 15:19:44 +02:00
parent d98cdacf54
commit 05d8752a64

View file

@ -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) {