summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2021-11-19 05:46:57 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2021-11-19 05:46:57 +0100
commit0ff228405faae92a39167b9aec072e14744eae35 (patch)
treeee6baffc8e2b49ffbc9733fb5434d9082cbf0f66 /src
parentTextureCache: Fix regression caused by ART and improve blit detection algorithm to be smarter. (diff)
downloadyuzu-0ff228405faae92a39167b9aec072e14744eae35.tar
yuzu-0ff228405faae92a39167b9aec072e14744eae35.tar.gz
yuzu-0ff228405faae92a39167b9aec072e14744eae35.tar.bz2
yuzu-0ff228405faae92a39167b9aec072e14744eae35.tar.lz
yuzu-0ff228405faae92a39167b9aec072e14744eae35.tar.xz
yuzu-0ff228405faae92a39167b9aec072e14744eae35.tar.zst
yuzu-0ff228405faae92a39167b9aec072e14744eae35.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/texture_cache/texture_cache.h10
-rw-r--r--src/video_core/texture_cache/types.h1
2 files changed, 9 insertions, 2 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 5ade3ce55..06257f064 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -759,7 +759,8 @@ ImageId TextureCache<P>::FindImage(const ImageInfo& info, GPUVAddr gpu_addr,
return ImageId{};
}
}
- const bool broken_views = runtime.HasBrokenTextureViewFormats();
+ const bool broken_views =
+ runtime.HasBrokenTextureViewFormats() || True(options & RelaxedOptions::ForceBrokenViews);
const bool native_bgr = runtime.HasNativeBgr();
ImageId image_id;
const auto lambda = [&](ImageId existing_image_id, ImageBase& existing_image) {
@@ -1096,7 +1097,12 @@ typename TextureCache<P>::BlitImages TextureCache<P>::GetBlitImages(
continue;
}
src_id = FindOrInsertImage(src_info, src_addr);
- dst_id = FindOrInsertImage(dst_info, dst_addr);
+ RelaxedOptions dst_options{};
+ if (src_info.num_samples > 1) {
+ // it's a resolve, we must enforce the same format.
+ dst_options = RelaxedOptions::ForceBrokenViews;
+ }
+ dst_id = FindOrInsertImage(dst_info, dst_addr, dst_options);
} while (has_deleted_images);
return BlitImages{
.dst_id = dst_id,
diff --git a/src/video_core/texture_cache/types.h b/src/video_core/texture_cache/types.h
index 5c274abdf..5ac27b3a7 100644
--- a/src/video_core/texture_cache/types.h
+++ b/src/video_core/texture_cache/types.h
@@ -54,6 +54,7 @@ enum class RelaxedOptions : u32 {
Size = 1 << 0,
Format = 1 << 1,
Samples = 1 << 2,
+ ForceBrokenViews = 1 << 3,
};
DECLARE_ENUM_FLAG_OPERATORS(RelaxedOptions)