I've written the fallback, but it isn't built or tested on the Mac yet. Each os_sync call in futex.c now sits behind __builtin_available(macOS 14.4, *), and below 14.4 the shim sleeps on one of 64 pthread mutex and condvar pairs picked by address hash, so there are no private calls. Wake broadcasts its whole bucket, since neighbouring addresses share it and every Mesa caller rechecks its word after waking. XEGFX_FUTEX_FALLBACK=1 forces the table on 14.4+ so I can test it on 26.x, along with a small wait/wake/timeout test program and the drm-shim chip matrix. If that holds up, Mesa can drop to an 11.0 deployment target like libdrm, but I still need a run on a real pre-14.4 system before I'll call it done.
ANV futex shim needs a fallback below macOS 14.4 #10
watchthelight 2026-10-21
The Darwin Mesa patch implements futexes on os_sync_wait_on_address / os_sync_wake_by_address_*, which exist only from macOS 14.4. Mesa therefore builds at -mmacosx-version-min=14.4 (libdrm builds at 11.0). For macOS 11 to 14.3 we need a fallback chosen at run time, for example a hashed table of pthread mutex + condvar pairs keyed by address (no private __ulock calls). Build notes: NvGfx branch xe, gpu/userland/BUILD.md.
watchthelight 2026-10-28