Function

MTLCopyAllDevices()

Returns an array of references to all Metal device objects in the system.

Declaration

func MTLCopyAllDevices() -> [MTLDevice]

Return Value

An array of device objects that support Metal framework commands.

See Also

Acquiring Device Objects

func MTLCreateSystemDefaultDevice() -> MTLDevice?

Returns a reference to the preferred default Metal device object.

func MTLCopyAllDevicesWithObserver(handler: MTLDeviceNotificationHandler) -> (devices: [MTLDevice], observer: NSObject)

Fetches the available Metal devices and registers a notification observer for changes to the list.

func MTLRemoveDeviceObserver(NSObjectProtocol)

Removes a registered observer of device notifications.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software