diff --git a/wgpu-core/src/command/bind.rs b/wgpu-core/src/command/bind.rs index c643611a9..a6c6aa9de 100644 --- a/wgpu-core/src/command/bind.rs +++ b/wgpu-core/src/command/bind.rs @@ -325,9 +325,7 @@ impl Binder { bind_group: &Arc>, offsets: &[wgt::DynamicOffset], ) -> &'a [EntryPayload] { - let bind_group_id = bind_group.as_info().id(); - log::trace!("\tBinding [{}] = group {:?}", index, bind_group_id); - debug_assert_eq!(A::VARIANT, bind_group_id.backend()); + log::trace!("\tBinding [{}] = group {}", index, bind_group.error_ident()); let payload = &mut self.payloads[index]; payload.group = Some(bind_group.clone()); diff --git a/wgpu-core/src/command/query.rs b/wgpu-core/src/command/query.rs index 96831c1d1..cae18a84a 100644 --- a/wgpu-core/src/command/query.rs +++ b/wgpu-core/src/command/query.rs @@ -49,10 +49,9 @@ impl QueryResetMap { &mut self, raw_encoder: &mut A::CommandEncoder, query_set_storage: &Storage>, - backend: wgt::Backend, ) -> Result<(), id::QuerySetId> { for (query_set_id, (state, epoch)) in self.map.drain() { - let id = Id::zip(query_set_id, epoch, backend); + let id = Id::zip(query_set_id, epoch, A::VARIANT); let query_set = query_set_storage.get(id).map_err(|_| id)?; debug_assert_eq!(state.len(), query_set.desc.count as usize); diff --git a/wgpu-core/src/command/render.rs b/wgpu-core/src/command/render.rs index cb8141f73..7082e605a 100644 --- a/wgpu-core/src/command/render.rs +++ b/wgpu-core/src/command/render.rs @@ -2435,11 +2435,7 @@ impl Global { cmd_buf_data .pending_query_resets - .reset_queries( - transit, - &query_set_guard, - cmd_buf.device.info.id().backend(), - ) + .reset_queries(transit, &query_set_guard) .map_err(RenderCommandError::InvalidQuerySet) .map_pass_err(PassErrorScope::QueryReset)?; diff --git a/wgpu-core/src/device/resource.rs b/wgpu-core/src/device/resource.rs index 062bb30bc..fed39d3ad 100644 --- a/wgpu-core/src/device/resource.rs +++ b/wgpu-core/src/device/resource.rs @@ -569,8 +569,6 @@ impl Device { desc: &resource::BufferDescriptor, transient: bool, ) -> Result, resource::CreateBufferError> { - debug_assert_eq!(self.as_info().id().backend(), A::VARIANT); - self.check_is_valid()?; if desc.size > self.limits.max_buffer_size { @@ -679,8 +677,6 @@ impl Device { format_features: wgt::TextureFormatFeatures, clear_mode: resource::TextureClearMode, ) -> Texture { - debug_assert_eq!(self.as_info().id().backend(), A::VARIANT); - Texture { inner: Snatchable::new(resource::TextureInner::Native { raw: hal_texture }), device: self.clone(), @@ -710,8 +706,6 @@ impl Device { hal_buffer: A::Buffer, desc: &resource::BufferDescriptor, ) -> Buffer { - debug_assert_eq!(self.as_info().id().backend(), A::VARIANT); - Buffer { raw: Snatchable::new(hal_buffer), device: self.clone(),