Remove redundant device validity check and inaccurate comment

This commit is contained in:
Andy Leiserson authored and Teodor Tanasoaia committed 2025-10-30 13:52:58 +01:00
1 parent 9d0fd2153b
commit 50a26133ec
2 files changed
-6

No files matched your search

-5
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,
-1
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)?;