mirror of
https://git.suyu.dev/suyu/sirit.git
synced 2026-01-02 04:35:38 +01:00
Add OpDecorate
This commit is contained in:
parent
54cc7d06ce
commit
1458bd2c1c
6 changed files with 49 additions and 4 deletions
21
src/insts/annotation.cpp
Normal file
21
src/insts/annotation.cpp
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* This file is part of the sirit project.
|
||||
* Copyright (c) 2018 ReinUsesLisp
|
||||
* This software may be used and distributed according to the terms of the GNU
|
||||
* Lesser General Public License version 2.1 or any later version.
|
||||
*/
|
||||
|
||||
#include "insts.h"
|
||||
#include "sirit/sirit.h"
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Ref Module::Decorate(Ref target, spv::Decoration decoration,
|
||||
const std::vector<Operand*>& literals) {
|
||||
auto const op{new Op(spv::Op::OpDecorate)};
|
||||
op->Add(target);
|
||||
AddEnum(op, decoration);
|
||||
op->Add(literals);
|
||||
return AddAnnotation(op);
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
Loading…
Add table
Add a link
Reference in a new issue