diff options
| author | 2023-04-22 14:02:10 +0100 | |
|---|---|---|
| committer | 2023-04-22 14:02:10 +0100 | |
| commit | 3346de365ae69c9a8ce4544a0926762738b00d34 (patch) | |
| tree | e2293126917c5bc896a65a6e847c8894df667ff7 | |
| parent | Merge pull request #10057 from liamwhite/its-not-in-the-timeline (diff) | |
| download | yuzu-3346de365ae69c9a8ce4544a0926762738b00d34.tar.gz yuzu-3346de365ae69c9a8ce4544a0926762738b00d34.tar.xz yuzu-3346de365ae69c9a8ce4544a0926762738b00d34.zip | |
Sort overlap_ids by modification tick before copy
| -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 ed5c768d8..a1c2cc1d8 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h | |||
| @@ -1294,6 +1294,12 @@ ImageId TextureCache<P>::JoinImages(const ImageInfo& info, GPUVAddr gpu_addr, VA | |||
| 1294 | ScaleDown(new_image); | 1294 | ScaleDown(new_image); |
| 1295 | } | 1295 | } |
| 1296 | 1296 | ||
| 1297 | std::ranges::sort(overlap_ids, [this](const ImageId lhs, const ImageId rhs) { | ||
| 1298 | const ImageBase& lhs_image = slot_images[lhs]; | ||
| 1299 | const ImageBase& rhs_image = slot_images[rhs]; | ||
| 1300 | return lhs_image.modification_tick < rhs_image.modification_tick; | ||
| 1301 | }); | ||
| 1302 | |||
| 1297 | for (const ImageId overlap_id : overlap_ids) { | 1303 | for (const ImageId overlap_id : overlap_ids) { |
| 1298 | Image& overlap = slot_images[overlap_id]; | 1304 | Image& overlap = slot_images[overlap_id]; |
| 1299 | if (True(overlap.flags & ImageFlagBits::GpuModified)) { | 1305 | if (True(overlap.flags & ImageFlagBits::GpuModified)) { |