From 34fa39eae8b801b0880b79fef512931cd8ea0567 Mon Sep 17 00:00:00 2001 From: wildcard Date: Thu, 2 Apr 2026 06:06:16 +0200 Subject: [PATCH] [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 Co-authored-by: wildcard Co-committed-by: wildcard --- src/video_core/texture_cache/texture_cache.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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

::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);