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

Function DeviceExts

vgpu/gpu.go:528–542  ·  view source on GitHub ↗

DeviceExts gets a list of instance extensions available on the provided physical device.

(gpu vk.PhysicalDevice)

Source from the content-addressed store, hash-verified

526
527// DeviceExts gets a list of instance extensions available on the provided physical device.
528func 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.
545func ValidationLayers() (names []string, err error) {

Callers 1

ConfigMethod · 0.85

Calls 3

CheckErrFunction · 0.85
IfPanicFunction · 0.85
NewErrorFunction · 0.85

Tested by

no test coverage detected