summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/backend')
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_instructions.h72
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp125
-rw-r--r--src/shader_recompiler/backend/glsl/reg_alloc.cpp3
3 files changed, 106 insertions, 94 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_instructions.h b/src/shader_recompiler/backend/glsl/emit_glsl_instructions.h
index 16e01c81c..550193dc3 100644
--- a/src/shader_recompiler/backend/glsl/emit_glsl_instructions.h
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_instructions.h
@@ -317,52 +317,54 @@ void EmitFPIsNan16(EmitContext& ctx, std::string value);
317void EmitFPIsNan32(EmitContext& ctx, std::string value); 317void EmitFPIsNan32(EmitContext& ctx, std::string value);
318void EmitFPIsNan64(EmitContext& ctx, std::string value); 318void EmitFPIsNan64(EmitContext& ctx, std::string value);
319void EmitIAdd32(EmitContext& ctx, IR::Inst* inst, std::string a, std::string b); 319void EmitIAdd32(EmitContext& ctx, IR::Inst* inst, std::string a, std::string b);
320void EmitIAdd64(EmitContext& ctx, std::string a, std::string b); 320void EmitIAdd64(EmitContext& ctx, IR::Inst* inst, std::string a, std::string b);
321void EmitISub32(EmitContext& ctx, std::string a, std::string b); 321void EmitISub32(EmitContext& ctx, IR::Inst* inst, std::string a, std::string b);
322void EmitISub64(EmitContext& ctx, std::string a, std::string b); 322void EmitISub64(EmitContext& ctx, IR::Inst* inst, std::string a, std::string b);
323void EmitIMul32(EmitContext& ctx, std::string a, std::string b); 323void EmitIMul32(EmitContext& ctx, IR::Inst* inst, std::string a, std::string b);
324void EmitINeg32(EmitContext& ctx, std::string value); 324void EmitINeg32(EmitContext& ctx, IR::Inst* inst, std::string value);
325void EmitINeg64(EmitContext& ctx, std::string value); 325void EmitINeg64(EmitContext& ctx, IR::Inst* inst, std::string value);
326void EmitIAbs32(EmitContext& ctx, std::string value); 326void EmitIAbs32(EmitContext& ctx, IR::Inst* inst, std::string value);
327void EmitIAbs64(EmitContext& ctx, std::string value); 327void EmitIAbs64(EmitContext& ctx, IR::Inst* inst, std::string value);
328void EmitShiftLeftLogical32(EmitContext& ctx, std::string base, std::string shift); 328void EmitShiftLeftLogical32(EmitContext& ctx, IR::Inst* inst, std::string base, std::string shift);
329void EmitShiftLeftLogical64(EmitContext& ctx, std::string base, std::string shift); 329void EmitShiftLeftLogical64(EmitContext& ctx, IR::Inst* inst, std::string base, std::string shift);
330void EmitShiftRightLogical32(EmitContext& ctx, std::string base, std::string shift); 330void EmitShiftRightLogical32(EmitContext& ctx, IR::Inst* inst, std::string base, std::string shift);
331void EmitShiftRightLogical64(EmitContext& ctx, std::string base, std::string shift); 331void EmitShiftRightLogical64(EmitContext& ctx, IR::Inst* inst, std::string base, std::string shift);
332void EmitShiftRightArithmetic32(EmitContext& ctx, std::string base, std::string shift); 332void EmitShiftRightArithmetic32(EmitContext& ctx, IR::Inst* inst, std::string base,
333void EmitShiftRightArithmetic64(EmitContext& ctx, std::string base, std::string shift); 333 std::string shift);
334void EmitShiftRightArithmetic64(EmitContext& ctx, IR::Inst* inst, std::string base,
335 std::string shift);
334void EmitBitwiseAnd32(EmitContext& ctx, IR::Inst* inst, std::string a, std::string b); 336void EmitBitwiseAnd32(EmitContext& ctx, IR::Inst* inst, std::string a, std::string b);
335void EmitBitwiseOr32(EmitContext& ctx, IR::Inst* inst, std::string a, std::string b); 337void EmitBitwiseOr32(EmitContext& ctx, IR::Inst* inst, std::string a, std::string b);
336void EmitBitwiseXor32(EmitContext& ctx, IR::Inst* inst, std::string a, std::string b); 338void EmitBitwiseXor32(EmitContext& ctx, IR::Inst* inst, std::string a, std::string b);
337void EmitBitFieldInsert(EmitContext& ctx, std::string base, std::string insert, std::string offset, 339void EmitBitFieldInsert(EmitContext& ctx, IR::Inst* inst, std::string base, std::string insert,
338 std::string count); 340 std::string offset, std::string count);
339void EmitBitFieldSExtract(EmitContext& ctx, IR::Inst* inst, std::string base, std::string offset, 341void EmitBitFieldSExtract(EmitContext& ctx, IR::Inst* inst, std::string base, std::string offset,
340 std::string count); 342 std::string count);
341void EmitBitFieldUExtract(EmitContext& ctx, IR::Inst* inst, std::string base, std::string offset, 343void EmitBitFieldUExtract(EmitContext& ctx, IR::Inst* inst, std::string base, std::string offset,
342 std::string count); 344 std::string count);
343void EmitBitReverse32(EmitContext& ctx, std::string value); 345void EmitBitReverse32(EmitContext& ctx, IR::Inst* inst, std::string value);
344void EmitBitCount32(EmitContext& ctx, std::string value); 346void EmitBitCount32(EmitContext& ctx, IR::Inst* inst, std::string value);
345void EmitBitwiseNot32(EmitContext& ctx, std::string value); 347void EmitBitwiseNot32(EmitContext& ctx, IR::Inst* inst, std::string value);
346void EmitFindSMsb32(EmitContext& ctx, std::string value); 348void EmitFindSMsb32(EmitContext& ctx, IR::Inst* inst, std::string value);
347void EmitFindUMsb32(EmitContext& ctx, std::string value); 349void EmitFindUMsb32(EmitContext& ctx, IR::Inst* inst, std::string value);
348void EmitSMin32(EmitContext& ctx, std::string a, std::string b); 350void EmitSMin32(EmitContext& ctx, IR::Inst* inst, std::string a, std::string b);
349void EmitUMin32(EmitContext& ctx, std::string a, std::string b); 351void EmitUMin32(EmitContext& ctx, IR::Inst* inst, std::string a, std::string b);
350void EmitSMax32(EmitContext& ctx, std::string a, std::string b); 352void EmitSMax32(EmitContext& ctx, IR::Inst* inst, std::string a, std::string b);
351void EmitUMax32(EmitContext& ctx, std::string a, std::string b); 353void EmitUMax32(EmitContext& ctx, IR::Inst* inst, std::string a, std::string b);
352void EmitSClamp32(EmitContext& ctx, IR::Inst* inst, std::string value, std::string min, 354void EmitSClamp32(EmitContext& ctx, IR::Inst* inst, std::string value, std::string min,
353 std::string max); 355 std::string max);
354void EmitUClamp32(EmitContext& ctx, IR::Inst* inst, std::string value, std::string min, 356void EmitUClamp32(EmitContext& ctx, IR::Inst* inst, std::string value, std::string min,
355 std::string max); 357 std::string max);
356void EmitSLessThan(EmitContext& ctx, std::string lhs, std::string rhs); 358void EmitSLessThan(EmitContext& ctx, IR::Inst* inst, std::string lhs, std::string rhs);
357void EmitULessThan(EmitContext& ctx, std::string lhs, std::string rhs); 359void EmitULessThan(EmitContext& ctx, IR::Inst* inst, std::string lhs, std::string rhs);
358void EmitIEqual(EmitContext& ctx, std::string lhs, std::string rhs); 360void EmitIEqual(EmitContext& ctx, IR::Inst* inst, std::string lhs, std::string rhs);
359void EmitSLessThanEqual(EmitContext& ctx, std::string lhs, std::string rhs); 361void EmitSLessThanEqual(EmitContext& ctx, IR::Inst* inst, std::string lhs, std::string rhs);
360void EmitULessThanEqual(EmitContext& ctx, std::string lhs, std::string rhs); 362void EmitULessThanEqual(EmitContext& ctx, IR::Inst* inst, std::string lhs, std::string rhs);
361void EmitSGreaterThan(EmitContext& ctx, std::string lhs, std::string rhs); 363void EmitSGreaterThan(EmitContext& ctx, IR::Inst* inst, std::string lhs, std::string rhs);
362void EmitUGreaterThan(EmitContext& ctx, std::string lhs, std::string rhs); 364void EmitUGreaterThan(EmitContext& ctx, IR::Inst* inst, std::string lhs, std::string rhs);
363void EmitINotEqual(EmitContext& ctx, std::string lhs, std::string rhs); 365void EmitINotEqual(EmitContext& ctx, IR::Inst* inst, std::string lhs, std::string rhs);
364void EmitSGreaterThanEqual(EmitContext& ctx, std::string lhs, std::string rhs); 366void EmitSGreaterThanEqual(EmitContext& ctx, IR::Inst* inst, std::string lhs, std::string rhs);
365void EmitUGreaterThanEqual(EmitContext& ctx, std::string lhs, std::string rhs); 367void EmitUGreaterThanEqual(EmitContext& ctx, IR::Inst* inst, std::string lhs, std::string rhs);
366void EmitSharedAtomicIAdd32(EmitContext& ctx, std::string pointer_offset, std::string value); 368void EmitSharedAtomicIAdd32(EmitContext& ctx, std::string pointer_offset, std::string value);
367void EmitSharedAtomicSMin32(EmitContext& ctx, std::string pointer_offset, std::string value); 369void EmitSharedAtomicSMin32(EmitContext& ctx, std::string pointer_offset, std::string value);
368void EmitSharedAtomicUMin32(EmitContext& ctx, std::string pointer_offset, std::string value); 370void EmitSharedAtomicUMin32(EmitContext& ctx, std::string pointer_offset, std::string value);
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp
index 6977f74f9..f03b2dba9 100644
--- a/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp
@@ -16,69 +16,75 @@ void EmitIAdd32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* in
16 ctx.AddU32("{}={}+{};", *inst, a, b); 16 ctx.AddU32("{}={}+{};", *inst, a, b);
17} 17}
18 18
19void EmitIAdd64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string a, 19void EmitIAdd64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
20 [[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]] std::string a, 24void EmitISub32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
25 [[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]] std::string a, 29void EmitISub64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
30 [[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]] std::string a, 34void EmitIMul32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
35 [[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]] std::string value) { 39void EmitINeg32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
40 throw NotImplementedException("GLSL Instruction"); 40 [[maybe_unused]] std::string value) {
41 ctx.AddU32("{}=-{};", *inst, value);
41} 42}
42 43
43void EmitINeg64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string value) { 44void EmitINeg64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
45 [[maybe_unused]] std::string value) {
44 throw NotImplementedException("GLSL Instruction"); 46 throw NotImplementedException("GLSL Instruction");
45} 47}
46 48
47void EmitIAbs32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string value) { 49void EmitIAbs32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
50 [[maybe_unused]] std::string value) {
48 throw NotImplementedException("GLSL Instruction"); 51 throw NotImplementedException("GLSL Instruction");
49} 52}
50 53
51void EmitIAbs64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string value) { 54void EmitIAbs64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
55 [[maybe_unused]] std::string value) {
52 throw NotImplementedException("GLSL Instruction"); 56 throw NotImplementedException("GLSL Instruction");
53} 57}
54 58
55void EmitShiftLeftLogical32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string base, 59void EmitShiftLeftLogical32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
56 [[maybe_unused]] std::string shift) { 60 [[maybe_unused]] std::string base, [[maybe_unused]] std::string shift) {
57 throw NotImplementedException("GLSL Instruction"); 61 throw NotImplementedException("GLSL Instruction");
58} 62}
59 63
60void EmitShiftLeftLogical64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string base, 64void EmitShiftLeftLogical64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
61 [[maybe_unused]] std::string shift) { 65 [[maybe_unused]] std::string base, [[maybe_unused]] std::string shift) {
62 throw NotImplementedException("GLSL Instruction"); 66 throw NotImplementedException("GLSL Instruction");
63} 67}
64 68
65void EmitShiftRightLogical32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string base, 69void EmitShiftRightLogical32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
70 [[maybe_unused]] std::string base,
66 [[maybe_unused]] std::string shift) { 71 [[maybe_unused]] std::string shift) {
67 throw NotImplementedException("GLSL Instruction"); 72 throw NotImplementedException("GLSL Instruction");
68} 73}
69 74
70void EmitShiftRightLogical64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string base, 75void EmitShiftRightLogical64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
76 [[maybe_unused]] std::string base,
71 [[maybe_unused]] std::string shift) { 77 [[maybe_unused]] std::string shift) {
72 throw NotImplementedException("GLSL Instruction"); 78 throw NotImplementedException("GLSL Instruction");
73} 79}
74 80
75void EmitShiftRightArithmetic32([[maybe_unused]] EmitContext& ctx, 81void EmitShiftRightArithmetic32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
76 [[maybe_unused]] std::string base, 82 [[maybe_unused]] std::string base,
77 [[maybe_unused]] std::string shift) { 83 [[maybe_unused]] std::string shift) {
78 throw NotImplementedException("GLSL Instruction"); 84 throw NotImplementedException("GLSL Instruction");
79} 85}
80 86
81void EmitShiftRightArithmetic64([[maybe_unused]] EmitContext& ctx, 87void EmitShiftRightArithmetic64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
82 [[maybe_unused]] std::string base, 88 [[maybe_unused]] std::string base,
83 [[maybe_unused]] std::string shift) { 89 [[maybe_unused]] std::string shift) {
84 throw NotImplementedException("GLSL Instruction"); 90 throw NotImplementedException("GLSL Instruction");
@@ -99,9 +105,9 @@ void EmitBitwiseXor32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::In
99 throw NotImplementedException("GLSL Instruction"); 105 throw NotImplementedException("GLSL Instruction");
100} 106}
101 107
102void EmitBitFieldInsert([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string base, 108void EmitBitFieldInsert([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
103 [[maybe_unused]] std::string insert, [[maybe_unused]] std::string offset, 109 [[maybe_unused]] std::string base, [[maybe_unused]] std::string insert,
104 std::string count) { 110 [[maybe_unused]] std::string offset, std::string count) {
105 throw NotImplementedException("GLSL Instruction"); 111 throw NotImplementedException("GLSL Instruction");
106} 112}
107 113
@@ -117,43 +123,48 @@ void EmitBitFieldUExtract([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR
117 throw NotImplementedException("GLSL Instruction"); 123 throw NotImplementedException("GLSL Instruction");
118} 124}
119 125
120void EmitBitReverse32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string value) { 126void EmitBitReverse32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
127 [[maybe_unused]] std::string value) {
121 throw NotImplementedException("GLSL Instruction"); 128 throw NotImplementedException("GLSL Instruction");
122} 129}
123 130
124void EmitBitCount32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string value) { 131void EmitBitCount32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
132 [[maybe_unused]] std::string value) {
125 throw NotImplementedException("GLSL Instruction"); 133 throw NotImplementedException("GLSL Instruction");
126} 134}
127 135
128void EmitBitwiseNot32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string value) { 136void EmitBitwiseNot32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
137 [[maybe_unused]] std::string value) {
129 throw NotImplementedException("GLSL Instruction"); 138 throw NotImplementedException("GLSL Instruction");
130} 139}
131 140
132void EmitFindSMsb32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string value) { 141void EmitFindSMsb32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
142 [[maybe_unused]] std::string value) {
133 throw NotImplementedException("GLSL Instruction"); 143 throw NotImplementedException("GLSL Instruction");
134} 144}
135 145
136void EmitFindUMsb32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string value) { 146void EmitFindUMsb32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
147 [[maybe_unused]] std::string value) {
137 throw NotImplementedException("GLSL Instruction"); 148 throw NotImplementedException("GLSL Instruction");
138} 149}
139 150
140void EmitSMin32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string a, 151void EmitSMin32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
141 [[maybe_unused]] std::string b) { 152 [[maybe_unused]] std::string a, [[maybe_unused]] std::string b) {
142 throw NotImplementedException("GLSL Instruction"); 153 throw NotImplementedException("GLSL Instruction");
143} 154}
144 155
145void EmitUMin32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string a, 156void EmitUMin32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
146 [[maybe_unused]] std::string b) { 157 [[maybe_unused]] std::string a, [[maybe_unused]] std::string b) {
147 throw NotImplementedException("GLSL Instruction"); 158 throw NotImplementedException("GLSL Instruction");
148} 159}
149 160
150void EmitSMax32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string a, 161void EmitSMax32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
151 [[maybe_unused]] std::string b) { 162 [[maybe_unused]] std::string a, [[maybe_unused]] std::string b) {
152 throw NotImplementedException("GLSL Instruction"); 163 throw NotImplementedException("GLSL Instruction");
153} 164}
154 165
155void EmitUMax32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string a, 166void EmitUMax32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
156 [[maybe_unused]] std::string b) { 167 [[maybe_unused]] std::string a, [[maybe_unused]] std::string b) {
157 throw NotImplementedException("GLSL Instruction"); 168 throw NotImplementedException("GLSL Instruction");
158} 169}
159 170
@@ -169,53 +180,53 @@ void EmitUClamp32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst*
169 throw NotImplementedException("GLSL Instruction"); 180 throw NotImplementedException("GLSL Instruction");
170} 181}
171 182
172void EmitSLessThan([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string lhs, 183void EmitSLessThan([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
173 [[maybe_unused]] std::string rhs) { 184 [[maybe_unused]] std::string lhs, [[maybe_unused]] std::string rhs) {
174 throw NotImplementedException("GLSL Instruction"); 185 throw NotImplementedException("GLSL Instruction");
175} 186}
176 187
177void EmitULessThan([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string lhs, 188void EmitULessThan([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
178 [[maybe_unused]] std::string rhs) { 189 [[maybe_unused]] std::string lhs, [[maybe_unused]] std::string rhs) {
179 throw NotImplementedException("GLSL Instruction"); 190 throw NotImplementedException("GLSL Instruction");
180} 191}
181 192
182void EmitIEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string lhs, 193void EmitIEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
183 [[maybe_unused]] std::string rhs) { 194 [[maybe_unused]] std::string lhs, [[maybe_unused]] std::string rhs) {
184 throw NotImplementedException("GLSL Instruction"); 195 throw NotImplementedException("GLSL Instruction");
185} 196}
186 197
187void EmitSLessThanEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string lhs, 198void EmitSLessThanEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
188 [[maybe_unused]] std::string rhs) { 199 [[maybe_unused]] std::string lhs, [[maybe_unused]] std::string rhs) {
189 throw NotImplementedException("GLSL Instruction"); 200 throw NotImplementedException("GLSL Instruction");
190} 201}
191 202
192void EmitULessThanEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string lhs, 203void EmitULessThanEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
193 [[maybe_unused]] std::string rhs) { 204 [[maybe_unused]] std::string lhs, [[maybe_unused]] std::string rhs) {
194 throw NotImplementedException("GLSL Instruction"); 205 throw NotImplementedException("GLSL Instruction");
195} 206}
196 207
197void EmitSGreaterThan([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string lhs, 208void EmitSGreaterThan([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
198 [[maybe_unused]] std::string rhs) { 209 [[maybe_unused]] std::string lhs, [[maybe_unused]] std::string rhs) {
199 throw NotImplementedException("GLSL Instruction"); 210 throw NotImplementedException("GLSL Instruction");
200} 211}
201 212
202void EmitUGreaterThan([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string lhs, 213void EmitUGreaterThan([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
203 [[maybe_unused]] std::string rhs) { 214 [[maybe_unused]] std::string lhs, [[maybe_unused]] std::string rhs) {
204 throw NotImplementedException("GLSL Instruction"); 215 throw NotImplementedException("GLSL Instruction");
205} 216}
206 217
207void EmitINotEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string lhs, 218void EmitINotEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
208 [[maybe_unused]] std::string rhs) { 219 [[maybe_unused]] std::string lhs, [[maybe_unused]] std::string rhs) {
209 throw NotImplementedException("GLSL Instruction"); 220 throw NotImplementedException("GLSL Instruction");
210} 221}
211 222
212void EmitSGreaterThanEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string lhs, 223void EmitSGreaterThanEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
213 [[maybe_unused]] std::string rhs) { 224 [[maybe_unused]] std::string lhs, [[maybe_unused]] std::string rhs) {
214 throw NotImplementedException("GLSL Instruction"); 225 throw NotImplementedException("GLSL Instruction");
215} 226}
216 227
217void EmitUGreaterThanEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string lhs, 228void EmitUGreaterThanEqual([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] IR::Inst* inst,
218 [[maybe_unused]] std::string rhs) { 229 [[maybe_unused]] std::string lhs, [[maybe_unused]] std::string rhs) {
219 throw NotImplementedException("GLSL Instruction"); 230 throw NotImplementedException("GLSL Instruction");
220} 231}
221} // namespace Shader::Backend::GLSL 232} // namespace Shader::Backend::GLSL
diff --git a/src/shader_recompiler/backend/glsl/reg_alloc.cpp b/src/shader_recompiler/backend/glsl/reg_alloc.cpp
index 5ad1872db..f4886dbfd 100644
--- a/src/shader_recompiler/backend/glsl/reg_alloc.cpp
+++ b/src/shader_recompiler/backend/glsl/reg_alloc.cpp
@@ -51,8 +51,7 @@ std::string RegAlloc::Define(IR::Inst& inst, Type type) {
51} 51}
52 52
53std::string RegAlloc::Consume(const IR::Value& value) { 53std::string RegAlloc::Consume(const IR::Value& value) {
54 const auto result = value.IsImmediate() ? MakeImm(value) : Consume(*value.InstRecursive()); 54 return value.IsImmediate() ? MakeImm(value) : Consume(*value.InstRecursive());
55 return result;
56} 55}
57 56
58std::string RegAlloc::Consume(IR::Inst& inst) { 57std::string RegAlloc::Consume(IR::Inst& inst) {