summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend
diff options
context:
space:
mode:
authorGravatar ameerj2021-05-09 22:01:03 -0400
committerGravatar ameerj2021-07-22 21:51:31 -0400
commit80813b1d144a7f0f11047e7348620b720def93a9 (patch)
tree705aafbb73d550a9ee8f3b5fd24fae9c4beb46d3 /src/shader_recompiler/backend
parentglasm: Add conversion instructions to GLASM (diff)
downloadyuzu-80813b1d144a7f0f11047e7348620b720def93a9.tar.gz
yuzu-80813b1d144a7f0f11047e7348620b720def93a9.tar.xz
yuzu-80813b1d144a7f0f11047e7348620b720def93a9.zip
glasm: Implement storage atomic ops
Diffstat (limited to 'src/shader_recompiler/backend')
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm.cpp13
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_atomic.cpp291
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_instructions.h108
-rw-r--r--src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp251
4 files changed, 358 insertions, 305 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm.cpp b/src/shader_recompiler/backend/glasm/emit_glasm.cpp
index 0e4b189c9..e6e065e7f 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm.cpp
@@ -149,6 +149,18 @@ void EmitInst(EmitContext& ctx, IR::Inst* inst) {
149 } 149 }
150 throw LogicError("Invalid opcode {}", inst->GetOpcode()); 150 throw LogicError("Invalid opcode {}", inst->GetOpcode());
151} 151}
152
153void SetupOptions(std::string& header, Info info) {
154 if (info.uses_int64_bit_atomics) {
155 header += "OPTION NV_shader_atomic_int64;";
156 }
157 if (info.uses_atomic_f32_add) {
158 header += "OPTION NV_shader_atomic_float;";
159 }
160 if (info.uses_atomic_f16x2_add || info.uses_atomic_f16x2_min || info.uses_atomic_f16x2_max) {
161 header += "OPTION NV_shader_atomic_fp16_vector;";
162 }
163}
152} // Anonymous namespace 164} // Anonymous namespace
153 165
154std::string EmitGLASM(const Profile&, IR::Program& program, Bindings&) { 166std::string EmitGLASM(const Profile&, IR::Program& program, Bindings&) {
@@ -160,6 +172,7 @@ std::string EmitGLASM(const Profile&, IR::Program& program, Bindings&) {
160 } 172 }
161 std::string header = "!!NVcp5.0\n" 173 std::string header = "!!NVcp5.0\n"
162 "OPTION NV_internal;"; 174 "OPTION NV_internal;";
175 SetupOptions(header, program.info);
163 switch (program.stage) { 176 switch (program.stage) {
164 case Stage::Compute: 177 case Stage::Compute:
165 header += fmt::format("GROUP_SIZE {} {} {};", program.workgroup_size[0], 178 header += fmt::format("GROUP_SIZE {} {} {};", program.workgroup_size[0],
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_atomic.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_atomic.cpp
index e69de29bb..fe44c3d15 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm_atomic.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_atomic.cpp
@@ -0,0 +1,291 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include "shader_recompiler/backend/glasm/emit_context.h"
6#include "shader_recompiler/backend/glasm/emit_glasm_instructions.h"
7#include "shader_recompiler/frontend/ir/value.h"
8
9namespace Shader::Backend::GLASM {
10namespace {
11void StorageOp(EmitContext& ctx, const IR::Value& binding, ScalarU32 offset,
12 std::string_view then_expr, std::string_view else_expr = {}) {
13 // Operate on bindless SSBO, call the expression with bounds checking
14 // address = c[binding].xy
15 // length = c[binding].z
16 const u32 sb_binding{binding.U32()};
17 ctx.Add("PK64.U DC,c[{}];" // pointer = address
18 "CVT.U64.U32 DC.z,{};" // offset = uint64_t(offset)
19 "ADD.U64 DC.x,DC.x,DC.z;" // pointer += offset
20 "SLT.U.CC RC.x,{},c[{}].z;", // cc = offset < length
21 sb_binding, offset, offset, sb_binding);
22 if (else_expr.empty()) {
23 ctx.Add("IF NE.x;{}ENDIF;", then_expr);
24 } else {
25 ctx.Add("IF NE.x;{}ELSE;{}ENDIF;", then_expr, else_expr);
26 }
27}
28
29template <typename ValueType>
30void Atom(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding, ScalarU32 offset,
31 ValueType value, std::string_view operation, std::string_view size) {
32 const Register ret{ctx.reg_alloc.Define(inst)};
33 StorageOp(ctx, binding, offset,
34 fmt::format("ATOM.{}.{} {},{},DC.x;", operation, size, ret, value));
35}
36} // namespace
37
38void EmitStorageAtomicIAdd32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
39 ScalarU32 offset, ScalarU32 value) {
40 Atom(ctx, inst, binding, offset, value, "ADD", "U32");
41}
42
43void EmitStorageAtomicSMin32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
44 ScalarU32 offset, ScalarS32 value) {
45 Atom(ctx, inst, binding, offset, value, "MIN", "S32");
46}
47
48void EmitStorageAtomicUMin32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
49 ScalarU32 offset, ScalarU32 value) {
50 Atom(ctx, inst, binding, offset, value, "MIN", "U32");
51}
52
53void EmitStorageAtomicSMax32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
54 ScalarU32 offset, ScalarS32 value) {
55 Atom(ctx, inst, binding, offset, value, "MAX", "S32");
56}
57
58void EmitStorageAtomicUMax32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
59 ScalarU32 offset, ScalarU32 value) {
60 Atom(ctx, inst, binding, offset, value, "MAX", "U32");
61}
62
63void EmitStorageAtomicInc32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
64 ScalarU32 offset, ScalarU32 value) {
65 Atom(ctx, inst, binding, offset, value, "IWRAP", "U32");
66}
67
68void EmitStorageAtomicDec32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
69 ScalarU32 offset, ScalarU32 value) {
70 Atom(ctx, inst, binding, offset, value, "DWRAP", "U32");
71}
72
73void EmitStorageAtomicAnd32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
74 ScalarU32 offset, ScalarU32 value) {
75 Atom(ctx, inst, binding, offset, value, "AND", "U32");
76}
77
78void EmitStorageAtomicOr32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
79 ScalarU32 offset, ScalarU32 value) {
80 Atom(ctx, inst, binding, offset, value, "OR", "U32");
81}
82
83void EmitStorageAtomicXor32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
84 ScalarU32 offset, ScalarU32 value) {
85 Atom(ctx, inst, binding, offset, value, "XOR", "U32");
86}
87
88void EmitStorageAtomicExchange32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
89 ScalarU32 offset, ScalarU32 value) {
90 Atom(ctx, inst, binding, offset, value, "EXCH", "U32");
91}
92
93void EmitStorageAtomicIAdd64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
94 ScalarU32 offset, Register value) {
95 Atom(ctx, inst, binding, offset, value, "ADD", "U64");
96}
97
98void EmitStorageAtomicSMin64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
99 ScalarU32 offset, Register value) {
100 Atom(ctx, inst, binding, offset, value, "MIN", "S64");
101}
102
103void EmitStorageAtomicUMin64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
104 ScalarU32 offset, Register value) {
105 Atom(ctx, inst, binding, offset, value, "MIN", "U64");
106}
107
108void EmitStorageAtomicSMax64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
109 ScalarU32 offset, Register value) {
110 Atom(ctx, inst, binding, offset, value, "MAX", "S64");
111}
112
113void EmitStorageAtomicUMax64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
114 ScalarU32 offset, Register value) {
115 Atom(ctx, inst, binding, offset, value, "MAX", "U64");
116}
117
118void EmitStorageAtomicAnd64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
119 ScalarU32 offset, Register value) {
120 Atom(ctx, inst, binding, offset, value, "AND", "U64");
121}
122
123void EmitStorageAtomicOr64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
124 ScalarU32 offset, Register value) {
125 Atom(ctx, inst, binding, offset, value, "OR", "U64");
126}
127
128void EmitStorageAtomicXor64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
129 ScalarU32 offset, Register value) {
130 Atom(ctx, inst, binding, offset, value, "XOR", "U64");
131}
132
133void EmitStorageAtomicExchange64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
134 ScalarU32 offset, Register value) {
135 Atom(ctx, inst, binding, offset, value, "EXCH", "U64");
136}
137
138void EmitStorageAtomicAddF32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
139 ScalarU32 offset, ScalarF32 value) {
140 Atom(ctx, inst, binding, offset, value, "ADD", "F32");
141}
142
143void EmitStorageAtomicAddF16x2(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
144 ScalarU32 offset, Register value) {
145 Atom(ctx, inst, binding, offset, value, "ADD", "F16x2");
146}
147
148void EmitStorageAtomicAddF32x2([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst,
149 [[maybe_unused]] const IR::Value& binding,
150 [[maybe_unused]] ScalarU32 offset, [[maybe_unused]] Register value) {
151 throw NotImplementedException("GLASM instruction");
152}
153
154void EmitStorageAtomicMinF16x2(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
155 ScalarU32 offset, Register value) {
156 Atom(ctx, inst, binding, offset, value, "MIN", "F16x2");
157}
158
159void EmitStorageAtomicMinF32x2([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst,
160 [[maybe_unused]] const IR::Value& binding,
161 [[maybe_unused]] ScalarU32 offset, [[maybe_unused]] Register value) {
162 throw NotImplementedException("GLASM instruction");
163}
164
165void EmitStorageAtomicMaxF16x2(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
166 ScalarU32 offset, Register value) {
167 Atom(ctx, inst, binding, offset, value, "MAX", "F16x2");
168}
169
170void EmitStorageAtomicMaxF32x2([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst& inst,
171 [[maybe_unused]] const IR::Value& binding,
172 [[maybe_unused]] ScalarU32 offset, [[maybe_unused]] Register value) {
173 throw NotImplementedException("GLASM instruction");
174}
175
176void EmitGlobalAtomicIAdd32(EmitContext&) {
177 throw NotImplementedException("GLASM instruction");
178}
179
180void EmitGlobalAtomicSMin32(EmitContext&) {
181 throw NotImplementedException("GLASM instruction");
182}
183
184void EmitGlobalAtomicUMin32(EmitContext&) {
185 throw NotImplementedException("GLASM instruction");
186}
187
188void EmitGlobalAtomicSMax32(EmitContext&) {
189 throw NotImplementedException("GLASM instruction");
190}
191
192void EmitGlobalAtomicUMax32(EmitContext&) {
193 throw NotImplementedException("GLASM instruction");
194}
195
196void EmitGlobalAtomicInc32(EmitContext&) {
197 throw NotImplementedException("GLASM instruction");
198}
199
200void EmitGlobalAtomicDec32(EmitContext&) {
201 throw NotImplementedException("GLASM instruction");
202}
203
204void EmitGlobalAtomicAnd32(EmitContext&) {
205 throw NotImplementedException("GLASM instruction");
206}
207
208void EmitGlobalAtomicOr32(EmitContext&) {
209 throw NotImplementedException("GLASM instruction");
210}
211
212void EmitGlobalAtomicXor32(EmitContext&) {
213 throw NotImplementedException("GLASM instruction");
214}
215
216void EmitGlobalAtomicExchange32(EmitContext&) {
217 throw NotImplementedException("GLASM instruction");
218}
219
220void EmitGlobalAtomicIAdd64(EmitContext&) {
221 throw NotImplementedException("GLASM instruction");
222}
223
224void EmitGlobalAtomicSMin64(EmitContext&) {
225 throw NotImplementedException("GLASM instruction");
226}
227
228void EmitGlobalAtomicUMin64(EmitContext&) {
229 throw NotImplementedException("GLASM instruction");
230}
231
232void EmitGlobalAtomicSMax64(EmitContext&) {
233 throw NotImplementedException("GLASM instruction");
234}
235
236void EmitGlobalAtomicUMax64(EmitContext&) {
237 throw NotImplementedException("GLASM instruction");
238}
239
240void EmitGlobalAtomicInc64(EmitContext&) {
241 throw NotImplementedException("GLASM instruction");
242}
243
244void EmitGlobalAtomicDec64(EmitContext&) {
245 throw NotImplementedException("GLASM instruction");
246}
247
248void EmitGlobalAtomicAnd64(EmitContext&) {
249 throw NotImplementedException("GLASM instruction");
250}
251
252void EmitGlobalAtomicOr64(EmitContext&) {
253 throw NotImplementedException("GLASM instruction");
254}
255
256void EmitGlobalAtomicXor64(EmitContext&) {
257 throw NotImplementedException("GLASM instruction");
258}
259
260void EmitGlobalAtomicExchange64(EmitContext&) {
261 throw NotImplementedException("GLASM instruction");
262}
263
264void EmitGlobalAtomicAddF32(EmitContext&) {
265 throw NotImplementedException("GLASM instruction");
266}
267
268void EmitGlobalAtomicAddF16x2(EmitContext&) {
269 throw NotImplementedException("GLASM instruction");
270}
271
272void EmitGlobalAtomicAddF32x2(EmitContext&) {
273 throw NotImplementedException("GLASM instruction");
274}
275
276void EmitGlobalAtomicMinF16x2(EmitContext&) {
277 throw NotImplementedException("GLASM instruction");
278}
279
280void EmitGlobalAtomicMinF32x2(EmitContext&) {
281 throw NotImplementedException("GLASM instruction");
282}
283
284void EmitGlobalAtomicMaxF16x2(EmitContext&) {
285 throw NotImplementedException("GLASM instruction");
286}
287
288void EmitGlobalAtomicMaxF32x2(EmitContext&) {
289 throw NotImplementedException("GLASM instruction");
290}
291} // namespace Shader::Backend::GLASM
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h b/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h
index 94843cc60..817001afb 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_instructions.h
@@ -356,60 +356,60 @@ void EmitSharedAtomicOr32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32
356void EmitSharedAtomicXor32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32 value); 356void EmitSharedAtomicXor32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32 value);
357void EmitSharedAtomicExchange32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32 value); 357void EmitSharedAtomicExchange32(EmitContext& ctx, ScalarU32 pointer_offset, ScalarU32 value);
358void EmitSharedAtomicExchange64(EmitContext& ctx, ScalarU32 pointer_offset, Register value); 358void EmitSharedAtomicExchange64(EmitContext& ctx, ScalarU32 pointer_offset, Register value);
359void EmitStorageAtomicIAdd32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 359void EmitStorageAtomicIAdd32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
360 ScalarU32 value); 360 ScalarU32 offset, ScalarU32 value);
361void EmitStorageAtomicSMin32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 361void EmitStorageAtomicSMin32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
362 ScalarS32 value); 362 ScalarU32 offset, ScalarS32 value);
363void EmitStorageAtomicUMin32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 363void EmitStorageAtomicUMin32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
364 ScalarU32 value); 364 ScalarU32 offset, ScalarU32 value);
365void EmitStorageAtomicSMax32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 365void EmitStorageAtomicSMax32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
366 ScalarS32 value); 366 ScalarU32 offset, ScalarS32 value);
367void EmitStorageAtomicUMax32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 367void EmitStorageAtomicUMax32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
368 ScalarU32 value); 368 ScalarU32 offset, ScalarU32 value);
369void EmitStorageAtomicInc32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 369void EmitStorageAtomicInc32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
370 ScalarU32 value); 370 ScalarU32 offset, ScalarU32 value);
371void EmitStorageAtomicDec32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 371void EmitStorageAtomicDec32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
372 ScalarU32 value); 372 ScalarU32 offset, ScalarU32 value);
373void EmitStorageAtomicAnd32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 373void EmitStorageAtomicAnd32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
374 ScalarU32 value); 374 ScalarU32 offset, ScalarU32 value);
375void EmitStorageAtomicOr32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 375void EmitStorageAtomicOr32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
376 ScalarU32 value); 376 ScalarU32 offset, ScalarU32 value);
377void EmitStorageAtomicXor32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 377void EmitStorageAtomicXor32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
378 ScalarU32 value); 378 ScalarU32 offset, ScalarU32 value);
379void EmitStorageAtomicExchange32(EmitContext& ctx, const IR::Value& binding, 379void EmitStorageAtomicExchange32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
380 const IR::Value& offset, ScalarU32 value); 380 ScalarU32 offset, ScalarU32 value);
381void EmitStorageAtomicIAdd64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 381void EmitStorageAtomicIAdd64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
382 Register value); 382 ScalarU32 offset, Register value);
383void EmitStorageAtomicSMin64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 383void EmitStorageAtomicSMin64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
384 Register value); 384 ScalarU32 offset, Register value);
385void EmitStorageAtomicUMin64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 385void EmitStorageAtomicUMin64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
386 Register value); 386 ScalarU32 offset, Register value);
387void EmitStorageAtomicSMax64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 387void EmitStorageAtomicSMax64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
388 Register value); 388 ScalarU32 offset, Register value);
389void EmitStorageAtomicUMax64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 389void EmitStorageAtomicUMax64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
390 Register value); 390 ScalarU32 offset, Register value);
391void EmitStorageAtomicAnd64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 391void EmitStorageAtomicAnd64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
392 Register value); 392 ScalarU32 offset, Register value);
393void EmitStorageAtomicOr64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 393void EmitStorageAtomicOr64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
394 Register value); 394 ScalarU32 offset, Register value);
395void EmitStorageAtomicXor64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 395void EmitStorageAtomicXor64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
396 Register value); 396 ScalarU32 offset, Register value);
397void EmitStorageAtomicExchange64(EmitContext& ctx, const IR::Value& binding, 397void EmitStorageAtomicExchange64(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
398 const IR::Value& offset, Register value); 398 ScalarU32 offset, Register value);
399void EmitStorageAtomicAddF32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 399void EmitStorageAtomicAddF32(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
400 ScalarF32 value); 400 ScalarU32 offset, ScalarF32 value);
401void EmitStorageAtomicAddF16x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 401void EmitStorageAtomicAddF16x2(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
402 Register value); 402 ScalarU32 offset, Register value);
403void EmitStorageAtomicAddF32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 403void EmitStorageAtomicAddF32x2(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
404 Register value); 404 ScalarU32 offset, Register value);
405void EmitStorageAtomicMinF16x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 405void EmitStorageAtomicMinF16x2(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
406 Register value); 406 ScalarU32 offset, Register value);
407void EmitStorageAtomicMinF32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 407void EmitStorageAtomicMinF32x2(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
408 Register value); 408 ScalarU32 offset, Register value);
409void EmitStorageAtomicMaxF16x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 409void EmitStorageAtomicMaxF16x2(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
410 Register value); 410 ScalarU32 offset, Register value);
411void EmitStorageAtomicMaxF32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset, 411void EmitStorageAtomicMaxF32x2(EmitContext& ctx, IR::Inst& inst, const IR::Value& binding,
412 Register value); 412 ScalarU32 offset, Register value);
413void EmitGlobalAtomicIAdd32(EmitContext& ctx); 413void EmitGlobalAtomicIAdd32(EmitContext& ctx);
414void EmitGlobalAtomicSMin32(EmitContext& ctx); 414void EmitGlobalAtomicSMin32(EmitContext& ctx);
415void EmitGlobalAtomicUMin32(EmitContext& ctx); 415void EmitGlobalAtomicUMin32(EmitContext& ctx);
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp b/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp
index ebdbbcf5f..85110bcc9 100644
--- a/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp
+++ b/src/shader_recompiler/backend/glasm/emit_glasm_not_implemented.cpp
@@ -321,257 +321,6 @@ void EmitSharedAtomicExchange64(EmitContext& ctx, ScalarU32 pointer_offset, Regi
321 NotImplemented(); 321 NotImplemented();
322} 322}
323 323
324void EmitStorageAtomicIAdd32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
325 ScalarU32 value) {
326 NotImplemented();
327}
328
329void EmitStorageAtomicSMin32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
330 ScalarS32 value) {
331 NotImplemented();
332}
333
334void EmitStorageAtomicUMin32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
335 ScalarU32 value) {
336 NotImplemented();
337}
338
339void EmitStorageAtomicSMax32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
340 ScalarS32 value) {
341 NotImplemented();
342}
343
344void EmitStorageAtomicUMax32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
345 ScalarU32 value) {
346 NotImplemented();
347}
348
349void EmitStorageAtomicInc32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
350 ScalarU32 value) {
351 NotImplemented();
352}
353
354void EmitStorageAtomicDec32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
355 ScalarU32 value) {
356 NotImplemented();
357}
358
359void EmitStorageAtomicAnd32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
360 ScalarU32 value) {
361 NotImplemented();
362}
363
364void EmitStorageAtomicOr32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
365 ScalarU32 value) {
366 NotImplemented();
367}
368
369void EmitStorageAtomicXor32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
370 ScalarU32 value) {
371 NotImplemented();
372}
373
374void EmitStorageAtomicExchange32(EmitContext& ctx, const IR::Value& binding,
375 const IR::Value& offset, ScalarU32 value) {
376 NotImplemented();
377}
378
379void EmitStorageAtomicIAdd64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
380 Register value) {
381 NotImplemented();
382}
383
384void EmitStorageAtomicSMin64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
385 Register value) {
386 NotImplemented();
387}
388
389void EmitStorageAtomicUMin64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
390 Register value) {
391 NotImplemented();
392}
393
394void EmitStorageAtomicSMax64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
395 Register value) {
396 NotImplemented();
397}
398
399void EmitStorageAtomicUMax64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
400 Register value) {
401 NotImplemented();
402}
403
404void EmitStorageAtomicAnd64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
405 Register value) {
406 NotImplemented();
407}
408
409void EmitStorageAtomicOr64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
410 Register value) {
411 NotImplemented();
412}
413
414void EmitStorageAtomicXor64(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
415 Register value) {
416 NotImplemented();
417}
418
419void EmitStorageAtomicExchange64(EmitContext& ctx, const IR::Value& binding,
420 const IR::Value& offset, Register value) {
421 NotImplemented();
422}
423
424void EmitStorageAtomicAddF32(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
425 ScalarF32 value) {
426 NotImplemented();
427}
428
429void EmitStorageAtomicAddF16x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
430 Register value) {
431 NotImplemented();
432}
433
434void EmitStorageAtomicAddF32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
435 Register value) {
436 NotImplemented();
437}
438
439void EmitStorageAtomicMinF16x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
440 Register value) {
441 NotImplemented();
442}
443
444void EmitStorageAtomicMinF32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
445 Register value) {
446 NotImplemented();
447}
448
449void EmitStorageAtomicMaxF16x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
450 Register value) {
451 NotImplemented();
452}
453
454void EmitStorageAtomicMaxF32x2(EmitContext& ctx, const IR::Value& binding, const IR::Value& offset,
455 Register value) {
456 NotImplemented();
457}
458
459void EmitGlobalAtomicIAdd32(EmitContext& ctx) {
460 NotImplemented();
461}
462
463void EmitGlobalAtomicSMin32(EmitContext& ctx) {
464 NotImplemented();
465}
466
467void EmitGlobalAtomicUMin32(EmitContext& ctx) {
468 NotImplemented();
469}
470
471void EmitGlobalAtomicSMax32(EmitContext& ctx) {
472 NotImplemented();
473}
474
475void EmitGlobalAtomicUMax32(EmitContext& ctx) {
476 NotImplemented();
477}
478
479void EmitGlobalAtomicInc32(EmitContext& ctx) {
480 NotImplemented();
481}
482
483void EmitGlobalAtomicDec32(EmitContext& ctx) {
484 NotImplemented();
485}
486
487void EmitGlobalAtomicAnd32(EmitContext& ctx) {
488 NotImplemented();
489}
490
491void EmitGlobalAtomicOr32(EmitContext& ctx) {
492 NotImplemented();
493}
494
495void EmitGlobalAtomicXor32(EmitContext& ctx) {
496 NotImplemented();
497}
498
499void EmitGlobalAtomicExchange32(EmitContext& ctx) {
500 NotImplemented();
501}
502
503void EmitGlobalAtomicIAdd64(EmitContext& ctx) {
504 NotImplemented();
505}
506
507void EmitGlobalAtomicSMin64(EmitContext& ctx) {
508 NotImplemented();
509}
510
511void EmitGlobalAtomicUMin64(EmitContext& ctx) {
512 NotImplemented();
513}
514
515void EmitGlobalAtomicSMax64(EmitContext& ctx) {
516 NotImplemented();
517}
518
519void EmitGlobalAtomicUMax64(EmitContext& ctx) {
520 NotImplemented();
521}
522
523void EmitGlobalAtomicInc64(EmitContext& ctx) {
524 NotImplemented();
525}
526
527void EmitGlobalAtomicDec64(EmitContext& ctx) {
528 NotImplemented();
529}
530
531void EmitGlobalAtomicAnd64(EmitContext& ctx) {
532 NotImplemented();
533}
534
535void EmitGlobalAtomicOr64(EmitContext& ctx) {
536 NotImplemented();
537}
538
539void EmitGlobalAtomicXor64(EmitContext& ctx) {
540 NotImplemented();
541}
542
543void EmitGlobalAtomicExchange64(EmitContext& ctx) {
544 NotImplemented();
545}
546
547void EmitGlobalAtomicAddF32(EmitContext& ctx) {
548 NotImplemented();
549}
550
551void EmitGlobalAtomicAddF16x2(EmitContext& ctx) {
552 NotImplemented();
553}
554
555void EmitGlobalAtomicAddF32x2(EmitContext& ctx) {
556 NotImplemented();
557}
558
559void EmitGlobalAtomicMinF16x2(EmitContext& ctx) {
560 NotImplemented();
561}
562
563void EmitGlobalAtomicMinF32x2(EmitContext& ctx) {
564 NotImplemented();
565}
566
567void EmitGlobalAtomicMaxF16x2(EmitContext& ctx) {
568 NotImplemented();
569}
570
571void EmitGlobalAtomicMaxF32x2(EmitContext& ctx) {
572 NotImplemented();
573}
574
575void EmitLogicalOr(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b) { 324void EmitLogicalOr(EmitContext& ctx, IR::Inst& inst, ScalarS32 a, ScalarS32 b) {
576 ctx.Add("OR.S {},{},{};", inst, a, b); 325 ctx.Add("OR.S {},{},{};", inst, a, b);
577} 326}