From 0d49ec00457b259e89250e652bbafb1ad1d9738c Mon Sep 17 00:00:00 2001 From: Aphcity Date: Mon, 13 May 2024 12:15:38 +0200 Subject: [PATCH] Revoke #01c4568786 --- src/video_core/texture_cache/util.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/video_core/texture_cache/util.cpp b/src/video_core/texture_cache/util.cpp index 1a6f0d1ad1..367e56ad5f 100644 --- a/src/video_core/texture_cache/util.cpp +++ b/src/video_core/texture_cache/util.cpp @@ -123,9 +123,7 @@ template return { .width = AdjustMipBlockSize(num_tiles.width, block_size.width, level), .height = AdjustMipBlockSize(num_tiles.height, block_size.height, level), - .depth = level == 0 && num_levels == 1 - ? block_size.depth - : AdjustMipBlockSize(num_tiles.depth, block_size.depth, level), + .depth = AdjustMipBlockSize(num_tiles.depth, block_size.depth, level), }; } @@ -167,13 +165,6 @@ template } [[nodiscard]] constexpr Extent3D TileShift(const LevelInfo& info, u32 level) { - if (level == 0 && info.num_levels == 1) { - 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), @@ -1297,9 +1288,7 @@ u32 MapSizeBytes(const ImageBase& image) { static_assert(CalculateLevelSize(LevelInfo{{1920, 1080, 1}, {0, 2, 0}, {1, 1}, 2, 0, 1}, 0) == 0x7f8000); -static_assert(CalculateLevelSize(LevelInfo{{32, 32, 1}, {0, 0, 4}, {1, 1}, 4, 0, 1}, 0) == 0x40000); - -static_assert(CalculateLevelSize(LevelInfo{{128, 8, 1}, {0, 4, 0}, {1, 1}, 4, 0, 1}, 0) == 0x40000); +static_assert(CalculateLevelSize(LevelInfo{{32, 32, 1}, {0, 0, 4}, {1, 1}, 4, 0}, 0) == 0x4000); static_assert(CalculateLevelOffset(PixelFormat::R8_SINT, {1920, 1080, 1}, {0, 2, 0}, 0, 7) == 0x2afc00);