mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-09 04:09:12 +00:00
28 lines
No EOL
691 B
C#
28 lines
No EOL
691 B
C#
namespace Ryujinx.Graphics.Gal.Shader
|
|
{
|
|
class ShaderIrOperGpr : ShaderIrNode
|
|
{
|
|
public const int ZRIndex = 0xff;
|
|
|
|
public bool IsConst => Index == ZRIndex;
|
|
|
|
public bool IsValidRegister => (Index <= ZRIndex);
|
|
|
|
public int Index { get; set; }
|
|
|
|
public ShaderIrOperGpr(int Index)
|
|
{
|
|
this.Index = Index;
|
|
}
|
|
|
|
public static ShaderIrOperGpr operator+(ShaderIrOperGpr Gpr, int PlusIndex)
|
|
{
|
|
return new ShaderIrOperGpr(Gpr.Index + PlusIndex);
|
|
}
|
|
|
|
public static ShaderIrOperGpr MakeTemporary(int Index = 0)
|
|
{
|
|
return new ShaderIrOperGpr(0x100 + Index);
|
|
}
|
|
}
|
|
} |