Implement the WavePrefixCountBits
HLSL Function
#99171
Labels
backend:DirectX
backend:SPIR-V
bot:HLSL
HLSL
HLSL Language Support
metabug
Issue to collect references to a group of similar or related issues.
WavePrefixCountBits
clang builtin,WavePrefixCountBits
clang builtin withhlsl_intrinsics.h
WavePrefixCountBits
toCheckHLSLBuiltinFunctionCall
inSemaChecking.cpp
WavePrefixCountBits
toEmitHLSLBuiltinExpr
inCGBuiltin.cpp
clang/test/CodeGenHLSL/builtins/WavePrefixCountBits.hlsl
clang/test/SemaHLSL/BuiltIns/WavePrefixCountBits-errors.hlsl
int_dx_WavePrefixCountBits
intrinsic inIntrinsicsDirectX.td
DXILOpMapping
ofint_dx_WavePrefixCountBits
to136
inDXIL.td
WavePrefixCountBits.ll
andWavePrefixCountBits_errors.ll
tests inllvm/test/CodeGen/DirectX/
int_spv_WavePrefixCountBits
intrinsic inIntrinsicsSPIRV.td
WavePrefixCountBits
lowering and map it toint_spv_WavePrefixCountBits
inSPIRVInstructionSelector::selectIntrinsic
.llvm/test/CodeGen/SPIRV/hlsl-intrinsics/WavePrefixCountBits.ll
DirectX
SPIR-V
OpGroupNonUniformBallotBitCount:
Description:
Result is the number of bits that are set to 1 in Value, considering
only the bits in Value required to represent all bits of the
group's invocations.
Result Type must be a scalar of integer type, whose
Signedness operand is 0.
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.
Value must be a vector of four components of integer
type scalar, whose Width operand is 32 and whose
Signedness operand is 0.
Value is a set of bitfields where the first invocation is represented
in the lowest bit of the first vector component and the last (up to the
size of the group) is the higher bit number of the last bitmask needed
to represent all bits of the group invocations.
Capability:
GroupNonUniformBallot
Missing before version 1.3.
6
342
<id>
Result Type
Result <id>
Scope <id>
Execution
Group Operation
Operation
<id>
Value
Test Case(s)
Example 1
HLSL:
Returns the sum of all the specified boolean variables set to true across all active lanes with indices smaller than the current lane.
Syntax
Parameters
bBit
The specified boolean variables.
Return value
The sum of all the specified Boolean variables set to true across all active lanes with indices smaller than the current lane.
Remarks
This function is supported from shader model 6.0 in all shader stages.
Examples
The following code describes how to implement a compacted write to an ordered stream where the number of elements written per lane is either 1 or 0.
See also
Overview of Shader Model 6
Shader Model 6
The text was updated successfully, but these errors were encountered: