diff --git a/Ryujinx.Graphics/ResourcePool.cs b/Ryujinx.Graphics/ResourcePool.cs index 0eb306eaee..44e475b67a 100644 --- a/Ryujinx.Graphics/ResourcePool.cs +++ b/Ryujinx.Graphics/ResourcePool.cs @@ -121,11 +121,16 @@ namespace Ryujinx.Graphics private LinkedList GetOrAddEntry(TKey Params) { - foreach ((TKey MyParams, LinkedList Resources) in Entries) + foreach ((TKey MyParams, LinkedList Resources) Tuple in Entries) { - if (MyParams.IsCompatible(Params)) + if (Tuple.MyParams.IsCompatible(Params)) { - return Resources; + //Move accessed siblings to the top of the list, for faster access in the future + Entries.Remove(Tuple); + + Entries.AddFirst(Tuple); + + return Tuple.Resources; } }