using Ryujinx.Graphics.GAL;
using Ryujinx.Graphics.Shader;
namespace Ryujinx.Graphics.Gpu.Shader
{
///
/// Cached shader code for a single shader stage.
///
class ShaderCodeHolder
{
///
/// Shader program containing translated code.
///
public ShaderProgram Program { get; }
///
/// Shader program information.
///
public ShaderProgramInfo Info { get; }
///
/// Host shader object.
///
/// Null if the host shader program cache is in use.
public IShader HostShader { get; set; }
///
/// Maxwell binary shader code.
///
public byte[] Code { get; }
///
/// Optional maxwell binary shader code for "Vertex A" shader.
///
public byte[] Code2 { get; }
///
/// Creates a new instace of the shader code holder.
///
/// Shader program
/// Shader program information
/// Maxwell binary shader code
/// Optional binary shader code of the "Vertex A" shader, when combined with "Vertex B"
public ShaderCodeHolder(ShaderProgram program, ShaderProgramInfo info, byte[] code, byte[] code2 = null)
{
Program = program;
Info = info;
Code = code;
Code2 = code2;
}
}
}