diff options
| author | 2021-02-08 02:54:35 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:22 -0400 | |
| commit | 2930dccecc933d6748772e9f51a5724fe1e6771b (patch) | |
| tree | ec4aa48062f8a2fcba31b1c64f769ddf25a87832 /src/shader_recompiler/frontend/maxwell/translate/translate.cpp | |
| parent | shader: Better constant folding (diff) | |
| download | yuzu-2930dccecc933d6748772e9f51a5724fe1e6771b.tar.gz yuzu-2930dccecc933d6748772e9f51a5724fe1e6771b.tar.xz yuzu-2930dccecc933d6748772e9f51a5724fe1e6771b.zip | |
spirv: Initial SPIR-V support
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/translate/translate.cpp')
| -rw-r--r-- | src/shader_recompiler/frontend/maxwell/translate/translate.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/translate/translate.cpp b/src/shader_recompiler/frontend/maxwell/translate/translate.cpp index dcc3f6c0e..7e6bb07a2 100644 --- a/src/shader_recompiler/frontend/maxwell/translate/translate.cpp +++ b/src/shader_recompiler/frontend/maxwell/translate/translate.cpp | |||
| @@ -11,15 +11,15 @@ | |||
| 11 | 11 | ||
| 12 | namespace Shader::Maxwell { | 12 | namespace Shader::Maxwell { |
| 13 | 13 | ||
| 14 | template <auto visitor_method> | 14 | template <auto method> |
| 15 | static void Invoke(TranslatorVisitor& visitor, Location pc, u64 insn) { | 15 | static void Invoke(TranslatorVisitor& visitor, Location pc, u64 insn) { |
| 16 | using MethodType = decltype(visitor_method); | 16 | using MethodType = decltype(method); |
| 17 | if constexpr (std::is_invocable_r_v<void, MethodType, TranslatorVisitor&, Location, u64>) { | 17 | if constexpr (std::is_invocable_r_v<void, MethodType, TranslatorVisitor&, Location, u64>) { |
| 18 | (visitor.*visitor_method)(pc, insn); | 18 | (visitor.*method)(pc, insn); |
| 19 | } else if constexpr (std::is_invocable_r_v<void, MethodType, TranslatorVisitor&, u64>) { | 19 | } else if constexpr (std::is_invocable_r_v<void, MethodType, TranslatorVisitor&, u64>) { |
| 20 | (visitor.*visitor_method)(insn); | 20 | (visitor.*method)(insn); |
| 21 | } else { | 21 | } else { |
| 22 | (visitor.*visitor_method)(); | 22 | (visitor.*method)(); |
| 23 | } | 23 | } |
| 24 | } | 24 | } |
| 25 | 25 | ||