wgsl-tooling-wg / wesl-spec

A set of well-specified language extensions and tools for WGSL
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

overrides in packages #43

Open mighdoll opened 16 hours ago

mighdoll commented 16 hours ago

We want packages to be able to write overrides in some form.

But packages aren't in a good position to choose unique application wide names for overrides or to decide which overrides are needed for a particular application.

Instead, the application wesl should select which imported package overrides to expose to the host as part of the application, and have the ability to rename package overrides. A package that imports other packages should have similar controls.

Should application packages write override or use some other syntax? How should application wesl and package wesl select and optionally rename the overrides from imported packages?

mighdoll commented 4 hours ago

Similarly to #41, what happens to package overrides that are not selected by the app wesl? What if package overrides are not selected by the app wesl, but are indirectly referenced by a package function that is imported by the app wesl?

I'd suggest: