summaryrefslogtreecommitdiffstats
path: root/src/video_core/texture_cache/surface_params.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-07-14 23:42:39 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2019-07-14 23:42:39 +0200
commit2ac7472d3f94f1adb33c0a1d7748e922c515f6a8 (patch)
tree9a2bd7f09312513508957c39eb6b147811fc1352 /src/video_core/texture_cache/surface_params.cpp
parentTexture_Cache: Remove some unprecise fallback case and clang format (diff)
downloadyuzu-2ac7472d3f94f1adb33c0a1d7748e922c515f6a8.tar
yuzu-2ac7472d3f94f1adb33c0a1d7748e922c515f6a8.tar.gz
yuzu-2ac7472d3f94f1adb33c0a1d7748e922c515f6a8.tar.bz2
yuzu-2ac7472d3f94f1adb33c0a1d7748e922c515f6a8.tar.lz
yuzu-2ac7472d3f94f1adb33c0a1d7748e922c515f6a8.tar.xz
yuzu-2ac7472d3f94f1adb33c0a1d7748e922c515f6a8.tar.zst
yuzu-2ac7472d3f94f1adb33c0a1d7748e922c515f6a8.zip
Diffstat (limited to 'src/video_core/texture_cache/surface_params.cpp')
-rw-r--r--src/video_core/texture_cache/surface_params.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/video_core/texture_cache/surface_params.cpp b/src/video_core/texture_cache/surface_params.cpp
index 33c94daa8..fd5472451 100644
--- a/src/video_core/texture_cache/surface_params.cpp
+++ b/src/video_core/texture_cache/surface_params.cpp
@@ -297,12 +297,11 @@ std::size_t SurfaceParams::GetInnerMipmapMemorySize(u32 level, bool as_host_size
return Tegra::Texture::CalculateSize(!as_host_size, GetBytesPerPixel(), width, height,
depth, GetMipBlockHeight(level),
GetMipBlockDepth(level));
+ } else if (as_host_size || IsBuffer()) {
+ return GetBytesPerPixel() * width * height * depth;
} else {
- if (as_host_size || IsBuffer()) {
- return GetBytesPerPixel() * width * height * depth;
- } else {
- return pitch * height * depth;
- }
+ // Linear Texture Case
+ return pitch * height * depth;
}
}