backend

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: GPL-3.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package backend opens one of the platform's backends by name and builds the compute sources on it.

Index

Constants

View Source
const (
	Direct3D12 = "Direct3D 12"
	Vulkan     = "Vulkan"
	Metal      = "Metal"
)

The backends' names, as the renderer option and the overlay show them.

Variables

This section is empty.

Functions

func Names added in v1.2.0

func Names() []string

Names lists the backends this build can open on the platform, the platform's default first. A backend the build cannot run, such as Direct3D 12 in a Windows build without its compiled shaders, is not listed.

func Open

func Open(name string, parent hostgpu.Source, subs ...hostgpu.Source) (*hostgpu.Program, error)

Open opens the named backend (open) and builds the compute sources on it. A name Names does not list is ErrUnavailable. A build failure closes the device.

func Warm added in v1.2.0

func Warm()

Warm starts each listed backend's one-time process setup (warm) in the background and returns at once, so a backend's first Open does not wait for it, or waits only for what remains. A failure is not reported here: the backend's Open reports it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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