import type { BundleCommand, ComputeCommand, ComputePipeline, RenderCommand, GpuContext, RenderPipeline } from "./types.js"; /** * Whether a pipeline object failed: its shader couldn't be reflected, or one of * its GPU pipelines failed validation. Submits using it are skipped, so a * fallback needs a new pipeline object. Validation failures are known * asynchronously, after the first submits. */ export declare function pipelineFailed(ctx: GpuContext, pipeline: RenderPipeline | ComputePipeline): boolean; /** * Submit a command: a render command (one or more draws, or a pass-only clear), * a compute dispatch, or render bundles. * * With no {@link beginFrame}/{@link endFrame} segment open, opens and submits one * for just this call — no ceremony needed for one-off submits. Wrap multiple * calls in an explicit segment to share one command buffer and uniform flush * instead of paying per call. * * ```js * // single draw (opens and closes its own render pass) * gpu.submit(ctx, { pass, pipeline, attributes, indices, uniforms }); * * // pass scope: nested submits render into the same pass * gpu.submit(ctx, { pass }, () => { * gpu.submit(ctx, drawCmd); * gpu.submit(ctx, otherDrawCmd); * }); * * // batch: draw variants of a command inside one pass * gpu.submit(ctx, drawCmd, [ * { uniforms: { model: a } }, * { uniforms: { model: b } }, * ]); * * // pass only: an empty pass clears its attachments * gpu.submit(ctx, { pass: { clearValue: [0, 0, 0, 1] } }); * * // compute * gpu.submit(ctx, { pipeline: { compute }, uniforms, dispatch: [64] }); * * // compute batch: dispatch variants inside one compute pass * gpu.submit(ctx, simulateCmd, [ * { uniforms: { step: a } }, * { uniforms: { step: b } }, * ]); * * // compute pass scope: nested compute submits dispatch into the same pass * gpu.submit(ctx, simulateCmd, () => { * gpu.submit(ctx, diffuseCmd); * }); * ``` */ export declare function submit(ctx: GpuContext, cmd: RenderCommand, passScopeOrBatch?: (() => void) | Partial[]): void; /** * Compute commands batch dispatch variants into one compute pass, or keep it * open with a pass scope callback for nested compute submits. */ export declare function submit(ctx: GpuContext, cmd: ComputeCommand, passScopeOrBatch?: (() => void) | Partial[]): void; /** * Bundle commands replay pre-recorded bundles; a pass scope callback keeps * their pass open for nested submits. */ export declare function submit(ctx: GpuContext, cmd: BundleCommand, passScope?: () => void): void; //# sourceMappingURL=submit.d.ts.map