mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-02-04 02:51:18 +01:00
[video_core] Bypass mip level assertion to ASSERT_MSG (#2914)
This will bypass the check and continue execution, preventing crashes in cases where games (like CTGP-DX) may request more mip levels than supported. This is a temporary solution to bypass instead of ending the crashing when asserts fail. Co-authored-by: MaranBr <maranbr@outlook.com> Co-authored-by: JPikachu <jpikachu.eden@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2914 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Co-authored-by: JPikachu <jpikachu@eden-emu.dev> Co-committed-by: JPikachu <jpikachu@eden-emu.dev>
This commit is contained in:
@@ -647,6 +647,8 @@ LevelArray CalculateMipLevelOffsets(const ImageInfo& info) noexcept {
|
||||
return {};
|
||||
}
|
||||
ASSERT(info.resources.levels <= static_cast<s32>(MAX_MIP_LEVELS));
|
||||
if (info.resources.levels > static_cast<s32>(MAX_MIP_LEVELS))
|
||||
return {};
|
||||
const LevelInfo level_info = MakeLevelInfo(info);
|
||||
LevelArray offsets{};
|
||||
u32 offset = 0;
|
||||
|
||||
Reference in New Issue
Block a user