Vulkan swap chains must have non-zero dimensions, this adds a check for that during swap chain resizing and does not create one if it would be invalid.
* window resizing and hot reloading
* remove windows paths and fix viewport creation
* readd spirv tools features
* re-remove features
* and add them again
* CI fix
* proper-resizing-and-validation-fixes
* linux validation fix
* fix zero height halting rendering
rendering wasn't getting unpaused after being set to zero height and then made larger again
* fix wgpu crash on laptops with both dedi and integrated GPUs
This fix still requires the user to set their default GPU to their dedicated one.
* METAL or VULKAN backend bit
* rebuild pipelines after updating shaders
* use spirv-builder, resolve merge conflict
* fmt
* remove saturate from spirv_std MathExt and rename pow to powf
* update to latest glam
* update glam again and add `std` feature to `spirv-std` to support cpu runner
* re-remove spirv-tools-sys submodule
* fixup! Merge branch 'main' into powf-saturate
* Use libm instead of MathExt
* Fix lint for unused import when compiling with std
Co-authored-by: khyperia <github@khyperia.com>
* 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
* Added clap to switch between shaders
* Merged wgpu runners
* tested something related to async which i forgot to udno
* clippy
* xamprocky suggestion
* 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
* Update DILocation and update trait impls for nightly
* rustc_codegen_spirv: Update mir Scalar handling to nightly 2020-11-04
3a7970848cdf4d717d0b
* More changes to compile on the latest nightly
* Remove unused import warnings
Co-authored-by: Marijn Suijten <marijns95@gmail.com>
* 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.
* 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
* [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
* 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
* 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
* 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
* 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>
* 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>
* 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>