aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions
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/CodeGen/Glsl/Instructions
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/CodeGen/Glsl/Instructions')
-rw-r--r--Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGen.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGen.cs b/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGen.cs
index 1acac745..388285a8 100644
--- a/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGen.cs
+++ b/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGen.cs
@@ -35,8 +35,16 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
VariableType type = GetSrcVarType(operation.Inst, 0);
string srcExpr = GetSoureExpr(context, src, type);
+ string zero;
- NumberFormatter.TryFormat(0, type, out string zero);
+ if (type == VariableType.F64)
+ {
+ zero = "0.0";
+ }
+ else
+ {
+ NumberFormatter.TryFormat(0, type, out zero);
+ }
// Starting in the 496.13 NVIDIA driver, there's an issue with assigning variables to negated expressions.
// (-expr) does not work, but (0.0 - expr) does. This should be removed once the issue is resolved.