Use concrete types when possible for improved performance
This commit is contained in:
@@ -379,8 +379,8 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
|
||||
/// <param name="hash">Code and constant buffer data hash</param>
|
||||
/// <returns>Entry index</returns>
|
||||
private int WriteNewEntry(
|
||||
Stream tocFileStream,
|
||||
Stream dataFileStream,
|
||||
FileStream tocFileStream,
|
||||
FileStream dataFileStream,
|
||||
ref TocHeader header,
|
||||
ReadOnlySpan<byte> data,
|
||||
ReadOnlySpan<byte> cb1Data,
|
||||
|
||||
@@ -746,7 +746,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
|
||||
/// <param name="magic">Magic value to be written</param>
|
||||
/// <param name="codegenVersion">Shader codegen version, only valid for the host file</param>
|
||||
/// <param name="timestamp">File creation timestamp</param>
|
||||
private static void CreateToc(Stream tocFileStream, ref TocHeader header, uint magic, uint codegenVersion, ulong timestamp)
|
||||
private static void CreateToc(FileStream tocFileStream, ref TocHeader header, uint magic, uint codegenVersion, ulong timestamp)
|
||||
{
|
||||
BinarySerializer writer = new(tocFileStream);
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Microsoft.IO;
|
||||
using Ryujinx.Common;
|
||||
using Ryujinx.Common.Memory;
|
||||
using Ryujinx.Graphics.GAL;
|
||||
@@ -12,7 +13,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
|
||||
{
|
||||
public static byte[] Pack(ShaderSource[] sources)
|
||||
{
|
||||
using MemoryStream output = MemoryStreamManager.Shared.GetStream();
|
||||
using RecyclableMemoryStream output = MemoryStreamManager.Shared.GetStream();
|
||||
|
||||
output.Write(sources.Length);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user