diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2021-10-18 20:24:15 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-18 20:24:15 -0300 |
| commit | 63f1663fa959d8809d1762d99e9364565ba9b3d8 (patch) | |
| tree | 4317d6067048cbd912eed16b563b76d6b9ab6cfe /Ryujinx.Graphics.Shader/StructuredIr | |
| parent | 052deebf26beb5e62e677e8d31c2eb024beaa82f (diff) | |
Fix shader 8-bit and 16-bit STS/STG (#2741)
* Fix 8 and 16-bit STG
* Fix 8 and 16-bit STS
* Shader cache version bump
Diffstat (limited to 'Ryujinx.Graphics.Shader/StructuredIr')
3 files changed, 15 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Shader/StructuredIr/HelperFunctionsMask.cs b/Ryujinx.Graphics.Shader/StructuredIr/HelperFunctionsMask.cs index af462a7f..3dfd025b 100644 --- a/Ryujinx.Graphics.Shader/StructuredIr/HelperFunctionsMask.cs +++ b/Ryujinx.Graphics.Shader/StructuredIr/HelperFunctionsMask.cs @@ -13,6 +13,8 @@ namespace Ryujinx.Graphics.Shader.StructuredIr ShuffleDown = 1 << 5, ShuffleUp = 1 << 6, ShuffleXor = 1 << 7, - SwizzleAdd = 1 << 8 + StoreSharedSmallInt = 1 << 8, + StoreStorageSmallInt = 1 << 9, + SwizzleAdd = 1 << 10 } }
\ No newline at end of file diff --git a/Ryujinx.Graphics.Shader/StructuredIr/InstructionInfo.cs b/Ryujinx.Graphics.Shader/StructuredIr/InstructionInfo.cs index 79588778..c647f450 100644 --- a/Ryujinx.Graphics.Shader/StructuredIr/InstructionInfo.cs +++ b/Ryujinx.Graphics.Shader/StructuredIr/InstructionInfo.cs @@ -120,7 +120,11 @@ namespace Ryujinx.Graphics.Shader.StructuredIr Add(Instruction.StoreGlobal, VariableType.None, VariableType.S32, VariableType.S32, VariableType.U32); Add(Instruction.StoreLocal, VariableType.None, VariableType.S32, VariableType.U32); Add(Instruction.StoreShared, VariableType.None, VariableType.S32, VariableType.U32); + Add(Instruction.StoreShared16, VariableType.None, VariableType.S32, VariableType.U32); + Add(Instruction.StoreShared8, VariableType.None, VariableType.S32, VariableType.U32); Add(Instruction.StoreStorage, VariableType.None, VariableType.S32, VariableType.S32, VariableType.U32); + Add(Instruction.StoreStorage16, VariableType.None, VariableType.S32, VariableType.S32, VariableType.U32); + Add(Instruction.StoreStorage8, VariableType.None, VariableType.S32, VariableType.S32, VariableType.U32); Add(Instruction.Subtract, VariableType.Scalar, VariableType.Scalar, VariableType.Scalar); Add(Instruction.SwizzleAdd, VariableType.F32, VariableType.F32, VariableType.F32, VariableType.S32); Add(Instruction.TextureSample, VariableType.F32); diff --git a/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs b/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs index 4acfa80a..61cc167a 100644 --- a/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs +++ b/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs @@ -203,6 +203,14 @@ namespace Ryujinx.Graphics.Shader.StructuredIr case Instruction.ShuffleXor: context.Info.HelperFunctionsMask |= HelperFunctionsMask.ShuffleXor; break; + case Instruction.StoreShared16: + case Instruction.StoreShared8: + context.Info.HelperFunctionsMask |= HelperFunctionsMask.StoreSharedSmallInt; + break; + case Instruction.StoreStorage16: + case Instruction.StoreStorage8: + context.Info.HelperFunctionsMask |= HelperFunctionsMask.StoreStorageSmallInt; + break; case Instruction.SwizzleAdd: context.Info.HelperFunctionsMask |= HelperFunctionsMask.SwizzleAdd; break; |
