MCPcopy Create free account
hub / github.com/cogentcore/core / ValidationLayers

Function ValidationLayers

vgpu/gpu.go:545–559  ·  view source on GitHub ↗

ValidationLayers gets a list of validation layers available on the platform.

()

Source from the content-addressed store, hash-verified

543
544// ValidationLayers gets a list of validation layers available on the platform.
545func 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

Callers 1

ConfigMethod · 0.85

Calls 3

CheckErrFunction · 0.85
IfPanicFunction · 0.85
NewErrorFunction · 0.85

Tested by

no test coverage detected