diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-12-04 10:20:28 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-12-04 11:26:58 +0100 |
commit | a5c212516cc4ca73807e03ab7c40e469ecabd061 (patch) | |
tree | 65c72206e9e2eb977766b401d31da95ca87c8851 /src/video_core/texture_cache | |
parent | Merge pull request #7467 from liushuyu/fix-linux-decoding (diff) | |
download | yuzu-a5c212516cc4ca73807e03ab7c40e469ecabd061.tar yuzu-a5c212516cc4ca73807e03ab7c40e469ecabd061.tar.gz yuzu-a5c212516cc4ca73807e03ab7c40e469ecabd061.tar.bz2 yuzu-a5c212516cc4ca73807e03ab7c40e469ecabd061.tar.lz yuzu-a5c212516cc4ca73807e03ab7c40e469ecabd061.tar.xz yuzu-a5c212516cc4ca73807e03ab7c40e469ecabd061.tar.zst yuzu-a5c212516cc4ca73807e03ab7c40e469ecabd061.zip |
Diffstat (limited to 'src/video_core/texture_cache')
-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( 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{}); |