Compare commits

..

2 Commits

Author SHA1 Message Date
6575952432 Vulkan: Enumerate Query Pool properly (#6167)
Turns out that ElementAt for Queue<T> runs the default implementation as it doesn't implement IList, which enumerates elements of the queue up to the given index. This code was creating `count` enumerators and iterating way more queue items than it needed to at higher counts. The solution is just to use one enumerator and break out of the loop when we get the count that we need.

3.5% of backend time was being spent _just_ enumerating at the usual spot in SMO.
2024-01-24 19:33:52 -03:00
9a28ba72b1 Use unix timestamps on GetFileTimeStampRaw (#6169) 2024-01-24 19:26:59 -03:00
2 changed files with 17 additions and 3 deletions

View File

@ -67,9 +67,18 @@ namespace Ryujinx.Graphics.Vulkan.Queries
lock (_queryPool)
{
count = Math.Min(count, _queryPool.Count);
for (int i = 0; i < count; i++)
if (count > 0)
{
_queryPool.ElementAt(i).PoolReset(cmd, ResetSequence);
foreach (BufferedQuery query in _queryPool)
{
query.PoolReset(cmd, ResetSequence);
if (--count == 0)
{
break;
}
}
}
}
}

View File

@ -186,7 +186,12 @@ namespace Ryujinx.HLE.FileSystem
public void InitializeFsServer(LibHac.Horizon horizon, out HorizonClient fsServerClient)
{
LocalFileSystem serverBaseFs = new(AppDataManager.BaseDirPath);
LocalFileSystem serverBaseFs = new(useUnixTimeStamps: true);
Result result = serverBaseFs.Initialize(AppDataManager.BaseDirPath, LocalFileSystem.PathMode.DefaultCaseSensitivity, ensurePathExists: true);
if (result.IsFailure())
{
throw new HorizonResultException(result, "Error creating LocalFileSystem.");
}
fsServerClient = horizon.CreatePrivilegedHorizonClient();
var fsServer = new FileSystemServer(fsServerClient);