diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-01-06 08:39:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-06 08:39:51 +0100 |
commit | e8d40559d50b952335f4899392944a9dca418b62 (patch) | |
tree | 94cbbc1e616e12ecc6b9c167f630649b829368fe /src/video_core/texture_cache/util.cpp | |
parent | Merge pull request #5250 from lat9nq/appimage (diff) | |
parent | gl_texture_cache: Avoid format views on Intel and AMD (diff) | |
download | yuzu-e8d40559d50b952335f4899392944a9dca418b62.tar yuzu-e8d40559d50b952335f4899392944a9dca418b62.tar.gz yuzu-e8d40559d50b952335f4899392944a9dca418b62.tar.bz2 yuzu-e8d40559d50b952335f4899392944a9dca418b62.tar.lz yuzu-e8d40559d50b952335f4899392944a9dca418b62.tar.xz yuzu-e8d40559d50b952335f4899392944a9dca418b62.tar.zst yuzu-e8d40559d50b952335f4899392944a9dca418b62.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, |