diff options
author | comex <[email protected]> | 2020-11-26 14:39:27 -0500 |
---|---|---|
committer | Rodrigo Locatti <[email protected]> | 2020-11-26 17:20:01 -0300 |
commit | ab567491e15aa5c94d6e64956f46d7896583f321 (patch) | |
tree | b42ebeeb3bd62fb10d2b2675b5e5f6bdbfec094c /include | |
parent | c095705f59caaf92e4988d5da6434933f5481dc2 (diff) | |
download | sirit-ab567491e15aa5c94d6e64956f46d7896583f321.tar.gz sirit-ab567491e15aa5c94d6e64956f46d7896583f321.zip |
Add support for `OpGroupNonUniform{All,Any,AllEqual,Ballot}`, and fix `OpGroupNonUniformShuffleXor`.
These Vulkan 1.1 operations can be used in place of
`OpSubgroup{All,Any,AllEqual,Ballot}KHR`, among other things.
For `OpGroupNonUniformShuffleXor`, which was already implemented, turns
out the scope argument needs to be encoded not as an immediate, but as
an id that points to a constant integer.
Diffstat (limited to 'include')
-rw-r--r-- | include/sirit/sirit.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/include/sirit/sirit.h b/include/sirit/sirit.h index 7e1fd22..d7dfc78 100644 --- a/include/sirit/sirit.h +++ b/include/sirit/sirit.h @@ -1017,7 +1017,29 @@ public: /// 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, spv::Scope scope, Id value, Id mask); + Id OpGroupNonUniformShuffleXor(Id result_type, Id scope, Id value, Id mask); + + /// Evaluates a predicate for all active invocations in the group, resulting in + /// true if predicate evaluates to true for all active invocations in the + /// group, otherwise the result is false. + Id OpGroupNonUniformAll(Id result_type, Id scope, Id predicate); + + /// Evaluates a predicate for all active invocations in the group, + /// resulting in true if predicate evaluates to true for any active + /// invocation in the group, otherwise the result is false. + Id OpGroupNonUniformAny(Id result_type, Id scope, Id predicate); + + /// Evaluates a value for all active invocations in the group. The result + /// is true if Value is equal for all active invocations in the group. + /// Otherwise, the result is false. + Id OpGroupNonUniformAllEqual(Id result_type, Id scope, Id value); + + /// Result is a bitfield value combining the Predicate value from all + /// invocations in the group that execute the same dynamic instance of this + /// instruction. The bit is set to one if the corresponding invocation is + /// active and the Predicate for that invocation evaluated to true; + /// otherwise, it is set to zero. + Id OpGroupNonUniformBallot(Id result_type, Id scope, Id predicate); // Atomic |