shader: Add subgroup masks
This commit is contained in:
parent
fc93bc2abd
commit
da6cf2632c
10 changed files with 169 additions and 45 deletions
|
@ -1628,6 +1628,26 @@ U32 IREmitter::SubgroupBallot(const U1& value) {
|
|||
return Inst<U32>(Opcode::SubgroupBallot, value);
|
||||
}
|
||||
|
||||
U32 IREmitter::SubgroupEqMask() {
|
||||
return Inst<U32>(Opcode::SubgroupEqMask);
|
||||
}
|
||||
|
||||
U32 IREmitter::SubgroupLtMask() {
|
||||
return Inst<U32>(Opcode::SubgroupLtMask);
|
||||
}
|
||||
|
||||
U32 IREmitter::SubgroupLeMask() {
|
||||
return Inst<U32>(Opcode::SubgroupLeMask);
|
||||
}
|
||||
|
||||
U32 IREmitter::SubgroupGtMask() {
|
||||
return Inst<U32>(Opcode::SubgroupGtMask);
|
||||
}
|
||||
|
||||
U32 IREmitter::SubgroupGeMask() {
|
||||
return Inst<U32>(Opcode::SubgroupGeMask);
|
||||
}
|
||||
|
||||
U32 IREmitter::ShuffleIndex(const IR::U32& value, const IR::U32& index, const IR::U32& clamp,
|
||||
const IR::U32& seg_mask) {
|
||||
return Inst<U32>(Opcode::ShuffleIndex, value, index, clamp, seg_mask);
|
||||
|
|
|
@ -281,6 +281,11 @@ public:
|
|||
[[nodiscard]] U1 VoteAny(const U1& value);
|
||||
[[nodiscard]] U1 VoteEqual(const U1& value);
|
||||
[[nodiscard]] U32 SubgroupBallot(const U1& value);
|
||||
[[nodiscard]] U32 SubgroupEqMask();
|
||||
[[nodiscard]] U32 SubgroupLtMask();
|
||||
[[nodiscard]] U32 SubgroupLeMask();
|
||||
[[nodiscard]] U32 SubgroupGtMask();
|
||||
[[nodiscard]] U32 SubgroupGeMask();
|
||||
[[nodiscard]] U32 ShuffleIndex(const IR::U32& value, const IR::U32& index, const IR::U32& clamp,
|
||||
const IR::U32& seg_mask);
|
||||
[[nodiscard]] U32 ShuffleUp(const IR::U32& value, const IR::U32& index, const IR::U32& clamp,
|
||||
|
|
|
@ -417,6 +417,11 @@ OPCODE(VoteAll, U1, U1,
|
|||
OPCODE(VoteAny, U1, U1, )
|
||||
OPCODE(VoteEqual, U1, U1, )
|
||||
OPCODE(SubgroupBallot, U32, U1, )
|
||||
OPCODE(SubgroupEqMask, U32, )
|
||||
OPCODE(SubgroupLtMask, U32, )
|
||||
OPCODE(SubgroupLeMask, U32, )
|
||||
OPCODE(SubgroupGtMask, U32, )
|
||||
OPCODE(SubgroupGeMask, U32, )
|
||||
OPCODE(ShuffleIndex, U32, U32, U32, U32, U32, )
|
||||
OPCODE(ShuffleUp, U32, U32, U32, U32, U32, )
|
||||
OPCODE(ShuffleDown, U32, U32, U32, U32, U32, )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue