---
title: "makeBinaryFunction(descriptor:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtl4archive/makebinaryfunction(descriptor:)"
---

# makeBinaryFunction(descriptor:)

Synchronously creates a binary version of a GPU visible function or GPU intersection function.

## Declaration

```swift
func makeBinaryFunction(descriptor: MTL4BinaryFunctionDescriptor) throws -> any MTL4BinaryFunction
```

## Parameters

- `descriptor`: A configuration that tells the method which GPU function to make into a binary function and which options to apply when compiling it.

## Return Value

Return Value A new GPU binary function instance if the method succeeds; otherwise nil.
