mirror of
https://git.suyu.dev/suyu/sirit.git
synced 2025-12-29 10:46:39 +01:00
Add OpExecutionMode
This commit is contained in:
parent
3641e1de45
commit
e7971b4451
2 changed files with 15 additions and 2 deletions
|
|
@ -49,7 +49,7 @@ std::vector<u8> Module::Assemble() const {
|
|||
memory_model_ref.Write(stream);
|
||||
|
||||
WriteSet(stream, entry_points);
|
||||
// TODO write execution mode
|
||||
WriteSet(stream, execution_modes);
|
||||
WriteSet(stream, debug);
|
||||
WriteSet(stream, annotations);
|
||||
WriteSet(stream, declarations);
|
||||
|
|
@ -80,6 +80,15 @@ void Module::AddEntryPoint(spv::ExecutionModel execution_model, Id entry_point,
|
|||
entry_points.push_back(std::move(op));
|
||||
}
|
||||
|
||||
void Module::AddExecutionMode(Id entry_point, spv::ExecutionMode mode,
|
||||
const std::vector<Literal>& literals) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpExecutionMode)};
|
||||
op->Add(entry_point);
|
||||
op->Add(static_cast<u32>(mode));
|
||||
op->Add(literals);
|
||||
execution_modes.push_back(std::move(op));
|
||||
}
|
||||
|
||||
Id Module::Emit(Id op) {
|
||||
code.push_back(op);
|
||||
return op;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue