---
title: MTLCommandBufferError.Code.stackOverflow
framework: metal
role: symbol
role_heading: Case
path: metal/mtlcommandbuffererror-swift.struct/code/stackoverflow
---

# MTLCommandBufferError.Code.stackOverflow

An error code that indicates the GPU terminated the command buffer because a kernel function of tile shader used too many stack frames.

## Declaration

```swift
case stackOverflow
```

## Discussion

Discussion You can set the largest number of stack frames your pipelines by configuring these properties: MTLComputePipelineDescriptor.maxCallStackDepth for kernel functions MTLTileRenderPipelineDescriptor.maxCallStackDepth for tile shaders

## See Also

### Error codes

- [MTLCommandBufferError.Code.none](metal/mtlcommandbuffererror-swift.struct/code/none.md)
- [MTLCommandBufferError.Code.timeout](metal/mtlcommandbuffererror-swift.struct/code/timeout.md)
- [MTLCommandBufferError.Code.pageFault](metal/mtlcommandbuffererror-swift.struct/code/pagefault.md)
- [MTLCommandBufferError.Code.notPermitted](metal/mtlcommandbuffererror-swift.struct/code/notpermitted.md)
- [MTLCommandBufferError.Code.outOfMemory](metal/mtlcommandbuffererror-swift.struct/code/outofmemory.md)
- [MTLCommandBufferError.Code.invalidResource](metal/mtlcommandbuffererror-swift.struct/code/invalidresource.md)
- [MTLCommandBufferError.Code.memoryless](metal/mtlcommandbuffererror-swift.struct/code/memoryless.md)
- [MTLCommandBufferError.Code.deviceRemoved](metal/mtlcommandbuffererror-swift.struct/code/deviceremoved.md)
- [accessRevoked](metal/mtlcommandbuffererror-swift.struct/code/accessrevoked.md)
- [MTLCommandBufferError.Code.internal](metal/mtlcommandbuffererror-swift.struct/code/internal.md)
