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

fix(core): handle HAL errors from query set creation #6505

Merged
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ Bottom level categories:

### Bug Fixes

#### General

- Handle query set creation failure as an internal error that loses the `Device`, rather than panicking. By @ErichDonGubler in [#6505](https://github.com/gfx-rs/wgpu/pull/6505).

#### Naga

- Fix crash when a texture argument is missing. By @aedm in [#6486](https://github.com/gfx-rs/wgpu/pull/6486)
Expand Down
3 changes: 2 additions & 1 deletion wgpu-core/src/device/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3605,7 +3605,8 @@ impl Device {

let hal_desc = desc.map_label(|label| label.to_hal(self.instance_flags));

let raw = unsafe { self.raw().create_query_set(&hal_desc).unwrap() };
let raw = unsafe { self.raw().create_query_set(&hal_desc) }
.map_err(|e| self.handle_hal_error(e))?;

let query_set = QuerySet {
raw: ManuallyDrop::new(raw),
Expand Down