mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-08 08:48:42 +00:00
48f6570557
Here come Salieri, my implementation of a disk shader cache! "I'm sure you know why I named it that." "It doesn't really mean anything." This implementation collects shaders at runtime and cache them to be later compiled when starting a game.
63 lines
1.6 KiB
C#
63 lines
1.6 KiB
C#
using Ryujinx.Graphics.Shader;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace Ryujinx.Graphics.Gpu.Shader.Cache.Definition
|
|
{
|
|
/// <summary>
|
|
/// Header of a cached guest gpu accessor.
|
|
/// </summary>
|
|
[StructLayout(LayoutKind.Sequential, Size = 0x20, Pack = 1)]
|
|
struct GuestGpuAccessorHeader
|
|
{
|
|
/// <summary>
|
|
/// The count of texture descriptors.
|
|
/// </summary>
|
|
public int TextureDescriptorCount;
|
|
|
|
/// <summary>
|
|
/// Local Size X for compute shaders.
|
|
/// </summary>
|
|
public int ComputeLocalSizeX;
|
|
|
|
/// <summary>
|
|
/// Local Size Y for compute shaders.
|
|
/// </summary>
|
|
public int ComputeLocalSizeY;
|
|
|
|
/// <summary>
|
|
/// Local Size Z for compute shaders.
|
|
/// </summary>
|
|
public int ComputeLocalSizeZ;
|
|
|
|
/// <summary>
|
|
/// Local Memory size in bytes for compute shaders.
|
|
/// </summary>
|
|
public int ComputeLocalMemorySize;
|
|
|
|
/// <summary>
|
|
/// Shared Memory size in bytes for compute shaders.
|
|
/// </summary>
|
|
public int ComputeSharedMemorySize;
|
|
|
|
/// <summary>
|
|
/// Unused/reserved.
|
|
/// </summary>
|
|
public int Reserved1;
|
|
|
|
/// <summary>
|
|
/// Current primitive topology for geometry shaders.
|
|
/// </summary>
|
|
public InputTopology PrimitiveTopology;
|
|
|
|
/// <summary>
|
|
/// Unused/reserved.
|
|
/// </summary>
|
|
public ushort Reserved2;
|
|
|
|
/// <summary>
|
|
/// Unused/reserved.
|
|
/// </summary>
|
|
public byte Reserved3;
|
|
}
|
|
}
|