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