Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/gfx-rs/trunk' into ray-tra…
Browse files Browse the repository at this point in the history
…cing-get-vertex

# Conflicts:
#	naga/src/back/spv/ray.rs
#	naga/src/compact/types.rs
#	naga/src/proc/mod.rs
#	wgpu-hal/examples/ray-traced-triangle/main.rs
#	wgpu-hal/src/dx12/device.rs
  • Loading branch information
Vecvec committed Feb 7, 2025
2 parents c5da888 + c07fab2 commit 78a1ef9
Show file tree
Hide file tree
Showing 484 changed files with 13,663 additions and 4,732 deletions.
5 changes: 1 addition & 4 deletions .deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,11 @@ allow = [
"Unicode-3.0",
"Zlib",
]
private = { ignore = true }

[sources]
allow-git = [
# Waiting on releases; used in examples only
"https://github.com/Razaekel/noise-rs",

"https://github.com/grovesNL/glow",
"https://github.com/gfx-rs/metal-rs",
]
unknown-registry = "deny"
unknown-git = "deny"
Expand Down
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ person(s) who reviewed your changes. This will make sure it gets re-added to the
- [ ] Run `taplo format`.
- [ ] Run `cargo clippy`. If applicable, add:
- [ ] `--target wasm32-unknown-unknown`
- [ ] `--target wasm32-unknown-emscripten`
- [ ] Run `cargo xtask test` to run tests.
- [ ] Add change to `CHANGELOG.md`. See simple instructions inside file.
130 changes: 74 additions & 56 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: CI
on:
push:
branches-ignore: [
# We don't need to run on dependabot PRs.
"dependabot/**",
# This is the branch the merge queue creates.
"gh-readonly-queue/**"
]
# We don't need to run on dependabot PRs.
"dependabot/**",
# This is the branch the merge queue creates.
"gh-readonly-queue/**",
]
tags: [v0.*]
pull_request:
merge_group:
Expand All @@ -20,7 +20,7 @@ env:
# Sourced from https://vulkan.lunarg.com/sdk/home#linux
#
# We don't include the 4th version number, as it's not used in any URL.
VULKAN_SDK_VERSION: "1.3.290"
VULKAN_SDK_VERSION: "1.4.304"
# Sourced from https://www.nuget.org/packages/Microsoft.Direct3D.WARP
WARP_VERSION: "1.0.13"

Expand All @@ -32,14 +32,10 @@ env:

# Sourced from https://archive.mesa3d.org/. Bumping this requires
# updating the mesa build in https://github.com/gfx-rs/ci-build and creating a new release.
MESA_VERSION: "24.2.3"
MESA_VERSION: "24.3.4"
# Corresponds to https://github.com/gfx-rs/ci-build/releases
CI_BINARY_BUILD: "build19"
CI_BINARY_BUILD: "build20"

# We sometimes need nightly to use special things in CI.
#
# In order to prevent CI regressions, we pin the nightly version.
NIGHTLY_VERSION: "nightly-2024-10-17"
# This is the MSRV used by `wgpu` itself and all surrounding infrastructure.
REPO_MSRV: "1.83"
# This is the MSRV used by the `wgpu-core`, `wgpu-hal`, and `wgpu-types` crates,
Expand All @@ -59,15 +55,15 @@ env:
RUSTFLAGS: -D warnings
RUSTDOCFLAGS: -D warnings
WASM_BINDGEN_TEST_TIMEOUT: 300 # 5 minutes
CACHE_SUFFIX: c # cache busting
CACHE_SUFFIX: d # cache busting
WGPU_TESTING: true

# We distinguish the following kinds of builds:
# - native: build for the same target as we compile on
# - web: build for the Web
# - em: build for the Emscripten

# For build time and size optimization we disable debug
# For build time and size optimization we disable debug symbols
# entirely on clippy jobs and reduce it to line-numbers
# only for ones where we run tests.
#
Expand Down Expand Up @@ -161,15 +157,15 @@ jobs:
target: wasm32-unknown-emscripten
tier: 2
kind: wgpu-only

# TODO: Uncomment once web-sys updates past 0.3.76
# See https://github.com/rustwasm/wasm-bindgen/pull/4378 for details
# - name: WebAssembly Core 1.0
# os: ubuntu-22.04
# target: wasm32v1-none
# tier: 2
# kind: no_std

