<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTL4Compiler/makeRenderPipelineStateBySpecialization(descriptor:pipeline:)-2636j",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "s:So12MTL4CompilerP5MetalE39makeRenderPipelineStateBySpecialization10descriptor8pipelineSo09MTLRenderfG0_pSo0aF10DescriptorC_SoAG_ptKF"
  },
  "title" : "makeRenderPipelineStateBySpecialization(descriptor:pipeline:)"
}
-->

# makeRenderPipelineStateBySpecialization(descriptor:pipeline:)

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

```
func makeRenderPipelineStateBySpecialization(descriptor: MTL4PipelineDescriptor, pipeline: any MTLRenderPipelineState) throws -> any MTLRenderPipelineState
```

## 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.

## Return Value

a fully-specialized pipeline state object upon success, otherwise this function throws.

## 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)