<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLStepFunction/threadPositionInGridYIndexed",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:@E@MTLStepFunction@MTLStepFunctionThreadPositionInGridYIndexed"
  },
  "title" : "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.

```
case threadPositionInGridYIndexed
```

## 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)