yuzu-emu
/
yuzu
Archived
1
0
Fork 0

Sort overlap_ids by modification tick before copy

This commit is contained in:
Kelebek1 2023-04-22 14:02:10 +01:00
parent 0cfeb2e8d7
commit 3346de365a
1 changed files with 6 additions and 0 deletions

View File

@ -1294,6 +1294,12 @@ ImageId TextureCache<P>::JoinImages(const ImageInfo& info, GPUVAddr gpu_addr, VA
ScaleDown(new_image); ScaleDown(new_image);
} }
std::ranges::sort(overlap_ids, [this](const ImageId lhs, const ImageId rhs) {
const ImageBase& lhs_image = slot_images[lhs];
const ImageBase& rhs_image = slot_images[rhs];
return lhs_image.modification_tick < rhs_image.modification_tick;
});
for (const ImageId overlap_id : overlap_ids) { for (const ImageId overlap_id : overlap_ids) {
Image& overlap = slot_images[overlap_id]; Image& overlap = slot_images[overlap_id];
if (True(overlap.flags & ImageFlagBits::GpuModified)) { if (True(overlap.flags & ImageFlagBits::GpuModified)) {