From 23218ed2999ff220d3f5b6cba07640205454f85f Mon Sep 17 00:00:00 2001 From: JPikachu Date: Fri, 31 Oct 2025 20:09:09 +0000 Subject: [PATCH] [voice_core] Bypass mip level assertion to ASSERT_MSG 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. --- src/video_core/texture_cache/util.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video_core/texture_cache/util.cpp b/src/video_core/texture_cache/util.cpp index ede451b166..4b97d91d73 100644 --- a/src/video_core/texture_cache/util.cpp +++ b/src/video_core/texture_cache/util.cpp @@ -646,7 +646,9 @@ LevelArray CalculateMipLevelOffsets(const ImageInfo& info) noexcept { if (info.type == ImageType::Linear) { return {}; } - ASSERT(info.resources.levels <= static_cast(MAX_MIP_LEVELS)); + if (info.resources.levels > static_cast(MAX_MIP_LEVELS)) { + ASSERT_MSG(false, "Mip level count exceeds MAX_MIP_LEVELS"); + } const LevelInfo level_info = MakeLevelInfo(info); LevelArray offsets{}; u32 offset = 0;