mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-08-10 13:02:33 -07:00
Initial support for shader half float instructions (#507)
This commit is contained in:
@@ -364,6 +364,7 @@ namespace Ryujinx.Graphics.Gal.Shader
|
||||
private void PrintDeclGprs()
|
||||
{
|
||||
PrintDecls(Decl.Gprs);
|
||||
PrintDecls(Decl.GprsHalf);
|
||||
}
|
||||
|
||||
private void PrintDeclPreds()
|
||||
@@ -897,7 +898,23 @@ namespace Ryujinx.Graphics.Gal.Shader
|
||||
|
||||
private string GetName(ShaderIrOperGpr Gpr)
|
||||
{
|
||||
return Gpr.IsConst ? "0" : GetNameWithSwizzle(Decl.Gprs, Gpr.Index);
|
||||
if (Gpr.IsConst)
|
||||
{
|
||||
return "0";
|
||||
}
|
||||
|
||||
if (Gpr.RegisterSize == ShaderRegisterSize.Single)
|
||||
{
|
||||
return GetNameWithSwizzle(Decl.Gprs, Gpr.Index);
|
||||
}
|
||||
else if (Gpr.RegisterSize == ShaderRegisterSize.Half)
|
||||
{
|
||||
return GetNameWithSwizzle(Decl.GprsHalf, (Gpr.Index << 1) | Gpr.HalfPart);
|
||||
}
|
||||
else /* if (Gpr.RegisterSize == ShaderRegisterSize.Double) */
|
||||
{
|
||||
throw new NotImplementedException("Double types are not supported.");
|
||||
}
|
||||
}
|
||||
|
||||
private string GetValue(ShaderIrOperImm Imm)
|
||||
|
Reference in New Issue
Block a user