Remove redundant device validity check and inaccurate comment

This commit is contained in:
Andy Leiserson 2025-10-22 16:31:03 -07:00 committed by Teodor Tanasoaia
parent 9d0fd2153b
commit 50a26133ec
2 changed files with 0 additions and 6 deletions

View File

@ -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,

View File

@ -2431,7 +2431,6 @@ impl Device {
self: &Arc<Self>,
desc: &binding_model::BindGroupLayoutDescriptor,
) -> Result<Arc<BindGroupLayout>, 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)?;