mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-11-01 04:47:53 +00:00
Texture Cache: Fix collision with multiple overlaps of the same sparse texture.
This commit is contained in:
parent
a8a0927d42
commit
c6a9e91784
1 changed files with 6 additions and 1 deletions
|
@ -1169,8 +1169,13 @@ ImageId TextureCache<P>::JoinImages(const ImageInfo& info, GPUVAddr gpu_addr, VA
|
|||
ForEachImageInRegion(cpu_addr, size_bytes, region_check);
|
||||
const auto region_check_gpu = [&](ImageId overlap_id, ImageBase& overlap) {
|
||||
if (!overlaps_found.contains(overlap_id)) {
|
||||
if (True(overlap.flags & ImageFlagBits::Remapped)) {
|
||||
ignore_textures.insert(overlap_id);
|
||||
}
|
||||
if (overlap.gpu_addr == gpu_addr && overlap.guest_size_bytes == size_bytes) {
|
||||
ignore_textures.insert(overlap_id);
|
||||
}
|
||||
}
|
||||
};
|
||||
ForEachSparseImageInRegion(gpu_addr, size_bytes, region_check_gpu);
|
||||
const ImageId new_image_id = slot_images.insert(runtime, new_info, gpu_addr, cpu_addr);
|
||||
|
|
Loading…
Reference in a new issue