diff options
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp | 237 |
1 files changed, 237 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp index e69de29bb..2a7d207a7 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp | |||
| @@ -0,0 +1,237 @@ | |||
| 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 <string_view> | ||
| 6 | |||
| 7 | #include "shader_recompiler/backend/glsl/emit_context.h" | ||
| 8 | #include "shader_recompiler/backend/glsl/emit_glsl_instructions.h" | ||
| 9 | #include "shader_recompiler/frontend/ir/value.h" | ||
| 10 | #include "shader_recompiler/profile.h" | ||
| 11 | |||
| 12 | namespace Shader::Backend::GLSL { | ||
| 13 | void EmitCompositeConstructU32x2([[maybe_unused]] EmitContext& ctx, IR::Inst& inst, | ||
| 14 | [[maybe_unused]] std::string_view e1, | ||
| 15 | [[maybe_unused]] std::string_view e2) { | ||
| 16 | ctx.AddU32x2("{}=uvec2({},{});", inst, e1, e2); | ||
| 17 | } | ||
| 18 | |||
| 19 | void EmitCompositeConstructU32x3([[maybe_unused]] EmitContext& ctx, | ||
| 20 | [[maybe_unused]] std::string_view e1, | ||
| 21 | [[maybe_unused]] std::string_view e2, | ||
| 22 | [[maybe_unused]] std::string_view e3) { | ||
| 23 | throw NotImplementedException("GLSL Instruction"); | ||
| 24 | } | ||
| 25 | |||
| 26 | void EmitCompositeConstructU32x4([[maybe_unused]] EmitContext& ctx, | ||
| 27 | [[maybe_unused]] std::string_view e1, | ||
| 28 | [[maybe_unused]] std::string_view e2, | ||
| 29 | [[maybe_unused]] std::string_view e3, | ||
| 30 | [[maybe_unused]] std::string_view e4) { | ||
| 31 | throw NotImplementedException("GLSL Instruction"); | ||
| 32 | } | ||
| 33 | |||
| 34 | void EmitCompositeExtractU32x2([[maybe_unused]] EmitContext& ctx, IR::Inst& inst, | ||
| 35 | [[maybe_unused]] std::string_view composite, | ||
| 36 | [[maybe_unused]] u32 index) { | ||
| 37 | ctx.AddU32("{}={}[{}];", inst, composite, index); | ||
| 38 | } | ||
| 39 | |||
| 40 | void EmitCompositeExtractU32x3([[maybe_unused]] EmitContext& ctx, | ||
| 41 | [[maybe_unused]] std::string_view composite, | ||
| 42 | [[maybe_unused]] u32 index) { | ||
| 43 | throw NotImplementedException("GLSL Instruction"); | ||
| 44 | } | ||
| 45 | |||
| 46 | void EmitCompositeExtractU32x4([[maybe_unused]] EmitContext& ctx, | ||
| 47 | [[maybe_unused]] std::string_view composite, | ||
| 48 | [[maybe_unused]] u32 index) { | ||
| 49 | throw NotImplementedException("GLSL Instruction"); | ||
| 50 | } | ||
| 51 | |||
| 52 | void EmitCompositeInsertU32x2([[maybe_unused]] EmitContext& ctx, | ||
| 53 | [[maybe_unused]] std::string_view composite, | ||
| 54 | [[maybe_unused]] std::string_view object, | ||
| 55 | [[maybe_unused]] u32 index) { | ||
| 56 | throw NotImplementedException("GLSL Instruction"); | ||
| 57 | } | ||
| 58 | |||
| 59 | void EmitCompositeInsertU32x3([[maybe_unused]] EmitContext& ctx, | ||
| 60 | [[maybe_unused]] std::string_view composite, | ||
| 61 | [[maybe_unused]] std::string_view object, | ||
| 62 | [[maybe_unused]] u32 index) { | ||
| 63 | throw NotImplementedException("GLSL Instruction"); | ||
| 64 | } | ||
| 65 | |||
| 66 | void EmitCompositeInsertU32x4([[maybe_unused]] EmitContext& ctx, | ||
| 67 | [[maybe_unused]] std::string_view composite, | ||
| 68 | [[maybe_unused]] std::string_view object, | ||
| 69 | [[maybe_unused]] u32 index) { | ||
| 70 | throw NotImplementedException("GLSL Instruction"); | ||
| 71 | } | ||
| 72 | |||
| 73 | void EmitCompositeConstructF16x2([[maybe_unused]] EmitContext& ctx, | ||
| 74 | [[maybe_unused]] std::string_view e1, | ||
| 75 | [[maybe_unused]] std::string_view e2) { | ||
| 76 | throw NotImplementedException("GLSL Instruction"); | ||
| 77 | } | ||
| 78 | |||
| 79 | void EmitCompositeConstructF16x3([[maybe_unused]] EmitContext& ctx, | ||
| 80 | [[maybe_unused]] std::string_view e1, | ||
| 81 | [[maybe_unused]] std::string_view e2, | ||
| 82 | [[maybe_unused]] std::string_view e3) { | ||
| 83 | throw NotImplementedException("GLSL Instruction"); | ||
| 84 | } | ||
| 85 | |||
| 86 | void EmitCompositeConstructF16x4([[maybe_unused]] EmitContext& ctx, | ||
| 87 | [[maybe_unused]] std::string_view e1, | ||
| 88 | [[maybe_unused]] std::string_view e2, | ||
| 89 | [[maybe_unused]] std::string_view e3, | ||
| 90 | [[maybe_unused]] std::string_view e4) { | ||
| 91 | throw NotImplementedException("GLSL Instruction"); | ||
| 92 | } | ||
| 93 | |||
| 94 | void EmitCompositeExtractF16x2([[maybe_unused]] EmitContext& ctx, | ||
| 95 | [[maybe_unused]] std::string_view composite, | ||
| 96 | [[maybe_unused]] u32 index) { | ||
| 97 | throw NotImplementedException("GLSL Instruction"); | ||
| 98 | } | ||
| 99 | |||
| 100 | void EmitCompositeExtractF16x3([[maybe_unused]] EmitContext& ctx, | ||
| 101 | [[maybe_unused]] std::string_view composite, | ||
| 102 | [[maybe_unused]] u32 index) { | ||
| 103 | throw NotImplementedException("GLSL Instruction"); | ||
| 104 | } | ||
| 105 | |||
| 106 | void EmitCompositeExtractF16x4([[maybe_unused]] EmitContext& ctx, | ||
| 107 | [[maybe_unused]] std::string_view composite, | ||
| 108 | [[maybe_unused]] u32 index) { | ||
| 109 | throw NotImplementedException("GLSL Instruction"); | ||
| 110 | } | ||
| 111 | |||
| 112 | void EmitCompositeInsertF16x2([[maybe_unused]] EmitContext& ctx, | ||
| 113 | [[maybe_unused]] std::string_view composite, | ||
| 114 | [[maybe_unused]] std::string_view object, | ||
| 115 | [[maybe_unused]] u32 index) { | ||
| 116 | throw NotImplementedException("GLSL Instruction"); | ||
| 117 | } | ||
| 118 | |||
| 119 | void EmitCompositeInsertF16x3([[maybe_unused]] EmitContext& ctx, | ||
| 120 | [[maybe_unused]] std::string_view composite, | ||
| 121 | [[maybe_unused]] std::string_view object, | ||
| 122 | [[maybe_unused]] u32 index) { | ||
| 123 | throw NotImplementedException("GLSL Instruction"); | ||
| 124 | } | ||
| 125 | |||
| 126 | void EmitCompositeInsertF16x4([[maybe_unused]] EmitContext& ctx, | ||
| 127 | [[maybe_unused]] std::string_view composite, | ||
| 128 | [[maybe_unused]] std::string_view object, | ||
| 129 | [[maybe_unused]] u32 index) { | ||
| 130 | throw NotImplementedException("GLSL Instruction"); | ||
| 131 | } | ||
| 132 | |||
| 133 | void EmitCompositeConstructF32x2([[maybe_unused]] EmitContext& ctx, | ||
| 134 | [[maybe_unused]] std::string_view e1, | ||
| 135 | [[maybe_unused]] std::string_view e2) { | ||
| 136 | throw NotImplementedException("GLSL Instruction"); | ||
| 137 | } | ||
| 138 | |||
| 139 | void EmitCompositeConstructF32x3([[maybe_unused]] EmitContext& ctx, | ||
| 140 | [[maybe_unused]] std::string_view e1, | ||
| 141 | [[maybe_unused]] std::string_view e2, | ||
| 142 | [[maybe_unused]] std::string_view e3) { | ||
| 143 | throw NotImplementedException("GLSL Instruction"); | ||
| 144 | } | ||
| 145 | |||
| 146 | void EmitCompositeConstructF32x4([[maybe_unused]] EmitContext& ctx, | ||
| 147 | [[maybe_unused]] std::string_view e1, | ||
| 148 | [[maybe_unused]] std::string_view e2, | ||
| 149 | [[maybe_unused]] std::string_view e3, | ||
| 150 | [[maybe_unused]] std::string_view e4) { | ||
| 151 | throw NotImplementedException("GLSL Instruction"); | ||
| 152 | } | ||
| 153 | |||
| 154 | void EmitCompositeExtractF32x2([[maybe_unused]] EmitContext& ctx, | ||
| 155 | [[maybe_unused]] std::string_view composite, | ||
| 156 | [[maybe_unused]] u32 index) { | ||
| 157 | throw NotImplementedException("GLSL Instruction"); | ||
| 158 | } | ||
| 159 | |||
| 160 | void EmitCompositeExtractF32x3([[maybe_unused]] EmitContext& ctx, | ||
| 161 | [[maybe_unused]] std::string_view composite, | ||
| 162 | [[maybe_unused]] u32 index) { | ||
| 163 | throw NotImplementedException("GLSL Instruction"); | ||
| 164 | } | ||
| 165 | |||
| 166 | void EmitCompositeExtractF32x4([[maybe_unused]] EmitContext& ctx, | ||
| 167 | [[maybe_unused]] std::string_view composite, | ||
| 168 | [[maybe_unused]] u32 index) { | ||
| 169 | throw NotImplementedException("GLSL Instruction"); | ||
| 170 | } | ||
| 171 | |||
| 172 | void EmitCompositeInsertF32x2([[maybe_unused]] EmitContext& ctx, | ||
| 173 | [[maybe_unused]] std::string_view composite, | ||
| 174 | [[maybe_unused]] std::string_view object, | ||
| 175 | [[maybe_unused]] u32 index) { | ||
| 176 | throw NotImplementedException("GLSL Instruction"); | ||
| 177 | } | ||
| 178 | |||
| 179 | void EmitCompositeInsertF32x3([[maybe_unused]] EmitContext& ctx, | ||
| 180 | [[maybe_unused]] std::string_view composite, | ||
| 181 | [[maybe_unused]] std::string_view object, | ||
| 182 | [[maybe_unused]] u32 index) { | ||
| 183 | throw NotImplementedException("GLSL Instruction"); | ||
| 184 | } | ||
| 185 | |||
| 186 | void EmitCompositeInsertF32x4([[maybe_unused]] EmitContext& ctx, | ||
| 187 | [[maybe_unused]] std::string_view composite, | ||
| 188 | [[maybe_unused]] std::string_view object, | ||
| 189 | [[maybe_unused]] u32 index) { | ||
| 190 | throw NotImplementedException("GLSL Instruction"); | ||
| 191 | } | ||
| 192 | |||
| 193 | void EmitCompositeConstructF64x2([[maybe_unused]] EmitContext& ctx) { | ||
| 194 | throw NotImplementedException("GLSL Instruction"); | ||
| 195 | } | ||
| 196 | |||
| 197 | void EmitCompositeConstructF64x3([[maybe_unused]] EmitContext& ctx) { | ||
| 198 | throw NotImplementedException("GLSL Instruction"); | ||
| 199 | } | ||
| 200 | |||
| 201 | void EmitCompositeConstructF64x4([[maybe_unused]] EmitContext& ctx) { | ||
| 202 | throw NotImplementedException("GLSL Instruction"); | ||
| 203 | } | ||
| 204 | |||
| 205 | void EmitCompositeExtractF64x2([[maybe_unused]] EmitContext& ctx) { | ||
| 206 | throw NotImplementedException("GLSL Instruction"); | ||
| 207 | } | ||
| 208 | |||
| 209 | void EmitCompositeExtractF64x3([[maybe_unused]] EmitContext& ctx) { | ||
| 210 | throw NotImplementedException("GLSL Instruction"); | ||
| 211 | } | ||
| 212 | |||
| 213 | void EmitCompositeExtractF64x4([[maybe_unused]] EmitContext& ctx) { | ||
| 214 | throw NotImplementedException("GLSL Instruction"); | ||
| 215 | } | ||
| 216 | |||
| 217 | void EmitCompositeInsertF64x2([[maybe_unused]] EmitContext& ctx, | ||
| 218 | [[maybe_unused]] std::string_view composite, | ||
| 219 | [[maybe_unused]] std::string_view object, | ||
| 220 | [[maybe_unused]] u32 index) { | ||
| 221 | throw NotImplementedException("GLSL Instruction"); | ||
| 222 | } | ||
| 223 | |||
| 224 | void EmitCompositeInsertF64x3([[maybe_unused]] EmitContext& ctx, | ||
| 225 | [[maybe_unused]] std::string_view composite, | ||
| 226 | [[maybe_unused]] std::string_view object, | ||
| 227 | [[maybe_unused]] u32 index) { | ||
| 228 | throw NotImplementedException("GLSL Instruction"); | ||
| 229 | } | ||
| 230 | |||
| 231 | void EmitCompositeInsertF64x4([[maybe_unused]] EmitContext& ctx, | ||
| 232 | [[maybe_unused]] std::string_view composite, | ||
| 233 | [[maybe_unused]] std::string_view object, | ||
| 234 | [[maybe_unused]] u32 index) { | ||
| 235 | throw NotImplementedException("GLSL Instruction"); | ||
| 236 | } | ||
| 237 | } // namespace Shader::Backend::GLSL | ||