diff options
Diffstat (limited to 'src/shader_recompiler/frontend/ir/opcodes.inc')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/opcodes.inc | 569 |
1 files changed, 299 insertions, 270 deletions
diff --git a/src/shader_recompiler/frontend/ir/opcodes.inc b/src/shader_recompiler/frontend/ir/opcodes.inc index c4e72c84d..aa011fab1 100644 --- a/src/shader_recompiler/frontend/ir/opcodes.inc +++ b/src/shader_recompiler/frontend/ir/opcodes.inc | |||
| @@ -2,301 +2,330 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | // opcode name, return type, arg1 type, arg2 type, arg3 type, arg4 type, ... | 5 | // opcode name, return type, arg1 type, arg2 type, arg3 type, arg4 type, arg4 type, ... |
| 6 | OPCODE(Phi, Opaque, ) | 6 | OPCODE(Phi, Opaque, ) |
| 7 | OPCODE(Identity, Opaque, Opaque, ) | 7 | OPCODE(Identity, Opaque, Opaque, ) |
| 8 | OPCODE(Void, Void, ) | 8 | OPCODE(Void, Void, ) |
| 9 | 9 | ||
| 10 | // Control flow | 10 | // Control flow |
| 11 | OPCODE(Branch, Void, Label, ) | 11 | OPCODE(Branch, Void, Label, ) |
| 12 | OPCODE(BranchConditional, Void, U1, Label, Label, ) | 12 | OPCODE(BranchConditional, Void, U1, Label, Label, ) |
| 13 | OPCODE(LoopMerge, Void, Label, Label, ) | 13 | OPCODE(LoopMerge, Void, Label, Label, ) |
| 14 | OPCODE(SelectionMerge, Void, Label, ) | 14 | OPCODE(SelectionMerge, Void, Label, ) |
| 15 | OPCODE(Return, Void, ) | 15 | OPCODE(Return, Void, ) |
| 16 | 16 | ||
| 17 | // Context getters/setters | 17 | // Context getters/setters |
| 18 | OPCODE(GetRegister, U32, Reg, ) | 18 | OPCODE(GetRegister, U32, Reg, ) |
| 19 | OPCODE(SetRegister, Void, Reg, U32, ) | 19 | OPCODE(SetRegister, Void, Reg, U32, ) |
| 20 | OPCODE(GetPred, U1, Pred, ) | 20 | OPCODE(GetPred, U1, Pred, ) |
| 21 | OPCODE(SetPred, Void, Pred, U1, ) | 21 | OPCODE(SetPred, Void, Pred, U1, ) |
| 22 | OPCODE(GetGotoVariable, U1, U32, ) | 22 | OPCODE(GetGotoVariable, U1, U32, ) |
| 23 | OPCODE(SetGotoVariable, Void, U32, U1, ) | 23 | OPCODE(SetGotoVariable, Void, U32, U1, ) |
| 24 | OPCODE(GetCbuf, U32, U32, U32, ) | 24 | OPCODE(GetCbuf, U32, U32, U32, ) |
| 25 | OPCODE(GetAttribute, U32, Attribute, ) | 25 | OPCODE(GetAttribute, U32, Attribute, ) |
| 26 | OPCODE(SetAttribute, Void, Attribute, U32, ) | 26 | OPCODE(SetAttribute, Void, Attribute, U32, ) |
| 27 | OPCODE(GetAttributeIndexed, U32, U32, ) | 27 | OPCODE(GetAttributeIndexed, U32, U32, ) |
| 28 | OPCODE(SetAttributeIndexed, Void, U32, U32, ) | 28 | OPCODE(SetAttributeIndexed, Void, U32, U32, ) |
| 29 | OPCODE(GetZFlag, U1, Void, ) | 29 | OPCODE(GetZFlag, U1, Void, ) |
| 30 | OPCODE(GetSFlag, U1, Void, ) | 30 | OPCODE(GetSFlag, U1, Void, ) |
| 31 | OPCODE(GetCFlag, U1, Void, ) | 31 | OPCODE(GetCFlag, U1, Void, ) |
| 32 | OPCODE(GetOFlag, U1, Void, ) | 32 | OPCODE(GetOFlag, U1, Void, ) |
| 33 | OPCODE(SetZFlag, Void, U1, ) | 33 | OPCODE(SetZFlag, Void, U1, ) |
| 34 | OPCODE(SetSFlag, Void, U1, ) | 34 | OPCODE(SetSFlag, Void, U1, ) |
| 35 | OPCODE(SetCFlag, Void, U1, ) | 35 | OPCODE(SetCFlag, Void, U1, ) |
| 36 | OPCODE(SetOFlag, Void, U1, ) | 36 | OPCODE(SetOFlag, Void, U1, ) |
| 37 | OPCODE(WorkgroupId, U32x3, ) | 37 | OPCODE(WorkgroupId, U32x3, ) |
| 38 | OPCODE(LocalInvocationId, U32x3, ) | 38 | OPCODE(LocalInvocationId, U32x3, ) |
| 39 | 39 | ||
| 40 | // Undefined | 40 | // Undefined |
| 41 | OPCODE(UndefU1, U1, ) | 41 | OPCODE(UndefU1, U1, ) |
| 42 | OPCODE(UndefU8, U8, ) | 42 | OPCODE(UndefU8, U8, ) |
| 43 | OPCODE(UndefU16, U16, ) | 43 | OPCODE(UndefU16, U16, ) |
| 44 | OPCODE(UndefU32, U32, ) | 44 | OPCODE(UndefU32, U32, ) |
| 45 | OPCODE(UndefU64, U64, ) | 45 | OPCODE(UndefU64, U64, ) |
| 46 | 46 | ||
| 47 | // Memory operations | 47 | // Memory operations |
| 48 | OPCODE(LoadGlobalU8, U32, U64, ) | 48 | OPCODE(LoadGlobalU8, U32, U64, ) |
| 49 | OPCODE(LoadGlobalS8, U32, U64, ) | 49 | OPCODE(LoadGlobalS8, U32, U64, ) |
| 50 | OPCODE(LoadGlobalU16, U32, U64, ) | 50 | OPCODE(LoadGlobalU16, U32, U64, ) |
| 51 | OPCODE(LoadGlobalS16, U32, U64, ) | 51 | OPCODE(LoadGlobalS16, U32, U64, ) |
| 52 | OPCODE(LoadGlobal32, U32, U64, ) | 52 | OPCODE(LoadGlobal32, U32, U64, ) |
| 53 | OPCODE(LoadGlobal64, U32x2, U64, ) | 53 | OPCODE(LoadGlobal64, U32x2, U64, ) |
| 54 | OPCODE(LoadGlobal128, U32x4, U64, ) | 54 | OPCODE(LoadGlobal128, U32x4, U64, ) |
| 55 | OPCODE(WriteGlobalU8, Void, U64, U32, ) | 55 | OPCODE(WriteGlobalU8, Void, U64, U32, ) |
| 56 | OPCODE(WriteGlobalS8, Void, U64, U32, ) | 56 | OPCODE(WriteGlobalS8, Void, U64, U32, ) |
| 57 | OPCODE(WriteGlobalU16, Void, U64, U32, ) | 57 | OPCODE(WriteGlobalU16, Void, U64, U32, ) |
| 58 | OPCODE(WriteGlobalS16, Void, U64, U32, ) | 58 | OPCODE(WriteGlobalS16, Void, U64, U32, ) |
| 59 | OPCODE(WriteGlobal32, Void, U64, U32, ) | 59 | OPCODE(WriteGlobal32, Void, U64, U32, ) |
| 60 | OPCODE(WriteGlobal64, Void, U64, U32x2, ) | 60 | OPCODE(WriteGlobal64, Void, U64, U32x2, ) |
| 61 | OPCODE(WriteGlobal128, Void, U64, U32x4, ) | 61 | OPCODE(WriteGlobal128, Void, U64, U32x4, ) |
| 62 | 62 | ||
| 63 | // Storage buffer operations | 63 | // Storage buffer operations |
| 64 | OPCODE(LoadStorageU8, U32, U32, U32, ) | 64 | OPCODE(LoadStorageU8, U32, U32, U32, ) |
| 65 | OPCODE(LoadStorageS8, U32, U32, U32, ) | 65 | OPCODE(LoadStorageS8, U32, U32, U32, ) |
| 66 | OPCODE(LoadStorageU16, U32, U32, U32, ) | 66 | OPCODE(LoadStorageU16, U32, U32, U32, ) |
| 67 | OPCODE(LoadStorageS16, U32, U32, U32, ) | 67 | OPCODE(LoadStorageS16, U32, U32, U32, ) |
| 68 | OPCODE(LoadStorage32, U32, U32, U32, ) | 68 | OPCODE(LoadStorage32, U32, U32, U32, ) |
| 69 | OPCODE(LoadStorage64, U32x2, U32, U32, ) | 69 | OPCODE(LoadStorage64, U32x2, U32, U32, ) |
| 70 | OPCODE(LoadStorage128, U32x4, U32, U32, ) | 70 | OPCODE(LoadStorage128, U32x4, U32, U32, ) |
| 71 | OPCODE(WriteStorageU8, Void, U32, U32, U32, ) | 71 | OPCODE(WriteStorageU8, Void, U32, U32, U32, ) |
| 72 | OPCODE(WriteStorageS8, Void, U32, U32, U32, ) | 72 | OPCODE(WriteStorageS8, Void, U32, U32, U32, ) |
| 73 | OPCODE(WriteStorageU16, Void, U32, U32, U32, ) | 73 | OPCODE(WriteStorageU16, Void, U32, U32, U32, ) |
| 74 | OPCODE(WriteStorageS16, Void, U32, U32, U32, ) | 74 | OPCODE(WriteStorageS16, Void, U32, U32, U32, ) |
| 75 | OPCODE(WriteStorage32, Void, U32, U32, U32, ) | 75 | OPCODE(WriteStorage32, Void, U32, U32, U32, ) |
| 76 | OPCODE(WriteStorage64, Void, U32, U32, U32x2, ) | 76 | OPCODE(WriteStorage64, Void, U32, U32, U32x2, ) |
| 77 | OPCODE(WriteStorage128, Void, U32, U32, U32x4, ) | 77 | OPCODE(WriteStorage128, Void, U32, U32, U32x4, ) |
| 78 | 78 | ||
| 79 | // Vector utility | 79 | // Vector utility |
| 80 | OPCODE(CompositeConstructU32x2, U32x2, U32, U32, ) | 80 | OPCODE(CompositeConstructU32x2, U32x2, U32, U32, ) |
| 81 | OPCODE(CompositeConstructU32x3, U32x3, U32, U32, U32, ) | 81 | OPCODE(CompositeConstructU32x3, U32x3, U32, U32, U32, ) |
| 82 | OPCODE(CompositeConstructU32x4, U32x4, U32, U32, U32, U32, ) | 82 | OPCODE(CompositeConstructU32x4, U32x4, U32, U32, U32, U32, ) |
| 83 | OPCODE(CompositeExtractU32x2, U32, U32x2, U32, ) | 83 | OPCODE(CompositeExtractU32x2, U32, U32x2, U32, ) |
| 84 | OPCODE(CompositeExtractU32x3, U32, U32x3, U32, ) | 84 | OPCODE(CompositeExtractU32x3, U32, U32x3, U32, ) |
| 85 | OPCODE(CompositeExtractU32x4, U32, U32x4, U32, ) | 85 | OPCODE(CompositeExtractU32x4, U32, U32x4, U32, ) |
| 86 | OPCODE(CompositeInsertU32x2, U32x2, U32x2, U32, U32, ) | 86 | OPCODE(CompositeInsertU32x2, U32x2, U32x2, U32, U32, ) |
| 87 | OPCODE(CompositeInsertU32x3, U32x3, U32x3, U32, U32, ) | 87 | OPCODE(CompositeInsertU32x3, U32x3, U32x3, U32, U32, ) |
| 88 | OPCODE(CompositeInsertU32x4, U32x4, U32x4, U32, U32, ) | 88 | OPCODE(CompositeInsertU32x4, U32x4, U32x4, U32, U32, ) |
| 89 | OPCODE(CompositeConstructF16x2, F16x2, F16, F16, ) | 89 | OPCODE(CompositeConstructF16x2, F16x2, F16, F16, ) |
| 90 | OPCODE(CompositeConstructF16x3, F16x3, F16, F16, F16, ) | 90 | OPCODE(CompositeConstructF16x3, F16x3, F16, F16, F16, ) |
| 91 | OPCODE(CompositeConstructF16x4, F16x4, F16, F16, F16, F16, ) | 91 | OPCODE(CompositeConstructF16x4, F16x4, F16, F16, F16, F16, ) |
| 92 | OPCODE(CompositeExtractF16x2, F16, F16x2, U32, ) | 92 | OPCODE(CompositeExtractF16x2, F16, F16x2, U32, ) |
| 93 | OPCODE(CompositeExtractF16x3, F16, F16x3, U32, ) | 93 | OPCODE(CompositeExtractF16x3, F16, F16x3, U32, ) |
| 94 | OPCODE(CompositeExtractF16x4, F16, F16x4, U32, ) | 94 | OPCODE(CompositeExtractF16x4, F16, F16x4, U32, ) |
| 95 | OPCODE(CompositeInsertF16x2, F16x2, F16x2, F16, U32, ) | 95 | OPCODE(CompositeInsertF16x2, F16x2, F16x2, F16, U32, ) |
| 96 | OPCODE(CompositeInsertF16x3, F16x3, F16x3, F16, U32, ) | 96 | OPCODE(CompositeInsertF16x3, F16x3, F16x3, F16, U32, ) |
| 97 | OPCODE(CompositeInsertF16x4, F16x4, F16x4, F16, U32, ) | 97 | OPCODE(CompositeInsertF16x4, F16x4, F16x4, F16, U32, ) |
| 98 | OPCODE(CompositeConstructF32x2, F32x2, F32, F32, ) | 98 | OPCODE(CompositeConstructF32x2, F32x2, F32, F32, ) |
| 99 | OPCODE(CompositeConstructF32x3, F32x3, F32, F32, F32, ) | 99 | OPCODE(CompositeConstructF32x3, F32x3, F32, F32, F32, ) |
| 100 | OPCODE(CompositeConstructF32x4, F32x4, F32, F32, F32, F32, ) | 100 | OPCODE(CompositeConstructF32x4, F32x4, F32, F32, F32, F32, ) |
| 101 | OPCODE(CompositeExtractF32x2, F32, F32x2, U32, ) | 101 | OPCODE(CompositeExtractF32x2, F32, F32x2, U32, ) |
| 102 | OPCODE(CompositeExtractF32x3, F32, F32x3, U32, ) | 102 | OPCODE(CompositeExtractF32x3, F32, F32x3, U32, ) |
| 103 | OPCODE(CompositeExtractF32x4, F32, F32x4, U32, ) | 103 | OPCODE(CompositeExtractF32x4, F32, F32x4, U32, ) |
| 104 | OPCODE(CompositeInsertF32x2, F32x2, F32x2, F32, U32, ) | 104 | OPCODE(CompositeInsertF32x2, F32x2, F32x2, F32, U32, ) |
| 105 | OPCODE(CompositeInsertF32x3, F32x3, F32x3, F32, U32, ) | 105 | OPCODE(CompositeInsertF32x3, F32x3, F32x3, F32, U32, ) |
| 106 | OPCODE(CompositeInsertF32x4, F32x4, F32x4, F32, U32, ) | 106 | OPCODE(CompositeInsertF32x4, F32x4, F32x4, F32, U32, ) |
| 107 | OPCODE(CompositeConstructF64x2, F64x2, F64, F64, ) | 107 | OPCODE(CompositeConstructF64x2, F64x2, F64, F64, ) |
| 108 | OPCODE(CompositeConstructF64x3, F64x3, F64, F64, F64, ) | 108 | OPCODE(CompositeConstructF64x3, F64x3, F64, F64, F64, ) |
| 109 | OPCODE(CompositeConstructF64x4, F64x4, F64, F64, F64, F64, ) | 109 | OPCODE(CompositeConstructF64x4, F64x4, F64, F64, F64, F64, ) |
| 110 | OPCODE(CompositeExtractF64x2, F64, F64x2, U32, ) | 110 | OPCODE(CompositeExtractF64x2, F64, F64x2, U32, ) |
| 111 | OPCODE(CompositeExtractF64x3, F64, F64x3, U32, ) | 111 | OPCODE(CompositeExtractF64x3, F64, F64x3, U32, ) |
| 112 | OPCODE(CompositeExtractF64x4, F64, F64x4, U32, ) | 112 | OPCODE(CompositeExtractF64x4, F64, F64x4, U32, ) |
| 113 | OPCODE(CompositeInsertF64x2, F64x2, F64x2, F64, U32, ) | 113 | OPCODE(CompositeInsertF64x2, F64x2, F64x2, F64, U32, ) |
| 114 | OPCODE(CompositeInsertF64x3, F64x3, F64x3, F64, U32, ) | 114 | OPCODE(CompositeInsertF64x3, F64x3, F64x3, F64, U32, ) |
| 115 | OPCODE(CompositeInsertF64x4, F64x4, F64x4, F64, U32, ) | 115 | OPCODE(CompositeInsertF64x4, F64x4, F64x4, F64, U32, ) |
| 116 | 116 | ||
| 117 | // Select operations | 117 | // Select operations |
| 118 | OPCODE(SelectU1, U1, U1, U1, U1, ) | 118 | OPCODE(SelectU1, U1, U1, U1, U1, ) |
| 119 | OPCODE(SelectU8, U8, U1, U8, U8, ) | 119 | OPCODE(SelectU8, U8, U1, U8, U8, ) |
| 120 | OPCODE(SelectU16, U16, U1, U16, U16, ) | 120 | OPCODE(SelectU16, U16, U1, U16, U16, ) |
| 121 | OPCODE(SelectU32, U32, U1, U32, U32, ) | 121 | OPCODE(SelectU32, U32, U1, U32, U32, ) |
| 122 | OPCODE(SelectU64, U64, U1, U64, U64, ) | 122 | OPCODE(SelectU64, U64, U1, U64, U64, ) |
| 123 | OPCODE(SelectF16, F16, U1, F16, F16, ) | 123 | OPCODE(SelectF16, F16, U1, F16, F16, ) |
| 124 | OPCODE(SelectF32, F32, U1, F32, F32, ) | 124 | OPCODE(SelectF32, F32, U1, F32, F32, ) |
| 125 | 125 | ||
| 126 | // Bitwise conversions | 126 | // Bitwise conversions |
| 127 | OPCODE(BitCastU16F16, U16, F16, ) | 127 | OPCODE(BitCastU16F16, U16, F16, ) |
| 128 | OPCODE(BitCastU32F32, U32, F32, ) | 128 | OPCODE(BitCastU32F32, U32, F32, ) |
| 129 | OPCODE(BitCastU64F64, U64, F64, ) | 129 | OPCODE(BitCastU64F64, U64, F64, ) |
| 130 | OPCODE(BitCastF16U16, F16, U16, ) | 130 | OPCODE(BitCastF16U16, F16, U16, ) |
| 131 | OPCODE(BitCastF32U32, F32, U32, ) | 131 | OPCODE(BitCastF32U32, F32, U32, ) |
| 132 | OPCODE(BitCastF64U64, F64, U64, ) | 132 | OPCODE(BitCastF64U64, F64, U64, ) |
| 133 | OPCODE(PackUint2x32, U64, U32x2, ) | 133 | OPCODE(PackUint2x32, U64, U32x2, ) |
| 134 | OPCODE(UnpackUint2x32, U32x2, U64, ) | 134 | OPCODE(UnpackUint2x32, U32x2, U64, ) |
| 135 | OPCODE(PackFloat2x16, U32, F16x2, ) | 135 | OPCODE(PackFloat2x16, U32, F16x2, ) |
| 136 | OPCODE(UnpackFloat2x16, F16x2, U32, ) | 136 | OPCODE(UnpackFloat2x16, F16x2, U32, ) |
| 137 | OPCODE(PackHalf2x16, U32, F32x2, ) | 137 | OPCODE(PackHalf2x16, U32, F32x2, ) |
| 138 | OPCODE(UnpackHalf2x16, F32x2, U32, ) | 138 | OPCODE(UnpackHalf2x16, F32x2, U32, ) |
| 139 | OPCODE(PackDouble2x32, F64, U32x2, ) | 139 | OPCODE(PackDouble2x32, F64, U32x2, ) |
| 140 | OPCODE(UnpackDouble2x32, U32x2, F64, ) | 140 | OPCODE(UnpackDouble2x32, U32x2, F64, ) |
| 141 | 141 | ||
| 142 | // Pseudo-operation, handled specially at final emit | 142 | // Pseudo-operation, handled specially at final emit |
| 143 | OPCODE(GetZeroFromOp, U1, Opaque, ) | 143 | OPCODE(GetZeroFromOp, U1, Opaque, ) |
| 144 | OPCODE(GetSignFromOp, U1, Opaque, ) | 144 | OPCODE(GetSignFromOp, U1, Opaque, ) |
| 145 | OPCODE(GetCarryFromOp, U1, Opaque, ) | 145 | OPCODE(GetCarryFromOp, U1, Opaque, ) |
| 146 | OPCODE(GetOverflowFromOp, U1, Opaque, ) | 146 | OPCODE(GetOverflowFromOp, U1, Opaque, ) |
| 147 | OPCODE(GetSparseFromOp, U1, Opaque, ) | ||
| 147 | 148 | ||
| 148 | // Floating-point operations | 149 | // Floating-point operations |
| 149 | OPCODE(FPAbs16, F16, F16, ) | 150 | OPCODE(FPAbs16, F16, F16, ) |
| 150 | OPCODE(FPAbs32, F32, F32, ) | 151 | OPCODE(FPAbs32, F32, F32, ) |
| 151 | OPCODE(FPAbs64, F64, F64, ) | 152 | OPCODE(FPAbs64, F64, F64, ) |
| 152 | OPCODE(FPAdd16, F16, F16, F16, ) | 153 | OPCODE(FPAdd16, F16, F16, F16, ) |
| 153 | OPCODE(FPAdd32, F32, F32, F32, ) | 154 | OPCODE(FPAdd32, F32, F32, F32, ) |
| 154 | OPCODE(FPAdd64, F64, F64, F64, ) | 155 | OPCODE(FPAdd64, F64, F64, F64, ) |
| 155 | OPCODE(FPFma16, F16, F16, F16, F16, ) | 156 | OPCODE(FPFma16, F16, F16, F16, F16, ) |
| 156 | OPCODE(FPFma32, F32, F32, F32, F32, ) | 157 | OPCODE(FPFma32, F32, F32, F32, F32, ) |
| 157 | OPCODE(FPFma64, F64, F64, F64, F64, ) | 158 | OPCODE(FPFma64, F64, F64, F64, F64, ) |
| 158 | OPCODE(FPMax32, F32, F32, F32, ) | 159 | OPCODE(FPMax32, F32, F32, F32, ) |
| 159 | OPCODE(FPMax64, F64, F64, F64, ) | 160 | OPCODE(FPMax64, F64, F64, F64, ) |
| 160 | OPCODE(FPMin32, F32, F32, F32, ) | 161 | OPCODE(FPMin32, F32, F32, F32, ) |
| 161 | OPCODE(FPMin64, F64, F64, F64, ) | 162 | OPCODE(FPMin64, F64, F64, F64, ) |
| 162 | OPCODE(FPMul16, F16, F16, F16, ) | 163 | OPCODE(FPMul16, F16, F16, F16, ) |
| 163 | OPCODE(FPMul32, F32, F32, F32, ) | 164 | OPCODE(FPMul32, F32, F32, F32, ) |
| 164 | OPCODE(FPMul64, F64, F64, F64, ) | 165 | OPCODE(FPMul64, F64, F64, F64, ) |
| 165 | OPCODE(FPNeg16, F16, F16, ) | 166 | OPCODE(FPNeg16, F16, F16, ) |
| 166 | OPCODE(FPNeg32, F32, F32, ) | 167 | OPCODE(FPNeg32, F32, F32, ) |
| 167 | OPCODE(FPNeg64, F64, F64, ) | 168 | OPCODE(FPNeg64, F64, F64, ) |
| 168 | OPCODE(FPRecip32, F32, F32, ) | 169 | OPCODE(FPRecip32, F32, F32, ) |
| 169 | OPCODE(FPRecip64, F64, F64, ) | 170 | OPCODE(FPRecip64, F64, F64, ) |
| 170 | OPCODE(FPRecipSqrt32, F32, F32, ) | 171 | OPCODE(FPRecipSqrt32, F32, F32, ) |
| 171 | OPCODE(FPRecipSqrt64, F64, F64, ) | 172 | OPCODE(FPRecipSqrt64, F64, F64, ) |
| 172 | OPCODE(FPSqrt, F32, F32, ) | 173 | OPCODE(FPSqrt, F32, F32, ) |
| 173 | OPCODE(FPSin, F32, F32, ) | 174 | OPCODE(FPSin, F32, F32, ) |
| 174 | OPCODE(FPExp2, F32, F32, ) | 175 | OPCODE(FPExp2, F32, F32, ) |
| 175 | OPCODE(FPCos, F32, F32, ) | 176 | OPCODE(FPCos, F32, F32, ) |
| 176 | OPCODE(FPLog2, F32, F32, ) | 177 | OPCODE(FPLog2, F32, F32, ) |
| 177 | OPCODE(FPSaturate16, F16, F16, ) | 178 | OPCODE(FPSaturate16, F16, F16, ) |
| 178 | OPCODE(FPSaturate32, F32, F32, ) | 179 | OPCODE(FPSaturate32, F32, F32, ) |
| 179 | OPCODE(FPSaturate64, F64, F64, ) | 180 | OPCODE(FPSaturate64, F64, F64, ) |
| 180 | OPCODE(FPRoundEven16, F16, F16, ) | 181 | OPCODE(FPRoundEven16, F16, F16, ) |
| 181 | OPCODE(FPRoundEven32, F32, F32, ) | 182 | OPCODE(FPRoundEven32, F32, F32, ) |
| 182 | OPCODE(FPRoundEven64, F64, F64, ) | 183 | OPCODE(FPRoundEven64, F64, F64, ) |
| 183 | OPCODE(FPFloor16, F16, F16, ) | 184 | OPCODE(FPFloor16, F16, F16, ) |
| 184 | OPCODE(FPFloor32, F32, F32, ) | 185 | OPCODE(FPFloor32, F32, F32, ) |
| 185 | OPCODE(FPFloor64, F64, F64, ) | 186 | OPCODE(FPFloor64, F64, F64, ) |
| 186 | OPCODE(FPCeil16, F16, F16, ) | 187 | OPCODE(FPCeil16, F16, F16, ) |
| 187 | OPCODE(FPCeil32, F32, F32, ) | 188 | OPCODE(FPCeil32, F32, F32, ) |
| 188 | OPCODE(FPCeil64, F64, F64, ) | 189 | OPCODE(FPCeil64, F64, F64, ) |
| 189 | OPCODE(FPTrunc16, F16, F16, ) | 190 | OPCODE(FPTrunc16, F16, F16, ) |
| 190 | OPCODE(FPTrunc32, F32, F32, ) | 191 | OPCODE(FPTrunc32, F32, F32, ) |
| 191 | OPCODE(FPTrunc64, F64, F64, ) | 192 | OPCODE(FPTrunc64, F64, F64, ) |
| 192 | 193 | ||
| 193 | OPCODE(FPOrdEqual16, U1, F16, F16, ) | 194 | OPCODE(FPOrdEqual16, U1, F16, F16, ) |
| 194 | OPCODE(FPOrdEqual32, U1, F32, F32, ) | 195 | OPCODE(FPOrdEqual32, U1, F32, F32, ) |
| 195 | OPCODE(FPOrdEqual64, U1, F64, F64, ) | 196 | OPCODE(FPOrdEqual64, U1, F64, F64, ) |
| 196 | OPCODE(FPUnordEqual16, U1, F16, F16, ) | 197 | OPCODE(FPUnordEqual16, U1, F16, F16, ) |
| 197 | OPCODE(FPUnordEqual32, U1, F32, F32, ) | 198 | OPCODE(FPUnordEqual32, U1, F32, F32, ) |
| 198 | OPCODE(FPUnordEqual64, U1, F64, F64, ) | 199 | OPCODE(FPUnordEqual64, U1, F64, F64, ) |
| 199 | OPCODE(FPOrdNotEqual16, U1, F16, F16, ) | 200 | OPCODE(FPOrdNotEqual16, U1, F16, F16, ) |
| 200 | OPCODE(FPOrdNotEqual32, U1, F32, F32, ) | 201 | OPCODE(FPOrdNotEqual32, U1, F32, F32, ) |
| 201 | OPCODE(FPOrdNotEqual64, U1, F64, F64, ) | 202 | OPCODE(FPOrdNotEqual64, U1, F64, F64, ) |
| 202 | OPCODE(FPUnordNotEqual16, U1, F16, F16, ) | 203 | OPCODE(FPUnordNotEqual16, U1, F16, F16, ) |
| 203 | OPCODE(FPUnordNotEqual32, U1, F32, F32, ) | 204 | OPCODE(FPUnordNotEqual32, U1, F32, F32, ) |
| 204 | OPCODE(FPUnordNotEqual64, U1, F64, F64, ) | 205 | OPCODE(FPUnordNotEqual64, U1, F64, F64, ) |
| 205 | OPCODE(FPOrdLessThan16, U1, F16, F16, ) | 206 | OPCODE(FPOrdLessThan16, U1, F16, F16, ) |
| 206 | OPCODE(FPOrdLessThan32, U1, F32, F32, ) | 207 | OPCODE(FPOrdLessThan32, U1, F32, F32, ) |
| 207 | OPCODE(FPOrdLessThan64, U1, F64, F64, ) | 208 | OPCODE(FPOrdLessThan64, U1, F64, F64, ) |
| 208 | OPCODE(FPUnordLessThan16, U1, F16, F16, ) | 209 | OPCODE(FPUnordLessThan16, U1, F16, F16, ) |
| 209 | OPCODE(FPUnordLessThan32, U1, F32, F32, ) | 210 | OPCODE(FPUnordLessThan32, U1, F32, F32, ) |
| 210 | OPCODE(FPUnordLessThan64, U1, F64, F64, ) | 211 | OPCODE(FPUnordLessThan64, U1, F64, F64, ) |
| 211 | OPCODE(FPOrdGreaterThan16, U1, F16, F16, ) | 212 | OPCODE(FPOrdGreaterThan16, U1, F16, F16, ) |
| 212 | OPCODE(FPOrdGreaterThan32, U1, F32, F32, ) | 213 | OPCODE(FPOrdGreaterThan32, U1, F32, F32, ) |
| 213 | OPCODE(FPOrdGreaterThan64, U1, F64, F64, ) | 214 | OPCODE(FPOrdGreaterThan64, U1, F64, F64, ) |
| 214 | OPCODE(FPUnordGreaterThan16, U1, F16, F16, ) | 215 | OPCODE(FPUnordGreaterThan16, U1, F16, F16, ) |
| 215 | OPCODE(FPUnordGreaterThan32, U1, F32, F32, ) | 216 | OPCODE(FPUnordGreaterThan32, U1, F32, F32, ) |
| 216 | OPCODE(FPUnordGreaterThan64, U1, F64, F64, ) | 217 | OPCODE(FPUnordGreaterThan64, U1, F64, F64, ) |
| 217 | OPCODE(FPOrdLessThanEqual16, U1, F16, F16, ) | 218 | OPCODE(FPOrdLessThanEqual16, U1, F16, F16, ) |
| 218 | OPCODE(FPOrdLessThanEqual32, U1, F32, F32, ) | 219 | OPCODE(FPOrdLessThanEqual32, U1, F32, F32, ) |
| 219 | OPCODE(FPOrdLessThanEqual64, U1, F64, F64, ) | 220 | OPCODE(FPOrdLessThanEqual64, U1, F64, F64, ) |
| 220 | OPCODE(FPUnordLessThanEqual16, U1, F16, F16, ) | 221 | OPCODE(FPUnordLessThanEqual16, U1, F16, F16, ) |
| 221 | OPCODE(FPUnordLessThanEqual32, U1, F32, F32, ) | 222 | OPCODE(FPUnordLessThanEqual32, U1, F32, F32, ) |
| 222 | OPCODE(FPUnordLessThanEqual64, U1, F64, F64, ) | 223 | OPCODE(FPUnordLessThanEqual64, U1, F64, F64, ) |
| 223 | OPCODE(FPOrdGreaterThanEqual16, U1, F16, F16, ) | 224 | OPCODE(FPOrdGreaterThanEqual16, U1, F16, F16, ) |
| 224 | OPCODE(FPOrdGreaterThanEqual32, U1, F32, F32, ) | 225 | OPCODE(FPOrdGreaterThanEqual32, U1, F32, F32, ) |
| 225 | OPCODE(FPOrdGreaterThanEqual64, U1, F64, F64, ) | 226 | OPCODE(FPOrdGreaterThanEqual64, U1, F64, F64, ) |
| 226 | OPCODE(FPUnordGreaterThanEqual16, U1, F16, F16, ) | 227 | OPCODE(FPUnordGreaterThanEqual16, U1, F16, F16, ) |
| 227 | OPCODE(FPUnordGreaterThanEqual32, U1, F32, F32, ) | 228 | OPCODE(FPUnordGreaterThanEqual32, U1, F32, F32, ) |
| 228 | OPCODE(FPUnordGreaterThanEqual64, U1, F64, F64, ) | 229 | OPCODE(FPUnordGreaterThanEqual64, U1, F64, F64, ) |
| 229 | 230 | ||
| 230 | // Integer operations | 231 | // Integer operations |
| 231 | OPCODE(IAdd32, U32, U32, U32, ) | 232 | OPCODE(IAdd32, U32, U32, U32, ) |
| 232 | OPCODE(IAdd64, U64, U64, U64, ) | 233 | OPCODE(IAdd64, U64, U64, U64, ) |
| 233 | OPCODE(ISub32, U32, U32, U32, ) | 234 | OPCODE(ISub32, U32, U32, U32, ) |
| 234 | OPCODE(ISub64, U64, U64, U64, ) | 235 | OPCODE(ISub64, U64, U64, U64, ) |
| 235 | OPCODE(IMul32, U32, U32, U32, ) | 236 | OPCODE(IMul32, U32, U32, U32, ) |
| 236 | OPCODE(INeg32, U32, U32, ) | 237 | OPCODE(INeg32, U32, U32, ) |
| 237 | OPCODE(INeg64, U64, U64, ) | 238 | OPCODE(INeg64, U64, U64, ) |
| 238 | OPCODE(IAbs32, U32, U32, ) | 239 | OPCODE(IAbs32, U32, U32, ) |
| 239 | OPCODE(ShiftLeftLogical32, U32, U32, U32, ) | 240 | OPCODE(ShiftLeftLogical32, U32, U32, U32, ) |
| 240 | OPCODE(ShiftLeftLogical64, U64, U64, U32, ) | 241 | OPCODE(ShiftLeftLogical64, U64, U64, U32, ) |
| 241 | OPCODE(ShiftRightLogical32, U32, U32, U32, ) | 242 | OPCODE(ShiftRightLogical32, U32, U32, U32, ) |
| 242 | OPCODE(ShiftRightLogical64, U64, U64, U32, ) | 243 | OPCODE(ShiftRightLogical64, U64, U64, U32, ) |
| 243 | OPCODE(ShiftRightArithmetic32, U32, U32, U32, ) | 244 | OPCODE(ShiftRightArithmetic32, U32, U32, U32, ) |
| 244 | OPCODE(ShiftRightArithmetic64, U64, U64, U32, ) | 245 | OPCODE(ShiftRightArithmetic64, U64, U64, U32, ) |
| 245 | OPCODE(BitwiseAnd32, U32, U32, U32, ) | 246 | OPCODE(BitwiseAnd32, U32, U32, U32, ) |
| 246 | OPCODE(BitwiseOr32, U32, U32, U32, ) | 247 | OPCODE(BitwiseOr32, U32, U32, U32, ) |
| 247 | OPCODE(BitwiseXor32, U32, U32, U32, ) | 248 | OPCODE(BitwiseXor32, U32, U32, U32, ) |
| 248 | OPCODE(BitFieldInsert, U32, U32, U32, U32, U32, ) | 249 | OPCODE(BitFieldInsert, U32, U32, U32, U32, U32, ) |
| 249 | OPCODE(BitFieldSExtract, U32, U32, U32, U32, ) | 250 | OPCODE(BitFieldSExtract, U32, U32, U32, U32, ) |
| 250 | OPCODE(BitFieldUExtract, U32, U32, U32, U32, ) | 251 | OPCODE(BitFieldUExtract, U32, U32, U32, U32, ) |
| 251 | OPCODE(BitReverse32, U32, U32, ) | 252 | OPCODE(BitReverse32, U32, U32, ) |
| 252 | OPCODE(BitCount32, U32, U32, ) | 253 | OPCODE(BitCount32, U32, U32, ) |
| 253 | OPCODE(BitwiseNot32, U32, U32, ) | 254 | OPCODE(BitwiseNot32, U32, U32, ) |
| 254 | 255 | ||
| 255 | OPCODE(FindSMsb32, U32, U32, ) | 256 | OPCODE(FindSMsb32, U32, U32, ) |
| 256 | OPCODE(FindUMsb32, U32, U32, ) | 257 | OPCODE(FindUMsb32, U32, U32, ) |
| 257 | OPCODE(SMin32, U32, U32, U32, ) | 258 | OPCODE(SMin32, U32, U32, U32, ) |
| 258 | OPCODE(UMin32, U32, U32, U32, ) | 259 | OPCODE(UMin32, U32, U32, U32, ) |
| 259 | OPCODE(SMax32, U32, U32, U32, ) | 260 | OPCODE(SMax32, U32, U32, U32, ) |
| 260 | OPCODE(UMax32, U32, U32, U32, ) | 261 | OPCODE(UMax32, U32, U32, U32, ) |
| 261 | OPCODE(SLessThan, U1, U32, U32, ) | 262 | OPCODE(SLessThan, U1, U32, U32, ) |
| 262 | OPCODE(ULessThan, U1, U32, U32, ) | 263 | OPCODE(ULessThan, U1, U32, U32, ) |
| 263 | OPCODE(IEqual, U1, U32, U32, ) | 264 | OPCODE(IEqual, U1, U32, U32, ) |
| 264 | OPCODE(SLessThanEqual, U1, U32, U32, ) | 265 | OPCODE(SLessThanEqual, U1, U32, U32, ) |
| 265 | OPCODE(ULessThanEqual, U1, U32, U32, ) | 266 | OPCODE(ULessThanEqual, U1, U32, U32, ) |
| 266 | OPCODE(SGreaterThan, U1, U32, U32, ) | 267 | OPCODE(SGreaterThan, U1, U32, U32, ) |
| 267 | OPCODE(UGreaterThan, U1, U32, U32, ) | 268 | OPCODE(UGreaterThan, U1, U32, U32, ) |
| 268 | OPCODE(INotEqual, U1, U32, U32, ) | 269 | OPCODE(INotEqual, U1, U32, U32, ) |
| 269 | OPCODE(SGreaterThanEqual, U1, U32, U32, ) | 270 | OPCODE(SGreaterThanEqual, U1, U32, U32, ) |
| 270 | OPCODE(UGreaterThanEqual, U1, U32, U32, ) | 271 | OPCODE(UGreaterThanEqual, U1, U32, U32, ) |
| 271 | 272 | ||
| 272 | // Logical operations | 273 | // Logical operations |
| 273 | OPCODE(LogicalOr, U1, U1, U1, ) | 274 | OPCODE(LogicalOr, U1, U1, U1, ) |
| 274 | OPCODE(LogicalAnd, U1, U1, U1, ) | 275 | OPCODE(LogicalAnd, U1, U1, U1, ) |
| 275 | OPCODE(LogicalXor, U1, U1, U1, ) | 276 | OPCODE(LogicalXor, U1, U1, U1, ) |
| 276 | OPCODE(LogicalNot, U1, U1, ) | 277 | OPCODE(LogicalNot, U1, U1, ) |
| 277 | 278 | ||
| 278 | // Conversion operations | 279 | // Conversion operations |
| 279 | OPCODE(ConvertS16F16, U32, F16, ) | 280 | OPCODE(ConvertS16F16, U32, F16, ) |
| 280 | OPCODE(ConvertS16F32, U32, F32, ) | 281 | OPCODE(ConvertS16F32, U32, F32, ) |
| 281 | OPCODE(ConvertS16F64, U32, F64, ) | 282 | OPCODE(ConvertS16F64, U32, F64, ) |
| 282 | OPCODE(ConvertS32F16, U32, F16, ) | 283 | OPCODE(ConvertS32F16, U32, F16, ) |
| 283 | OPCODE(ConvertS32F32, U32, F32, ) | 284 | OPCODE(ConvertS32F32, U32, F32, ) |
| 284 | OPCODE(ConvertS32F64, U32, F64, ) | 285 | OPCODE(ConvertS32F64, U32, F64, ) |
| 285 | OPCODE(ConvertS64F16, U64, F16, ) | 286 | OPCODE(ConvertS64F16, U64, F16, ) |
| 286 | OPCODE(ConvertS64F32, U64, F32, ) | 287 | OPCODE(ConvertS64F32, U64, F32, ) |
| 287 | OPCODE(ConvertS64F64, U64, F64, ) | 288 | OPCODE(ConvertS64F64, U64, F64, ) |
| 288 | OPCODE(ConvertU16F16, U32, F16, ) | 289 | OPCODE(ConvertU16F16, U32, F16, ) |
| 289 | OPCODE(ConvertU16F32, U32, F32, ) | 290 | OPCODE(ConvertU16F32, U32, F32, ) |
| 290 | OPCODE(ConvertU16F64, U32, F64, ) | 291 | OPCODE(ConvertU16F64, U32, F64, ) |
| 291 | OPCODE(ConvertU32F16, U32, F16, ) | 292 | OPCODE(ConvertU32F16, U32, F16, ) |
| 292 | OPCODE(ConvertU32F32, U32, F32, ) | 293 | OPCODE(ConvertU32F32, U32, F32, ) |
| 293 | OPCODE(ConvertU32F64, U32, F64, ) | 294 | OPCODE(ConvertU32F64, U32, F64, ) |
| 294 | OPCODE(ConvertU64F16, U64, F16, ) | 295 | OPCODE(ConvertU64F16, U64, F16, ) |
| 295 | OPCODE(ConvertU64F32, U64, F32, ) | 296 | OPCODE(ConvertU64F32, U64, F32, ) |
| 296 | OPCODE(ConvertU64F64, U64, F64, ) | 297 | OPCODE(ConvertU64F64, U64, F64, ) |
| 297 | OPCODE(ConvertU64U32, U64, U32, ) | 298 | OPCODE(ConvertU64U32, U64, U32, ) |
| 298 | OPCODE(ConvertU32U64, U32, U64, ) | 299 | OPCODE(ConvertU32U64, U32, U64, ) |
| 299 | OPCODE(ConvertF16F32, F16, F32, ) | 300 | OPCODE(ConvertF16F32, F16, F32, ) |
| 300 | OPCODE(ConvertF32F16, F32, F16, ) | 301 | OPCODE(ConvertF32F16, F32, F16, ) |
| 301 | OPCODE(ConvertF32F64, F32, F64, ) | 302 | OPCODE(ConvertF32F64, F32, F64, ) |
| 302 | OPCODE(ConvertF64F32, F64, F32, ) | 303 | OPCODE(ConvertF64F32, F64, F32, ) |
| 304 | OPCODE(ConvertF16S32, F16, U32, ) | ||
| 305 | OPCODE(ConvertF16S64, F16, U64, ) | ||
| 306 | OPCODE(ConvertF16U32, F16, U32, ) | ||
| 307 | OPCODE(ConvertF16U64, F16, U64, ) | ||
| 308 | OPCODE(ConvertF32S32, F32, U32, ) | ||
| 309 | OPCODE(ConvertF32S64, F32, U64, ) | ||
| 310 | OPCODE(ConvertF32U32, F32, U32, ) | ||
| 311 | OPCODE(ConvertF32U64, F32, U64, ) | ||
| 312 | OPCODE(ConvertF64S32, F64, U32, ) | ||
| 313 | OPCODE(ConvertF64S64, F64, U64, ) | ||
| 314 | OPCODE(ConvertF64U32, F64, U32, ) | ||
| 315 | OPCODE(ConvertF64U64, F64, U64, ) | ||
| 316 | |||
| 317 | // Image operations | ||
| 318 | OPCODE(BindlessImageSampleImplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) | ||
| 319 | OPCODE(BindlessImageSampleExplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) | ||
| 320 | OPCODE(BindlessImageSampleDrefImplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, ) | ||
| 321 | OPCODE(BindlessImageSampleDrefExplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, ) | ||
| 322 | |||
| 323 | OPCODE(BoundImageSampleImplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) | ||
| 324 | OPCODE(BoundImageSampleExplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) | ||
| 325 | OPCODE(BoundImageSampleDrefImplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, ) | ||
| 326 | OPCODE(BoundImageSampleDrefExplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, ) | ||
| 327 | |||
| 328 | OPCODE(ImageSampleImplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) | ||
| 329 | OPCODE(ImageSampleExplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) | ||
| 330 | OPCODE(ImageSampleDrefImplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, ) | ||
| 331 | OPCODE(ImageSampleDrefExplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, ) | ||