fix operand copy

This commit is contained in:
Frodo Baggins 2024-09-19 17:09:30 -07:00
parent b0f30ba771
commit c3619a5f42

View File

@ -4,6 +4,7 @@
* 3-Clause BSD License
*/
#include <iterator>
#include <spirv/unified1/GLSL.std.450.h>
#include <spirv/unified1/NonSemanticDebugPrintf.h>
@ -84,7 +85,7 @@ DEFINE_TRINARY(OpFMix, GLSLstd450FMix)
Id Module::OpDebugPrintf(Id fmt, std::span<const Id> fmt_args) {
std::vector<Id> operands;
operands.push_back(fmt);
std::copy(fmt_args.begin(), fmt_args.end(), operands.end());
std::copy(fmt_args.begin(), fmt_args.end(), std::back_inserter(operands));
return OpExtInst(TypeVoid(), GetNonSemanticDebugPrintf(), NonSemanticDebugPrintfDebugPrintf,
operands);
}