Implement Geometry shaders (#280)
* Implement Geometry shaders * Add EmitVertex() and EndPrimitive() * Read output geometry data from header * Stub Vmad * Add Iadd_I32 * Stub Mov_S (S2R) * Stub Isberd * Change vertex index to gpr39 in Abuf * Add stub messages for consistency * Do not print input block when there is no attributes * Use GL_ARB_enhanced_layouts * Skip geometry shaders when there's no GL_ARB_enhanced_layouts * Address feedback * Address feedback
This commit is contained in:
parent
bdb6cbb435
commit
cd203e98f2
15 changed files with 426 additions and 48 deletions
|
@ -4,13 +4,13 @@ namespace Ryujinx.Graphics.Gal.Shader
|
|||
{
|
||||
class GlslDecl
|
||||
{
|
||||
public const int LayerAttr = 0x064;
|
||||
public const int TessCoordAttrX = 0x2f0;
|
||||
public const int TessCoordAttrY = 0x2f4;
|
||||
public const int TessCoordAttrZ = 0x2f8;
|
||||
public const int InstanceIdAttr = 0x2f8;
|
||||
public const int VertexIdAttr = 0x2fc;
|
||||
public const int FaceAttr = 0x3fc;
|
||||
public const int GlPositionWAttr = 0x7c;
|
||||
|
||||
public const int MaxUboSize = 1024;
|
||||
|
||||
|
@ -210,7 +210,8 @@ namespace Ryujinx.Graphics.Gal.Shader
|
|||
//This is a built-in input variable.
|
||||
if (Abuf.Offs == VertexIdAttr ||
|
||||
Abuf.Offs == InstanceIdAttr ||
|
||||
Abuf.Offs == FaceAttr)
|
||||
Abuf.Offs == FaceAttr ||
|
||||
Abuf.Offs == LayerAttr)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -254,6 +255,8 @@ namespace Ryujinx.Graphics.Gal.Shader
|
|||
|
||||
m_Attributes.Add(Index, DeclInfo);
|
||||
}
|
||||
|
||||
Traverse(Abuf, Abuf.Vertex);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue