From 7e967d796cf572377f21af3817a22755c5b01cb1 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Fri, 21 Jan 2022 12:35:21 -0300 Subject: 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 --- .../StructuredIr/StructuredProgram.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs') diff --git a/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs b/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs index 61cc167a..31c71f20 100644 --- a/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs +++ b/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs @@ -64,6 +64,24 @@ namespace Ryujinx.Graphics.Shader.StructuredIr context.LeaveFunction(); } + if (config.TransformFeedbackEnabled) + { + for (int tfbIndex = 0; tfbIndex < 4; tfbIndex++) + { + var locations = config.GpuAccessor.QueryTransformFeedbackVaryingLocations(tfbIndex); + var stride = config.GpuAccessor.QueryTransformFeedbackStride(tfbIndex); + + for (int j = 0; j < locations.Length; j++) + { + byte location = locations[j]; + if (location < 0x80) + { + context.Info.TransformFeedbackOutputs[location] = new TransformFeedbackOutput(tfbIndex, j * 4, stride); + } + } + } + } + return context.Info; } -- cgit v1.2.3