Help us shape the future of Go! Take the 2026 Go Developer Survey

allbackends

package
v0.34.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

Package allbackends imports all HAL backend implementations.

Import this package for side effects to register all available backends:

import (
	_ "github.com/gogpu/wgpu/hal/allbackends"
)

This will register:

  • Vulkan backend (Windows, Linux, macOS; Android/arm64 preview)
  • Metal backend (macOS, iOS)
  • DX12 backend (Windows)
  • OpenGL ES backend (Windows, Linux)
  • Software backend (all supported native platforms)

After importing, use hal.GetBackend or hal.SelectBestBackend to access backends.

Build tags control which backends are available:

  • Desktop: platform GPU backends plus software fallback
  • Android/arm64: Vulkan only

The no-op provider is not registered by this package. Import github.com/gogpu/wgpu/hal/noop explicitly when it is required for tests.

Example usage:

import (
	_ "github.com/gogpu/wgpu/hal/allbackends"
	"github.com/gogpu/wgpu/core"
)

func main() {
	// Instance will now enumerate real GPUs
	instance := core.NewInstance(nil)
	adapters := instance.EnumerateAdapters()
	for _, a := range adapters {
		fmt.Println(a) // Real GPU adapters
	}
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL