Refactor attribute handling on the shader generator (#4565)
* Refactor attribute handling on the shader generator * Implement gl_ViewportMask[] * Add back the Intel FrontFacing bug workaround * Fix GLSL transform feedback outputs mistmatch with fragment stage * Shader cache version bump * Fix geometry shader recognition * PR feedback * Delete GetOperandDef and GetOperandUse * Remove replacements that are no longer needed on GLSL compilation on Vulkan * Fix incorrect load for per-patch outputs * Fix build
This commit is contained in:
parent
097562bc6c
commit
9f12e50a54
56 changed files with 1967 additions and 1746 deletions
|
@ -1,5 +1,4 @@
|
|||
using Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions;
|
||||
using Ryujinx.Graphics.Shader.IntermediateRepresentation;
|
||||
using Ryujinx.Graphics.Shader.StructuredIr;
|
||||
using Ryujinx.Graphics.Shader.Translation;
|
||||
using System;
|
||||
|
@ -126,21 +125,10 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl
|
|||
}
|
||||
else if (node is AstAssignment assignment)
|
||||
{
|
||||
AggregateType dstType = OperandManager.GetNodeDestType(context, assignment.Destination);
|
||||
AggregateType srcType = OperandManager.GetNodeDestType(context, assignment.Source);
|
||||
AggregateType dstType = OperandManager.GetNodeDestType(context, assignment.Destination, isAsgDest: true);
|
||||
|
||||
string dest;
|
||||
|
||||
if (assignment.Destination is AstOperand operand && operand.Type.IsAttribute())
|
||||
{
|
||||
bool perPatch = operand.Type == OperandType.AttributePerPatch;
|
||||
dest = OperandManager.GetOutAttributeName(context, operand.Value, perPatch);
|
||||
}
|
||||
else
|
||||
{
|
||||
dest = InstGen.GetExpression(context, assignment.Destination);
|
||||
}
|
||||
|
||||
string dest = InstGen.GetExpression(context, assignment.Destination);
|
||||
string src = ReinterpretCast(context, assignment.Source, srcType, dstType);
|
||||
|
||||
context.AppendLine(dest + " = " + src + ";");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue