mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-11-25 03:25:13 +00:00
48f6570557
Here come Salieri, my implementation of a disk shader cache! "I'm sure you know why I named it that." "It doesn't really mean anything." This implementation collects shaders at runtime and cache them to be later compiled when starting a game.
27 lines
No EOL
580 B
C#
27 lines
No EOL
580 B
C#
using System;
|
|
|
|
namespace Ryujinx.Graphics.Shader
|
|
{
|
|
public class ShaderProgram
|
|
{
|
|
public ShaderStage Stage { get; }
|
|
|
|
public string Code { get; private set; }
|
|
|
|
public int SizeA { get; }
|
|
public int Size { get; }
|
|
|
|
public ShaderProgram(ShaderStage stage, string code, int size, int sizeA)
|
|
{
|
|
Stage = stage;
|
|
Code = code;
|
|
SizeA = sizeA;
|
|
Size = size;
|
|
}
|
|
|
|
public void Prepend(string line)
|
|
{
|
|
Code = line + Environment.NewLine + Code;
|
|
}
|
|
}
|
|
} |