Documentation
    Preparing search index...

    Class WgpuPipelineCache

    Per-device store of compiled pipelines, WGSL modules and the shared pipeline layout.

    Owned by the renderer, dropped whole on device loss (§61's "re-create engine-owned GPU resources" — a lost device's pipelines are already invalid, and there is nothing to release on a device that no longer exists).

    Index
    • Parameters

      • device: GpuDevice
      • bindGroupLayout: object
      • OptionaltextureLayout: () => object
      • OptionalspriteLayout: () => object
      • OptionallightsLayout: () => object
      • OptionalstandardLayout: () => object
      • OptionaleffectLayout: () => object
      • OptionalshadowLightsLayout: () => object
      • OptionalparticleLayout: () => object

      Returns WgpuPipelineCache

    • Returns the pipeline for descriptor, creating it on first use.

      Returns null — and caches nothing — once disposed, so a draw racing teardown skips rather than resurrecting the cache. Never throws: this runs inside Renderer.render (see the module header).

      Parameters

      Returns object | null

    • Drops every pipeline and module.

      Nothing is destroyed: WebGPU pipelines and shader modules have no destroy() — they are released when the last reference to them and to the device goes away — so dropping the maps is the release (§83). Idempotent.

      Returns void