Group 1's bind-group layout (wgpu-bindings.ts), created on first use.
Lazy, and the laziness is the point: a createBindGroupLayout in
initialize would put one more call into every recorded transcript in this
repository, including those of applications that never draw a texture —
R-30b's lazy-query law, which is about not moving what nothing asked to
move. The pipeline cache reaches this through the provider the renderer
hands it, so the layout a textured pipeline is built against and the layout
its bind group is created against are the same object by construction.
Returns the same object for the life of the cache; forget() and
dispose() drop it.
Bytes the resident textures describe — see the module header on §84.
Whether WgpuTextureCache.dispose has run.
Number of distinct samplers created (§77).
The measurable form of this module's central claim: a scene whose fifty textures all sample the same way holds one sampler, not fifty.
Number of textures currently uploaded. Diagnostics and tests (§83, §84).
Returns the bind group for texture, uploading it on first use and
re-uploading whenever texture.version has advanced.
Returns null — and creates no entry — when the texture has been disposed
or once the cache is disposed, so the draw is skipped rather than painting
undefined content (§83). Never throws: this runs inside
Renderer.render, and §61 forbids throwing there.
Pre-upload and resolve only after the device queue completes that work.
Destroys every texture this cache created (§83). Idempotent.
Only the textures: samplers, bind groups, layouts and pipelines have no
destroy() in WebGPU — they are released when the last reference goes away
— so dropping the maps is their release, exactly as it is in
wgpu-pipeline-cache.ts. The application's Texture objects are
untouched: the renderer did not create them, so it does not dispose them.
Drops every record, sampler and pipeline without destroying anything — the device-loss path (§61). The allocations belong to a device that no longer exists.
Submitted-version residency; async preparation exposes work still in flight.
Per-device store of uploaded textures and their samplers (§77, §61, §83).
One cache belongs to one device; the renderer builds it during
initialize— which allocates nothing, so a frame that draws no texture costs exactly what it did before this packet — and drops it whole on device loss.