Documentation
    Preparing search index...

    Class WgpuComputeCache

    Per-device store of compute pipelines, layouts and modules (§82) — the compute half of WgpuPipelineCache, kept separate so the frame path never links it: the renderer creates one lazily on the first compute() call (the lazy-subsystem precedent), and drops it whole on device loss and disposal (nothing here has a destroy(); dropping the maps is the release, the render cache's §83 reading).

    Index
    • get disposed(): boolean

      Whether WgpuComputeCache.dispose has run.

      Returns boolean

    • get moduleCount(): number

      How many WGSL modules have been compiled. Diagnostics and tests.

      Returns number

    • get pipelineCount(): number

      How many distinct compute pipelines have been created. Diagnostics and tests.

      Returns number

    • Records and submits one §82 dispatch.

      Returns false — having recorded nothing — when the device surface lacks the compute entry points (createComputePipeline, beginComputePass); the caller turns that into UNSUPPORTED_GPU_FEATURE. Throws INVALID_APPLICATION_STATE for a descriptor this module refuses: a workgroup count that is not a non-negative integer, a disposed buffer in bindings, or a call on a disposed cache.

      Parameters

      Returns boolean

    • Drops every pipeline, layout and module. Nothing is destroyed — WebGPU compute pipelines and modules have no destroy() (§83, the render cache's rule). Idempotent.

      Returns void