texture_cache: Relax mismatched image type from assert to cache miss. (#2830)
Some checks are pending
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions

This commit is contained in:
squidbus 2025-04-22 15:03:43 -07:00 committed by GitHub
parent 5b0205bc59
commit 0297aee3f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -319,17 +319,14 @@ ImageId TextureCache::FindImage(BaseDesc& desc, FindFlags flags) {
continue;
}
if (False(flags & FindFlags::RelaxFmt) &&
!IsVulkanFormatCompatible(info.pixel_format, cache_image.info.pixel_format)) {
(!IsVulkanFormatCompatible(info.pixel_format, cache_image.info.pixel_format) ||
(cache_image.info.type != info.type && info.size != Extent3D{1, 1, 1}))) {
continue;
}
if (True(flags & FindFlags::ExactFmt) &&
info.pixel_format != cache_image.info.pixel_format) {
continue;
}
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;
}