Skip to content

Commit e2a58aa

Browse files
committed
feat: add nterval-wgsl compilation target
1 parent c1aea53 commit e2a58aa

8 files changed

Lines changed: 1660 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,12 @@ ce.simplificationRules.push({
414414
- `@vertex`/`@fragment`/`@compute` entry points with struct-based I/O
415415
- `@group`/`@binding` uniform declarations and `@workgroup_size` for compute
416416

417+
- **Interval WGSL Compilation Target**: New `interval-wgsl` target for interval
418+
arithmetic in WebGPU shaders, mirroring the existing `interval-glsl` target.
419+
Since WGSL does not support function overloading, the library uses `_v`
420+
suffixes for internal vec2f-parameter implementations (e.g., `ia_add_v`),
421+
while the public API (`ia_add`, `ia_sin`, etc.) takes `IntervalResult` values.
422+
417423
### Bug Fixes
418424

419425
- **`Sequence` type inference now returns a proper tuple type**: Multi-argument

src/compute-engine.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export { WGSLTarget } from './compute-engine/compilation/wgsl-target';
2929
export { PythonTarget } from './compute-engine/compilation/python-target';
3030
export { IntervalJavaScriptTarget } from './compute-engine/compilation/interval-javascript-target';
3131
export { IntervalGLSLTarget } from './compute-engine/compilation/interval-glsl-target';
32+
export { IntervalWGSLTarget } from './compute-engine/compilation/interval-wgsl-target';
3233
export { BaseCompiler } from './compute-engine/compilation/base-compiler';
3334

3435
// Free functions backed by a lazily-instantiated global engine

src/compute-engine/compilation/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export * from './wgsl-target';
88
export * from './python-target';
99
export * from './interval-javascript-target';
1010
export * from './interval-glsl-target';
11+
export * from './interval-wgsl-target';
1112

1213
// Legacy exports for backward compatibility
1314
export { BaseCompiler as compile } from './base-compiler';

0 commit comments

Comments
 (0)