Skip to content

Commit

Permalink
Revert mpo from AdapterInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaopengli89 committed Feb 6, 2022
1 parent cbee856 commit fed9a57
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 24 deletions.
19 changes: 1 addition & 18 deletions wgpu-hal/src/dx12/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl super::Adapter {

let mut workarounds = super::Workarounds::default();

let mut info = wgt::AdapterInfo {
let info = wgt::AdapterInfo {
backend: wgt::Backend::Dx12,
name: device_name,
vendor: desc.VendorId as usize,
Expand All @@ -103,25 +103,8 @@ impl super::Adapter {
} else {
wgt::DeviceType::DiscreteGpu
},
mpo: false,
};

unsafe {
for i in 0.. {
let mut output = native::WeakPtr::<dxgi1_3::IDXGIOutput2>::null();
match adapter.EnumOutputs(i, output.mut_void() as _).into_result() {
Ok(_) => {
info.mpo = output.SupportsOverlays() == minwindef::TRUE;
output.destroy();
if info.mpo {
break;
}
}
Err(_) => break,
}
}
}

let mut options: d3d12::D3D12_FEATURE_DATA_D3D12_OPTIONS = unsafe { mem::zeroed() };
assert_eq!(0, unsafe {
device.CheckFeatureSupport(
Expand Down
1 change: 0 additions & 1 deletion wgpu-hal/src/gles/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ impl super::Adapter {
device: 0,
device_type: inferred_device_type,
backend: wgt::Backend::Gl,
mpo: false,
}
}

Expand Down
1 change: 0 additions & 1 deletion wgpu-hal/src/metal/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ impl crate::Instance<Api> for Instance {
device: 0,
device_type: shared.private_caps.device_type(),
backend: wgt::Backend::Metal,
mpo: false,
},
features: shared.private_caps.features(),
capabilities: shared.private_caps.capabilities(),
Expand Down
1 change: 0 additions & 1 deletion wgpu-hal/src/vulkan/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,6 @@ impl super::Instance {
_ => wgt::DeviceType::Other,
},
backend: wgt::Backend::Vulkan,
mpo: false,
};

let (available_features, downlevel_flags) = phd_features.to_wgpu(&phd_capabilities);
Expand Down
2 changes: 0 additions & 2 deletions wgpu-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -975,8 +975,6 @@ pub struct AdapterInfo {
pub device_type: DeviceType,
/// Backend used for device
pub backend: Backend,
/// MPO(Multiple Plane Overlay) supported
pub mpo: bool,
}

/// Describes a [`Device`].
Expand Down
1 change: 0 additions & 1 deletion wgpu/src/backend/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,6 @@ impl crate::Context for Context {
device: 0,
device_type: wgt::DeviceType::Other,
backend: wgt::Backend::BrowserWebGpu,
mpo: false,
}
}

Expand Down

0 comments on commit fed9a57

Please sign in to comment.