summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/video_core/texture_cache/util.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/video_core/texture_cache/util.cpp b/src/video_core/texture_cache/util.cpp
index 906604a39..f07ce5500 100644
--- a/src/video_core/texture_cache/util.cpp
+++ b/src/video_core/texture_cache/util.cpp
@@ -1087,7 +1087,15 @@ std::optional<SubresourceBase> FindSubresource(const ImageInfo& candidate, const
1087 return std::nullopt; 1087 return std::nullopt;
1088 } 1088 }
1089 const ImageInfo& existing = image.info; 1089 const ImageInfo& existing = image.info;
1090 if (False(options & RelaxedOptions::Format)) { 1090 if (True(options & RelaxedOptions::Format)) {
1091 // Format checking is relaxed, but we still have to check for matching bytes per block.
1092 // This avoids creating a view for blits on UE4 titles where formats with different bytes
1093 // per block are aliased.
1094 if (BytesPerBlock(existing.format) != BytesPerBlock(candidate.format)) {
1095 return std::nullopt;
1096 }
1097 } else {
1098 // Format comaptibility is not relaxed, ensure we are creating a view on a compatible format
1091 if (!IsViewCompatible(existing.format, candidate.format, broken_views, native_bgr)) { 1099 if (!IsViewCompatible(existing.format, candidate.format, broken_views, native_bgr)) {
1092 return std::nullopt; 1100 return std::nullopt;
1093 } 1101 }