aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Gal/OpenGL/OGLShader.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-10-17 18:02:23 -0300
committerGitHub <noreply@github.com>2018-10-17 18:02:23 -0300
commit0e1e094b7a8f0134831fc4cebdb0841b9c10fe6a (patch)
tree81ba6446851a033f27adeafbfb94751032108047 /Ryujinx.Graphics/Gal/OpenGL/OGLShader.cs
parent02a8e7fc9369d7882db08a69d108beefb0f98677 (diff)
Improve texture tables (#457)
* Improve texture tables * More renaming and other tweaks * Minor tweaks
Diffstat (limited to 'Ryujinx.Graphics/Gal/OpenGL/OGLShader.cs')
-rw-r--r--Ryujinx.Graphics/Gal/OpenGL/OGLShader.cs21
1 files changed, 11 insertions, 10 deletions
diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLShader.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLShader.cs
index efcb7e34..b45a3a3a 100644
--- a/Ryujinx.Graphics/Gal/OpenGL/OGLShader.cs
+++ b/Ryujinx.Graphics/Gal/OpenGL/OGLShader.cs
@@ -55,16 +55,14 @@ namespace Ryujinx.Graphics.Gal.OpenGL
GlslDecompiler Decompiler = new GlslDecompiler();
+ int ShaderDumpIndex = ShaderDumper.DumpIndex;
+
if (IsDualVp)
{
ShaderDumper.Dump(Memory, Position, Type, "a");
ShaderDumper.Dump(Memory, PositionB, Type, "b");
- Program = Decompiler.Decompile(
- Memory,
- Position,
- PositionB,
- Type);
+ Program = Decompiler.Decompile(Memory, Position, PositionB, Type);
}
else
{
@@ -73,11 +71,14 @@ namespace Ryujinx.Graphics.Gal.OpenGL
Program = Decompiler.Decompile(Memory, Position, Type);
}
- return new OGLShaderStage(
- Type,
- Program.Code,
- Program.Uniforms,
- Program.Textures);
+ string Code = Program.Code;
+
+ if (ShaderDumper.IsDumpEnabled())
+ {
+ Code = "//Shader " + ShaderDumpIndex + Environment.NewLine + Code;
+ }
+
+ return new OGLShaderStage(Type, Code, Program.Uniforms, Program.Textures);
}
public IEnumerable<ShaderDeclInfo> GetConstBufferUsage(long Key)