From 2e52ca57539aa91031e97d93cdb2428768edc451 Mon Sep 17 00:00:00 2001 From: CamilleLaVey Date: Tue, 18 Aug 2026 21:22:25 -0400 Subject: [PATCH] [TEST] Corroborating the dowload/copy on MSAA path --- src/video_core/texture_cache/image_base.cpp | 9 ++++++++- src/video_core/texture_cache/image_base.h | 2 ++ src/video_core/texture_cache/texture_cache.h | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/video_core/texture_cache/image_base.cpp b/src/video_core/texture_cache/image_base.cpp index 077df28fb3..dcedaf69f0 100644 --- a/src/video_core/texture_cache/image_base.cpp +++ b/src/video_core/texture_cache/image_base.cpp @@ -121,7 +121,7 @@ void ImageBase::InsertView(const ImageViewInfo& view_info, ImageViewId image_vie image_view_ids.push_back(image_view_id); } -bool ImageBase::IsSafeDownload() const noexcept { +bool ImageBase::IsSafeGpuCopy() const noexcept { // Skip images that were not modified from the GPU if (False(flags & ImageFlagBits::GpuModified)) { return false; @@ -131,6 +131,13 @@ bool ImageBase::IsSafeDownload() const noexcept { if (True(flags & ImageFlagBits::CpuModified)) { return false; } + return true; +} + +bool ImageBase::IsSafeDownload() const noexcept { + if (!IsSafeGpuCopy()) { + return false; + } if (info.num_samples > 1) { LOG_WARNING(HW_GPU, "MSAA image downloads are not implemented"); return false; diff --git a/src/video_core/texture_cache/image_base.h b/src/video_core/texture_cache/image_base.h index 0587d7b724..e85e91fd78 100644 --- a/src/video_core/texture_cache/image_base.h +++ b/src/video_core/texture_cache/image_base.h @@ -64,6 +64,8 @@ struct ImageBase { void InsertView(const ImageViewInfo& view_info, ImageViewId image_view_id); + [[nodiscard]] bool IsSafeGpuCopy() const noexcept; + [[nodiscard]] bool IsSafeDownload() const noexcept; [[nodiscard]] bool Overlaps(VAddr overlap_cpu_addr, size_t overlap_size) const noexcept { diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 2eb94275a8..6e0dd6c319 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -1691,7 +1691,7 @@ ImageId TextureCache

::JoinImages(const ImageInfo& info, GPUVAddr gpu_addr, DA for (const auto& copy_object : join_copies_to_do) { Image& overlap = slot_images[copy_object.id]; if (copy_object.is_alias) { - if (!overlap.IsSafeDownload()) { + if (!overlap.IsSafeGpuCopy()) { continue; } const auto alias_pointer = join_alias_indices.find(copy_object.id);