Commit Graph

178 Commits

Author SHA1 Message Date
Johan Andersson
e2be058015 Remove old lingering Cargo.lock files 2020-10-28 10:22:06 +01:00
Ashley Hauck
23819c7a2c
Add support for spir-v 1.0 (#165) 2020-10-28 09:08:01 +00:00
Ashley
1b99a9ce20
Fix compilation of wgpu runner on wasm (#159) 2020-10-27 14:34:02 +00:00
Viktor Zoutman
27df71f492
WGPU example (#92) 2020-10-27 02:39:56 +01:00
Ashley Hauck
b32c04b3fd
Refactor attributes and add descriptor_set/binding (#145)
* Move entry declarations to their own file

Also clean up attribute parsing (and make it allow multiple arguments in
the process)

* Add descriptor_set and binding attributes

* clippy fix

* Fix test

* Reserve descriptor_set 0 for future use

* Add book page on attributes
2020-10-26 15:23:21 +00:00
Johan Andersson
fe18434bff
Add example to evaluate sky shader on CPU (#141) 2020-10-26 15:49:01 +01:00
Johan Andersson
12b07dcc53
Add cargo-deny config & CI step (#125)
* Add cargo-deny config & CI step

* Add missing license to multiple workspace crates

* Fix author

* Switch to checkout@v2
2020-10-25 16:15:04 +01:00
Johan Andersson
035924734d
Fix Windows native compile of example-shader (#127)
Fix #119 based on the suggestion of @bjorn3, thx!
2020-10-23 21:41:44 +00:00
Ashley Hauck
8681464af7
Add framework for compiler tests (#118) 2020-10-23 18:22:36 +02:00
khyperia
8931f50c3c Revert "Move panic_handler and eh_personality to spirv-std (#95)"
This reverts commit 985ae7d494.
2020-10-22 21:36:09 +02:00
Ashley Hauck
985ae7d494
Move panic_handler and eh_personality to spirv-std (#95) 2020-10-22 19:25:50 +00:00
Jasper Bekkers
f4f1031976
If statement (#98) 2020-10-22 16:22:17 +02:00
Ashley Hauck
0710f9d4b5
Include example-shader in the workspace (#87)
* Include example-shader in the workspace

* Fix clippy warnings

* Fix up tests and clippy warnings

* Change clamp_ to saturate

Co-authored-by: Jasper Bekkers <bekkers@gmail.com>
2020-10-22 12:30:17 +02:00
Ashley Hauck
8516dc161d
Winit update to v0.23 (#86)
* Extremely hacky winit update

* Only render when redraw is requested

* cargo fmt

* Renamed smoothstep

Co-authored-by: Jasper Bekkers <bekkers@gmail.com>
2020-10-22 12:23:11 +02:00
Jasper Bekkers
77d7129547
Add back unused attributes (#85) 2020-10-22 11:51:49 +02:00
Johan Andersson
e8f33c97a5
Add sky shader example code and screenshot to README (#83)
* Add example sky shader to README

* Bigger screenshot

* Change order

* [example] Simplify & rustify sky shader further

* Make code slightly nicer

* Add back comment

* Newline

* Add Vec4::truncate

Co-authored-by: Jasper Bekkers <bekkers@gmail.com>
2020-10-21 21:42:49 +02:00
Maik Klein
7258a7c236
Don't panic when destroying debug utils (#79)
* Don't panic when destroying debug utils

* Use zip instead of two branches

Co-authored-by: Jasper Bekkers <Jasper-Bekkers@users.noreply.github.com>
Co-authored-by: Jasper Bekkers <bekkers@gmail.com>
2020-10-21 21:07:18 +02:00
Johan Andersson
bba88ccfad [example] Leak debug loader instead of panicking on shutdown 2020-10-21 20:44:09 +02:00
Johan Andersson
14352a79be [example] Remove unused image crate dependency 2020-10-21 20:43:46 +02:00
Jasper Bekkers
a06b2e49cf
Branchless sky shader (#71)
* Branchless sky shader

* Fullscreen quad

* Fixed naming of the fragment shader

* Add very stripped down version of glam-rs math routines to spirv-std

* Update example to use math routines in spirv-std

* Also use lerp from spirv-std

* Attribution, small cleanups

* Use extension trait for math, much nicer \o/

* Switch to repr(simd) for the Vec types

* Move clamp into MathExt, make MathExt take Self instead of f32

Co-authored-by: VZout <viktor.zoutman@embark-studios.com>
Co-authored-by: khyperia <github@khyperia.com>
2020-10-21 20:16:06 +02:00
Viktor Zoutman
5db68ec044
Update lib.rs 2020-10-21 13:16:03 +02:00
VZout
b4aebb4a36 Fixed naming of the fragment shader 2020-10-20 11:12:30 +02:00
Viktor Zoutman
b86ed60dab
Modified the examples to use rust-gpu for the vertex shader. (#70)
* The example now also uses the vertex shader
* Removed old vertex shader
* fmt
2020-10-19 18:54:02 +02:00
XAMPPRocky
16f7268edb
Add support for macos in example-runner (#60) 2020-10-14 18:33:37 +02:00
Ashley Hauck
d3af0552d3
Move to a builder struct for spirv-builder (#59)
This allows the print_metadata option
2020-10-14 15:48:21 +02:00
Johan Andersson
9d98620d24
Togglable Vulkan debug layer in example (#53)
Disabled it by default as it requires the Vulkan SDK to be installed.

Can be enabled with  `-d` / `--debug-layer`
2020-10-13 23:42:15 +02:00
khyperia
60a4164ca1 Reference rustc_codegen_spirv in spirv-builder
This makes the UX much better. It's also kind of bonkers, but, in a good
way. I think.
2020-10-09 20:01:35 +02:00
khyperia
1516d864f3 First try at spirv-builder 2020-10-09 17:22:07 +02:00