From 5b0205bc59f5057203a860f991fef3cb54dc8ed0 Mon Sep 17 00:00:00 2001 From: squidbus <175574877+squidbus@users.noreply.github.com> Date: Tue, 22 Apr 2025 14:00:08 -0700 Subject: [PATCH] fix: Texture cache image type assert. --- src/video_core/texture_cache/texture_cache.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/video_core/texture_cache/texture_cache.cpp b/src/video_core/texture_cache/texture_cache.cpp index 545152ec8..7023dda55 100644 --- a/src/video_core/texture_cache/texture_cache.cpp +++ b/src/video_core/texture_cache/texture_cache.cpp @@ -326,13 +326,11 @@ ImageId TextureCache::FindImage(BaseDesc& desc, FindFlags flags) { info.pixel_format != cache_image.info.pixel_format) { continue; } - if (!(cache_image.info.type == info.type || info.size == Extent3D{1, 1, 1} || - static_cast(flags & FindFlags::RelaxFmt))) { - ASSERT_MSG(false, "Image cache type mismatch: cache={}, info={}", - int(cache_image.info.type), int(info.type)); - image_id = cache_id; - break; - } + ASSERT_MSG((cache_image.info.type == info.type || info.size == Extent3D{1, 1, 1} || + True(flags & FindFlags::RelaxFmt)), + "Image cache type mismatch: cache={}, info={}", + vk::to_string(cache_image.info.type), vk::to_string(info.type)); + image_id = cache_id; } if (True(flags & FindFlags::NoCreate) && !image_id) {