<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLTileRenderPipelineDescriptor/maxCallStackDepth",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(cs)MTLTileRenderPipelineDescriptor(py)maxCallStackDepth"
  },
  "title" : "maxCallStackDepth"
}
-->

# maxCallStackDepth

The maximum call stack depth for indirect function calls in tile shaders.

```
var maxCallStackDepth: Int { get set }
```

## Discussion

The property’s default value is `1`.
Change its value if you use recursive functions in your tile dispatch.

The maximum call stack depth applies only to indirect function calls in your shader,
and affects the upper bound of stack memory for each thread.
Indirect function calls include those to visible functions, intersection functions,
and to dynamic libraries.

> Tip:
> To avoid a runtime performance impact, keep this value as small as possible because the framework reserves a large call stack.

---

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)