aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/Instructions/InstEmitHelper.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2021-12-08 17:54:12 -0300
committerGitHub <noreply@github.com>2021-12-08 17:54:12 -0300
commit650cc41c02e4b7305750e23f855cdc7ce533a1b2 (patch)
treecd4f22a5a2e039a325c5c58ff95fa133ea57977f /Ryujinx.Graphics.Shader/Instructions/InstEmitHelper.cs
parenta0aa87366c25611b1b0380e94d4edc8f9f2338e2 (diff)
Implement remaining shader double-precision instructions (#2845)
* Implement remaining shader double-precision instructions * Shader cache version bump
Diffstat (limited to 'Ryujinx.Graphics.Shader/Instructions/InstEmitHelper.cs')
-rw-r--r--Ryujinx.Graphics.Shader/Instructions/InstEmitHelper.cs15
1 files changed, 14 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Shader/Instructions/InstEmitHelper.cs b/Ryujinx.Graphics.Shader/Instructions/InstEmitHelper.cs
index 9f5bbdf7..dd6ff8e9 100644
--- a/Ryujinx.Graphics.Shader/Instructions/InstEmitHelper.cs
+++ b/Ryujinx.Graphics.Shader/Instructions/InstEmitHelper.cs
@@ -58,7 +58,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
{
if (isFP64)
{
- return context.FP32ConvertToFP64(Const(imm));
+ return context.PackDouble2x32(Const(0), Const(imm));
}
else
{
@@ -218,6 +218,19 @@ namespace Ryujinx.Graphics.Shader.Instructions
return local;
}
+ public static void SetDest(EmitterContext context, Operand value, int rd, bool isFP64)
+ {
+ if (isFP64)
+ {
+ context.Copy(GetDest(rd), context.UnpackDouble2x32Low(value));
+ context.Copy(GetDest2(rd), context.UnpackDouble2x32High(value));
+ }
+ else
+ {
+ context.Copy(GetDest(rd), value);
+ }
+ }
+
public static int Imm16ToSInt(int imm16)
{
return (short)imm16;