export class WebGPUPipelineCache {
    cache = new Map();
    getOrCreate(key, create) {
        const existing = this.cache.get(key);
        if (existing !== undefined)
            return existing;
        const value = create();
        this.cache.set(key, value);
        return value;
    }
    clear() {
        this.cache.clear();
    }
}
//# sourceMappingURL=WebGPUPipelineCache.js.map