[video_core] Increase MAX_MIP_LEVELS to 16 according to specs (#2965)

This increases MAX_MIP_LEVELS from 14 to 16, according to specs.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2965
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Co-authored-by: MaranBr <maranbr@outlook.com>
Co-committed-by: MaranBr <maranbr@outlook.com>
This commit is contained in:
MaranBr 2025-11-07 01:42:52 +01:00 committed by crueter
parent 8412e64bb0
commit 569dbfe8c0
No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project // SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
@ -10,7 +13,7 @@
namespace VideoCommon { namespace VideoCommon {
constexpr size_t NUM_RT = 8; constexpr size_t NUM_RT = 8;
constexpr size_t MAX_MIP_LEVELS = 14; constexpr size_t MAX_MIP_LEVELS = 16;
constexpr Common::SlotId CORRUPT_ID{0xfffffffe}; constexpr Common::SlotId CORRUPT_ID{0xfffffffe};

View File

@ -646,9 +646,10 @@ LevelArray CalculateMipLevelOffsets(const ImageInfo& info) noexcept {
if (info.type == ImageType::Linear) { if (info.type == ImageType::Linear) {
return {}; return {};
} }
ASSERT(info.resources.levels <= static_cast<s32>(MAX_MIP_LEVELS)); if (info.resources.levels > static_cast<s32>(MAX_MIP_LEVELS)) {
if (info.resources.levels > static_cast<s32>(MAX_MIP_LEVELS)) LOG_ERROR(HW_GPU, "Image has too many mip levels={}, maximum supported is={}", info.resources.levels, MAX_MIP_LEVELS);
return {}; return {};
}
const LevelInfo level_info = MakeLevelInfo(info); const LevelInfo level_info = MakeLevelInfo(info);
LevelArray offsets{}; LevelArray offsets{};
u32 offset = 0; u32 offset = 0;