diff options
| author | 2021-12-09 05:26:21 -0500 | |
|---|---|---|
| committer | 2021-12-09 05:26:21 -0500 | |
| commit | 429320aee8a0beab0081a61e6e3cfbc6bb754db2 (patch) | |
| tree | b222f9be44295648aa1c9abcf7d104b48870eaab | |
| parent | Merge pull request #7519 from itsmeft24/master (diff) | |
| parent | Texture Cache: Fix crashes on NVIDIA. (diff) | |
| download | yuzu-429320aee8a0beab0081a61e6e3cfbc6bb754db2.tar.gz yuzu-429320aee8a0beab0081a61e6e3cfbc6bb754db2.tar.xz yuzu-429320aee8a0beab0081a61e6e3cfbc6bb754db2.zip | |
Merge pull request #7495 from FernandoS27/text-blit-fix-again
Texture Cache: Fix mismatching image/views on blits
Diffstat (limited to '')
| -rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 565b99254..e195b1e98 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h | |||
| @@ -1122,7 +1122,7 @@ typename TextureCache<P>::BlitImages TextureCache<P>::GetBlitImages( | |||
| 1122 | break; | 1122 | break; |
| 1123 | } | 1123 | } |
| 1124 | if (can_be_depth_blit) { | 1124 | if (can_be_depth_blit) { |
| 1125 | const ImageBase* const dst_image = src_id ? &slot_images[src_id] : nullptr; | 1125 | const ImageBase* const dst_image = dst_id ? &slot_images[dst_id] : nullptr; |
| 1126 | DeduceBlitImages(dst_info, src_info, dst_image, src_image); | 1126 | DeduceBlitImages(dst_info, src_info, dst_image, src_image); |
| 1127 | if (GetFormatType(dst_info.format) != GetFormatType(src_info.format)) { | 1127 | if (GetFormatType(dst_info.format) != GetFormatType(src_info.format)) { |
| 1128 | continue; | 1128 | continue; |
| @@ -1135,8 +1135,11 @@ typename TextureCache<P>::BlitImages TextureCache<P>::GetBlitImages( | |||
| 1135 | dst_id = InsertImage(dst_info, dst_addr, RelaxedOptions{}); | 1135 | dst_id = InsertImage(dst_info, dst_addr, RelaxedOptions{}); |
| 1136 | } | 1136 | } |
| 1137 | } while (has_deleted_images); | 1137 | } while (has_deleted_images); |
| 1138 | if (GetFormatType(dst_info.format) != SurfaceType::ColorTexture) { | 1138 | const ImageBase& src_image = slot_images[src_id]; |
| 1139 | // Make sure the images are depth and/or stencil textures. | 1139 | const ImageBase& dst_image = slot_images[dst_id]; |
| 1140 | if (GetFormatType(dst_info.format) != GetFormatType(dst_image.info.format) || | ||
| 1141 | GetFormatType(src_info.format) != GetFormatType(src_image.info.format)) { | ||
| 1142 | // Make sure the images match the expected format. | ||
| 1140 | do { | 1143 | do { |
| 1141 | has_deleted_images = false; | 1144 | has_deleted_images = false; |
| 1142 | src_id = FindOrInsertImage(src_info, src_addr, RelaxedOptions{}); | 1145 | src_id = FindOrInsertImage(src_info, src_addr, RelaxedOptions{}); |