# Bare-metal x86-64
# TODO: Remove once web-sys updates past 0.3.76
# Included while wasm32v1-none is failing to ensure `no_std` does not regress
Expand Down Expand Up @@ -211,13 +207,15 @@ jobs:
rustup toolchain install ${{ env.REPO_MSRV }} --no-self-update --profile=minimal --component clippy,rust-src
echo "RUSTC_BOOTSTRAP=1" >> "$GITHUB_ENV"
- name: disable debug
- name: disable debug symbols
shell: bash
run: |
mkdir -p .cargo
echo """
[profile.dev]
debug = false" >> .cargo/config.toml
cat <<EOF >> .cargo/config.toml
[profile.dev]
debug = false
EOF
- name: caching
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -254,6 +252,9 @@ jobs:
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} --tests --features glsl,spirv
cargo doc --target ${{ matrix.target }} ${{ matrix.extra-flags }} --no-deps --features glsl,spirv
# check with no features
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} --no-default-features
# all features
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} --tests --all-features
cargo doc --target ${{ matrix.target }} ${{ matrix.extra-flags }} --no-deps --all-features
Expand All @@ -273,7 +274,7 @@ jobs:
# Check with all features.
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-hal --all-features
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu --all-features
# Building for no_std platforms where every feature is enabled except "std".
- name: check no_std
if: matrix.kind == 'no_std'
Expand Down Expand Up @@ -356,13 +357,15 @@ jobs:
rustup override set ${{ env.CORE_MSRV }}
cargo -V
- name: disable debug
- name: disable debug symbols
shell: bash
run: |
mkdir -p .cargo
echo """
[profile.dev]
debug = false" >> .cargo/config.toml
cat <<EOF >> .cargo/config.toml
[profile.dev]
debug = false
EOF
- name: caching
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -396,15 +399,15 @@ jobs:
- name: Install Nightly Toolchain
run: |
rustup toolchain install ${{ env.NIGHTLY_VERSION }} --no-self-update --profile=minimal --component clippy
cargo +${{ env.NIGHTLY_VERSION }} -V
rustup toolchain install ${{ env.REPO_MSRV }} --no-self-update --profile=minimal
cargo +${{ env.REPO_MSRV }} -V
- name: Install cargo-hack
uses: taiki-e/install-action@v2
with:
tool: cargo-hack

- name: disable debug
- name: disable debug symbols
shell: bash
run: |
mkdir -p .cargo
Expand All @@ -417,7 +420,9 @@ jobs:
run: |
set -e
cargo +${{ env.NIGHTLY_VERSION }} hack generate-lockfile --remove-dev-deps -Z minimal-versions -p naga -p naga-cli
cargo +${{ env.REPO_MSRV }} hack generate-lockfile --remove-dev-deps -Z minimal-versions -p naga -p naga-cli
env:
RUSTC_BOOTSTRAP: 1

- name: Clippy
shell: bash
Expand All @@ -432,7 +437,6 @@ jobs:

name: Test WebAssembly
runs-on: ubuntu-latest
needs: [check]

steps:
- name: checkout repo
Expand Down Expand Up @@ -472,11 +476,10 @@ jobs:

# Linux
- name: Linux x86_64
os: ubuntu-22.04
os: ubuntu-24.04

name: Test ${{ matrix.name }}
runs-on: ${{ matrix.os }}
needs: [check]

steps:
- name: checkout repo
Expand All @@ -492,6 +495,16 @@ jobs:
with:
tool: cargo-nextest,cargo-llvm-cov

