diff options
| author | 2021-03-31 01:06:17 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:25 -0400 | |
| commit | c826220733678198e9aef328a9808b062b06c5df (patch) | |
| tree | 6907a5c1c8bd3a3ec8323e555a5061969cae12ea /src/shader_recompiler/frontend/ir/opcodes.cpp | |
| parent | vk_pipeline_cache: Name SPIR-V modules (diff) | |
| download | yuzu-c826220733678198e9aef328a9808b062b06c5df.tar.gz yuzu-c826220733678198e9aef328a9808b062b06c5df.tar.xz yuzu-c826220733678198e9aef328a9808b062b06c5df.zip | |
shader: Unroll "using enum" for opcode declarations
Diffstat (limited to '')
| -rw-r--r-- | src/shader_recompiler/frontend/ir/opcodes.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/shader_recompiler/frontend/ir/opcodes.cpp b/src/shader_recompiler/frontend/ir/opcodes.cpp index 8492a13d5..1cb9db6c9 100644 --- a/src/shader_recompiler/frontend/ir/opcodes.cpp +++ b/src/shader_recompiler/frontend/ir/opcodes.cpp | |||
| @@ -17,7 +17,33 @@ struct OpcodeMeta { | |||
| 17 | std::array<Type, 5> arg_types; | 17 | std::array<Type, 5> arg_types; |
| 18 | }; | 18 | }; |
| 19 | 19 | ||
| 20 | using enum Type; | 20 | // using enum Type; |
| 21 | constexpr Type Void{Type::Void}; | ||
| 22 | constexpr Type Opaque{Type::Opaque}; | ||
| 23 | constexpr Type Label{Type::Label}; | ||
| 24 | constexpr Type Reg{Type::Reg}; | ||
| 25 | constexpr Type Pred{Type::Pred}; | ||
| 26 | constexpr Type Attribute{Type::Attribute}; | ||
| 27 | constexpr Type U1{Type::U1}; | ||
| 28 | constexpr Type U8{Type::U8}; | ||
| 29 | constexpr Type U16{Type::U16}; | ||
| 30 | constexpr Type U32{Type::U32}; | ||
| 31 | constexpr Type U64{Type::U64}; | ||
| 32 | constexpr Type F16{Type::F16}; | ||
| 33 | constexpr Type F32{Type::F32}; | ||
| 34 | constexpr Type F64{Type::F64}; | ||
| 35 | constexpr Type U32x2{Type::U32x2}; | ||
| 36 | constexpr Type U32x3{Type::U32x3}; | ||
| 37 | constexpr Type U32x4{Type::U32x4}; | ||
| 38 | constexpr Type F16x2{Type::F16x2}; | ||
| 39 | constexpr Type F16x3{Type::F16x3}; | ||
| 40 | constexpr Type F16x4{Type::F16x4}; | ||
| 41 | constexpr Type F32x2{Type::F32x2}; | ||
| 42 | constexpr Type F32x3{Type::F32x3}; | ||
| 43 | constexpr Type F32x4{Type::F32x4}; | ||
| 44 | constexpr Type F64x2{Type::F64x2}; | ||
| 45 | constexpr Type F64x3{Type::F64x3}; | ||
| 46 | constexpr Type F64x4{Type::F64x4}; | ||
| 21 | 47 | ||
| 22 | constexpr std::array META_TABLE{ | 48 | constexpr std::array META_TABLE{ |
| 23 | #define OPCODE(name_token, type_token, ...) \ | 49 | #define OPCODE(name_token, type_token, ...) \ |