зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1853952 - Add a pref to assert that wgpu tests run on hardware. r=webgpu-reviewers,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D188726
This commit is contained in:
Родитель
0ad2a767f4
Коммит
83a0c48e36
|
@ -160,6 +160,14 @@ pub unsafe extern "C" fn wgpu_server_adapter_pack_info(
|
|||
backend,
|
||||
} = gfx_select!(id => global.adapter_get_info(id)).unwrap();
|
||||
|
||||
if static_prefs::pref!("dom.webgpu.testing.assert-hardware-adapter") {
|
||||
let is_hardware = match device_type {
|
||||
wgt::DeviceType::IntegratedGpu | wgt::DeviceType::DiscreteGpu => true,
|
||||
_ => false,
|
||||
};
|
||||
assert!(is_hardware, "Expected a hardware gpu adapter, got {:?}", device_type);
|
||||
}
|
||||
|
||||
let info = AdapterInformation {
|
||||
id,
|
||||
limits: restrict_limits(gfx_select!(id => global.adapter_limits(id)).unwrap()),
|
||||
|
|
|
@ -4531,6 +4531,13 @@
|
|||
mirror: always
|
||||
rust: true
|
||||
|
||||
# For testing purposes, crash if we don't get a hardware adapter.
|
||||
- name: dom.webgpu.testing.assert-hardware-adapter
|
||||
type: RelaxedAtomicBool
|
||||
value: false
|
||||
mirror: always
|
||||
rust: true
|
||||
|
||||
# Is support for HTMLInputElement.webkitEntries enabled?
|
||||
- name: dom.webkitBlink.filesystem.enabled
|
||||
type: bool
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
prefs: [dom.webgpu.enabled:true]
|
||||
prefs: [dom.webgpu.enabled:true, dom.webgpu.testing.assert-hardware-adapter:true]
|
||||
lsan-allowed: [Alloc, mozilla::net::nsServerSocket::CreateClientTransport]
|
||||
leak-threshold: [default:51200]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
prefs: [dom.webgpu.enabled:true]
|
||||
prefs: [dom.webgpu.enabled:true, dom.webgpu.testing.assert-hardware-adapter:true]
|
||||
tags: [webgpu]
|
||||
disabled:
|
||||
if release_or_beta: https://mozilla-hub.atlassian.net/browse/FFXP-223
|
||||
|
|
Загрузка…
Ссылка в новой задаче