* [spv-in] New two pass parser based
* [spv-in] Allow expressions defined in dominant block in different scopes
* Make the patch non breaking
* [spv-in] Allow scope transfers in phi instructions
* [spv-in] Remove unused stuff
* [spv-in] Handle switch merges as breaks
* Remove no longer needed stuff
* Revert some changes to prepare to merge
* Remove dead code
* Don't spill into local if in scope
* [spv-in] Documentation, comments, some renaming for clarity.
* Address comments
Co-authored-by: Jim Blandy <jimb@red-bean.com>
* Implement lexing for all WGSL number literal types
* Move number literal test cases
* Adjust tests to match WGSL spec on number literals
Suffixes are not type names and currently only a plain `u` is supported
for uints. More specifically, `i` and `f` suffixes or suffixes with
widths in bits like `u32` are not supported at the moment.
* Add more tests for invalid number literal suffixes
* Replace code too new for Rust 1.43
* Implement parsing for hexadecimal integers
* Switch to enum number types, and Bytes for width
* Check for negative and leading zeros in int literals
* Implement parsing of hex floats with hexf-parse
* Update error message tests
* Update snapshot test output files
* Clean up lexer state machine code
* Clean up unexpected token error code
* Move number literal parsing to own submodule
* Proof of concept for "span" feature, with WGSL parsing augmented.
* Review:
1) add_span was actually a bad idea, make it set_span and add
set_span_if_unknown too.
2) panics on getting/setting span for invalid handles.
3) only set span for constants with a name
4) don't overwrite spans for types.
* Added spans to blocks & more expressions getting spans in frontends.
Definitely the shotgunny type of commit, but what can you do. The design
I went with made spans mandatory to specify, so I had to go and wire
them through wherever I could.
* Moved Block to a separate module, +clippy
* More spans for types in GLSL.
* Remove pointless body method.
* Make Arena interface require spans.
Another shotgun commit, oh boy...
* Fix tests.
My loathsome habit to "quickly fix things along the way" made a lot of
extra work for me here, having to fix my "fixes" for WGSL parser.
* Rustfmt + clippy.
* Fix compile-errors with span feature enabled.
* Nuked set_span* from orbit. Deleting code feels great!
* Code review - move feature flags inside functions.
* Fix build with "deserialize" feature enabled.
Naga is now a workspace with `naga` and `cli` as its two members. The default
package for cargo commands is `cli`, so that `cargo run` will just run the CLI.
However, this has a few unexpected consequences:
- Now `cargo test` will just try to run `cli`'s tests, of which there are none.
Adding `"."` to the `default-members` list in the workspace's `Cargo.toml`
seems to fix this, without breaking `cargo run`.
- Even with `"."` added to `default-members`, `cargo test` will build `naga` by
default with the features requested for it in `cli/Cargo.toml`: all the front
and back ends, but no `serialize` or `deserialize`. This means that our CI job
meant to verify no-feature builds isn't doing that job any more. We need to
pass `--package naga` to `cargo test` to make it test naga directly.
Moved the global writing part to it's own function
Merged the texture and the global loop
Applied some suggestions from kvark
Added a topological sorting of the call graph before writing
Removed the struct block loop and now every struct is written
Organized the main backend file a bit
The backend now works in a similar way to the msl backend
Should require less loops, allocations and backtracking
Overall just better to work with it
Added a build script which reads a file with the glsl keywords and
generates a slice to be used in the Namer
Added a way to build a call graph
format
major refactor
Change spirv to spirv_headers
Remove files
First translation to naga + format
Fix Int Constant error
Don't add unnecessary blocks.
Some cleanups
format
remove constructs
docs
fix debug leftovers
format, clippy
satisfy clippy
* Add serialize and deserialize features with examples
* Fix formatting
* Make some types (de)serialize transparently
* Fix more formatting
* Remove new examples and add (de)serialization support to the convert example
* Remove extraneous file
* Rename param file
* Initial backend implementation
* Refractored glsl450 backend to have a common module between further glsl backends
Implemented more missing functionality
* Error handling
* Implemented most of the suggestions
* Addresed all comments
Fixed some bugs
* Made code style consistent