import type { ShaderReflection } from "./types.js"; /** Normalize predeclared aliases: vec3f → vec3, mat4x4f → mat4x4, … */ export declare function normalizeType(type: string): string; /** * Which layout rules a struct is measured under. The uniform address space * rounds array strides and nested struct alignments up to 16; storage uses * natural alignment throughout. The same struct bound both ways genuinely has * two different layouts, which is why every layout here is keyed by space as * well as by name — packing a storage struct under the uniform rules writes * every member at the wrong offset, and nothing downstream can detect it. */ export type LayoutSpace = "uniform" | "storage"; export declare const layoutKey: (space: LayoutSpace, name: string) => string; /** * Parse a WGSL source string into a {@link ShaderReflection}. Results are cached * by source identity: parsing the same string twice is free. */ export declare function parseWGSL(source: string): ShaderReflection; /** * {@link parseWGSL} accounted against a device's `shaderReflections` cache * counters — what the package itself calls, so the cost of reflecting a new * shader is visible next to compiling one. `parseWGSL` stays device-free: * reflection is pure and runs outside a WebGPU host. */ export declare function reflectWGSL(device: GPUDevice, source: string): ShaderReflection; /** * The reflection for one pipeline's stages: {@link reflectWGSL} per source plus * {@link mergeReflections} when they differ, charged to the device's * `shaderReflections` counters as a single access. The merge is not cached and * runs per pipeline, so it belongs in the same number as the parses it joins. */ export declare function reflectStages(device: GPUDevice, vertex: string, fragment?: string): ShaderReflection; /** * Merge reflections of separate vertex/fragment sources: bindings sharing a * group/binding slot are unified with combined stage visibility. */ export declare function mergeReflections(a: ShaderReflection, b: ShaderReflection): ShaderReflection; //# sourceMappingURL=reflection.d.ts.map