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

Function InstanceExts

vgpu/gpu.go:511–525  ·  view source on GitHub ↗

InstanceExts gets a list of instance extensions available on the platform.

()

Source from the content-addressed store, hash-verified

509
510// InstanceExts gets a list of instance extensions available on the platform.
511func InstanceExts() (names []string, err error) {
512 defer CheckErr(&err)
513
514 var count uint32
515 ret := vk.EnumerateInstanceExtensionProperties("", &count, nil)
516 IfPanic(NewError(ret))
517 list := make([]vk.ExtensionProperties, count)
518 ret = vk.EnumerateInstanceExtensionProperties("", &count, list)
519 IfPanic(NewError(ret))
520 for _, ext := range list {
521 ext.Deref()
522 names = append(names, vk.ToString(ext.ExtensionName[:]))
523 }
524 return names, err
525}
526
527// DeviceExts gets a list of instance extensions available on the provided physical device.
528func DeviceExts(gpu vk.PhysicalDevice) (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