summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp132
1 files changed, 132 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp
new file mode 100644
index 000000000..3ef4f3d78
--- /dev/null
+++ b/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp
@@ -0,0 +1,132 @@
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/spirv/emit_spirv.h"
6
7namespace Shader::Backend::SPIRV {
8
9Id EmitSPIRV::EmitIAdd32(EmitContext& ctx, IR::Inst* inst, Id a, Id b) {
10 if (inst->HasAssociatedPseudoOperation()) {
11 throw NotImplementedException("Pseudo-operations on IAdd32");
12 }
13 return ctx.OpIAdd(ctx.u32[1], a, b);
14}
15
16void EmitSPIRV::EmitIAdd64(EmitContext&) {
17 throw NotImplementedException("SPIR-V Instruction");
18}
19
20Id EmitSPIRV::EmitISub32(EmitContext& ctx, Id a, Id b) {
21 return ctx.OpISub(ctx.u32[1], a, b);
22}
23
24void EmitSPIRV::EmitISub64(EmitContext&) {
25 throw NotImplementedException("SPIR-V Instruction");
26}
27
28Id EmitSPIRV::EmitIMul32(EmitContext& ctx, Id a, Id b) {
29 return ctx.OpIMul(ctx.u32[1], a, b);
30}
31
32void EmitSPIRV::EmitINeg32(EmitContext&) {
33 throw NotImplementedException("SPIR-V Instruction");
34}
35
36void EmitSPIRV::EmitIAbs32(EmitContext&) {
37 throw NotImplementedException("SPIR-V Instruction");
38}
39
40Id EmitSPIRV::EmitShiftLeftLogical32(EmitContext& ctx, Id base, Id shift) {
41 return ctx.OpShiftLeftLogical(ctx.u32[1], base, shift);
42}
43
44void EmitSPIRV::EmitShiftRightLogical32(EmitContext&) {
45 throw NotImplementedException("SPIR-V Instruction");
46}
47
48void EmitSPIRV::EmitShiftRightArithmetic32(EmitContext&) {
49 throw NotImplementedException("SPIR-V Instruction");
50}
51
52void EmitSPIRV::EmitBitwiseAnd32(EmitContext&) {
53 throw NotImplementedException("SPIR-V Instruction");
54}
55
56void EmitSPIRV::EmitBitwiseOr32(EmitContext&) {
57 throw NotImplementedException("SPIR-V Instruction");
58}
59
60void EmitSPIRV::EmitBitwiseXor32(EmitContext&) {
61 throw NotImplementedException("SPIR-V Instruction");
62}
63
64void EmitSPIRV::EmitBitFieldInsert(EmitContext&) {
65 throw NotImplementedException("SPIR-V Instruction");
66}
67
68void EmitSPIRV::EmitBitFieldSExtract(EmitContext&) {
69 throw NotImplementedException("SPIR-V Instruction");
70}
71
72Id EmitSPIRV::EmitBitFieldUExtract(EmitContext& ctx, Id base, Id offset, Id count) {
73 return ctx.OpBitFieldUExtract(ctx.u32[1], base, offset, count);
74}
75
76void EmitSPIRV::EmitSLessThan(EmitContext&) {
77 throw NotImplementedException("SPIR-V Instruction");
78}
79
80void EmitSPIRV::EmitULessThan(EmitContext&) {
81 throw NotImplementedException("SPIR-V Instruction");
82}
83
84void EmitSPIRV::EmitIEqual(EmitContext&) {
85 throw NotImplementedException("SPIR-V Instruction");
86}
87
88void EmitSPIRV::EmitSLessThanEqual(EmitContext&) {
89 throw NotImplementedException("SPIR-V Instruction");
90}
91
92void EmitSPIRV::EmitULessThanEqual(EmitContext&) {
93 throw NotImplementedException("SPIR-V Instruction");
94}
95
96void EmitSPIRV::EmitSGreaterThan(EmitContext&) {
97 throw NotImplementedException("SPIR-V Instruction");
98}
99
100void EmitSPIRV::EmitUGreaterThan(EmitContext&) {
101 throw NotImplementedException("SPIR-V Instruction");
102}
103
104void EmitSPIRV::EmitINotEqual(EmitContext&) {
105 throw NotImplementedException("SPIR-V Instruction");
106}
107
108void EmitSPIRV::EmitSGreaterThanEqual(EmitContext&) {
109 throw NotImplementedException("SPIR-V Instruction");
110}
111
112Id EmitSPIRV::EmitUGreaterThanEqual(EmitContext& ctx, Id lhs, Id rhs) {
113 return ctx.OpUGreaterThanEqual(ctx.u1, lhs, rhs);
114}
115
116void EmitSPIRV::EmitLogicalOr(EmitContext&) {
117 throw NotImplementedException("SPIR-V Instruction");
118}
119
120void EmitSPIRV::EmitLogicalAnd(EmitContext&) {
121 throw NotImplementedException("SPIR-V Instruction");
122}
123
124void EmitSPIRV::EmitLogicalXor(EmitContext&) {
125 throw NotImplementedException("SPIR-V Instruction");
126}
127
128void EmitSPIRV::EmitLogicalNot(EmitContext&) {
129 throw NotImplementedException("SPIR-V Instruction");
130}
131
132} // namespace Shader::Backend::SPIRV