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:
parent
afdeee2b86
commit
afc44850be
3 changed files with 22 additions and 10 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue