68 Commits

Author SHA1 Message Date
Jake Shadle
e96418f9fa Update spirv-tools (#1127)
* Update to spirv-tools 0.10.0

* Use pre-built binaries from spirv-tools-rs

* Oops

* Target != host for android

* Use non-ancient ubuntu

* Oh right

* Update expected output

* Address feedback

* Oops

* Cancel actions when new commits are pushed

* Update CHANGELOG

* Fixup
2024-02-07 07:46:23 +00:00
Jake Shadle
3bd121ef25 Use single test job for branch protections 2024-02-05 20:01:47 +02:00
Christian Legnitto
f955221493 Add ignore and no_run to get cargo test to pass. (#1101)
* Add changelog entry and failing CI.

* Add ignore and no_run to get `cargo test` to pass.
2024-01-24 12:55:58 +01:00
Fredrik Fornwall
f003cc106d Install required android platform in CI (#1120) 2024-01-24 12:37:05 +01:00
Eduard-Mihai Burtescu
26fcbc0b67 spirv-builder: try getting the docs.rs doc build to succeed (by making rustc_codegen_spirv optional). 2023-07-15 01:03:08 +03:00
Eduard-Mihai Burtescu
bc40662167 ci: add custom lint for spirv-std building with -Z minimal-versions. 2023-05-19 15:19:57 +03:00
Eduard-Mihai Burtescu
791be4b5d7 ci: move custom lint from ci.yaml to lint.sh. 2023-05-19 15:19:57 +03:00
Eduard-Mihai Burtescu
98c1f3da6f ci: rename clippy.sh to lint.sh. 2023-05-19 15:19:57 +03:00
Johan Andersson
a64857af02 Faster Windows CI with 16 core runners
Attempted this back in #923 & 718aa89edf  but ran into some unknown issues with it. This attempts it again to see if GitHub has resolved the issues.
2023-04-24 21:37:40 +03:00
Johan Andersson
ad4732b899 Faster Mac CI with new XL builders
Use 12 core machines instead of 3 core.
2023-04-24 21:27:45 +03:00
Eduard-Mihai Burtescu
9cd0b2759f example-runner-wgpu: transition from ndk-glue to android-activity. 2023-03-22 20:51:18 +02:00
Eduard-Mihai Burtescu
b3c280424c Migrate rustc_codegen_spirv env vars to codegen args. 2022-12-09 11:46:27 +02:00
Marijn Suijten
2094a71667 CI/android: Select wgpu example by package name instead of manifest path
Specifying a manifest path still allows `cargo` and `cargo-apk` to find the workspace a package belongs to. We've decided that properly implementing [package selection](https://doc.rust-lang.org/cargo/commands/cargo-build.html#package-selection) between `cargo-apk` and `cargo-subcommand` would be [nontrivial](https://github.com/dvc94ch/cargo-subcommand/pull/23/files#diff-23af5356f6001cd3993cd3c801fb7716ea02d1e504081b9fb569332db6107e80R53-R57) and ended up requiring the package to be selected explicitly via `-p` for now.
2022-11-24 07:52:12 -08:00
Eduard-Mihai Burtescu
e206122a36 ci: further update spirv-tools to 20221024 (for better errors). 2022-10-28 17:28:50 +03:00
Jake Shadle
fb5893a583 Fix linux download 2022-10-28 17:28:50 +03:00
Jake Shadle
9d1f87825d Update spirv-tools installs to latest-ish 2022-10-28 17:28:50 +03:00
Johan Andersson
35df2de639 Optimise CI with faster Linux machines (#923)
* Optimise CI with faster machines

Build on 16 vCPU machine instead of the default 4 vCPU, using GitHub Action's beta of GitHub-hosted larger runner.

* Use Windows runner

* Remove windows custom runner
2022-10-01 03:11:00 +02:00
Sylvester Hesp
7347e697fa Removed +stable workaround
Not needed anymore as libc is is no longer giving issues with this nightly version
2022-08-17 20:54:04 +03:00
Eduard-Mihai Burtescu
3cd665a873 Use the same official SPIRV-Tools builds for macOS CI too. 2022-08-17 19:24:57 +03:00
Eduard-Mihai Burtescu
d3384ef1e5 Attempt to unbreak CI (Android / libc 0.2.127). 2022-08-06 13:09:43 +03:00
Johan Andersson
685c79a972 Upgrade SPIRV-Tools prebuild to 2022-04-14 (#867)
For Linux and Windows, Mac CI uses latest installed from brew.
Also added comment about how/where to get the download link for next upgrade.

Resolves: #866
2022-04-19 11:47:37 +00:00
Eduard-Mihai Burtescu
04146858ce ci: also test --target-env vulkan1.2. 2021-11-04 11:54:26 +02:00
Ashley Hauck
a93d6e0f2a Add sample_bias and gather functions (#704)
* Add sample_bias function

* Update line numbers

* Add gather function

* Update spirv-tools

CI was failing on "Capability SampledRect is not allowed by Vulkan 1.1
specification (or requires extension)", except locally it was fine, and
I have more up to date spirv-tools than CI, so try bumping the CI
version to see if it's just an out-of-date spirv-val

* Fix gather() in vulkan

* Convert compiler valication into marker traits
2021-08-06 15:26:30 +02:00
Ashley Hauck
ca53cbefd8 Fix android CI (#701) 2021-08-02 11:00:25 +02:00
XAMPPRocky
e3720294de Produce spirv-std API docs with all features (#653) 2021-06-09 09:30:07 +02:00
Ashley Hauck
fcf6ee76c8 Reduce CI times (#637)
* 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
2021-05-31 11:17:34 +02:00
Ashley Hauck
6bff395680 Build the wgpu shader at runtime (#627)
* Build the wgpu shader at runtime
2021-05-21 12:09:56 +00:00
Ashley Hauck
1431c18b9d Move disassemble tests to compiletest (#609)
* Move disassemble tests to compiletest

* Fix problematic tests

* Add newlines
2021-04-30 09:07:45 +02:00
XAMPPRocky
4c8e50d943 Add --no-deps to cargo doc check (#604)
By default `cargo doc` documents all crates in the graph, including dependencies, which causes it to take a significant amount of time (~12 minutes according to CI)
2021-04-27 13:27:44 +00:00
Ashley Hauck
ec131ca95c CI check that docs are able to be built without warnings (#601)
* CI check that docs are able to be built without warnings
2021-04-23 08:12:02 +00:00
XAMPPRocky
b6311789bb Add new handling for SPIR-V targets (#559)
* Add new handling for SPIR-V targets

* Ensure target is always three components
2021-04-12 11:19:28 +00:00
XAMPPRocky
3a53968817 Add support for multiple target environments (#533)
* Add support for multiple target environments

* updates from code review

* Update lib.rs
2021-03-29 18:43:07 +02:00
khyperia
f8917fb2c7 CI test format 2021-03-26 13:15:29 +01:00
XAMPPRocky
27eb1d1413 Refactor validation tests to use compiletest (#464)
* Refactor validation tests to use compiletest

* Update tests/ui/lang/core/ptr/allocate_const_scalar.rs
2021-03-18 17:16:21 +00:00
Jake Shadle
44393affe5 Update spirv-tools to 0.5.0 (#496)
* Update spirv-tools to 0.5.0

* Use ubuntu-20.04 image rather than the ambiguous "latest"

* Update spirv-tools binaries to latest
2021-03-16 13:04:23 +01:00
Jake Shadle
a6294e1df4 Update spirv-tools (#351)
* Split android into separate job

* Bump spirv-tools to 0.3.1
2020-12-18 10:44:50 +01:00
Eduard-Mihai Burtescu
2d7541cde4 Don't update rustup in deploy_docs.yaml, GHA already has the right version. 2020-12-09 15:51:24 +00:00
XAMPPRocky
ca8b389b6a Update to use rust-toolchain toml (#284)
* Update to the new rust-toolchain format

* Remove unneeded docs

* Update CI for toolchain file

* Update ci.yaml

* Update ci.yaml

* Update deploy_docs.yml

* Update ci.yaml

* Update deploy_docs.yml

* Remove redundant `rustup component add` commands from ci.yaml.

* Shorten "Continuous integration" to "CI" in ci.yaml.

* Add a helpful message above the TOML in rust-toolchain.

* Don't update rustup in ci.yaml, GHA already has the right version.

Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com>
Co-authored-by: Eduard-Mihai Burtescu <eddyb@lyken.rs>
2020-12-09 17:43:00 +02:00
Eduard-Mihai Burtescu
130b457c7b Run Cargo with --locked on CI. (#313)
* Run Cargo with --locked on CI.

* Update Cargo.lock.
2020-12-04 09:45:57 +01:00
XAMPPRocky
62da29e3c2 Try building docs on macOS 2020-11-23 13:12:34 +01: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
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
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
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
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
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
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