From 4162f86a119c7476eda231a710ffa3208e42d6ab Mon Sep 17 00:00:00 2001 From: CamilleLaVey Date: Fri, 31 Jul 2026 21:33:49 -0400 Subject: [PATCH] debug overlap images 2 --- src/video_core/texture_cache/texture_cache.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index d02abc8944..dc3e8dfe2d 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -180,8 +180,13 @@ u64 TextureCache

::ReclaimMemory(u64 target_bytes, bool allow_download) { if (True(image.flags & ImageFlagBits::IsDecoding)) { return false; } - const bool must_download = - image.IsSafeDownload() && False(image.flags & ImageFlagBits::BadOverlap); + const bool must_download = image.IsSafeDownload(); + if (must_download && True(image.flags & ImageFlagBits::BadOverlap)) { + LOG_WARNING(HW_GPU, + "Recovering bad overlap on eviction: gpu_addr=0x{:x} fmt={} {}x{}x{}", + image.gpu_addr, static_cast(image.info.format), image.info.size.width, + image.info.size.height, image.info.size.depth); + } bool queued_download = false; if (must_download) { if constexpr (HAS_TIMELINE_SYNC_POINTS) { @@ -1733,8 +1738,15 @@ ImageId TextureCache

::JoinImages(const ImageInfo& info, GPUVAddr gpu_addr, DA join_copies_to_do.emplace_back(JoinCopy{false, overlap_id}); continue; } - if (overlap.IsSafeDownload() && False(overlap.flags & ImageFlagBits::BadOverlap) && + if (overlap.IsSafeDownload() && gpu_memory->GpuToCpuAddress(overlap.gpu_addr).has_value()) { + if (True(overlap.flags & ImageFlagBits::BadOverlap)) { + LOG_WARNING(HW_GPU, + "Recovering bad overlap on join: gpu_addr=0x{:x} fmt={} {}x{}x{}", + overlap.gpu_addr, static_cast(overlap.info.format), + overlap.info.size.width, overlap.info.size.height, + overlap.info.size.depth); + } QueueEvictionDownload(overlap); } else { LOG_WARNING(HW_GPU,