mirror of
https://github.com/yuzu-emu/sirit
synced 2024-11-22 18:03:54 +00:00
Add OpMemberDecorate
This commit is contained in:
parent
3f845b7c48
commit
8f8115d397
2 changed files with 13 additions and 0 deletions
|
@ -203,6 +203,9 @@ class Module {
|
|||
Ref Decorate(Ref target, spv::Decoration decoration,
|
||||
const std::vector<Operand*>& literals = {});
|
||||
|
||||
Ref MemberDecorate(Ref structure_type, Operand* member, spv::Decoration decoration,
|
||||
const std::vector<Operand*>& literals = {});
|
||||
|
||||
// Literals
|
||||
static Operand* Literal(std::uint32_t value);
|
||||
static Operand* Literal(std::uint64_t value);
|
||||
|
|
|
@ -18,4 +18,14 @@ Ref Module::Decorate(Ref target, spv::Decoration decoration,
|
|||
return AddAnnotation(op);
|
||||
}
|
||||
|
||||
Ref Module::MemberDecorate(Ref structure_type, Operand* member, spv::Decoration decoration,
|
||||
const std::vector<Operand*>& literals) {
|
||||
auto op{new Op(spv::Op::OpMemberDecorate)};
|
||||
op->Add(structure_type);
|
||||
op->Sink(member);
|
||||
AddEnum(op, decoration);
|
||||
op->Sink(literals);
|
||||
return AddAnnotation(op);
|
||||
}
|
||||
|
||||
} // namespace Sirit
|
||||
|
|
Loading…
Reference in a new issue