internal/graphicsdriver/metal/mtl/mtl.go
func CreateSystemDefaultDevice() (Device, error) {
	d := C.CreateSystemDefaultDevice()
	if d.Device == nil {
		return Device{}, errors.New("Metal is not supported on this system")
	}

	return Device{
		device:   d.Device,
		Headless: d.Headless != 0,
		LowPower: d.LowPower != 0,
		Name:     C.GoString(d.Name),
	}, nil
}
func CreateSystemDefaultDevice() (Device, error) {
	d := C.CreateSystemDefaultDevice()
	if d.Device == nil {
		return Device{}, errors.New("Metal is not supported on this system")
	}

	return Device{
		device:   d.Device,
		Headless: d.Headless != 0,
		LowPower: d.LowPower != 0,
		Name:     C.GoString(d.Name),
	}, nil
}
// CreateSystemDefaultDevice returns the preferred system default Metal device.
//
// Reference: https://developer.apple.com/documentation/metal/1433401-mtlcreatesystemdefaultdevice.