Implement VMAD shader instruction and improve InvocationInfo and ISBERD handling (#3251)
* Implement VMAD shader instruction and improve InvocationInfo and ISBERD handling * Shader cache version bump * Fix typo
This commit is contained in:
parent
3139a85a2b
commit
e44a43c7e1
9 changed files with 171 additions and 61 deletions
|
@ -13,16 +13,28 @@ namespace Ryujinx.Graphics.Shader
|
|||
{
|
||||
public static string ToGlslString(this InputTopology topology)
|
||||
{
|
||||
switch (topology)
|
||||
return topology switch
|
||||
{
|
||||
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";
|
||||
}
|
||||
InputTopology.Points => "points",
|
||||
InputTopology.Lines => "lines",
|
||||
InputTopology.LinesAdjacency => "lines_adjacency",
|
||||
InputTopology.Triangles => "triangles",
|
||||
InputTopology.TrianglesAdjacency => "triangles_adjacency",
|
||||
_ => "points"
|
||||
};
|
||||
}
|
||||
|
||||
return "points";
|
||||
public static int ToInputVertices(this InputTopology topology)
|
||||
{
|
||||
return topology switch
|
||||
{
|
||||
InputTopology.Points => 1,
|
||||
InputTopology.Lines or
|
||||
InputTopology.LinesAdjacency => 2,
|
||||
InputTopology.Triangles or
|
||||
InputTopology.TrianglesAdjacency => 3,
|
||||
_ => 1
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue