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
3 changed files with 11 additions and 1 deletions

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