aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/texture_cache
diff options
context:
space:
mode:
authorwildcard <wildcard@eden-emu.dev>2026-04-02 06:06:16 +0200
committercrueter <crueter@eden-emu.dev>2026-04-02 06:06:16 +0200
commit34fa39eae8b801b0880b79fef512931cd8ea0567 (patch)
tree83ec13f15bb74b135eb63020a549ae816c060064 /src/video_core/texture_cache
parent9ace6742d7ee764c6a5bc38b21fff7cf874f4f1f (diff)
[texture_cache] Skip alias synchronization in texture cache when the image has no aliases. (#3740)
PrepareImage() is on a very hot path and previously called SynchronizeAliases() unconditionally. For most images, aliased_images` is empty, so this created unnecessary overhead, now we only synchronize only when image requires it Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3740 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: wildcard <wildcard@eden-emu.dev> Co-committed-by: wildcard <wildcard@eden-emu.dev>
Diffstat (limited to 'src/video_core/texture_cache')
-rw-r--r--src/video_core/texture_cache/texture_cache.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 71210ffe6e..efae825885 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -2733,7 +2733,9 @@ void TextureCache<P>::PrepareImage(ImageId image_id, bool is_modification, bool
}
} else {
RefreshContents(image, image_id);
- SynchronizeAliases(image_id);
+ if (!image.aliased_images.empty()) {
+ SynchronizeAliases(image_id);
+ }
}
if (is_modification) {
MarkModification(image);