diff --git a/wgpu-core/src/command/compute.rs b/wgpu-core/src/command/compute.rs index 8dbd6efa1..a9f03ac65 100644 --- a/wgpu-core/src/command/compute.rs +++ b/wgpu-core/src/command/compute.rs @@ -503,7 +503,7 @@ impl Global { }; let hal_desc = hal::ComputePassDescriptor { - label: hal_label(base.label.as_deref(), self.instance.flags), + label: hal_label(base.label.as_deref(), device.instance_flags), timestamp_writes, }; diff --git a/wgpu-core/src/command/mod.rs b/wgpu-core/src/command/mod.rs index 91af31662..56cd57e7b 100644 --- a/wgpu-core/src/command/mod.rs +++ b/wgpu-core/src/command/mod.rs @@ -678,9 +678,9 @@ impl Global { } let cmd_buf_raw = cmd_buf_data.encoder.open(&cmd_buf.device)?; - if !self - .instance - .flags + if !cmd_buf + .device + .instance_flags .contains(wgt::InstanceFlags::DISCARD_HAL_LABELS) { unsafe { @@ -714,9 +714,9 @@ impl Global { list.push(TraceCommand::InsertDebugMarker(label.to_string())); } - if !self - .instance - .flags + if !cmd_buf + .device + .instance_flags .contains(wgt::InstanceFlags::DISCARD_HAL_LABELS) { let cmd_buf_raw = cmd_buf_data.encoder.open(&cmd_buf.device)?; @@ -751,9 +751,9 @@ impl Global { } let cmd_buf_raw = cmd_buf_data.encoder.open(&cmd_buf.device)?; - if !self - .instance - .flags + if !cmd_buf + .device + .instance_flags .contains(wgt::InstanceFlags::DISCARD_HAL_LABELS) { unsafe { diff --git a/wgpu-core/src/command/render.rs b/wgpu-core/src/command/render.rs index 17e04d14c..00892f074 100644 --- a/wgpu-core/src/command/render.rs +++ b/wgpu-core/src/command/render.rs @@ -1567,11 +1567,11 @@ impl Global { }; cmd_buf.unlock_encoder().map_pass_err(pass_scope)?; - let hal_label = hal_label(base.label.as_deref(), self.instance.flags); - let device = &cmd_buf.device; let snatch_guard = &device.snatchable_lock.read(); + let hal_label = hal_label(base.label.as_deref(), device.instance_flags); + let (scope, pending_discard_init_fixups) = { let mut cmd_buf_data = cmd_buf.data.lock(); let cmd_buf_data = cmd_buf_data.as_mut().unwrap(); diff --git a/wgpu-core/src/present.rs b/wgpu-core/src/present.rs index b4fe0bbfb..184d2f7f3 100644 --- a/wgpu-core/src/present.rs +++ b/wgpu-core/src/present.rs @@ -179,7 +179,7 @@ impl Global { let clear_view_desc = hal::TextureViewDescriptor { label: hal_label( Some("(wgpu internal) clear surface texture view"), - self.instance.flags, + device.instance_flags, ), format: config.format, dimension: wgt::TextureViewDimension::D2,