Files
reims-vgpu/scripts/browser-probe
Anees IqbalandClaude 5ff185d67b ✨ A probe that makes ANGLE name its own Metal refusal
`scripts/browser-probe/guest_angle_metal.py` (measurement only).

With `--use-angle=metal`, Chrome's GPU process died reporting only
"Initialization of all (1) EGL display types failed" — Chrome counting
failures, not ANGLE explaining one. On the OpenGL backend ANGLE's diagnostics
reach the Chrome log through `angle_platform_impl`; on the Metal backend
nothing is printed at all, because the failure happens before that channel
carries anything. The single line that would name the cause is the one Chrome
never gets, which is why this was previously recorded as an unexplained dead
end.

This drives Chrome's own `libEGL.dylib` directly with an `EGL_KHR_debug`
callback installed, asks for a Metal display, and initializes the OpenGL
backend afterwards as a control — if Metal fails and OpenGL succeeds in the
same process, the failure belongs to the Metal path and not to the harness.

Measured in the live guest:

  metal : eglGetPlatformDisplayEXT -> EGL_NO_DISPLAY, eglGetError EGL_SUCCESS
  opengl: eglInitialize OK, EGL 1.5, ANGLE 2.1.28226

EGL_NO_DISPLAY together with EGL_SUCCESS is the finding. ANGLE is not failing
to create the display; it is declining to offer one, from a capability check
that runs before creation. That relocates the question from "why does Metal
device creation fail" — it does not fail, the device resolves — to "which
capability does this guest's Metal device not have".

Two notes for whoever runs this next. The probe loads CoreGraphics before any
Metal call, because a bare ctypes process otherwise latches a nil
system-default device and would manufacture the failure it is diagnosing.
And `eglDebugMessageControlKHR` takes `EGLAttrib*` (`intptr_t`, 64-bit) while
`eglGetPlatformDisplayEXT` takes the EXT spelling `EGLint*` (32-bit); passing
one width for both walks ANGLE off the end of the array and segfaults the
process, which reads as "the Metal backend crashed" rather than "the probe
passed the wrong type". Both cost a debugging cycle here and are commented at
their sites.

Verification: run against the live x86 guest (macOS 13.7.8, `reims-vgpu-pci`),
output above. The OpenGL control arm is what rules out the harness.

Not verified: which capability ANGLE is testing. That is a property of ANGLE,
not of this device, and is being read out of the ANGLE binary separately.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-01 23:43:54 +03:00
..