pixi.js
    Preparing search index...

    Class RenderBundleAdvanced

    A recorded WebGPU render bundle, together with a stamp of the pipeline state it baked when it was recorded.

    Recording captures the render target permanently, in two ways:

    • the attachment state (color format(s), depth/stencil format, sample count). WebGPU validates this when the bundle is executed — replaying it in a pass whose attachments differ rejects the whole command buffer.
    • the front-face winding baked into every pipeline inside it. WebGPU does not validate this — replaying after the target's RenderTarget.flipY parity changed silently renders geometry inside out.

    RenderBundle.stateKey stamps both, so GpuEncoderSystem.isBundleValid can answer whether a cached bundle is still safe to replay against the target that is bound now.

    Created by GpuEncoderSystem.endBundle — there is no reason to construct one yourself.

    const record = () =>
    {
    encoder.beginBundle('my-cached-pass');
    encoder.draw({ geometry, shader });

    return encoder.endBundle();
    };

    // record once, then replay on later frames — re-recording whenever the target it baked
    // no longer matches the one bound now
    if (!encoder.isBundleValid(bundle)) bundle = record();
    encoder.executeBundle(bundle);
    Index

    Constructors

    Properties

    Constructors

    • Parameters

      • gpuBundle: GPURenderBundle

        The recorded native render bundle.

      • stateKey: number

        The pipeline state key captured when recording began.

      • Optionallabel: string

        Optional debug label for the bundle.

      Returns RenderBundle

    Properties

    gpuBundle: GPURenderBundle

    The recorded native bundle, as handed to GPURenderPassEncoder.executeBundles.

    label?: string

    Optional debug label — names the bundle in GPU captures and in WebGPU validation errors.

    stateKey: number

    The value PipelineSystem.bundleStateKey had when recording began. Comparing it against the pipeline's current key tells you whether this bundle still matches the bound render target — which is exactly what GpuEncoderSystem.isBundleValid does.