import type { GpuContext } from "./types.js"; /** * Attachment formats a bundle is recorded against — a plain * GPURenderBundleEncoderDescriptor. Use `ctx.format` in `colorFormats` (and * `ctx.depthStencilFormat`) when the bundle targets the canvas. */ export type RenderBundleFormats = GPURenderBundleEncoderDescriptor; /** * Record a reusable render bundle. The callback receives a * GPURenderBundleEncoder supporting setPipeline/setBindGroup/draw calls; * executing the finished bundle replays them with near-zero CPU cost. * * Use `ctx.format`/`ctx.depthStencilFormat` when the bundle targets the canvas. * * ```js * const bundle = gpu.createRenderBundle( * ctx, * { * colorFormats: [ctx.format], * depthStencilFormat: ctx.depthStencilFormat, * }, * (encoder) => { * encoder.setPipeline(pipeline); * // ... * encoder.drawIndexed(count); * }, * ); * // later, inside a matching render pass: * pass.executeBundles([bundle]); * ``` */ export declare function createRenderBundle(ctx: GpuContext, formats: RenderBundleFormats, record: (encoder: GPURenderBundleEncoder) => void): GPURenderBundle; //# sourceMappingURL=bundle.d.ts.map