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

@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
@ -12,6 +13,8 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
set => _dest = AssignDest(value);
}
public int DestsCount => _dest != null ? 1 : 0;
private HashSet<BasicBlock> _blocks;
private class PhiSource
@ -64,6 +67,16 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
}
}
public Operand GetDest(int index)
{
if (index != 0)
{
throw new ArgumentOutOfRangeException(nameof(index));
}
return _dest;
}
public Operand GetSource(int index)
{
return _sources[index].Operand;