Open mighdoll opened 4 hours ago
My thoughts around this were that either generics or the wesl manifest file could specify a binding offset for libs and the libs could specify a range so you can calculate the next offset?
one approach suggested elsewhere is to expect packages to use names for the indices, e.g.
@group(FooGroup) @binding(FooBinding) var<storage, read> src: array<f32>;
And then the binding problem becomes similar to other known problems we expect to solve for host visible names in packages (entry points, overrides).
It's pretty clear that we don't want to a wesl utility package published on npm/cargo to write:
because the package is in no position to know what group and binding indices to use. The application wesl or even better the application host code is in a better position to provide the binding numbers.
So what should users write for bound variables in packages?