Implement the InstanceIndex
HLSL Function
#99194
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.
InstanceIndex
clang builtin,InstanceIndex
clang builtin withhlsl_intrinsics.h
InstanceIndex
toCheckHLSLBuiltinFunctionCall
inSemaChecking.cpp
InstanceIndex
toEmitHLSLBuiltinExpr
inCGBuiltin.cpp
clang/test/CodeGenHLSL/builtins/InstanceIndex.hlsl
clang/test/SemaHLSL/BuiltIns/InstanceIndex-errors.hlsl
int_dx_InstanceIndex
intrinsic inIntrinsicsDirectX.td
DXILOpMapping
ofint_dx_InstanceIndex
to142
inDXIL.td
InstanceIndex.ll
andInstanceIndex_errors.ll
tests inllvm/test/CodeGen/DirectX/
int_spv_InstanceIndex
intrinsic inIntrinsicsSPIRV.td
InstanceIndex
lowering and map it toint_spv_InstanceIndex
inSPIRVInstructionSelector::selectIntrinsic
.llvm/test/CodeGen/SPIRV/hlsl-intrinsics/InstanceIndex.ll
DirectX
SPIR-V
InstanceId
Short Description
InstanceId - Id associated with an intersected instance
Description
InstanceId
Decorating a variable in an intersection, any-hit, or closest hit shader
with the
InstanceId
decoration will make that variable contain theindex of the instance that intersects the current ray.
Valid Usage
VUID-InstanceId-InstanceId-04254
The
InstanceId
decoration must be used only within theIntersectionKHR
,AnyHitKHR
, orClosestHitKHR
Execution
Model
VUID-InstanceId-InstanceId-04255
The variable decorated with
InstanceId
must be declared usingthe
Input
Storage
Class
VUID-InstanceId-InstanceId-04256
The variable decorated with
InstanceId
must be declared as ascalar 32-bit integer value
Test Case(s)
Example 1
SPIRV Example(s):
Example 2
HLSL:
The autogenerated index of the current instance in the top-level raytracing acceleration 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: