diff options
Diffstat (limited to 'src')
| -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> | |||
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | [[nodiscard]] constexpr Extent3D TileShift(const LevelInfo& info, u32 level) { | 168 | [[nodiscard]] constexpr Extent3D TileShift(const LevelInfo& info, u32 level) { |
| 169 | if (level == 0) { | ||
| 170 | return Extent3D{ | ||
| 171 | .width = info.block.width, | ||
| 172 | .height = info.block.height, | ||
| 173 | .depth = info.block.depth, | ||
| 174 | }; | ||
| 175 | } | ||
| 176 | const Extent3D blocks = NumLevelBlocks(info, level); | 169 | const Extent3D blocks = NumLevelBlocks(info, level); |
| 177 | return Extent3D{ | 170 | return Extent3D{ |
| 178 | .width = AdjustTileSize(info.block.width, GOB_SIZE_X, blocks.width), | 171 | .width = AdjustTileSize(info.block.width, GOB_SIZE_X, blocks.width), |
| @@ -1294,9 +1287,9 @@ u32 MapSizeBytes(const ImageBase& image) { | |||
| 1294 | 1287 | ||
| 1295 | static_assert(CalculateLevelSize(LevelInfo{{1920, 1080, 1}, {0, 2, 0}, {1, 1}, 2, 0}, 0) == | 1288 | static_assert(CalculateLevelSize(LevelInfo{{1920, 1080, 1}, {0, 2, 0}, {1, 1}, 2, 0}, 0) == |
| 1296 | 0x7f8000); | 1289 | 0x7f8000); |
| 1297 | static_assert(CalculateLevelSize(LevelInfo{{32, 32, 1}, {0, 0, 4}, {1, 1}, 4, 0}, 0) == 0x40000); | 1290 | static_assert(CalculateLevelSize(LevelInfo{{32, 32, 1}, {0, 0, 4}, {1, 1}, 4, 0}, 0) == 0x4000); |
| 1298 | 1291 | ||
| 1299 | static_assert(CalculateLevelSize(LevelInfo{{128, 8, 1}, {0, 4, 0}, {1, 1}, 4, 0}, 0) == 0x40000); | 1292 | static_assert(CalculateLevelSize(LevelInfo{{128, 8, 1}, {0, 4, 0}, {1, 1}, 4, 0}, 0) == 0x4000); |
| 1300 | 1293 | ||
| 1301 | static_assert(CalculateLevelOffset(PixelFormat::R8_SINT, {1920, 1080, 1}, {0, 2, 0}, 0, 7) == | 1294 | static_assert(CalculateLevelOffset(PixelFormat::R8_SINT, {1920, 1080, 1}, {0, 2, 0}, 0, 7) == |
| 1302 | 0x2afc00); | 1295 | 0x2afc00); |