mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
replace uses of Id.backend()
with A::VARIANT
This commit is contained in:
parent
7b89b6d959
commit
43177d78d6
@ -325,9 +325,7 @@ impl<A: HalApi> Binder<A> {
|
||||
bind_group: &Arc<BindGroup<A>>,
|
||||
offsets: &[wgt::DynamicOffset],
|
||||
) -> &'a [EntryPayload<A>] {
|
||||
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());
|
||||
|
@ -49,10 +49,9 @@ impl<A: HalApi> QueryResetMap<A> {
|
||||
&mut self,
|
||||
raw_encoder: &mut A::CommandEncoder,
|
||||
query_set_storage: &Storage<QuerySet<A>>,
|
||||
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);
|
||||
|
@ -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)?;
|
||||
|
||||
|
@ -569,8 +569,6 @@ impl<A: HalApi> Device<A> {
|
||||
desc: &resource::BufferDescriptor,
|
||||
transient: bool,
|
||||
) -> Result<Buffer<A>, 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<A: HalApi> Device<A> {
|
||||
format_features: wgt::TextureFormatFeatures,
|
||||
clear_mode: resource::TextureClearMode<A>,
|
||||
) -> Texture<A> {
|
||||
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<A: HalApi> Device<A> {
|
||||
hal_buffer: A::Buffer,
|
||||
desc: &resource::BufferDescriptor,
|
||||
) -> Buffer<A> {
|
||||
debug_assert_eq!(self.as_info().id().backend(), A::VARIANT);
|
||||
|
||||
Buffer {
|
||||
raw: Snatchable::new(hal_buffer),
|
||||
device: self.clone(),
|
||||
|
Loading…
Reference in New Issue
Block a user