summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp')
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp221
1 files changed, 221 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp
index e69de29bb..6977f74f9 100644
--- a/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp
@@ -0,0 +1,221 @@
1
2// Copyright 2021 yuzu Emulator Project
3// Licensed under GPLv2 or any later version
4// Refer to the license.txt file included.
5
6#include <string_view>
7
8#include "shader_recompiler/backend/glsl/emit_context.h"
9#include "shader_recompiler/backend/glsl/emit_glsl_instructions.h"
10#include "shader_recompiler/frontend/ir/value.h"
11#include "shader_recompiler/profile.h"
12
13namespace Shader::Backend::GLSL {
14void EmitIAdd32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
15 [[maybe_unused]] std::string a, [[maybe_unused]] std::string b) {
16 ctx.AddU32("{}={}+{};", *inst, a, b);
17}
18
19void EmitIAdd64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string a,
20 [[maybe_unused]] std::string b) {
21 throw NotImplementedException("GLSL Instruction");
22}
23
24void EmitISub32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string a,
25 [[maybe_unused]] std::string b) {
26 throw NotImplementedException("GLSL Instruction");
27}
28
29void EmitISub64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string a,
30 [[maybe_unused]] std::string b) {
31 throw NotImplementedException("GLSL Instruction");
32}
33
34void EmitIMul32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string a,
35 [[maybe_unused]] std::string b) {
36 throw NotImplementedException("GLSL Instruction");
37}
38
39void EmitINeg32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string value) {
40 throw NotImplementedException("GLSL Instruction");
41}
42
43void EmitINeg64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string value) {
44 throw NotImplementedException("GLSL Instruction");
45}
46
47void EmitIAbs32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string value) {
48 throw NotImplementedException("GLSL Instruction");
49}
50
51void EmitIAbs64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string value) {
52 throw NotImplementedException("GLSL Instruction");
53}
54
55void EmitShiftLeftLogical32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string base,
56 [[maybe_unused]] std::string shift) {
57 throw NotImplementedException("GLSL Instruction");
58}
59
60void EmitShiftLeftLogical64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string base,
61 [[maybe_unused]] std::string shift) {
62 throw NotImplementedException("GLSL Instruction");
63}
64
65void EmitShiftRightLogical32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string base,
66 [[maybe_unused]] std::string shift) {
67 throw NotImplementedException("GLSL Instruction");
68}
69
70void EmitShiftRightLogical64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string base,
71 [[maybe_unused]] std::string shift) {
72 throw NotImplementedException("GLSL Instruction");
73}
74
75void EmitShiftRightArithmetic32([[maybe_unused]] EmitContext& ctx,
76 [[maybe_unused]] std::string base,
77 [[maybe_unused]] std::string shift) {
78 throw NotImplementedException("GLSL Instruction");
79}
80
81void EmitShiftRightArithmetic64([[maybe_unused]] EmitContext& ctx,
82 [[maybe_unused]] std::string base,
83 [[maybe_unused]] std::string shift) {
84 throw NotImplementedException("GLSL Instruction");
85}
86
87void EmitBitwiseAnd32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
88 [[maybe_unused]] std::string a, [[maybe_unused]] std::string b) {
89 throw NotImplementedException("GLSL Instruction");
90}
91
92void EmitBitwiseOr32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
93 [[maybe_unused]] std::string a, [[maybe_unused]] std::string b) {
94 throw NotImplementedException("GLSL Instruction");
95}
96
97void EmitBitwiseXor32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
98 [[maybe_unused]] std::string a, [[maybe_unused]] std::string b) {
99 throw NotImplementedException("GLSL Instruction");
100}
101
102void EmitBitFieldInsert([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string base,
103 [[maybe_unused]] std::string insert, [[maybe_unused]] std::string offset,
104 std::string count) {
105 throw NotImplementedException("GLSL Instruction");
106}
107
108void EmitBitFieldSExtract([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
109 [[maybe_unused]] std::string base, [[maybe_unused]] std::string offset,
110 std::string count) {
111 throw NotImplementedException("GLSL Instruction");
112}
113
114void EmitBitFieldUExtract([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
115 [[maybe_unused]] std::string base, [[maybe_unused]] std::string offset,
116 std::string count) {
117 throw NotImplementedException("GLSL Instruction");
118}
119
120void EmitBitReverse32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string value) {
121 throw NotImplementedException("GLSL Instruction");
122}
123
124void EmitBitCount32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string value) {
125 throw NotImplementedException("GLSL Instruction");
126}
127
128void EmitBitwiseNot32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string value) {
129 throw NotImplementedException("GLSL Instruction");
130}
131
132void EmitFindSMsb32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string value) {
133 throw NotImplementedException("GLSL Instruction");
134}
135
136void EmitFindUMsb32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string value) {
137 throw NotImplementedException("GLSL Instruction");
138}
139
140void EmitSMin32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string a,
141 [[maybe_unused]] std::string b) {
142 throw NotImplementedException("GLSL Instruction");
143}
144
145void EmitUMin32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string a,
146 [[maybe_unused]] std::string b) {
147 throw NotImplementedException("GLSL Instruction");
148}
149
150void EmitSMax32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string a,
151 [[maybe_unused]] std::string b) {
152 throw NotImplementedException("GLSL Instruction");
153}
154
155void EmitUMax32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string a,
156 [[maybe_unused]] std::string b) {
157 throw NotImplementedException("GLSL Instruction");
158}
159
160void EmitSClamp32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
161 [[maybe_unused]] std::string value, [[maybe_unused]] std::string min,
162 std::string max) {
163 throw NotImplementedException("GLSL Instruction");
164}
165
166void EmitUClamp32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
167 [[maybe_unused]] std::string value, [[maybe_unused]] std::string min,
168 std::string max) {
169 throw NotImplementedException("GLSL Instruction");
170}
171
172void EmitSLessThan([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string lhs,
173 [[maybe_unused]] std::string rhs) {
174 throw NotImplementedException("GLSL Instruction");
175}
176
177void EmitULessThan([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string lhs,
178 [[maybe_unused]] std::string rhs) {
179 throw NotImplementedException("GLSL Instruction");
180}
181
182void EmitIEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string lhs,
183 [[maybe_unused]] std::string rhs) {
184 throw NotImplementedException("GLSL Instruction");
185}
186
187void EmitSLessThanEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string lhs,
188 [[maybe_unused]] std::string rhs) {
189 throw NotImplementedException("GLSL Instruction");
190}
191
192void EmitULessThanEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string lhs,
193 [[maybe_unused]] std::string rhs) {
194 throw NotImplementedException("GLSL Instruction");
195}
196
197void EmitSGreaterThan([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string lhs,
198 [[maybe_unused]] std::string rhs) {
199 throw NotImplementedException("GLSL Instruction");
200}
201
202void EmitUGreaterThan([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string lhs,
203 [[maybe_unused]] std::string rhs) {
204 throw NotImplementedException("GLSL Instruction");
205}
206
207void EmitINotEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string lhs,
208 [[maybe_unused]] std::string rhs) {
209 throw NotImplementedException("GLSL Instruction");
210}
211
212void EmitSGreaterThanEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string lhs,
213 [[maybe_unused]] std::string rhs) {
214 throw NotImplementedException("GLSL Instruction");
215}
216
217void EmitUGreaterThanEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string lhs,
218 [[maybe_unused]] std::string rhs) {
219 throw NotImplementedException("GLSL Instruction");
220}
221} // namespace Shader::Backend::GLSL