--- layout: stdlib-reference --- # NonUniformResourceIndex ## Description NonUniformResourceIndex function is used to indicate if the resource index is divergent, and ensure scalarization happens correctly for each divergent lane. ## Signature
T NonUniformResourceIndex<T>(T index)
    where T : __BuiltinArithmeticType;

T NonUniformResourceIndex<T>(T value);

## Generic Parameters #### T: [\_\_BuiltinArithmeticType](../interfaces/0_builtinarithmetictype-029j/index.html) #### T ## Parameters #### index : [T](nonuniformresourceindex-03ai.html#typeparam-T) #### value : [T](nonuniformresourceindex-03ai.html#typeparam-T) ## Availability and Requirements Defined for the following targets: #### hlsl Available in all stages. #### glsl Available in all stages. #### cpp Available in all stages. #### cuda Available in all stages. #### spirv Available in all stages. Requires capabilities: `SPV_KHR_non_semantic_info`, `SPV_GOOGLE_user_type`, `spvDerivativeControl`, `spvImageQuery`, `spvImageGatherExtended`, `spvSparseResidency`, `spvMinLod`, `spvFragmentFullyCoveredEXT`, `spvShaderNonUniformEXT`.