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