aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Gal/Shader
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2018-08-10 01:09:40 -0300
committergdkchan <gab.dark.100@gmail.com>2018-08-10 01:09:40 -0300
commit25dd5f4238d898120f2f65c4d5d5b9c192ce1e10 (patch)
tree347a58054594d9236fd9c3fa1432e0ee45b99949 /Ryujinx.Graphics/Gal/Shader
parent652238f526509ed54e1c0ba2e953097ef7b2501c (diff)
Low level graphics API prerequisites (#319)
* Add GalPipelineState and IGalPipeline * Separate UploadVertex call * Add ConstBuffer cache * Move Vertex Assembly into GalPipelineState * Move Uniform binds to GalPipelineState * Move framebuffer flip into a buffer * Rebase * Fix regression * Move clear values from VertexEndGl to ClearBuffers * Rename obscure names O->Old S->New
Diffstat (limited to 'Ryujinx.Graphics/Gal/Shader')
-rw-r--r--Ryujinx.Graphics/Gal/Shader/GlslDecl.cs1
-rw-r--r--Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs6
2 files changed, 6 insertions, 1 deletions
diff --git a/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs b/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs
index 7688545c..a0c747ba 100644
--- a/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs
+++ b/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs
@@ -35,6 +35,7 @@ namespace Ryujinx.Graphics.Gal.Shader
public const string FragmentOutputName = "FragColor";
+ public const string ExtraUniformBlockName = "Extra";
public const string FlipUniformName = "flip";
public const string ProgramName = "program";
diff --git a/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs b/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs
index 5261d677..aa1803a5 100644
--- a/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs
+++ b/Ryujinx.Graphics/Gal/Shader/GlslDecompiler.cs
@@ -220,7 +220,11 @@ namespace Ryujinx.Graphics.Gal.Shader
{
if (Decl.ShaderType == GalShaderType.Vertex)
{
- SB.AppendLine("uniform vec2 " + GlslDecl.FlipUniformName + ";");
+ SB.AppendLine("layout (std140) uniform " + GlslDecl.ExtraUniformBlockName + "{");
+
+ SB.AppendLine(IdentationStr + "vec2 " + GlslDecl.FlipUniformName + ";");
+
+ SB.AppendLine("};");
}
SB.AppendLine();