diff options
Diffstat (limited to 'Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs')
-rw-r--r-- | Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs b/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs index ce79f3b8..9d8e64bf 100644 --- a/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs +++ b/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs @@ -64,7 +64,7 @@ namespace Ryujinx.Graphics.Shader.StructuredIr context.LeaveFunction(); } - if (config.TransformFeedbackEnabled) + if (config.TransformFeedbackEnabled && config.LastInVertexPipeline) { for (int tfbIndex = 0; tfbIndex < 4; tfbIndex++) { @@ -89,6 +89,18 @@ namespace Ryujinx.Graphics.Shader.StructuredIr { Instruction inst = operation.Inst; + if (inst == Instruction.LoadAttribute) + { + Operand src1 = operation.GetSource(0); + Operand src2 = operation.GetSource(1); + + if (src1.Type == OperandType.Constant && src2.Type == OperandType.Constant) + { + int attrOffset = (src1.Value & AttributeConsts.Mask) + (src2.Value << 2); + context.Info.Inputs.Add(attrOffset); + } + } + int sourcesCount = operation.SourcesCount; int outDestsCount = operation.DestsCount != 0 ? operation.DestsCount - 1 : 0; @@ -232,6 +244,10 @@ namespace Ryujinx.Graphics.Shader.StructuredIr case Instruction.SwizzleAdd: context.Info.HelperFunctionsMask |= HelperFunctionsMask.SwizzleAdd; break; + case Instruction.FSIBegin: + case Instruction.FSIEnd: + context.Info.HelperFunctionsMask |= HelperFunctionsMask.FSI; + break; } } |