From 50a26133ec008908c43d327e103f792f8c1c8ea2 Mon Sep 17 00:00:00 2001 From: Andy Leiserson Date: Wed, 22 Oct 2025 16:31:03 -0700 Subject: [PATCH] Remove redundant device validity check and inaccurate comment --- wgpu-core/src/device/global.rs | 5 ----- wgpu-core/src/device/resource.rs | 1 - 2 files changed, 6 deletions(-) diff --git a/wgpu-core/src/device/global.rs b/wgpu-core/src/device/global.rs index b138738ec..d03ea2ef4 100644 --- a/wgpu-core/src/device/global.rs +++ b/wgpu-core/src/device/global.rs @@ -646,11 +646,6 @@ impl Global { let error = 'error: { let device = self.hub.devices.get(device_id); - // this check can't go in the body of `create_bind_group_layout` since the closure might not get called - if let Err(e) = device.check_is_valid() { - break 'error e.into(); - } - let layout = match device.create_bind_group_layout(desc) { Ok(layout) => layout, Err(e) => break 'error e, diff --git a/wgpu-core/src/device/resource.rs b/wgpu-core/src/device/resource.rs index ff3bd6d0c..6db465f97 100644 --- a/wgpu-core/src/device/resource.rs +++ b/wgpu-core/src/device/resource.rs @@ -2431,7 +2431,6 @@ impl Device { self: &Arc, desc: &binding_model::BindGroupLayoutDescriptor, ) -> Result, binding_model::CreateBindGroupLayoutError> { - // this check can't go in the body of `create_bind_group_layout_internal` since the closure might not get called self.check_is_valid()?; let entry_map = bgl::EntryMap::from_entries(&desc.entries)?;