aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Gal/Shader
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-11-28 21:09:44 -0200
committerGitHub <noreply@github.com>2018-11-28 21:09:44 -0200
commit59964f667c38d9d0550a3b5ef3970433493f4991 (patch)
tree92f5545ee7f8ef0fa216f7d87f94963f6530a1a7 /Ryujinx.Graphics/Gal/Shader
parent00579927e43bf55ee06ae02933c1e755fb4120eb (diff)
Add support for bigger UBOs, fix sRGB regression, small improvement t… (#503)
* Add support for bigger UBOs, fix sRGB regression, small improvement to the 2D copy engine * Break into multiple lines * Read fractions for source/step values on the 2d copy engine aswell * Use fixed point math for more speed * Fix reinterpret when texture sizes are different
Diffstat (limited to 'Ryujinx.Graphics/Gal/Shader')
-rw-r--r--Ryujinx.Graphics/Gal/Shader/GlslDecl.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs b/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs
index c837632e..f1b63a8d 100644
--- a/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs
+++ b/Ryujinx.Graphics/Gal/Shader/GlslDecl.cs
@@ -1,3 +1,4 @@
+using Ryujinx.Graphics.Gal.OpenGL;
using System;
using System.Collections.Generic;
@@ -16,8 +17,6 @@ namespace Ryujinx.Graphics.Gal.Shader
public const int VertexIdAttr = 0x2fc;
public const int FaceAttr = 0x3fc;
- public const int MaxUboSize = 1024;
-
public const int GlPositionVec4Index = 7;
public const int PositionOutAttrLocation = 15;
@@ -51,6 +50,8 @@ namespace Ryujinx.Graphics.Gal.Shader
public const string SsyStackName = "ssy_stack";
public const string SsyCursorName = "ssy_cursor";
+ public static int MaxUboSize => OGLLimit.MaxUboSize / 16;
+
private string[] StagePrefixes = new string[] { "vp", "tcp", "tep", "gp", "fp" };
private string StagePrefix;
@@ -98,8 +99,7 @@ namespace Ryujinx.Graphics.Gal.Shader
m_Preds = new Dictionary<int, ShaderDeclInfo>();
}
- public GlslDecl(ShaderIrBlock[] Blocks, GalShaderType ShaderType, ShaderHeader Header)
- : this(ShaderType)
+ public GlslDecl(ShaderIrBlock[] Blocks, GalShaderType ShaderType, ShaderHeader Header) : this(ShaderType)
{
StagePrefix = StagePrefixes[(int)ShaderType] + "_";