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

Define wgpu_core::Global::create_render_bundle_error. #3746

Merged
merged 1 commit into from
May 3, 2023
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ By @cwfitzgerald in [#3671](https://github.com/gfx-rs/wgpu/pull/3671).
- Report error messages from DXC compile. By @Davidster in [#3632](https://github.com/gfx-rs/wgpu/pull/3632)
- Error in native when using a filterable `TextureSampleType::Float` on a multisample `BindingType::Texture`. By @mockersf in [#3686](https://github.com/gfx-rs/wgpu/pull/3686)
- On Web, the size of the canvas is adjusted when using `Surface::configure()`. If the canvas was given an explicit size (via CSS), this will not affect the visual size of the canvas. By @daxpedda in [#3690](https://github.com/gfx-rs/wgpu/pull/3690)
- Added `Global::create_render_bundle_error`. By @jimblandy in [#3746](https://github.com/gfx-rs/wgpu/pull/3746)

#### WebGPU

Expand Down
13 changes: 12 additions & 1 deletion wgpu-core/src/device/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3704,6 +3704,18 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
let mut token = Token::root();
let fid = hub.buffers.prepare(id_in);

fid.assign_error(label.borrow_or_default(), &mut token);
}

pub fn create_render_bundle_error<A: HalApi>(
&self,
id_in: Input<G, id::RenderBundleId>,
label: Label,
) {
let hub = A::hub(self);
let mut token = Token::root();
let fid = hub.render_bundles.prepare(id_in);

let (_, mut token) = hub.devices.read(&mut token);
fid.assign_error(label.borrow_or_default(), &mut token);
}
Expand All @@ -3716,7 +3728,6 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
let mut token = Token::root();
let fid = hub.textures.prepare(id_in);

let (_, mut token) = hub.devices.read(&mut token);
fid.assign_error(label.borrow_or_default(), &mut token);
}

Expand Down