diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-05-07 20:09:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-07 20:09:10 +0200 |
commit | 0c5bdc7241b8af91f574ddc34194caeb4db90233 (patch) | |
tree | 2997737127294794512047e162da586ad04fa010 /src/video_core/texture_cache/texture_cache.h | |
parent | Merge pull request #10172 from Kelebek1/debug_validation_names (diff) | |
parent | Sort overlap_ids by modification tick before copy (diff) | |
download | yuzu-0c5bdc7241b8af91f574ddc34194caeb4db90233.tar yuzu-0c5bdc7241b8af91f574ddc34194caeb4db90233.tar.gz yuzu-0c5bdc7241b8af91f574ddc34194caeb4db90233.tar.bz2 yuzu-0c5bdc7241b8af91f574ddc34194caeb4db90233.tar.lz yuzu-0c5bdc7241b8af91f574ddc34194caeb4db90233.tar.xz yuzu-0c5bdc7241b8af91f574ddc34194caeb4db90233.tar.zst yuzu-0c5bdc7241b8af91f574ddc34194caeb4db90233.zip |
Diffstat (limited to 'src/video_core/texture_cache/texture_cache.h')
-rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index f335009d0..b5297e76b 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -1359,6 +1359,12 @@ ImageId TextureCache<P>::JoinImages(const ImageInfo& info, GPUVAddr gpu_addr, VA 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) { Image& overlap = slot_images[overlap_id]; if (True(overlap.flags & ImageFlagBits::GpuModified)) { |