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: Changes to avoid warnings in SSE4.2 optimized SPIR-V --- src/shader_recompiler/backend/spirv/emit_spirv.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') 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) { -- cgit v1.2.3 From c7235e67eff9ecf66e3318a4df37b1002295fdff 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 18:50:51 -0300 Subject: Empty spaces --- src/shader_recompiler/backend/spirv/emit_spirv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/shader_recompiler/backend/spirv/emit_spirv.cpp b/src/shader_recompiler/backend/spirv/emit_spirv.cpp index 70c9e6741..50918317f 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv.cpp @@ -29,7 +29,7 @@ struct FuncTraits { template using ArgType = std::tuple_element_t>; }; - + #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable : 4702) // Ignore unreachable code warning -- cgit v1.2.3