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 | 48 |
1 files changed, 18 insertions, 30 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp index 048b12f38..aa966a304 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp | |||
| @@ -17,19 +17,14 @@ void EmitCompositeConstructU32x2(EmitContext& ctx, IR::Inst& inst, std::string_v | |||
| 17 | ctx.AddU32x2("{}=uvec2({},{});", inst, e1, e2); | 17 | ctx.AddU32x2("{}=uvec2({},{});", inst, e1, e2); |
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | void EmitCompositeConstructU32x3([[maybe_unused]] EmitContext& ctx, | 20 | void EmitCompositeConstructU32x3(EmitContext& ctx, IR::Inst& inst, std::string_view e1, |
| 21 | [[maybe_unused]] std::string_view e1, | 21 | std::string_view e2, std::string_view e3) { |
| 22 | [[maybe_unused]] std::string_view e2, | 22 | ctx.AddU32x3("{}=uvec3({},{},{});", inst, e1, e2, e3); |
| 23 | [[maybe_unused]] std::string_view e3) { | ||
| 24 | throw NotImplementedException("GLSL Instruction"); | ||
| 25 | } | 23 | } |
| 26 | 24 | ||
| 27 | void EmitCompositeConstructU32x4([[maybe_unused]] EmitContext& ctx, | 25 | void EmitCompositeConstructU32x4(EmitContext& ctx, IR::Inst& inst, std::string_view e1, |
| 28 | [[maybe_unused]] std::string_view e1, | 26 | std::string_view e2, std::string_view e3, std::string_view e4) { |
| 29 | [[maybe_unused]] std::string_view e2, | 27 | ctx.AddU32x4("{}=uvec4({},{},{},{});", inst, e1, e2, e3, e4); |
| 30 | [[maybe_unused]] std::string_view e3, | ||
| 31 | [[maybe_unused]] std::string_view e4) { | ||
| 32 | throw NotImplementedException("GLSL Instruction"); | ||
| 33 | } | 28 | } |
| 34 | 29 | ||
| 35 | void EmitCompositeExtractU32x2(EmitContext& ctx, IR::Inst& inst, std::string_view composite, | 30 | void EmitCompositeExtractU32x2(EmitContext& ctx, IR::Inst& inst, std::string_view composite, |
| @@ -37,16 +32,14 @@ void EmitCompositeExtractU32x2(EmitContext& ctx, IR::Inst& inst, std::string_vie | |||
| 37 | ctx.AddU32("{}={}.{};", inst, composite, SWIZZLE[index]); | 32 | ctx.AddU32("{}={}.{};", inst, composite, SWIZZLE[index]); |
| 38 | } | 33 | } |
| 39 | 34 | ||
| 40 | void EmitCompositeExtractU32x3([[maybe_unused]] EmitContext& ctx, | 35 | void EmitCompositeExtractU32x3(EmitContext& ctx, IR::Inst& inst, std::string_view composite, |
| 41 | [[maybe_unused]] std::string_view composite, | 36 | u32 index) { |
| 42 | [[maybe_unused]] u32 index) { | 37 | ctx.AddU32("{}={}.{};", inst, composite, SWIZZLE[index]); |
| 43 | throw NotImplementedException("GLSL Instruction"); | ||
| 44 | } | 38 | } |
| 45 | 39 | ||
| 46 | void EmitCompositeExtractU32x4([[maybe_unused]] EmitContext& ctx, | 40 | void EmitCompositeExtractU32x4(EmitContext& ctx, IR::Inst& inst, std::string_view composite, |
| 47 | [[maybe_unused]] std::string_view composite, | 41 | u32 index) { |
| 48 | [[maybe_unused]] u32 index) { | 42 | ctx.AddU32("{}={}.{};", inst, composite, SWIZZLE[index]); |
| 49 | throw NotImplementedException("GLSL Instruction"); | ||
| 50 | } | 43 | } |
| 51 | 44 | ||
| 52 | void EmitCompositeInsertU32x2([[maybe_unused]] EmitContext& ctx, | 45 | void EmitCompositeInsertU32x2([[maybe_unused]] EmitContext& ctx, |
| @@ -135,19 +128,14 @@ void EmitCompositeConstructF32x2(EmitContext& ctx, IR::Inst& inst, std::string_v | |||
| 135 | ctx.AddF32x2("{}=vec2({},{});", inst, e1, e2); | 128 | ctx.AddF32x2("{}=vec2({},{});", inst, e1, e2); |
| 136 | } | 129 | } |
| 137 | 130 | ||
| 138 | void EmitCompositeConstructF32x3([[maybe_unused]] EmitContext& ctx, | 131 | void EmitCompositeConstructF32x3(EmitContext& ctx, IR::Inst& inst, std::string_view e1, |
| 139 | [[maybe_unused]] std::string_view e1, | 132 | std::string_view e2, std::string_view e3) { |
| 140 | [[maybe_unused]] std::string_view e2, | 133 | ctx.AddF32x3("{}=vec3({},{},{});", inst, e1, e2, e3); |
| 141 | [[maybe_unused]] std::string_view e3) { | ||
| 142 | throw NotImplementedException("GLSL Instruction"); | ||
| 143 | } | 134 | } |
| 144 | 135 | ||
| 145 | void EmitCompositeConstructF32x4([[maybe_unused]] EmitContext& ctx, | 136 | void EmitCompositeConstructF32x4(EmitContext& ctx, IR::Inst& inst, std::string_view e1, |
| 146 | [[maybe_unused]] std::string_view e1, | 137 | std::string_view e2, std::string_view e3, std::string_view e4) { |
| 147 | [[maybe_unused]] std::string_view e2, | 138 | ctx.AddF32x4("{}=vec4({},{},{},{});", inst, e1, e2, e3, e4); |
| 148 | [[maybe_unused]] std::string_view e3, | ||
| 149 | [[maybe_unused]] std::string_view e4) { | ||
| 150 | throw NotImplementedException("GLSL Instruction"); | ||
| 151 | } | 139 | } |
| 152 | 140 | ||
| 153 | void EmitCompositeExtractF32x2(EmitContext& ctx, IR::Inst& inst, std::string_view composite, | 141 | void EmitCompositeExtractF32x2(EmitContext& ctx, IR::Inst& inst, std::string_view composite, |