v.pass()
v.pass() connects a Kernel to its data.
const node = v.pass(kernel, { input, output, multiplier});It does not submit GPU work by itself. It prepares work that can be executed later with v.run() or v.wait().
The returned value is a node.
Signature
Section titled “Signature”const node = v.pass(kernel, bindings, options);| Argument | Meaning |
|---|---|
kernel | A Kernel instance |
bindings | Buffer, RawBuffer, Uniform, or Handle values |
options | Optional pass-level overrides |
Pass Options
Section titled “Pass Options”const node = v.pass(kernel, { input, output }, { label: 'scale pass', threads: input.count});threads overrides the kernel’s thread configuration for this pass.
label gives the node a readable name in debug output and browser GPU tools.
debug enables shader debugging for this pass.
const node = v.pass(kernel, { input, output }, { debug: true});What v.pass() Does
Section titled “What v.pass() Does”When you call v.pass(), Volten:
- validates the kernel and bindings
- resolves thread bounds and dispatch size
- generates WGSL bindings
- assembles the final shader
- creates or reuses a compute pipeline
- returns a runnable node