DeviceExts gets a list of instance extensions available on the provided physical device.
(gpu vk.PhysicalDevice)
| 526 | |
| 527 | // DeviceExts gets a list of instance extensions available on the provided physical device. |
| 528 | func DeviceExts(gpu vk.PhysicalDevice) (names []string, err error) { |
| 529 | defer CheckErr(&err) |
| 530 | |
| 531 | var count uint32 |
| 532 | ret := vk.EnumerateDeviceExtensionProperties(gpu, "", &count, nil) |
| 533 | IfPanic(NewError(ret)) |
| 534 | list := make([]vk.ExtensionProperties, count) |
| 535 | ret = vk.EnumerateDeviceExtensionProperties(gpu, "", &count, list) |
| 536 | IfPanic(NewError(ret)) |
| 537 | for _, ext := range list { |
| 538 | ext.Deref() |
| 539 | names = append(names, vk.ToString(ext.ExtensionName[:])) |
| 540 | } |
| 541 | return names, err |
| 542 | } |
| 543 | |
| 544 | // ValidationLayers gets a list of validation layers available on the platform. |
| 545 | func ValidationLayers() (names []string, err error) { |