forked from uazo/cromite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDisable-WebGPU.patch
47 lines (42 loc) · 1.94 KB
/
Disable-WebGPU.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From: uazo <[email protected]>
Date: Mon, 1 May 2023 12:07:49 +0000
Subject: Disable WebGPU
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(-)
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@@ -586,6 +586,8 @@ void SetCustomizedRuntimeFeaturesFromCombinedArgs(
WebRuntimeFeatures::EnableV8IdleTasks(true);
}
+ WebRuntimeFeatures::EnableFeatureFromString("WebGpu", false);
+
WebRuntimeFeatures::EnableBackForwardCache(
content::IsBackForwardCacheEnabled());
diff --git a/gpu/config/gpu_finch_features.cc b/gpu/config/gpu_finch_features.cc
--- a/gpu/config/gpu_finch_features.cc
+++ b/gpu/config/gpu_finch_features.cc
@@ -266,7 +266,7 @@ BASE_FEATURE(kEnableDrDc,
// enabled by default on supported platforms.
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || \
BUILDFLAG(IS_ANDROID)
-#define WEBGPU_ENABLED base::FEATURE_ENABLED_BY_DEFAULT
+#define WEBGPU_ENABLED base::FEATURE_DISABLED_BY_DEFAULT
#else
#define WEBGPU_ENABLED base::FEATURE_DISABLED_BY_DEFAULT
#endif
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
@@ -376,6 +376,7 @@ ScriptPromise GPU::requestAdapter(ScriptState* script_state,
"WebGPU is experimental on this platform. See "
"https://github.com/gpuweb/gpuweb/wiki/"
"Implementation-Status#implementation-status"));
+ //(UAZO) add site setting
}
auto* resolver = MakeGarbageCollected<ScriptPromiseResolver>(script_state);
--