Skip to content

Commit

Permalink
hot-fix: a fallback when overlap resolve fails
Browse files Browse the repository at this point in the history
  • Loading branch information
psucien committed Oct 16, 2024
1 parent f79b7f1 commit b4ced58
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/video_core/texture_cache/texture_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,16 @@ ImageId TextureCache::FindImage(const ImageInfo& info, FindFlags flags) {
}
}

if (image_id) {
Image& image_resoved = slot_images[image_id];

if (image_resoved.info.resources < info.resources) {
// The image was clearly picked up wrong.
FreeImage(image_id);
image_id = {};
LOG_WARNING(Render_Vulkan, "Image overlap resolve failed");
}
}
// Create and register a new image
if (!image_id) {
image_id = slot_images.insert(instance, scheduler, info);
Expand Down

0 comments on commit b4ced58

Please sign in to comment.