diff options
author | Lioncash <mathew1800@gmail.com> | 2020-12-05 10:51:14 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-12-05 12:39:35 +0100 |
commit | 414a87a4f4570344140d77a7985b4d118b754341 (patch) | |
tree | 6eac8e13f3333c89d8c0f3428b8664cab63a484a /src/video_core/texture_cache/surface_params.cpp | |
parent | Merge pull request #5124 from lioncash/video-shadow (diff) | |
download | yuzu-414a87a4f4570344140d77a7985b4d118b754341.tar yuzu-414a87a4f4570344140d77a7985b4d118b754341.tar.gz yuzu-414a87a4f4570344140d77a7985b4d118b754341.tar.bz2 yuzu-414a87a4f4570344140d77a7985b4d118b754341.tar.lz yuzu-414a87a4f4570344140d77a7985b4d118b754341.tar.xz yuzu-414a87a4f4570344140d77a7985b4d118b754341.tar.zst yuzu-414a87a4f4570344140d77a7985b4d118b754341.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/texture_cache/surface_params.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/video_core/texture_cache/surface_params.cpp b/src/video_core/texture_cache/surface_params.cpp index 13dd16356..305297719 100644 --- a/src/video_core/texture_cache/surface_params.cpp +++ b/src/video_core/texture_cache/surface_params.cpp @@ -356,18 +356,18 @@ std::size_t SurfaceParams::GetLayerSize(bool as_host_size, bool uncompressed) co std::size_t SurfaceParams::GetInnerMipmapMemorySize(u32 level, bool as_host_size, bool uncompressed) const { - const u32 width{GetMipmapSize(uncompressed, GetMipWidth(level), GetDefaultBlockWidth())}; - const u32 height{GetMipmapSize(uncompressed, GetMipHeight(level), GetDefaultBlockHeight())}; - const u32 depth{is_layered ? 1U : GetMipDepth(level)}; + const u32 mip_width{GetMipmapSize(uncompressed, GetMipWidth(level), GetDefaultBlockWidth())}; + const u32 mip_height{GetMipmapSize(uncompressed, GetMipHeight(level), GetDefaultBlockHeight())}; + const u32 mip_depth{is_layered ? 1U : GetMipDepth(level)}; if (is_tiled) { - return Tegra::Texture::CalculateSize(!as_host_size, GetBytesPerPixel(), width, height, - depth, GetMipBlockHeight(level), + return Tegra::Texture::CalculateSize(!as_host_size, GetBytesPerPixel(), mip_width, + mip_height, mip_depth, GetMipBlockHeight(level), GetMipBlockDepth(level)); } else if (as_host_size || IsBuffer()) { - return GetBytesPerPixel() * width * height * depth; + return GetBytesPerPixel() * mip_width * mip_height * mip_depth; } else { // Linear Texture Case - return pitch * height * depth; + return pitch * mip_height * mip_depth; } } |