Skip to content

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.

const node = v.pass(kernel, bindings, options);
ArgumentMeaning
kernelA Kernel instance
bindingsBuffer, RawBuffer, Uniform, or Handle values
optionsOptional pass-level overrides
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
});

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