diff --git a/src/shader_recompiler/backend/glsl/emit_glsl.cpp b/src/shader_recompiler/backend/glsl/emit_glsl.cpp index 66ecfc9f74..8735a5e90c 100644 --- a/src/shader_recompiler/backend/glsl/emit_glsl.cpp +++ b/src/shader_recompiler/backend/glsl/emit_glsl.cpp @@ -28,11 +28,6 @@ struct FuncTraits { using ArgType = std::tuple_element_t>; }; -template -void SetDefinition(EmitContext& ctx, IR::Inst* inst, Args... args) { - inst->SetDefinition(func(ctx, std::forward(args)...)); -} - template auto Arg(EmitContext& ctx, const IR::Value& arg) { if constexpr (std::is_same_v) { @@ -53,21 +48,10 @@ auto Arg(EmitContext& ctx, const IR::Value& arg) { template void Invoke(EmitContext& ctx, IR::Inst* inst, std::index_sequence) { using Traits = FuncTraits; - if constexpr (std::is_same_v) { - if constexpr (is_first_arg_inst) { - SetDefinition( - ctx, inst, *inst, - Arg>(ctx, inst->Arg(I))...); - } else { - SetDefinition( - ctx, inst, Arg>(ctx, inst->Arg(I))...); - } + if constexpr (is_first_arg_inst) { + func(ctx, *inst, Arg>(ctx, inst->Arg(I))...); } else { - if constexpr (is_first_arg_inst) { - func(ctx, *inst, Arg>(ctx, inst->Arg(I))...); - } else { - func(ctx, Arg>(ctx, inst->Arg(I))...); - } + func(ctx, Arg>(ctx, inst->Arg(I))...); } }