summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/backend/glsl')
-rw-r--r--src/shader_recompiler/backend/glsl/emit_context.cpp30
-rw-r--r--src/shader_recompiler/backend/glsl/emit_context.h62
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl.cpp156
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl.h23
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_atomic.cpp0
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_barriers.cpp0
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_bitwise_conversion.cpp0
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp0
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp48
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_control_flow.cpp0
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_convert.cpp0
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp0
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_image.cpp0
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_image_atomic.cpp0
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_instructions.h656
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp0
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_logical.cpp0
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_memory.cpp0
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_not_implemented.cpp2149
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_select.cpp0
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_shared_memory.cpp0
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_special.cpp0
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_undefined.cpp0
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_warp.cpp0
-rw-r--r--src/shader_recompiler/backend/glsl/reg_alloc.cpp96
-rw-r--r--src/shader_recompiler/backend/glsl/reg_alloc.h46
26 files changed, 3266 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_context.cpp b/src/shader_recompiler/backend/glsl/emit_context.cpp
new file mode 100644
index 000000000..e2a9885f0
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_context.cpp
@@ -0,0 +1,30 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include "shader_recompiler/backend/bindings.h"
6#include "shader_recompiler/backend/glsl/emit_context.h"
7#include "shader_recompiler/frontend/ir/program.h"
8
9namespace Shader::Backend::GLSL {
10
11EmitContext::EmitContext(IR::Program& program, [[maybe_unused]] Bindings& bindings,
12 const Profile& profile_)
13 : info{program.info}, profile{profile_} {
14 std::string header = "#version 450 core\n";
15 header += "layout(local_size_x=1, local_size_y=1, local_size_z=1) in;";
16 code += header;
17 DefineConstantBuffers();
18 code += "void main(){";
19}
20
21void EmitContext::DefineConstantBuffers() {
22 if (info.constant_buffer_descriptors.empty()) {
23 return;
24 }
25 for (const auto& desc : info.constant_buffer_descriptors) {
26 Add("uniform uint c{}[{}];", desc.index, desc.count);
27 }
28}
29
30} // namespace Shader::Backend::GLSL
diff --git a/src/shader_recompiler/backend/glsl/emit_context.h b/src/shader_recompiler/backend/glsl/emit_context.h
new file mode 100644
index 000000000..ffc97007d
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_context.h
@@ -0,0 +1,62 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include <string>
8#include <utility>
9#include <fmt/format.h>
10
11#include "shader_recompiler/backend/glsl/reg_alloc.h"
12#include "shader_recompiler/stage.h"
13
14namespace Shader {
15struct Info;
16struct Profile;
17} // namespace Shader
18
19namespace Shader::Backend {
20struct Bindings;
21}
22
23namespace Shader::IR {
24class Inst;
25struct Program;
26} // namespace Shader::IR
27
28namespace Shader::Backend::GLSL {
29
30class EmitContext {
31public:
32 explicit EmitContext(IR::Program& program, Bindings& bindings, const Profile& profile_);
33
34 template <typename... Args>
35 void Add(const char* format_str, IR::Inst& inst, Args&&... args) {
36 code += fmt::format(format_str, reg_alloc.Define(inst), std::forward<Args>(args)...);
37 // TODO: Remove this
38 code += '\n';
39 }
40
41 template <typename... Args>
42 void Add(const char* format_str, Args&&... args) {
43 code += fmt::format(format_str, std::forward<Args>(args)...);
44 // TODO: Remove this
45 code += '\n';
46 }
47
48 std::string AllocVar() {
49 return fmt::format("var_{}", var_num++);
50 }
51
52 std::string code;
53 RegAlloc reg_alloc;
54 const Info& info;
55 const Profile& profile;
56 u64 var_num{};
57
58private:
59 void DefineConstantBuffers();
60};
61
62} // namespace Shader::Backend::GLSL
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl.cpp b/src/shader_recompiler/backend/glsl/emit_glsl.cpp
new file mode 100644
index 000000000..bb1d8b272
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_glsl.cpp
@@ -0,0 +1,156 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include <string>
6#include <tuple>
7
8#include "shader_recompiler/backend/bindings.h"
9#include "shader_recompiler/backend/glsl/emit_context.h"
10#include "shader_recompiler/backend/glsl/emit_glsl.h"
11#include "shader_recompiler/backend/glsl/emit_glsl_instructions.h"
12#include "shader_recompiler/frontend/ir/program.h"
13#include "shader_recompiler/profile.h"
14
15#pragma optimize("", off)
16namespace Shader::Backend::GLSL {
17namespace {
18template <class Func>
19struct FuncTraits {};
20
21template <class ReturnType_, class... Args>
22struct FuncTraits<ReturnType_ (*)(Args...)> {
23 using ReturnType = ReturnType_;
24
25 static constexpr size_t NUM_ARGS = sizeof...(Args);
26
27 template <size_t I>
28 using ArgType = std::tuple_element_t<I, std::tuple<Args...>>;
29};
30
31template <auto func, typename... Args>
32void SetDefinition(EmitContext& ctx, IR::Inst* inst, Args... args) {
33 inst->SetDefinition<Id>(func(ctx, std::forward<Args>(args)...));
34}
35
36template <typename ArgType>
37ArgType Arg(EmitContext& ctx, const IR::Value& arg) {
38 if constexpr (std::is_same_v<ArgType, std::string_view>) {
39 return ctx.reg_alloc.Consume(arg);
40 } else if constexpr (std::is_same_v<ArgType, IR::Inst&>) {
41 return *arg.Inst();
42 } else if constexpr (std::is_same_v<ArgType, const IR::Value&>) {
43 return arg;
44 } else if constexpr (std::is_same_v<ArgType, u32>) {
45 return arg.U32();
46 } else if constexpr (std::is_same_v<ArgType, IR::Attribute>) {
47 return arg.Attribute();
48 } else if constexpr (std::is_same_v<ArgType, IR::Patch>) {
49 return arg.Patch();
50 } else if constexpr (std::is_same_v<ArgType, IR::Reg>) {
51 return arg.Reg();
52 }
53}
54
55template <auto func, bool is_first_arg_inst, size_t... I>
56void Invoke(EmitContext& ctx, IR::Inst* inst, std::index_sequence<I...>) {
57 using Traits = FuncTraits<decltype(func)>;
58 if constexpr (std::is_same_v<typename Traits::ReturnType, Id>) {
59 if constexpr (is_first_arg_inst) {
60 SetDefinition<func>(
61 ctx, inst, inst,
62 Arg<typename Traits::template ArgType<I + 2>>(ctx, inst->Arg(I))...);
63 } else {
64 SetDefinition<func>(
65 ctx, inst, Arg<typename Traits::template ArgType<I + 1>>(ctx, inst->Arg(I))...);
66 }
67 } else {
68 if constexpr (is_first_arg_inst) {
69 func(ctx, inst, Arg<typename Traits::template ArgType<I + 2>>(ctx, inst->Arg(I))...);
70 } else {
71 func(ctx, Arg<typename Traits::template ArgType<I + 1>>(ctx, inst->Arg(I))...);
72 }
73 }
74}
75
76template <auto func>
77void Invoke(EmitContext& ctx, IR::Inst* inst) {
78 using Traits = FuncTraits<decltype(func)>;
79 static_assert(Traits::NUM_ARGS >= 1, "Insufficient arguments");
80 if constexpr (Traits::NUM_ARGS == 1) {
81 Invoke<func, false>(ctx, inst, std::make_index_sequence<0>{});
82 } else {
83 using FirstArgType = typename Traits::template ArgType<1>;
84 static constexpr bool is_first_arg_inst = std::is_same_v<FirstArgType, IR::Inst*>;
85 using Indices = std::make_index_sequence<Traits::NUM_ARGS - (is_first_arg_inst ? 2 : 1)>;
86 Invoke<func, is_first_arg_inst>(ctx, inst, Indices{});
87 }
88}
89
90void EmitInst(EmitContext& ctx, IR::Inst* inst) {
91 switch (inst->GetOpcode()) {
92#define OPCODE(name, result_type, ...) \
93 case IR::Opcode::name: \
94 return Invoke<&Emit##name>(ctx, inst);
95#include "shader_recompiler/frontend/ir/opcodes.inc"
96#undef OPCODE
97 }
98 throw LogicError("Invalid opcode {}", inst->GetOpcode());
99}
100
101void EmitCode(EmitContext& ctx, const IR::Program& program) {
102 for (const IR::AbstractSyntaxNode& node : program.syntax_list) {
103 switch (node.type) {
104 case IR::AbstractSyntaxNode::Type::Block:
105 for (IR::Inst& inst : node.data.block->Instructions()) {
106 EmitInst(ctx, &inst);
107 }
108 break;
109 case IR::AbstractSyntaxNode::Type::If:
110 ctx.Add("if (");
111 break;
112 case IR::AbstractSyntaxNode::Type::EndIf:
113 ctx.Add("){{");
114 break;
115 case IR::AbstractSyntaxNode::Type::Loop:
116 ctx.Add("while (");
117 break;
118 case IR::AbstractSyntaxNode::Type::Repeat:
119 if (node.data.repeat.cond.IsImmediate()) {
120 if (node.data.repeat.cond.U1()) {
121 ctx.Add("ENDREP;");
122 } else {
123 ctx.Add("BRK;"
124 "ENDREP;");
125 }
126 }
127 break;
128 case IR::AbstractSyntaxNode::Type::Break:
129 if (node.data.break_node.cond.IsImmediate()) {
130 if (node.data.break_node.cond.U1()) {
131 ctx.Add("break;");
132 }
133 }
134 break;
135 case IR::AbstractSyntaxNode::Type::Return:
136 case IR::AbstractSyntaxNode::Type::Unreachable:
137 ctx.Add("return;");
138 break;
139 default:
140 ctx.Add("UNAHNDLED {}", node.type);
141 break;
142 }
143 }
144}
145
146} // Anonymous namespace
147
148std::string EmitGLSL(const Profile& profile, IR::Program& program, Bindings& bindings) {
149 EmitContext ctx{program, bindings, profile};
150 // ctx.SetupBuffers();
151 EmitCode(ctx, program);
152 ctx.code += "}";
153 return ctx.code;
154}
155
156} // namespace Shader::Backend::GLSL
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl.h b/src/shader_recompiler/backend/glsl/emit_glsl.h
new file mode 100644
index 000000000..a7c666107
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_glsl.h
@@ -0,0 +1,23 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include <string>
8
9#include "shader_recompiler/backend/bindings.h"
10#include "shader_recompiler/frontend/ir/program.h"
11#include "shader_recompiler/profile.h"
12
13namespace Shader::Backend::GLSL {
14
15[[nodiscard]] std::string EmitGLSL(const Profile& profile, IR::Program& program,
16 Bindings& binding);
17
18[[nodiscard]] inline std::string EmitGLSL(const Profile& profile, IR::Program& program) {
19 Bindings binding;
20 return EmitGLSL(profile, program, binding);
21}
22
23} // namespace Shader::Backend::GLSL
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_atomic.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_atomic.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_atomic.cpp
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_barriers.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_barriers.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_barriers.cpp
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_bitwise_conversion.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_bitwise_conversion.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_bitwise_conversion.cpp
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp
new file mode 100644
index 000000000..7b2ed358e
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_context_get_set.cpp
@@ -0,0 +1,48 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include <string_view>
6
7#include "shader_recompiler/backend/glsl/emit_context.h"
8#include "shader_recompiler/backend/glsl/emit_glsl_instructions.h"
9#include "shader_recompiler/frontend/ir/value.h"
10#include "shader_recompiler/profile.h"
11
12namespace Shader::Backend::GLSL {
13void EmitGetCbufU8([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] const IR::Value& binding,
14 [[maybe_unused]] const IR::Value& offset) {
15 throw NotImplementedException("GLSL");
16}
17
18void EmitGetCbufS8([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] const IR::Value& binding,
19 [[maybe_unused]] const IR::Value& offset) {
20 throw NotImplementedException("GLSL");
21}
22
23void EmitGetCbufU16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] const IR::Value& binding,
24 [[maybe_unused]] const IR::Value& offset) {
25 throw NotImplementedException("GLSL");
26}
27
28void EmitGetCbufS16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] const IR::Value& binding,
29 [[maybe_unused]] const IR::Value& offset) {
30 throw NotImplementedException("GLSL");
31}
32
33void EmitGetCbufU32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] const IR::Value& binding,
34 [[maybe_unused]] const IR::Value& offset) {
35 const auto var{ctx.AllocVar()};
36 ctx.Add("uint {} = c{}[{}];", var, binding.U32(), offset.U32());
37}
38
39void EmitGetCbufF32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] const IR::Value& binding,
40 [[maybe_unused]] const IR::Value& offset) {
41 throw NotImplementedException("GLSL");
42}
43
44void EmitGetCbufU32x2([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] const IR::Value& binding,
45 [[maybe_unused]] const IR::Value& offset) {
46 throw NotImplementedException("GLSL");
47}
48} // namespace Shader::Backend::GLSL
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_control_flow.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_control_flow.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_control_flow.cpp
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_convert.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_convert.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_convert.cpp
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_floating_point.cpp
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_image_atomic.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_image_atomic.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_image_atomic.cpp
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_instructions.h b/src/shader_recompiler/backend/glsl/emit_glsl_instructions.h
new file mode 100644
index 000000000..1d86820dc
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_instructions.h
@@ -0,0 +1,656 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include <string_view>
8
9#include "common/common_types.h"
10
11namespace Shader::IR {
12enum class Attribute : u64;
13enum class Patch : u64;
14class Inst;
15class Value;
16} // namespace Shader::IR
17
18namespace Shader::Backend::GLSL {
19
20class EmitContext;
21
22inline void EmitSetLoopSafetyVariable(EmitContext&) {}
23inline void EmitGetLoopSafetyVariable(EmitContext&) {}
24
25// Microinstruction emitters
26void EmitPhi(EmitContext& ctx, IR::Inst* inst);
27void EmitVoid(EmitContext& ctx);
28void EmitIdentity(EmitContext& ctx, const IR::Value& value);
29void EmitConditionRef(EmitContext& ctx, IR::Inst& inst, const IR::Value& value);
30void EmitReference(EmitContext&);
31void EmitPhiMove(EmitContext& ctx, const IR::Value& phi, const IR::Value& value);
32void EmitBranch(EmitContext& ctx, std::string_view label);
33void EmitBranchConditional(EmitContext& ctx, std::string_view condition,
34 std::string_view true_label, std::string_view false_label);
35void EmitLoopMerge(EmitContext& ctx, std::string_view merge_label, std::string_view continue_label);
36void EmitSelectionMerge(EmitContext& ctx, std::string_view merge_label);
37void EmitReturn(EmitContext& ctx);
38void EmitJoin(EmitContext& ctx);
39void EmitUnreachable(EmitContext& ctx);
40void EmitDemoteToHelperInvocation(EmitContext& ctx, std::string_view continue_label);
41void EmitBarrier(EmitContext& ctx);
42void EmitWorkgroupMemoryBarrier(EmitContext& ctx);
43void EmitDeviceMemoryBarrier(EmitContext& ctx);
44void EmitPrologue(EmitContext& ctx);
45void EmitEpilogue(EmitContext& ctx);
46void EmitEmitVertex(EmitContext& ctx, const IR::Value& stream);
47void EmitEndPrimitive(EmitContext& ctx, const IR::Value& stream);
48void EmitGetRegister(EmitContext& ctx);
49void EmitSetRegister(EmitContext& ctx);
50void EmitGetPred(EmitContext& ctx);
51void EmitSetPred(EmitContext& ctx);
52void EmitSetGotoVariable(EmitContext& ctx);
53void EmitGetGotoVariable(EmitContext& ctx);
54void EmitSetIndirectBranchVariable(EmitContext& ctx);
55void EmitGetIndirectBranchVariable(EmitContext& ctx);
56void EmitGetCbufU8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
57void EmitGetCbufS8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
58void EmitGetCbufU16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
59void EmitGetCbufS16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
60void EmitGetCbufU32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
61void EmitGetCbufF32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
62void EmitGetCbufU32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
63void EmitGetAttribute(EmitContext& ctx, IR::Attribute attr, std::string_view vertex);
64void EmitSetAttribute(EmitContext& ctx, IR::Attribute attr, std::string_view value,
65 std::string_view vertex);
66void EmitGetAttributeIndexed(EmitContext& ctx, std::string_view offset, std::string_view vertex);
67void EmitSetAttributeIndexed(EmitContext& ctx, std::string_view offset, std::string_view value,
68 std::string_view vertex);
69void EmitGetPatch(EmitContext& ctx, IR::Patch patch);
70void EmitSetPatch(EmitContext& ctx, IR::Patch patch, std::string_view value);
71void EmitSetFragColor(EmitContext& ctx, u32 index, u32 component, std::string_view value);
72void EmitSetSampleMask(EmitContext& ctx, std::string_view value);
73void EmitSetFragDepth(EmitContext& ctx, std::string_view value);
74void EmitGetZFlag(EmitContext& ctx);
75void EmitGetSFlag(EmitContext& ctx);
76void EmitGetCFlag(EmitContext& ctx);
77void EmitGetOFlag(EmitContext& ctx);
78void EmitSetZFlag(EmitContext& ctx);
79void EmitSetSFlag(EmitContext& ctx);
80void EmitSetCFlag(EmitContext& ctx);
81void EmitSetOFlag(EmitContext& ctx);
82void EmitWorkgroupId(EmitContext& ctx);
83void EmitLocalInvocationId(EmitContext& ctx);
84void EmitInvocationId(EmitContext& ctx);
85void EmitSampleId(EmitContext& ctx);
86void EmitIsHelperInvocation(EmitContext& ctx);
87void EmitYDirection(EmitContext& ctx);
88void EmitLoadLocal(EmitContext& ctx, std::string_view word_offset);
89void EmitWriteLocal(EmitContext& ctx, std::string_view word_offset, std::string_view value);
90void EmitUndefU1(EmitContext& ctx);
91void EmitUndefU8(EmitContext& ctx);
92void EmitUndefU16(EmitContext& ctx);
93void EmitUndefU32(EmitContext& ctx);
94void EmitUndefU64(EmitContext& ctx);
95void EmitLoadGlobalU8(EmitContext& ctx);
96void EmitLoadGlobalS8(EmitContext& ctx);
97void EmitLoadGlobalU16(EmitContext& ctx);
98void EmitLoadGlobalS16(EmitContext& ctx);
99void EmitLoadGlobal32(EmitContext& ctx, std::string_view address);
100void EmitLoadGlobal64(EmitContext& ctx, std::string_view address);
101void EmitLoadGlobal128(EmitContext& ctx, std::string_view address);
102void EmitWriteGlobalU8(EmitContext& ctx);
103void EmitWriteGlobalS8(EmitContext& ctx);
104void EmitWriteGlobalU16(EmitContext& ctx);
105void EmitWriteGlobalS16(EmitContext& ctx);
106void EmitWriteGlobal32(EmitContext& ctx, std::string_view address, std::string_view value);
107void EmitWriteGlobal64(EmitContext& ctx, std::string_view address, std::string_view value);
108void EmitWriteGlobal128(EmitContext& ctx, std::string_view address, std::string_view value);
109void EmitLoadStorageU8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
110void EmitLoadStorageS8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
111void EmitLoadStorageU16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
112void EmitLoadStorageS16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
113void EmitLoadStorage32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
114void EmitLoadStorage64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
115void EmitLoadStorage128(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset);
116void EmitWriteStorageU8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
117 std::string_view value);
118void EmitWriteStorageS8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
119 std::string_view value);
120void EmitWriteStorageU16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
121 std::string_view value);
122void EmitWriteStorageS16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
123 std::string_view value);
124void EmitWriteStorage32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
125 std::string_view value);
126void EmitWriteStorage64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
127 std::string_view value);
128void EmitWriteStorage128(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
129 std::string_view value);
130void EmitLoadSharedU8(EmitContext& ctx, std::string_view offset);
131void EmitLoadSharedS8(EmitContext& ctx, std::string_view offset);
132void EmitLoadSharedU16(EmitContext& ctx, std::string_view offset);
133void EmitLoadSharedS16(EmitContext& ctx, std::string_view offset);
134void EmitLoadSharedU32(EmitContext& ctx, std::string_view offset);
135void EmitLoadSharedU64(EmitContext& ctx, std::string_view offset);
136void EmitLoadSharedU128(EmitContext& ctx, std::string_view offset);
137void EmitWriteSharedU8(EmitContext& ctx, std::string_view offset, std::string_view value);
138void EmitWriteSharedU16(EmitContext& ctx, std::string_view offset, std::string_view value);
139void EmitWriteSharedU32(EmitContext& ctx, std::string_view offset, std::string_view value);
140void EmitWriteSharedU64(EmitContext& ctx, std::string_view offset, std::string_view value);
141void EmitWriteSharedU128(EmitContext& ctx, std::string_view offset, std::string_view value);
142void EmitCompositeConstructU32x2(EmitContext& ctx, std::string_view e1, std::string_view e2);
143void EmitCompositeConstructU32x3(EmitContext& ctx, std::string_view e1, std::string_view e2,
144 std::string_view e3);
145void EmitCompositeConstructU32x4(EmitContext& ctx, std::string_view e1, std::string_view e2,
146 std::string_view e3, std::string_view e4);
147void EmitCompositeExtractU32x2(EmitContext& ctx, std::string_view composite, u32 index);
148void EmitCompositeExtractU32x3(EmitContext& ctx, std::string_view composite, u32 index);
149void EmitCompositeExtractU32x4(EmitContext& ctx, std::string_view composite, u32 index);
150void EmitCompositeInsertU32x2(EmitContext& ctx, std::string_view composite, std::string_view object,
151 u32 index);
152void EmitCompositeInsertU32x3(EmitContext& ctx, std::string_view composite, std::string_view object,
153 u32 index);
154void EmitCompositeInsertU32x4(EmitContext& ctx, std::string_view composite, std::string_view object,
155 u32 index);
156void EmitCompositeConstructF16x2(EmitContext& ctx, std::string_view e1, std::string_view e2);
157void EmitCompositeConstructF16x3(EmitContext& ctx, std::string_view e1, std::string_view e2,
158 std::string_view e3);
159void EmitCompositeConstructF16x4(EmitContext& ctx, std::string_view e1, std::string_view e2,
160 std::string_view e3, std::string_view e4);
161void EmitCompositeExtractF16x2(EmitContext& ctx, std::string_view composite, u32 index);
162void EmitCompositeExtractF16x3(EmitContext& ctx, std::string_view composite, u32 index);
163void EmitCompositeExtractF16x4(EmitContext& ctx, std::string_view composite, u32 index);
164void EmitCompositeInsertF16x2(EmitContext& ctx, std::string_view composite, std::string_view object,
165 u32 index);
166void EmitCompositeInsertF16x3(EmitContext& ctx, std::string_view composite, std::string_view object,
167 u32 index);
168void EmitCompositeInsertF16x4(EmitContext& ctx, std::string_view composite, std::string_view object,
169 u32 index);
170void EmitCompositeConstructF32x2(EmitContext& ctx, std::string_view e1, std::string_view e2);
171void EmitCompositeConstructF32x3(EmitContext& ctx, std::string_view e1, std::string_view e2,
172 std::string_view e3);
173void EmitCompositeConstructF32x4(EmitContext& ctx, std::string_view e1, std::string_view e2,
174 std::string_view e3, std::string_view e4);
175void EmitCompositeExtractF32x2(EmitContext& ctx, std::string_view composite, u32 index);
176void EmitCompositeExtractF32x3(EmitContext& ctx, std::string_view composite, u32 index);
177void EmitCompositeExtractF32x4(EmitContext& ctx, std::string_view composite, u32 index);
178void EmitCompositeInsertF32x2(EmitContext& ctx, std::string_view composite, std::string_view object,
179 u32 index);
180void EmitCompositeInsertF32x3(EmitContext& ctx, std::string_view composite, std::string_view object,
181 u32 index);
182void EmitCompositeInsertF32x4(EmitContext& ctx, std::string_view composite, std::string_view object,
183 u32 index);
184void EmitCompositeConstructF64x2(EmitContext& ctx);
185void EmitCompositeConstructF64x3(EmitContext& ctx);
186void EmitCompositeConstructF64x4(EmitContext& ctx);
187void EmitCompositeExtractF64x2(EmitContext& ctx);
188void EmitCompositeExtractF64x3(EmitContext& ctx);
189void EmitCompositeExtractF64x4(EmitContext& ctx);
190void EmitCompositeInsertF64x2(EmitContext& ctx, std::string_view composite, std::string_view object,
191 u32 index);
192void EmitCompositeInsertF64x3(EmitContext& ctx, std::string_view composite, std::string_view object,
193 u32 index);
194void EmitCompositeInsertF64x4(EmitContext& ctx, std::string_view composite, std::string_view object,
195 u32 index);
196void EmitSelectU1(EmitContext& ctx, std::string_view cond, std::string_view true_value,
197 std::string_view false_value);
198void EmitSelectU8(EmitContext& ctx, std::string_view cond, std::string_view true_value,
199 std::string_view false_value);
200void EmitSelectU16(EmitContext& ctx, std::string_view cond, std::string_view true_value,
201 std::string_view false_value);
202void EmitSelectU32(EmitContext& ctx, std::string_view cond, std::string_view true_value,
203 std::string_view false_value);
204void EmitSelectU64(EmitContext& ctx, std::string_view cond, std::string_view true_value,
205 std::string_view false_value);
206void EmitSelectF16(EmitContext& ctx, std::string_view cond, std::string_view true_value,
207 std::string_view false_value);
208void EmitSelectF32(EmitContext& ctx, std::string_view cond, std::string_view true_value,
209 std::string_view false_value);
210void EmitSelectF64(EmitContext& ctx, std::string_view cond, std::string_view true_value,
211 std::string_view false_value);
212void EmitBitCastU16F16(EmitContext& ctx);
213void EmitBitCastU32F32(EmitContext& ctx, std::string_view value);
214void EmitBitCastU64F64(EmitContext& ctx);
215void EmitBitCastF16U16(EmitContext& ctx);
216void EmitBitCastF32U32(EmitContext& ctx, std::string_view value);
217void EmitBitCastF64U64(EmitContext& ctx);
218void EmitPackUint2x32(EmitContext& ctx, std::string_view value);
219void EmitUnpackUint2x32(EmitContext& ctx, std::string_view value);
220void EmitPackFloat2x16(EmitContext& ctx, std::string_view value);
221void EmitUnpackFloat2x16(EmitContext& ctx, std::string_view value);
222void EmitPackHalf2x16(EmitContext& ctx, std::string_view value);
223void EmitUnpackHalf2x16(EmitContext& ctx, std::string_view value);
224void EmitPackDouble2x32(EmitContext& ctx, std::string_view value);
225void EmitUnpackDouble2x32(EmitContext& ctx, std::string_view value);
226void EmitGetZeroFromOp(EmitContext& ctx);
227void EmitGetSignFromOp(EmitContext& ctx);
228void EmitGetCarryFromOp(EmitContext& ctx);
229void EmitGetOverflowFromOp(EmitContext& ctx);
230void EmitGetSparseFromOp(EmitContext& ctx);
231void EmitGetInBoundsFromOp(EmitContext& ctx);
232void EmitFPAbs16(EmitContext& ctx, std::string_view value);
233void EmitFPAbs32(EmitContext& ctx, std::string_view value);
234void EmitFPAbs64(EmitContext& ctx, std::string_view value);
235void EmitFPAdd16(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b);
236void EmitFPAdd32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b);
237void EmitFPAdd64(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b);
238void EmitFPFma16(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b,
239 std::string_view c);
240void EmitFPFma32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b,
241 std::string_view c);
242void EmitFPFma64(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b,
243 std::string_view c);
244void EmitFPMax32(EmitContext& ctx, std::string_view a, std::string_view b);
245void EmitFPMax64(EmitContext& ctx, std::string_view a, std::string_view b);
246void EmitFPMin32(EmitContext& ctx, std::string_view a, std::string_view b);
247void EmitFPMin64(EmitContext& ctx, std::string_view a, std::string_view b);
248void EmitFPMul16(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b);
249void EmitFPMul32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b);
250void EmitFPMul64(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b);
251void EmitFPNeg16(EmitContext& ctx, std::string_view value);
252void EmitFPNeg32(EmitContext& ctx, std::string_view value);
253void EmitFPNeg64(EmitContext& ctx, std::string_view value);
254void EmitFPSin(EmitContext& ctx, std::string_view value);
255void EmitFPCos(EmitContext& ctx, std::string_view value);
256void EmitFPExp2(EmitContext& ctx, std::string_view value);
257void EmitFPLog2(EmitContext& ctx, std::string_view value);
258void EmitFPRecip32(EmitContext& ctx, std::string_view value);
259void EmitFPRecip64(EmitContext& ctx, std::string_view value);
260void EmitFPRecipSqrt32(EmitContext& ctx, std::string_view value);
261void EmitFPRecipSqrt64(EmitContext& ctx, std::string_view value);
262void EmitFPSqrt(EmitContext& ctx, std::string_view value);
263void EmitFPSaturate16(EmitContext& ctx, std::string_view value);
264void EmitFPSaturate32(EmitContext& ctx, std::string_view value);
265void EmitFPSaturate64(EmitContext& ctx, std::string_view value);
266void EmitFPClamp16(EmitContext& ctx, std::string_view value, std::string_view min_value,
267 std::string_view max_value);
268void EmitFPClamp32(EmitContext& ctx, std::string_view value, std::string_view min_value,
269 std::string_view max_value);
270void EmitFPClamp64(EmitContext& ctx, std::string_view value, std::string_view min_value,
271 std::string_view max_value);
272void EmitFPRoundEven16(EmitContext& ctx, std::string_view value);
273void EmitFPRoundEven32(EmitContext& ctx, std::string_view value);
274void EmitFPRoundEven64(EmitContext& ctx, std::string_view value);
275void EmitFPFloor16(EmitContext& ctx, std::string_view value);
276void EmitFPFloor32(EmitContext& ctx, std::string_view value);
277void EmitFPFloor64(EmitContext& ctx, std::string_view value);
278void EmitFPCeil16(EmitContext& ctx, std::string_view value);
279void EmitFPCeil32(EmitContext& ctx, std::string_view value);
280void EmitFPCeil64(EmitContext& ctx, std::string_view value);
281void EmitFPTrunc16(EmitContext& ctx, std::string_view value);
282void EmitFPTrunc32(EmitContext& ctx, std::string_view value);
283void EmitFPTrunc64(EmitContext& ctx, std::string_view value);
284void EmitFPOrdEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
285void EmitFPOrdEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
286void EmitFPOrdEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
287void EmitFPUnordEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
288void EmitFPUnordEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
289void EmitFPUnordEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
290void EmitFPOrdNotEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
291void EmitFPOrdNotEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
292void EmitFPOrdNotEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
293void EmitFPUnordNotEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
294void EmitFPUnordNotEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
295void EmitFPUnordNotEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
296void EmitFPOrdLessThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
297void EmitFPOrdLessThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
298void EmitFPOrdLessThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
299void EmitFPUnordLessThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
300void EmitFPUnordLessThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
301void EmitFPUnordLessThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
302void EmitFPOrdGreaterThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
303void EmitFPOrdGreaterThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
304void EmitFPOrdGreaterThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
305void EmitFPUnordGreaterThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
306void EmitFPUnordGreaterThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
307void EmitFPUnordGreaterThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
308void EmitFPOrdLessThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
309void EmitFPOrdLessThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
310void EmitFPOrdLessThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
311void EmitFPUnordLessThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
312void EmitFPUnordLessThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
313void EmitFPUnordLessThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
314void EmitFPOrdGreaterThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
315void EmitFPOrdGreaterThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
316void EmitFPOrdGreaterThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
317void EmitFPUnordGreaterThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
318void EmitFPUnordGreaterThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
319void EmitFPUnordGreaterThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
320void EmitFPIsNan16(EmitContext& ctx, std::string_view value);
321void EmitFPIsNan32(EmitContext& ctx, std::string_view value);
322void EmitFPIsNan64(EmitContext& ctx, std::string_view value);
323void EmitIAdd32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b);
324void EmitIAdd64(EmitContext& ctx, std::string_view a, std::string_view b);
325void EmitISub32(EmitContext& ctx, std::string_view a, std::string_view b);
326void EmitISub64(EmitContext& ctx, std::string_view a, std::string_view b);
327void EmitIMul32(EmitContext& ctx, std::string_view a, std::string_view b);
328void EmitINeg32(EmitContext& ctx, std::string_view value);
329void EmitINeg64(EmitContext& ctx, std::string_view value);
330void EmitIAbs32(EmitContext& ctx, std::string_view value);
331void EmitIAbs64(EmitContext& ctx, std::string_view value);
332void EmitShiftLeftLogical32(EmitContext& ctx, std::string_view base, std::string_view shift);
333void EmitShiftLeftLogical64(EmitContext& ctx, std::string_view base, std::string_view shift);
334void EmitShiftRightLogical32(EmitContext& ctx, std::string_view base, std::string_view shift);
335void EmitShiftRightLogical64(EmitContext& ctx, std::string_view base, std::string_view shift);
336void EmitShiftRightArithmetic32(EmitContext& ctx, std::string_view base, std::string_view shift);
337void EmitShiftRightArithmetic64(EmitContext& ctx, std::string_view base, std::string_view shift);
338void EmitBitwiseAnd32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b);
339void EmitBitwiseOr32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b);
340void EmitBitwiseXor32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b);
341void EmitBitFieldInsert(EmitContext& ctx, std::string_view base, std::string_view insert,
342 std::string_view offset, std::string_view count);
343void EmitBitFieldSExtract(EmitContext& ctx, IR::Inst* inst, std::string_view base,
344 std::string_view offset, std::string_view count);
345void EmitBitFieldUExtract(EmitContext& ctx, IR::Inst* inst, std::string_view base,
346 std::string_view offset, std::string_view count);
347void EmitBitReverse32(EmitContext& ctx, std::string_view value);
348void EmitBitCount32(EmitContext& ctx, std::string_view value);
349void EmitBitwiseNot32(EmitContext& ctx, std::string_view value);
350void EmitFindSMsb32(EmitContext& ctx, std::string_view value);
351void EmitFindUMsb32(EmitContext& ctx, std::string_view value);
352void EmitSMin32(EmitContext& ctx, std::string_view a, std::string_view b);
353void EmitUMin32(EmitContext& ctx, std::string_view a, std::string_view b);
354void EmitSMax32(EmitContext& ctx, std::string_view a, std::string_view b);
355void EmitUMax32(EmitContext& ctx, std::string_view a, std::string_view b);
356void EmitSClamp32(EmitContext& ctx, IR::Inst* inst, std::string_view value, std::string_view min,
357 std::string_view max);
358void EmitUClamp32(EmitContext& ctx, IR::Inst* inst, std::string_view value, std::string_view min,
359 std::string_view max);
360void EmitSLessThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
361void EmitULessThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
362void EmitIEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
363void EmitSLessThanEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
364void EmitULessThanEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
365void EmitSGreaterThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
366void EmitUGreaterThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
367void EmitINotEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
368void EmitSGreaterThanEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
369void EmitUGreaterThanEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs);
370void EmitSharedAtomicIAdd32(EmitContext& ctx, std::string_view pointer_offset,
371 std::string_view value);
372void EmitSharedAtomicSMin32(EmitContext& ctx, std::string_view pointer_offset,
373 std::string_view value);
374void EmitSharedAtomicUMin32(EmitContext& ctx, std::string_view pointer_offset,
375 std::string_view value);
376void EmitSharedAtomicSMax32(EmitContext& ctx, std::string_view pointer_offset,
377 std::string_view value);
378void EmitSharedAtomicUMax32(EmitContext& ctx, std::string_view pointer_offset,
379 std::string_view value);
380void EmitSharedAtomicInc32(EmitContext& ctx, std::string_view pointer_offset,
381 std::string_view value);
382void EmitSharedAtomicDec32(EmitContext& ctx, std::string_view pointer_offset,
383 std::string_view value);
384void EmitSharedAtomicAnd32(EmitContext& ctx, std::string_view pointer_offset,
385 std::string_view value);
386void EmitSharedAtomicOr32(EmitContext& ctx, std::string_view pointer_offset,
387 std::string_view value);
388void EmitSharedAtomicXor32(EmitContext& ctx, std::string_view pointer_offset,
389 std::string_view value);
390void EmitSharedAtomicExchange32(EmitContext& ctx, std::string_view pointer_offset,
391 std::string_view value);
392void EmitSharedAtomicExchange64(EmitContext& ctx, std::string_view pointer_offset,
393 std::string_view value);
394void EmitStorageAtomicIAdd32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
395 std::string_view value);
396void EmitStorageAtomicSMin32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
397 std::string_view value);
398void EmitStorageAtomicUMin32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
399 std::string_view value);
400void EmitStorageAtomicSMax32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
401 std::string_view value);
402void EmitStorageAtomicUMax32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
403 std::string_view value);
404void EmitStorageAtomicInc32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
405 std::string_view value);
406void EmitStorageAtomicDec32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
407 std::string_view value);
408void EmitStorageAtomicAnd32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
409 std::string_view value);
410void EmitStorageAtomicOr32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
411 std::string_view value);
412void EmitStorageAtomicXor32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
413 std::string_view value);
414void EmitStorageAtomicExchange32(EmitContext& ctx, const IR::Value& binding,
415 const IR::Value& offset, std::string_view value);
416void EmitStorageAtomicIAdd64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
417 std::string_view value);
418void EmitStorageAtomicSMin64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
419 std::string_view value);
420void EmitStorageAtomicUMin64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
421 std::string_view value);
422void EmitStorageAtomicSMax64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
423 std::string_view value);
424void EmitStorageAtomicUMax64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
425 std::string_view value);
426void EmitStorageAtomicAnd64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
427 std::string_view value);
428void EmitStorageAtomicOr64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
429 std::string_view value);
430void EmitStorageAtomicXor64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
431 std::string_view value);
432void EmitStorageAtomicExchange64(EmitContext& ctx, const IR::Value& binding,
433 const IR::Value& offset, std::string_view value);
434void EmitStorageAtomicAddF32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
435 std::string_view value);
436void EmitStorageAtomicAddF16x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
437 std::string_view value);
438void EmitStorageAtomicAddF32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
439 std::string_view value);
440void EmitStorageAtomicMinF16x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
441 std::string_view value);
442void EmitStorageAtomicMinF32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
443 std::string_view value);
444void EmitStorageAtomicMaxF16x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
445 std::string_view value);
446void EmitStorageAtomicMaxF32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
447 std::string_view value);
448void EmitGlobalAtomicIAdd32(EmitContext& ctx);
449void EmitGlobalAtomicSMin32(EmitContext& ctx);
450void EmitGlobalAtomicUMin32(EmitContext& ctx);
451void EmitGlobalAtomicSMax32(EmitContext& ctx);
452void EmitGlobalAtomicUMax32(EmitContext& ctx);
453void EmitGlobalAtomicInc32(EmitContext& ctx);
454void EmitGlobalAtomicDec32(EmitContext& ctx);
455void EmitGlobalAtomicAnd32(EmitContext& ctx);
456void EmitGlobalAtomicOr32(EmitContext& ctx);
457void EmitGlobalAtomicXor32(EmitContext& ctx);
458void EmitGlobalAtomicExchange32(EmitContext& ctx);
459void EmitGlobalAtomicIAdd64(EmitContext& ctx);
460void EmitGlobalAtomicSMin64(EmitContext& ctx);
461void EmitGlobalAtomicUMin64(EmitContext& ctx);
462void EmitGlobalAtomicSMax64(EmitContext& ctx);
463void EmitGlobalAtomicUMax64(EmitContext& ctx);
464void EmitGlobalAtomicInc64(EmitContext& ctx);
465void EmitGlobalAtomicDec64(EmitContext& ctx);
466void EmitGlobalAtomicAnd64(EmitContext& ctx);
467void EmitGlobalAtomicOr64(EmitContext& ctx);
468void EmitGlobalAtomicXor64(EmitContext& ctx);
469void EmitGlobalAtomicExchange64(EmitContext& ctx);
470void EmitGlobalAtomicAddF32(EmitContext& ctx);
471void EmitGlobalAtomicAddF16x2(EmitContext& ctx);
472void EmitGlobalAtomicAddF32x2(EmitContext& ctx);
473void EmitGlobalAtomicMinF16x2(EmitContext& ctx);
474void EmitGlobalAtomicMinF32x2(EmitContext& ctx);
475void EmitGlobalAtomicMaxF16x2(EmitContext& ctx);
476void EmitGlobalAtomicMaxF32x2(EmitContext& ctx);
477void EmitLogicalOr(EmitContext& ctx, std::string_view a, std::string_view b);
478void EmitLogicalAnd(EmitContext& ctx, std::string_view a, std::string_view b);
479void EmitLogicalXor(EmitContext& ctx, std::string_view a, std::string_view b);
480void EmitLogicalNot(EmitContext& ctx, std::string_view value);
481void EmitConvertS16F16(EmitContext& ctx, std::string_view value);
482void EmitConvertS16F32(EmitContext& ctx, std::string_view value);
483void EmitConvertS16F64(EmitContext& ctx, std::string_view value);
484void EmitConvertS32F16(EmitContext& ctx, std::string_view value);
485void EmitConvertS32F32(EmitContext& ctx, std::string_view value);
486void EmitConvertS32F64(EmitContext& ctx, std::string_view value);
487void EmitConvertS64F16(EmitContext& ctx, std::string_view value);
488void EmitConvertS64F32(EmitContext& ctx, std::string_view value);
489void EmitConvertS64F64(EmitContext& ctx, std::string_view value);
490void EmitConvertU16F16(EmitContext& ctx, std::string_view value);
491void EmitConvertU16F32(EmitContext& ctx, std::string_view value);
492void EmitConvertU16F64(EmitContext& ctx, std::string_view value);
493void EmitConvertU32F16(EmitContext& ctx, std::string_view value);
494void EmitConvertU32F32(EmitContext& ctx, std::string_view value);
495void EmitConvertU32F64(EmitContext& ctx, std::string_view value);
496void EmitConvertU64F16(EmitContext& ctx, std::string_view value);
497void EmitConvertU64F32(EmitContext& ctx, std::string_view value);
498void EmitConvertU64F64(EmitContext& ctx, std::string_view value);
499void EmitConvertU64U32(EmitContext& ctx, std::string_view value);
500void EmitConvertU32U64(EmitContext& ctx, std::string_view value);
501void EmitConvertF16F32(EmitContext& ctx, std::string_view value);
502void EmitConvertF32F16(EmitContext& ctx, std::string_view value);
503void EmitConvertF32F64(EmitContext& ctx, std::string_view value);
504void EmitConvertF64F32(EmitContext& ctx, std::string_view value);
505void EmitConvertF16S8(EmitContext& ctx, std::string_view value);
506void EmitConvertF16S16(EmitContext& ctx, std::string_view value);
507void EmitConvertF16S32(EmitContext& ctx, std::string_view value);
508void EmitConvertF16S64(EmitContext& ctx, std::string_view value);
509void EmitConvertF16U8(EmitContext& ctx, std::string_view value);
510void EmitConvertF16U16(EmitContext& ctx, std::string_view value);
511void EmitConvertF16U32(EmitContext& ctx, std::string_view value);
512void EmitConvertF16U64(EmitContext& ctx, std::string_view value);
513void EmitConvertF32S8(EmitContext& ctx, std::string_view value);
514void EmitConvertF32S16(EmitContext& ctx, std::string_view value);
515void EmitConvertF32S32(EmitContext& ctx, std::string_view value);
516void EmitConvertF32S64(EmitContext& ctx, std::string_view value);
517void EmitConvertF32U8(EmitContext& ctx, std::string_view value);
518void EmitConvertF32U16(EmitContext& ctx, std::string_view value);
519void EmitConvertF32U32(EmitContext& ctx, std::string_view value);
520void EmitConvertF32U64(EmitContext& ctx, std::string_view value);
521void EmitConvertF64S8(EmitContext& ctx, std::string_view value);
522void EmitConvertF64S16(EmitContext& ctx, std::string_view value);
523void EmitConvertF64S32(EmitContext& ctx, std::string_view value);
524void EmitConvertF64S64(EmitContext& ctx, std::string_view value);
525void EmitConvertF64U8(EmitContext& ctx, std::string_view value);
526void EmitConvertF64U16(EmitContext& ctx, std::string_view value);
527void EmitConvertF64U32(EmitContext& ctx, std::string_view value);
528void EmitConvertF64U64(EmitContext& ctx, std::string_view value);
529void EmitBindlessImageSampleImplicitLod(EmitContext&);
530void EmitBindlessImageSampleExplicitLod(EmitContext&);
531void EmitBindlessImageSampleDrefImplicitLod(EmitContext&);
532void EmitBindlessImageSampleDrefExplicitLod(EmitContext&);
533void EmitBindlessImageGather(EmitContext&);
534void EmitBindlessImageGatherDref(EmitContext&);
535void EmitBindlessImageFetch(EmitContext&);
536void EmitBindlessImageQueryDimensions(EmitContext&);
537void EmitBindlessImageQueryLod(EmitContext&);
538void EmitBindlessImageGradient(EmitContext&);
539void EmitBindlessImageRead(EmitContext&);
540void EmitBindlessImageWrite(EmitContext&);
541void EmitBoundImageSampleImplicitLod(EmitContext&);
542void EmitBoundImageSampleExplicitLod(EmitContext&);
543void EmitBoundImageSampleDrefImplicitLod(EmitContext&);
544void EmitBoundImageSampleDrefExplicitLod(EmitContext&);
545void EmitBoundImageGather(EmitContext&);
546void EmitBoundImageGatherDref(EmitContext&);
547void EmitBoundImageFetch(EmitContext&);
548void EmitBoundImageQueryDimensions(EmitContext&);
549void EmitBoundImageQueryLod(EmitContext&);
550void EmitBoundImageGradient(EmitContext&);
551void EmitBoundImageRead(EmitContext&);
552void EmitBoundImageWrite(EmitContext&);
553void EmitImageSampleImplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
554 std::string_view coords, std::string_view bias_lc,
555 const IR::Value& offset);
556void EmitImageSampleExplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
557 std::string_view coords, std::string_view lod_lc,
558 const IR::Value& offset);
559void EmitImageSampleDrefImplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
560 std::string_view coords, std::string_view dref,
561 std::string_view bias_lc, const IR::Value& offset);
562void EmitImageSampleDrefExplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
563 std::string_view coords, std::string_view dref,
564 std::string_view lod_lc, const IR::Value& offset);
565void EmitImageGather(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
566 std::string_view coords, const IR::Value& offset, const IR::Value& offset2);
567void EmitImageGatherDref(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
568 std::string_view coords, const IR::Value& offset, const IR::Value& offset2,
569 std::string_view dref);
570void EmitImageFetch(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
571 std::string_view coords, std::string_view offset, std::string_view lod,
572 std::string_view ms);
573void EmitImageQueryDimensions(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
574 std::string_view lod);
575void EmitImageQueryLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
576 std::string_view coords);
577void EmitImageGradient(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
578 std::string_view coords, std::string_view derivates, std::string_view offset,
579 std::string_view lod_clamp);
580void EmitImageRead(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
581 std::string_view coords);
582void EmitImageWrite(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
583 std::string_view coords, std::string_view color);
584void EmitBindlessImageAtomicIAdd32(EmitContext&);
585void EmitBindlessImageAtomicSMin32(EmitContext&);
586void EmitBindlessImageAtomicUMin32(EmitContext&);
587void EmitBindlessImageAtomicSMax32(EmitContext&);
588void EmitBindlessImageAtomicUMax32(EmitContext&);
589void EmitBindlessImageAtomicInc32(EmitContext&);
590void EmitBindlessImageAtomicDec32(EmitContext&);
591void EmitBindlessImageAtomicAnd32(EmitContext&);
592void EmitBindlessImageAtomicOr32(EmitContext&);
593void EmitBindlessImageAtomicXor32(EmitContext&);
594void EmitBindlessImageAtomicExchange32(EmitContext&);
595void EmitBoundImageAtomicIAdd32(EmitContext&);
596void EmitBoundImageAtomicSMin32(EmitContext&);
597void EmitBoundImageAtomicUMin32(EmitContext&);
598void EmitBoundImageAtomicSMax32(EmitContext&);
599void EmitBoundImageAtomicUMax32(EmitContext&);
600void EmitBoundImageAtomicInc32(EmitContext&);
601void EmitBoundImageAtomicDec32(EmitContext&);
602void EmitBoundImageAtomicAnd32(EmitContext&);
603void EmitBoundImageAtomicOr32(EmitContext&);
604void EmitBoundImageAtomicXor32(EmitContext&);
605void EmitBoundImageAtomicExchange32(EmitContext&);
606void EmitImageAtomicIAdd32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
607 std::string_view coords, std::string_view value);
608void EmitImageAtomicSMin32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
609 std::string_view coords, std::string_view value);
610void EmitImageAtomicUMin32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
611 std::string_view coords, std::string_view value);
612void EmitImageAtomicSMax32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
613 std::string_view coords, std::string_view value);
614void EmitImageAtomicUMax32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
615 std::string_view coords, std::string_view value);
616void EmitImageAtomicInc32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
617 std::string_view coords, std::string_view value);
618void EmitImageAtomicDec32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
619 std::string_view coords, std::string_view value);
620void EmitImageAtomicAnd32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
621 std::string_view coords, std::string_view value);
622void EmitImageAtomicOr32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
623 std::string_view coords, std::string_view value);
624void EmitImageAtomicXor32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
625 std::string_view coords, std::string_view value);
626void EmitImageAtomicExchange32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
627 std::string_view coords, std::string_view value);
628void EmitLaneId(EmitContext& ctx);
629void EmitVoteAll(EmitContext& ctx, std::string_view pred);
630void EmitVoteAny(EmitContext& ctx, std::string_view pred);
631void EmitVoteEqual(EmitContext& ctx, std::string_view pred);
632void EmitSubgroupBallot(EmitContext& ctx, std::string_view pred);
633void EmitSubgroupEqMask(EmitContext& ctx);
634void EmitSubgroupLtMask(EmitContext& ctx);
635void EmitSubgroupLeMask(EmitContext& ctx);
636void EmitSubgroupGtMask(EmitContext& ctx);
637void EmitSubgroupGeMask(EmitContext& ctx);
638void EmitShuffleIndex(EmitContext& ctx, IR::Inst* inst, std::string_view value,
639 std::string_view index, std::string_view clamp,
640 std::string_view segmentation_mask);
641void EmitShuffleUp(EmitContext& ctx, IR::Inst* inst, std::string_view value, std::string_view index,
642 std::string_view clamp, std::string_view segmentation_mask);
643void EmitShuffleDown(EmitContext& ctx, IR::Inst* inst, std::string_view value,
644 std::string_view index, std::string_view clamp,
645 std::string_view segmentation_mask);
646void EmitShuffleButterfly(EmitContext& ctx, IR::Inst* inst, std::string_view value,
647 std::string_view index, std::string_view clamp,
648 std::string_view segmentation_mask);
649void EmitFSwizzleAdd(EmitContext& ctx, std::string_view op_a, std::string_view op_b,
650 std::string_view swizzle);
651void EmitDPdxFine(EmitContext& ctx, std::string_view op_a);
652void EmitDPdyFine(EmitContext& ctx, std::string_view op_a);
653void EmitDPdxCoarse(EmitContext& ctx, std::string_view op_a);
654void EmitDPdyCoarse(EmitContext& ctx, std::string_view op_a);
655
656} // namespace Shader::Backend::GLSL
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_logical.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_logical.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_logical.cpp
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_memory.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_memory.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_memory.cpp
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_not_implemented.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_not_implemented.cpp
new file mode 100644
index 000000000..8bd40458b
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_not_implemented.cpp
@@ -0,0 +1,2149 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include <string_view>
6
7#include "shader_recompiler/backend/glsl/emit_context.h"
8#include "shader_recompiler/backend/glsl/emit_glsl_instructions.h"
9#include "shader_recompiler/frontend/ir/program.h"
10#include "shader_recompiler/frontend/ir/value.h"
11
12#ifdef _MSC_VER
13#pragma warning(disable : 4100)
14#endif
15
16namespace Shader::Backend::GLSL {
17
18static void NotImplemented() {
19 throw NotImplementedException("GLSL instruction");
20}
21
22void EmitPhi(EmitContext& ctx, IR::Inst* inst) {
23 NotImplemented();
24}
25
26void EmitVoid(EmitContext& ctx) {
27 NotImplemented();
28}
29
30void EmitIdentity(EmitContext& ctx, const IR::Value& value) {
31 const auto var{ctx.AllocVar()};
32 switch (value.Type()) {
33 case IR::Type::U32:
34 ctx.Add("uint {}={};", var, value.U32());
35 break;
36 default:
37 ctx.Add("EmitIdentity {}", value.Type());
38 break;
39 }
40}
41
42void EmitConditionRef(EmitContext& ctx, IR::Inst& inst, const IR::Value& value) {
43 NotImplemented();
44}
45
46void EmitReference(EmitContext&) {
47 NotImplemented();
48}
49
50void EmitPhiMove(EmitContext& ctx, const IR::Value& phi, const IR::Value& value) {
51 NotImplemented();
52}
53
54void EmitBranch(EmitContext& ctx, std::string_view label) {
55 NotImplemented();
56}
57
58void EmitBranchConditional(EmitContext& ctx, std::string_view condition,
59 std::string_view true_label, std::string_view false_label) {
60 NotImplemented();
61}
62
63void EmitLoopMerge(EmitContext& ctx, std::string_view merge_label,
64 std::string_view continue_label) {
65 NotImplemented();
66}
67
68void EmitSelectionMerge(EmitContext& ctx, std::string_view merge_label) {
69 NotImplemented();
70}
71
72void EmitReturn(EmitContext& ctx) {
73 NotImplemented();
74}
75
76void EmitJoin(EmitContext& ctx) {
77 NotImplemented();
78}
79
80void EmitUnreachable(EmitContext& ctx) {
81 NotImplemented();
82}
83
84void EmitDemoteToHelperInvocation(EmitContext& ctx, std::string_view continue_label) {
85 NotImplemented();
86}
87
88void EmitBarrier(EmitContext& ctx) {
89 NotImplemented();
90}
91
92void EmitWorkgroupMemoryBarrier(EmitContext& ctx) {
93 NotImplemented();
94}
95
96void EmitDeviceMemoryBarrier(EmitContext& ctx) {
97 NotImplemented();
98}
99
100void EmitPrologue(EmitContext& ctx) {
101 // NotImplemented();
102}
103
104void EmitEpilogue(EmitContext& ctx) {
105 // NotImplemented();
106}
107
108void EmitEmitVertex(EmitContext& ctx, const IR::Value& stream) {
109 NotImplemented();
110}
111
112void EmitEndPrimitive(EmitContext& ctx, const IR::Value& stream) {
113 NotImplemented();
114}
115
116void EmitGetRegister(EmitContext& ctx) {
117 NotImplemented();
118}
119
120void EmitSetRegister(EmitContext& ctx) {
121 NotImplemented();
122}
123
124void EmitGetPred(EmitContext& ctx) {
125 NotImplemented();
126}
127
128void EmitSetPred(EmitContext& ctx) {
129 NotImplemented();
130}
131
132void EmitSetGotoVariable(EmitContext& ctx) {
133 NotImplemented();
134}
135
136void EmitGetGotoVariable(EmitContext& ctx) {
137 NotImplemented();
138}
139
140void EmitSetIndirectBranchVariable(EmitContext& ctx) {
141 NotImplemented();
142}
143
144void EmitGetIndirectBranchVariable(EmitContext& ctx) {
145 NotImplemented();
146}
147
148void EmitGetAttribute(EmitContext& ctx, IR::Attribute attr, std::string_view vertex) {
149 NotImplemented();
150}
151
152void EmitSetAttribute(EmitContext& ctx, IR::Attribute attr, std::string_view value,
153 std::string_view vertex) {
154 NotImplemented();
155}
156
157void EmitGetAttributeIndexed(EmitContext& ctx, std::string_view offset, std::string_view vertex) {
158 NotImplemented();
159}
160
161void EmitSetAttributeIndexed(EmitContext& ctx, std::string_view offset, std::string_view value,
162 std::string_view vertex) {
163 NotImplemented();
164}
165
166void EmitGetPatch(EmitContext& ctx, IR::Patch patch) {
167 NotImplemented();
168}
169
170void EmitSetPatch(EmitContext& ctx, IR::Patch patch, std::string_view value) {
171 NotImplemented();
172}
173
174void EmitSetFragColor(EmitContext& ctx, u32 index, u32 component, std::string_view value) {
175 NotImplemented();
176}
177
178void EmitSetSampleMask(EmitContext& ctx, std::string_view value) {
179 NotImplemented();
180}
181
182void EmitSetFragDepth(EmitContext& ctx, std::string_view value) {
183 NotImplemented();
184}
185
186void EmitGetZFlag(EmitContext& ctx) {
187 NotImplemented();
188}
189
190void EmitGetSFlag(EmitContext& ctx) {
191 NotImplemented();
192}
193
194void EmitGetCFlag(EmitContext& ctx) {
195 NotImplemented();
196}
197
198void EmitGetOFlag(EmitContext& ctx) {
199 NotImplemented();
200}
201
202void EmitSetZFlag(EmitContext& ctx) {
203 NotImplemented();
204}
205
206void EmitSetSFlag(EmitContext& ctx) {
207 NotImplemented();
208}
209
210void EmitSetCFlag(EmitContext& ctx) {
211 NotImplemented();
212}
213
214void EmitSetOFlag(EmitContext& ctx) {
215 NotImplemented();
216}
217
218void EmitWorkgroupId(EmitContext& ctx) {
219 NotImplemented();
220}
221
222void EmitLocalInvocationId(EmitContext& ctx) {
223 NotImplemented();
224}
225
226void EmitInvocationId(EmitContext& ctx) {
227 NotImplemented();
228}
229
230void EmitSampleId(EmitContext& ctx) {
231 NotImplemented();
232}
233
234void EmitIsHelperInvocation(EmitContext& ctx) {
235 NotImplemented();
236}
237
238void EmitYDirection(EmitContext& ctx) {
239 NotImplemented();
240}
241
242void EmitLoadLocal(EmitContext& ctx, std::string_view word_offset) {
243 NotImplemented();
244}
245
246void EmitWriteLocal(EmitContext& ctx, std::string_view word_offset, std::string_view value) {
247 NotImplemented();
248}
249
250void EmitUndefU1(EmitContext& ctx) {
251 NotImplemented();
252}
253
254void EmitUndefU8(EmitContext& ctx) {
255 NotImplemented();
256}
257
258void EmitUndefU16(EmitContext& ctx) {
259 NotImplemented();
260}
261
262void EmitUndefU32(EmitContext& ctx) {
263 NotImplemented();
264}
265
266void EmitUndefU64(EmitContext& ctx) {
267 NotImplemented();
268}
269
270void EmitLoadGlobalU8(EmitContext& ctx) {
271 NotImplemented();
272}
273
274void EmitLoadGlobalS8(EmitContext& ctx) {
275 NotImplemented();
276}
277
278void EmitLoadGlobalU16(EmitContext& ctx) {
279 NotImplemented();
280}
281
282void EmitLoadGlobalS16(EmitContext& ctx) {
283 NotImplemented();
284}
285
286void EmitLoadGlobal32(EmitContext& ctx, std::string_view address) {
287 NotImplemented();
288}
289
290void EmitLoadGlobal64(EmitContext& ctx, std::string_view address) {
291 NotImplemented();
292}
293
294void EmitLoadGlobal128(EmitContext& ctx, std::string_view address) {
295 NotImplemented();
296}
297
298void EmitWriteGlobalU8(EmitContext& ctx) {
299 NotImplemented();
300}
301
302void EmitWriteGlobalS8(EmitContext& ctx) {
303 NotImplemented();
304}
305
306void EmitWriteGlobalU16(EmitContext& ctx) {
307 NotImplemented();
308}
309
310void EmitWriteGlobalS16(EmitContext& ctx) {
311 NotImplemented();
312}
313
314void EmitWriteGlobal32(EmitContext& ctx, std::string_view address, std::string_view value) {
315 NotImplemented();
316}
317
318void EmitWriteGlobal64(EmitContext& ctx, std::string_view address, std::string_view value) {
319 NotImplemented();
320}
321
322void EmitWriteGlobal128(EmitContext& ctx, std::string_view address, std::string_view value) {
323 NotImplemented();
324}
325
326void EmitLoadStorageU8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
327 NotImplemented();
328}
329
330void EmitLoadStorageS8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
331 NotImplemented();
332}
333
334void EmitLoadStorageU16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
335 NotImplemented();
336}
337
338void EmitLoadStorageS16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
339 NotImplemented();
340}
341
342void EmitLoadStorage32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
343 NotImplemented();
344}
345
346void EmitLoadStorage64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
347 NotImplemented();
348}
349
350void EmitLoadStorage128(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset) {
351 NotImplemented();
352}
353
354void EmitWriteStorageU8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
355 std::string_view value) {
356 NotImplemented();
357}
358
359void EmitWriteStorageS8(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
360 std::string_view value) {
361 NotImplemented();
362}
363
364void EmitWriteStorageU16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
365 std::string_view value) {
366 NotImplemented();
367}
368
369void EmitWriteStorageS16(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
370 std::string_view value) {
371 NotImplemented();
372}
373
374void EmitWriteStorage32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
375 std::string_view value) {
376 // ctx.Add("c{}[{}]={}", binding.U32() + 2, offset.U32(), 16);
377 ctx.Add("EmitWriteStorage32");
378 // ctx.Add("c{}[{}]={}", binding.U32(), offset.U32(), value);
379}
380
381void EmitWriteStorage64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
382 std::string_view value) {
383 NotImplemented();
384}
385
386void EmitWriteStorage128(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
387 std::string_view value) {
388 NotImplemented();
389}
390
391void EmitLoadSharedU8(EmitContext& ctx, std::string_view offset) {
392 NotImplemented();
393}
394
395void EmitLoadSharedS8(EmitContext& ctx, std::string_view offset) {
396 NotImplemented();
397}
398
399void EmitLoadSharedU16(EmitContext& ctx, std::string_view offset) {
400 NotImplemented();
401}
402
403void EmitLoadSharedS16(EmitContext& ctx, std::string_view offset) {
404 NotImplemented();
405}
406
407void EmitLoadSharedU32(EmitContext& ctx, std::string_view offset) {
408 NotImplemented();
409}
410
411void EmitLoadSharedU64(EmitContext& ctx, std::string_view offset) {
412 NotImplemented();
413}
414
415void EmitLoadSharedU128(EmitContext& ctx, std::string_view offset) {
416 NotImplemented();
417}
418
419void EmitWriteSharedU8(EmitContext& ctx, std::string_view offset, std::string_view value) {
420 NotImplemented();
421}
422
423void EmitWriteSharedU16(EmitContext& ctx, std::string_view offset, std::string_view value) {
424 NotImplemented();
425}
426
427void EmitWriteSharedU32(EmitContext& ctx, std::string_view offset, std::string_view value) {
428 NotImplemented();
429}
430
431void EmitWriteSharedU64(EmitContext& ctx, std::string_view offset, std::string_view value) {
432 NotImplemented();
433}
434
435void EmitWriteSharedU128(EmitContext& ctx, std::string_view offset, std::string_view value) {
436 NotImplemented();
437}
438
439void EmitCompositeConstructU32x2(EmitContext& ctx, std::string_view e1, std::string_view e2) {
440 NotImplemented();
441}
442
443void EmitCompositeConstructU32x3(EmitContext& ctx, std::string_view e1, std::string_view e2,
444 std::string_view e3) {
445 NotImplemented();
446}
447
448void EmitCompositeConstructU32x4(EmitContext& ctx, std::string_view e1, std::string_view e2,
449 std::string_view e3, std::string_view e4) {
450 NotImplemented();
451}
452
453void EmitCompositeExtractU32x2(EmitContext& ctx, std::string_view composite, u32 index) {
454 NotImplemented();
455}
456
457void EmitCompositeExtractU32x3(EmitContext& ctx, std::string_view composite, u32 index) {
458 NotImplemented();
459}
460
461void EmitCompositeExtractU32x4(EmitContext& ctx, std::string_view composite, u32 index) {
462 NotImplemented();
463}
464
465void EmitCompositeInsertU32x2(EmitContext& ctx, std::string_view composite, std::string_view object,
466 u32 index) {
467 NotImplemented();
468}
469
470void EmitCompositeInsertU32x3(EmitContext& ctx, std::string_view composite, std::string_view object,
471 u32 index) {
472 NotImplemented();
473}
474
475void EmitCompositeInsertU32x4(EmitContext& ctx, std::string_view composite, std::string_view object,
476 u32 index) {
477 NotImplemented();
478}
479
480void EmitCompositeConstructF16x2(EmitContext& ctx, std::string_view e1, std::string_view e2) {
481 NotImplemented();
482}
483
484void EmitCompositeConstructF16x3(EmitContext& ctx, std::string_view e1, std::string_view e2,
485 std::string_view e3) {
486 NotImplemented();
487}
488
489void EmitCompositeConstructF16x4(EmitContext& ctx, std::string_view e1, std::string_view e2,
490 std::string_view e3, std::string_view e4) {
491 NotImplemented();
492}
493
494void EmitCompositeExtractF16x2(EmitContext& ctx, std::string_view composite, u32 index) {
495 NotImplemented();
496}
497
498void EmitCompositeExtractF16x3(EmitContext& ctx, std::string_view composite, u32 index) {
499 NotImplemented();
500}
501
502void EmitCompositeExtractF16x4(EmitContext& ctx, std::string_view composite, u32 index) {
503 NotImplemented();
504}
505
506void EmitCompositeInsertF16x2(EmitContext& ctx, std::string_view composite, std::string_view object,
507 u32 index) {
508 NotImplemented();
509}
510
511void EmitCompositeInsertF16x3(EmitContext& ctx, std::string_view composite, std::string_view object,
512 u32 index) {
513 NotImplemented();
514}
515
516void EmitCompositeInsertF16x4(EmitContext& ctx, std::string_view composite, std::string_view object,
517 u32 index) {
518 NotImplemented();
519}
520
521void EmitCompositeConstructF32x2(EmitContext& ctx, std::string_view e1, std::string_view e2) {
522 NotImplemented();
523}
524
525void EmitCompositeConstructF32x3(EmitContext& ctx, std::string_view e1, std::string_view e2,
526 std::string_view e3) {
527 NotImplemented();
528}
529
530void EmitCompositeConstructF32x4(EmitContext& ctx, std::string_view e1, std::string_view e2,
531 std::string_view e3, std::string_view e4) {
532 NotImplemented();
533}
534
535void EmitCompositeExtractF32x2(EmitContext& ctx, std::string_view composite, u32 index) {
536 NotImplemented();
537}
538
539void EmitCompositeExtractF32x3(EmitContext& ctx, std::string_view composite, u32 index) {
540 NotImplemented();
541}
542
543void EmitCompositeExtractF32x4(EmitContext& ctx, std::string_view composite, u32 index) {
544 NotImplemented();
545}
546
547void EmitCompositeInsertF32x2(EmitContext& ctx, std::string_view composite, std::string_view object,
548 u32 index) {
549 NotImplemented();
550}
551
552void EmitCompositeInsertF32x3(EmitContext& ctx, std::string_view composite, std::string_view object,
553 u32 index) {
554 NotImplemented();
555}
556
557void EmitCompositeInsertF32x4(EmitContext& ctx, std::string_view composite, std::string_view object,
558 u32 index) {
559 NotImplemented();
560}
561
562void EmitCompositeConstructF64x2(EmitContext& ctx) {
563 NotImplemented();
564}
565
566void EmitCompositeConstructF64x3(EmitContext& ctx) {
567 NotImplemented();
568}
569
570void EmitCompositeConstructF64x4(EmitContext& ctx) {
571 NotImplemented();
572}
573
574void EmitCompositeExtractF64x2(EmitContext& ctx) {
575 NotImplemented();
576}
577
578void EmitCompositeExtractF64x3(EmitContext& ctx) {
579 NotImplemented();
580}
581
582void EmitCompositeExtractF64x4(EmitContext& ctx) {
583 NotImplemented();
584}
585
586void EmitCompositeInsertF64x2(EmitContext& ctx, std::string_view composite, std::string_view object,
587 u32 index) {
588 NotImplemented();
589}
590
591void EmitCompositeInsertF64x3(EmitContext& ctx, std::string_view composite, std::string_view object,
592 u32 index) {
593 NotImplemented();
594}
595
596void EmitCompositeInsertF64x4(EmitContext& ctx, std::string_view composite, std::string_view object,
597 u32 index) {
598 NotImplemented();
599}
600
601void EmitSelectU1(EmitContext& ctx, std::string_view cond, std::string_view true_value,
602 std::string_view false_value) {
603 NotImplemented();
604}
605
606void EmitSelectU8(EmitContext& ctx, std::string_view cond, std::string_view true_value,
607 std::string_view false_value) {
608 NotImplemented();
609}
610
611void EmitSelectU16(EmitContext& ctx, std::string_view cond, std::string_view true_value,
612 std::string_view false_value) {
613 NotImplemented();
614}
615
616void EmitSelectU32(EmitContext& ctx, std::string_view cond, std::string_view true_value,
617 std::string_view false_value) {
618 NotImplemented();
619}
620
621void EmitSelectU64(EmitContext& ctx, std::string_view cond, std::string_view true_value,
622 std::string_view false_value) {
623 NotImplemented();
624}
625
626void EmitSelectF16(EmitContext& ctx, std::string_view cond, std::string_view true_value,
627 std::string_view false_value) {
628 NotImplemented();
629}
630
631void EmitSelectF32(EmitContext& ctx, std::string_view cond, std::string_view true_value,
632 std::string_view false_value) {
633 NotImplemented();
634}
635
636void EmitSelectF64(EmitContext& ctx, std::string_view cond, std::string_view true_value,
637 std::string_view false_value) {
638 NotImplemented();
639}
640
641void EmitBitCastU16F16(EmitContext& ctx) {
642 NotImplemented();
643}
644
645void EmitBitCastU32F32(EmitContext& ctx, std::string_view value) {
646 NotImplemented();
647}
648
649void EmitBitCastU64F64(EmitContext& ctx) {
650 NotImplemented();
651}
652
653void EmitBitCastF16U16(EmitContext& ctx) {
654 NotImplemented();
655}
656
657void EmitBitCastF32U32(EmitContext& ctx, std::string_view value) {
658 NotImplemented();
659}
660
661void EmitBitCastF64U64(EmitContext& ctx) {
662 NotImplemented();
663}
664
665void EmitPackUint2x32(EmitContext& ctx, std::string_view value) {
666 NotImplemented();
667}
668
669void EmitUnpackUint2x32(EmitContext& ctx, std::string_view value) {
670 NotImplemented();
671}
672
673void EmitPackFloat2x16(EmitContext& ctx, std::string_view value) {
674 NotImplemented();
675}
676
677void EmitUnpackFloat2x16(EmitContext& ctx, std::string_view value) {
678 NotImplemented();
679}
680
681void EmitPackHalf2x16(EmitContext& ctx, std::string_view value) {
682 NotImplemented();
683}
684
685void EmitUnpackHalf2x16(EmitContext& ctx, std::string_view value) {
686 NotImplemented();
687}
688
689void EmitPackDouble2x32(EmitContext& ctx, std::string_view value) {
690 NotImplemented();
691}
692
693void EmitUnpackDouble2x32(EmitContext& ctx, std::string_view value) {
694 NotImplemented();
695}
696
697void EmitGetZeroFromOp(EmitContext& ctx) {
698 NotImplemented();
699}
700
701void EmitGetSignFromOp(EmitContext& ctx) {
702 NotImplemented();
703}
704
705void EmitGetCarryFromOp(EmitContext& ctx) {
706 NotImplemented();
707}
708
709void EmitGetOverflowFromOp(EmitContext& ctx) {
710 NotImplemented();
711}
712
713void EmitGetSparseFromOp(EmitContext& ctx) {
714 NotImplemented();
715}
716
717void EmitGetInBoundsFromOp(EmitContext& ctx) {
718 NotImplemented();
719}
720
721void EmitFPAbs16(EmitContext& ctx, std::string_view value) {
722 NotImplemented();
723}
724
725void EmitFPAbs32(EmitContext& ctx, std::string_view value) {
726 NotImplemented();
727}
728
729void EmitFPAbs64(EmitContext& ctx, std::string_view value) {
730 NotImplemented();
731}
732
733void EmitFPAdd16(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) {
734 NotImplemented();
735}
736
737void EmitFPAdd32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) {
738 NotImplemented();
739}
740
741void EmitFPAdd64(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) {
742 NotImplemented();
743}
744
745void EmitFPFma16(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b,
746 std::string_view c) {
747 NotImplemented();
748}
749
750void EmitFPFma32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b,
751 std::string_view c) {
752 NotImplemented();
753}
754
755void EmitFPFma64(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b,
756 std::string_view c) {
757 NotImplemented();
758}
759
760void EmitFPMax32(EmitContext& ctx, std::string_view a, std::string_view b) {
761 NotImplemented();
762}
763
764void EmitFPMax64(EmitContext& ctx, std::string_view a, std::string_view b) {
765 NotImplemented();
766}
767
768void EmitFPMin32(EmitContext& ctx, std::string_view a, std::string_view b) {
769 NotImplemented();
770}
771
772void EmitFPMin64(EmitContext& ctx, std::string_view a, std::string_view b) {
773 NotImplemented();
774}
775
776void EmitFPMul16(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) {
777 NotImplemented();
778}
779
780void EmitFPMul32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) {
781 NotImplemented();
782}
783
784void EmitFPMul64(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) {
785 NotImplemented();
786}
787
788void EmitFPNeg16(EmitContext& ctx, std::string_view value) {
789 NotImplemented();
790}
791
792void EmitFPNeg32(EmitContext& ctx, std::string_view value) {
793 NotImplemented();
794}
795
796void EmitFPNeg64(EmitContext& ctx, std::string_view value) {
797 NotImplemented();
798}
799
800void EmitFPSin(EmitContext& ctx, std::string_view value) {
801 NotImplemented();
802}
803
804void EmitFPCos(EmitContext& ctx, std::string_view value) {
805 NotImplemented();
806}
807
808void EmitFPExp2(EmitContext& ctx, std::string_view value) {
809 NotImplemented();
810}
811
812void EmitFPLog2(EmitContext& ctx, std::string_view value) {
813 NotImplemented();
814}
815
816void EmitFPRecip32(EmitContext& ctx, std::string_view value) {
817 NotImplemented();
818}
819
820void EmitFPRecip64(EmitContext& ctx, std::string_view value) {
821 NotImplemented();
822}
823
824void EmitFPRecipSqrt32(EmitContext& ctx, std::string_view value) {
825 NotImplemented();
826}
827
828void EmitFPRecipSqrt64(EmitContext& ctx, std::string_view value) {
829 NotImplemented();
830}
831
832void EmitFPSqrt(EmitContext& ctx, std::string_view value) {
833 NotImplemented();
834}
835
836void EmitFPSaturate16(EmitContext& ctx, std::string_view value) {
837 NotImplemented();
838}
839
840void EmitFPSaturate32(EmitContext& ctx, std::string_view value) {
841 NotImplemented();
842}
843
844void EmitFPSaturate64(EmitContext& ctx, std::string_view value) {
845 NotImplemented();
846}
847
848void EmitFPClamp16(EmitContext& ctx, std::string_view value, std::string_view min_value,
849 std::string_view max_value) {
850 NotImplemented();
851}
852
853void EmitFPClamp32(EmitContext& ctx, std::string_view value, std::string_view min_value,
854 std::string_view max_value) {
855 NotImplemented();
856}
857
858void EmitFPClamp64(EmitContext& ctx, std::string_view value, std::string_view min_value,
859 std::string_view max_value) {
860 NotImplemented();
861}
862
863void EmitFPRoundEven16(EmitContext& ctx, std::string_view value) {
864 NotImplemented();
865}
866
867void EmitFPRoundEven32(EmitContext& ctx, std::string_view value) {
868 NotImplemented();
869}
870
871void EmitFPRoundEven64(EmitContext& ctx, std::string_view value) {
872 NotImplemented();
873}
874
875void EmitFPFloor16(EmitContext& ctx, std::string_view value) {
876 NotImplemented();
877}
878
879void EmitFPFloor32(EmitContext& ctx, std::string_view value) {
880 NotImplemented();
881}
882
883void EmitFPFloor64(EmitContext& ctx, std::string_view value) {
884 NotImplemented();
885}
886
887void EmitFPCeil16(EmitContext& ctx, std::string_view value) {
888 NotImplemented();
889}
890
891void EmitFPCeil32(EmitContext& ctx, std::string_view value) {
892 NotImplemented();
893}
894
895void EmitFPCeil64(EmitContext& ctx, std::string_view value) {
896 NotImplemented();
897}
898
899void EmitFPTrunc16(EmitContext& ctx, std::string_view value) {
900 NotImplemented();
901}
902
903void EmitFPTrunc32(EmitContext& ctx, std::string_view value) {
904 NotImplemented();
905}
906
907void EmitFPTrunc64(EmitContext& ctx, std::string_view value) {
908 NotImplemented();
909}
910
911void EmitFPOrdEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
912 NotImplemented();
913}
914
915void EmitFPOrdEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
916 NotImplemented();
917}
918
919void EmitFPOrdEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
920 NotImplemented();
921}
922
923void EmitFPUnordEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
924 NotImplemented();
925}
926
927void EmitFPUnordEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
928 NotImplemented();
929}
930
931void EmitFPUnordEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
932 NotImplemented();
933}
934
935void EmitFPOrdNotEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
936 NotImplemented();
937}
938
939void EmitFPOrdNotEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
940 NotImplemented();
941}
942
943void EmitFPOrdNotEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
944 NotImplemented();
945}
946
947void EmitFPUnordNotEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
948 NotImplemented();
949}
950
951void EmitFPUnordNotEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
952 NotImplemented();
953}
954
955void EmitFPUnordNotEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
956 NotImplemented();
957}
958
959void EmitFPOrdLessThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
960 NotImplemented();
961}
962
963void EmitFPOrdLessThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
964 NotImplemented();
965}
966
967void EmitFPOrdLessThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
968 NotImplemented();
969}
970
971void EmitFPUnordLessThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
972 NotImplemented();
973}
974
975void EmitFPUnordLessThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
976 NotImplemented();
977}
978
979void EmitFPUnordLessThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
980 NotImplemented();
981}
982
983void EmitFPOrdGreaterThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
984 NotImplemented();
985}
986
987void EmitFPOrdGreaterThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
988 NotImplemented();
989}
990
991void EmitFPOrdGreaterThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
992 NotImplemented();
993}
994
995void EmitFPUnordGreaterThan16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
996 NotImplemented();
997}
998
999void EmitFPUnordGreaterThan32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1000 NotImplemented();
1001}
1002
1003void EmitFPUnordGreaterThan64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1004 NotImplemented();
1005}
1006
1007void EmitFPOrdLessThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1008 NotImplemented();
1009}
1010
1011void EmitFPOrdLessThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1012 NotImplemented();
1013}
1014
1015void EmitFPOrdLessThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1016 NotImplemented();
1017}
1018
1019void EmitFPUnordLessThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1020 NotImplemented();
1021}
1022
1023void EmitFPUnordLessThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1024 NotImplemented();
1025}
1026
1027void EmitFPUnordLessThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1028 NotImplemented();
1029}
1030
1031void EmitFPOrdGreaterThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1032 NotImplemented();
1033}
1034
1035void EmitFPOrdGreaterThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1036 NotImplemented();
1037}
1038
1039void EmitFPOrdGreaterThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1040 NotImplemented();
1041}
1042
1043void EmitFPUnordGreaterThanEqual16(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1044 NotImplemented();
1045}
1046
1047void EmitFPUnordGreaterThanEqual32(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1048 NotImplemented();
1049}
1050
1051void EmitFPUnordGreaterThanEqual64(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1052 NotImplemented();
1053}
1054
1055void EmitFPIsNan16(EmitContext& ctx, std::string_view value) {
1056 NotImplemented();
1057}
1058
1059void EmitFPIsNan32(EmitContext& ctx, std::string_view value) {
1060 NotImplemented();
1061}
1062
1063void EmitFPIsNan64(EmitContext& ctx, std::string_view value) {
1064 NotImplemented();
1065}
1066
1067void EmitIAdd32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) {
1068 NotImplemented();
1069}
1070
1071void EmitIAdd64(EmitContext& ctx, std::string_view a, std::string_view b) {
1072 NotImplemented();
1073}
1074
1075void EmitISub32(EmitContext& ctx, std::string_view a, std::string_view b) {
1076 NotImplemented();
1077}
1078
1079void EmitISub64(EmitContext& ctx, std::string_view a, std::string_view b) {
1080 NotImplemented();
1081}
1082
1083void EmitIMul32(EmitContext& ctx, std::string_view a, std::string_view b) {
1084 NotImplemented();
1085}
1086
1087void EmitINeg32(EmitContext& ctx, std::string_view value) {
1088 NotImplemented();
1089}
1090
1091void EmitINeg64(EmitContext& ctx, std::string_view value) {
1092 NotImplemented();
1093}
1094
1095void EmitIAbs32(EmitContext& ctx, std::string_view value) {
1096 NotImplemented();
1097}
1098
1099void EmitIAbs64(EmitContext& ctx, std::string_view value) {
1100 NotImplemented();
1101}
1102
1103void EmitShiftLeftLogical32(EmitContext& ctx, std::string_view base, std::string_view shift) {
1104 NotImplemented();
1105}
1106
1107void EmitShiftLeftLogical64(EmitContext& ctx, std::string_view base, std::string_view shift) {
1108 NotImplemented();
1109}
1110
1111void EmitShiftRightLogical32(EmitContext& ctx, std::string_view base, std::string_view shift) {
1112 NotImplemented();
1113}
1114
1115void EmitShiftRightLogical64(EmitContext& ctx, std::string_view base, std::string_view shift) {
1116 NotImplemented();
1117}
1118
1119void EmitShiftRightArithmetic32(EmitContext& ctx, std::string_view base, std::string_view shift) {
1120 NotImplemented();
1121}
1122
1123void EmitShiftRightArithmetic64(EmitContext& ctx, std::string_view base, std::string_view shift) {
1124 NotImplemented();
1125}
1126
1127void EmitBitwiseAnd32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) {
1128 NotImplemented();
1129}
1130
1131void EmitBitwiseOr32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) {
1132 NotImplemented();
1133}
1134
1135void EmitBitwiseXor32(EmitContext& ctx, IR::Inst* inst, std::string_view a, std::string_view b) {
1136 NotImplemented();
1137}
1138
1139void EmitBitFieldInsert(EmitContext& ctx, std::string_view base, std::string_view insert,
1140 std::string_view offset, std::string_view count) {
1141 NotImplemented();
1142}
1143
1144void EmitBitFieldSExtract(EmitContext& ctx, IR::Inst* inst, std::string_view base,
1145 std::string_view offset, std::string_view count) {
1146 NotImplemented();
1147}
1148
1149void EmitBitFieldUExtract(EmitContext& ctx, IR::Inst* inst, std::string_view base,
1150 std::string_view offset, std::string_view count) {
1151 NotImplemented();
1152}
1153
1154void EmitBitReverse32(EmitContext& ctx, std::string_view value) {
1155 NotImplemented();
1156}
1157
1158void EmitBitCount32(EmitContext& ctx, std::string_view value) {
1159 NotImplemented();
1160}
1161
1162void EmitBitwiseNot32(EmitContext& ctx, std::string_view value) {
1163 NotImplemented();
1164}
1165
1166void EmitFindSMsb32(EmitContext& ctx, std::string_view value) {
1167 NotImplemented();
1168}
1169
1170void EmitFindUMsb32(EmitContext& ctx, std::string_view value) {
1171 NotImplemented();
1172}
1173
1174void EmitSMin32(EmitContext& ctx, std::string_view a, std::string_view b) {
1175 NotImplemented();
1176}
1177
1178void EmitUMin32(EmitContext& ctx, std::string_view a, std::string_view b) {
1179 NotImplemented();
1180}
1181
1182void EmitSMax32(EmitContext& ctx, std::string_view a, std::string_view b) {
1183 NotImplemented();
1184}
1185
1186void EmitUMax32(EmitContext& ctx, std::string_view a, std::string_view b) {
1187 NotImplemented();
1188}
1189
1190void EmitSClamp32(EmitContext& ctx, IR::Inst* inst, std::string_view value, std::string_view min,
1191 std::string_view max) {
1192 NotImplemented();
1193}
1194
1195void EmitUClamp32(EmitContext& ctx, IR::Inst* inst, std::string_view value, std::string_view min,
1196 std::string_view max) {
1197 NotImplemented();
1198}
1199
1200void EmitSLessThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1201 NotImplemented();
1202}
1203
1204void EmitULessThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1205 NotImplemented();
1206}
1207
1208void EmitIEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1209 NotImplemented();
1210}
1211
1212void EmitSLessThanEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1213 NotImplemented();
1214}
1215
1216void EmitULessThanEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1217 NotImplemented();
1218}
1219
1220void EmitSGreaterThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1221 NotImplemented();
1222}
1223
1224void EmitUGreaterThan(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1225 NotImplemented();
1226}
1227
1228void EmitINotEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1229 NotImplemented();
1230}
1231
1232void EmitSGreaterThanEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1233 NotImplemented();
1234}
1235
1236void EmitUGreaterThanEqual(EmitContext& ctx, std::string_view lhs, std::string_view rhs) {
1237 NotImplemented();
1238}
1239
1240void EmitSharedAtomicIAdd32(EmitContext& ctx, std::string_view pointer_offset,
1241 std::string_view value) {
1242 NotImplemented();
1243}
1244
1245void EmitSharedAtomicSMin32(EmitContext& ctx, std::string_view pointer_offset,
1246 std::string_view value) {
1247 NotImplemented();
1248}
1249
1250void EmitSharedAtomicUMin32(EmitContext& ctx, std::string_view pointer_offset,
1251 std::string_view value) {
1252 NotImplemented();
1253}
1254
1255void EmitSharedAtomicSMax32(EmitContext& ctx, std::string_view pointer_offset,
1256 std::string_view value) {
1257 NotImplemented();
1258}
1259
1260void EmitSharedAtomicUMax32(EmitContext& ctx, std::string_view pointer_offset,
1261 std::string_view value) {
1262 NotImplemented();
1263}
1264
1265void EmitSharedAtomicInc32(EmitContext& ctx, std::string_view pointer_offset,
1266 std::string_view value) {
1267 NotImplemented();
1268}
1269
1270void EmitSharedAtomicDec32(EmitContext& ctx, std::string_view pointer_offset,
1271 std::string_view value) {
1272 NotImplemented();
1273}
1274
1275void EmitSharedAtomicAnd32(EmitContext& ctx, std::string_view pointer_offset,
1276 std::string_view value) {
1277 NotImplemented();
1278}
1279
1280void EmitSharedAtomicOr32(EmitContext& ctx, std::string_view pointer_offset,
1281 std::string_view value) {
1282 NotImplemented();
1283}
1284
1285void EmitSharedAtomicXor32(EmitContext& ctx, std::string_view pointer_offset,
1286 std::string_view value) {
1287 NotImplemented();
1288}
1289
1290void EmitSharedAtomicExchange32(EmitContext& ctx, std::string_view pointer_offset,
1291 std::string_view value) {
1292 NotImplemented();
1293}
1294
1295void EmitSharedAtomicExchange64(EmitContext& ctx, std::string_view pointer_offset,
1296 std::string_view value) {
1297 NotImplemented();
1298}
1299
1300void EmitStorageAtomicIAdd32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1301 std::string_view value) {
1302 NotImplemented();
1303}
1304
1305void EmitStorageAtomicSMin32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1306 std::string_view value) {
1307 NotImplemented();
1308}
1309
1310void EmitStorageAtomicUMin32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1311 std::string_view value) {
1312 NotImplemented();
1313}
1314
1315void EmitStorageAtomicSMax32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1316 std::string_view value) {
1317 NotImplemented();
1318}
1319
1320void EmitStorageAtomicUMax32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1321 std::string_view value) {
1322 NotImplemented();
1323}
1324
1325void EmitStorageAtomicInc32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1326 std::string_view value) {
1327 NotImplemented();
1328}
1329
1330void EmitStorageAtomicDec32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1331 std::string_view value) {
1332 NotImplemented();
1333}
1334
1335void EmitStorageAtomicAnd32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1336 std::string_view value) {
1337 NotImplemented();
1338}
1339
1340void EmitStorageAtomicOr32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1341 std::string_view value) {
1342 NotImplemented();
1343}
1344
1345void EmitStorageAtomicXor32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1346 std::string_view value) {
1347 NotImplemented();
1348}
1349
1350void EmitStorageAtomicExchange32(EmitContext& ctx, const IR::Value& binding,
1351 const IR::Value& offset, std::string_view value) {
1352 NotImplemented();
1353}
1354
1355void EmitStorageAtomicIAdd64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1356 std::string_view value) {
1357 NotImplemented();
1358}
1359
1360void EmitStorageAtomicSMin64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1361 std::string_view value) {
1362 NotImplemented();
1363}
1364
1365void EmitStorageAtomicUMin64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1366 std::string_view value) {
1367 NotImplemented();
1368}
1369
1370void EmitStorageAtomicSMax64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1371 std::string_view value) {
1372 NotImplemented();
1373}
1374
1375void EmitStorageAtomicUMax64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1376 std::string_view value) {
1377 NotImplemented();
1378}
1379
1380void EmitStorageAtomicAnd64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1381 std::string_view value) {
1382 NotImplemented();
1383}
1384
1385void EmitStorageAtomicOr64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1386 std::string_view value) {
1387 NotImplemented();
1388}
1389
1390void EmitStorageAtomicXor64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1391 std::string_view value) {
1392 NotImplemented();
1393}
1394
1395void EmitStorageAtomicExchange64(EmitContext& ctx, const IR::Value& binding,
1396 const IR::Value& offset, std::string_view value) {
1397 NotImplemented();
1398}
1399
1400void EmitStorageAtomicAddF32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1401 std::string_view value) {
1402 NotImplemented();
1403}
1404
1405void EmitStorageAtomicAddF16x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1406 std::string_view value) {
1407 NotImplemented();
1408}
1409
1410void EmitStorageAtomicAddF32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1411 std::string_view value) {
1412 NotImplemented();
1413}
1414
1415void EmitStorageAtomicMinF16x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1416 std::string_view value) {
1417 NotImplemented();
1418}
1419
1420void EmitStorageAtomicMinF32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1421 std::string_view value) {
1422 NotImplemented();
1423}
1424
1425void EmitStorageAtomicMaxF16x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1426 std::string_view value) {
1427 NotImplemented();
1428}
1429
1430void EmitStorageAtomicMaxF32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
1431 std::string_view value) {
1432 NotImplemented();
1433}
1434
1435void EmitGlobalAtomicIAdd32(EmitContext& ctx) {
1436 NotImplemented();
1437}
1438
1439void EmitGlobalAtomicSMin32(EmitContext& ctx) {
1440 NotImplemented();
1441}
1442
1443void EmitGlobalAtomicUMin32(EmitContext& ctx) {
1444 NotImplemented();
1445}
1446
1447void EmitGlobalAtomicSMax32(EmitContext& ctx) {
1448 NotImplemented();
1449}
1450
1451void EmitGlobalAtomicUMax32(EmitContext& ctx) {
1452 NotImplemented();
1453}
1454
1455void EmitGlobalAtomicInc32(EmitContext& ctx) {
1456 NotImplemented();
1457}
1458
1459void EmitGlobalAtomicDec32(EmitContext& ctx) {
1460 NotImplemented();
1461}
1462
1463void EmitGlobalAtomicAnd32(EmitContext& ctx) {
1464 NotImplemented();
1465}
1466
1467void EmitGlobalAtomicOr32(EmitContext& ctx) {
1468 NotImplemented();
1469}
1470
1471void EmitGlobalAtomicXor32(EmitContext& ctx) {
1472 NotImplemented();
1473}
1474
1475void EmitGlobalAtomicExchange32(EmitContext& ctx) {
1476 NotImplemented();
1477}
1478
1479void EmitGlobalAtomicIAdd64(EmitContext& ctx) {
1480 NotImplemented();
1481}
1482
1483void EmitGlobalAtomicSMin64(EmitContext& ctx) {
1484 NotImplemented();
1485}
1486
1487void EmitGlobalAtomicUMin64(EmitContext& ctx) {
1488 NotImplemented();
1489}
1490
1491void EmitGlobalAtomicSMax64(EmitContext& ctx) {
1492 NotImplemented();
1493}
1494
1495void EmitGlobalAtomicUMax64(EmitContext& ctx) {
1496 NotImplemented();
1497}
1498
1499void EmitGlobalAtomicInc64(EmitContext& ctx) {
1500 NotImplemented();
1501}
1502
1503void EmitGlobalAtomicDec64(EmitContext& ctx) {
1504 NotImplemented();
1505}
1506
1507void EmitGlobalAtomicAnd64(EmitContext& ctx) {
1508 NotImplemented();
1509}
1510
1511void EmitGlobalAtomicOr64(EmitContext& ctx) {
1512 NotImplemented();
1513}
1514
1515void EmitGlobalAtomicXor64(EmitContext& ctx) {
1516 NotImplemented();
1517}
1518
1519void EmitGlobalAtomicExchange64(EmitContext& ctx) {
1520 NotImplemented();
1521}
1522
1523void EmitGlobalAtomicAddF32(EmitContext& ctx) {
1524 NotImplemented();
1525}
1526
1527void EmitGlobalAtomicAddF16x2(EmitContext& ctx) {
1528 NotImplemented();
1529}
1530
1531void EmitGlobalAtomicAddF32x2(EmitContext& ctx) {
1532 NotImplemented();
1533}
1534
1535void EmitGlobalAtomicMinF16x2(EmitContext& ctx) {
1536 NotImplemented();
1537}
1538
1539void EmitGlobalAtomicMinF32x2(EmitContext& ctx) {
1540 NotImplemented();
1541}
1542
1543void EmitGlobalAtomicMaxF16x2(EmitContext& ctx) {
1544 NotImplemented();
1545}
1546
1547void EmitGlobalAtomicMaxF32x2(EmitContext& ctx) {
1548 NotImplemented();
1549}
1550
1551void EmitLogicalOr(EmitContext& ctx, std::string_view a, std::string_view b) {
1552 NotImplemented();
1553}
1554
1555void EmitLogicalAnd(EmitContext& ctx, std::string_view a, std::string_view b) {
1556 NotImplemented();
1557}
1558
1559void EmitLogicalXor(EmitContext& ctx, std::string_view a, std::string_view b) {
1560 NotImplemented();
1561}
1562
1563void EmitLogicalNot(EmitContext& ctx, std::string_view value) {
1564 NotImplemented();
1565}
1566
1567void EmitConvertS16F16(EmitContext& ctx, std::string_view value) {
1568 NotImplemented();
1569}
1570
1571void EmitConvertS16F32(EmitContext& ctx, std::string_view value) {
1572 NotImplemented();
1573}
1574
1575void EmitConvertS16F64(EmitContext& ctx, std::string_view value) {
1576 NotImplemented();
1577}
1578
1579void EmitConvertS32F16(EmitContext& ctx, std::string_view value) {
1580 NotImplemented();
1581}
1582
1583void EmitConvertS32F32(EmitContext& ctx, std::string_view value) {
1584 NotImplemented();
1585}
1586
1587void EmitConvertS32F64(EmitContext& ctx, std::string_view value) {
1588 NotImplemented();
1589}
1590
1591void EmitConvertS64F16(EmitContext& ctx, std::string_view value) {
1592 NotImplemented();
1593}
1594
1595void EmitConvertS64F32(EmitContext& ctx, std::string_view value) {
1596 NotImplemented();
1597}
1598
1599void EmitConvertS64F64(EmitContext& ctx, std::string_view value) {
1600 NotImplemented();
1601}
1602
1603void EmitConvertU16F16(EmitContext& ctx, std::string_view value) {
1604 NotImplemented();
1605}
1606
1607void EmitConvertU16F32(EmitContext& ctx, std::string_view value) {
1608 NotImplemented();
1609}
1610
1611void EmitConvertU16F64(EmitContext& ctx, std::string_view value) {
1612 NotImplemented();
1613}
1614
1615void EmitConvertU32F16(EmitContext& ctx, std::string_view value) {
1616 NotImplemented();
1617}
1618
1619void EmitConvertU32F32(EmitContext& ctx, std::string_view value) {
1620 NotImplemented();
1621}
1622
1623void EmitConvertU32F64(EmitContext& ctx, std::string_view value) {
1624 NotImplemented();
1625}
1626
1627void EmitConvertU64F16(EmitContext& ctx, std::string_view value) {
1628 NotImplemented();
1629}
1630
1631void EmitConvertU64F32(EmitContext& ctx, std::string_view value) {
1632 NotImplemented();
1633}
1634
1635void EmitConvertU64F64(EmitContext& ctx, std::string_view value) {
1636 NotImplemented();
1637}
1638
1639void EmitConvertU64U32(EmitContext& ctx, std::string_view value) {
1640 NotImplemented();
1641}
1642
1643void EmitConvertU32U64(EmitContext& ctx, std::string_view value) {
1644 NotImplemented();
1645}
1646
1647void EmitConvertF16F32(EmitContext& ctx, std::string_view value) {
1648 NotImplemented();
1649}
1650
1651void EmitConvertF32F16(EmitContext& ctx, std::string_view value) {
1652 NotImplemented();
1653}
1654
1655void EmitConvertF32F64(EmitContext& ctx, std::string_view value) {
1656 NotImplemented();
1657}
1658
1659void EmitConvertF64F32(EmitContext& ctx, std::string_view value) {
1660 NotImplemented();
1661}
1662
1663void EmitConvertF16S8(EmitContext& ctx, std::string_view value) {
1664 NotImplemented();
1665}
1666
1667void EmitConvertF16S16(EmitContext& ctx, std::string_view value) {
1668 NotImplemented();
1669}
1670
1671void EmitConvertF16S32(EmitContext& ctx, std::string_view value) {
1672 NotImplemented();
1673}
1674
1675void EmitConvertF16S64(EmitContext& ctx, std::string_view value) {
1676 NotImplemented();
1677}
1678
1679void EmitConvertF16U8(EmitContext& ctx, std::string_view value) {
1680 NotImplemented();
1681}
1682
1683void EmitConvertF16U16(EmitContext& ctx, std::string_view value) {
1684 NotImplemented();
1685}
1686
1687void EmitConvertF16U32(EmitContext& ctx, std::string_view value) {
1688 NotImplemented();
1689}
1690
1691void EmitConvertF16U64(EmitContext& ctx, std::string_view value) {
1692 NotImplemented();
1693}
1694
1695void EmitConvertF32S8(EmitContext& ctx, std::string_view value) {
1696 NotImplemented();
1697}
1698
1699void EmitConvertF32S16(EmitContext& ctx, std::string_view value) {
1700 NotImplemented();
1701}
1702
1703void EmitConvertF32S32(EmitContext& ctx, std::string_view value) {
1704 NotImplemented();
1705}
1706
1707void EmitConvertF32S64(EmitContext& ctx, std::string_view value) {
1708 NotImplemented();
1709}
1710
1711void EmitConvertF32U8(EmitContext& ctx, std::string_view value) {
1712 NotImplemented();
1713}
1714
1715void EmitConvertF32U16(EmitContext& ctx, std::string_view value) {
1716 NotImplemented();
1717}
1718
1719void EmitConvertF32U32(EmitContext& ctx, std::string_view value) {
1720 NotImplemented();
1721}
1722
1723void EmitConvertF32U64(EmitContext& ctx, std::string_view value) {
1724 NotImplemented();
1725}
1726
1727void EmitConvertF64S8(EmitContext& ctx, std::string_view value) {
1728 NotImplemented();
1729}
1730
1731void EmitConvertF64S16(EmitContext& ctx, std::string_view value) {
1732 NotImplemented();
1733}
1734
1735void EmitConvertF64S32(EmitContext& ctx, std::string_view value) {
1736 NotImplemented();
1737}
1738
1739void EmitConvertF64S64(EmitContext& ctx, std::string_view value) {
1740 NotImplemented();
1741}
1742
1743void EmitConvertF64U8(EmitContext& ctx, std::string_view value) {
1744 NotImplemented();
1745}
1746
1747void EmitConvertF64U16(EmitContext& ctx, std::string_view value) {
1748 NotImplemented();
1749}
1750
1751void EmitConvertF64U32(EmitContext& ctx, std::string_view value) {
1752 NotImplemented();
1753}
1754
1755void EmitConvertF64U64(EmitContext& ctx, std::string_view value) {
1756 NotImplemented();
1757}
1758
1759void EmitBindlessImageSampleImplicitLod(EmitContext&) {
1760 NotImplemented();
1761}
1762
1763void EmitBindlessImageSampleExplicitLod(EmitContext&) {
1764 NotImplemented();
1765}
1766
1767void EmitBindlessImageSampleDrefImplicitLod(EmitContext&) {
1768 NotImplemented();
1769}
1770
1771void EmitBindlessImageSampleDrefExplicitLod(EmitContext&) {
1772 NotImplemented();
1773}
1774
1775void EmitBindlessImageGather(EmitContext&) {
1776 NotImplemented();
1777}
1778
1779void EmitBindlessImageGatherDref(EmitContext&) {
1780 NotImplemented();
1781}
1782
1783void EmitBindlessImageFetch(EmitContext&) {
1784 NotImplemented();
1785}
1786
1787void EmitBindlessImageQueryDimensions(EmitContext&) {
1788 NotImplemented();
1789}
1790
1791void EmitBindlessImageQueryLod(EmitContext&) {
1792 NotImplemented();
1793}
1794
1795void EmitBindlessImageGradient(EmitContext&) {
1796 NotImplemented();
1797}
1798
1799void EmitBindlessImageRead(EmitContext&) {
1800 NotImplemented();
1801}
1802
1803void EmitBindlessImageWrite(EmitContext&) {
1804 NotImplemented();
1805}
1806
1807void EmitBoundImageSampleImplicitLod(EmitContext&) {
1808 NotImplemented();
1809}
1810
1811void EmitBoundImageSampleExplicitLod(EmitContext&) {
1812 NotImplemented();
1813}
1814
1815void EmitBoundImageSampleDrefImplicitLod(EmitContext&) {
1816 NotImplemented();
1817}
1818
1819void EmitBoundImageSampleDrefExplicitLod(EmitContext&) {
1820 NotImplemented();
1821}
1822
1823void EmitBoundImageGather(EmitContext&) {
1824 NotImplemented();
1825}
1826
1827void EmitBoundImageGatherDref(EmitContext&) {
1828 NotImplemented();
1829}
1830
1831void EmitBoundImageFetch(EmitContext&) {
1832 NotImplemented();
1833}
1834
1835void EmitBoundImageQueryDimensions(EmitContext&) {
1836 NotImplemented();
1837}
1838
1839void EmitBoundImageQueryLod(EmitContext&) {
1840 NotImplemented();
1841}
1842
1843void EmitBoundImageGradient(EmitContext&) {
1844 NotImplemented();
1845}
1846
1847void EmitBoundImageRead(EmitContext&) {
1848 NotImplemented();
1849}
1850
1851void EmitBoundImageWrite(EmitContext&) {
1852 NotImplemented();
1853}
1854
1855void EmitImageSampleImplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1856 std::string_view coords, std::string_view bias_lc,
1857 const IR::Value& offset) {
1858 NotImplemented();
1859}
1860
1861void EmitImageSampleExplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1862 std::string_view coords, std::string_view lod_lc,
1863 const IR::Value& offset) {
1864 NotImplemented();
1865}
1866
1867void EmitImageSampleDrefImplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1868 std::string_view coords, std::string_view dref,
1869 std::string_view bias_lc, const IR::Value& offset) {
1870 NotImplemented();
1871}
1872
1873void EmitImageSampleDrefExplicitLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1874 std::string_view coords, std::string_view dref,
1875 std::string_view lod_lc, const IR::Value& offset) {
1876 NotImplemented();
1877}
1878
1879void EmitImageGather(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1880 std::string_view coords, const IR::Value& offset, const IR::Value& offset2) {
1881 NotImplemented();
1882}
1883
1884void EmitImageGatherDref(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1885 std::string_view coords, const IR::Value& offset, const IR::Value& offset2,
1886 std::string_view dref) {
1887 NotImplemented();
1888}
1889
1890void EmitImageFetch(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1891 std::string_view coords, std::string_view offset, std::string_view lod,
1892 std::string_view ms) {
1893 NotImplemented();
1894}
1895
1896void EmitImageQueryDimensions(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1897 std::string_view lod) {
1898 NotImplemented();
1899}
1900
1901void EmitImageQueryLod(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1902 std::string_view coords) {
1903 NotImplemented();
1904}
1905
1906void EmitImageGradient(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1907 std::string_view coords, std::string_view derivates, std::string_view offset,
1908 std::string_view lod_clamp) {
1909 NotImplemented();
1910}
1911
1912void EmitImageRead(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1913 std::string_view coords) {
1914 NotImplemented();
1915}
1916
1917void EmitImageWrite(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
1918 std::string_view coords, std::string_view color) {
1919 NotImplemented();
1920}
1921
1922void EmitBindlessImageAtomicIAdd32(EmitContext&) {
1923 NotImplemented();
1924}
1925
1926void EmitBindlessImageAtomicSMin32(EmitContext&) {
1927 NotImplemented();
1928}
1929
1930void EmitBindlessImageAtomicUMin32(EmitContext&) {
1931 NotImplemented();
1932}
1933
1934void EmitBindlessImageAtomicSMax32(EmitContext&) {
1935 NotImplemented();
1936}
1937
1938void EmitBindlessImageAtomicUMax32(EmitContext&) {
1939 NotImplemented();
1940}
1941
1942void EmitBindlessImageAtomicInc32(EmitContext&) {
1943 NotImplemented();
1944}
1945
1946void EmitBindlessImageAtomicDec32(EmitContext&) {
1947 NotImplemented();
1948}
1949
1950void EmitBindlessImageAtomicAnd32(EmitContext&) {
1951 NotImplemented();
1952}
1953
1954void EmitBindlessImageAtomicOr32(EmitContext&) {
1955 NotImplemented();
1956}
1957
1958void EmitBindlessImageAtomicXor32(EmitContext&) {
1959 NotImplemented();
1960}
1961
1962void EmitBindlessImageAtomicExchange32(EmitContext&) {
1963 NotImplemented();
1964}
1965
1966void EmitBoundImageAtomicIAdd32(EmitContext&) {
1967 NotImplemented();
1968}
1969
1970void EmitBoundImageAtomicSMin32(EmitContext&) {
1971 NotImplemented();
1972}
1973
1974void EmitBoundImageAtomicUMin32(EmitContext&) {
1975 NotImplemented();
1976}
1977
1978void EmitBoundImageAtomicSMax32(EmitContext&) {
1979 NotImplemented();
1980}
1981
1982void EmitBoundImageAtomicUMax32(EmitContext&) {
1983 NotImplemented();
1984}
1985
1986void EmitBoundImageAtomicInc32(EmitContext&) {
1987 NotImplemented();
1988}
1989
1990void EmitBoundImageAtomicDec32(EmitContext&) {
1991 NotImplemented();
1992}
1993
1994void EmitBoundImageAtomicAnd32(EmitContext&) {
1995 NotImplemented();
1996}
1997
1998void EmitBoundImageAtomicOr32(EmitContext&) {
1999 NotImplemented();
2000}
2001
2002void EmitBoundImageAtomicXor32(EmitContext&) {
2003 NotImplemented();
2004}
2005
2006void EmitBoundImageAtomicExchange32(EmitContext&) {
2007 NotImplemented();
2008}
2009
2010void EmitImageAtomicIAdd32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
2011 std::string_view coords, std::string_view value) {
2012 NotImplemented();
2013}
2014
2015void EmitImageAtomicSMin32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
2016 std::string_view coords, std::string_view value) {
2017 NotImplemented();
2018}
2019
2020void EmitImageAtomicUMin32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
2021 std::string_view coords, std::string_view value) {
2022 NotImplemented();
2023}
2024
2025void EmitImageAtomicSMax32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
2026 std::string_view coords, std::string_view value) {
2027 NotImplemented();
2028}
2029
2030void EmitImageAtomicUMax32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
2031 std::string_view coords, std::string_view value) {
2032 NotImplemented();
2033}
2034
2035void EmitImageAtomicInc32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
2036 std::string_view coords, std::string_view value) {
2037 NotImplemented();
2038}
2039
2040void EmitImageAtomicDec32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
2041 std::string_view coords, std::string_view value) {
2042 NotImplemented();
2043}
2044
2045void EmitImageAtomicAnd32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
2046 std::string_view coords, std::string_view value) {
2047 NotImplemented();
2048}
2049
2050void EmitImageAtomicOr32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
2051 std::string_view coords, std::string_view value) {
2052 NotImplemented();
2053}
2054
2055void EmitImageAtomicXor32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
2056 std::string_view coords, std::string_view value) {
2057 NotImplemented();
2058}
2059
2060void EmitImageAtomicExchange32(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
2061 std::string_view coords, std::string_view value) {
2062 NotImplemented();
2063}
2064
2065void EmitLaneId(EmitContext& ctx) {
2066 NotImplemented();
2067}
2068
2069void EmitVoteAll(EmitContext& ctx, std::string_view pred) {
2070 NotImplemented();
2071}
2072
2073void EmitVoteAny(EmitContext& ctx, std::string_view pred) {
2074 NotImplemented();
2075}
2076
2077void EmitVoteEqual(EmitContext& ctx, std::string_view pred) {
2078 NotImplemented();
2079}
2080
2081void EmitSubgroupBallot(EmitContext& ctx, std::string_view pred) {
2082 NotImplemented();
2083}
2084
2085void EmitSubgroupEqMask(EmitContext& ctx) {
2086 NotImplemented();
2087}
2088
2089void EmitSubgroupLtMask(EmitContext& ctx) {
2090 NotImplemented();
2091}
2092
2093void EmitSubgroupLeMask(EmitContext& ctx) {
2094 NotImplemented();
2095}
2096
2097void EmitSubgroupGtMask(EmitContext& ctx) {
2098 NotImplemented();
2099}
2100
2101void EmitSubgroupGeMask(EmitContext& ctx) {
2102 NotImplemented();
2103}
2104
2105void EmitShuffleIndex(EmitContext& ctx, IR::Inst* inst, std::string_view value,
2106 std::string_view index, std::string_view clamp,
2107 std::string_view segmentation_mask) {
2108 NotImplemented();
2109}
2110
2111void EmitShuffleUp(EmitContext& ctx, IR::Inst* inst, std::string_view value, std::string_view index,
2112 std::string_view clamp, std::string_view segmentation_mask) {
2113 NotImplemented();
2114}
2115
2116void EmitShuffleDown(EmitContext& ctx, IR::Inst* inst, std::string_view value,
2117 std::string_view index, std::string_view clamp,
2118 std::string_view segmentation_mask) {
2119 NotImplemented();
2120}
2121
2122void EmitShuffleButterfly(EmitContext& ctx, IR::Inst* inst, std::string_view value,
2123 std::string_view index, std::string_view clamp,
2124 std::string_view segmentation_mask) {
2125 NotImplemented();
2126}
2127
2128void EmitFSwizzleAdd(EmitContext& ctx, std::string_view op_a, std::string_view op_b,
2129 std::string_view swizzle) {
2130 NotImplemented();
2131}
2132
2133void EmitDPdxFine(EmitContext& ctx, std::string_view op_a) {
2134 NotImplemented();
2135}
2136
2137void EmitDPdyFine(EmitContext& ctx, std::string_view op_a) {
2138 NotImplemented();
2139}
2140
2141void EmitDPdxCoarse(EmitContext& ctx, std::string_view op_a) {
2142 NotImplemented();
2143}
2144
2145void EmitDPdyCoarse(EmitContext& ctx, std::string_view op_a) {
2146 NotImplemented();
2147}
2148
2149} // namespace Shader::Backend::GLSL
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_select.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_select.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_select.cpp
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_shared_memory.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_shared_memory.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_shared_memory.cpp
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_special.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_special.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_special.cpp
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_undefined.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_undefined.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_undefined.cpp
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_warp.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_warp.cpp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_warp.cpp
diff --git a/src/shader_recompiler/backend/glsl/reg_alloc.cpp b/src/shader_recompiler/backend/glsl/reg_alloc.cpp
new file mode 100644
index 000000000..591a87988
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/reg_alloc.cpp
@@ -0,0 +1,96 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include <string>
6#include <string_view>
7
8#include <fmt/format.h>
9
10#include "shader_recompiler/backend/glsl/reg_alloc.h"
11#include "shader_recompiler/exception.h"
12#include "shader_recompiler/frontend/ir/value.h"
13
14namespace Shader::Backend::GLSL {
15namespace {
16constexpr std::string_view SWIZZLE = "xyzw";
17
18std::string Representation(Id id) {
19 if (id.is_condition_code != 0) {
20 throw NotImplementedException("Condition code");
21 }
22 if (id.is_spill != 0) {
23 throw NotImplementedException("Spilling");
24 }
25 const u32 num_elements{id.num_elements_minus_one + 1};
26 const u32 index{static_cast<u32>(id.index)};
27 if (num_elements == 4) {
28 return fmt::format("R{}", index);
29 } else {
30 return fmt::format("R{}.{}", index, SWIZZLE.substr(id.base_element, num_elements));
31 }
32}
33
34std::string MakeImm(const IR::Value& value) {
35 switch (value.Type()) {
36 case IR::Type::U1:
37 return fmt::format("{}", value.U1() ? "true" : "false");
38 case IR::Type::U32:
39 return fmt::format("{}", value.U32());
40 case IR::Type::F32:
41 return fmt::format("{}", value.F32());
42 case IR::Type::U64:
43 return fmt::format("{}", value.U64());
44 case IR::Type::F64:
45 return fmt::format("{}", value.F64());
46 default:
47 throw NotImplementedException("Immediate type {}", value.Type());
48 }
49}
50} // Anonymous namespace
51
52std::string RegAlloc::Define(IR::Inst& inst, u32 num_elements, u32 alignment) {
53 const Id id{Alloc(num_elements, alignment)};
54 inst.SetDefinition<Id>(id);
55 return Representation(id);
56}
57
58std::string RegAlloc::Consume(const IR::Value& value) {
59 return value.IsImmediate() ? MakeImm(value) : Consume(*value.Inst());
60}
61
62std::string RegAlloc::Consume(IR::Inst& inst) {
63 const Id id{inst.Definition<Id>()};
64 inst.DestructiveRemoveUsage();
65 if (!inst.HasUses()) {
66 Free(id);
67 }
68 return Representation(inst.Definition<Id>());
69}
70
71Id RegAlloc::Alloc(u32 num_elements, [[maybe_unused]] u32 alignment) {
72 for (size_t reg = 0; reg < NUM_REGS; ++reg) {
73 if (register_use[reg]) {
74 continue;
75 }
76 num_used_registers = std::max(num_used_registers, reg + 1);
77 register_use[reg] = true;
78 return Id{
79 .base_element = 0,
80 .num_elements_minus_one = num_elements - 1,
81 .index = static_cast<u32>(reg),
82 .is_spill = 0,
83 .is_condition_code = 0,
84 };
85 }
86 throw NotImplementedException("Register spilling");
87}
88
89void RegAlloc::Free(Id id) {
90 if (id.is_spill != 0) {
91 throw NotImplementedException("Free spill");
92 }
93 register_use[id.index] = false;
94}
95
96} // namespace Shader::Backend::GLSL
diff --git a/src/shader_recompiler/backend/glsl/reg_alloc.h b/src/shader_recompiler/backend/glsl/reg_alloc.h
new file mode 100644
index 000000000..850a93d6a
--- /dev/null
+++ b/src/shader_recompiler/backend/glsl/reg_alloc.h
@@ -0,0 +1,46 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include <bitset>
8
9#include "common/common_types.h"
10
11namespace Shader::IR {
12class Inst;
13class Value;
14} // namespace Shader::IR
15
16namespace Shader::Backend::GLSL {
17
18struct Id {
19 u32 base_element : 2;
20 u32 num_elements_minus_one : 2;
21 u32 index : 26;
22 u32 is_spill : 1;
23 u32 is_condition_code : 1;
24};
25
26class RegAlloc {
27public:
28 std::string Define(IR::Inst& inst, u32 num_elements = 1, u32 alignment = 1);
29
30 std::string Consume(const IR::Value& value);
31
32private:
33 static constexpr size_t NUM_REGS = 4096;
34 static constexpr size_t NUM_ELEMENTS = 4;
35
36 std::string Consume(IR::Inst& inst);
37
38 Id Alloc(u32 num_elements, u32 alignment);
39
40 void Free(Id id);
41
42 size_t num_used_registers{};
43 std::bitset<NUM_REGS> register_use{};
44};
45
46} // namespace Shader::Backend::GLSL