Commit Graph

53 Commits

Author SHA1 Message Date
Matúš Talčík
0960d1162f [spv-in] multiple improvements
- added constructs
- added loop detection
- some logic from Tint borrowed for selection constructs
2021-05-06 10:49:09 -04:00
Dzmitry Malyshau
93e57ffcf2
Another CHANGELOG update for v0.4 (#796) 2021-04-29 00:52:43 -04:00
Dzmitry Malyshau
74f0a153cb Rename the binary to just naga 2021-04-23 20:14:16 -04:00
Igor Shaposhnik
c1675d06f9
Start wgsl-out (#727) 2021-04-19 00:23:27 -04:00
Dzmitry Malyshau
c2c93e4ecd Remove cargo-insta 2021-04-14 16:10:31 -04:00
Timo de Kort
5d487941b2
Start hlsl-out (#408)
* Add hlsl-out feature

* Integrate hlsl-out with snapshots

* Add snapshot
2021-04-11 11:36:26 -04:00
Dzmitry Malyshau
62fe72be2e Enable all features for the docs 2021-04-01 10:26:00 -04:00
Dzmitry Malyshau
dd823a4b84 Enforce pointer semantics at the type level. 2021-03-06 11:01:14 -05:00
Dzmitry Malyshau
3fcc0759ed GraphViz backend 2021-03-03 21:20:12 -05:00
Dzmitry Malyshau
69bf7f5f17 Miscellaneous fixes 2021-03-01 09:35:29 -05:00
Joshua Groves
bb7105387d [wgsl-in] Use codespan to report errors 2021-02-28 00:07:37 -05:00
Dzmitry Malyshau
afbcf05006 Move the convert from an example to a binary target 2021-02-25 10:05:21 -05:00
Pelle Johnsen
51cbd4c112
[glsl-in] Add initial support for glslpp-rs (#513)
* [glsl-in] Add initial support for glslpp-rs

* [glsl-in] Add remaining Punct mappings

Fix some tests.

* [glsl-in] Add basic error handling for glslpp-rs

* [glsl-in] Fix clippy issues

* [glsl.in] Add pp-rs floats

* [glsl-in] Remove old lex and preprocessor

* [glsl-in] Improve lexer token code

* [glsl-in] Rename lex_pp > lex

Also LexerPP > Lexer

* [glsl-in] glslpp-rs review feedback

* [glsl-in] Use rev for pp-rs dep

* [glsl-in] Parse on lexer err
2021-02-24 12:07:09 -05:00
Dzmitry Malyshau
91a1f581e0 Fix insta dependency to 1.5.2 2021-02-15 11:13:11 -05:00
Dzmitry Malyshau
537a516ff5 Version bump to 0.3.1 2021-01-31 18:27:08 -05:00
Dzmitry Malyshau
40974d503c Bump version to 0.3 and update changelog 2021-01-30 11:48:37 -05:00
Dzmitry Malyshau
dc98305bb8 Print out detailed WGSL errors 2021-01-28 01:22:10 -05:00
Dzmitry Malyshau
08b6c416a3 Unlock arbitrary binding indices in the validator 2021-01-09 20:59:51 -05:00
Joshua Groves
9a625a570e Add insta prototype 2020-12-10 00:24:07 -05:00
Dzmitry Malyshau
148fac0601 [spv] enable quad conversion test, refactor binary operations 2020-12-08 09:25:59 -05:00
Capucho
bc0d876422 [glsl-out] Backend cleanup
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
2020-11-22 14:45:12 -05:00
Capucho
dd5021234d [glsl-out] Reworked the backend
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
2020-11-22 14:45:12 -05:00
Dzmitry Malyshau
621af3cbcb
Bump thiserror to 1.0.21 (#241) 2020-10-20 14:44:56 -04:00
Dzmitry Malyshau
d6cc17f051 Refactor feature names 2020-09-15 07:51:45 -04:00
Dzmitry Malyshau
b278e10ea7
[spirv-in] make pointers totally transparent (#187) 2020-09-11 12:19:55 -04:00
Pelle Johnsen
2ea0310b63
[glsl] Promote glsl-new to glsl (#184)
* [glsl] Promote glsl-new to glsl

* [glsl-in] rename feature glsl > glsl-in
2020-09-10 01:11:52 -04:00
Dzmitry Malyshau
1b17030d05
Split wgsl into sub-modules, and gate by a feature (#165) 2020-08-27 23:30:53 -04:00
Dzmitry Malyshau
4797773152
Image IR refactor (#153) 2020-08-26 13:26:51 -04:00
Pelle Johnsen
92c1ffb588
Add initial Rosetta testing (#148)
* Add initial Rosetta testing

* Make rosetta tests run as part of cargo test

* Fix rosetta test failure
2020-08-24 00:09:37 -04:00
Matus Talcik
c12c9a9fac
init control flow graph (#122)
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
2020-08-23 23:14:51 -04:00
Dzmitry Malyshau
50cd2b1bc2 Bump version to 0.2, add changelog 2020-08-16 23:49:48 -04:00
Pelle Johnsen
7f780e8efc
[glsl-new] put validation errors behind featureUsing glsl-validate feature (#127) 2020-08-13 16:27:12 -04:00
Lachlan Sneff
466cd1b728
Serialize and Deserialize Module (#125)
* 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
2020-08-13 12:27:10 -04:00
João Capucho
a16204456e
WIP: glsl 450 backend and common glsl module (#123)
* 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
2020-08-11 16:20:23 -04:00
Dzmitry Malyshau
4a769c10b5 [spv] remove the pointer indirection to variables 2020-07-05 09:33:07 -04:00
Pelle Johnsen
7d5bc0b2e2 Make glsl dep more specific
- Require 4.1 as 4.0 now gives compile errors
2020-07-02 00:20:00 -04:00
Kristoffer Søholm
1f5008f673 Refactor error handling in GLSL frontend 2020-06-30 18:56:58 -04:00
Pelle Johnsen
6f0f551bac
New GLSL frontend using pomelo (#87)
* Add initial pomelo glsl work

* Fix ref to glsl_old

* Fix idents with numbers in lexer

* Use glsl_new for .vert in convert example

Controlled by PREFER_GLSL_NEW=1 env var

Also add simple test files

* Start making parser look like spec

* Port 'old' lex.rs to glsl_new

* Apply fixes after rebasing

* Fix clippy issue

* Fix PR comments

- Make into optional feature glsl-new

- Minor code style improvements
2020-06-30 10:42:50 -04:00
Dzmitry Malyshau
e0a1e80fb5 Remove spirv-headers use from IR, make it optional 2020-06-25 00:37:33 -04:00
Dzmitry Malyshau
70054b7693 Relicense under MIT+Apache2 2020-06-21 16:59:16 -04:00
Dzmitry Malyshau
89d2afa11b
Comparison sampler API (#66) 2020-06-16 14:55:40 -04:00
João Capucho
b91b9ca987
Glsl frontend (#50)
* Basic glsl support

* Miscellaneous fixes and vertex shader works

* Added rudimentary texture and sampler support

* Basic preprocessor

* Added preprocessor if macros

* Pass tests and handle floats correctly

* Fix preprocessor if wrong precedence ordering when using macros
Refractor for the glsl parser
Partial primary expression parser

* Fix all clippy errors

* Cleanup

* Rollback formatting changes in lib.rs
2020-06-09 13:43:16 -04:00
Dzmitry Malyshau
df855bc2ff Makefile and RON converter parameters 2020-03-19 09:44:14 -04:00
AIOOB
1ac92cd942 Fixup clippy lints and remove unsafe 2020-03-15 21:09:08 -04:00
Dzmitry Malyshau
e6fe97f410 [wgsl] rewrite with our own parser 2020-03-11 13:36:14 -04:00
Dzmitry Malyshau
246ca018ef
[tint] beginning of the front-end based on Pest (#9) 2020-02-28 13:05:24 -05:00
Dzmitry Malyshau
8c4e60eb81 Add DXIR to readme, more badges 2020-02-26 23:30:45 -05:00
Dzmitry Malyshau
515f878fa2 Basic image sampling support 2020-02-26 17:10:42 -05:00
Dzmitry Malyshau
96a12a0c9a Complete the crate rename to Naga 2020-02-25 14:00:51 -05:00
Dzmitry Malyshau
1fc6f89d79 Parse SPIR-V function declarations 2020-02-21 16:27:11 -05:00