0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2024-12-24 03:55:49 +00:00
Ryujinx/Ryujinx.Graphics.GAL/Multithreading/Resources/Programs/SourceProgramRequest.cs
gdkchan 7e967d796c
Stop using glTransformFeedbackVaryings and use explicit layout on the shader (#3012)
* Stop using glTransformFeedbackVarying and use explicit layout on the shader

* This is no longer needed

* Shader cache version bump

* Fix gl_PerVertex output for tessellation control shaders
2022-01-21 12:35:21 -03:00

30 lines
770 B
C#

using System.Linq;
namespace Ryujinx.Graphics.GAL.Multithreading.Resources.Programs
{
class SourceProgramRequest : IProgramRequest
{
public ThreadedProgram Threaded { get; set; }
private IShader[] _shaders;
public SourceProgramRequest(ThreadedProgram program, IShader[] shaders)
{
Threaded = program;
_shaders = shaders;
}
public IProgram Create(IRenderer renderer)
{
IShader[] shaders = _shaders.Select(shader =>
{
var threaded = (ThreadedShader)shader;
threaded?.EnsureCreated();
return threaded?.Base;
}).ToArray();
return renderer.CreateProgram(shaders);
}
}
}