diff options
author | gdkchan <gab.dark.100@gmail.com> | 2023-05-26 15:19:37 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-26 15:19:37 -0300 |
commit | 3b375525fbaded422fb2f9a9984a5770a3779fcb (patch) | |
tree | 432cd22c8f445ece592f8a8fbeb4fdef01c95390 /src/Ryujinx.Graphics.Shader/StructuredIr/AstOperation.cs | |
parent | e6658c133ca8bef4a6612d6feabfc6180f0c8318 (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/AstOperation.cs')
-rw-r--r-- | src/Ryujinx.Graphics.Shader/StructuredIr/AstOperation.cs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/Ryujinx.Graphics.Shader/StructuredIr/AstOperation.cs b/src/Ryujinx.Graphics.Shader/StructuredIr/AstOperation.cs index 2393fd8d..4cf729d0 100644 --- a/src/Ryujinx.Graphics.Shader/StructuredIr/AstOperation.cs +++ b/src/Ryujinx.Graphics.Shader/StructuredIr/AstOperation.cs @@ -10,6 +10,7 @@ namespace Ryujinx.Graphics.Shader.StructuredIr { public Instruction Inst { get; } public StorageKind StorageKind { get; } + public bool ForcePrecise { get; } public int Index { get; } @@ -17,10 +18,11 @@ namespace Ryujinx.Graphics.Shader.StructuredIr public int SourcesCount => _sources.Length; - public AstOperation(Instruction inst, StorageKind storageKind, IAstNode[] sources, int sourcesCount) + public AstOperation(Instruction inst, StorageKind storageKind, bool forcePrecise, IAstNode[] sources, int sourcesCount) { Inst = inst; StorageKind = storageKind; + ForcePrecise = forcePrecise; _sources = sources; for (int index = 0; index < sources.Length; index++) @@ -38,12 +40,18 @@ namespace Ryujinx.Graphics.Shader.StructuredIr Index = 0; } - public AstOperation(Instruction inst, StorageKind storageKind, int index, IAstNode[] sources, int sourcesCount) : this(inst, storageKind, sources, sourcesCount) + public AstOperation( + Instruction inst, + StorageKind storageKind, + bool forcePrecise, + int index, + IAstNode[] sources, + int sourcesCount) : this(inst, storageKind, forcePrecise, sources, sourcesCount) { Index = index; } - public AstOperation(Instruction inst, params IAstNode[] sources) : this(inst, StorageKind.None, sources, sources.Length) + public AstOperation(Instruction inst, params IAstNode[] sources) : this(inst, StorageKind.None, false, sources, sources.Length) { } |