diff options
| author | 2021-05-22 01:52:03 -0400 | |
|---|---|---|
| committer | 2021-07-22 21:51:36 -0400 | |
| commit | 5e9095ef2203e7cddcaba84fa3b01cc0d940b634 (patch) | |
| tree | 3ecb46dfb2a04ed269ccb07eb85cfa7c8e44a99d /src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp | |
| parent | glsl: Fixup build issues (diff) | |
| download | yuzu-5e9095ef2203e7cddcaba84fa3b01cc0d940b634.tar.gz yuzu-5e9095ef2203e7cddcaba84fa3b01cc0d940b634.tar.xz yuzu-5e9095ef2203e7cddcaba84fa3b01cc0d940b634.zip | |
glsl: Add many FP32/64 instructions
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp index 2a7d207a7..40b9ca08e 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp | |||
| @@ -10,9 +10,8 @@ | |||
| 10 | #include "shader_recompiler/profile.h" | 10 | #include "shader_recompiler/profile.h" |
| 11 | 11 | ||
| 12 | namespace Shader::Backend::GLSL { | 12 | namespace Shader::Backend::GLSL { |
| 13 | void EmitCompositeConstructU32x2([[maybe_unused]] EmitContext& ctx, IR::Inst& inst, | 13 | void EmitCompositeConstructU32x2(EmitContext& ctx, IR::Inst& inst, std::string_view e1, |
| 14 | [[maybe_unused]] std::string_view e1, | 14 | std::string_view e2) { |
| 15 | [[maybe_unused]] std::string_view e2) { | ||
| 16 | ctx.AddU32x2("{}=uvec2({},{});", inst, e1, e2); | 15 | ctx.AddU32x2("{}=uvec2({},{});", inst, e1, e2); |
| 17 | } | 16 | } |
| 18 | 17 | ||
| @@ -31,9 +30,8 @@ void EmitCompositeConstructU32x4([[maybe_unused]] EmitContext& ctx, | |||
| 31 | throw NotImplementedException("GLSL Instruction"); | 30 | throw NotImplementedException("GLSL Instruction"); |
| 32 | } | 31 | } |
| 33 | 32 | ||
| 34 | void EmitCompositeExtractU32x2([[maybe_unused]] EmitContext& ctx, IR::Inst& inst, | 33 | void EmitCompositeExtractU32x2(EmitContext& ctx, IR::Inst& inst, std::string_view composite, |
| 35 | [[maybe_unused]] std::string_view composite, | 34 | u32 index) { |
| 36 | [[maybe_unused]] u32 index) { | ||
| 37 | ctx.AddU32("{}={}[{}];", inst, composite, index); | 35 | ctx.AddU32("{}={}[{}];", inst, composite, index); |
| 38 | } | 36 | } |
| 39 | 37 | ||
| @@ -130,10 +128,9 @@ void EmitCompositeInsertF16x4([[maybe_unused]] EmitContext& ctx, | |||
| 130 | throw NotImplementedException("GLSL Instruction"); | 128 | throw NotImplementedException("GLSL Instruction"); |
| 131 | } | 129 | } |
| 132 | 130 | ||
| 133 | void EmitCompositeConstructF32x2([[maybe_unused]] EmitContext& ctx, | 131 | void EmitCompositeConstructF32x2(EmitContext& ctx, IR::Inst& inst, std::string_view e1, |
| 134 | [[maybe_unused]] std::string_view e1, | 132 | std::string_view e2) { |
| 135 | [[maybe_unused]] std::string_view e2) { | 133 | ctx.AddF32x2("{}=uvec2({},{});", inst, e1, e2); |
| 136 | throw NotImplementedException("GLSL Instruction"); | ||
| 137 | } | 134 | } |
| 138 | 135 | ||
| 139 | void EmitCompositeConstructF32x3([[maybe_unused]] EmitContext& ctx, | 136 | void EmitCompositeConstructF32x3([[maybe_unused]] EmitContext& ctx, |
| @@ -151,10 +148,9 @@ void EmitCompositeConstructF32x4([[maybe_unused]] EmitContext& ctx, | |||
| 151 | throw NotImplementedException("GLSL Instruction"); | 148 | throw NotImplementedException("GLSL Instruction"); |
| 152 | } | 149 | } |
| 153 | 150 | ||
| 154 | void EmitCompositeExtractF32x2([[maybe_unused]] EmitContext& ctx, | 151 | void EmitCompositeExtractF32x2(EmitContext& ctx, IR::Inst& inst, std::string_view composite, |
| 155 | [[maybe_unused]] std::string_view composite, | 152 | u32 index) { |
| 156 | [[maybe_unused]] u32 index) { | 153 | ctx.AddF32("{}={}[{}];", inst, composite, index); |
| 157 | throw NotImplementedException("GLSL Instruction"); | ||
| 158 | } | 154 | } |
| 159 | 155 | ||
| 160 | void EmitCompositeExtractF32x3([[maybe_unused]] EmitContext& ctx, | 156 | void EmitCompositeExtractF32x3([[maybe_unused]] EmitContext& ctx, |