diff options
| author | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-12-09 05:26:21 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-09 05:26:21 -0500 |
| commit | 16fa8e0b370348dfb4d9fd8f3386cdfeb47b8a52 (patch) | |
| tree | b222f9be44295648aa1c9abcf7d104b48870eaab /src/video_core/texture_cache/texture_cache.h | |
| parent | 99f773266796af6a3aebd4d7a6bb5365ccdbeea7 (diff) | |
| parent | 3b1694245fc8efafb1a72dbfbc8ee2ef9d7e17a7 (diff) | |
Merge pull request #7495 from FernandoS27/text-blit-fix-again
Texture Cache: Fix mismatching image/views on blits
Diffstat (limited to 'src/video_core/texture_cache/texture_cache.h')
| -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 565b992541..e195b1e984 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( break; } if (can_be_depth_blit) { - const ImageBase* const dst_image = src_id ? &slot_images[src_id] : nullptr; + const ImageBase* const dst_image = dst_id ? &slot_images[dst_id] : nullptr; DeduceBlitImages(dst_info, src_info, dst_image, src_image); if (GetFormatType(dst_info.format) != GetFormatType(src_info.format)) { continue; @@ -1135,8 +1135,11 @@ typename TextureCache<P>::BlitImages TextureCache<P>::GetBlitImages( dst_id = InsertImage(dst_info, dst_addr, RelaxedOptions{}); } } while (has_deleted_images); - if (GetFormatType(dst_info.format) != SurfaceType::ColorTexture) { - // Make sure the images are depth and/or stencil textures. + const ImageBase& src_image = slot_images[src_id]; + const ImageBase& dst_image = slot_images[dst_id]; + if (GetFormatType(dst_info.format) != GetFormatType(dst_image.info.format) || + GetFormatType(src_info.format) != GetFormatType(src_image.info.format)) { + // Make sure the images match the expected format. do { has_deleted_images = false; src_id = FindOrInsertImage(src_info, src_addr, RelaxedOptions{}); |
