@motion-core/motion-gpu
Version:
Framework-agnostic WebGPU runtime for fullscreen WGSL shaders with explicit Svelte, React, and Vue adapter entrypoints.
37 lines • 1.54 kB
TypeScript
/// <reference types="@webgpu/types" />
import type { StorageBufferDefinition, StorageBufferDefinitionMap } from './types.js';
/**
* Storage-compatible texture formats for `texture_storage_2d`.
*/
export declare const STORAGE_TEXTURE_FORMATS: ReadonlySet<GPUTextureFormat>;
/**
* Validates a single storage buffer definition.
*
* @param name - Buffer identifier.
* @param definition - Storage buffer definition to validate.
* @throws {Error} When any field is invalid.
*/
export declare function assertStorageBufferDefinition(name: string, definition: StorageBufferDefinition): void;
/**
* Validates and returns sorted storage buffer keys.
*
* @param definitions - Storage buffer definition map.
* @returns Lexicographically sorted buffer keys.
*/
export declare function resolveStorageBufferKeys(definitions: StorageBufferDefinitionMap): string[];
/**
* Normalizes a storage buffer definition with defaults applied.
*
* @param definition - Raw definition.
* @returns Normalized definition with access default.
*/
export declare function normalizeStorageBufferDefinition(definition: StorageBufferDefinition): Required<Pick<StorageBufferDefinition, 'size' | 'type' | 'access'>>;
/**
* Validates that a texture format is storage-compatible.
*
* @param name - Texture identifier.
* @param format - GPU texture format.
* @throws {Error} When format is not storage-compatible.
*/
export declare function assertStorageTextureFormat(name: string, format: GPUTextureFormat): void;
//# sourceMappingURL=storage-buffers.d.ts.map