diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-01-04 05:56:44 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-01-04 06:06:40 +0100 |
commit | 7d904fef2e6ac9ce8a3df71e758a36d39b8f69e5 (patch) | |
tree | 5bdc2bdcf8b5aeb594a3a2b16c183b13d6fe2771 /src/video_core/texture_cache/util.cpp | |
parent | gl_texture_cache: Create base images with sRGB (diff) | |
download | yuzu-7d904fef2e6ac9ce8a3df71e758a36d39b8f69e5.tar yuzu-7d904fef2e6ac9ce8a3df71e758a36d39b8f69e5.tar.gz yuzu-7d904fef2e6ac9ce8a3df71e758a36d39b8f69e5.tar.bz2 yuzu-7d904fef2e6ac9ce8a3df71e758a36d39b8f69e5.tar.lz yuzu-7d904fef2e6ac9ce8a3df71e758a36d39b8f69e5.tar.xz yuzu-7d904fef2e6ac9ce8a3df71e758a36d39b8f69e5.tar.zst yuzu-7d904fef2e6ac9ce8a3df71e758a36d39b8f69e5.zip |
Diffstat (limited to 'src/video_core/texture_cache/util.cpp')
-rw-r--r-- | src/video_core/texture_cache/util.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/video_core/texture_cache/util.cpp b/src/video_core/texture_cache/util.cpp index 9ed1fc007..279932778 100644 --- a/src/video_core/texture_cache/util.cpp +++ b/src/video_core/texture_cache/util.cpp @@ -1069,13 +1069,13 @@ bool IsPitchLinearSameSize(const ImageInfo& lhs, const ImageInfo& rhs, bool stri std::optional<OverlapResult> ResolveOverlap(const ImageInfo& new_info, GPUVAddr gpu_addr, VAddr cpu_addr, const ImageBase& overlap, - bool strict_size) { + bool strict_size, bool broken_views) { ASSERT(new_info.type != ImageType::Linear); ASSERT(overlap.info.type != ImageType::Linear); if (!IsLayerStrideCompatible(new_info, overlap.info)) { return std::nullopt; } - if (!IsViewCompatible(overlap.info.format, new_info.format)) { + if (!IsViewCompatible(overlap.info.format, new_info.format, broken_views)) { return std::nullopt; } if (gpu_addr == overlap.gpu_addr) { @@ -1118,14 +1118,15 @@ bool IsLayerStrideCompatible(const ImageInfo& lhs, const ImageInfo& rhs) { } std::optional<SubresourceBase> FindSubresource(const ImageInfo& candidate, const ImageBase& image, - GPUVAddr candidate_addr, RelaxedOptions options) { + GPUVAddr candidate_addr, RelaxedOptions options, + bool broken_views) { const std::optional<SubresourceBase> base = image.TryFindBase(candidate_addr); if (!base) { return std::nullopt; } const ImageInfo& existing = image.info; if (False(options & RelaxedOptions::Format)) { - if (!IsViewCompatible(existing.format, candidate.format)) { + if (!IsViewCompatible(existing.format, candidate.format, broken_views)) { return std::nullopt; } } @@ -1162,8 +1163,8 @@ std::optional<SubresourceBase> FindSubresource(const ImageInfo& candidate, const } bool IsSubresource(const ImageInfo& candidate, const ImageBase& image, GPUVAddr candidate_addr, - RelaxedOptions options) { - return FindSubresource(candidate, image, candidate_addr, options).has_value(); + RelaxedOptions options, bool broken_views) { + return FindSubresource(candidate, image, candidate_addr, options, broken_views).has_value(); } void DeduceBlitImages(ImageInfo& dst_info, ImageInfo& src_info, const ImageBase* dst, |