Browse Source

[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.
pull/2914/head
JPikachu 5 months ago
parent
commit
23218ed299
  1. 4
      src/video_core/texture_cache/util.cpp

4
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<s32>(MAX_MIP_LEVELS));
if (info.resources.levels > static_cast<s32>(MAX_MIP_LEVELS)) {
ASSERT_MSG(false, "Mip level count exceeds MAX_MIP_LEVELS");
}
const LevelInfo level_info = MakeLevelInfo(info);
LevelArray offsets{};
u32 offset = 0;

Loading…
Cancel
Save