Avoid gpr overwritting on Ld_C instruction (#371)

* Avoid gpr overwritting on LD_C instruction

* Address feedback

* Ignore invalid registers
This commit is contained in:
ReinUsesLisp 2018-08-20 23:31:10 -03:00 committed by gdkchan
parent afdeee2b86
commit afc44850be
3 changed files with 22 additions and 10 deletions

View file

@ -6,11 +6,18 @@ namespace Ryujinx.Graphics.Gal.Shader
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 MakeTemporary(int Index = 0)
{
return new ShaderIrOperGpr(0x100 + Index);
}
}
}