内置函数 Builtin functions 可以参考WGSL spec function 和其他语言的不同 if,while,switch,break-if逻辑表达式不需要括号 if a < 5 { doTheThing(); } 没有三元运算符 很多语言都有这个特性,condition ? trueExpression : falseExpression,但是WGSL中不支持,可以使用select let a = select(falseExpression, tru...
The WGSL spec. defines a language extension called readonly_and_readwrite_storage_textures, which we can and should support. Describe the solution you'd like Implement this feature from the spec. It's not required for adherence to the spec., but there is interesting code in the wild (i....
In gpuweb/gpuweb#4838, a bunch of names are going to change in the spec that do not affect JS, but that do appear in bindings for languages like C and Rust. wgpu should probably add type aliases, at least, for these new names, so that pe...
layout(location=0)outvec4frag_color;layout(set=0,binding=0)uniformUniformParams{mat4mvp_matrix;ve...
The WebGPU spec example, https://www.w3.org/TR/webgpu/#typedefdef-gpupipelineconstantvalue, uses the @override attribute for override constants. The WGSL spec example, https://www.w3.org/TR/WGSL/#override-declaration, uses @id(0) overrid...
MM: DG had similar thoughts. Grammar distinguishes between type constructors and function calls. Doesn't have to be true. Adds a bit of complexity to grammar and spec but doesn't necessarily add implementation complexity. KG:smallest(a: T) -> T ...
See spec draft here: imports. Several other WGSL enhancements are on the roadmap. Tools We'll build and promote tools to support community standard WGSL. Linking - Tools to bundle WESL files together while translating WESL into vanilla W3C WGSL. Test Cases - A collection of examples to ...
Only 16 formats can be used for storage textures. See https://gpuweb.github.io/gpuweb/#plain-color-formats The WGSL spec should not describe texel formats other than those. This is already a TODO in the spec: TODO(dneto): Eliminate the i...
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 ...
A portable and modular superset of WGSL . Contribute to wgsl-tooling-wg/wesl-spec development by creating an account on GitHub.