Support multiple destination operands on shader IR and shuffle predicates (#1964)

* Support multiple destination operands on shader IR and shuffle predicates

* Cache version change
This commit is contained in:
gdkchan 2021-01-27 20:59:47 -03:00 committed by GitHub
parent dcce407071
commit 4b7c7dab9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 199 additions and 79 deletions

View file

@ -77,6 +77,7 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
bool isCall = inst == Instruction.Call;
int sourcesCount = operation.SourcesCount;
int outDestsCount = operation.DestsCount != 0 ? operation.DestsCount - 1 : 0;
List<Operand> callOutOperands = new List<Operand>();
@ -93,7 +94,7 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
sourcesCount += callOutOperands.Count;
}
IAstNode[] sources = new IAstNode[sourcesCount];
IAstNode[] sources = new IAstNode[sourcesCount + outDestsCount];
for (int index = 0; index < operation.SourcesCount; index++)
{
@ -110,6 +111,15 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
callOutOperands.Clear();
}
for (int index = 0; index < outDestsCount; index++)
{
AstOperand oper = context.GetOperandDef(operation.GetDest(1 + index));
oper.VarType = InstructionInfo.GetSrcVarType(inst, sourcesCount + index);
sources[sourcesCount + index] = oper;
}
AstTextureOperation GetAstTextureOperation(TextureOperation texOp)
{
return new AstTextureOperation(