summaryrefslogtreecommitdiffstats
path: root/src/video_core/texture_cache
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2021-11-26 17:03:48 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2021-11-26 17:03:48 +0100
commit1624f307d0ebd68751b567f6a616f635567754fa (patch)
tree92532303b4d36b5d73011a7f13cf2c31c7365819 /src/video_core/texture_cache
parentTexture Cache: Fix issue with blitting 3D textures. (diff)
downloadyuzu-1624f307d0ebd68751b567f6a616f635567754fa.tar
yuzu-1624f307d0ebd68751b567f6a616f635567754fa.tar.gz
yuzu-1624f307d0ebd68751b567f6a616f635567754fa.tar.bz2
yuzu-1624f307d0ebd68751b567f6a616f635567754fa.tar.lz
yuzu-1624f307d0ebd68751b567f6a616f635567754fa.tar.xz
yuzu-1624f307d0ebd68751b567f6a616f635567754fa.tar.zst
yuzu-1624f307d0ebd68751b567f6a616f635567754fa.zip
Diffstat (limited to 'src/video_core/texture_cache')
-rw-r--r--src/video_core/texture_cache/texture_cache.h26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 9548abec8..570da2b04 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -1088,19 +1088,23 @@ typename TextureCache<P>::BlitImages TextureCache<P>::GetBlitImages(
ImageId src_id;
do {
has_deleted_images = false;
- dst_id = FindImage(dst_info, dst_addr, FIND_OPTIONS);
src_id = FindImage(src_info, src_addr, FIND_OPTIONS);
- const ImageBase* const dst_image = dst_id ? &slot_images[dst_id] : nullptr;
const ImageBase* const src_image = src_id ? &slot_images[src_id] : nullptr;
- DeduceBlitImages(dst_info, src_info, dst_image, src_image);
- ASSERT(GetFormatType(dst_info.format) == GetFormatType(src_info.format));
- RelaxedOptions find_options{};
- if (src_info.num_samples > 1) {
- // it's a resolve, we must enforce the same format.
- find_options = RelaxedOptions::ForceBrokenViews;
- }
- src_id = FindOrInsertImage(src_info, src_addr, find_options);
- dst_id = FindOrInsertImage(dst_info, dst_addr, find_options);
+ if (src_image && src_image->info.num_samples > 1) {
+ RelaxedOptions find_options{FIND_OPTIONS | RelaxedOptions::ForceBrokenViews};
+ src_id = FindOrInsertImage(src_info, src_addr, find_options);
+ dst_id = FindOrInsertImage(dst_info, dst_addr, find_options);
+ if (has_deleted_images) {
+ continue;
+ }
+ }
+ dst_id = FindImage(dst_info, dst_addr, FIND_OPTIONS);
+ if (!src_id) {
+ src_id = InsertImage(src_info, src_addr, RelaxedOptions{});
+ }
+ if (!dst_id) {
+ dst_id = InsertImage(dst_info, dst_addr, RelaxedOptions{});
+ }
} while (has_deleted_images);
return BlitImages{
.dst_id = dst_id,