Dzmitry Malyshau
bd9efe5915
Allow struct members without an origin
2020-08-27 11:49:38 -04:00
Dzmitry Malyshau
462c82fb71
As expressions
2020-08-27 11:49:38 -04:00
Dzmitry Malyshau
4a61705201
Add matrix transposition expression
2020-08-27 11:49:38 -04:00
João Capucho
64bb2104cf
glsl-out: Less allocations, handle struct member origin and correctly handle empty names ( #160 )
...
* Removed half of the clones
Fixed struct field names with invalid ident
* Fix struct member origin not being respected
* is_valid_ident handles empty names
2020-08-27 10:26:55 -04:00
Dzmitry Malyshau
4797773152
Image IR refactor ( #153 )
2020-08-26 13:26:51 -04:00
João Capucho
f7c5e4873e
Made the output of glsl-out more human readable ( #154 )
2020-08-26 12:29:33 -04:00
João Capucho
ac66d149a4
Fixed names beginning with digits and arguments without names ( #151 )
2020-08-25 15:54:13 -04:00
João Capucho
5d9489871d
Add support for glsl es in the glsl backend ( #128 )
...
* Initial glsl es 300 support
* Set float default precision
* Generate interface blocks and check storage class in es
* Added more checks on es and fixed uniform blocks with same name type
* Added image checks
* Added the test to the makefile
* applied comments
2020-08-22 10:50:54 -04:00
Lachlan Sneff
8c0b1636ea
Interpolation support for wgsl, glsl, glsl-new, spirv (front and back), and glsl-out ( #140 )
...
* Add interpolation support to naga core and wgsl
* Add glsl-new fragment shader support to examples/convert.rs
* Add interpolation support to glsl_new
* Add interpolation support to spirv frontend
* Add interpolation support to spirv backend
* Add interpolation support to glsl backend
* Add interpolation support to old glsl backend
* Fix interpolation field syntax in glsl backend
* Formatting fix
* thanks clippy
* Add wgsl struct interpolation decoration
* Change wgsl interpolation syntax
* Modify interpolation enum
* Changes responding to review
* Remove interpolation struct member qualifier
* code changes after review
2020-08-19 20:22:21 -04:00
Timo de Kort
58dd54f938
[spirv-out] Refactor lookup ( #88 )
2020-08-17 18:16:31 -04:00
Lachlan Sneff
fccefaccde
Add support for initialization of local variables to glsl backend ( #129 )
...
* Add support for initialization of local variables to glsl backend
* Cleanup
2020-08-15 01:46: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
Josh Groves
115c29c022
[msl] Cast single-component scalars ( #115 )
...
* [msl] Cast single-component scalars
* [msl] Allow `BinaryOperator::And`
2020-07-24 22:48:14 -04:00
Timo de Kort
e55c6b56e2
Fix SPIR-V back-end, width will now be multiplied by 8 ( #108 )
2020-07-12 14:22:47 -04:00
Dzmitry Malyshau
39998a4c38
Differenciate between local and external function calls at IR level
2020-07-06 14:10:38 -04:00
Paul Kernfeld
ec52598d61
Deny on panics with clippy
2020-07-06 00:13:51 -04:00
Dzmitry Malyshau
4a769c10b5
[spv] remove the pointer indirection to variables
2020-07-05 09:33:07 -04:00
Dzmitry Malyshau
33fe3a3dba
Struct member origin enum
2020-07-04 11:10:37 -04:00
Dzmitry Malyshau
5d6406b018
Add DepthImage IR type.
...
Fix all the usage of Bytes type to really mean bytes.
Have logic in the SPIR-V front-end to detect the comparison properties of samplers and images.
2020-07-04 11:10:37 -04:00
Gabriel Majeri
c2a220840f
Document almost everything
2020-06-29 12:25:48 -04:00
Timo de Kort
713fcaaa11
Spirv backend - Extract instructions to own functions
2020-06-27 08:41:33 -04:00
Dzmitry Malyshau
e0a1e80fb5
Remove spirv-headers use from IR, make it optional
2020-06-25 00:37:33 -04:00
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
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
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
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
João Capucho
f94b486d8b
Run cargo fmt and enable monocodus ( #63 )
2020-06-09 14:49:12 -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
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
Timo de Kort
1a1f6a47b0
add support for ConstantComposite
2020-03-28 14:58:45 -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
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
5e78c71a44
Rename Token/Id to Handle and Storage to Arena consistently
2020-03-11 16:28:13 -04:00
Dzmitry Malyshau
3bf1760d5b
[ir] add SAMPLED image flag
2020-03-05 11:21:36 -05:00
Dzmitry Malyshau
78d5a73a2f
[msl] support returning values
2020-03-03 16:25:56 -05:00
Dzmitry Malyshau
ee987325a5
[wgsl] basic parsing of function body
2020-03-03 16:08:20 -05:00
Dzmitry Malyshau
a9c476d58d
Move out Void from the type enum
2020-03-03 14:09:41 -05:00
Dzmitry Malyshau
c2265ca4c8
[wgsl] structure declarations, better array types
2020-03-03 11:14:15 -05:00
Dzmitry Malyshau
aba9e8a0f2
Fixup metal type exports
2020-03-02 16:56:15 -05:00
Dzmitry Malyshau
2f0540c6ab
Flat type structure ( #10 )
2020-03-02 16:37:56 -05:00
Dzmitry Malyshau
515f878fa2
Basic image sampling support
2020-02-26 17:10:42 -05:00