spirv

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: GPL-3.0 Imports: 4 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

Index

Constants

View Source
const (
	ThreadBaseWord = 5
	PushWords      = 6
)

The push block, a contract between the shell and the vulkan device alone: the dispatch record's five words, then ThreadBaseWord, the first thread of a piece of a split index or span dispatch, zero for an unsplit one. PushWords is the fixed part's count. The word counts of an entry with a variable-length buffer follow, one per data buffer binding.

View Source
const GroupWorkgroup = 128

GroupWorkgroup is a group entry's workgroup width, the unit the Vulkan backend widens a group row in (GroupThreads).

Variables

This section is empty.

Functions

This section is empty.

Types

type EntryPoint

type EntryPoint struct {
	Buffers       []compile.BufferBinding
	ParamsBinding int
	Workgroup     [2]int
	Group         bool
	BufferLengths bool
	PushSize      int
	Code          []uint32
}

EntryPoint describes one emitted entry point, at the index of the module's entry it emits: the buffer bindings in order, the params binding (-1 when the entry takes none), the workgroup, whether the entry is a group entry, whose grid the host never splits, whether the push block carries word counts, the push block's size in bytes, and the module. The module's entry point is named main.

type Output

type Output struct {
	Entries []EntryPoint
}

Output is one module per entry point.

func Emit

func Emit(m *compile.Module) (*Output, error)

Emit lowers every entry point of the module to its own SPIR-V module holding the functions the entry reaches.

Jump to

Keyboard shortcuts

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