mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-11-16 06:23:17 +01:00
Explicit GLSL "position" attribute location (#199)
This commit is contained in:
parent
4c7c21634e
commit
edfd4bc860
@ -15,6 +15,8 @@ namespace Ryujinx.Graphics.Gal.Shader
|
|||||||
|
|
||||||
public const int GlPositionVec4Index = 7;
|
public const int GlPositionVec4Index = 7;
|
||||||
|
|
||||||
|
public const int PositionOutAttrLocation = 15;
|
||||||
|
|
||||||
private const int AttrStartIndex = 8;
|
private const int AttrStartIndex = 8;
|
||||||
private const int TexStartIndex = 8;
|
private const int TexStartIndex = 8;
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ namespace Ryujinx.Graphics.Gal.Shader
|
|||||||
{
|
{
|
||||||
if (Decl.ShaderType == GalShaderType.Fragment)
|
if (Decl.ShaderType == GalShaderType.Fragment)
|
||||||
{
|
{
|
||||||
SB.AppendLine("in vec4 " + GlslDecl.PositionOutAttrName + ";");
|
SB.AppendLine("layout (location = " + GlslDecl.PositionOutAttrLocation + ") in vec4 " + GlslDecl.PositionOutAttrName + ";");
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintDeclAttributes(Decl.InAttributes.Values, "in");
|
PrintDeclAttributes(Decl.InAttributes.Values, "in");
|
||||||
@ -218,7 +218,7 @@ namespace Ryujinx.Graphics.Gal.Shader
|
|||||||
{
|
{
|
||||||
if (Decl.ShaderType == GalShaderType.Vertex)
|
if (Decl.ShaderType == GalShaderType.Vertex)
|
||||||
{
|
{
|
||||||
SB.AppendLine("out vec4 " + GlslDecl.PositionOutAttrName + ";");
|
SB.AppendLine("layout (location = " + GlslDecl.PositionOutAttrLocation + ") out vec4 " + GlslDecl.PositionOutAttrName + ";");
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintDeclAttributes(Decl.OutAttributes.Values, "out");
|
PrintDeclAttributes(Decl.OutAttributes.Values, "out");
|
||||||
|
Loading…
Reference in New Issue
Block a user