Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track v23.0.1 patch release #6598

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,25 @@ Bottom level categories:

## Unreleased

## 23.0.1 (2024-11-25)

This release includes patches for `wgpu`, `wgpu-core` and `wgpu-hal`. All other crates remain at [23.0.0](https://github.com/gfx-rs/wgpu/releases/tag/v23.0.0).
Below changes were cherry-picked from 24.0.0 development line.

### Bug fixes

#### General

- Fix Texture view leaks regression. By @xiaopengli89 in [#6576](https://github.com/gfx-rs/wgpu/pull/6576)

#### Metal

- Fix surface creation crashing on iOS. By @mockersf in [#6535](https://github.com/gfx-rs/wgpu/pull/6535)

#### Vulkan

- Fix surface capabilities being advertised when its query failed. By @wumpf in [#6510](https://github.com/gfx-rs/wgpu/pull/6510)

## 23.0.0 (2024-10-25)

### Themes of this release
Expand Down
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ keywords = ["graphics"]
license = "MIT OR Apache-2.0"
homepage = "https://wgpu.rs/"
repository = "https://github.com/gfx-rs/wgpu"
version = "23.0.0"
version = "23.0.1"
authors = ["gfx-rs developers"]

[workspace.dependencies.wgc]
package = "wgpu-core"
path = "./wgpu-core"
version = "23.0.0"
version = "23.0.1"

[workspace.dependencies.wgt]
package = "wgpu-types"
Expand All @@ -63,7 +63,7 @@ version = "23.0.0"
[workspace.dependencies.hal]
package = "wgpu-hal"
path = "./wgpu-hal"
version = "23.0.0"
version = "23.0.1"

[workspace.dependencies.naga]
path = "./naga"
Expand Down Expand Up @@ -126,8 +126,8 @@ static_assertions = "1.1.0"
strum = { version = "0.25.0", features = ["derive"] }
tracy-client = "0.17"
thiserror = "1.0.65"
wgpu = { version = "23.0.0", path = "./wgpu", default-features = false }
wgpu-core = { version = "23.0.0", path = "./wgpu-core" }
wgpu = { version = "23.0.1", path = "./wgpu", default-features = false }
wgpu-core = { version = "23.0.1", path = "./wgpu-core" }
wgpu-macros = { version = "23.0.0", path = "./wgpu-macros" }
wgpu-test = { version = "23.0.0", path = "./tests" }
wgpu-types = { version = "23.0.0", path = "./wgpu-types" }
Expand Down
2 changes: 1 addition & 1 deletion wgpu-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wgpu-core"
version = "23.0.0"
version = "23.0.1"
authors = ["gfx-rs developers"]
edition = "2021"
description = "WebGPU core logic on wgpu-hal"
Expand Down
2 changes: 1 addition & 1 deletion wgpu-core/src/weak_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl<T> WeakVec<T> {
}
if let Some(i) = self.empty_slots.pop() {
self.inner[i] = Some(value);
self.scan_slots_on_next_push = false;
self.scan_slots_on_next_push = self.empty_slots.is_empty();
} else {
self.inner.push(Some(value));
self.scan_slots_on_next_push = self.inner.len() == self.inner.capacity();
Expand Down
2 changes: 1 addition & 1 deletion wgpu-hal/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wgpu-hal"
version = "23.0.0"
version = "23.0.1"
authors = ["gfx-rs developers"]
edition = "2021"
description = "WebGPU hardware abstraction layer"
Expand Down
38 changes: 20 additions & 18 deletions wgpu-hal/src/metal/surface.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![allow(clippy::let_unit_value)] // `let () =` being used to constrain result type

use std::ffi::c_uint;
use std::mem::ManuallyDrop;
use std::ptr::NonNull;
use std::sync::Once;
Expand Down Expand Up @@ -207,23 +206,26 @@ impl super::Surface {
let new_layer: *mut Object = msg_send![class!(CAMetalLayer), new];
let () = msg_send![root_layer, addSublayer: new_layer];

// Automatically resize the sublayer's frame to match the
// superlayer's bounds.
//
// Note that there is a somewhat hidden design decision in this:
// We define the `width` and `height` in `configure` to control
// the `drawableSize` of the layer, while `bounds` and `frame` are
// outside of the user's direct control - instead, though, they
// can control the size of the view (or root layer), and get the
// desired effect that way.
//
// We _could_ also let `configure` set the `bounds` size, however
// that would be inconsistent with using the root layer directly
// (as we may do, see above).
let width_sizable = 1 << 1; // kCALayerWidthSizable
let height_sizable = 1 << 4; // kCALayerHeightSizable
let mask: c_uint = width_sizable | height_sizable;
let () = msg_send![new_layer, setAutoresizingMask: mask];
#[cfg(target_os = "macos")]
{
// Automatically resize the sublayer's frame to match the
// superlayer's bounds.
//
// Note that there is a somewhat hidden design decision in this:
// We define the `width` and `height` in `configure` to control
// the `drawableSize` of the layer, while `bounds` and `frame` are
// outside of the user's direct control - instead, though, they
// can control the size of the view (or root layer), and get the
// desired effect that way.
//
// We _could_ also let `configure` set the `bounds` size, however
// that would be inconsistent with using the root layer directly
// (as we may do, see above).
let width_sizable = 1 << 1; // kCALayerWidthSizable
let height_sizable = 1 << 4; // kCALayerHeightSizable
let mask: std::ffi::c_uint = width_sizable | height_sizable;
let () = msg_send![new_layer, setAutoresizingMask: mask];
}

// Specify the relative size that the auto resizing mask above
// will keep (i.e. tell it to fill out its superlayer).
Expand Down
6 changes: 4 additions & 2 deletions wgpu-hal/src/vulkan/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2254,7 +2254,8 @@ impl crate::Adapter for super::Adapter {
Ok(present_modes) => present_modes,
Err(e) => {
log::error!("get_physical_device_surface_present_modes: {}", e);
Vec::new()
// Per definition of `SurfaceCapabilities`, there must be at least one present mode.
return None;
}
}
};
Expand All @@ -2269,7 +2270,8 @@ impl crate::Adapter for super::Adapter {
Ok(formats) => formats,
Err(e) => {
log::error!("get_physical_device_surface_formats: {}", e);
Vec::new()
// Per definition of `SurfaceCapabilities`, there must be at least one present format.
return None;
}
}
};
Expand Down
5 changes: 1 addition & 4 deletions wgpu/src/backend/wgpu_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -702,10 +702,7 @@ impl crate::Context for ContextWgpuCore {
.surface_get_capabilities(surface_data.id, *adapter_data)
{
Ok(caps) => caps,
Err(wgc::instance::GetSurfaceSupportError::Unsupported) => {
wgt::SurfaceCapabilities::default()
}
Err(err) => self.handle_error_fatal(err, "Surface::get_supported_formats"),
Err(_) => wgt::SurfaceCapabilities::default(),
}
}

Expand Down