summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/video_core/texture_cache/texture_cache.h9
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{});