From fbb65246ce84d3c1269ca30aa0d6a48ad09d4727 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Tue, 2 May 2023 15:21:46 -0700 Subject: [PATCH] Define wgpu_core::Global::create_render_bundle_error. --- wgpu-core/src/device/mod.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/wgpu-core/src/device/mod.rs b/wgpu-core/src/device/mod.rs index 3ba58215b1a..26b34364337 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -3704,6 +3704,19 @@ impl Global { 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( + &self, + id_in: Input, + label: Label, + ) { + log::error!("JIMB: wgpu_core::Global::create_render_bundle_error: 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); } @@ -3716,7 +3729,6 @@ impl Global { 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); }