Add OpKill

This commit is contained in:
ReinUsesLisp 2018-12-02 22:57:55 -03:00
parent 93d42e62da
commit 3641e1de45
2 changed files with 8 additions and 0 deletions

View file

@ -194,6 +194,9 @@ class Module {
/// Return a value from a function.
Id OpReturnValue(Id value);
/// Fragment-shader discard.
Id OpKill();
// Debug
/// Assign a name string to a reference.

View file

@ -59,4 +59,9 @@ Id Module::OpReturnValue(Id value) {
return AddCode(std::move(op));
}
Id Module::OpKill() {
AddCapability(spv::Capability::Shader);
return AddCode(std::make_unique<Op>(spv::Op::OpKill));
}
} // namespace Sirit