---
title: MTLStepFunction.threadPositionInGridYIndexed
framework: metal
role: symbol
role_heading: Case
path: metal/mtlstepfunction/threadpositioningridyindexed
---

# MTLStepFunction.threadPositionInGridYIndexed

The compute function fetches data by using the thread’s y coordinate to look up a value in the index buffer.

## Declaration

```swift
case threadPositionInGridYIndexed
```

## Discussion

Discussion This step function uses the y coordinate of the thread position in a grid as an index into the [[stage_in]] index buffer, which is then used to fetch data. In tessellation compute kernels, you use this step function to identify a control point in a given patch.

## See Also

### Step options

- [MTLStepFunction.constant](metal/mtlstepfunction/constant.md)
- [MTLStepFunction.perInstance](metal/mtlstepfunction/perinstance.md)
- [MTLStepFunction.perPatch](metal/mtlstepfunction/perpatch.md)
- [MTLStepFunction.perPatchControlPoint](metal/mtlstepfunction/perpatchcontrolpoint.md)
- [MTLStepFunction.perVertex](metal/mtlstepfunction/pervertex.md)
- [MTLStepFunction.threadPositionInGridX](metal/mtlstepfunction/threadpositioningridx.md)
- [MTLStepFunction.threadPositionInGridY](metal/mtlstepfunction/threadpositioningridy.md)
- [MTLStepFunction.threadPositionInGridXIndexed](metal/mtlstepfunction/threadpositioningridxindexed.md)
