---
title: "makeLogState(descriptor:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtldevice/makelogstate(descriptor:)"
---

# makeLogState(descriptor:)

Creates a shader log state with the provided configuration.

## Declaration

```swift
func makeLogState(descriptor: MTLLogStateDescriptor) throws -> any MTLLogState
```

## Parameters

- `descriptor`: The configuration for the new shader log state.

## Return Value

Return Value A new MTLLogState instance if the method completes successfully; otherwise Swift throws an error and Objective-C returns nil.
