From fb07406f102eaa2d237c95c35e8853680d902b6a Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 18 Jan 2026 12:59:25 +0100 Subject: VideoCommon: Defer creating TextureInfo TextureCacheBase::LoadImpl has a hot path where the passed-in TextureInfo never gets used. Instead of passing in a TextureInfo, let's pass in the stage and create the TextureInfo from the stage if needed. This unlocks somewhere above an additional 4% performance boost in the Hoth level of Rogue Squadron 2 on my PC. Performance varies, making it difficult for me to measure, so treat this as a very approximate number. --- Source/Core/VideoCommon/TextureCacheBase.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoCommon/TextureCacheBase.h') diff --git a/Source/Core/VideoCommon/TextureCacheBase.h b/Source/Core/VideoCommon/TextureCacheBase.h index 9a95400679..1aa67dede5 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.h +++ b/Source/Core/VideoCommon/TextureCacheBase.h @@ -277,7 +277,7 @@ public: void Invalidate(); void ReleaseToPool(TCacheEntry* entry); - TCacheEntry* Load(const TextureInfo& texture_info); + TCacheEntry* Load(u32 stage); RcTcacheEntry GetTexture(const int textureCacheSafetyColorSampleSize, const TextureInfo& texture_info); RcTcacheEntry GetXFBTexture(u32 address, u32 width, u32 height, u32 stride, @@ -346,7 +346,7 @@ private: static bool DidLinkedAssetsChange(const TCacheEntry& entry); - TCacheEntry* LoadImpl(const TextureInfo& texture_info, bool force_reload); + TCacheEntry* LoadImpl(u32 stage, bool force_reload); bool CreateUtilityTextures(); -- cgit v1.2.3