Commit Graph

369 Commits

Author SHA1 Message Date
charles-r-earp
32c2ea58bc
Compute Shaders + ExecutionMode's (#195)
* Created examples/ wgpu-example-compute-runner + wgpu-example-compute-shader.

* Working compute example, can compile and run, set local_size. Validated changes do not break rendering example.

* Added complete list of ExecutionMode's to be specified underneath ExecutionModel. Replaced SpirvAttribute::Entry ExecutionModel with an Entry struct, which includes a Vec of ExecutionMode, ExecutionModeExtra to be submitted in entry.rs. Compute example runs. Passes all tests.

* Changed Cargo license info for compute examples. Simplified compute runner to be more similar to other wgpu example. Split of entry logic in symbol.rs to separate function. Fixed issue in builder/mod.rs.

* Pulled in reorganization changes to crates + examples. In symbols.rs moved really_unsafe_ignore_bitcasts to its own Symbol match. In entry.rs, entry stubs now return the fn_id, so that entry_stub() can add the execution modes in one place. Passed all tests.

* cargo fmt

* Removed duplicate examples. Fixed cargo fmt bug in compute runner.
2020-11-10 08:10:21 +00:00
bjorn3
1f615dc491
It is no longer necessary to provide supported_target_features (#214) 2020-11-05 11:24:20 +00:00
Louis Pilfold
afe3e1f83f
Re-introduce "getting started" section (#205)
* Re-introduce "getting started" section

This section details how to use the project as a newcomer. The previous guide location made it hard to find.

* Feedback

Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>

Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>
2020-11-03 10:31:53 +00:00
Ashley Hauck
3480521626
Build/test the ash example on Ubuntu/Windows CI (#203)
* Build/test the ash example on Ubuntu/Windows CI

* Remove CI check for ash example

Co-authored-by: Jake Shadle <jake.shadle@embark-studios.com>
2020-11-03 10:28:02 +01:00
XAMPPRocky
0c33e5b83d
Update .gitattributes 2020-11-03 10:26:29 +01:00
XAMPPRocky
a7b6280706
Update README.md 2020-11-03 09:13:49 +01:00
XAMPPRocky
2942967607
Add initial platform support docs (#187)
* Add initial platform support docs

* Update platform-support.md

* Update platform-support.md
2020-11-02 16:07:34 +00:00
Viktor Zoutman
8d2b8ce5f3
Continue and minor break fixes (#202)
* Continue and break fixes

* Ashley Clippy

* Incorporated Feedback

* Clippy lint

* clippy

* minor fix
2020-11-02 15:14:06 +00:00
khyperia
72e1373e1c Fix path missed in #200 2020-11-02 12:55:49 +01:00
khyperia
0b5ddb697b Add reminder test to implement strings. 2020-11-02 11:46:24 +01:00
XAMPPRocky
ad610b57f5
Move top-level crates to crates/ directory (#200)
* Move top-level crates to crates/ directory

* Update docs

* Update test.sh

* Update docs.sh

* Update clippy.sh
2020-11-02 11:26:10 +01:00
XAMPPRocky
43c7934ef2
Add enhancement issue template (#199)
* Create enhancement.md

* Update enhancement.md
2020-11-02 10:04:11 +00:00
Christofer Nolander
982dcfaa35
Make all example windows 720p by default (#184) 2020-11-01 17:31:04 -07:00
Johan Andersson
9af1e84e90 Fix glam no_std handling in new version 2020-10-31 00:52:17 +01:00
Johan Andersson
8bec12831a Upgrade to latest glam fork rev 2020-10-31 00:38:23 +01:00
Johan Andersson
e0595dc80c Consistent example window titles 2020-10-31 00:35:00 +01:00
Johan Andersson
26db9c140f Disable publishing of example crates 2020-10-31 00:00:41 +01:00
Gray Olson
380c275d2c
add git submodule setup to setup scripts (#194) 2020-10-30 22:04:42 +00:00
Gray Olson
b12a2f3f6a
Cleanup pass on example shader and vk example-runner (#109)
* get rid of vertex buffers in example

* get rid of unused attributes in example shader

* use negative viewport height to match wgpu

* remove depth buffer

* use SRGB surface

* improve tonemapping

remove 'gamma correction' in favor of hardware srgb support

* make clippy happy

* move tonemapping out of sky(), rename gl_pos to builtin_pos

* rename shaders and use sky shader in wgpu example runner

* apply srgb OETF and invert clip space for cpu example runner

* restructure example directory structure according to #170

* update winit in wgpu example runner

* fix deny.toml example crate refs

* fix ci example name on maOS

* example-shader -> sky-shader in docs

* update sky shader image

* re-enable clippy and make it happy
2020-10-30 11:38:47 -07:00
khyperia
5a7aabe836 Don't fail subsequent tests if one panics 2020-10-30 15:28:07 +01:00
XAMPPRocky
2a19fc1cb7
Add introduction to API docs (#189) 2020-10-30 14:20:12 +00:00
Jake Shadle
aef85ea5d8
Fix val error output (#188)
* Add test for validation output

* Fix validation to use correct functions

* Clippy y so strict
2020-10-30 14:02:56 +00:00
Johan Andersson
98eb8d369c
Convert to use glam for math types (#149)
* [spirv-std] Remove math types

* Temp implementation of copysign

https://github.com/EmbarkStudios/rust-gpu/issues/148

* Convert shader to use glam

* Rustfmt

* Fix wgpu-example-shader to use glam

* [spirv-std] Disable clippy::use_self

* Upgrade to latest glam branch

* Use latest glam fork

* Remove incorrect assert_uninit

After discussions with @khyperia

* Update lockfile

* Update to latest glam fork with fixes

* Use real copysign intrinsic

* Disable clippy on example-shader for now

Tracked in https://github.com/EmbarkStudios/rust-gpu/issues/186
2020-10-30 14:58:38 +01:00
XAMPPRocky
b47ff73b44
Update docs.sh 2020-10-30 14:54:09 +01:00
XAMPPRocky
db24b3023f
Add spirv-std back to docs. 2020-10-30 14:43:04 +01:00
khyperia
450eb7d586 Improve DUMP_MIR debug flag 2020-10-30 14:31:52 +01:00
VZout
e72c77e391 Added a test for a fully unreachable break scenario 2020-10-30 11:51:48 +01:00
Viktor Zoutman
4f2daf3601
Fixed loops inside of a conditional branch (#185) 2020-10-30 10:19:10 +00:00
XAMPPRocky
53fce0b4dc
Add generated to .gitattributes (#183) 2020-10-30 08:40:43 +01:00
XAMPPRocky
d59f5adae2
Add docs badge back. 2020-10-30 08:40:10 +01:00
meowjesty
e729aad3b7
repository 'https://github.com/EmbarkStudios.com/rust-gpu/' not found (#182)
```
git clone --recurse-submodules https://github.com/EmbarkStudios.com/rust-gpu
Cloning into 'rust-gpu'...
remote: Repository not found.
fatal: repository 'https://github.com/EmbarkStudios.com/rust-gpu/' not found
```

Removing the `.com` from EmbarkStudios solves it.
2020-10-30 07:55:22 +01:00
Johan Andersson
96f5f1075e GitHub categorize spirv-tools-sys as vendored 2020-10-29 23:29:47 +01:00
Jake Shadle
307d0da66b
Add spirv-tools and spirv-tools-sys crates to wrap usage of spirv-tools (#179)
* Add spirv-headers and spirv-tools as submodules

* Add simple generator and the generated code needed for compilation

* Add first pass on spirv-tools-sys

* Add first pass on spirv-tools

* Replace invocation of spirv-opt with spirv-tools crate

* Use C++11

* Placate clippy

* Add validation, replacing spirv-val with the spirv-tools crate

* Fix MSVC warning

* Use patched spirv-tools

* Fixup metadata

* Add same compiler flags as "official" build scripts

* Update spirv-tools and generated files

* Fixup

* Add assembler and example

* Use assembler in tests

* Oops, fix macos TARGET_OS

* write -> write_all

* Start splitting spirv-tools into a compiled vs tool feature set

* Checkpointing

* Checkpoint

* Boop

* Get tests to work both with installed and compiled tools

* Cleanup CI config

* Splits steps to clearly show how long each part of a longer (eg test)
step actually takes
* Label all steps

* Explicitly disable submodule checkout

* Rustfmt

* Rename features for consistency and fix clippy warnings

* Split "core" crates from examples

* Add run_clippy bash script

* Add test script

* Remove x flag

* Newline

* Actually print out errors from running val/opt

* Revert drive-by import merging

* Change intro to take the changes this PR has into account

* Actually run tests on Windows

* Fetch only the host target to reduce fetch times

* Add more info when a spirv tool returns a non-zero exit code

* Rustfmt

* Switch tool assembler to use files to see if it fixes windows

* Use files for input and output for now until I can figure out Windows being dumb

* Fix API docs generation

* Compile and use C++ code to check Windows issue

* Return to use installed tools
2020-10-29 23:03:07 +01:00
Jake Shadle
5aa7453b19 Revert "Replace usage of spirv-* binaries with spirv-tools rust crate (#117)"
This reverts commit 0bfe303a64.
2020-10-29 22:34:26 +01:00
Jake Shadle
0bfe303a64
Replace usage of spirv-* binaries with spirv-tools rust crate (#117)
* Add spirv-headers and spirv-tools as submodules

* Add simple generator and the generated code needed for compilation

* Add first pass on spirv-tools-sys

* Add first pass on spirv-tools

* Replace invocation of spirv-opt with spirv-tools crate

* Use C++11

* Add validation, replacing spirv-val with the spirv-tools crate

* Use patched spirv-tools

* Fixup metadata

* Add same compiler flags as "official" build scripts

* Update spirv-tools and generated files

* Add assembler and example

* Use assembler in tests

* Start splitting spirv-tools into a compiled vs tool feature set

* Get tests to work both with installed and compiled tools

* Cleanup CI config

* Splits steps to clearly show how long each part of a longer (eg test)
step actually takes
* Label all steps

* Explicitly disable submodule checkout

* Rename features for consistency and fix clippy warnings

* Split "core" crates from examples

* Add run_clippy bash script

* Add test script

* Change intro to take the changes this PR has into account

* Fetch only the host target to reduce fetch times

* Add more info when a spirv tool returns a non-zero exit code

* Use files for input and output for now until I can figure out Windows being dumb
2020-10-29 21:54:25 +01:00
Viktor Zoutman
ffc6d30dcd
Rough structurization of loops. (#176)
* Rough loops implementation

* Update rustc_codegen_spirv/src/linker/structurizer.rs

Co-authored-by: Ashley <ashley.ruglys@gmail.com>

Co-authored-by: Ashley <ashley.ruglys@gmail.com>
2020-10-29 13:10:49 +00:00
Ashley Hauck
03e69fc1ea
Refactor linker and delete some unused code (#171)
Use more efficient solutions than DefAnalyzer, and shuffle linker step
order to remove need for ScalarType/AggregateType.
2020-10-29 12:03:16 +00:00
Louis Pilfold
52277d3336
Correct URL after incorrect rebase (#174) 2020-10-29 10:11:32 +00:00
Louis Pilfold
41ee5dd266
Use our new badges (#154)
* Use our new badges

This repo uses GitHub actions rather than Circle so it looks a little
different. We could shorten the name of the GitHub Actions workflow to
make the badge smaller.

* Add Contributing section

* Remove duplication

* Remove crates badges

* Feedback
2020-10-29 09:42:31 +00:00
XAMPPRocky
502f3dbaf6
Update README.md 2020-10-29 10:41:50 +01:00
XAMPPRocky
0698e3f7df
move assets and rfcs into docs (#172) 2020-10-29 09:01:28 +00:00
XAMPPRocky
dc9c66963a
Build rustdoc documentation and update links (#169) 2020-10-28 14:59:16 +01:00
Ashley Hauck
1b5aac084c
Support GLSL450 and Simple memory models (#168)
* Support GLSL450 and Simple memory models

* Update spirv-builder/src/lib.rs

Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>

* Only emit SPV_KHR_vulkan_memory_model when needed

Co-authored-by: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>
2020-10-28 13:49:44 +00:00
XAMPPRocky
b784710193
Update mcp.md 2020-10-28 12:47:29 +01:00
Ashley Hauck
ddd2526f6d
Include examples in test (#166)
I thought examples couldn't be included in test due to weird windows
reasons, but wgpu-example-runner is already included, and it works
2020-10-28 11:34:46 +01:00
Johan Andersson
de4436d2e0 Fix compiling wgpu-example-shader for CPU 2020-10-28 10:22:06 +01:00
Johan Andersson
e2be058015 Remove old lingering Cargo.lock files 2020-10-28 10:22:06 +01:00
khyperia
5e12734ce9 Add fix that was supposed to be in 165 but mergify merged it before I could push 2020-10-28 10:14:07 +01:00
Ashley Hauck
23819c7a2c
Add support for spir-v 1.0 (#165) 2020-10-28 09:08:01 +00:00
Ashley Hauck
706f4cc695
Download spirv-tools directly on ubuntu CI (#162) 2020-10-27 17:19:28 +01:00