-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Description
- Implement
WaveActiveBitOrclang builtin, - Link
WaveActiveBitOrclang builtin withhlsl_intrinsics.h - Add sema checks for
WaveActiveBitOrtoCheckHLSLBuiltinFunctionCallinSemaChecking.cpp - Add codegen for
WaveActiveBitOrtoEmitHLSLBuiltinExprinCGBuiltin.cpp - Add codegen tests to
clang/test/CodeGenHLSL/builtins/WaveActiveBitOr.hlsl - Add sema tests to
clang/test/SemaHLSL/BuiltIns/WaveActiveBitOr-errors.hlsl - Create the
int_dx_WaveActiveBitOrintrinsic inIntrinsicsDirectX.td - Create the
DXILOpMappingofint_dx_WaveActiveBitOrto120inDXIL.td - Create the
WaveActiveBitOr.llandWaveActiveBitOr_errors.lltests inllvm/test/CodeGen/DirectX/ - Create the
int_spv_WaveActiveBitOrintrinsic inIntrinsicsSPIRV.td - In SPIRVInstructionSelector.cpp create the
WaveActiveBitOrlowering and map it toint_spv_WaveActiveBitOrinSPIRVInstructionSelector::selectIntrinsic. - Create SPIR-V backend test case in
llvm/test/CodeGen/SPIRV/hlsl-intrinsics/WaveActiveBitOr.ll
DirectX
| DXIL Opcode | DXIL OpName | Shader Model | Shader Stages |
|---|---|---|---|
| 120 | WaveActiveBit | 6.0 | ('library', 'compute', 'amplification', 'mesh', 'pixel', 'vertex', 'hull', 'domain', 'geometry', 'raygeneration', 'intersection', 'anyhit', 'closesthit', 'miss', 'callable', 'node') |
SPIR-V
OpGroupNonUniformBitwiseOr:
Description:
A bitwise or group operation of all Value operands
contributed by active invocations in the
group.
Result Type must be a scalar or vector of integer
type.
Execution is a Scope that identifies the group of
invocations affected by this command. It must be Subgroup.
The identity I for Operation is 0. If Operation is
ClusteredReduce, ClusterSize must be present.
The type of Value must be the same as Result Type.
ClusterSize is the size of cluster to use. ClusterSize must be a
scalar of integer type, whose Signedness operand is 0.
ClusterSize must come from a constant
instruction. Behavior is undefined unless
ClusterSize is at least 1 and a power of 2. If ClusterSize is
greater than the size of the group, executing this instruction
results in undefined behavior.
Capability:
GroupNonUniformArithmetic, GroupNonUniformClustered,
GroupNonUniformPartitionedNV
Missing before version 1.3.
| Word Count | Opcode | Results | Operands | ||||
|---|---|---|---|---|---|---|---|
6 + variable |
360 |
<id> |
Scope <id> |
Group Operation |
<id> |
Optional |
Test Case(s)
Example 1
//dxc WaveActiveBitOr_test.hlsl -T lib_6_8 -enable-16bit-types -O0
export uint4 fn(uint4 p1) {
return WaveActiveBitOr(p1);
}HLSL:
Returns the bitwise OR of all the values of <expr> across all active non-helper lanes in the current wave, and replicates it back to all active non-helper lanes.
Syntax
<int_type> WaveActiveBitOr(
<int_type> expr
);Parameters
-
expr
-
The expression to evaluate.
Return value
The bitwise OR value.
Remarks
This function is supported from shader model 6.0 in all shader stages.
See also
Metadata
Metadata
Assignees
Labels
Type
Projects
Status