Commit Graph

395 Commits

Author SHA1 Message Date
Viktor Zoutman
da0453d356
Update math_ext.rs 2020-11-18 16:14:19 +01:00
Eduard-Mihai Burtescu
63b28d057d
Make it easier to build & run examples on NixOS. (#257) 2020-11-18 14:55:28 +00:00
Viktor Zoutman
2dd8dba3b0
Moved some functions to a shared crate (#255)
* Moved some functions to a shared crate

* fmt!

* fixed the cpu
2020-11-18 14:27:32 +00:00
Viktor Zoutman
6353505e9e
Introducing rspiv::Builder into the structurizer. (#253)
* Replaced most manual spirv manipulation with rspirv builder

* Replaced most manual spirv manipulation with rspirv builder

* removed braces

* prefer slices over vec
2020-11-18 13:43:38 +00:00
Ashley Hauck
bedbc4dc0f
asm! (#254) 2020-11-18 12:54:22 +00:00
XAMPPRocky
c1c72517c8
Update ash-molten to compile on macOS (#252) 2020-11-18 10:33:10 +00:00
charles-r-earp
f564a67100
Decorated entry variable name. (#250) 2020-11-18 08:13:30 +00:00
Viktor Zoutman
a841cc845f
Update math_ext.rs 2020-11-16 21:24:35 +01:00
Viktor Zoutman
ec89ddf446
Sky shader Improvements. (#245)
* Added some constants to the shader

* did something for a certain video i forgot to revert

* removed unused function

* cleanup

* cpu runner now works

* explicit naming

* removed paranthesis

* clippy

* CLIPPY
2020-11-16 15:17:09 +00:00
Viktor Zoutman
daa382368c
Structurizer fixes (#244)
* Structurizer fixes

* reverted some unnessessary changes
2020-11-16 12:58:27 +00:00
Viktor Zoutman
2d75e0473f
Merged wgpu runners (#241)
* Added clap to switch between shaders

* Merged wgpu runners

* tested something related to async which i forgot to udno

* clippy

* xamprocky suggestion
2020-11-16 11:21:33 +00:00
VZout
28e71d9932 Reserve the descriptor set instead of the binding 2020-11-14 15:47:34 +01:00
Viktor Zoutman
0f78bd3e6b
Added clap to switch between shaders (#240) 2020-11-13 18:37:30 +00:00
XAMPPRocky
45f2312947
Put shader modules at the top of the example runners (#229) 2020-11-13 11:19:23 +00:00
Ashley Hauck
2f63addede
rustup update (#238) 2020-11-13 09:35:34 +00:00
Gray Olson
a79da96307
add trunc and fract to MathExt (#222) 2020-11-13 09:20:12 +00:00
Jake Shadle
0f3948dc27
Move out spirv-tools to separate repo (#237)
* Nuke spirv-tools

* Swap to use published spirv-tools crate
2020-11-13 09:57:12 +01:00
Dhruv Dhamani
e261b88a73
Update 001-resource-binding-syntax.md (#236)
small typo
2020-11-13 08:38:26 +01:00
Marijn Suijten
e8aef14347
Add Android support to wgpu example (#215)
* examples/wgpu: Handle escape to exit (same as ash example)

* examples/wgpu: Set up for use on Android

* examples/wgpu: Convert #[cfg] blocks to cfg_if

* examples/wgpu: Wait for events instead of busy-looping

The image currently does not change and the OS will notify us when to
redraw (ie. after window resizes). This is going to save power
especially on mobile devices.

As soon as interactive or animating visuals are introduced to this
example redraws can be requested with `window.request_redraw()`.

* examples/wgpu: Create swapchain in ::Resume on Android

* docs: Add Android to supported operating systems

* ci: Build test cross-compilation for Android

* HACK: ci: Create Android symlink without spaces

* ci: Set legacy ANDROID_HOME because ndk-build prefers deprecated var
2020-11-11 16:32:02 +01:00
Ashley Hauck
86da42f2d7
Synthesize Session for tests, instead of Option<Session> (#228)
Also remove LinkerError and use rustc error reporting directly instead
2020-11-11 13:22:06 +00:00
Ashley Hauck
47d23ba800
Don't ICE on spir-v module version mismatch (#226) 2020-11-11 13:02:05 +00:00
Ashley Hauck
9c8cec3639
Make SpirvValue contain an enum for its value (#219) 2020-11-11 09:23:07 +01:00
XAMPPRocky
c2ccdbe6ef
Update glam and re-export glam from spirv_std (#220) 2020-11-11 08:13:37 +00:00
Ashley Hauck
bfa0f50f9b
Update ash-molten to use version 0.7 (#218)
The moltenvk-1.1.0 branch no longer exists
2020-11-10 09:29:50 +00:00
khyperia
d28cba9d13 Update install scripts to match rust-toolchain 2020-11-10 09:24:59 +01:00
XAMPPRocky
cf52d51199
Add changes to compile rust-gpu on the latest nightly (#212)
* Update DILocation and update trait impls for nightly

* rustc_codegen_spirv: Update mir Scalar handling to nightly 2020-11-04

3a7970848c
df4d717d0b

* More changes to compile on the latest nightly

* Remove unused import warnings

Co-authored-by: Marijn Suijten <marijns95@gmail.com>
2020-11-10 08:16:25 +00:00
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