Skip to content

Commit

Permalink
Merge branch 'trunk' into bgl-dedup-2
Browse files Browse the repository at this point in the history
  • Loading branch information
cwfitzgerald authored Oct 4, 2023
2 parents 6b135e8 + 93d2e5b commit 051e254
Show file tree
Hide file tree
Showing 16 changed files with 245 additions and 80 deletions.
114 changes: 99 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ env:
CARGO_TERM_COLOR: always
RUST_LOG: info
RUST_BACKTRACE: full
MSRV: 1.65
# This is the MSRV used by `wgpu` itself and all surrounding infrastructure.
REPO_MSRV: "1.70"
# This is the MSRV used by the `wgpu-core`, `wgpu-hal`, and `wgpu-types` crates,
# to ensure that they can be used with firefox.
CORE_MSRV: "1.65"
PKG_CONFIG_ALLOW_CROSS: 1 # allow android to work
RUSTFLAGS: --cfg=web_sys_unstable_apis -D warnings
RUSTDOCFLAGS: -Dwarnings
Expand All @@ -32,7 +36,7 @@ env:
# It adds overhead to the build and another point of failure.

jobs:
check-msrv:
check:
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -95,10 +99,11 @@ jobs:
- name: checkout repo
uses: actions/checkout@v4

- name: Install MSRV toolchain
- name: Install Repo MSRV toolchain
run: |
rustup toolchain install ${{ env.MSRV }} --no-self-update --profile=minimal --component clippy --target ${{ matrix.target }}
rustup default ${{ env.MSRV }}
rustup toolchain install ${{ env.REPO_MSRV }} --no-self-update --profile=minimal --component clippy --target ${{ matrix.target }}
rustup override set ${{ env.REPO_MSRV }}
cargo -V
- name: disable debug
shell: bash
Expand Down Expand Up @@ -176,13 +181,77 @@ jobs:
# build docs
cargo doc --target ${{ matrix.target }} --all-features --no-deps
# We run minimal checks on the MSRV of the core crates, ensuring that
# its dependency tree does not cause issues for firefox.
#
# We don't test all platforms, just ones with different dependency stacks.
check-core-msrv:
strategy:
fail-fast: false
matrix:
include:
# Windows
- name: Windows x86_64
os: windows-2022
target: x86_64-pc-windows-msvc

# MacOS
- name: MacOS x86_64
os: macos-12
target: x86_64-apple-darwin

# Linux
- name: Linux x86_64
os: ubuntu-22.04
target: x86_64-unknown-linux-gnu

name: MSRV Check ${{ matrix.name }}
runs-on: ${{ matrix.os }}

steps:
- name: checkout repo
uses: actions/checkout@v4

