* [glsl-out] Add built-in functions to keywords
Fixes#2276 and part of #2366.
* add a few more keywords and document where they come from
---------
Co-authored-by: teoxoy <28601907+teoxoy@users.noreply.github.com>
In `src/valid/expresion.rs`, use the full path `std::ops::Index` when
implementing the trait on `ExpressionTypeResolver`. This
implementation is `#[cfg(feature = "validate")]`, so the `use`
directive becomes unnecessary when that feature is not enabled,
triggering warnings.
Re-implement `naga` development workflows using [`cargo xtask`]. Convert
`make` logic and shader test configuration as file with Bash variables
into an `xtask` crate and YAML files, respectively.
Pros:
* We now have a _portable_ workflow everywhere, which means Windows
folks and people who don't install `make` don't have to suffer.
😮💨
* Workflow logic is now relatively easy to inspect and change. Whew!
💁🏻♂️💦
* Contributors can use their existing Rust knowledge to contribute to
developer experience. 🎉
* `cargo xtask` is a relatively well-known convention for workflows in
the ecosystem.
* We can do fancy things like allow folks to run at different log levels
for workflows, depending on their tastes.
Cons:
* There's now a non-trivial compile step to project workflow.
Incremental rebuilds seem to be pretty short, though!
* Code is much more verbose than the (very) terse `make` implementation.
[`cargo xtask`]: https://github.com/matklad/cargo-xtask
There are a few keywords like "pass" in HLSL that are actually case-insensitive for FXC. This can be disabled with strict mode, but even if you do that FXC will continue to give an error if you try to use them in identifiers (at all, with any casing).
This changes the namer code to escape these keywords even if the casing is different.
If you're wondering where I got the list from: I looked at the list of strings in D3DCompiler_47.dll.