From 840d5520d2a4fb42f2fb5fd2a7f4110a89929e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Locatti?= <42481638+goldenx86@users.noreply.github.com> Date: Tue, 28 Dec 2021 17:35:55 -0300 Subject: [PATCH] Changes to avoid warnings in SSE4.2 optimized SPIR-V --- src/shader_recompiler/backend/spirv/emit_spirv.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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 { template using ArgType = std::tuple_element_t>; }; + +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4702) // Ignore unreachable code warning +#endif template void SetDefinition(EmitContext& ctx, IR::Inst* inst, Args... args) { inst->SetDefinition(func(ctx, std::forward(args)...)); } +#ifdef _MSC_VER +#pragma warning(pop) +#endif + template ArgType Arg(EmitContext& ctx, const IR::Value& arg) { if constexpr (std::is_same_v) {