Add OpDecorate

This commit is contained in:
ReinUsesLisp
2018-10-23 04:45:56 -03:00
parent 54cc7d06ce
commit 1458bd2c1c
6 changed files with 49 additions and 4 deletions

View File

@@ -204,6 +204,12 @@ class Module {
Ref Variable(Ref result_type, spv::StorageClass storage_class,
Ref initializer = nullptr);
// Annotation
/// Add a decoration to target.
Ref Decorate(Ref target, spv::Decoration decoration,
const std::vector<Operand*>& literals = {});
// Literals
static Operand* Literal(std::uint32_t value);
static Operand* Literal(std::uint64_t value);
@@ -219,6 +225,8 @@ class Module {
Ref AddDeclaration(Op* op);
Ref AddAnnotation(Op* op);
std::uint32_t bound{1};
std::set<spv::Capability> capabilities;