Browse Source

[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>
remotes/1775213587785305160/master
wildcard 1 week ago
committed by crueter
parent
commit
34fa39eae8
No known key found for this signature in database GPG Key ID: 425ACD2D4830EBC6
  1. 4
      src/video_core/texture_cache/texture_cache.h

4
src/video_core/texture_cache/texture_cache.h

@ -2733,7 +2733,9 @@ void TextureCache<P>::PrepareImage(ImageId image_id, bool is_modification, bool
} }
} else { } else {
RefreshContents(image, image_id); RefreshContents(image, image_id);
SynchronizeAliases(image_id);
if (!image.aliased_images.empty()) {
SynchronizeAliases(image_id);
}
} }
if (is_modification) { if (is_modification) {
MarkModification(image); MarkModification(image);

Loading…
Cancel
Save