diff options
| author | 2021-02-05 05:58:02 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:21 -0400 | |
| commit | e81739493a0cacc1efe3295f9d287d5d31b1a989 (patch) | |
| tree | 11a3d04ce9def535414a00226030798f337c053c /src/shader_recompiler/frontend/ir/opcode.inc | |
| parent | shader: Initial instruction support (diff) | |
| download | yuzu-e81739493a0cacc1efe3295f9d287d5d31b1a989.tar.gz yuzu-e81739493a0cacc1efe3295f9d287d5d31b1a989.tar.xz yuzu-e81739493a0cacc1efe3295f9d287d5d31b1a989.zip | |
shader: Constant propagation and global memory to storage buffer
Diffstat (limited to '')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/opcode.inc | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/shader_recompiler/frontend/ir/opcode.inc b/src/shader_recompiler/frontend/ir/opcode.inc index 4ecb5e936..4596bf39f 100644 --- a/src/shader_recompiler/frontend/ir/opcode.inc +++ b/src/shader_recompiler/frontend/ir/opcode.inc | |||
| @@ -24,9 +24,6 @@ OPCODE(GetAttribute, U32, Attr | |||
| 24 | OPCODE(SetAttribute, U32, Attribute, ) | 24 | OPCODE(SetAttribute, U32, Attribute, ) |
| 25 | OPCODE(GetAttributeIndexed, U32, U32, ) | 25 | OPCODE(GetAttributeIndexed, U32, U32, ) |
| 26 | OPCODE(SetAttributeIndexed, U32, U32, ) | 26 | OPCODE(SetAttributeIndexed, U32, U32, ) |
| 27 | OPCODE(GetZSCORaw, U32, ) | ||
| 28 | OPCODE(SetZSCORaw, Void, U32, ) | ||
| 29 | OPCODE(SetZSCO, Void, ZSCO, ) | ||
| 30 | OPCODE(GetZFlag, U1, Void, ) | 27 | OPCODE(GetZFlag, U1, Void, ) |
| 31 | OPCODE(GetSFlag, U1, Void, ) | 28 | OPCODE(GetSFlag, U1, Void, ) |
| 32 | OPCODE(GetCFlag, U1, Void, ) | 29 | OPCODE(GetCFlag, U1, Void, ) |
| @@ -65,6 +62,22 @@ OPCODE(WriteGlobal32, Void, U64, | |||
| 65 | OPCODE(WriteGlobal64, Void, U64, Opaque, ) | 62 | OPCODE(WriteGlobal64, Void, U64, Opaque, ) |
| 66 | OPCODE(WriteGlobal128, Void, U64, Opaque, ) | 63 | OPCODE(WriteGlobal128, Void, U64, Opaque, ) |
| 67 | 64 | ||
| 65 | // Storage buffer operations | ||
| 66 | OPCODE(LoadStorageU8, U32, U32, U32, ) | ||
| 67 | OPCODE(LoadStorageS8, U32, U32, U32, ) | ||
| 68 | OPCODE(LoadStorageU16, U32, U32, U32, ) | ||
| 69 | OPCODE(LoadStorageS16, U32, U32, U32, ) | ||
| 70 | OPCODE(LoadStorage32, U32, U32, U32, ) | ||
| 71 | OPCODE(LoadStorage64, Opaque, U32, U32, ) | ||
| 72 | OPCODE(LoadStorage128, Opaque, U32, U32, ) | ||
| 73 | OPCODE(WriteStorageU8, Void, U32, U32, U32, ) | ||
| 74 | OPCODE(WriteStorageS8, Void, U32, U32, U32, ) | ||
| 75 | OPCODE(WriteStorageU16, Void, U32, U32, U32, ) | ||
| 76 | OPCODE(WriteStorageS16, Void, U32, U32, U32, ) | ||
| 77 | OPCODE(WriteStorage32, Void, U32, U32, U32, ) | ||
| 78 | OPCODE(WriteStorage64, Void, U32, U32, Opaque, ) | ||
| 79 | OPCODE(WriteStorage128, Void, U32, U32, Opaque, ) | ||
| 80 | |||
| 68 | // Vector utility | 81 | // Vector utility |
| 69 | OPCODE(CompositeConstruct2, Opaque, Opaque, Opaque, ) | 82 | OPCODE(CompositeConstruct2, Opaque, Opaque, Opaque, ) |
| 70 | OPCODE(CompositeConstruct3, Opaque, Opaque, Opaque, Opaque, ) | 83 | OPCODE(CompositeConstruct3, Opaque, Opaque, Opaque, Opaque, ) |
| @@ -90,7 +103,6 @@ OPCODE(GetZeroFromOp, U1, Opaq | |||
| 90 | OPCODE(GetSignFromOp, U1, Opaque, ) | 103 | OPCODE(GetSignFromOp, U1, Opaque, ) |
| 91 | OPCODE(GetCarryFromOp, U1, Opaque, ) | 104 | OPCODE(GetCarryFromOp, U1, Opaque, ) |
| 92 | OPCODE(GetOverflowFromOp, U1, Opaque, ) | 105 | OPCODE(GetOverflowFromOp, U1, Opaque, ) |
| 93 | OPCODE(GetZSCOFromOp, ZSCO, Opaque, ) | ||
| 94 | 106 | ||
| 95 | // Floating-point operations | 107 | // Floating-point operations |
| 96 | OPCODE(FPAbs16, U16, U16, ) | 108 | OPCODE(FPAbs16, U16, U16, ) |
| @@ -143,6 +155,8 @@ OPCODE(FPTrunc64, U64, U64, | |||
| 143 | // Integer operations | 155 | // Integer operations |
| 144 | OPCODE(IAdd32, U32, U32, U32, ) | 156 | OPCODE(IAdd32, U32, U32, U32, ) |
| 145 | OPCODE(IAdd64, U64, U64, U64, ) | 157 | OPCODE(IAdd64, U64, U64, U64, ) |
| 158 | OPCODE(ISub32, U32, U32, U32, ) | ||
| 159 | OPCODE(ISub64, U64, U64, U64, ) | ||
| 146 | OPCODE(IMul32, U32, U32, U32, ) | 160 | OPCODE(IMul32, U32, U32, U32, ) |
| 147 | OPCODE(INeg32, U32, U32, ) | 161 | OPCODE(INeg32, U32, U32, ) |
| 148 | OPCODE(IAbs32, U32, U32, ) | 162 | OPCODE(IAbs32, U32, U32, ) |