-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdoc.txt
More file actions
126 lines (95 loc) · 6.84 KB
/
Copy pathdoc.txt
File metadata and controls
126 lines (95 loc) · 6.84 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# Документация по VA-API Linux:
# https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/gpu/vaapi.md
# Группые политики Brave & Chrome
https://github.com/brave/brave-core/tree/512c53c2e6f7104bce88f9563f439a8eb6032f01/components/policy/resources/templates/policy_definitions/BraveSoftware
https://chromium.googlesource.com/chromium/src/+/cdec4ebe6701dc2a6d4134e223629fe798e3161e/chrome/test/data/policy/policy_test_cases.json
https://chromeenterprise.google/policies/#GenerativeAI
# Проверить все флаги Chromium:
# 1: https://source.chromium.org/chromium/chromium/src/+/main:tools/metrics/histograms/enums.xml
# 2: https://source.chromium.org/chromium/chromium/src/+/main:third_party/crossbench-web-tests/third_party/crossbench/crossbench/flags/known_chrome_flags.py
# 3: https://source.chromium.org/chromium/chromium/src/+/main:third_party/crossbench-web-tests/third_party/crossbench/crossbench/flags/known_js_flags.py
# 4: https://source.chromium.org/chromium/chromium/src/+/main:content/public/common/content_switches.cc
# 5: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/flag_descriptions.cc
# 6: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/about_flags.cc
# 7: https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/testing/variations/fieldtrial_testing_config.json
# 8: https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/src/tests/perf_tests/README.md
# 9: https://issues.chromium.org/issues/334275637
# Флаги Skia:
# --enable-features=UIEnableSharedImageCacheForGpu,RustyPng
# DrDc. Direct Rendering Display Compositor в данный момент работает только на Android и частично на MacOS:
# https://source.chromium.org/search?q=EnableDrDc&ss=chromium%2Fchromium%2Fsrc
#--enable-features=EnableDrDc
# Флаги Wayland которые включены по умолчанию:
# Можно проверить тут: https://source.chromium.org/chromium/chromium/src/+/main:ui/base/ui_base_features.cc
# --enable-features=WaylandLinuxDrmSyncobj,WaylandPerSurfaceScale,WaylandTextInputV3
###############################################################################################
https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/doc/DebuggingTips.md
###############################################################################################
Testing with Chrome Canary:
Many of ANGLE's OpenGL ES entry points are exposed in Chromium as WebGL 1.0 and WebGL 2.0 APIs that are available via JavaScript. For testing purposes, custom ANGLE builds may be injected in Chrome Canary.
Setup
Windows
Download and install Google Chrome Canary.
Build ANGLE x64, Release.
Run python scripts\update_chrome_angle.py to replace Canary's ANGLE with your custom ANGLE (note: Canary must be closed).
Linux
Install Google Chrome Dev (via apt, or otherwise). Expected installation directory is /opt/google/chrome-unstable.
Build ANGLE for the running platform. is_component_build = false is suggested in the GN args.
Run python scripts/update_chrome_angle.py to replace Dev's ANGLE with your custom ANGLE
Add ANGLE's build path to the LD_LIBRARY_PATH environment variable.
macOS
Download and install Google Chrome Canary.
Build ANGLE for the running platform; GN args should contain is_debug = false.
Run ./scripts/update_chrome_angle.py to replace Canary's ANGLE with your custom ANGLE.
Usage
Run Chrome:
On Windows: %LOCALAPPDATA%\Google\Chrome SxS\chrome.exe
On Linux: /opt/google/chrome-unstable/google-chrome-unstable
On macOS: ./Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary
With the following command-line options:
--use-cmd-decoder=passthrough --use-gl=angle and one of
--use-angle=d3d9 (Direct3D 9 renderer, Windows only)
--use-angle=d3d11 (Direct3D 11 renderer, Windows only)
--use-angle=d3d11on12 (Direct3D 11on12 renderer, Windows only)
--use-angle=gl (OpenGL renderer)
--use-angle=gles (OpenGL ES renderer)
--use-angle=vulkan (Vulkan renderer)
--use-angle=swiftshader (SwiftShader renderer)
--use-angle=metal (Metal renderer, macOS only)
Additional useful options:
--enable-logging: To see logs
--disable-gpu-watchdog: To disable Chromium's watchdog, killing the GPU process when slow (due to a debug build for example)
--disable-gpu-sandbox: To disable Chromium's sandboxing features, if it's getting in the way of testing.
--disable-gpu-compositing: To make sure only the WebGL test being debugged is run through ANGLE, not the entirety of Chromium.
###############################################################################################
###############################################################################################
Включение Vulkan
###############################################################################################
def SetExtraBrowserOptionsWithBrowser(self, options, possible_browser):
# Make sure WebGPU is enabled if possible, even if not shipped.
# The test itself ensures it won't use a fallback (software) backend.
options.AppendExtraBrowserArgs(['--enable-unsafe-webgpu'])
if possible_browser.platform.GetOSName() == 'linux':
# Flags to make sure Chromium is in the correct mode to run WebGPU.
# testing the backend we get by default. Or, if needed, test both.
options.AppendExtraBrowserArgs([
'--enable-features=Vulkan,VulkanFromANGLE',
'--use-angle=vulkan',
'--ozone-platform=x11',
###############################################################################################
Отключение Vulkan
###############################################################################################
--disable-vulkan -- кажется это применяется только для ffmpeg
--disable-features=Vulkan -- через сами Chome flags настройка
###############################################################################################
Включение OpenGL
###############################################################################################
--use-cmd-decoder=passthrough --use-gl=angle --use-angle=gl
Список эксперементальных функций: [--enable-experimental-web-platform-features]
###############################################################################################
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/runtime_enabled_features.json5
Другие эксперементальные функции:
###############################################################################################
--enable-webgpu-developer-features
--enable-experimental-web-platform-features
--enable-experimental-webassembly-fea