texture_cache: Do not overwrite overlap hit with a miss. (#2217)

This commit is contained in:
squidbus 2025-01-24 00:23:18 -08:00 committed by GitHub
parent 74710116f6
commit d1b9a5adcc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -345,8 +345,13 @@ ImageId TextureCache::FindImage(BaseDesc& desc, FindFlags flags) {
view_slice = -1;
const auto& merged_info = image_id ? slot_images[image_id].info : info;
std::tie(image_id, view_mip, view_slice) =
auto [overlap_image_id, overlap_view_mip, overlap_view_slice] =
ResolveOverlap(merged_info, desc.type, cache_id, image_id);
if (overlap_image_id) {
image_id = overlap_image_id;
view_mip = overlap_view_mip;
view_slice = overlap_view_slice;
}
}
}