ENABLE(WEBGL_WEBGPU) build flag and WebGLOnWebGPUEnabled preference
Component: WebGL | 7b5ab04
Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
+WebGLOnWebGPUEnabled:
+ type: bool
+ status: internal
+ humanReadableDescription: "Run WebGL with ANGLE in the Web Process on WebGPU, which runs in the GPU Process"
+ condition: ENABLE(WEBGL_WEBGPU)
+ defaultValue: false
+ disableInLockdownMode: true
+ sharedPreferenceForWebProcess: true
Source/cmake/WebKitFeatures.cmake
+ WEBKIT_OPTION_DEFINE(ENABLE_WEBGL_WEBGPU "Toggle the WebGL implementation that runs ANGLE in the Web Process on its WebGPU backend" PRIVATE OFF)
+ WEBKIT_OPTION_DEPEND(ENABLE_WEBGL_WEBGPU ENABLE_WEBGL)
+ WEBKIT_OPTION_DEPEND(ENABLE_WEBGL_WEBGPU ENABLE_WEBGPU)
Today WebGL typically runs ANGLE, the GL-to-native translation layer, in the GPU Process, and the Web Process forwards GL commands to it over IPC. This commit adds scaffolding for the opposite split: ENABLE(WEBGL_WEBGPU) (default off, depending on WebGL and WebGPU) plus an internal, default-off WebGLOnWebGPUEnabled preference that is disabled in Lockdown Mode. No runtime code lands yet.
Current: Planned (WEBGL_WEBGPU):
WebContent -> GL cmds (IPC) WebContent -> ANGLE -> WebGPU backend
-> GPU Process -> ANGLE -> Metal -> WebGPU cmds (IPC) -> GPU Process -> Metal
Significance
The WebContent-to-GPU trust boundary for WebGL is slated to move from a GL command stream to the WebGPU command stream. That shift will matter to anyone with existing tooling aimed at the GL IPC surface.