---
title: reflection
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlcomputepipelinestate/reflection
---

# reflection

The compute pipeline’s reflection information, if available.

## Declaration

```swift
var reflection: MTLComputePipelineReflection? { get }
```

## Discussion

Discussion The property is nil by default to help reduce your app’s memory footprint, but you can create reflection information when your app needs it. Create reflection information by building a pipeline from an MTL4Compiler instance with the following steps: Configure the shaderReflection property of an MTL4PipelineOptions instance. Assign that instance to the options property of an MTL4PipelineDescriptor instance. Create a compute pipeline state by passing that pipeline descriptor to one of the MTL4Compiler instance’s methods. The property is nil when you create a pipeline state from anMTLDevice instance, such as with its makeComputePipelineState(descriptor:options:completionHandler:) method.
