<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTL4Compiler/newRenderPipelineStateBySpecializationWithDescriptor:pipeline:error:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(pl)MTL4Compiler(im)newRenderPipelineStateBySpecializationWithDescriptor:pipeline:error:"
  },
  "title" : "newRenderPipelineStateBySpecializationWithDescriptor:pipeline:error:"
}
-->

# newRenderPipelineStateBySpecializationWithDescriptor:pipeline:error:

Creates a new render pipeline state from another, previously unspecialized, pipeline state.

```
- (id<MTLRenderPipelineState>) newRenderPipelineStateBySpecializationWithDescriptor:(MTL4PipelineDescriptor *) descriptor pipeline:(id<MTLRenderPipelineState>) pipeline error:(NSError **) error;
```

## Parameters

`descriptor`

A render pipeline state descriptor or any type: default, tile, or mesh render pipeline descriptor.

`pipeline`

A render pipeline state containing unspecialized substate.

`error`

An optional parameter into which Metal stores information in case of an error.

## Return Value

a fully-specialized pipeline state object.

## Discussion

Metal specializes the pipeline state with new state values the descriptor provides, observing the following rules:

- The compiler only updates properties that were originally specified as *unspecialized*. It doesn’t modify other
  already-specialized properties
- The compiler sets to their default behavior any unspecialized properties that your passed-in descriptor doesn’t specialize

Additionally, there are some cases where the Metal can’t specialize a pipeline:

- If the original pipeline state object doesn’t have any unspecialized properties
- You can’t re-specialize a previously specialized pipeline state object

---

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)