mirror of
https://git.suyu.dev/suyu/sirit.git
synced 2025-12-24 16:25:59 +01:00
Rename "insts" directory to "instructions"
This commit is contained in:
parent
f5944d61a6
commit
f259019494
15 changed files with 14 additions and 14 deletions
37
src/instructions/annotation.cpp
Normal file
37
src/instructions/annotation.cpp
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* 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 3 or any later version.
|
||||
*/
|
||||
|
||||
#include "common_types.h"
|
||||
#include "op.h"
|
||||
#include "sirit/sirit.h"
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace Sirit {
|
||||
|
||||
Id Module::Decorate(Id target, spv::Decoration decoration,
|
||||
const std::vector<Literal>& literals) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpDecorate)};
|
||||
op->Add(target);
|
||||
op->Add(static_cast<u32>(decoration));
|
||||
op->Add(literals);
|
||||
AddAnnotation(std::move(op));
|
||||
return target;
|
||||
}
|
||||
|
||||
Id Module::MemberDecorate(Id structure_type, Literal member,
|
||||
spv::Decoration decoration,
|
||||
const std::vector<Literal>& literals) {
|
||||
auto op{std::make_unique<Op>(spv::Op::OpMemberDecorate)};
|
||||
op->Add(structure_type);
|
||||
op->Add(member);
|
||||
op->Add(static_cast<u32>(decoration));
|
||||
op->Add(literals);
|
||||
AddAnnotation(std::move(op));
|
||||
return structure_type;
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
Loading…
Add table
Add a link
Reference in a new issue