ValidationLayers gets a list of validation layers available on the platform.
()
| 543 | |
| 544 | // ValidationLayers gets a list of validation layers available on the platform. |
| 545 | func ValidationLayers() (names []string, err error) { |
| 546 | defer CheckErr(&err) |
| 547 | |
| 548 | var count uint32 |
| 549 | ret := vk.EnumerateInstanceLayerProperties(&count, nil) |
| 550 | IfPanic(NewError(ret)) |
| 551 | list := make([]vk.LayerProperties, count) |
| 552 | ret = vk.EnumerateInstanceLayerProperties(&count, list) |
| 553 | IfPanic(NewError(ret)) |
| 554 | for _, layer := range list { |
| 555 | layer.Deref() |
| 556 | names = append(names, vk.ToString(layer.LayerName[:])) |
| 557 | } |
| 558 | return names, err |
| 559 | } |
| 560 | |
| 561 | // NoDisplayGPU Initializes the Vulkan GPU and returns that |
| 562 | // and the graphics GPU device, with given name, without connecting |