diff options
| -rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 26 |
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( | |||
| 1088 | ImageId src_id; | 1088 | ImageId src_id; |
| 1089 | do { | 1089 | do { |
| 1090 | has_deleted_images = false; | 1090 | has_deleted_images = false; |
| 1091 | dst_id = FindImage(dst_info, dst_addr, FIND_OPTIONS); | ||
| 1092 | src_id = FindImage(src_info, src_addr, FIND_OPTIONS); | 1091 | src_id = FindImage(src_info, src_addr, FIND_OPTIONS); |
| 1093 | const ImageBase* const dst_image = dst_id ? &slot_images[dst_id] : nullptr; | ||
| 1094 | const ImageBase* const src_image = src_id ? &slot_images[src_id] : nullptr; | 1092 | const ImageBase* const src_image = src_id ? &slot_images[src_id] : nullptr; |
| 1095 | DeduceBlitImages(dst_info, src_info, dst_image, src_image); | 1093 | if (src_image && src_image->info.num_samples > 1) { |
| 1096 | ASSERT(GetFormatType(dst_info.format) == GetFormatType(src_info.format)); | 1094 | RelaxedOptions find_options{FIND_OPTIONS | RelaxedOptions::ForceBrokenViews}; |
| 1097 | RelaxedOptions find_options{}; | 1095 | src_id = FindOrInsertImage(src_info, src_addr, find_options); |
| 1098 | if (src_info.num_samples > 1) { | 1096 | dst_id = FindOrInsertImage(dst_info, dst_addr, find_options); |
| 1099 | // it's a resolve, we must enforce the same format. | 1097 | if (has_deleted_images) { |
| 1100 | find_options = RelaxedOptions::ForceBrokenViews; | 1098 | continue; |
| 1101 | } | 1099 | } |
| 1102 | src_id = FindOrInsertImage(src_info, src_addr, find_options); | 1100 | } |
| 1103 | dst_id = FindOrInsertImage(dst_info, dst_addr, find_options); | 1101 | dst_id = FindImage(dst_info, dst_addr, FIND_OPTIONS); |
| 1102 | if (!src_id) { | ||
| 1103 | src_id = InsertImage(src_info, src_addr, RelaxedOptions{}); | ||
| 1104 | } | ||
| 1105 | if (!dst_id) { | ||
| 1106 | dst_id = InsertImage(dst_info, dst_addr, RelaxedOptions{}); | ||
| 1107 | } | ||
| 1104 | } while (has_deleted_images); | 1108 | } while (has_deleted_images); |
| 1105 | return BlitImages{ | 1109 | return BlitImages{ |
| 1106 | .dst_id = dst_id, | 1110 | .dst_id = dst_id, |