diff options
Diffstat (limited to 'src/shader_recompiler/frontend/ir/opcode.inc')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/opcode.inc | 139 |
1 files changed, 93 insertions, 46 deletions
diff --git a/src/shader_recompiler/frontend/ir/opcode.inc b/src/shader_recompiler/frontend/ir/opcode.inc index 40759e96a..4ecb5e936 100644 --- a/src/shader_recompiler/frontend/ir/opcode.inc +++ b/src/shader_recompiler/frontend/ir/opcode.inc | |||
| @@ -35,6 +35,12 @@ OPCODE(SetZFlag, Void, U1, | |||
| 35 | OPCODE(SetSFlag, Void, U1, ) | 35 | OPCODE(SetSFlag, Void, U1, ) |
| 36 | OPCODE(SetCFlag, Void, U1, ) | 36 | OPCODE(SetCFlag, Void, U1, ) |
| 37 | OPCODE(SetOFlag, Void, U1, ) | 37 | OPCODE(SetOFlag, Void, U1, ) |
| 38 | OPCODE(WorkgroupIdX, U32, ) | ||
| 39 | OPCODE(WorkgroupIdY, U32, ) | ||
| 40 | OPCODE(WorkgroupIdZ, U32, ) | ||
| 41 | OPCODE(LocalInvocationIdX, U32, ) | ||
| 42 | OPCODE(LocalInvocationIdY, U32, ) | ||
| 43 | OPCODE(LocalInvocationIdZ, U32, ) | ||
| 38 | 44 | ||
| 39 | // Undefined | 45 | // Undefined |
| 40 | OPCODE(Undef1, U1, ) | 46 | OPCODE(Undef1, U1, ) |
| @@ -44,6 +50,13 @@ OPCODE(Undef32, U32, | |||
| 44 | OPCODE(Undef64, U64, ) | 50 | OPCODE(Undef64, U64, ) |
| 45 | 51 | ||
| 46 | // Memory operations | 52 | // Memory operations |
| 53 | OPCODE(LoadGlobalU8, U32, U64, ) | ||
| 54 | OPCODE(LoadGlobalS8, U32, U64, ) | ||
| 55 | OPCODE(LoadGlobalU16, U32, U64, ) | ||
| 56 | OPCODE(LoadGlobalS16, U32, U64, ) | ||
| 57 | OPCODE(LoadGlobal32, U32, U64, ) | ||
| 58 | OPCODE(LoadGlobal64, Opaque, U64, ) | ||
| 59 | OPCODE(LoadGlobal128, Opaque, U64, ) | ||
| 47 | OPCODE(WriteGlobalU8, Void, U64, U32, ) | 60 | OPCODE(WriteGlobalU8, Void, U64, U32, ) |
| 48 | OPCODE(WriteGlobalS8, Void, U64, U32, ) | 61 | OPCODE(WriteGlobalS8, Void, U64, U32, ) |
| 49 | OPCODE(WriteGlobalU16, Void, U64, U32, ) | 62 | OPCODE(WriteGlobalU16, Void, U64, U32, ) |
| @@ -58,6 +71,12 @@ OPCODE(CompositeConstruct3, Opaque, Opaq | |||
| 58 | OPCODE(CompositeConstruct4, Opaque, Opaque, Opaque, Opaque, Opaque, ) | 71 | OPCODE(CompositeConstruct4, Opaque, Opaque, Opaque, Opaque, Opaque, ) |
| 59 | OPCODE(CompositeExtract, Opaque, Opaque, U32, ) | 72 | OPCODE(CompositeExtract, Opaque, Opaque, U32, ) |
| 60 | 73 | ||
| 74 | // Select operations | ||
| 75 | OPCODE(Select8, U8, U1, U8, U8, ) | ||
| 76 | OPCODE(Select16, U16, U1, U16, U16, ) | ||
| 77 | OPCODE(Select32, U32, U1, U32, U32, ) | ||
| 78 | OPCODE(Select64, U64, U1, U64, U64, ) | ||
| 79 | |||
| 61 | // Bitwise conversions | 80 | // Bitwise conversions |
| 62 | OPCODE(PackUint2x32, U64, Opaque, ) | 81 | OPCODE(PackUint2x32, U64, Opaque, ) |
| 63 | OPCODE(UnpackUint2x32, Opaque, U64, ) | 82 | OPCODE(UnpackUint2x32, Opaque, U64, ) |
| @@ -74,56 +93,84 @@ OPCODE(GetOverflowFromOp, U1, Opaq | |||
| 74 | OPCODE(GetZSCOFromOp, ZSCO, Opaque, ) | 93 | OPCODE(GetZSCOFromOp, ZSCO, Opaque, ) |
| 75 | 94 | ||
| 76 | // Floating-point operations | 95 | // Floating-point operations |
| 77 | OPCODE(FPAbs16, U16, U16 ) | 96 | OPCODE(FPAbs16, U16, U16, ) |
| 78 | OPCODE(FPAbs32, U32, U32 ) | 97 | OPCODE(FPAbs32, U32, U32, ) |
| 79 | OPCODE(FPAbs64, U64, U64 ) | 98 | OPCODE(FPAbs64, U64, U64, ) |
| 80 | OPCODE(FPAdd16, U16, U16, U16 ) | 99 | OPCODE(FPAdd16, U16, U16, U16, ) |
| 81 | OPCODE(FPAdd32, U32, U32, U32 ) | 100 | OPCODE(FPAdd32, U32, U32, U32, ) |
| 82 | OPCODE(FPAdd64, U64, U64, U64 ) | 101 | OPCODE(FPAdd64, U64, U64, U64, ) |
| 83 | OPCODE(FPFma16, U16, U16, U16 ) | 102 | OPCODE(FPFma16, U16, U16, U16, U16, ) |
| 84 | OPCODE(FPFma32, U32, U32, U32 ) | 103 | OPCODE(FPFma32, U32, U32, U32, U32, ) |
| 85 | OPCODE(FPFma64, U64, U64, U64 ) | 104 | OPCODE(FPFma64, U64, U64, U64, U64, ) |
| 86 | OPCODE(FPMax32, U32, U32, U32 ) | 105 | OPCODE(FPMax32, U32, U32, U32, ) |
| 87 | OPCODE(FPMax64, U64, U64, U64 ) | 106 | OPCODE(FPMax64, U64, U64, U64, ) |
| 88 | OPCODE(FPMin32, U32, U32, U32 ) | 107 | OPCODE(FPMin32, U32, U32, U32, ) |
| 89 | OPCODE(FPMin64, U64, U64, U64 ) | 108 | OPCODE(FPMin64, U64, U64, U64, ) |
| 90 | OPCODE(FPMul16, U16, U16, U16 ) | 109 | OPCODE(FPMul16, U16, U16, U16, ) |
| 91 | OPCODE(FPMul32, U32, U32, U32 ) | 110 | OPCODE(FPMul32, U32, U32, U32, ) |
| 92 | OPCODE(FPMul64, U64, U64, U64 ) | 111 | OPCODE(FPMul64, U64, U64, U64, ) |
| 93 | OPCODE(FPNeg16, U16, U16 ) | 112 | OPCODE(FPNeg16, U16, U16, ) |
| 94 | OPCODE(FPNeg32, U32, U32 ) | 113 | OPCODE(FPNeg32, U32, U32, ) |
| 95 | OPCODE(FPNeg64, U64, U64 ) | 114 | OPCODE(FPNeg64, U64, U64, ) |
| 96 | OPCODE(FPRecip32, U32, U32 ) | 115 | OPCODE(FPRecip32, U32, U32, ) |
| 97 | OPCODE(FPRecip64, U64, U64 ) | 116 | OPCODE(FPRecip64, U64, U64, ) |
| 98 | OPCODE(FPRecipSqrt32, U32, U32 ) | 117 | OPCODE(FPRecipSqrt32, U32, U32, ) |
| 99 | OPCODE(FPRecipSqrt64, U64, U64 ) | 118 | OPCODE(FPRecipSqrt64, U64, U64, ) |
| 100 | OPCODE(FPSqrt, U32, U32 ) | 119 | OPCODE(FPSqrt, U32, U32, ) |
| 101 | OPCODE(FPSin, U32, U32 ) | 120 | OPCODE(FPSin, U32, U32, ) |
| 102 | OPCODE(FPSinNotReduced, U32, U32 ) | 121 | OPCODE(FPSinNotReduced, U32, U32, ) |
| 103 | OPCODE(FPExp2, U32, U32 ) | 122 | OPCODE(FPExp2, U32, U32, ) |
| 104 | OPCODE(FPExp2NotReduced, U32, U32 ) | 123 | OPCODE(FPExp2NotReduced, U32, U32, ) |
| 105 | OPCODE(FPCos, U32, U32 ) | 124 | OPCODE(FPCos, U32, U32, ) |
| 106 | OPCODE(FPCosNotReduced, U32, U32 ) | 125 | OPCODE(FPCosNotReduced, U32, U32, ) |
| 107 | OPCODE(FPLog2, U32, U32 ) | 126 | OPCODE(FPLog2, U32, U32, ) |
| 108 | OPCODE(FPSaturate16, U16, U16 ) | 127 | OPCODE(FPSaturate16, U16, U16, ) |
| 109 | OPCODE(FPSaturate32, U32, U32 ) | 128 | OPCODE(FPSaturate32, U32, U32, ) |
| 110 | OPCODE(FPSaturate64, U64, U64 ) | 129 | OPCODE(FPSaturate64, U64, U64, ) |
| 111 | OPCODE(FPRoundEven16, U16, U16 ) | 130 | OPCODE(FPRoundEven16, U16, U16, ) |
| 112 | OPCODE(FPRoundEven32, U32, U32 ) | 131 | OPCODE(FPRoundEven32, U32, U32, ) |
| 113 | OPCODE(FPRoundEven64, U64, U64 ) | 132 | OPCODE(FPRoundEven64, U64, U64, ) |
| 114 | OPCODE(FPFloor16, U16, U16 ) | 133 | OPCODE(FPFloor16, U16, U16, ) |
| 115 | OPCODE(FPFloor32, U32, U32 ) | 134 | OPCODE(FPFloor32, U32, U32, ) |
| 116 | OPCODE(FPFloor64, U64, U64 ) | 135 | OPCODE(FPFloor64, U64, U64, ) |
| 117 | OPCODE(FPCeil16, U16, U16 ) | 136 | OPCODE(FPCeil16, U16, U16, ) |
| 118 | OPCODE(FPCeil32, U32, U32 ) | 137 | OPCODE(FPCeil32, U32, U32, ) |
| 119 | OPCODE(FPCeil64, U64, U64 ) | 138 | OPCODE(FPCeil64, U64, U64, ) |
| 120 | OPCODE(FPTrunc16, U16, U16 ) | 139 | OPCODE(FPTrunc16, U16, U16, ) |
| 121 | OPCODE(FPTrunc32, U32, U32 ) | 140 | OPCODE(FPTrunc32, U32, U32, ) |
| 122 | OPCODE(FPTrunc64, U64, U64 ) | 141 | OPCODE(FPTrunc64, U64, U64, ) |
| 142 | |||
| 143 | // Integer operations | ||
| 144 | OPCODE(IAdd32, U32, U32, U32, ) | ||
| 145 | OPCODE(IAdd64, U64, U64, U64, ) | ||
| 146 | OPCODE(IMul32, U32, U32, U32, ) | ||
| 147 | OPCODE(INeg32, U32, U32, ) | ||
| 148 | OPCODE(IAbs32, U32, U32, ) | ||
| 149 | OPCODE(ShiftLeftLogical32, U32, U32, U32, ) | ||
| 150 | OPCODE(ShiftRightLogical32, U32, U32, U32, ) | ||
| 151 | OPCODE(ShiftRightArithmetic32, U32, U32, U32, ) | ||
| 152 | OPCODE(BitwiseAnd32, U32, U32, U32, ) | ||
| 153 | OPCODE(BitwiseOr32, U32, U32, U32, ) | ||
| 154 | OPCODE(BitwiseXor32, U32, U32, U32, ) | ||
| 155 | OPCODE(BitFieldInsert, U32, U32, U32, U32, U32, ) | ||
| 156 | OPCODE(BitFieldSExtract, U32, U32, U32, U32, ) | ||
| 157 | OPCODE(BitFieldUExtract, U32, U32, U32, U32, ) | ||
| 158 | |||
| 159 | OPCODE(SLessThan, U1, U32, U32, ) | ||
| 160 | OPCODE(ULessThan, U1, U32, U32, ) | ||
| 161 | OPCODE(IEqual, U1, U32, U32, ) | ||
| 162 | OPCODE(SLessThanEqual, U1, U32, U32, ) | ||
| 163 | OPCODE(ULessThanEqual, U1, U32, U32, ) | ||
| 164 | OPCODE(SGreaterThan, U1, U32, U32, ) | ||
| 165 | OPCODE(UGreaterThan, U1, U32, U32, ) | ||
| 166 | OPCODE(INotEqual, U1, U32, U32, ) | ||
| 167 | OPCODE(SGreaterThanEqual, U1, U32, U32, ) | ||
| 168 | OPCODE(UGreaterThanEqual, U1, U32, U32, ) | ||
| 123 | 169 | ||
| 124 | // Logical operations | 170 | // Logical operations |
| 125 | OPCODE(LogicalOr, U1, U1, U1, ) | 171 | OPCODE(LogicalOr, U1, U1, U1, ) |
| 126 | OPCODE(LogicalAnd, U1, U1, U1, ) | 172 | OPCODE(LogicalAnd, U1, U1, U1, ) |
| 173 | OPCODE(LogicalXor, U1, U1, U1, ) | ||
| 127 | OPCODE(LogicalNot, U1, U1, ) | 174 | OPCODE(LogicalNot, U1, U1, ) |
| 128 | 175 | ||
| 129 | // Conversion operations | 176 | // Conversion operations |