Skip to content

Commit

Permalink
Vulkan: Correct the calculation for max possible mip levels
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Sep 7, 2023
1 parent d98cdac commit 05d8752
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GPU/Common/TextureCacheCommon.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit 05d8752

Please sign in to comment.