diff options
Diffstat (limited to 'src/Ryujinx.Graphics.Gpu/Shader/CachedShaderProgram.cs')
-rw-r--r-- | src/Ryujinx.Graphics.Gpu/Shader/CachedShaderProgram.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/Ryujinx.Graphics.Gpu/Shader/CachedShaderProgram.cs b/src/Ryujinx.Graphics.Gpu/Shader/CachedShaderProgram.cs index ff9c39a1..600c8a98 100644 --- a/src/Ryujinx.Graphics.Gpu/Shader/CachedShaderProgram.cs +++ b/src/Ryujinx.Graphics.Gpu/Shader/CachedShaderProgram.cs @@ -15,6 +15,16 @@ namespace Ryujinx.Graphics.Gpu.Shader public IProgram HostProgram { get; } /// <summary> + /// Optional vertex shader converted to compute. + /// </summary> + public ShaderAsCompute VertexAsCompute { get; } + + /// <summary> + /// Optional geometry shader converted to compute. + /// </summary> + public ShaderAsCompute GeometryAsCompute { get; } + + /// <summary> /// GPU state used to create this version of the shader. /// </summary> public ShaderSpecializationState SpecializationState { get; } @@ -45,12 +55,25 @@ namespace Ryujinx.Graphics.Gpu.Shader Bindings = new CachedShaderBindings(shaders.Length == 1, shaders); } + public CachedShaderProgram( + IProgram hostProgram, + ShaderAsCompute vertexAsCompute, + ShaderAsCompute geometryAsCompute, + ShaderSpecializationState specializationState, + CachedShaderStage[] shaders) : this(hostProgram, specializationState, shaders) + { + VertexAsCompute = vertexAsCompute; + GeometryAsCompute = geometryAsCompute; + } + /// <summary> /// Dispose of the host shader resources. /// </summary> public void Dispose() { HostProgram.Dispose(); + VertexAsCompute?.HostProgram.Dispose(); + GeometryAsCompute?.HostProgram.Dispose(); } } } |