mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-12-04 07:47:26 +00:00
3bd357045f
* Do not allow render targets not explicitly written by the fragment shader to be modified * Shader cache version bump * Remove blank lines * Avoid redundant color mask updates * HostShaderCacheEntry can be null * Avoid more redundant glColorMask calls * nit: Mask -> Masks * Fix currentComponentMask * More efficient way to update _currentComponentMasks
32 lines
854 B
C#
32 lines
854 B
C#
using System.Linq;
|
|
|
|
namespace Ryujinx.Graphics.GAL.Multithreading.Resources.Programs
|
|
{
|
|
class SourceProgramRequest : IProgramRequest
|
|
{
|
|
public ThreadedProgram Threaded { get; set; }
|
|
|
|
private IShader[] _shaders;
|
|
private ShaderInfo _info;
|
|
|
|
public SourceProgramRequest(ThreadedProgram program, IShader[] shaders, ShaderInfo info)
|
|
{
|
|
Threaded = program;
|
|
|
|
_shaders = shaders;
|
|
_info = info;
|
|
}
|
|
|
|
public IProgram Create(IRenderer renderer)
|
|
{
|
|
IShader[] shaders = _shaders.Select(shader =>
|
|
{
|
|
var threaded = (ThreadedShader)shader;
|
|
threaded?.EnsureCreated();
|
|
return threaded?.Base;
|
|
}).ToArray();
|
|
|
|
return renderer.CreateProgram(shaders, _info);
|
|
}
|
|
}
|
|
}
|