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 | 72 |
1 files changed, 27 insertions, 45 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp index aa966a304..22e489aa9 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp | |||
| @@ -42,25 +42,19 @@ void EmitCompositeExtractU32x4(EmitContext& ctx, IR::Inst& inst, std::string_vie | |||
| 42 | ctx.AddU32("{}={}.{};", inst, composite, SWIZZLE[index]); | 42 | ctx.AddU32("{}={}.{};", inst, composite, SWIZZLE[index]); |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | void EmitCompositeInsertU32x2([[maybe_unused]] EmitContext& ctx, | 45 | void EmitCompositeInsertU32x2(EmitContext& ctx, std::string_view composite, std::string_view object, |
| 46 | [[maybe_unused]] std::string_view composite, | 46 | u32 index) { |
| 47 | [[maybe_unused]] std::string_view object, | 47 | ctx.Add("{}.{}={};", composite, SWIZZLE[index], object); |
| 48 | [[maybe_unused]] u32 index) { | ||
| 49 | throw NotImplementedException("GLSL Instruction"); | ||
| 50 | } | 48 | } |
| 51 | 49 | ||
| 52 | void EmitCompositeInsertU32x3([[maybe_unused]] EmitContext& ctx, | 50 | void EmitCompositeInsertU32x3(EmitContext& ctx, std::string_view composite, std::string_view object, |
| 53 | [[maybe_unused]] std::string_view composite, | 51 | u32 index) { |
| 54 | [[maybe_unused]] std::string_view object, | 52 | ctx.Add("{}.{}={};", composite, SWIZZLE[index], object); |
| 55 | [[maybe_unused]] u32 index) { | ||
| 56 | throw NotImplementedException("GLSL Instruction"); | ||
| 57 | } | 53 | } |
| 58 | 54 | ||
| 59 | void EmitCompositeInsertU32x4([[maybe_unused]] EmitContext& ctx, | 55 | void EmitCompositeInsertU32x4(EmitContext& ctx, std::string_view composite, std::string_view object, |
| 60 | [[maybe_unused]] std::string_view composite, | 56 | u32 index) { |
| 61 | [[maybe_unused]] std::string_view object, | 57 | ctx.Add("{}.{}={};", composite, SWIZZLE[index], object); |
| 62 | [[maybe_unused]] u32 index) { | ||
| 63 | throw NotImplementedException("GLSL Instruction"); | ||
| 64 | } | 58 | } |
| 65 | 59 | ||
| 66 | void EmitCompositeConstructF16x2([[maybe_unused]] EmitContext& ctx, | 60 | void EmitCompositeConstructF16x2([[maybe_unused]] EmitContext& ctx, |
| @@ -153,25 +147,19 @@ void EmitCompositeExtractF32x4(EmitContext& ctx, IR::Inst& inst, std::string_vie | |||
| 153 | ctx.AddF32("{}={}.{};", inst, composite, SWIZZLE[index]); | 147 | ctx.AddF32("{}={}.{};", inst, composite, SWIZZLE[index]); |
| 154 | } | 148 | } |
| 155 | 149 | ||
| 156 | void EmitCompositeInsertF32x2([[maybe_unused]] EmitContext& ctx, | 150 | void EmitCompositeInsertF32x2(EmitContext& ctx, std::string_view composite, std::string_view object, |
| 157 | [[maybe_unused]] std::string_view composite, | 151 | u32 index) { |
| 158 | [[maybe_unused]] std::string_view object, | 152 | ctx.Add("{}.{}={};", composite, SWIZZLE[index], object); |
| 159 | [[maybe_unused]] u32 index) { | ||
| 160 | throw NotImplementedException("GLSL Instruction"); | ||
| 161 | } | 153 | } |
| 162 | 154 | ||
| 163 | void EmitCompositeInsertF32x3([[maybe_unused]] EmitContext& ctx, | 155 | void EmitCompositeInsertF32x3(EmitContext& ctx, std::string_view composite, std::string_view object, |
| 164 | [[maybe_unused]] std::string_view composite, | 156 | u32 index) { |
| 165 | [[maybe_unused]] std::string_view object, | 157 | ctx.Add("{}.{}={};", composite, SWIZZLE[index], object); |
| 166 | [[maybe_unused]] u32 index) { | ||
| 167 | throw NotImplementedException("GLSL Instruction"); | ||
| 168 | } | 158 | } |
| 169 | 159 | ||
| 170 | void EmitCompositeInsertF32x4([[maybe_unused]] EmitContext& ctx, | 160 | void EmitCompositeInsertF32x4(EmitContext& ctx, std::string_view composite, std::string_view object, |
| 171 | [[maybe_unused]] std::string_view composite, | 161 | u32 index) { |
| 172 | [[maybe_unused]] std::string_view object, | 162 | ctx.Add("{}.{}={};", composite, SWIZZLE[index], object); |
| 173 | [[maybe_unused]] u32 index) { | ||
| 174 | throw NotImplementedException("GLSL Instruction"); | ||
| 175 | } | 163 | } |
| 176 | 164 | ||
| 177 | void EmitCompositeConstructF64x2([[maybe_unused]] EmitContext& ctx) { | 165 | void EmitCompositeConstructF64x2([[maybe_unused]] EmitContext& ctx) { |
| @@ -198,24 +186,18 @@ void EmitCompositeExtractF64x4([[maybe_unused]] EmitContext& ctx) { | |||
| 198 | throw NotImplementedException("GLSL Instruction"); | 186 | throw NotImplementedException("GLSL Instruction"); |
| 199 | } | 187 | } |
| 200 | 188 | ||
| 201 | void EmitCompositeInsertF64x2([[maybe_unused]] EmitContext& ctx, | 189 | void EmitCompositeInsertF64x2(EmitContext& ctx, std::string_view composite, std::string_view object, |
| 202 | [[maybe_unused]] std::string_view composite, | 190 | u32 index) { |
| 203 | [[maybe_unused]] std::string_view object, | 191 | ctx.Add("{}.{}={};", composite, SWIZZLE[index], object); |
| 204 | [[maybe_unused]] u32 index) { | ||
| 205 | throw NotImplementedException("GLSL Instruction"); | ||
| 206 | } | 192 | } |
| 207 | 193 | ||
| 208 | void EmitCompositeInsertF64x3([[maybe_unused]] EmitContext& ctx, | 194 | void EmitCompositeInsertF64x3(EmitContext& ctx, std::string_view composite, std::string_view object, |
| 209 | [[maybe_unused]] std::string_view composite, | 195 | u32 index) { |
| 210 | [[maybe_unused]] std::string_view object, | 196 | ctx.Add("{}.{}={};", composite, SWIZZLE[index], object); |
| 211 | [[maybe_unused]] u32 index) { | ||
| 212 | throw NotImplementedException("GLSL Instruction"); | ||
| 213 | } | 197 | } |
| 214 | 198 | ||
| 215 | void EmitCompositeInsertF64x4([[maybe_unused]] EmitContext& ctx, | 199 | void EmitCompositeInsertF64x4(EmitContext& ctx, std::string_view composite, std::string_view object, |
| 216 | [[maybe_unused]] std::string_view composite, | 200 | u32 index) { |
| 217 | [[maybe_unused]] std::string_view object, | 201 | ctx.Add("{}.{}={};", composite, SWIZZLE[index], object); |
| 218 | [[maybe_unused]] u32 index) { | ||
| 219 | throw NotImplementedException("GLSL Instruction"); | ||
| 220 | } | 202 | } |
| 221 | } // namespace Shader::Backend::GLSL | 203 | } // namespace Shader::Backend::GLSL |