aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2022-01-21 12:35:21 -0300
committerGitHub <noreply@github.com>2022-01-21 12:35:21 -0300
commit7e967d796cf572377f21af3817a22755c5b01cb1 (patch)
tree3c05dfde7d6ddfa97b667649afa744a2eb25432f /Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs
parent0e59573f2b55420c2c3fcfc3aaad56dba70e1492 (diff)
Stop using glTransformFeedbackVaryings and use explicit layout on the shader (#3012)
* Stop using glTransformFeedbackVarying and use explicit layout on the shader * This is no longer needed * Shader cache version bump * Fix gl_PerVertex output for tessellation control shaders
Diffstat (limited to 'Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs')
-rw-r--r--Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs b/Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs
index f0f8ea35..b4823019 100644
--- a/Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs
+++ b/Ryujinx.Graphics.Shader/CodeGen/Glsl/CodeGenContext.cs
@@ -103,6 +103,18 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
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];
+ }
+
private void UpdateIndentation()
{
_indentation = GetIndentation(_level);