Initial support for double precision shader instructions. (#963)
* Implement DADD, DFMA and DMUL shader instructions * Rename FP to FP32 * Correct double immediate * Classic mistake
This commit is contained in:
parent
3045c1a186
commit
dc97457bf0
19 changed files with 428 additions and 184 deletions
|
@ -54,5 +54,21 @@ namespace Ryujinx.Graphics.Shader.Decoders
|
|||
|
||||
return BitConverter.Int32BitsToSingle(imm);
|
||||
}
|
||||
|
||||
public static float DecodeD20Immediate(long opCode)
|
||||
{
|
||||
long imm = opCode.Extract(20, 19);
|
||||
|
||||
bool negate = opCode.Extract(56);
|
||||
|
||||
imm <<= 44;
|
||||
|
||||
if (negate)
|
||||
{
|
||||
imm |= 1L << 63;
|
||||
}
|
||||
|
||||
return (float)BitConverter.Int64BitsToDouble(imm);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue