diff options
| author | swurl <swurl@swurl.xyz> | 2025-05-31 02:33:02 -0400 |
|---|---|---|
| committer | swurl <swurl@swurl.xyz> | 2025-05-31 02:33:02 -0400 |
| commit | 6c655321e6b04b8648802e296bb5ca11d290ae68 (patch) | |
| tree | 5c906511e4a2910ce8b806bb9d763b524c28619e /externals/sirit/src/instructions/annotation.cpp | |
| parent | c0cceff365f754f8859f4c9a0362ebdba7ea388b (diff) | |
Move dead submodules in-tree
Signed-off-by: swurl <swurl@swurl.xyz>
Diffstat (limited to 'externals/sirit/src/instructions/annotation.cpp')
| -rw-r--r-- | externals/sirit/src/instructions/annotation.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/externals/sirit/src/instructions/annotation.cpp b/externals/sirit/src/instructions/annotation.cpp new file mode 100644 index 0000000000..e3524bb83a --- /dev/null +++ b/externals/sirit/src/instructions/annotation.cpp @@ -0,0 +1,27 @@ +/* This file is part of the sirit project. + * Copyright (c) 2019 sirit + * This software may be used and distributed according to the terms of the + * 3-Clause BSD License + */ + +#include <span> + +#include "sirit/sirit.h" + +#include "stream.h" + +namespace Sirit { + +Id Module::Decorate(Id target, spv::Decoration decoration, std::span<const Literal> literals) { + annotations->Reserve(3 + literals.size()); + return *annotations << spv::Op::OpDecorate << target << decoration << literals << EndOp{}; +} + +Id Module::MemberDecorate(Id structure_type, Literal member, spv::Decoration decoration, + std::span<const Literal> literals) { + annotations->Reserve(4 + literals.size()); + return *annotations << spv::Op::OpMemberDecorate << structure_type << member << decoration + << literals << EndOp{}; +} + +} // namespace Sirit |
