diff --git a/renderdoc/driver/shaders/spirv/spirv_editor.h b/renderdoc/driver/shaders/spirv/spirv_editor.h index ce901fcbd..0db1b9b19 100644 --- a/renderdoc/driver/shaders/spirv/spirv_editor.h +++ b/renderdoc/driver/shaders/spirv/spirv_editor.h @@ -95,17 +95,17 @@ class SPIRVOperation public: // constructor of a synthetic operation, from an operation & subsequent words, calculates the // length then constructs the first word with opcode + length. - SPIRVOperation(spv::Op op, std::initializer_list data) + SPIRVOperation(spv::Op op, const std::vector &data) { words.push_back(MakeHeader(op, data.size() + 1)); words.insert(words.begin() + 1, data.begin(), data.end()); iter = SPIRVIterator(words, 0); } - SPIRVOperation(spv::Op op, std::vector data) + + SPIRVOperation(const SPIRVOperation &op) { - words.push_back(MakeHeader(op, data.size() + 1)); - words.insert(words.begin() + 1, data.begin(), data.end()); + words = op.words; iter = SPIRVIterator(words, 0); }