-
Notifications
You must be signed in to change notification settings - Fork 344
Description
Functions which don't have to be imported:
bitReverse()bitCount()any()all()dPdx()dPdy()
Functions which have to be imported:
abs()sqrt()max()normalize()length()distance()
As I understand it, the determination of which functions have to be imported is a reflection of common functionality between the OpenCL C Language and GLSL. For a developer writing their WGSL by hand, with either no background or a background in HLSL or MSL, this determination seems arbitrary and meaningless.
We should consider simply listing every function in the the WGSL standard library in the spec, and not requiring WGSL authors to import anything.
Another potential benefit is that it frees up the :: syntax which we may want to use in the future (e.g. to maybe perhaps one day add user-defined namespacing to the language).
Related: #600 "WGSL needs a plan for expansion"