chore: release 22.0.0

This commit is contained in:
Erich Gubler 2024-07-17 17:05:46 -04:00
parent 9a0adefe88
commit 6a1432c132
10 changed files with 64 additions and 41 deletions

View File

@ -37,7 +37,27 @@ Bottom level categories:
- Hal - Hal
--> -->
## Unreleased ## 22.0.0 (2024-07-17)
### Overview
### Our first major version release!
For the first time ever, WGPU is being released with a major version (i.e., 22.* instead of 0.22.*)! Maintainership has decided to fully adhere to [Semantic Versioning](https://semver.org/)'s recommendations for versioning production software. According to [SemVer 2.0.0's Q&A about when to use 1.0.0 versions (and beyond)](https://semver.org/spec/v2.0.0.html#how-do-i-know-when-to-release-100):
> ### How do I know when to release 1.0.0?
>
> If your software is being used in production, it should probably already be 1.0.0. If you have a stable API on which users have come to depend, you should be 1.0.0. If youre worrying a lot about backward compatibility, you should probably already be 1.0.0.
It is a well-known fact that WGPU has been used for applications and platforms already in production for years, at this point. We are often concerned with tracking breaking changes, and affecting these consumers' ability to ship. By releasing our first major version, we publicly acknowledge that this is the case. We encourage other projects in the Rust ecosystem to follow suit.
Note that while we start to use the major version number, WGPU is _not_ "going stable", as many Rust projects do. We anticipate many breaking changes before we fully comply with the WebGPU spec., which we expect to take a small number of years.
### Overview
A major ([pun intended](#our-first-major-version-release)) theme of this release is incremental improvement. Among the typically large set of bug fixes, new features, and other adjustments to WGPU by the many contributors listed below, @wumpf and @teoxoy have merged a series of many simplifications to WGPU's internals and, in one case, to the render and compute pass recording APIs. Many of these change WGPU to use atomically reference-counted resource tracking (i.e., `Arc<…>`), rather than using IDs to manage the lifetimes of platform-specific graphics resources in a registry of separate reference counts. This has led us to diagnose and fix many long-standing bugs, and net some neat performance improvements on the order of 40% or more of some workloads.
While the above is exciting, we acknowledge already finding and fixing some (easy-to-fix) regressions from the above work. If you migrate to WGPU 22 and encounter such bugs, please engage us in the issue tracker right away!
### Major Changes ### Major Changes
@ -46,6 +66,7 @@ Bottom level categories:
`wgpu::RenderPass` & `wgpu::ComputePass` recording methods (e.g. `wgpu::RenderPass:set_render_pipeline`) no longer impose a lifetime constraint to objects passed to a pass (like pipelines/buffers/bindgroups/query-sets etc.). `wgpu::RenderPass` & `wgpu::ComputePass` recording methods (e.g. `wgpu::RenderPass:set_render_pipeline`) no longer impose a lifetime constraint to objects passed to a pass (like pipelines/buffers/bindgroups/query-sets etc.).
This means the following pattern works now as expected: This means the following pattern works now as expected:
```rust ```rust
let mut pipelines: Vec<wgpu::RenderPipeline> = ...; let mut pipelines: Vec<wgpu::RenderPipeline> = ...;
// ... // ...
@ -79,6 +100,7 @@ By @wumpf in [#5569](https://github.com/gfx-rs/wgpu/pull/5569), [#5575](https://
Wgpu now supports querying [shader compilation info](https://www.w3.org/TR/webgpu/#dom-gpushadermodule-getcompilationinfo). Wgpu now supports querying [shader compilation info](https://www.w3.org/TR/webgpu/#dom-gpushadermodule-getcompilationinfo).
This allows you to get more structured information about compilation errors, warnings and info: This allows you to get more structured information about compilation errors, warnings and info:
```rust ```rust
... ...
let lighting_shader = ctx.device.create_shader_module(include_wgsl!("lighting.wgsl")); let lighting_shader = ctx.device.create_shader_module(include_wgsl!("lighting.wgsl"));
@ -143,6 +165,7 @@ to pass a compatible surface when targeting WebGL2, having `enumerate_adapters()
By @teoxoy in [#5901](https://github.com/gfx-rs/wgpu/pull/5901) By @teoxoy in [#5901](https://github.com/gfx-rs/wgpu/pull/5901)
### New features ### New features
#### General #### General
- Added `as_hal` for `Buffer` to access wgpu created buffers form wgpu-hal. By @JasondeWolff in [#5724](https://github.com/gfx-rs/wgpu/pull/5724) - Added `as_hal` for `Buffer` to access wgpu created buffers form wgpu-hal. By @JasondeWolff in [#5724](https://github.com/gfx-rs/wgpu/pull/5724)

28
Cargo.lock generated
View File

@ -917,7 +917,7 @@ checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991"
[[package]] [[package]]
name = "d3d12" name = "d3d12"
version = "0.20.0" version = "22.0.0"
dependencies = [ dependencies = [
"bitflags 2.6.0", "bitflags 2.6.0",
"libloading 0.8.4", "libloading 0.8.4",
@ -2179,7 +2179,7 @@ dependencies = [
[[package]] [[package]]
name = "naga" name = "naga"
version = "0.20.0" version = "22.0.0"
dependencies = [ dependencies = [
"arbitrary", "arbitrary",
"arrayvec 0.7.4", "arrayvec 0.7.4",
@ -2207,7 +2207,7 @@ dependencies = [
[[package]] [[package]]
name = "naga-cli" name = "naga-cli"
version = "0.20.0" version = "22.0.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"argh", "argh",
@ -2679,7 +2679,7 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec"
[[package]] [[package]]
name = "player" name = "player"
version = "0.20.0" version = "22.0.0"
dependencies = [ dependencies = [
"env_logger", "env_logger",
"log", "log",
@ -4205,7 +4205,7 @@ dependencies = [
[[package]] [[package]]
name = "wgpu" name = "wgpu"
version = "0.20.0" version = "22.0.0"
dependencies = [ dependencies = [
"arrayvec 0.7.4", "arrayvec 0.7.4",
"cfg_aliases", "cfg_aliases",
@ -4229,7 +4229,7 @@ dependencies = [
[[package]] [[package]]
name = "wgpu-benchmark" name = "wgpu-benchmark"
version = "0.20.0" version = "22.0.0"
dependencies = [ dependencies = [
"bincode", "bincode",
"bytemuck", "bytemuck",
@ -4246,7 +4246,7 @@ dependencies = [
[[package]] [[package]]
name = "wgpu-core" name = "wgpu-core"
version = "0.20.0" version = "22.0.0"
dependencies = [ dependencies = [
"arrayvec 0.7.4", "arrayvec 0.7.4",
"bit-vec", "bit-vec",
@ -4272,7 +4272,7 @@ dependencies = [
[[package]] [[package]]
name = "wgpu-examples" name = "wgpu-examples"
version = "0.20.0" version = "22.0.0"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"cfg-if", "cfg-if",
@ -4303,7 +4303,7 @@ dependencies = [
[[package]] [[package]]
name = "wgpu-hal" name = "wgpu-hal"
version = "0.20.0" version = "22.0.0"
dependencies = [ dependencies = [
"android_system_properties", "android_system_properties",
"arrayvec 0.7.4", "arrayvec 0.7.4",
@ -4327,7 +4327,7 @@ dependencies = [
"js-sys", "js-sys",
"khronos-egl", "khronos-egl",
"libc", "libc",
"libloading 0.8.4", "libloading 0.7.4",
"log", "log",
"metal", "metal",
"naga", "naga",
@ -4351,7 +4351,7 @@ dependencies = [
[[package]] [[package]]
name = "wgpu-info" name = "wgpu-info"
version = "0.20.0" version = "22.0.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"bitflags 2.6.0", "bitflags 2.6.0",
@ -4364,7 +4364,7 @@ dependencies = [
[[package]] [[package]]
name = "wgpu-macros" name = "wgpu-macros"
version = "0.20.0" version = "22.0.0"
dependencies = [ dependencies = [
"heck 0.5.0", "heck 0.5.0",
"quote", "quote",
@ -4373,7 +4373,7 @@ dependencies = [
[[package]] [[package]]
name = "wgpu-test" name = "wgpu-test"
version = "0.20.0" version = "22.0.0"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"arrayvec 0.7.4", "arrayvec 0.7.4",
@ -4408,7 +4408,7 @@ dependencies = [
[[package]] [[package]]
name = "wgpu-types" name = "wgpu-types"
version = "0.20.0" version = "22.0.0"
dependencies = [ dependencies = [
"bitflags 2.6.0", "bitflags 2.6.0",
"js-sys", "js-sys",

View File

@ -47,27 +47,27 @@ keywords = ["graphics"]
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
homepage = "https://wgpu.rs/" homepage = "https://wgpu.rs/"
repository = "https://github.com/gfx-rs/wgpu" repository = "https://github.com/gfx-rs/wgpu"
version = "0.20.0" version = "22.0.0"
authors = ["gfx-rs developers"] authors = ["gfx-rs developers"]
[workspace.dependencies.wgc] [workspace.dependencies.wgc]
package = "wgpu-core" package = "wgpu-core"
path = "./wgpu-core" path = "./wgpu-core"
version = "0.20.0" version = "22.0.0"
[workspace.dependencies.wgt] [workspace.dependencies.wgt]
package = "wgpu-types" package = "wgpu-types"
path = "./wgpu-types" path = "./wgpu-types"
version = "0.20.0" version = "22.0.0"
[workspace.dependencies.hal] [workspace.dependencies.hal]
package = "wgpu-hal" package = "wgpu-hal"
path = "./wgpu-hal" path = "./wgpu-hal"
version = "0.20.0" version = "22.0.0"
[workspace.dependencies.naga] [workspace.dependencies.naga]
path = "./naga" path = "./naga"
version = "0.20.0" version = "22.0.0"
[workspace.dependencies] [workspace.dependencies]
anyhow = "1.0.86" anyhow = "1.0.86"
@ -125,12 +125,12 @@ static_assertions = "1.1.0"
strum = { version = "0.25.0", features = ["derive"] } strum = { version = "0.25.0", features = ["derive"] }
tracy-client = "0.17" tracy-client = "0.17"
thiserror = "1" thiserror = "1"
wgpu = { version = "0.20.0", path = "./wgpu", default-features = false } wgpu = { version = "22.0.0", path = "./wgpu", default-features = false }
wgpu-core = { version = "0.20.0", path = "./wgpu-core" } wgpu-core = { version = "22.0.0", path = "./wgpu-core" }
wgpu-example = { version = "0.20.0", path = "./examples/common" } wgpu-example = { version = "0.20.0", path = "./examples/common" }
wgpu-macros = { version = "0.20.0", path = "./wgpu-macros" } wgpu-macros = { version = "22.0.0", path = "./wgpu-macros" }
wgpu-test = { version = "0.20.0", path = "./tests" } wgpu-test = { version = "22.0.0", path = "./tests" }
wgpu-types = { version = "0.20.0", path = "./wgpu-types" } wgpu-types = { version = "22.0.0", path = "./wgpu-types" }
winit = { version = "0.29", features = ["android-native-activity"] } winit = { version = "0.29", features = ["android-native-activity"] }
# Metal dependencies # Metal dependencies
@ -151,7 +151,7 @@ gpu-allocator = { version = "0.26", default-features = false, features = [
"d3d12", "d3d12",
"public-winapi", "public-winapi",
] } ] }
d3d12 = { version = "0.20.0", path = "./d3d12/" } d3d12 = { version = "22.0.0", path = "./d3d12/" }
range-alloc = "0.1" range-alloc = "0.1"
winapi = "0.3" winapi = "0.3"
hassle-rs = "0.11.0" hassle-rs = "0.11.0"

View File

@ -1,6 +1,6 @@
[package] [package]
name = "d3d12" name = "d3d12"
version = "0.20.0" version = "22.0.0"
authors = ["gfx-rs developers"] authors = ["gfx-rs developers"]
description = "Low level D3D12 API wrapper" description = "Low level D3D12 API wrapper"
repository = "https://github.com/gfx-rs/wgpu/tree/trunk/d3d12" repository = "https://github.com/gfx-rs/wgpu/tree/trunk/d3d12"

View File

@ -1,6 +1,6 @@
[package] [package]
name = "naga-cli" name = "naga-cli"
version = "0.20.0" version = "22.0.0"
authors = ["gfx-rs developers"] authors = ["gfx-rs developers"]
edition = "2021" edition = "2021"
description = "Shader translation command line tool" description = "Shader translation command line tool"
@ -25,7 +25,7 @@ argh = "0.1.5"
anyhow.workspace = true anyhow.workspace = true
[dependencies.naga] [dependencies.naga]
version = "0.20.0" version = "22.0.0"
path = "../naga" path = "../naga"
features = [ features = [
"compact", "compact",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "naga" name = "naga"
version = "0.20.0" version = "22.0.0"
authors = ["gfx-rs developers"] authors = ["gfx-rs developers"]
edition = "2021" edition = "2021"
description = "Shader translation infrastructure" description = "Shader translation infrastructure"

View File

@ -15,7 +15,7 @@ libfuzzer-sys = "0.4"
[target.'cfg(not(any(target_arch = "wasm32", target_os = "ios")))'.dependencies.naga] [target.'cfg(not(any(target_arch = "wasm32", target_os = "ios")))'.dependencies.naga]
path = ".." path = ".."
version = "0.20.0" version = "22.0.0"
features = ["arbitrary", "spv-in", "wgsl-in", "glsl-in"] features = ["arbitrary", "spv-in", "wgsl-in", "glsl-in"]
[[bin]] [[bin]]

View File

@ -1,6 +1,6 @@
[package] [package]
name = "wgpu-core" name = "wgpu-core"
version = "0.20.0" version = "22.0.0"
authors = ["gfx-rs developers"] authors = ["gfx-rs developers"]
edition = "2021" edition = "2021"
description = "WebGPU core logic on wgpu-hal" description = "WebGPU core logic on wgpu-hal"
@ -123,17 +123,17 @@ thiserror = "1"
[dependencies.naga] [dependencies.naga]
path = "../naga" path = "../naga"
version = "0.20.0" version = "22.0.0"
[dependencies.wgt] [dependencies.wgt]
package = "wgpu-types" package = "wgpu-types"
path = "../wgpu-types" path = "../wgpu-types"
version = "0.20.0" version = "22.0.0"
[dependencies.hal] [dependencies.hal]
package = "wgpu-hal" package = "wgpu-hal"
path = "../wgpu-hal" path = "../wgpu-hal"
version = "0.20.0" version = "22.0.0"
default-features = false default-features = false
[build-dependencies] [build-dependencies]

View File

@ -1,6 +1,6 @@
[package] [package]
name = "wgpu-hal" name = "wgpu-hal"
version = "0.20.0" version = "22.0.0"
authors = ["gfx-rs developers"] authors = ["gfx-rs developers"]
edition = "2021" edition = "2021"
description = "WebGPU hardware abstraction layer" description = "WebGPU hardware abstraction layer"
@ -125,7 +125,7 @@ glow = { version = "0.13.1", optional = true }
[dependencies.wgt] [dependencies.wgt]
package = "wgpu-types" package = "wgpu-types"
path = "../wgpu-types" path = "../wgpu-types"
version = "0.20.0" version = "22.0.0"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
# backend: Vulkan # backend: Vulkan
@ -161,7 +161,7 @@ winapi = { version = "0.3", features = [
"winuser", "winuser",
"dcomp", "dcomp",
] } ] }
d3d12 = { path = "../d3d12/", version = "0.20.0", optional = true, features = [ d3d12 = { path = "../d3d12/", version = "22.0.0", optional = true, features = [
"libloading", "libloading",
] } ] }
@ -192,7 +192,7 @@ ndk-sys = { version = "0.5.0", optional = true }
[dependencies.naga] [dependencies.naga]
path = "../naga" path = "../naga"
version = "0.20.0" version = "22.0.0"
[build-dependencies] [build-dependencies]
cfg_aliases.workspace = true cfg_aliases.workspace = true
@ -200,7 +200,7 @@ cfg_aliases.workspace = true
# DEV dependencies # DEV dependencies
[dev-dependencies.naga] [dev-dependencies.naga]
path = "../naga" path = "../naga"
version = "0.20.0" version = "22.0.0"
features = ["wgsl-in"] features = ["wgsl-in"]
[dev-dependencies] [dev-dependencies]

View File

@ -1,6 +1,6 @@
[package] [package]
name = "wgpu-types" name = "wgpu-types"
version = "0.20.0" version = "22.0.0"
authors = ["gfx-rs developers"] authors = ["gfx-rs developers"]
edition = "2021" edition = "2021"
description = "WebGPU types" description = "WebGPU types"