2019-11-14 19:26:40 +01:00
|
|
|
using Ryujinx.Graphics.GAL;
|
|
|
|
using Ryujinx.Graphics.Shader;
|
|
|
|
|
|
|
|
namespace Ryujinx.Graphics.Gpu.Shader
|
|
|
|
{
|
2019-12-31 05:46:57 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Cached shader code for a single shader stage.
|
|
|
|
/// </summary>
|
2019-11-14 19:26:40 +01:00
|
|
|
class CachedShader
|
|
|
|
{
|
2019-12-31 05:46:57 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Shader program containing translated code.
|
|
|
|
/// </summary>
|
2019-11-14 19:26:40 +01:00
|
|
|
public ShaderProgram Program { get; }
|
|
|
|
|
2019-12-31 05:46:57 +01:00
|
|
|
/// <summary>
|
|
|
|
/// Host shader object.
|
|
|
|
/// </summary>
|
2019-12-31 23:09:49 +01:00
|
|
|
public IShader HostShader { get; set; }
|
2019-12-31 05:46:57 +01:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Maxwell binary shader code.
|
|
|
|
/// </summary>
|
2019-11-14 19:26:40 +01:00
|
|
|
public int[] Code { get; }
|
|
|
|
|
2019-12-31 05:46:57 +01: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 19:26:40 +01:00
|
|
|
public CachedShader(ShaderProgram program, int[] code)
|
|
|
|
{
|
|
|
|
Program = program;
|
|
|
|
Code = code;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|