mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-08-01 10:39:50 -06:00
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:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user