2020-11-12 23:15:34 +00:00
|
|
|
|
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;
|
|
|
|
|
|
2021-10-18 22:38:04 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Tessellation parameters (packed to fit on a byte).
|
|
|
|
|
/// </summary>
|
|
|
|
|
public byte TessellationModePacked;
|
|
|
|
|
|
2020-11-12 23:15:34 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Unused/reserved.
|
|
|
|
|
/// </summary>
|
2021-10-18 22:38:04 +01:00
|
|
|
|
public byte Reserved2;
|
2020-11-12 23:15:34 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2020-12-01 23:13:27 +00:00
|
|
|
|
/// GPU boolean state that can influence shader compilation.
|
2020-11-12 23:15:34 +00:00
|
|
|
|
/// </summary>
|
2020-12-01 23:13:27 +00:00
|
|
|
|
public GuestGpuStateFlags StateFlags;
|
2020-11-12 23:15:34 +00:00
|
|
|
|
}
|
|
|
|
|
}
|