SPIR-V Built-In

ShaderIndexAMDX

Index assigned to the shader within the workgraph
ShaderIndexAMDX

Decorating a variable with the ShaderIndexAMDX built-in decoration will make that variable contain the index of the shader specified when it was compiled, either via VkPipelineShaderStageNodeCreateInfoAMDX::index or by the ShaderIndexAMDX execution mode.

Valid Usage

VUID-ShaderIndexAMDX-ShaderIndexAMDX-09175

The variable decorated with ShaderIndexAMDX must be declared using the Input Storage Class

VUID-ShaderIndexAMDX-ShaderIndexAMDX-09176

The variable decorated with ShaderIndexAMDX must be declared as a scalar 32-bit integer value