Implement the InstanceID
HLSL Function
#97624
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.
InstanceID
clang builtin,InstanceID
clang builtin withhlsl_intrinsics.h
InstanceID
toCheckHLSLBuiltinFunctionCall
inSemaChecking.cpp
InstanceID
toEmitHLSLBuiltinExpr
inCGBuiltin.cpp
clang/test/CodeGenHLSL/builtins/InstanceID.hlsl
clang/test/SemaHLSL/BuiltIns/InstanceID-errors.hlsl
int_dx_InstanceID
intrinsic inIntrinsicsDirectX.td
DXILOpMapping
ofint_dx_InstanceID
to141
inDXIL.td
InstanceID.ll
andInstanceID_errors.ll
tests inllvm/test/CodeGen/DirectX/
int_spv_InstanceID
intrinsic inIntrinsicsSPIRV.td
InstanceID
lowering and map it toint_spv_InstanceID
inSPIRVInstructionSelector::selectIntrinsic
.llvm/test/CodeGen/SPIRV/hlsl-intrinsics/InstanceID.ll
DirectX
SPIR-V
InstanceCustomIndexKHR
Short Description
InstanceCustomIndexKHR - Custom index associated with an intersected
instance
Description
InstanceCustomIndexKHR
A variable decorated with the
InstanceCustomIndexKHR
decoration willcontain the application-defined value of the instance that intersects
the current ray. This variable contains the value that was specified in
VkAccelerationStructureInstanceKHR
::
instanceCustomIndex
for the current acceleration structureinstance in the lower 24 bits and the upper 8 bits will be zero.
Valid Usage
VUID-InstanceCustomIndexKHR-InstanceCustomIndexKHR-04251
The
InstanceCustomIndexKHR
decoration must be used only withinthe
IntersectionKHR
,AnyHitKHR
, orClosestHitKHR
Execution
Model
VUID-InstanceCustomIndexKHR-InstanceCustomIndexKHR-04252
The variable decorated with
InstanceCustomIndexKHR
must bedeclared using the
Input
Storage
Class
VUID-InstanceCustomIndexKHR-InstanceCustomIndexKHR-04253
The variable decorated with
InstanceCustomIndexKHR
must bedeclared as a scalar 32-bit integer value
Test Case(s)
Example 1
SPIRV Example(s):
Example 2
HLSL:
The user-provided identifier for the instance on the bottom-level acceleration structure instance within the top-level structure.
Syntax
Remarks
This function can be called from the following raytracing shader types:
See also
Direct3D 12 Raytracing HLSL Reference
The text was updated successfully, but these errors were encountered: