2019-11-14 13:26:40 -05:00
|
|
|
using Ryujinx.Graphics.GAL;
|
|
|
|
using Ryujinx.Graphics.Shader;
|
|
|
|
|
|
|
|
namespace Ryujinx.Graphics.Gpu.Shader
|
|
|
|
{
|
2019-12-30 23:46:57 -05:00
|
|
|
/// <summary>
|
|
|
|
/// Cached shader code for a single shader stage.
|
|
|
|
/// </summary>
|
2019-11-14 13:26:40 -05:00
|
|
|
class CachedShader
|
|
|
|
{
|
2019-12-30 23:46:57 -05:00
|
|
|
/// <summary>
|
|
|
|
/// Shader program containing translated code.
|
|
|
|
/// </summary>
|
2019-11-14 13:26:40 -05:00
|
|
|
public ShaderProgram Program { get; }
|
|
|
|
|
2019-12-30 23:46:57 -05:00
|
|
|
/// <summary>
|
|
|
|
/// Host shader object.
|
|
|
|
/// </summary>
|
2019-12-31 17:09:49 -05:00
|
|
|
public IShader HostShader { get; set; }
|
2019-12-30 23:46:57 -05:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Maxwell binary shader code.
|
|
|
|
/// </summary>
|
2019-11-14 13:26:40 -05:00
|
|
|
public int[] Code { get; }
|
|
|
|
|
2019-12-30 23:46:57 -05:00
|
|
|
/// <summary>
|
|
|
|
/// Creates a new instace of the cached shader.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="program">Shader program</param>
|
|
|
|
/// <param name="code">Maxwell binary shader code</param>
|
2019-11-14 13:26:40 -05:00
|
|
|
public CachedShader(ShaderProgram program, int[] code)
|
|
|
|
{
|
|
|
|
Program = program;
|
|
|
|
Code = code;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|