Disable WebGPU: remove navigator.gpu.wgslLanguageFeatures (#1676)
This commit is contained in:
@@ -6,8 +6,8 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
---
|
||||
content/child/runtime_features.cc | 2 ++
|
||||
gpu/config/gpu_finch_features.cc | 2 +-
|
||||
third_party/blink/renderer/modules/webgpu/gpu.cc | 1 +
|
||||
3 files changed, 4 insertions(+), 1 deletion(-)
|
||||
third_party/blink/renderer/modules/webgpu/gpu.cc | 3 +++
|
||||
3 files changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc
|
||||
--- a/content/child/runtime_features.cc
|
||||
@@ -36,7 +36,16 @@ diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc
|
||||
diff --git a/third_party/blink/renderer/modules/webgpu/gpu.cc b/third_party/blink/renderer/modules/webgpu/gpu.cc
|
||||
--- a/third_party/blink/renderer/modules/webgpu/gpu.cc
|
||||
+++ b/third_party/blink/renderer/modules/webgpu/gpu.cc
|
||||
@@ -401,6 +401,7 @@ ScriptPromise<IDLNullable<GPUAdapter>> GPU::requestAdapter(
|
||||
@@ -143,6 +143,8 @@ GPU::GPU(NavigatorBase& navigator)
|
||||
GPU::~GPU() = default;
|
||||
|
||||
WGSLLanguageFeatures* GPU::wgslLanguageFeatures() const {
|
||||
+ if (!base::FeatureList::IsEnabled(features::kWebGPUService))
|
||||
+ return nullptr;
|
||||
return wgsl_language_features_.Get();
|
||||
}
|
||||
|
||||
@@ -401,6 +403,7 @@ ScriptPromise<IDLNullable<GPUAdapter>> GPU::requestAdapter(
|
||||
"WebGPU is experimental on this platform. See "
|
||||
"https://github.com/gpuweb/gpuweb/wiki/"
|
||||
"Implementation-Status#implementation-status"));
|
||||
|
||||
Reference in New Issue
Block a user