* Fix example-runner-ash
Fix compile_shaders() to return correct shader name.
* Refactor example-runner-ash
- Stop to get shader name from path. It was too complicated.
This works simply by naming the binary crate
anything other than the name of the lib, which is example-runner-wgpu
As far as I know, the warning started in
https://github.com/EmbarkStudios/rust-gpu/pull/215
Since there is only one binary crate in the package, the command
(`cargo run -p example-runner-wgpu --release`)
maintains the same behaviour
The cargo issue is https://github.com/rust-lang/cargo/issues/6313
This warning caused problems for me in testing
https://github.com/Lokathor/bytemuck/pull/67
since I didn't notice the warning that my patch was not applied
* Clean up the interface of the watching support
This allows us to avoid the seperate thread just for looping through
the graphics rx to the eventloop, for example
In almost all cases, intial results are blocked on the first result, and
then needs notifications for later changes
* Fix test failures
* fmt
* Remove the comment again
* Update builder to use a shared validation method
* Add the error for using print_metadata and watching
We cannot use print_metadata with watching
because print_metadata only makes sense
in build scripts, but watching does not
and would instead stall the script
* Add the initial implementation of watching
* Make hot reloading work in the wgpu example
* Attempt to address CI failures
* Add exception for notify CC0-1.0 license
* Address review comments
Co-authored-by: khyperia <github@khyperia.com>
* Reduce CI times
* Reduce RUSTUP_UNPACK_RAM
* Set RUSTUP_IO_THREADS=1
* Include https://github.com/EmbarkStudios/ash-molten/pull/57 This fixes github API rate limit errors
* Inline test.sh to show timings for each step and generally have a less-jank UI
* Remove an unused command buffer and fence in the ash runner
* Don't recreate command buffer when recreating the swapchain
* Don't recreate the render pass
* Require local size and remove gl_
Removes the gl_ prefix from the compute shader attribute, shortens the thread dimension declaration to threads(x, y, z), requires the x size dimensions be specified, trailing ones may be elided for the y or z dimensions.
* Implement review suggestions
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