From aa93e0cbb10ed23035c223b72dde3c430c01aec7 Mon Sep 17 00:00:00 2001 From: JPikachu Date: Sat, 1 Nov 2025 01:36:03 +0100 Subject: [PATCH] [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 Co-authored-by: JPikachu Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2914 Reviewed-by: MaranBr Reviewed-by: Caio Oliveira Co-authored-by: JPikachu Co-committed-by: JPikachu --- src/video_core/texture_cache/util.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/video_core/texture_cache/util.cpp b/src/video_core/texture_cache/util.cpp index ede451b166..30e9579b6b 100644 --- a/src/video_core/texture_cache/util.cpp +++ b/src/video_core/texture_cache/util.cpp @@ -647,6 +647,8 @@ LevelArray CalculateMipLevelOffsets(const ImageInfo& info) noexcept { return {}; } ASSERT(info.resources.levels <= static_cast(MAX_MIP_LEVELS)); + if (info.resources.levels > static_cast(MAX_MIP_LEVELS)) + return {}; const LevelInfo level_info = MakeLevelInfo(info); LevelArray offsets{}; u32 offset = 0;