---
title: "MPSStateBatchResourceSize(_:)"
framework: metalperformanceshaders
role: symbol
role_heading: Function
path: "metalperformanceshaders/mpsstatebatchresourcesize(_:)"
---

# MPSStateBatchResourceSize(_:)

Returns the number of bytes used to allocate the specified state batch.

## Declaration

```swift
func MPSStateBatchResourceSize(_ batch: [MPSState]?) -> Int
```
