aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2023-05-26 15:19:37 -0300
committerGitHub <noreply@github.com>2023-05-26 15:19:37 -0300
commit3b375525fbaded422fb2f9a9984a5770a3779fcb (patch)
tree432cd22c8f445ece592f8a8fbeb4fdef01c95390 /src/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs
parente6658c133ca8bef4a6612d6feabfc6180f0c8318 (diff)
Force reciprocal operation with value biased by constant to be precise on macOS (#5110)1.1.825
* Force operations to be precise in some cases on SPIR-V * Make it a bit more strict, add comments * Shader cache version bump
Diffstat (limited to 'src/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs')
-rw-r--r--src/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs b/src/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs
index 6846245e..4405c07a 100644
--- a/src/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs
+++ b/src/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs
@@ -156,7 +156,13 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
}
else
{
- source = new AstOperation(inst, operation.StorageKind, operation.Index, sources, operation.SourcesCount);
+ source = new AstOperation(
+ inst,
+ operation.StorageKind,
+ operation.ForcePrecise,
+ operation.Index,
+ sources,
+ operation.SourcesCount);
}
AggregateType destElemType = destType;
@@ -179,7 +185,7 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
dest.VarType = destElemType;
- context.AddNode(new AstAssignment(dest, new AstOperation(Instruction.VectorExtract, StorageKind.None, new[] { destVec, index }, 2)));
+ context.AddNode(new AstAssignment(dest, new AstOperation(Instruction.VectorExtract, StorageKind.None, false, new[] { destVec, index }, 2)));
}
}
else if (operation.Dest != null)
@@ -227,7 +233,13 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
}
else if (!isCopy)
{
- source = new AstOperation(inst, operation.StorageKind, operation.Index, sources, operation.SourcesCount);
+ source = new AstOperation(
+ inst,
+ operation.StorageKind,
+ operation.ForcePrecise,
+ operation.Index,
+ sources,
+ operation.SourcesCount);
}
else
{
@@ -248,7 +260,13 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
}
else
{
- context.AddNode(new AstOperation(inst, operation.StorageKind, operation.Index, sources, operation.SourcesCount));
+ context.AddNode(new AstOperation(
+ inst,
+ operation.StorageKind,
+ operation.ForcePrecise,
+ operation.Index,
+ sources,
+ operation.SourcesCount));
}
// Those instructions needs to be emulated by using helper functions,