mirror of
https://github.com/yuzu-emu/sirit.git
synced 2024-12-23 00:35:38 +00:00
Add OpGroupNonUniformElect, OpGroupNonUniformBroadcastFirst
This commit is contained in:
parent
d7ad93a888
commit
86a720d2cf
|
@ -1160,6 +1160,14 @@ public:
|
||||||
/// TBD
|
/// TBD
|
||||||
Id OpSubgroupAllEqualKHR(Id result_type, Id predicate);
|
Id OpSubgroupAllEqualKHR(Id result_type, Id predicate);
|
||||||
|
|
||||||
|
// Result is true only in the active invocation with the lowest id in the group, otherwise
|
||||||
|
// result is false.
|
||||||
|
Id OpGroupNonUniformElect(Id result_type, Id scope);
|
||||||
|
|
||||||
|
// Result is the Value of the invocation from the active invocation with the lowest id in the
|
||||||
|
// group to all active invocations in the group.
|
||||||
|
Id OpGroupNonUniformBroadcastFirst(Id result_type, Id scope, Id value);
|
||||||
|
|
||||||
// Result is the Value of the invocation identified by the id Id to all active invocations in
|
// Result is the Value of the invocation identified by the id Id to all active invocations in
|
||||||
// the group.
|
// the group.
|
||||||
Id OpGroupNonUniformBroadcast(Id result_type, Id scope, Id value, Id id);
|
Id OpGroupNonUniformBroadcast(Id result_type, Id scope, Id value, Id id);
|
||||||
|
|
|
@ -36,6 +36,17 @@ Id Module::OpSubgroupAllEqualKHR(Id result_type, Id predicate) {
|
||||||
return *code << OpId{spv::Op::OpSubgroupAllEqualKHR, result_type} << predicate << EndOp{};
|
return *code << OpId{spv::Op::OpSubgroupAllEqualKHR, result_type} << predicate << EndOp{};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Id Module::OpGroupNonUniformElect(Id result_type, Id scope) {
|
||||||
|
code->Reserve(4);
|
||||||
|
return *code << OpId{spv::Op::OpGroupNonUniformElect, result_type} << scope << EndOp{};
|
||||||
|
}
|
||||||
|
|
||||||
|
Id Module::OpGroupNonUniformBroadcastFirst(Id result_type, Id scope, Id value) {
|
||||||
|
code->Reserve(5);
|
||||||
|
return *code << OpId{spv::Op::OpGroupNonUniformBroadcastFirst, result_type} << scope << value
|
||||||
|
<< EndOp{};
|
||||||
|
}
|
||||||
|
|
||||||
Id Module::OpGroupNonUniformBroadcast(Id result_type, Id scope, Id value, Id id) {
|
Id Module::OpGroupNonUniformBroadcast(Id result_type, Id scope, Id value, Id id) {
|
||||||
code->Reserve(6);
|
code->Reserve(6);
|
||||||
return *code << OpId{spv::Op::OpGroupNonUniformBroadcast, result_type} << scope << value
|
return *code << OpId{spv::Op::OpGroupNonUniformBroadcast, result_type} << scope << value
|
||||||
|
|
Loading…
Reference in a new issue