diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-01-20 01:59:53 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-06-16 21:35:02 +0200 |
commit | a11bc4a382ebca52bdf0aab1a9474351e8d85cef (patch) | |
tree | 6392fde60f5ee2e414733a193329e18d7f7fde42 /src/video_core/texture_cache/image_base.cpp | |
parent | vulkan_memory_allocator: Release allocations with no commits (diff) | |
download | yuzu-a11bc4a382ebca52bdf0aab1a9474351e8d85cef.tar yuzu-a11bc4a382ebca52bdf0aab1a9474351e8d85cef.tar.gz yuzu-a11bc4a382ebca52bdf0aab1a9474351e8d85cef.tar.bz2 yuzu-a11bc4a382ebca52bdf0aab1a9474351e8d85cef.tar.lz yuzu-a11bc4a382ebca52bdf0aab1a9474351e8d85cef.tar.xz yuzu-a11bc4a382ebca52bdf0aab1a9474351e8d85cef.tar.zst yuzu-a11bc4a382ebca52bdf0aab1a9474351e8d85cef.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/texture_cache/image_base.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/video_core/texture_cache/image_base.cpp b/src/video_core/texture_cache/image_base.cpp index 9914926b3..bd0e7e64e 100644 --- a/src/video_core/texture_cache/image_base.cpp +++ b/src/video_core/texture_cache/image_base.cpp @@ -113,6 +113,23 @@ void ImageBase::InsertView(const ImageViewInfo& view_info, ImageViewId image_vie image_view_ids.push_back(image_view_id); } +bool ImageBase::IsSafeDownload() const noexcept { + // Skip images that were not modified from the GPU + if (False(flags & ImageFlagBits::GpuModified)) { + return false; + } + // Skip images that .are. modified from the CPU + // We don't want to write sensitive data from the guest + if (True(flags & ImageFlagBits::CpuModified)) { + return false; + } + if (info.num_samples > 1) { + LOG_WARNING(HW_GPU, "MSAA image downloads are not implemented"); + return false; + } + return true; +} + void AddImageAlias(ImageBase& lhs, ImageBase& rhs, ImageId lhs_id, ImageId rhs_id) { static constexpr auto OPTIONS = RelaxedOptions::Size | RelaxedOptions::Format; ASSERT(lhs.info.type == rhs.info.type); |