aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2022-11-12 20:20:40 -0300
committerGitHub <noreply@github.com>2022-11-12 20:20:40 -0300
commit9daf029f356898336de1ad0c63b6c36e261e4f9b (patch)
treed8e6c2edffa5babbb1486801b081cd367cec5c4b /Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs
parent51a27032f01826e0cec56c53da4359fd2c38c8f3 (diff)
Use vector transform feedback outputs if possible (#3832)
Diffstat (limited to 'Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs')
-rw-r--r--Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs20
1 files changed, 4 insertions, 16 deletions
diff --git a/Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs b/Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs
index 418af6cb..9eb20f6f 100644
--- a/Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs
+++ b/Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs
@@ -10,12 +10,12 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
public StructuredFunction CurrentFunction { get; set; }
+ public StructuredProgramInfo Info { get; }
+
public ShaderConfig Config { get; }
public OperandManager OperandManager { get; }
- private readonly StructuredProgramInfo _info;
-
private readonly StringBuilder _sb;
private int _level;
@@ -24,7 +24,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
public CodeGenContext(StructuredProgramInfo info, ShaderConfig config)
{
- _info = info;
+ Info = info;
Config = config;
OperandManager = new OperandManager();
@@ -72,19 +72,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
public StructuredFunction GetFunction(int id)
{
- return _info.Functions[id];
- }
-
- public TransformFeedbackOutput GetTransformFeedbackOutput(int location, int component)
- {
- int index = (AttributeConsts.UserAttributeBase / 4) + location * 4 + component;
- return _info.TransformFeedbackOutputs[index];
- }
-
- public TransformFeedbackOutput GetTransformFeedbackOutput(int location)
- {
- int index = location / 4;
- return _info.TransformFeedbackOutputs[index];
+ return Info.Functions[id];
}
private void UpdateIndentation()