- name: debug symbols to line-tables-only
shell: bash
run: |
mkdir -p .cargo
cat <<EOF >> .cargo/config.toml
[profile.dev]
debug = "line-tables-only"
EOF
# Cache step must go before warp and mesa install on windows as they write into the
# target directory, and rust-cache will overwrite the entirety of the target directory.
- name: caching
Expand Down Expand Up @@ -548,7 +561,7 @@ jobs:
echo "GALLIUM_DRIVER=llvmpipe" >> "$GITHUB_ENV"
- name: (linux) install vulkan sdk
if: matrix.os == 'ubuntu-22.04'
if: matrix.os == 'ubuntu-24.04'
shell: bash
run: |
set -e
Expand All @@ -557,13 +570,13 @@ jobs:
# vulkan sdk
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-$VULKAN_SDK_VERSION-jammy.list https://packages.lunarg.com/vulkan/$VULKAN_SDK_VERSION/lunarg-vulkan-$VULKAN_SDK_VERSION-jammy.list
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-$VULKAN_SDK_VERSION-noble.list https://packages.lunarg.com/vulkan/$VULKAN_SDK_VERSION/lunarg-vulkan-$VULKAN_SDK_VERSION-noble.list
sudo apt-get update
sudo apt install -y vulkan-sdk
- name: (linux) install mesa
if: matrix.os == 'ubuntu-22.04'
if: matrix.os == 'ubuntu-24.04'
shell: bash
run: |
set -e
Expand All @@ -589,14 +602,6 @@ jobs:
echo "LD_LIBRARY_PATH=$PWD/mesa/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH" >> "$GITHUB_ENV"
echo "LIBGL_DRIVERS_PATH=$PWD/mesa/lib/x86_64-linux-gnu/dri" >> "$GITHUB_ENV"
- name: disable debug
shell: bash
run: |
mkdir -p .cargo
echo """
[profile.dev]
debug = 1" >> .cargo/config.toml
- name: run wgpu-info
shell: bash
run: |
Expand Down Expand Up @@ -659,14 +664,6 @@ jobs:
rustup override set ${{ env.REPO_MSRV }}
cargo -V
- name: disable debug
shell: bash
run: |
mkdir -p .cargo
echo """
[profile.dev]
debug = 1" >> .cargo/config.toml
- name: caching
uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -710,7 +707,7 @@ jobs:
run: taplo format --check --diff

- name: Check for typos
uses: crate-ci/typos@v1.29.4
uses: crate-ci/typos@v1.29.5

check-cts-runner:
# runtime is normally 2 minutes
Expand All @@ -728,13 +725,15 @@ jobs:
rustup override set ${{ env.REPO_MSRV }}
cargo -V
- name: disable debug
- name: disable debug symbols
shell: bash
run: |
mkdir -p .cargo
echo """
[profile.dev]
debug = 1" >> .cargo/config.toml
cat <<EOF >> .cargo/config.toml
[profile.dev]
debug = false
EOF
- name: caching
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -781,3 +780,22 @@ jobs:
command: check bans licenses sources
arguments: --all-features --workspace
rust-version: ${{ env.REPO_MSRV }}

check-feature-dependencies:
# runtime is normally 1 minute
timeout-minutes: 5

name: "Feature Dependencies"
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v4

- name: Install Repo MSRV toolchain
run: |
rustup toolchain install ${{ env.REPO_MSRV }} --no-self-update --profile=minimal
rustup override set ${{ env.REPO_MSRV }}
cargo -V
- name: Run `cargo feature-dependencies`
run: cargo xtask check-feature-dependencies
33 changes: 23 additions & 10 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ on:
- trunk

env:
# We need to use nightly for various features
# when building docs.rs style docs.
NIGHTLY_VERSION: nightly-2025-01-09
# This is the MSRV used by `wgpu` itself and all surrounding infrastructure.
REPO_MSRV: "1.83"

CARGO_INCREMENTAL: false
CARGO_TERM_COLOR: always
Expand All @@ -28,17 +27,31 @@ jobs:
persist-credentials: false

- name: Install documentation toolchain
run: rustup toolchain install ${{ env.NIGHTLY_VERSION }} --no-self-update --profile=minimal
run: |
rustup toolchain install ${{ env.REPO_MSRV }} --no-self-update --profile=minimal
rustup override set ${{ env.REPO_MSRV }}
- name: Build the docs (nightly)
- name: disable debug symbols
shell: bash
run: |
cargo +${{ env.NIGHTLY_VERSION }} doc --no-deps --lib
mkdir -p .cargo
cat <<EOF >> .cargo/config.toml
[profile.dev]
debug = false
EOF
- name: caching
uses: Swatinem/rust-cache@v2
with:
key: doc-build

- name: Build the docs
run: |
cargo doc --no-deps --lib --document-private-items
env:
RUSTDOCFLAGS: --cfg docsrs

- name: Build the docs (stable)
run: cargo +stable doc --no-deps --lib
if: ${{ failure() }}
RUSTC_BOOTSTRAP: 1

- name: Deploy the docs
uses: JamesIves/github-pages-deploy-action@v4.7.2
Expand Down
Loading

0 comments on commit 78a1ef9

Please sign in to comment.