watchthelight 2026-10-21
Code review of the Intel Metal path (reading only, nothing run), blockers that remain even once the GPU is claimed:
- ANV maps buffers with plain mmap(2) (anv_kmd_backend.c i915/xe gem_mmap); a macOS device node cannot be mmapped, so this needs the node-ioctl mapping on Darwin.
- libdrm finds render nodes by device minor; clone/first-free minors on macOS do not match renderD128, so enumeration returns no device.
- The i915 backend requires dma-buf sync-file support at probe (i915_gem_supports_dma_buf_sync_file); without PRIME export ANV returns VK_ERROR_INCOMPATIBLE_DRIVER. Darwin should skip it and hide the sync-fd extensions.
- The Metal plugin refuses WindowServer on non-NVIDIA vendors and pins one vendor per process; with two accelerators the first one enumerated decides.
- NVAccel only treats head 0 as its primary framebuffer; a lone head 4 (muxless laptops, NVIDIA without display engine) never gets a display pipe, VRAM or GPU addresses.
None of these show up in drm-shim tests. Order of fixes: node minors and mmap, then the dma-buf probe, then the plugin vendor rule, then NVAccel's head-0 assumption.