Initial support for shader half float instructions (#507)
This commit is contained in:
parent
c81abdde4c
commit
e10ff17e2d
9 changed files with 244 additions and 65 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue