Acquire a transient texture matching desc. Reused from the pool when possible.
Acquire a transient buffer matching desc. Reused from the pool when possible.
Release every transient checked out since the last call. Persistent resources are unaffected. Called by the graph at the end of execute().
Get-or-create a bind group, cached by layout + entries. Subsequent calls
with the same layout and identical GPU resources return the same object.
The label in the descriptor is ignored for caching but forwarded to
the first creation for debugging.
Get-or-create a persistent texture identified by key. Subsequent calls
with the same key return the same physical texture. Requesting a key with
an incompatible descriptor is treated as a recreate (old texture destroyed).
Get-or-create a persistent buffer identified by key.
Get a view of texture matching viewDesc, cached by descriptor stringification.
The cache is automatically cleared when the texture is destroyed (WeakMap).
OptionalviewDesc: GPUTextureViewDescriptorDrop and destroy every pooled (non-checked-out, non-persistent) resource. Use after a canvas resize to reclaim now-wrong-sized textures.
Destroy a single persistent resource by key. No-op if not present.
Destroy every resource owned by the cache.
Pool of GPU textures and buffers keyed by descriptor. Survives graph compile/execute cycles so transient virtual resources can be backed by the same physical objects across frames without recreation, and so that persistent resources (shadow maps, TAA history, IBL data) live across graph rebuilds.
Pooling here is a straight free-list per descriptor hash. Lifetime-overlap memory aliasing is intentionally out of scope for the first cut.