---
title: payloadMemoryLength
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtl4meshrenderpipelinedescriptor/payloadmemorylength
---

# payloadMemoryLength

Reserves storage for the object-to-mesh stage payload.

## Declaration

```swift
var payloadMemoryLength: Int { get set }
```

## Discussion

Discussion This property determines the size, in bytes, of the buffer you indicate via the Metal Shading Language [[payload]] attribute in the object and mesh shader functions of the mesh render pipeline. If this value is 0, Metal derives the size from the (dereferenced) type you declare for the payload in the object shader function. If the type is a pointer, Metal reserves space for a single element. The default value is 0.
