Implement OpGroupNonUniformBroadcastFirst

- update to latest spirv-headers
- add OpGroupNonUniformBroadcastFirst
This commit is contained in:
greggameplayer 2024-08-30 00:43:15 +02:00
parent 8db09231c4
commit d5a049d589
No known key found for this signature in database
GPG Key ID: DFCB45491D2A00EB
3 changed files with 11 additions and 1 deletions

@ -1 +1 @@
Subproject commit a3fdfe81465d57efc97cfd28ac6c8190fb31a6c8
Subproject commit 2acb319af38d43be3ea76bfabf3998e5281d8d12

View File

@ -1212,6 +1212,10 @@ public:
// the group.
Id OpGroupNonUniformBroadcast(Id result_type, Id scope, Id value, Id id);
// 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);
/// Return the value of the invocation identified by the current invocation's id within the
/// group xor'ed with mask.
Id OpGroupNonUniformShuffleXor(Id result_type, Id scope, Id value, Id mask);

View File

@ -42,6 +42,12 @@ Id Module::OpGroupNonUniformBroadcast(Id result_type, Id scope, Id value, Id id)
<< id << 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::OpGroupNonUniformShuffleXor(Id result_type, Id scope, Id value, Id mask) {
code->Reserve(6);
return *code << OpId{spv::Op::OpGroupNonUniformShuffleXor, result_type} << scope << value