mirror of
https://github.com/yuzu-emu/sirit.git
synced 2024-11-26 00:05:39 +01:00
Add OpSubgroupReadInvocationKHR
This commit is contained in:
parent
9b897c3541
commit
688d6d9799
@ -941,6 +941,11 @@ public:
|
|||||||
|
|
||||||
// Group
|
// Group
|
||||||
|
|
||||||
|
/// Return the value from the invocation in the subgroup with an invocation ID equal to index.
|
||||||
|
/// The index must be the same for all active invocations in the subgroup, otherwise the results
|
||||||
|
/// are undefined.
|
||||||
|
Id OpSubgroupReadInvocationKHR(Id result_type, Id value, Id index);
|
||||||
|
|
||||||
/// Return the value of the invocation identified by the current invocation's id within the
|
/// Return the value of the invocation identified by the current invocation's id within the
|
||||||
/// group xor'ed with mask.
|
/// group xor'ed with mask.
|
||||||
Id OpGroupNonUniformShuffleXor(Id result_type, spv::Scope scope, Id value, Id mask);
|
Id OpGroupNonUniformShuffleXor(Id result_type, spv::Scope scope, Id value, Id mask);
|
||||||
|
@ -9,6 +9,13 @@
|
|||||||
|
|
||||||
namespace Sirit {
|
namespace Sirit {
|
||||||
|
|
||||||
|
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);
|
||||||
|
op->Add(index);
|
||||||
|
return AddCode(std::move(op));
|
||||||
|
}
|
||||||
|
|
||||||
Id Module::OpGroupNonUniformShuffleXor(Id result_type, spv::Scope scope, Id value, Id mask) {
|
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);
|
auto op = std::make_unique<Op>(spv::Op::OpGroupNonUniformShuffleXor, bound++, result_type);
|
||||||
op->Add(static_cast<u32>(scope));
|
op->Add(static_cast<u32>(scope));
|
||||||
|
Loading…
Reference in New Issue
Block a user