diff --git a/dom/webgpu/Instance.cpp b/dom/webgpu/Instance.cpp index a8250f089d86..bbdc5e2f5278 100644 --- a/dom/webgpu/Instance.cpp +++ b/dom/webgpu/Instance.cpp @@ -22,9 +22,9 @@ #include "nsString.h" #include "nsStringFwd.h" -#ifndef EARLY_BETA_OR_EARLIER -# include "mozilla/dom/WorkerPrivate.h" -#endif +// #ifndef EARLY_BETA_OR_EARLIER +// # include "mozilla/dom/WorkerPrivate.h" +// #endif #include #include @@ -113,22 +113,22 @@ already_AddRefed Instance::RequestAdapter( } }; -#ifndef EARLY_BETA_OR_EARLIER - rejectIf(true, "WebGPU is not yet available in Release or late Beta builds."); +// #ifndef EARLY_BETA_OR_EARLIER +// rejectIf(true, "WebGPU is not yet available in Release or late Beta builds."); - // NOTE: Deliberately left after the above check so that we only enter - // here if it's removed. Above is a more informative diagnostic, while the - // check is still present. - // - // Follow-up to remove this check: - // - if (dom::WorkerPrivate* wp = dom::GetCurrentThreadWorkerPrivate()) { - rejectIf(wp->IsServiceWorker(), - "WebGPU in service workers is not yet available in Release or " - "late Beta builds; see " - "."); - } -#endif +// // NOTE: Deliberately left after the above check so that we only enter +// // here if it's removed. Above is a more informative diagnostic, while the +// // check is still present. +// // +// // Follow-up to remove this check: +// // +// if (dom::WorkerPrivate* wp = dom::GetCurrentThreadWorkerPrivate()) { +// rejectIf(wp->IsServiceWorker(), +// "WebGPU in service workers is not yet available in Release or " +// "late Beta builds; see " +// "."); +// } +// #endif rejectIf(!gfx::gfxVars::AllowWebGPU(), "WebGPU is disabled by blocklist."); rejectIf(!StaticPrefs::dom_webgpu_enabled(), "WebGPU is disabled because the `dom.webgpu.enabled` pref. is set " diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index c779e226af3a..d5b9172f807d 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -3223,13 +3223,13 @@ void gfxPlatform::InitWebGPUConfig() { // When this condition changes, be sure to update the `run-if` // conditions in `dom/webgpu/tests/mochitest/*.toml` accordingly. -#if !(defined(NIGHTLY_BUILD) || \ - (defined(XP_WIN) && defined(EARLY_BETA_OR_EARLIER))) - feature.ForceDisable( - FeatureStatus::Blocked, - "WebGPU cannot be enabled unless in Nightly, or Early Beta on Windows.", - "WEBGPU_DISABLE_RELEASE_OR_NON_WINDOWS_EARLY_BETA"_ns); -#endif + // #if !(defined(NIGHTLY_BUILD) || \ + // (defined(XP_WIN) && defined(EARLY_BETA_OR_EARLIER))) + // feature.ForceDisable( + // FeatureStatus::Blocked, + // "WebGPU cannot be enabled unless in Nightly, or Early Beta on Windows.", + // "WEBGPU_DISABLE_RELEASE_OR_NON_WINDOWS_EARLY_BETA"_ns); + // #endif gfxVars::SetAllowWebGPU(feature.IsEnabled());