2018-04-08 21:17:35 +02:00
|
|
|
namespace Ryujinx.Graphics.Gal.Shader
|
|
|
|
{
|
|
|
|
class ShaderIrOperGpr : ShaderIrNode
|
|
|
|
{
|
|
|
|
public const int ZRIndex = 0xff;
|
|
|
|
|
|
|
|
public bool IsConst => Index == ZRIndex;
|
|
|
|
|
2018-08-21 04:31:10 +02:00
|
|
|
public bool IsValidRegister => (Index <= ZRIndex);
|
|
|
|
|
2018-04-08 21:17:35 +02:00
|
|
|
public int Index { get; set; }
|
|
|
|
|
|
|
|
public ShaderIrOperGpr(int Index)
|
|
|
|
{
|
|
|
|
this.Index = Index;
|
|
|
|
}
|
2018-08-21 04:31:10 +02:00
|
|
|
|
|
|
|
public static ShaderIrOperGpr MakeTemporary(int Index = 0)
|
|
|
|
{
|
|
|
|
return new ShaderIrOperGpr(0x100 + Index);
|
|
|
|
}
|
2018-04-08 21:17:35 +02:00
|
|
|
}
|
|
|
|
}
|