---
title: "makeRenderPipelineStateBySpecialization(descriptor:pipeline:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtl4compiler/makerenderpipelinestatebyspecialization(descriptor:pipeline:)-7s2wp"
---

# makeRenderPipelineStateBySpecialization(descriptor:pipeline:)

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

## Declaration

```swift
func makeRenderPipelineStateBySpecialization(descriptor: MTL4PipelineDescriptor, pipeline: any MTLRenderPipelineState) async 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

Return Value A fully-specialized pipeline state object upon success, otherwise this function throws.

## Discussion

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 previosuly specialized pipeline state object
