<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLDevice/makeRenderPipelineState(descriptor:options:)-yrak",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "s:So9MTLDeviceP5MetalE23makeRenderPipelineState10descriptor7optionsSo09MTLRendereF0_p_So0iE10ReflectionCSgtSo07MTLMeshdE10DescriptorC_So17MTLPipelineOptionVtKF"
  },
  "title" : "makeRenderPipelineState(descriptor:options:)"
}
-->

# makeRenderPipelineState(descriptor:options:)

Synchronously creates a mesh render pipeline state and reflection information in a tuple.

```
func makeRenderPipelineState(descriptor: MTLMeshRenderPipelineDescriptor, options: MTLPipelineOption) throws -> (any MTLRenderPipelineState, MTLRenderPipelineReflection?)
```

## Parameters

`descriptor`

An [`MTLMeshRenderPipelineDescriptor`](/documentation/Metal/MTLMeshRenderPipelineDescriptor) instance.

`options`

An [`MTLPipelineOption`](/documentation/Metal/MTLPipelineOption) instance that represents the reflection information you want the method to generate.

## Return Value

A tuple with a new [`MTLRenderPipelineState`](/documentation/Metal/MTLRenderPipelineState) instance and an
[`MTLRenderPipelineReflection`](/documentation/Metal/MTLRenderPipelineReflection) optional instance if the method completes successfully;
otherwise Swift throws an error and Objective-C returns `nil`.

## Discussion

Use the graphics-rendering pipeline state to configure a render pass by calling the [`setRenderPipelineState(_:)`](/documentation/Metal/MTLRenderCommandEncoder/setRenderPipelineState(_:)) method of an [`MTLRenderCommandEncoder`](/documentation/Metal/MTLRenderCommandEncoder) instance.

---

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)