Implement the WaveIsFirstLane
HLSL Function
#99158
Labels
backend:DirectX
backend:SPIR-V
bot:HLSL
clang:codegen
IR generation bugs: mangling, exceptions, etc.
HLSL
HLSL Language Support
metabug
Issue to collect references to a group of similar or related issues.
WaveIsFirstLane
clang builtin,WaveIsFirstLane
clang builtin withhlsl_intrinsics.h
WaveIsFirstLane
toCheckHLSLBuiltinFunctionCall
inSemaChecking.cpp
WaveIsFirstLane
toEmitHLSLBuiltinExpr
inCGBuiltin.cpp
clang/test/CodeGenHLSL/builtins/WaveIsFirstLane.hlsl
clang/test/SemaHLSL/BuiltIns/WaveIsFirstLane-errors.hlsl
int_dx_WaveIsFirstLane
intrinsic inIntrinsicsDirectX.td
DXILOpMapping
ofint_dx_WaveIsFirstLane
to110
inDXIL.td
WaveIsFirstLane.ll
andWaveIsFirstLane_errors.ll
tests inllvm/test/CodeGen/DirectX/
int_spv_WaveIsFirstLane
intrinsic inIntrinsicsSPIRV.td
WaveIsFirstLane
lowering and map it toint_spv_WaveIsFirstLane
inSPIRVInstructionSelector::selectIntrinsic
.llvm/test/CodeGen/SPIRV/hlsl-intrinsics/WaveIsFirstLane.ll
DirectX
SPIR-V
OpGroupNonUniformElect:
Description:
Result is true only in the active invocation with the
lowest id in the group, otherwise result is false.
Result Type must be a Boolean type.
Execution is a Scope that identifies the group of
invocations affected by this command. It must be Subgroup.
Capability:
GroupNonUniform
Missing before version 1.3.
4
333
<id>
Result Type
Result <id>
Scope <id>
Execution
Test Case(s)
Example 1
HLSL:
Returns true only for the active lane in the current wave with the smallest index.
Syntax
bool WaveIsFirstLane(void);
Parameters
This function has no parameters.
Return value
True only for the active lane in the current wave with the smallest index.
Remarks
This function can be used to identify operations that are to be executed only once per wave.
This function is supported from shader model 6.0 in all shader stages.
Examples
See also
Overview of Shader Model 6
Shader Model 6
The text was updated successfully, but these errors were encountered: