From 58231d2756592ba4be091cb9087237cb6e0ab8af Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Tue, 15 Aug 2017 16:22:30 -0700 Subject: [PATCH] allow multiple execution modes per entry point --- src/spirv_to_llvm/spirv_to_llvm.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/spirv_to_llvm/spirv_to_llvm.cpp b/src/spirv_to_llvm/spirv_to_llvm.cpp index d23c946..8ea497b 100644 --- a/src/spirv_to_llvm/spirv_to_llvm.cpp +++ b/src/spirv_to_llvm/spirv_to_llvm.cpp @@ -473,7 +473,7 @@ private: { Op_entry_point entry_point; std::size_t instruction_start_index; - util::optional execution_mode; + std::vector execution_modes; }; struct Name { @@ -2846,10 +2846,7 @@ void Spirv_to_llvm::handle_instruction_op_execution_mode(Op_execution_mode instr throw Parser_error(instruction_start_index, instruction_start_index, "entry point not defined in OpExecutionMode"); - if(state.op_entry_points.back().execution_mode) - throw Parser_error( - instruction_start_index, instruction_start_index, "execution mode already set"); - state.op_entry_points.back().execution_mode = std::move(instruction.mode); + state.op_entry_points.back().execution_modes.push_back(std::move(instruction.mode)); } } -- 2.30.2