diff options
| author | 2021-12-28 17:35:55 -0300 | |
|---|---|---|
| committer | 2021-12-28 17:35:55 -0300 | |
| commit | 840d5520d2a4fb42f2fb5fd2a7f4110a89929e4f (patch) | |
| tree | b13eae98fe8851d39f72681268da7c9a145623c8 /src | |
| parent | Increase boost requirement to 1.78.0 (diff) | |
| download | yuzu-840d5520d2a4fb42f2fb5fd2a7f4110a89929e4f.tar.gz yuzu-840d5520d2a4fb42f2fb5fd2a7f4110a89929e4f.tar.xz yuzu-840d5520d2a4fb42f2fb5fd2a7f4110a89929e4f.zip | |
Changes to avoid warnings in SSE4.2 optimized SPIR-V
Diffstat (limited to '')
| -rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv.cpp b/src/shader_recompiler/backend/spirv/emit_spirv.cpp index 6ce7ed12a..70c9e6741 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv.cpp | |||
| @@ -29,12 +29,21 @@ struct FuncTraits<ReturnType_ (*)(Args...)> { | |||
| 29 | template <size_t I> | 29 | template <size_t I> |
| 30 | using ArgType = std::tuple_element_t<I, std::tuple<Args...>>; | 30 | using ArgType = std::tuple_element_t<I, std::tuple<Args...>>; |
| 31 | }; | 31 | }; |
| 32 | |||
| 33 | #ifdef _MSC_VER | ||
| 34 | #pragma warning(push) | ||
| 35 | #pragma warning(disable : 4702) // Ignore unreachable code warning | ||
| 36 | #endif | ||
| 32 | 37 | ||
| 33 | template <auto func, typename... Args> | 38 | template <auto func, typename... Args> |
| 34 | void SetDefinition(EmitContext& ctx, IR::Inst* inst, Args... args) { | 39 | void SetDefinition(EmitContext& ctx, IR::Inst* inst, Args... args) { |
| 35 | inst->SetDefinition<Id>(func(ctx, std::forward<Args>(args)...)); | 40 | inst->SetDefinition<Id>(func(ctx, std::forward<Args>(args)...)); |
| 36 | } | 41 | } |
| 37 | 42 | ||
| 43 | #ifdef _MSC_VER | ||
| 44 | #pragma warning(pop) | ||
| 45 | #endif | ||
| 46 | |||
| 38 | template <typename ArgType> | 47 | template <typename ArgType> |
| 39 | ArgType Arg(EmitContext& ctx, const IR::Value& arg) { | 48 | ArgType Arg(EmitContext& ctx, const IR::Value& arg) { |
| 40 | if constexpr (std::is_same_v<ArgType, Id>) { | 49 | if constexpr (std::is_same_v<ArgType, Id>) { |