diff options
| author | 2021-07-25 11:39:04 -0700 | |
|---|---|---|
| committer | 2021-07-25 11:39:04 -0700 | |
| commit | 98b26b6e126d4775fdf3f773fe8a8ac808a8ff8f (patch) | |
| tree | 816faa96c2c4d291825063433331a8ea4b3d08f1 /src/shader_recompiler/frontend/ir/opcodes.inc | |
| parent | Merge pull request #6699 from lat9nq/common-threads (diff) | |
| parent | shader: Support out of bound local memory reads and immediate writes (diff) | |
| download | yuzu-98b26b6e126d4775fdf3f773fe8a8ac808a8ff8f.tar.gz yuzu-98b26b6e126d4775fdf3f773fe8a8ac808a8ff8f.tar.xz yuzu-98b26b6e126d4775fdf3f773fe8a8ac808a8ff8f.zip | |
Merge pull request #6585 from ameerj/hades
Shader Decompiler Rewrite
Diffstat (limited to 'src/shader_recompiler/frontend/ir/opcodes.inc')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/opcodes.inc | 550 |
1 files changed, 550 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/ir/opcodes.inc b/src/shader_recompiler/frontend/ir/opcodes.inc new file mode 100644 index 000000000..d91098c80 --- /dev/null +++ b/src/shader_recompiler/frontend/ir/opcodes.inc | |||
| @@ -0,0 +1,550 @@ | |||
| 1 | // Copyright 2021 yuzu Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | // opcode name, return type, arg1 type, arg2 type, arg3 type, arg4 type, arg4 type, ... | ||
| 6 | OPCODE(Phi, Opaque, ) | ||
| 7 | OPCODE(Identity, Opaque, Opaque, ) | ||
| 8 | OPCODE(Void, Void, ) | ||
| 9 | OPCODE(ConditionRef, U1, U1, ) | ||
| 10 | OPCODE(Reference, Void, Opaque, ) | ||
| 11 | OPCODE(PhiMove, Void, Opaque, Opaque, ) | ||
| 12 | |||
| 13 | // Special operations | ||
| 14 | OPCODE(Prologue, Void, ) | ||
| 15 | OPCODE(Epilogue, Void, ) | ||
| 16 | OPCODE(Join, Void, ) | ||
| 17 | OPCODE(DemoteToHelperInvocation, Void, ) | ||
| 18 | OPCODE(EmitVertex, Void, U32, ) | ||
| 19 | OPCODE(EndPrimitive, Void, U32, ) | ||
| 20 | |||
| 21 | // Barriers | ||
| 22 | OPCODE(Barrier, Void, ) | ||
| 23 | OPCODE(WorkgroupMemoryBarrier, Void, ) | ||
| 24 | OPCODE(DeviceMemoryBarrier, Void, ) | ||
| 25 | |||
| 26 | // Context getters/setters | ||
| 27 | OPCODE(GetRegister, U32, Reg, ) | ||
| 28 | OPCODE(SetRegister, Void, Reg, U32, ) | ||
| 29 | OPCODE(GetPred, U1, Pred, ) | ||
| 30 | OPCODE(SetPred, Void, Pred, U1, ) | ||
| 31 | OPCODE(GetGotoVariable, U1, U32, ) | ||
| 32 | OPCODE(SetGotoVariable, Void, U32, U1, ) | ||
| 33 | OPCODE(GetIndirectBranchVariable, U32, ) | ||
| 34 | OPCODE(SetIndirectBranchVariable, Void, U32, ) | ||
| 35 | OPCODE(GetCbufU8, U32, U32, U32, ) | ||
| 36 | OPCODE(GetCbufS8, U32, U32, U32, ) | ||
| 37 | OPCODE(GetCbufU16, U32, U32, U32, ) | ||
| 38 | OPCODE(GetCbufS16, U32, U32, U32, ) | ||
| 39 | OPCODE(GetCbufU32, U32, U32, U32, ) | ||
| 40 | OPCODE(GetCbufF32, F32, U32, U32, ) | ||
| 41 | OPCODE(GetCbufU32x2, U32x2, U32, U32, ) | ||
| 42 | OPCODE(GetAttribute, F32, Attribute, U32, ) | ||
| 43 | OPCODE(SetAttribute, Void, Attribute, F32, U32, ) | ||
| 44 | OPCODE(GetAttributeIndexed, F32, U32, U32, ) | ||
| 45 | OPCODE(SetAttributeIndexed, Void, U32, F32, U32, ) | ||
| 46 | OPCODE(GetPatch, F32, Patch, ) | ||
| 47 | OPCODE(SetPatch, Void, Patch, F32, ) | ||
| 48 | OPCODE(SetFragColor, Void, U32, U32, F32, ) | ||
| 49 | OPCODE(SetSampleMask, Void, U32, ) | ||
| 50 | OPCODE(SetFragDepth, Void, F32, ) | ||
| 51 | OPCODE(GetZFlag, U1, Void, ) | ||
| 52 | OPCODE(GetSFlag, U1, Void, ) | ||
| 53 | OPCODE(GetCFlag, U1, Void, ) | ||
| 54 | OPCODE(GetOFlag, U1, Void, ) | ||
| 55 | OPCODE(SetZFlag, Void, U1, ) | ||
| 56 | OPCODE(SetSFlag, Void, U1, ) | ||
| 57 | OPCODE(SetCFlag, Void, U1, ) | ||
| 58 | OPCODE(SetOFlag, Void, U1, ) | ||
| 59 | OPCODE(WorkgroupId, U32x3, ) | ||
| 60 | OPCODE(LocalInvocationId, U32x3, ) | ||
| 61 | OPCODE(InvocationId, U32, ) | ||
| 62 | OPCODE(SampleId, U32, ) | ||
| 63 | OPCODE(IsHelperInvocation, U1, ) | ||
| 64 | OPCODE(YDirection, F32, ) | ||
| 65 | |||
| 66 | // Undefined | ||
| 67 | OPCODE(UndefU1, U1, ) | ||
| 68 | OPCODE(UndefU8, U8, ) | ||
| 69 | OPCODE(UndefU16, U16, ) | ||
| 70 | OPCODE(UndefU32, U32, ) | ||
| 71 | OPCODE(UndefU64, U64, ) | ||
| 72 | |||
| 73 | // Memory operations | ||
| 74 | OPCODE(LoadGlobalU8, U32, Opaque, ) | ||
| 75 | OPCODE(LoadGlobalS8, U32, Opaque, ) | ||
| 76 | OPCODE(LoadGlobalU16, U32, Opaque, ) | ||
| 77 | OPCODE(LoadGlobalS16, U32, Opaque, ) | ||
| 78 | OPCODE(LoadGlobal32, U32, Opaque, ) | ||
| 79 | OPCODE(LoadGlobal64, U32x2, Opaque, ) | ||
| 80 | OPCODE(LoadGlobal128, U32x4, Opaque, ) | ||
| 81 | OPCODE(WriteGlobalU8, Void, Opaque, U32, ) | ||
| 82 | OPCODE(WriteGlobalS8, Void, Opaque, U32, ) | ||
| 83 | OPCODE(WriteGlobalU16, Void, Opaque, U32, ) | ||
| 84 | OPCODE(WriteGlobalS16, Void, Opaque, U32, ) | ||
| 85 | OPCODE(WriteGlobal32, Void, Opaque, U32, ) | ||
| 86 | OPCODE(WriteGlobal64, Void, Opaque, U32x2, ) | ||
| 87 | OPCODE(WriteGlobal128, Void, Opaque, U32x4, ) | ||
| 88 | |||
| 89 | // Storage buffer operations | ||
| 90 | OPCODE(LoadStorageU8, U32, U32, U32, ) | ||
| 91 | OPCODE(LoadStorageS8, U32, U32, U32, ) | ||
| 92 | OPCODE(LoadStorageU16, U32, U32, U32, ) | ||
| 93 | OPCODE(LoadStorageS16, U32, U32, U32, ) | ||
| 94 | OPCODE(LoadStorage32, U32, U32, U32, ) | ||
| 95 | OPCODE(LoadStorage64, U32x2, U32, U32, ) | ||
| 96 | OPCODE(LoadStorage128, U32x4, U32, U32, ) | ||
| 97 | OPCODE(WriteStorageU8, Void, U32, U32, U32, ) | ||
| 98 | OPCODE(WriteStorageS8, Void, U32, U32, U32, ) | ||
| 99 | OPCODE(WriteStorageU16, Void, U32, U32, U32, ) | ||
| 100 | OPCODE(WriteStorageS16, Void, U32, U32, U32, ) | ||
| 101 | OPCODE(WriteStorage32, Void, U32, U32, U32, ) | ||
| 102 | OPCODE(WriteStorage64, Void, U32, U32, U32x2, ) | ||
| 103 | OPCODE(WriteStorage128, Void, U32, U32, U32x4, ) | ||
| 104 | |||
| 105 | // Local memory operations | ||
| 106 | OPCODE(LoadLocal, U32, U32, ) | ||
| 107 | OPCODE(WriteLocal, Void, U32, U32, ) | ||
| 108 | |||
| 109 | // Shared memory operations | ||
| 110 | OPCODE(LoadSharedU8, U32, U32, ) | ||
| 111 | OPCODE(LoadSharedS8, U32, U32, ) | ||
| 112 | OPCODE(LoadSharedU16, U32, U32, ) | ||
| 113 | OPCODE(LoadSharedS16, U32, U32, ) | ||
| 114 | OPCODE(LoadSharedU32, U32, U32, ) | ||
| 115 | OPCODE(LoadSharedU64, U32x2, U32, ) | ||
| 116 | OPCODE(LoadSharedU128, U32x4, U32, ) | ||
| 117 | OPCODE(WriteSharedU8, Void, U32, U32, ) | ||
| 118 | OPCODE(WriteSharedU16, Void, U32, U32, ) | ||
| 119 | OPCODE(WriteSharedU32, Void, U32, U32, ) | ||
| 120 | OPCODE(WriteSharedU64, Void, U32, U32x2, ) | ||
| 121 | OPCODE(WriteSharedU128, Void, U32, U32x4, ) | ||
| 122 | |||
| 123 | // Vector utility | ||
| 124 | OPCODE(CompositeConstructU32x2, U32x2, U32, U32, ) | ||
| 125 | OPCODE(CompositeConstructU32x3, U32x3, U32, U32, U32, ) | ||
| 126 | OPCODE(CompositeConstructU32x4, U32x4, U32, U32, U32, U32, ) | ||
| 127 | OPCODE(CompositeExtractU32x2, U32, U32x2, U32, ) | ||
| 128 | OPCODE(CompositeExtractU32x3, U32, U32x3, U32, ) | ||
| 129 | OPCODE(CompositeExtractU32x4, U32, U32x4, U32, ) | ||
| 130 | OPCODE(CompositeInsertU32x2, U32x2, U32x2, U32, U32, ) | ||
| 131 | OPCODE(CompositeInsertU32x3, U32x3, U32x3, U32, U32, ) | ||
| 132 | OPCODE(CompositeInsertU32x4, U32x4, U32x4, U32, U32, ) | ||
| 133 | OPCODE(CompositeConstructF16x2, F16x2, F16, F16, ) | ||
| 134 | OPCODE(CompositeConstructF16x3, F16x3, F16, F16, F16, ) | ||
| 135 | OPCODE(CompositeConstructF16x4, F16x4, F16, F16, F16, F16, ) | ||
| 136 | OPCODE(CompositeExtractF16x2, F16, F16x2, U32, ) | ||
| 137 | OPCODE(CompositeExtractF16x3, F16, F16x3, U32, ) | ||
| 138 | OPCODE(CompositeExtractF16x4, F16, F16x4, U32, ) | ||
| 139 | OPCODE(CompositeInsertF16x2, F16x2, F16x2, F16, U32, ) | ||
| 140 | OPCODE(CompositeInsertF16x3, F16x3, F16x3, F16, U32, ) | ||
| 141 | OPCODE(CompositeInsertF16x4, F16x4, F16x4, F16, U32, ) | ||
| 142 | OPCODE(CompositeConstructF32x2, F32x2, F32, F32, ) | ||
| 143 | OPCODE(CompositeConstructF32x3, F32x3, F32, F32, F32, ) | ||
| 144 | OPCODE(CompositeConstructF32x4, F32x4, F32, F32, F32, F32, ) | ||
| 145 | OPCODE(CompositeExtractF32x2, F32, F32x2, U32, ) | ||
| 146 | OPCODE(CompositeExtractF32x3, F32, F32x3, U32, ) | ||
| 147 | OPCODE(CompositeExtractF32x4, F32, F32x4, U32, ) | ||
| 148 | OPCODE(CompositeInsertF32x2, F32x2, F32x2, F32, U32, ) | ||
| 149 | OPCODE(CompositeInsertF32x3, F32x3, F32x3, F32, U32, ) | ||
| 150 | OPCODE(CompositeInsertF32x4, F32x4, F32x4, F32, U32, ) | ||
| 151 | OPCODE(CompositeConstructF64x2, F64x2, F64, F64, ) | ||
| 152 | OPCODE(CompositeConstructF64x3, F64x3, F64, F64, F64, ) | ||
| 153 | OPCODE(CompositeConstructF64x4, F64x4, F64, F64, F64, F64, ) | ||
| 154 | OPCODE(CompositeExtractF64x2, F64, F64x2, U32, ) | ||
| 155 | OPCODE(CompositeExtractF64x3, F64, F64x3, U32, ) | ||
| 156 | OPCODE(CompositeExtractF64x4, F64, F64x4, U32, ) | ||
| 157 | OPCODE(CompositeInsertF64x2, F64x2, F64x2, F64, U32, ) | ||
| 158 | OPCODE(CompositeInsertF64x3, F64x3, F64x3, F64, U32, ) | ||
| 159 | OPCODE(CompositeInsertF64x4, F64x4, F64x4, F64, U32, ) | ||
| 160 | |||
| 161 | // Select operations | ||
| 162 | OPCODE(SelectU1, U1, U1, U1, U1, ) | ||
| 163 | OPCODE(SelectU8, U8, U1, U8, U8, ) | ||
| 164 | OPCODE(SelectU16, U16, U1, U16, U16, ) | ||
| 165 | OPCODE(SelectU32, U32, U1, U32, U32, ) | ||
| 166 | OPCODE(SelectU64, U64, U1, U64, U64, ) | ||
| 167 | OPCODE(SelectF16, F16, U1, F16, F16, ) | ||
| 168 | OPCODE(SelectF32, F32, U1, F32, F32, ) | ||
| 169 | OPCODE(SelectF64, F64, U1, F64, F64, ) | ||
| 170 | |||
| 171 | // Bitwise conversions | ||
| 172 | OPCODE(BitCastU16F16, U16, F16, ) | ||
| 173 | OPCODE(BitCastU32F32, U32, F32, ) | ||
| 174 | OPCODE(BitCastU64F64, U64, F64, ) | ||
| 175 | OPCODE(BitCastF16U16, F16, U16, ) | ||
| 176 | OPCODE(BitCastF32U32, F32, U32, ) | ||
| 177 | OPCODE(BitCastF64U64, F64, U64, ) | ||
| 178 | OPCODE(PackUint2x32, U64, U32x2, ) | ||
| 179 | OPCODE(UnpackUint2x32, U32x2, U64, ) | ||
| 180 | OPCODE(PackFloat2x16, U32, F16x2, ) | ||
| 181 | OPCODE(UnpackFloat2x16, F16x2, U32, ) | ||
| 182 | OPCODE(PackHalf2x16, U32, F32x2, ) | ||
| 183 | OPCODE(UnpackHalf2x16, F32x2, U32, ) | ||
| 184 | OPCODE(PackDouble2x32, F64, U32x2, ) | ||
| 185 | OPCODE(UnpackDouble2x32, U32x2, F64, ) | ||
| 186 | |||
| 187 | // Pseudo-operation, handled specially at final emit | ||
| 188 | OPCODE(GetZeroFromOp, U1, Opaque, ) | ||
| 189 | OPCODE(GetSignFromOp, U1, Opaque, ) | ||
| 190 | OPCODE(GetCarryFromOp, U1, Opaque, ) | ||
| 191 | OPCODE(GetOverflowFromOp, U1, Opaque, ) | ||
| 192 | OPCODE(GetSparseFromOp, U1, Opaque, ) | ||
| 193 | OPCODE(GetInBoundsFromOp, U1, Opaque, ) | ||
| 194 | |||
| 195 | // Floating-point operations | ||
| 196 | OPCODE(FPAbs16, F16, F16, ) | ||
| 197 | OPCODE(FPAbs32, F32, F32, ) | ||
| 198 | OPCODE(FPAbs64, F64, F64, ) | ||
| 199 | OPCODE(FPAdd16, F16, F16, F16, ) | ||
| 200 | OPCODE(FPAdd32, F32, F32, F32, ) | ||
| 201 | OPCODE(FPAdd64, F64, F64, F64, ) | ||
| 202 | OPCODE(FPFma16, F16, F16, F16, F16, ) | ||
| 203 | OPCODE(FPFma32, F32, F32, F32, F32, ) | ||
| 204 | OPCODE(FPFma64, F64, F64, F64, F64, ) | ||
| 205 | OPCODE(FPMax32, F32, F32, F32, ) | ||
| 206 | OPCODE(FPMax64, F64, F64, F64, ) | ||
| 207 | OPCODE(FPMin32, F32, F32, F32, ) | ||
| 208 | OPCODE(FPMin64, F64, F64, F64, ) | ||
| 209 | OPCODE(FPMul16, F16, F16, F16, ) | ||
| 210 | OPCODE(FPMul32, F32, F32, F32, ) | ||
| 211 | OPCODE(FPMul64, F64, F64, F64, ) | ||
| 212 | OPCODE(FPNeg16, F16, F16, ) | ||
| 213 | OPCODE(FPNeg32, F32, F32, ) | ||
| 214 | OPCODE(FPNeg64, F64, F64, ) | ||
| 215 | OPCODE(FPRecip32, F32, F32, ) | ||
| 216 | OPCODE(FPRecip64, F64, F64, ) | ||
| 217 | OPCODE(FPRecipSqrt32, F32, F32, ) | ||
| 218 | OPCODE(FPRecipSqrt64, F64, F64, ) | ||
| 219 | OPCODE(FPSqrt, F32, F32, ) | ||
| 220 | OPCODE(FPSin, F32, F32, ) | ||
| 221 | OPCODE(FPExp2, F32, F32, ) | ||
| 222 | OPCODE(FPCos, F32, F32, ) | ||
| 223 | OPCODE(FPLog2, F32, F32, ) | ||
| 224 | OPCODE(FPSaturate16, F16, F16, ) | ||
| 225 | OPCODE(FPSaturate32, F32, F32, ) | ||
| 226 | OPCODE(FPSaturate64, F64, F64, ) | ||
| 227 | OPCODE(FPClamp16, F16, F16, F16, F16, ) | ||
| 228 | OPCODE(FPClamp32, F32, F32, F32, F32, ) | ||
| 229 | OPCODE(FPClamp64, F64, F64, F64, F64, ) | ||
| 230 | OPCODE(FPRoundEven16, F16, F16, ) | ||
| 231 | OPCODE(FPRoundEven32, F32, F32, ) | ||
| 232 | OPCODE(FPRoundEven64, F64, F64, ) | ||
| 233 | OPCODE(FPFloor16, F16, F16, ) | ||
| 234 | OPCODE(FPFloor32, F32, F32, ) | ||
| 235 | OPCODE(FPFloor64, F64, F64, ) | ||
| 236 | OPCODE(FPCeil16, F16, F16, ) | ||
| 237 | OPCODE(FPCeil32, F32, F32, ) | ||
| 238 | OPCODE(FPCeil64, F64, F64, ) | ||
| 239 | OPCODE(FPTrunc16, F16, F16, ) | ||
| 240 | OPCODE(FPTrunc32, F32, F32, ) | ||
| 241 | OPCODE(FPTrunc64, F64, F64, ) | ||
| 242 | |||
| 243 | OPCODE(FPOrdEqual16, U1, F16, F16, ) | ||
| 244 | OPCODE(FPOrdEqual32, U1, F32, F32, ) | ||
| 245 | OPCODE(FPOrdEqual64, U1, F64, F64, ) | ||
| 246 | OPCODE(FPUnordEqual16, U1, F16, F16, ) | ||
| 247 | OPCODE(FPUnordEqual32, U1, F32, F32, ) | ||
| 248 | OPCODE(FPUnordEqual64, U1, F64, F64, ) | ||
| 249 | OPCODE(FPOrdNotEqual16, U1, F16, F16, ) | ||
| 250 | OPCODE(FPOrdNotEqual32, U1, F32, F32, ) | ||
| 251 | OPCODE(FPOrdNotEqual64, U1, F64, F64, ) | ||
| 252 | OPCODE(FPUnordNotEqual16, U1, F16, F16, ) | ||
| 253 | OPCODE(FPUnordNotEqual32, U1, F32, F32, ) | ||
| 254 | OPCODE(FPUnordNotEqual64, U1, F64, F64, ) | ||
| 255 | OPCODE(FPOrdLessThan16, U1, F16, F16, ) | ||
| 256 | OPCODE(FPOrdLessThan32, U1, F32, F32, ) | ||
| 257 | OPCODE(FPOrdLessThan64, U1, F64, F64, ) | ||
| 258 | OPCODE(FPUnordLessThan16, U1, F16, F16, ) | ||
| 259 | OPCODE(FPUnordLessThan32, U1, F32, F32, ) | ||
| 260 | OPCODE(FPUnordLessThan64, U1, F64, F64, ) | ||
| 261 | OPCODE(FPOrdGreaterThan16, U1, F16, F16, ) | ||
| 262 | OPCODE(FPOrdGreaterThan32, U1, F32, F32, ) | ||
| 263 | OPCODE(FPOrdGreaterThan64, U1, F64, F64, ) | ||
| 264 | OPCODE(FPUnordGreaterThan16, U1, F16, F16, ) | ||
| 265 | OPCODE(FPUnordGreaterThan32, U1, F32, F32, ) | ||
| 266 | OPCODE(FPUnordGreaterThan64, U1, F64, F64, ) | ||
| 267 | OPCODE(FPOrdLessThanEqual16, U1, F16, F16, ) | ||
| 268 | OPCODE(FPOrdLessThanEqual32, U1, F32, F32, ) | ||
| 269 | OPCODE(FPOrdLessThanEqual64, U1, F64, F64, ) | ||
| 270 | OPCODE(FPUnordLessThanEqual16, U1, F16, F16, ) | ||
| 271 | OPCODE(FPUnordLessThanEqual32, U1, F32, F32, ) | ||
| 272 | OPCODE(FPUnordLessThanEqual64, U1, F64, F64, ) | ||
| 273 | OPCODE(FPOrdGreaterThanEqual16, U1, F16, F16, ) | ||
| 274 | OPCODE(FPOrdGreaterThanEqual32, U1, F32, F32, ) | ||
| 275 | OPCODE(FPOrdGreaterThanEqual64, U1, F64, F64, ) | ||
| 276 | OPCODE(FPUnordGreaterThanEqual16, U1, F16, F16, ) | ||
| 277 | OPCODE(FPUnordGreaterThanEqual32, U1, F32, F32, ) | ||
| 278 | OPCODE(FPUnordGreaterThanEqual64, U1, F64, F64, ) | ||
| 279 | OPCODE(FPIsNan16, U1, F16, ) | ||
| 280 | OPCODE(FPIsNan32, U1, F32, ) | ||
| 281 | OPCODE(FPIsNan64, U1, F64, ) | ||
| 282 | |||
| 283 | // Integer operations | ||
| 284 | OPCODE(IAdd32, U32, U32, U32, ) | ||
| 285 | OPCODE(IAdd64, U64, U64, U64, ) | ||
| 286 | OPCODE(ISub32, U32, U32, U32, ) | ||
| 287 | OPCODE(ISub64, U64, U64, U64, ) | ||
| 288 | OPCODE(IMul32, U32, U32, U32, ) | ||
| 289 | OPCODE(INeg32, U32, U32, ) | ||
| 290 | OPCODE(INeg64, U64, U64, ) | ||
| 291 | OPCODE(IAbs32, U32, U32, ) | ||
| 292 | OPCODE(ShiftLeftLogical32, U32, U32, U32, ) | ||
| 293 | OPCODE(ShiftLeftLogical64, U64, U64, U32, ) | ||
| 294 | OPCODE(ShiftRightLogical32, U32, U32, U32, ) | ||
| 295 | OPCODE(ShiftRightLogical64, U64, U64, U32, ) | ||
| 296 | OPCODE(ShiftRightArithmetic32, U32, U32, U32, ) | ||
| 297 | OPCODE(ShiftRightArithmetic64, U64, U64, U32, ) | ||
| 298 | OPCODE(BitwiseAnd32, U32, U32, U32, ) | ||
| 299 | OPCODE(BitwiseOr32, U32, U32, U32, ) | ||
| 300 | OPCODE(BitwiseXor32, U32, U32, U32, ) | ||
| 301 | OPCODE(BitFieldInsert, U32, U32, U32, U32, U32, ) | ||
| 302 | OPCODE(BitFieldSExtract, U32, U32, U32, U32, ) | ||
| 303 | OPCODE(BitFieldUExtract, U32, U32, U32, U32, ) | ||
| 304 | OPCODE(BitReverse32, U32, U32, ) | ||
| 305 | OPCODE(BitCount32, U32, U32, ) | ||
| 306 | OPCODE(BitwiseNot32, U32, U32, ) | ||
| 307 | |||
| 308 | OPCODE(FindSMsb32, U32, U32, ) | ||
| 309 | OPCODE(FindUMsb32, U32, U32, ) | ||
| 310 | OPCODE(SMin32, U32, U32, U32, ) | ||
| 311 | OPCODE(UMin32, U32, U32, U32, ) | ||
| 312 | OPCODE(SMax32, U32, U32, U32, ) | ||
| 313 | OPCODE(UMax32, U32, U32, U32, ) | ||
| 314 | OPCODE(SClamp32, U32, U32, U32, U32, ) | ||
| 315 | OPCODE(UClamp32, U32, U32, U32, U32, ) | ||
| 316 | OPCODE(SLessThan, U1, U32, U32, ) | ||
| 317 | OPCODE(ULessThan, U1, U32, U32, ) | ||
| 318 | OPCODE(IEqual, U1, U32, U32, ) | ||
| 319 | OPCODE(SLessThanEqual, U1, U32, U32, ) | ||
| 320 | OPCODE(ULessThanEqual, U1, U32, U32, ) | ||
| 321 | OPCODE(SGreaterThan, U1, U32, U32, ) | ||
| 322 | OPCODE(UGreaterThan, U1, U32, U32, ) | ||
| 323 | OPCODE(INotEqual, U1, U32, U32, ) | ||
| 324 | OPCODE(SGreaterThanEqual, U1, U32, U32, ) | ||
| 325 | OPCODE(UGreaterThanEqual, U1, U32, U32, ) | ||
| 326 | |||
| 327 | // Atomic operations | ||
| 328 | OPCODE(SharedAtomicIAdd32, U32, U32, U32, ) | ||
| 329 | OPCODE(SharedAtomicSMin32, U32, U32, U32, ) | ||
| 330 | OPCODE(SharedAtomicUMin32, U32, U32, U32, ) | ||
| 331 | OPCODE(SharedAtomicSMax32, U32, U32, U32, ) | ||
| 332 | OPCODE(SharedAtomicUMax32, U32, U32, U32, ) | ||
| 333 | OPCODE(SharedAtomicInc32, U32, U32, U32, ) | ||
| 334 | OPCODE(SharedAtomicDec32, U32, U32, U32, ) | ||
| 335 | OPCODE(SharedAtomicAnd32, U32, U32, U32, ) | ||
| 336 | OPCODE(SharedAtomicOr32, U32, U32, U32, ) | ||
| 337 | OPCODE(SharedAtomicXor32, U32, U32, U32, ) | ||
| 338 | OPCODE(SharedAtomicExchange32, U32, U32, U32, ) | ||
| 339 | OPCODE(SharedAtomicExchange64, U64, U32, U64, ) | ||
| 340 | |||
| 341 | OPCODE(GlobalAtomicIAdd32, U32, U64, U32, ) | ||
| 342 | OPCODE(GlobalAtomicSMin32, U32, U64, U32, ) | ||
| 343 | OPCODE(GlobalAtomicUMin32, U32, U64, U32, ) | ||
| 344 | OPCODE(GlobalAtomicSMax32, U32, U64, U32, ) | ||
| 345 | OPCODE(GlobalAtomicUMax32, U32, U64, U32, ) | ||
| 346 | OPCODE(GlobalAtomicInc32, U32, U64, U32, ) | ||
| 347 | OPCODE(GlobalAtomicDec32, U32, U64, U32, ) | ||
| 348 | OPCODE(GlobalAtomicAnd32, U32, U64, U32, ) | ||
| 349 | OPCODE(GlobalAtomicOr32, U32, U64, U32, ) | ||
| 350 | OPCODE(GlobalAtomicXor32, U32, U64, U32, ) | ||
| 351 | OPCODE(GlobalAtomicExchange32, U32, U64, U32, ) | ||
| 352 | OPCODE(GlobalAtomicIAdd64, U64, U64, U64, ) | ||
| 353 | OPCODE(GlobalAtomicSMin64, U64, U64, U64, ) | ||
| 354 | OPCODE(GlobalAtomicUMin64, U64, U64, U64, ) | ||
| 355 | OPCODE(GlobalAtomicSMax64, U64, U64, U64, ) | ||
| 356 | OPCODE(GlobalAtomicUMax64, U64, U64, U64, ) | ||
| 357 | OPCODE(GlobalAtomicAnd64, U64, U64, U64, ) | ||
| 358 | OPCODE(GlobalAtomicOr64, U64, U64, U64, ) | ||
| 359 | OPCODE(GlobalAtomicXor64, U64, U64, U64, ) | ||
| 360 | OPCODE(GlobalAtomicExchange64, U64, U64, U64, ) | ||
| 361 | OPCODE(GlobalAtomicAddF32, F32, U64, F32, ) | ||
| 362 | OPCODE(GlobalAtomicAddF16x2, U32, U64, F16x2, ) | ||
| 363 | OPCODE(GlobalAtomicAddF32x2, U32, U64, F32x2, ) | ||
| 364 | OPCODE(GlobalAtomicMinF16x2, U32, U64, F16x2, ) | ||
| 365 | OPCODE(GlobalAtomicMinF32x2, U32, U64, F32x2, ) | ||
| 366 | OPCODE(GlobalAtomicMaxF16x2, U32, U64, F16x2, ) | ||
| 367 | OPCODE(GlobalAtomicMaxF32x2, U32, U64, F32x2, ) | ||
| 368 | |||
| 369 | OPCODE(StorageAtomicIAdd32, U32, U32, U32, U32, ) | ||
| 370 | OPCODE(StorageAtomicSMin32, U32, U32, U32, U32, ) | ||
| 371 | OPCODE(StorageAtomicUMin32, U32, U32, U32, U32, ) | ||
| 372 | OPCODE(StorageAtomicSMax32, U32, U32, U32, U32, ) | ||
| 373 | OPCODE(StorageAtomicUMax32, U32, U32, U32, U32, ) | ||
| 374 | OPCODE(StorageAtomicInc32, U32, U32, U32, U32, ) | ||
| 375 | OPCODE(StorageAtomicDec32, U32, U32, U32, U32, ) | ||
| 376 | OPCODE(StorageAtomicAnd32, U32, U32, U32, U32, ) | ||
| 377 | OPCODE(StorageAtomicOr32, U32, U32, U32, U32, ) | ||
| 378 | OPCODE(StorageAtomicXor32, U32, U32, U32, U32, ) | ||
| 379 | OPCODE(StorageAtomicExchange32, U32, U32, U32, U32, ) | ||
| 380 | OPCODE(StorageAtomicIAdd64, U64, U32, U32, U64, ) | ||
| 381 | OPCODE(StorageAtomicSMin64, U64, U32, U32, U64, ) | ||
| 382 | OPCODE(StorageAtomicUMin64, U64, U32, U32, U64, ) | ||
| 383 | OPCODE(StorageAtomicSMax64, U64, U32, U32, U64, ) | ||
| 384 | OPCODE(StorageAtomicUMax64, U64, U32, U32, U64, ) | ||
| 385 | OPCODE(StorageAtomicAnd64, U64, U32, U32, U64, ) | ||
| 386 | OPCODE(StorageAtomicOr64, U64, U32, U32, U64, ) | ||
| 387 | OPCODE(StorageAtomicXor64, U64, U32, U32, U64, ) | ||
| 388 | OPCODE(StorageAtomicExchange64, U64, U32, U32, U64, ) | ||
| 389 | OPCODE(StorageAtomicAddF32, F32, U32, U32, F32, ) | ||
| 390 | OPCODE(StorageAtomicAddF16x2, U32, U32, U32, F16x2, ) | ||
| 391 | OPCODE(StorageAtomicAddF32x2, U32, U32, U32, F32x2, ) | ||
| 392 | OPCODE(StorageAtomicMinF16x2, U32, U32, U32, F16x2, ) | ||
| 393 | OPCODE(StorageAtomicMinF32x2, U32, U32, U32, F32x2, ) | ||
| 394 | OPCODE(StorageAtomicMaxF16x2, U32, U32, U32, F16x2, ) | ||
| 395 | OPCODE(StorageAtomicMaxF32x2, U32, U32, U32, F32x2, ) | ||
| 396 | |||
| 397 | // Logical operations | ||
| 398 | OPCODE(LogicalOr, U1, U1, U1, ) | ||
| 399 | OPCODE(LogicalAnd, U1, U1, U1, ) | ||
| 400 | OPCODE(LogicalXor, U1, U1, U1, ) | ||
| 401 | OPCODE(LogicalNot, U1, U1, ) | ||
| 402 | |||
| 403 | // Conversion operations | ||
| 404 | OPCODE(ConvertS16F16, U32, F16, ) | ||
| 405 | OPCODE(ConvertS16F32, U32, F32, ) | ||
| 406 | OPCODE(ConvertS16F64, U32, F64, ) | ||
| 407 | OPCODE(ConvertS32F16, U32, F16, ) | ||
| 408 | OPCODE(ConvertS32F32, U32, F32, ) | ||
| 409 | OPCODE(ConvertS32F64, U32, F64, ) | ||
| 410 | OPCODE(ConvertS64F16, U64, F16, ) | ||
| 411 | OPCODE(ConvertS64F32, U64, F32, ) | ||
| 412 | OPCODE(ConvertS64F64, U64, F64, ) | ||
| 413 | OPCODE(ConvertU16F16, U32, F16, ) | ||
| 414 | OPCODE(ConvertU16F32, U32, F32, ) | ||
| 415 | OPCODE(ConvertU16F64, U32, F64, ) | ||
| 416 | OPCODE(ConvertU32F16, U32, F16, ) | ||
| 417 | OPCODE(ConvertU32F32, U32, F32, ) | ||
| 418 | OPCODE(ConvertU32F64, U32, F64, ) | ||
| 419 | OPCODE(ConvertU64F16, U64, F16, ) | ||
| 420 | OPCODE(ConvertU64F32, U64, F32, ) | ||
| 421 | OPCODE(ConvertU64F64, U64, F64, ) | ||
| 422 | OPCODE(ConvertU64U32, U64, U32, ) | ||
| 423 | OPCODE(ConvertU32U64, U32, U64, ) | ||
| 424 | OPCODE(ConvertF16F32, F16, F32, ) | ||
| 425 | OPCODE(ConvertF32F16, F32, F16, ) | ||
| 426 | OPCODE(ConvertF32F64, F32, F64, ) | ||
| 427 | OPCODE(ConvertF64F32, F64, F32, ) | ||
| 428 | OPCODE(ConvertF16S8, F16, U32, ) | ||
| 429 | OPCODE(ConvertF16S16, F16, U32, ) | ||
| 430 | OPCODE(ConvertF16S32, F16, U32, ) | ||
| 431 | OPCODE(ConvertF16S64, F16, U64, ) | ||
| 432 | OPCODE(ConvertF16U8, F16, U32, ) | ||
| 433 | OPCODE(ConvertF16U16, F16, U32, ) | ||
| 434 | OPCODE(ConvertF16U32, F16, U32, ) | ||
| 435 | OPCODE(ConvertF16U64, F16, U64, ) | ||
| 436 | OPCODE(ConvertF32S8, F32, U32, ) | ||
| 437 | OPCODE(ConvertF32S16, F32, U32, ) | ||
| 438 | OPCODE(ConvertF32S32, F32, U32, ) | ||
| 439 | OPCODE(ConvertF32S64, F32, U64, ) | ||
| 440 | OPCODE(ConvertF32U8, F32, U32, ) | ||
| 441 | OPCODE(ConvertF32U16, F32, U32, ) | ||
| 442 | OPCODE(ConvertF32U32, F32, U32, ) | ||
| 443 | OPCODE(ConvertF32U64, F32, U64, ) | ||
| 444 | OPCODE(ConvertF64S8, F64, U32, ) | ||
| 445 | OPCODE(ConvertF64S16, F64, U32, ) | ||
| 446 | OPCODE(ConvertF64S32, F64, U32, ) | ||
| 447 | OPCODE(ConvertF64S64, F64, U64, ) | ||
| 448 | OPCODE(ConvertF64U8, F64, U32, ) | ||
| 449 | OPCODE(ConvertF64U16, F64, U32, ) | ||
| 450 | OPCODE(ConvertF64U32, F64, U32, ) | ||
| 451 | OPCODE(ConvertF64U64, F64, U64, ) | ||
| 452 | |||
| 453 | // Image operations | ||
| 454 | OPCODE(BindlessImageSampleImplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) | ||
| 455 | OPCODE(BindlessImageSampleExplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) | ||
| 456 | OPCODE(BindlessImageSampleDrefImplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, ) | ||
| 457 | OPCODE(BindlessImageSampleDrefExplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, ) | ||
| 458 | OPCODE(BindlessImageGather, F32x4, U32, Opaque, Opaque, Opaque, ) | ||
| 459 | OPCODE(BindlessImageGatherDref, F32x4, U32, Opaque, Opaque, Opaque, F32, ) | ||
| 460 | OPCODE(BindlessImageFetch, F32x4, U32, Opaque, Opaque, U32, Opaque, ) | ||
| 461 | OPCODE(BindlessImageQueryDimensions, U32x4, U32, U32, ) | ||
| 462 | OPCODE(BindlessImageQueryLod, F32x4, U32, Opaque, ) | ||
| 463 | OPCODE(BindlessImageGradient, F32x4, U32, Opaque, Opaque, Opaque, Opaque, ) | ||
| 464 | OPCODE(BindlessImageRead, U32x4, U32, Opaque, ) | ||
| 465 | OPCODE(BindlessImageWrite, Void, U32, Opaque, U32x4, ) | ||
| 466 | |||
| 467 | OPCODE(BoundImageSampleImplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) | ||
| 468 | OPCODE(BoundImageSampleExplicitLod, F32x4, U32, Opaque, Opaque, Opaque, ) | ||
| 469 | OPCODE(BoundImageSampleDrefImplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, ) | ||
| 470 | OPCODE(BoundImageSampleDrefExplicitLod, F32, U32, Opaque, F32, Opaque, Opaque, ) | ||
| 471 | OPCODE(BoundImageGather, F32x4, U32, Opaque, Opaque, Opaque, ) | ||
| 472 | OPCODE(BoundImageGatherDref, F32x4, U32, Opaque, Opaque, Opaque, F32, ) | ||
| 473 | OPCODE(BoundImageFetch, F32x4, U32, Opaque, Opaque, U32, Opaque, ) | ||
| 474 | OPCODE(BoundImageQueryDimensions, U32x4, U32, U32, ) | ||
| 475 | OPCODE(BoundImageQueryLod, F32x4, U32, Opaque, ) | ||
| 476 | OPCODE(BoundImageGradient, F32x4, U32, Opaque, Opaque, Opaque, Opaque, ) | ||
| 477 | OPCODE(BoundImageRead, U32x4, U32, Opaque, ) | ||
| 478 | OPCODE(BoundImageWrite, Void, U32, Opaque, U32x4, ) | ||
| 479 | |||
| 480 | OPCODE(ImageSampleImplicitLod, F32x4, Opaque, Opaque, Opaque, Opaque, ) | ||
| 481 | OPCODE(ImageSampleExplicitLod, F32x4, Opaque, Opaque, Opaque, Opaque, ) | ||
| 482 | OPCODE(ImageSampleDrefImplicitLod, F32, Opaque, Opaque, F32, Opaque, Opaque, ) | ||
| 483 | OPCODE(ImageSampleDrefExplicitLod, F32, Opaque, Opaque, F32, Opaque, Opaque, ) | ||
| 484 | OPCODE(ImageGather, F32x4, Opaque, Opaque, Opaque, Opaque, ) | ||
| 485 | OPCODE(ImageGatherDref, F32x4, Opaque, Opaque, Opaque, Opaque, F32, ) | ||
| 486 | OPCODE(ImageFetch, F32x4, Opaque, Opaque, Opaque, U32, Opaque, ) | ||
| 487 | OPCODE(ImageQueryDimensions, U32x4, Opaque, U32, ) | ||
| 488 | OPCODE(ImageQueryLod, F32x4, Opaque, Opaque, ) | ||
| 489 | OPCODE(ImageGradient, F32x4, Opaque, Opaque, Opaque, Opaque, Opaque, ) | ||
| 490 | OPCODE(ImageRead, U32x4, Opaque, Opaque, ) | ||
| 491 | OPCODE(ImageWrite, Void, Opaque, Opaque, U32x4, ) | ||
| 492 | |||
| 493 | // Atomic Image operations | ||
| 494 | |||
| 495 | OPCODE(BindlessImageAtomicIAdd32, U32, U32, Opaque, U32, ) | ||
| 496 | OPCODE(BindlessImageAtomicSMin32, U32, U32, Opaque, U32, ) | ||
| 497 | OPCODE(BindlessImageAtomicUMin32, U32, U32, Opaque, U32, ) | ||
| 498 | OPCODE(BindlessImageAtomicSMax32, U32, U32, Opaque, U32, ) | ||
| 499 | OPCODE(BindlessImageAtomicUMax32, U32, U32, Opaque, U32, ) | ||
| 500 | OPCODE(BindlessImageAtomicInc32, U32, U32, Opaque, U32, ) | ||
| 501 | OPCODE(BindlessImageAtomicDec32, U32, U32, Opaque, U32, ) | ||
| 502 | OPCODE(BindlessImageAtomicAnd32, U32, U32, Opaque, U32, ) | ||
| 503 | OPCODE(BindlessImageAtomicOr32, U32, U32, Opaque, U32, ) | ||
| 504 | OPCODE(BindlessImageAtomicXor32, U32, U32, Opaque, U32, ) | ||
| 505 | OPCODE(BindlessImageAtomicExchange32, U32, U32, Opaque, U32, ) | ||
| 506 | |||
| 507 | OPCODE(BoundImageAtomicIAdd32, U32, U32, Opaque, U32, ) | ||
| 508 | OPCODE(BoundImageAtomicSMin32, U32, U32, Opaque, U32, ) | ||
| 509 | OPCODE(BoundImageAtomicUMin32, U32, U32, Opaque, U32, ) | ||
| 510 | OPCODE(BoundImageAtomicSMax32, U32, U32, Opaque, U32, ) | ||
| 511 | OPCODE(BoundImageAtomicUMax32, U32, U32, Opaque, U32, ) | ||
| 512 | OPCODE(BoundImageAtomicInc32, U32, U32, Opaque, U32, ) | ||
| 513 | OPCODE(BoundImageAtomicDec32, U32, U32, Opaque, U32, ) | ||
| 514 | OPCODE(BoundImageAtomicAnd32, U32, U32, Opaque, U32, ) | ||
| 515 | OPCODE(BoundImageAtomicOr32, U32, U32, Opaque, U32, ) | ||
| 516 | OPCODE(BoundImageAtomicXor32, U32, U32, Opaque, U32, ) | ||
| 517 | OPCODE(BoundImageAtomicExchange32, U32, U32, Opaque, U32, ) | ||
| 518 | |||
| 519 | OPCODE(ImageAtomicIAdd32, U32, Opaque, Opaque, U32, ) | ||
| 520 | OPCODE(ImageAtomicSMin32, U32, Opaque, Opaque, U32, ) | ||
| 521 | OPCODE(ImageAtomicUMin32, U32, Opaque, Opaque, U32, ) | ||
| 522 | OPCODE(ImageAtomicSMax32, U32, Opaque, Opaque, U32, ) | ||
| 523 | OPCODE(ImageAtomicUMax32, U32, Opaque, Opaque, U32, ) | ||
| 524 | OPCODE(ImageAtomicInc32, U32, Opaque, Opaque, U32, ) | ||
| 525 | OPCODE(ImageAtomicDec32, U32, Opaque, Opaque, U32, ) | ||
| 526 | OPCODE(ImageAtomicAnd32, U32, Opaque, Opaque, U32, ) | ||
| 527 | OPCODE(ImageAtomicOr32, U32, Opaque, Opaque, U32, ) | ||
| 528 | OPCODE(ImageAtomicXor32, U32, Opaque, Opaque, U32, ) | ||
| 529 | OPCODE(ImageAtomicExchange32, U32, Opaque, Opaque, U32, ) | ||
| 530 | |||
| 531 | // Warp operations | ||
| 532 | OPCODE(LaneId, U32, ) | ||
| 533 | OPCODE(VoteAll, U1, U1, ) | ||
| 534 | OPCODE(VoteAny, U1, U1, ) | ||
| 535 | OPCODE(VoteEqual, U1, U1, ) | ||
| 536 | OPCODE(SubgroupBallot, U32, U1, ) | ||
| 537 | OPCODE(SubgroupEqMask, U32, ) | ||
| 538 | OPCODE(SubgroupLtMask, U32, ) | ||
| 539 | OPCODE(SubgroupLeMask, U32, ) | ||
| 540 | OPCODE(SubgroupGtMask, U32, ) | ||
| 541 | OPCODE(SubgroupGeMask, U32, ) | ||
| 542 | OPCODE(ShuffleIndex, U32, U32, U32, U32, U32, ) | ||
| 543 | OPCODE(ShuffleUp, U32, U32, U32, U32, U32, ) | ||
| 544 | OPCODE(ShuffleDown, U32, U32, U32, U32, U32, ) | ||
| 545 | OPCODE(ShuffleButterfly, U32, U32, U32, U32, U32, ) | ||
| 546 | OPCODE(FSwizzleAdd, F32, F32, F32, U32, ) | ||
| 547 | OPCODE(DPdxFine, F32, F32, ) | ||
| 548 | OPCODE(DPdyFine, F32, F32, ) | ||
| 549 | OPCODE(DPdxCoarse, F32, F32, ) | ||
| 550 | OPCODE(DPdyCoarse, F32, F32, ) | ||