diff --git a/CHANGELOG.md b/CHANGELOG.md index 29824745e8..b65b691d58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,8 +40,7 @@ Bottom level categories: ## Unreleased -- Added an example that shows how to handle datasets too large to fit in a single `GPUBuffer` by distributing it across many buffers, and then having the shader receive them as a `binding_array` of storage buffers. By @alphastrata in [#6138](https://github.com/gfx-rs/wgpu/pull/6138) - +## v25.0.0 (2025-04-10) ### Major Features @@ -58,6 +57,14 @@ By @cwfitzgerald in [#7133](https://github.com/gfx-rs/wgpu/pull/7133) Previously, the `vulkan` and `gles` backends were non-optional on windows, linux, and android and there was no way to disable them. We have now figured out how to properly make them disablable! Additionally, if you turn on the `webgl` feature, you will only get the GLES backend on WebAssembly, it won't leak into native builds, like previously it might have. +> [!WARNING] +> If you use wgpu with `default-features = false` and you want to retain the `vulkan` and `gles` backends, you will need to add them to your feature list. +> +> ```diff +> -wgpu = { version = "24", default-features = false, features = ["metal", "wgsl", "webgl"] } +> +wgpu = { version = "25", default-features = false, features = ["metal", "wgsl", "webgl", "vulkan", "gles"] } + + By @cwfitzgerald in [#7076](https://github.com/gfx-rs/wgpu/pull/7076). #### `device.poll` Api Reworked @@ -134,8 +141,6 @@ There is now documentation to describe how this maps to the various debuggers' a By @cwfitzgerald in [#7470](https://github.com/gfx-rs/wgpu/pull/7470) -#### Naga - ##### Ensure loops generated by SPIR-V and HLSL Naga backends are bounded Make sure that all loops in shaders generated by these naga backends are bounded @@ -207,32 +212,28 @@ Update your calls to `create_shader_module_spirv` and use `create_shader_module_ By @syl20bnr in [#7326](https://github.com/gfx-rs/wgpu/pull/7326). +#### Noop Backend + +It is now possible to create a dummy `wgpu` device even when no GPU is available. This may be useful for testing of code which manages graphics resources. Currently, it supports reading and writing buffers, and other resource types can be created but do nothing. + +To use it, enable the `noop` feature of `wgpu`, and either call `Device::noop()`, or add `NoopBackendOptions { enable: true }` to the backend options of your `Instance` (this is an additional safeguard beyond the `Backends` bits). + +By @kpreid in [#7063](https://github.com/gfx-rs/wgpu/pull/7063) and [#7342](https://github.com/gfx-rs/wgpu/pull/7342). + ### New Features -- Added mesh shader support to `wgpu_hal`. By @SupaMaggie70Incorporated in [#7089](https://github.com/gfx-rs/wgpu/pull/7089) - #### General - -- It is now possible to create a dummy `wgpu` device even when no GPU is available. This may be useful for testing of code which manages graphics resources. Currently, it supports reading and writing buffers, and other resource types can be created but do nothing. - - To use it, enable the `noop` feature of `wgpu`, and either call `Device::noop()`, or add `NoopBackendOptions { enable: true }` to the backend options of your `Instance` (this is an additional safeguard beyond the `Backends` bits). - - By @kpreid in [#7063](https://github.com/gfx-rs/wgpu/pull/7063) and [#7342](https://github.com/gfx-rs/wgpu/pull/7342). - - Add `Buffer` methods corresponding to `BufferSlice` methods, so you can skip creating a `BufferSlice` when it offers no benefit, and `BufferSlice::slice()` for sub-slicing a slice. By @kpreid in [#7123](https://github.com/gfx-rs/wgpu/pull/7123). - Add `BufferSlice::buffer()`, `BufferSlice::offset()` and `BufferSlice::size()`. By @kpreid in [#7148](https://github.com/gfx-rs/wgpu/pull/7148). - Add `impl From for BufferBinding` and `impl From for BindingResource`, allowing `BufferSlice`s to be easily used in creating bind groups. By @kpreid in [#7148](https://github.com/gfx-rs/wgpu/pull/7148). - - Add `util::StagingBelt::allocate()` so the staging belt can be used to write textures. By @kpreid in [#6900](https://github.com/gfx-rs/wgpu/pull/6900). - Added `CommandEncoder::transition_resources()` for native API interop, and allowing users to slightly optimize barriers. By @JMS55 in [#6678](https://github.com/gfx-rs/wgpu/pull/6678). - Add `wgpu_hal::vulkan::Adapter::texture_format_as_raw` for native API interop. By @JMS55 in [#7228](https://github.com/gfx-rs/wgpu/pull/7228). - - Support getting vertices of the hit triangle when raytracing. By @Vecvec in [#7183](https://github.com/gfx-rs/wgpu/pull/7183). - Add `as_hal` for both acceleration structures. By @Vecvec in [#7303](https://github.com/gfx-rs/wgpu/pull/7303). - - Add Metal compute shader passthrough. Use `create_shader_module_passthrough` on device. By @syl20bnr in [#7326](https://github.com/gfx-rs/wgpu/pull/7326). - - new `Features::MSL_SHADER_PASSTHROUGH` run-time feature allows providing pass-through MSL Metal shaders. By @syl20bnr in [#7326](https://github.com/gfx-rs/wgpu/pull/7326). +- Added mesh shader support to `wgpu_hal`. By @SupaMaggie70Incorporated in [#7089](https://github.com/gfx-rs/wgpu/pull/7089) #### Naga @@ -243,6 +244,10 @@ By @syl20bnr in [#7326](https://github.com/gfx-rs/wgpu/pull/7326). - Add support for texture memory barriers. By @Devon7925 in [#7173](https://github.com/gfx-rs/wgpu/pull/7173). - Add polyfills for `unpackSnorm4x8`, `unpackUnorm4x8`, `unpackSnorm2x16`, `unpackUnorm2x16` for GLSL versions they aren't supported in. By @DJMcNab in [#7408](https://github.com/gfx-rs/wgpu/pull/7408). +#### Examples + +- Added an example that shows how to handle datasets too large to fit in a single `GPUBuffer` by distributing it across many buffers, and then having the shader receive them as a `binding_array` of storage buffers. By @alphastrata in [#6138](https://github.com/gfx-rs/wgpu/pull/6138) + ### Changes #### General @@ -255,7 +260,6 @@ By @syl20bnr in [#7326](https://github.com/gfx-rs/wgpu/pull/7326). - Rename `instance_id` and `instance_custom_index` to `instance_index` and `instance_custom_data` by @Vecvec in [#6780](https://github.com/gfx-rs/wgpu/pull/6780) - #### Naga - Naga IR types are now available in the module `naga::ir` (e.g. `naga::ir::Module`). diff --git a/Cargo.lock b/Cargo.lock index 588c7d2ddc..0bbefa43c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2202,7 +2202,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -2254,7 +2254,7 @@ checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" [[package]] name = "lock-analyzer" -version = "24.0.0" +version = "25.0.0" dependencies = [ "anyhow", "ron", @@ -2401,7 +2401,7 @@ dependencies = [ [[package]] name = "naga" -version = "24.0.0" +version = "25.0.0" dependencies = [ "arbitrary", "arrayvec", @@ -2435,7 +2435,7 @@ dependencies = [ [[package]] name = "naga-cli" -version = "24.0.0" +version = "25.0.0" dependencies = [ "anyhow", "argh", @@ -3047,7 +3047,7 @@ checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "player" -version = "24.0.0" +version = "25.0.0" dependencies = [ "env_logger", "log", @@ -4122,7 +4122,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69fff37da548239c3bf9e64a12193d261e8b22b660991c6fd2df057c168f435f" dependencies = [ "cc", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -4613,7 +4613,7 @@ dependencies = [ [[package]] name = "wgpu" -version = "24.0.0" +version = "25.0.0" dependencies = [ "arrayvec", "bitflags 2.9.0", @@ -4640,7 +4640,7 @@ dependencies = [ [[package]] name = "wgpu-benchmark" -version = "24.0.0" +version = "25.0.0" dependencies = [ "bincode", "bytemuck", @@ -4656,7 +4656,7 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "24.0.0" +version = "25.0.0" dependencies = [ "arrayvec", "bit-set 0.8.0", @@ -4689,28 +4689,28 @@ dependencies = [ [[package]] name = "wgpu-core-deps-apple" -version = "24.0.0" +version = "25.0.0" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-core-deps-emscripten" -version = "24.0.0" +version = "25.0.0" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-core-deps-wasm" -version = "24.0.0" +version = "25.0.0" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-core-deps-windows-linux-android" -version = "24.0.0" +version = "25.0.0" dependencies = [ "wgpu-hal", ] @@ -4745,7 +4745,7 @@ dependencies = [ [[package]] name = "wgpu-examples" -version = "24.0.0" +version = "25.0.0" dependencies = [ "bytemuck", "cfg-if", @@ -4776,7 +4776,7 @@ dependencies = [ [[package]] name = "wgpu-hal" -version = "24.0.0" +version = "25.0.0" dependencies = [ "android_system_properties", "arrayvec", @@ -4830,7 +4830,7 @@ dependencies = [ [[package]] name = "wgpu-info" -version = "24.0.0" +version = "25.0.0" dependencies = [ "anyhow", "bitflags 2.9.0", @@ -4844,7 +4844,7 @@ dependencies = [ [[package]] name = "wgpu-macros" -version = "24.0.0" +version = "25.0.0" dependencies = [ "heck 0.5.0", "quote", @@ -4853,7 +4853,7 @@ dependencies = [ [[package]] name = "wgpu-test" -version = "24.0.0" +version = "25.0.0" dependencies = [ "anyhow", "approx", @@ -4893,7 +4893,7 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "24.0.0" +version = "25.0.0" dependencies = [ "bitflags 2.9.0", "bytemuck", @@ -4939,7 +4939,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 36160b7b91..e8d1e7b6a6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,12 +55,12 @@ keywords = ["graphics"] license = "MIT OR Apache-2.0" homepage = "https://wgpu.rs/" repository = "https://github.com/gfx-rs/wgpu" -version = "24.0.0" +version = "25.0.0" authors = ["gfx-rs developers"] [workspace.dependencies] -naga = { version = "24.0.0", path = "./naga" } -wgpu = { version = "24.0.0", path = "./wgpu", default-features = false, features = [ +naga = { version = "25.0.0", path = "./naga" } +wgpu = { version = "25.0.0", path = "./wgpu", default-features = false, features = [ "serde", "wgsl", "vulkan", @@ -70,16 +70,16 @@ wgpu = { version = "24.0.0", path = "./wgpu", default-features = false, features "static-dxc", "noop", # This should be removed if we ever have non-test crates that depend on wgpu ] } -wgpu-core = { version = "24.0.0", path = "./wgpu-core" } -wgpu-hal = { version = "24.0.0", path = "./wgpu-hal" } -wgpu-macros = { version = "24.0.0", path = "./wgpu-macros" } -wgpu-test = { version = "24.0.0", path = "./tests" } -wgpu-types = { version = "24.0.0", path = "./wgpu-types" } +wgpu-core = { version = "25.0.0", path = "./wgpu-core" } +wgpu-hal = { version = "25.0.0", path = "./wgpu-hal" } +wgpu-macros = { version = "25.0.0", path = "./wgpu-macros" } +wgpu-test = { version = "25.0.0", path = "./tests" } +wgpu-types = { version = "25.0.0", path = "./wgpu-types" } -wgpu-core-deps-windows-linux-android = { version = "24.0.0", path = "./wgpu-core/platform-deps/windows-linux-android" } -wgpu-core-deps-apple = { version = "24.0.0", path = "./wgpu-core/platform-deps/apple" } -wgpu-core-deps-wasm = { version = "24.0.0", path = "./wgpu-core/platform-deps/wasm" } -wgpu-core-deps-emscripten = { version = "24.0.0", path = "./wgpu-core/platform-deps/emscripten" } +wgpu-core-deps-windows-linux-android = { version = "25.0.0", path = "./wgpu-core/platform-deps/windows-linux-android" } +wgpu-core-deps-apple = { version = "25.0.0", path = "./wgpu-core/platform-deps/apple" } +wgpu-core-deps-wasm = { version = "25.0.0", path = "./wgpu-core/platform-deps/wasm" } +wgpu-core-deps-emscripten = { version = "25.0.0", path = "./wgpu-core/platform-deps/emscripten" } anyhow = { version = "1.0.97", default-features = false } approx = "0.5" diff --git a/README.md b/README.md index aaf0161839..c1496411f2 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,13 @@ The API is based on the [WebGPU standard][webgpu]. It serves as the core of the | Docs | Examples | Changelog | |:---------------------:|:-------------------------:|:-----------------------:| -| [v24][rel-docs] | [v24][rel-examples] | [v24][rel-change] | +| [v25][rel-docs] | [v25][rel-examples] | [v25][rel-change] | | [`trunk`][trunk-docs] | [`trunk`][trunk-examples] | [`trunk`][trunk-change] | Contributors are welcome! See [CONTRIBUTING.md][contrib] for more information. [rel-docs]: https://docs.rs/wgpu/ -[rel-examples]: https://github.com/gfx-rs/wgpu/tree/v24/examples#readme +[rel-examples]: https://github.com/gfx-rs/wgpu/tree/v25/examples#readme [rel-change]: https://github.com/gfx-rs/wgpu/releases [trunk-docs]: https://wgpu.rs/doc/wgpu/ [trunk-examples]: https://github.com/gfx-rs/wgpu/tree/trunk/examples#readme diff --git a/examples/README.md b/examples/README.md index 2d0cd8bbbd..7de67cda2c 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,6 +1,6 @@ > [!NOTE] > These are the examples for the development version of wgpu. If you want to see the examples for the latest crates.io release -> of wgpu, go to the [latest release branch](https://github.com/gfx-rs/wgpu/tree/v24/examples#readme). +> of wgpu, go to the [latest release branch](https://github.com/gfx-rs/wgpu/tree/v25/examples#readme). # Examples @@ -23,7 +23,7 @@ be cloned out of the repository to serve as a starting point for your own projec You can also use [`cargo-generate`](https://github.com/cargo-generate/cargo-generate) to easily use these as a basis for your own projects. ```sh -cargo generate gfx-rs/wgpu --branch v24 +cargo generate gfx-rs/wgpu --branch v25 ``` ## Framework Examples diff --git a/examples/standalone/01_hello_compute/Cargo.toml b/examples/standalone/01_hello_compute/Cargo.toml index bf3d5cbae5..72b068fbb4 100644 --- a/examples/standalone/01_hello_compute/Cargo.toml +++ b/examples/standalone/01_hello_compute/Cargo.toml @@ -8,4 +8,4 @@ publish = false bytemuck = "1" env_logger = "0.11.8" pollster = "0.4" -wgpu = "24.0.0" +wgpu = "25.0.0" diff --git a/examples/standalone/02_hello_window/Cargo.toml b/examples/standalone/02_hello_window/Cargo.toml index 7448e2f548..5a8f3fb818 100644 --- a/examples/standalone/02_hello_window/Cargo.toml +++ b/examples/standalone/02_hello_window/Cargo.toml @@ -7,5 +7,5 @@ publish = false [dependencies] env_logger = "0.11.8" pollster = "0.4" -wgpu = "24.0.0" +wgpu = "25.0.0" winit = { version = "0.30.8", features = ["android-native-activity"] } diff --git a/examples/standalone/custom_backend/Cargo.toml b/examples/standalone/custom_backend/Cargo.toml index ec37bca111..4a676297c9 100644 --- a/examples/standalone/custom_backend/Cargo.toml +++ b/examples/standalone/custom_backend/Cargo.toml @@ -5,7 +5,7 @@ rust-version = "1.84" publish = false [dependencies] -wgpu = { version = "24.0.0", features = [ +wgpu = { version = "25.0.0", features = [ "custom", "wgsl", ], default-features = false } diff --git a/naga-cli/Cargo.toml b/naga-cli/Cargo.toml index 21255b3671..cf4b085003 100644 --- a/naga-cli/Cargo.toml +++ b/naga-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "naga-cli" -version = "24.0.0" +version = "25.0.0" authors = ["gfx-rs developers"] edition = "2021" description = "CLI for the naga shader translator and validator. Part of the wgpu project" diff --git a/naga/Cargo.toml b/naga/Cargo.toml index fef8c9b43c..1363575781 100644 --- a/naga/Cargo.toml +++ b/naga/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "naga" -version = "24.0.0" +version = "25.0.0" authors = ["gfx-rs developers"] edition = "2021" description = "Shader translator and validator. Part of the wgpu project" diff --git a/naga/fuzz/Cargo.toml b/naga/fuzz/Cargo.toml index 5d8647f19c..48a1958886 100644 --- a/naga/fuzz/Cargo.toml +++ b/naga/fuzz/Cargo.toml @@ -16,8 +16,7 @@ arbitrary = { version = "1.4.1", features = ["derive"] } libfuzzer-sys = ">0.4.0,<=0.4.7" [target.'cfg(not(any(target_arch = "wasm32", target_os = "ios", target_os = "visionos")))'.dependencies.naga] -path = ".." -version = "24.0.0" +workspace = true features = ["arbitrary", "spv-in", "wgsl-in", "glsl-in"] [build-dependencies] diff --git a/wgpu-core/Cargo.toml b/wgpu-core/Cargo.toml index a585692b69..0c93fd9ec5 100644 --- a/wgpu-core/Cargo.toml +++ b/wgpu-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wgpu-core" -version = "24.0.0" +version = "25.0.0" authors = ["gfx-rs developers"] edition = "2021" description = "Core implementation logic of wgpu, the cross-platform, safe, pure-rust graphics API" diff --git a/wgpu-hal/Cargo.toml b/wgpu-hal/Cargo.toml index 56a83c5d4f..c36244050e 100644 --- a/wgpu-hal/Cargo.toml +++ b/wgpu-hal/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wgpu-hal" -version = "24.0.0" +version = "25.0.0" authors = ["gfx-rs developers"] edition = "2021" description = "Hardware abstraction layer for wgpu, the cross-platform, safe, pure-rust graphics API" diff --git a/wgpu-types/Cargo.toml b/wgpu-types/Cargo.toml index d98e8e7cbb..6b79ea0f09 100644 --- a/wgpu-types/Cargo.toml +++ b/wgpu-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wgpu-types" -version = "24.0.0" +version = "25.0.0" authors = ["gfx-rs developers"] edition = "2021" description = "Common types and utilities for wgpu, the cross-platform, safe, pure-rust graphics API"