- name: Install Core MSRV toolchain
run: |
rustup toolchain install ${{ env.CORE_MSRV }} --no-self-update --profile=minimal --component clippy --target ${{ matrix.target }}
rustup override set ${{ env.CORE_MSRV }}
cargo -V
- name: disable debug
shell: bash
run: |
mkdir -p .cargo
echo """
[profile.dev]
debug = false" >> .cargo/config.toml
- name: caching
uses: Swatinem/rust-cache@v2
with:
key: msrv-check-${{ matrix.target }}-${{ env.CACHE_SUFFIX }}

- name: check native
shell: bash
run: |
set -e
# check wgpu-core with all features. This will also get wgpu-hal and wgpu-types.
cargo check --target ${{ matrix.target }} --all-features -p wgpu-core
wasm-test:
name: Test WebAssembly
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 --component clippy --target wasm32-unknown-unknown
rustup override set ${{ env.REPO_MSRV }}
cargo -V
- name: Install wasm-pack
uses: taiki-e/install-action@v2
with:
Expand Down Expand Up @@ -213,7 +282,6 @@ jobs:
os: ubuntu-22.04
backends: vulkan gl


name: Test ${{ matrix.name }}
runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -311,6 +379,12 @@ jobs:
- name: checkout repo
uses: actions/checkout@v4

- name: Install Repo MSRV toolchain
run: |
rustup toolchain install ${{ env.REPO_MSRV }} --no-self-update --profile=minimal --component rustfmt
rustup override set ${{ env.REPO_MSRV }}
cargo -V
- name: disable debug
shell: bash
run: |
Expand All @@ -322,7 +396,7 @@ jobs:
- name: caching
uses: Swatinem/rust-cache@v2
with:
key: clippy-${{ matrix.target }}-${{ matrix.kind }}-${{ env.CACHE_SUFFIX }}
key: doctests-${{ env.CACHE_SUFFIX }}

- name: run doctests
shell: bash
Expand All @@ -338,11 +412,17 @@ jobs:
- name: checkout repo
uses: actions/checkout@v4

- name: Install Repo MSRV toolchain
run: |
rustup toolchain install ${{ env.REPO_MSRV }} --no-self-update --profile=minimal --component rustfmt
rustup override set ${{ env.REPO_MSRV }}
cargo -V
- name: run rustfmt
run: |
cargo fmt -- --check
check-msrv-cts_runner:
check-cts-runner:
name: Clippy cts_runner
runs-on: ubuntu-latest
steps:
Expand All @@ -351,8 +431,9 @@ jobs:

- name: Install MSRV toolchain
run: |
rustup toolchain install ${{ env.MSRV }} --no-self-update --profile=minimal --component clippy
rustup default ${{ env.MSRV }}
rustup toolchain install ${{ env.REPO_MSRV }} --no-self-update --profile=minimal --component clippy
rustup override set ${{ env.REPO_MSRV }}
cargo -V
- name: disable debug
shell: bash
Expand All @@ -365,14 +446,17 @@ jobs:
- name: caching
uses: Swatinem/rust-cache@v2
with:
key: cts_runner-${{ env.CACHE_SUFFIX }}
key: cts-runner-${{ env.CACHE_SUFFIX }}

- name: build Deno
run: |
cargo clippy --manifest-path cts_runner/Cargo.toml
# Separate job so that new advisories don't block CI.
#
# This job is not required to pass for PRs to be merged.
cargo-deny-check-advisories:
name: "Run `cargo deny check advisories`"
name: "cargo-deny advisories"
runs-on: ubuntu-latest
steps:
- name: checkout repo
Expand All @@ -383,10 +467,10 @@ jobs:
with:
command: check advisories
arguments: --all-features --workspace
rust-version: ${{ env.MSRV }}
rust-version: ${{ env.REPO_MSRV }}

cargo-deny-check-rest:
name: "Run `cargo deny check`"
name: "cargo-deny"
runs-on: ubuntu-latest
steps:
- name: checkout repo
Expand All @@ -397,4 +481,4 @@ jobs:
with:
command: check bans licenses sources
arguments: --all-features --workspace
rust-version: ${{ env.MSRV }}
rust-version: ${{ env.REPO_MSRV }}
7 changes: 4 additions & 3 deletions .github/workflows/cts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
CARGO_INCREMENTAL: false
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
MSRV: 1.65
MSRV: "1.70"

jobs:
cts:
Expand Down Expand Up @@ -49,10 +49,11 @@ jobs:
cd cts
git checkout $(cat ../wgpu/cts_runner/revision.txt)
- name: Install MSRV toolchain
- name: Install Repo MSRV toolchain
run: |
rustup toolchain install ${{ env.MSRV }} --no-self-update --profile=minimal --target ${{ matrix.target }}
rustup default ${{ env.MSRV }}
rustup override set ${{ env.MSRV }}
cargo -V
- name: caching
uses: Swatinem/rust-cache@v2
Expand Down
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ depth_ops: Some(wgpu::Operations {

By @wumpf in [#4147](https://github.com/gfx-rs/wgpu/pull/4147)

#### The GLES backend is now optional on Windows & macOS

The `angle` feature flag has to be set for the GLES backend to be enabled on Windows & macOS.

By @teoxoy in [#4185](https://github.com/gfx-rs/wgpu/pull/4185)


### Added/New Features

Expand Down Expand Up @@ -112,6 +118,10 @@ By @wumpf in [#4147](https://github.com/gfx-rs/wgpu/pull/4147)

- Don't bother calling `vkFreeCommandBuffers` when `vkDestroyCommandPool` will take care of that for us. By @jimblandy in [#4059](https://github.com/gfx-rs/wgpu/pull/4059)

#### DX12

- Bump `gpu-allocator` to 0.23. By @Elabajaba in [#4198](https://github.com/gfx-rs/wgpu/pull/4198)


### Documentation
- Use WGSL for VertexFormat example types. By @ScanMountGoat in [#4035](https://github.com/gfx-rs/wgpu/pull/4035)
Expand Down Expand Up @@ -160,6 +170,31 @@ By @wumpf in [#4147](https://github.com/gfx-rs/wgpu/pull/4147)

- Add an overview of `RenderPass` and how render state works. By @kpreid in [#4055](https://github.com/gfx-rs/wgpu/pull/4055)

## v0.17.2 (2023-10-03)

### Bug Fixes

#### Vulkan

- Fix x11 hang while resizing on vulkan. @Azorlogh in [#4184](https://github.com/gfx-rs/wgpu/pull/4184).

## v0.17.1 (2023-09-27)

### Added/New Features

- Add `get_mapped_range_as_array_buffer` for faster buffer read-backs in wasm builds. By @ryankaplan in [#4042] (https://github.com/gfx-rs/wgpu/pull/4042).

### Bug Fixes

#### DX12

- Fix panic on resize when using DX12. By @cwfitzgerald in [#4106](https://github.com/gfx-rs/wgpu/pull/4106)

#### Vulkan

- Suppress validation error caused by OBS layer. This was also fixed upstream. By @cwfitzgerald in [#4002](https://github.com/gfx-rs/wgpu/pull/4002)
- Work around bug in nvidia's vkCmdFillBuffer implementation. By @cwfitzgerald in [#4132](https://github.com/gfx-rs/wgpu/pull/4132).

## v0.17.0 (2023-07-20)

This is the first release that featured `wgpu-info` as a binary crate for getting information about what devices wgpu sees in your system. It can dump the information in both human readable format and json.
Expand Down
Loading

0 comments on commit 051e254

Please sign in to comment.