Gabriel Majeri
84615eead3
Add support for return value to SPIR-V backend ( #79 )
...
* Add test for `glsl_phong_lighting`
* Implement `ReturnValue` op for SPIR-V backend
2020-06-22 16:11:40 +02:00
Dzmitry Malyshau
70054b7693
Relicense under MIT+Apache2
2020-06-21 16:59:16 -04:00
Timo de Kort
9940460fe6
Add basic tests for SPIR-V back-end writer
2020-06-21 15:11:03 -04:00
Dzmitry Malyshau
a9228d2aed
Add member offsets and array strides
2020-06-19 08:45:04 -04:00
Timo de Kort
eb559c5b32
Add GLSL construction status
2020-06-18 20:10:37 -04:00
Timo de Kort
0a781f4ce7
Add Layout Tests
...
Add Physical Layout test
Add Instruction tests
Add Logical Layout test
2020-06-18 17:19:36 -04:00
Dzmitry Malyshau
e3aea96198
Refactor GLSL parser modules
2020-06-17 09:50:17 -04:00
Pelle Johnsen
ba0798e5d1
Add glsl handling to convert sample ( #69 )
...
* Add glsl handling to convert sample
- Also fis extension check for spv and wgsl (missing .)
* Use std::path::Path for ext handling
* Also fix ext for .comp
Missing from last commit
2020-06-17 09:34:35 -04:00
Dzmitry Malyshau
8e0ae1cf06
Convert glsl module line endings to Unix
2020-06-16 22:54:26 -04:00
Dzmitry Malyshau
d55cd79a21
Minor improvements, expose Handle, move glsl module inside the dir.
2020-06-16 22:54:26 -04:00
Dzmitry Malyshau
89d2afa11b
Comparison sampler API ( #66 )
2020-06-16 14:55:40 -04:00
Timo de Kort
82573b288b
Implement basic SPIR-V back-end ( #46 )
2020-06-15 16:01:00 -04:00
Timo de Kort
f9fa281da5
Update integers to float32 ( #64 )
2020-06-13 13:05:30 -04:00
João Capucho
f94b486d8b
Run cargo fmt and enable monocodus ( #63 )
2020-06-09 14:49:12 -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
João Capucho
706a88e21c
Fix clippy errors ( #62 )
...
* Move from travis to github actions (#58 )
* Added github actions
* Remove travis
* Fixed clippy warnings
* Add the clippy check to ci
* Move workflows to .github
* Fix missing clippy
2020-06-08 16:00:46 -04:00
Paul Kernfeld
b108a50089
Check constant types ( #54 )
...
* Check constant types
A baby step towards #43
* Move tp src/proc/typifier, remove unneeded return
* Don't do pub(crate)
* Don't use crate::proc::UnexpectedConstantTypeError
Co-authored-by: Paul Kernfeld <paulkernfeld@gmail.com >
2020-05-22 12:30:30 -04:00
Paul Kernfeld
2a3fc6dc54
Replace panics with errors in Metal backend
...
Fixes #31
2020-05-20 11:18:18 -04:00
Paul Kernfeld
e2bd93aa21
Replace write! with TypedGlobalVariable::try_fmt
...
A step towards #31
2020-05-19 12:48:32 -04:00
Dzmitry Malyshau
bce6358eb1
Create .monocodus
2020-05-01 09:59:37 -04:00
Timo de Kort
4b686165c2
Remove duplicate constants in IR module
2020-04-17 17:57:35 -04:00
Timo de Kort
1a1f6a47b0
add support for ConstantComposite
2020-03-28 14:58:45 -04:00
Gabriel Majeri
f09f87bb25
Use NonZeroU32 for handle index
2020-03-23 10:31:50 -04:00
Gabriel Majeri
47d7536f35
Format src/arena.rs
2020-03-23 10:31:50 -04:00
Dzmitry Malyshau
3ea6ca428f
Move the global usage into the IR function
2020-03-20 16:23:35 -04:00
Dzmitry Malyshau
55fab04353
Refactor the interface processor, many improvements in global variables handling in MSL
2020-03-19 22:36:26 -04:00
Dzmitry Malyshau
80a9254dbe
Interface processor
2020-03-19 18:04:58 -04:00
Dzmitry Malyshau
df855bc2ff
Makefile and RON converter parameters
2020-03-19 09:44:14 -04:00
Dzmitry Malyshau
0de28d1656
[msl] operators, array access, and built-in calls
2020-03-15 23:59:49 -04:00
AIOOB
1ac92cd942
Fixup clippy lints and remove unsafe
2020-03-15 21:09:08 -04:00
Dzmitry Malyshau
c467693253
Add quad -> MSL testing
2020-03-15 12:10:19 -04:00
Dzmitry Malyshau
4a72abb142
Remove Mul expression type
2020-03-15 12:10:19 -04:00
Dzmitry Malyshau
1957b09c4d
Add WGSL parsing tests
2020-03-15 11:43:08 -04:00
Dzmitry Malyshau
a768af6011
Implement a fair bit of typifier logic, resolve access ids in WGSL
2020-03-15 10:59:12 -04:00
Dzmitry Malyshau
3c5a12412c
Typifier lookups into constants, variables, and structs
2020-03-15 10:59:12 -04:00
Dzmitry Malyshau
6ba942330a
Typifier skeleton
2020-03-15 10:59:12 -04:00
Dzmitry Malyshau
76eb307d35
Local variables, [wgsl] statement context
2020-03-14 09:36:26 -04:00
Dzmitry Malyshau
607b77899b
[wgsl] add Lexer::skip() helper
2020-03-14 09:36:26 -04:00
Dzmitry Malyshau
d6a4e05e05
[wgsl] add parse_block, use for if statements
2020-03-14 09:36:26 -04:00
Dzmitry Malyshau
16f018046a
[wgsl] make lexer Error-aware
2020-03-13 17:11:55 -04:00
Dzmitry Malyshau
cb72a92bce
[wgsl] improved decoration parsing
2020-03-12 14:13:42 -04:00
Dzmitry Malyshau
ee325a6a67
Add imported function calls
2020-03-12 14:13:42 -04:00
Dzmitry Malyshau
0f8e3e4b9b
Singular, intrinsic, and derivative expressions
2020-03-12 13:09:19 -04:00
Dzmitry Malyshau
5e78c71a44
Rename Token/Id to Handle and Storage to Arena consistently
2020-03-11 16:28:13 -04:00
Dzmitry Malyshau
7e0b004c16
[wgsl] refactor Token
2020-03-11 13:36:14 -04:00
Dzmitry Malyshau
ee8e0699be
[wgsl] remove Pest grammar
2020-03-11 13:36:14 -04:00
Dzmitry Malyshau
93d60ce8bf
[wgsl] hand-written function parsing
2020-03-11 13:36:14 -04:00
Dzmitry Malyshau
e6fe97f410
[wgsl] rewrite with our own parser
2020-03-11 13:36:14 -04:00
msiglreith
3066c3b558
Fix newline handling ( #11 )
...
Support also non-LF variants
2020-03-05 22:52:24 -05:00
Dzmitry Malyshau
ee7882723a
[wgsl] expect logical expressions, fix hex literals
2020-03-05 21:21:14 -05:00