Implement the SetMeshOutputCounts
HLSL Function
#99231
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.
SetMeshOutputCounts
clang builtin,SetMeshOutputCounts
clang builtin withhlsl_intrinsics.h
SetMeshOutputCounts
toCheckHLSLBuiltinFunctionCall
inSemaChecking.cpp
SetMeshOutputCounts
toEmitHLSLBuiltinExpr
inCGBuiltin.cpp
clang/test/CodeGenHLSL/builtins/SetMeshOutputCounts.hlsl
clang/test/SemaHLSL/BuiltIns/SetMeshOutputCounts-errors.hlsl
int_dx_SetMeshOutputCounts
intrinsic inIntrinsicsDirectX.td
DXILOpMapping
ofint_dx_SetMeshOutputCounts
to168
inDXIL.td
SetMeshOutputCounts.ll
andSetMeshOutputCounts_errors.ll
tests inllvm/test/CodeGen/DirectX/
int_spv_SetMeshOutputCounts
intrinsic inIntrinsicsSPIRV.td
SetMeshOutputCounts
lowering and map it toint_spv_SetMeshOutputCounts
inSPIRVInstructionSelector::selectIntrinsic
.llvm/test/CodeGen/SPIRV/hlsl-intrinsics/SetMeshOutputCounts.ll
DirectX
SPIR-V
OpSetMeshOutputsEXT:
Description:
Reserved.
Capability:
MeshShadingEXT
Reserved.
3
5295
<id>
Vertex Count
<id>
Primitive Count
Test Case(s)
Example 1
SPIRV Example(s):
Example 2
HLSL:
This function sets the actual number of outputs from the threadgroup.
Syntax
Remarks
At the beginning of the shader the implementation internally sets a
count of vertices and primitives to be exported from a threadgroup to 0.
It means that if a mesh shader returns without calling this function,
it will not output any mesh. This function sets the actual number of
outputs from the threadgroup.
Some restrictions on the function use and interactions with output arrays follow.
This function can only be called once per shader.
This call must occur before any writes to any of the
shared output arrays.
The validator will verify this is the case.
If the compiler can prove that this function is not called,
then the threadgroup doesn't have any output.
If the shader writes to any of the
shared output arrays,
compilation and shader validation will fail.
If the shader does not call any of these functions,
the compiler will issue a warning,
and no rasterization work will be issued.
Only the input values from the first active thread are used.
This call must dominate all writes to
shared output arrays.
In other words, there must not be any execution path
that even appears to reach any writes to any output array
without first having executed this call.
The text was updated successfully, but these errors were encountered: