[Vulkan] Fix GetMipExtent calculating mip extent incorrectly.

This commit is contained in:
gibbed 2018-07-01 01:31:33 -05:00
parent 4357415892
commit 15eb6ed2d9
1 changed files with 2 additions and 2 deletions

View File

@ -1132,13 +1132,13 @@ TextureExtent TextureCache::GetMipExtent(const TextureInfo& src, uint32_t mip) {
uint32_t depth = src.depth + 1; uint32_t depth = src.depth + 1;
TextureExtent extent; TextureExtent extent;
if (mip == 0) { if (mip == 0) {
extent = TextureExtent::Calculate(format_info, width, height, depth, width, extent = TextureExtent::Calculate(format_info, width, height, depth, false,
false); false);
} else { } else {
uint32_t mip_width = std::max(1u, width >> mip); uint32_t mip_width = std::max(1u, width >> mip);
uint32_t mip_height = std::max(1u, height >> mip); uint32_t mip_height = std::max(1u, height >> mip);
extent = TextureExtent::Calculate(format_info, mip_width, mip_height, depth, extent = TextureExtent::Calculate(format_info, mip_width, mip_height, depth,
mip_width, false); false, false);
} }
return extent; return extent;
} }