mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
[wgpu-core] use device.instance_flags
when possible
This commit is contained in:
parent
5c7389a068
commit
d550342f47
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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();
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user