mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-11-25 11:35:12 +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.
28 lines
No EOL
804 B
C#
28 lines
No EOL
804 B
C#
namespace Ryujinx.Graphics.Shader
|
|
{
|
|
public enum InputTopology : byte
|
|
{
|
|
Points,
|
|
Lines,
|
|
LinesAdjacency,
|
|
Triangles,
|
|
TrianglesAdjacency
|
|
}
|
|
|
|
static class InputTopologyExtensions
|
|
{
|
|
public static string ToGlslString(this InputTopology topology)
|
|
{
|
|
switch (topology)
|
|
{
|
|
case InputTopology.Points: return "points";
|
|
case InputTopology.Lines: return "lines";
|
|
case InputTopology.LinesAdjacency: return "lines_adjacency";
|
|
case InputTopology.Triangles: return "triangles";
|
|
case InputTopology.TrianglesAdjacency: return "triangles_adjacency";
|
|
}
|
|
|
|
return "points";
|
|
}
|
|
}
|
|
} |