using Ryujinx.Graphics.Shader;
using System.Runtime.InteropServices;
namespace Ryujinx.Graphics.Gpu.Shader.Cache.Definition
{
///
/// The header of a guest shader entry in a guest shader program.
///
[StructLayout(LayoutKind.Sequential, Pack = 0x1, Size = 0x30)]
struct GuestShaderCacheEntryHeader
{
///
/// The stage of this shader.
///
public ShaderStage Stage;
///
/// Unused/reserved.
///
public byte Reserved1;
///
/// Unused/reserved.
///
public byte Reserved2;
///
/// Unused/reserved.
///
public byte Reserved3;
///
/// The size of the code section.
///
public int Size;
///
/// The size of the code2 section if present. (Vertex A)
///
public int SizeA;
///
/// Unused/reserved.
///
public int Reserved4;
///
/// The header of the cached gpu accessor.
///
public GuestGpuAccessorHeader GpuAccessorHeader;
///
/// Create a new guest shader entry header.
///
/// The stage of this shader
/// The size of the code section
/// The size of the code2 section if present (Vertex A)
/// The header of the cached gpu accessor
public GuestShaderCacheEntryHeader(ShaderStage stage, int size, int sizeA, GuestGpuAccessorHeader gpuAccessorHeader) : this()
{
Stage = stage;
Size = size;
SizeA = sizeA;
GpuAccessorHeader = gpuAccessorHeader;
}
}
}