mirror of
https://git.suyu.dev/suyu/sirit.git
synced 2025-12-22 05:46:34 +01:00
Add OpSubgroupBallotKHR and vote instructions
This commit is contained in:
parent
688d6d9799
commit
71b53b855a
2 changed files with 37 additions and 0 deletions
|
|
@ -9,6 +9,12 @@
|
|||
|
||||
namespace Sirit {
|
||||
|
||||
Id Module::OpSubgroupBallotKHR(Id result_type, Id predicate) {
|
||||
auto op = std::make_unique<Op>(spv::Op::OpSubgroupBallotKHR, bound++, result_type);
|
||||
op->Add(predicate);
|
||||
return AddCode(std::move(op));
|
||||
}
|
||||
|
||||
Id Module::OpSubgroupReadInvocationKHR(Id result_type, Id value, Id index) {
|
||||
auto op = std::make_unique<Op>(spv::Op::OpSubgroupReadInvocationKHR, bound++, result_type);
|
||||
op->Add(value);
|
||||
|
|
@ -16,6 +22,24 @@ Id Module::OpSubgroupReadInvocationKHR(Id result_type, Id value, Id index) {
|
|||
return AddCode(std::move(op));
|
||||
}
|
||||
|
||||
Id Module::OpSubgroupAllKHR(Id result_type, Id predicate) {
|
||||
auto op = std::make_unique<Op>(spv::Op::OpSubgroupAllKHR, bound++, result_type);
|
||||
op->Add(predicate);
|
||||
return AddCode(std::move(op));
|
||||
}
|
||||
|
||||
Id Module::OpSubgroupAnyKHR(Id result_type, Id predicate) {
|
||||
auto op = std::make_unique<Op>(spv::Op::OpSubgroupAnyKHR, bound++, result_type);
|
||||
op->Add(predicate);
|
||||
return AddCode(std::move(op));
|
||||
}
|
||||
|
||||
Id Module::OpSubgroupAllEqualKHR(Id result_type, Id predicate) {
|
||||
auto op = std::make_unique<Op>(spv::Op::OpSubgroupAllEqualKHR, bound++, result_type);
|
||||
op->Add(predicate);
|
||||
return AddCode(std::move(op));
|
||||
}
|
||||
|
||||
Id Module::OpGroupNonUniformShuffleXor(Id result_type, spv::Scope scope, Id value, Id mask) {
|
||||
auto op = std::make_unique<Op>(spv::Op::OpGroupNonUniformShuffleXor, bound++, result_type);
|
||||
op->Add(static_cast<u32>(scope));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue