summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/ir/opcodes.cpp
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-03-31 01:06:17 -0300
committerGravatar ameerj2021-07-22 21:51:25 -0400
commitc826220733678198e9aef328a9808b062b06c5df (patch)
tree6907a5c1c8bd3a3ec8323e555a5061969cae12ea /src/shader_recompiler/frontend/ir/opcodes.cpp
parentvk_pipeline_cache: Name SPIR-V modules (diff)
downloadyuzu-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.cpp28
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
20using enum Type; 20// using enum Type;
21constexpr Type Void{Type::Void};
22constexpr Type Opaque{Type::Opaque};
23constexpr Type Label{Type::Label};
24constexpr Type Reg{Type::Reg};
25constexpr Type Pred{Type::Pred};
26constexpr Type Attribute{Type::Attribute};
27constexpr Type U1{Type::U1};
28constexpr Type U8{Type::U8};
29constexpr Type U16{Type::U16};
30constexpr Type U32{Type::U32};
31constexpr Type U64{Type::U64};
32constexpr Type F16{Type::F16};
33constexpr Type F32{Type::F32};
34constexpr Type F64{Type::F64};
35constexpr Type U32x2{Type::U32x2};
36constexpr Type U32x3{Type::U32x3};
37constexpr Type U32x4{Type::U32x4};
38constexpr Type F16x2{Type::F16x2};
39constexpr Type F16x3{Type::F16x3};
40constexpr Type F16x4{Type::F16x4};
41constexpr Type F32x2{Type::F32x2};
42constexpr Type F32x3{Type::F32x3};
43constexpr Type F32x4{Type::F32x4};
44constexpr Type F64x2{Type::F64x2};
45constexpr Type F64x3{Type::F64x3};
46constexpr Type F64x4{Type::F64x4};
21 47
22constexpr std::array META_TABLE{ 48constexpr std::array META_TABLE{
23#define OPCODE(name_token, type_token, ...) \ 49#define OPCODE(name_token, type_token, ...) \