diff options
author | Squall Leonhart <danialhorton@hotmail.com> | 2023-09-18 15:28:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-18 15:28:53 +0200 |
commit | 79f02020454af9ba055c3302b54693109623f812 (patch) | |
tree | fe8805ed33c5ca4d8d82b32dbce9210b1860eec8 /src/video_core/texture_cache/util.cpp | |
parent | Merge pull request #11529 from lat9nq/no-oob-names-pls (diff) | |
download | yuzu-79f02020454af9ba055c3302b54693109623f812.tar yuzu-79f02020454af9ba055c3302b54693109623f812.tar.gz yuzu-79f02020454af9ba055c3302b54693109623f812.tar.bz2 yuzu-79f02020454af9ba055c3302b54693109623f812.tar.lz yuzu-79f02020454af9ba055c3302b54693109623f812.tar.xz yuzu-79f02020454af9ba055c3302b54693109623f812.tar.zst yuzu-79f02020454af9ba055c3302b54693109623f812.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/texture_cache/util.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/video_core/texture_cache/util.cpp b/src/video_core/texture_cache/util.cpp index a83f5d41c..d36145eaa 100644 --- a/src/video_core/texture_cache/util.cpp +++ b/src/video_core/texture_cache/util.cpp @@ -166,13 +166,6 @@ template <u32 GOB_EXTENT> } [[nodiscard]] constexpr Extent3D TileShift(const LevelInfo& info, u32 level) { - if (level == 0) { - return Extent3D{ - .width = info.block.width, - .height = info.block.height, - .depth = info.block.depth, - }; - } const Extent3D blocks = NumLevelBlocks(info, level); return Extent3D{ .width = AdjustTileSize(info.block.width, GOB_SIZE_X, blocks.width), @@ -1294,9 +1287,9 @@ u32 MapSizeBytes(const ImageBase& image) { static_assert(CalculateLevelSize(LevelInfo{{1920, 1080, 1}, {0, 2, 0}, {1, 1}, 2, 0}, 0) == 0x7f8000); -static_assert(CalculateLevelSize(LevelInfo{{32, 32, 1}, {0, 0, 4}, {1, 1}, 4, 0}, 0) == 0x40000); +static_assert(CalculateLevelSize(LevelInfo{{32, 32, 1}, {0, 0, 4}, {1, 1}, 4, 0}, 0) == 0x4000); -static_assert(CalculateLevelSize(LevelInfo{{128, 8, 1}, {0, 4, 0}, {1, 1}, 4, 0}, 0) == 0x40000); +static_assert(CalculateLevelSize(LevelInfo{{128, 8, 1}, {0, 4, 0}, {1, 1}, 4, 0}, 0) == 0x4000); static_assert(CalculateLevelOffset(PixelFormat::R8_SINT, {1920, 1080, 1}, {0, 2, 0}, 0, 7) == 0x2afc00); |