[Docs] (Anland): research note - what MobileGL and Anland would each need for MobileGL to render Anland's Linux apps (glibc split client in the container, bionic render server, native AHB ingress into waylandbridge), with the two source-audit reports, their briefs and the notes index entry

This commit is contained in:
2026-09-30 11:57:57 -04:00
parent 378020adf3
commit b7aa8d2011
6 changed files with 998 additions and 1 deletions
+1 -1
View File
@@ -25,7 +25,7 @@
| **P12**(已收官)server 自有屏幕窗口 | [`p12/`](p12/README.md) | `PLAN-P12.md`、`INTEGRATOR-DECISIONS-P12.md`、`device/` |
| P8 / P9 / P10 / P11 / P13(待排) | [`p8/`](p8/README.md)、[`p9/`](p9/README.md)、[`p10/`](p10/README.md)、[`p11/`](p11/README.md)、[`p13/`](p13/README.md) | 目前只有路线图上的完整范围与出口门 |
跨阶段:[`DEBTS.md`](DEBTS.md)(仍开放的债务与去向)、[`OPEN-QUESTIONS.md`](OPEN-QUESTIONS.md)(开放问题全文,编号稳定);[`handoff/`](handoff/)(P7 的集成者审查稿,路径被 P7 交接文档引用,保持原位);[`recovered/`](recovered/)(从失败的 workflow 运行里捞回的 P0–P2 期材料,`wf1` 设计定稿前的计划草案、`wf2` P0、`wf3` P0.5、`wf4` P1、`wf5` P2;与阶段目录逐字节重复的副本已于 2026-09-24 删除,只留独有的);[`perf-five-arm-20260928/`](perf-five-arm-20260928/README.md)(非阶段的五臂传输性能对比与瓶颈归因,2026-09-28)。
跨阶段:[`DEBTS.md`](DEBTS.md)(仍开放的债务与去向)、[`OPEN-QUESTIONS.md`](OPEN-QUESTIONS.md)(开放问题全文,编号稳定);[`handoff/`](handoff/)(P7 的集成者审查稿,路径被 P7 交接文档引用,保持原位);[`recovered/`](recovered/)(从失败的 workflow 运行里捞回的 P0–P2 期材料,`wf1` 设计定稿前的计划草案、`wf2` P0、`wf3` P0.5、`wf4` P1、`wf5` P2;与阶段目录逐字节重复的副本已于 2026-09-24 删除,只留独有的);[`perf-five-arm-20260928/`](perf-five-arm-20260928/README.md)(非阶段的五臂传输性能对比与瓶颈归因,2026-09-28);[`anland/`](anland/README.md)(非阶段的调研:MobileGL 给 Anland——root Android 上的 Wayland 宿主——当 GL 提供者,两边各要做什么,2026-09-30)。
## 旧引用怎么找
+91
View File
@@ -0,0 +1,91 @@
# MobileGL 作为 Anland 的 GL 提供者:调研(2026-09-30)
> 非阶段笔记。只读源码调研,**没做原型、没上设备**。Anland 审计于 `SuperTurtleDev/anland@cc169180`(6.x main),MobileGL 审计于 `p8/main@648800a2`(P8 收官头)。结论里凡是"要做 / 要改"的都是推断,事实部分在两份报告里逐行有出处。
| 文件 | 内容 |
|---|---|
| [`report-anland.md`](report-anland.md) | Anland 侧:缓冲入口契约、伪造 AHB、同步、帧节奏、进程与 SELinux、容器 GPU 现状、Xwayland glamor、衍生项目、改动插入点(382 处引用) |
| [`report-mobilegl.md`](report-mobilegl.md) | MobileGL 侧:Linux client 构建与导出、EGL / GLX 能力、split 的 present 路径、AHB / fd / fence 现状、会话与多窗口限制、GL 覆盖面、文档漂移 |
| [`brief-anland.md`](brief-anland.md)、[`brief-mobilegl.md`](brief-mobilegl.md) | 派给 Codex 的原始提示词。**两份都把后端名写反了**:Espryt = DirectGLES(GLES),Magma = DirectVulkan(Vulkan);报告已纠正 |
## 结论
可行,但两边都要新东西:
- MobileGL 没有"把帧交回 client"这条路:`MGPPresent` 只有 `FrameSerial`,P12 画在 server 自己的 SurfaceView 上;没有 Wayland WSI、没有可导出的颜色图像、没有 sync_file。
- Anland 的 GPU 缓冲入口只有 `linux-dmabuf` v3 的单平面线性 AR24/XR24,靠高通 snapalloc 布局伪造 AHB(非高通直接失败,没有 CPU 退路);没有原生 AHB 入口。
## Anland 是什么
root Android(KernelSU / SukiSU 模块)上的 Wayland 宿主:守护进程 `waylandbridge`(root,`awl_daemon` 域,bionic,链 Android EGL / GLESv3)实现 Wayland 协议,每个 `xdg_toplevel` 变成一个独立 Android 窗口;Droidspaces 容器经 `/run/anland/wayland-0`(绑定自 `/data/local/tmp/awl`)连入。容器内 GPU 加速 = Mesa freedreno / turnip on kgsl,只有 Adreno;Mali 等走 llvmpipe。
## 推荐形态
```
容器应用 ─ MobileGL client(glibc libEGL/libGL)
│ 同机 unix socket + 共享内存(split 现成)
Android 侧 MobileGL render server(root 守护进程,厂商驱动:Espryt=GLES / Magma=Vulkan)
│ 渲染进 AHB,完整句柄经本机 socket 交给 waylandbridge
waylandbridge ─ SurfaceControl / GLES 合成 ─ SurfaceFlinger
```
- Wayland 连接与窗口仍归 Linux 应用;MobileGL 只管帧。
- P12 的 server 自有全屏窗口不适用(Anland 要每窗一个 Android 窗口)。
- 容器内直接让 Magma 跑在 turnip 上:只有 Adreno,和现有 Mesa 同一驱动,价值小;MobileGL 的价值是把厂商驱动(含 Mali)带进来,只能靠 split 跨到 bionic。
## 两边现状
| | MobileGL | Anland |
|---|---|---|
| 帧入口 / 出口 | `MGPPresent{FrameSerial}`;P12 画在 server 窗口 | `wl_shm` v2(ARGB / XRGB);`linux-dmabuf` v3 单平面线性 AR24/XR24 |
| 窗口系统 | 无 Wayland;EGL 扩展只有 `EGL_KHR_create_context`、`EGL_MESA_platform_surfaceless` | dma-buf → 高通 snapalloc donor 伪造 AHB(写死 HAL BGRA=5,要求 2 fd 句柄) |
| 同步 | 无 sync_file / SYNC_FD;`eglCreateSync` 创建即 signaled,`eglCreateImage` 只登记 | explicit sync v2(sync_file),acquire / release 都有;无 drm-syncobj |
| 原生缓冲 | AHB 只用于 P11 T0 的 BLOB 缓冲存储 | 无原生 AHB 入口;但 SC 池自己分配并上屏 RGBA AHB(`GPU_COLOR_OUTPUT\|GPU_SAMPLED_IMAGE\|COMPOSER_OVERLAY`),消费端能力已有 |
| 并发 | 每 supervisor 一个会话(`Refuse{Busy}`);`pGLContext`、Espryt `g_Display/g_Context/g_Surface`、Magma `pVulkanRenderer` 全局;多 context 未做(DEBTS) | 客户端不限;每窗 ≤16 层;队列 8 |
| 部署 | Linux client 只验过 x86_64;无 aarch64 glibc;只有 `libEGL.so(.1)` 别名,无 glvnd | 模块启动,`awl_daemon` 域 permissive;容器进程在 `droidspacesd` 域 |
## MobileGL 要做的
| # | 项 | 内容 | 量级 |
|---|---|---|---|
| 1 | 帧回交 | server 每个窗口 surface 约 4 个 AHB 槽(RGBA8888);Espryt 用 EGLImage 当默认帧缓冲,Magma 用外部内存 VkImage 代替 swapchain;Present 带 surface id / 槽号 | L |
| 2 | 真 fence | Espryt `EGL_ANDROID_native_fence_sync`、Magma `VK_KHR_external_semaphore_fd`(SYNC_FD)导出完成 fence;导入 release fence 后才复用槽 | M |
| 3 | 协议 | 新窗口类型 + 缓冲池注册 / 帧就绪(带 fence fd)/ 缓冲释放;现有 fd 传递单条 1 fd、sideband 256 B、client 只在握手收 → 要常驻接收;TCP 不传 fd,只能走 unix / `fd:` 端点 | M |
| 4 | client 端 Wayland | `EGL_PLATFORM_WAYLAND_KHR` / `wl_egl_window`;attach / damage / commit、frame callback 定节奏、configure / resize、viewporter 与分数缩放(缓冲像素 ≠ 逻辑尺寸);Anland 隐藏窗口会扣住 callback,不能因此 `PresentCreditTimeout` 丢会话 | M |
| 5 | aarch64 glibc 构建与加载 | 交叉工具链 + CI + 与 Android server 的 wireFingerprint 验收;建议做 glvnd vendor(`__egl_Main` + egl_vendor.d JSON),容器 Mesa 就是 glvnd | M |
| 6 | 多 client / 多窗口 / 多 context | 先 worker-per-client(离屏 fork-per-session 有底子,去掉 Busy、做路由),再 per-surface 池,再真 share group;单窗口游戏可暂缓,GTK / Qt / 浏览器离不开 | L |
| 7 | 部署 | `libMobileGLServer.so --serve unix:/data/local/tmp/awl/mobilegl.sock` 作 root 守护进程由模块拉起、独立 SELinux 域,不走 APK;GLES 有 waylandbridge 先例,Vulkan 需实测 | S |
| 8 | 桌面程序会撞的空壳 | EGL sync / image 空壳;无 `EGL_KHR_surfaceless_context`;GLES context 名不副实(`GL_VERSION` 报桌面 4.6);无固定管线;device lost 时 swap 不返回 `EGL_CONTEXT_LOST`(与 design/08 不符) | 按需 |
| 9 | X11 | GLX 外壳 + MIT-SHM 回读上屏(通用、慢);DRI3 需要 Xwayland glamor(GBM + dma-buf 导入导出)→ 建议 Xwayland 继续用 Mesa / 软件 | 后置 |
## Anland 要改的
| 档 | 改动 | 得到 |
|---|---|---|
| 不改 | server 回读进 `wl_shm`(写进 client 的 shm pool) | 所有 GPU 可用;每帧回读 + 上传(1080p ≈ 8 MB);正确性基线 |
| 不改(dma-buf) | server 专门分配线性 BGRA,client 解析 AHB 线格式取 fd[0] 走 `linux-dmabuf` | 只有高通,脆弱,不推荐 |
| 顺手修 | `DRM_FORMAT_MOD_INVALID` 写成 `0x00ffffff00000000`(UAPI 为 `0x00ffffffffffffff`);offset 被忽略、modifier 不校验 | 修 bug;只往格式表加 AB24 不够(伪造写死 BGRA) |
| 推荐 | ① 给 render server 的本机注册通道(`AHardwareBuffer_recvHandleFromUnixSocket` 或新 binder 事务),返回绑定 client uid 的令牌 ② 新 Wayland 全局把令牌包成 `wl_buffer` ③ `awl_buffer` / `awl_bq_buffer` 改带类型标签(现把 `dmabuf_fd<0` 当空) ④ `awl_ahb_cache_get` 原生缓冲跳过伪造 ⑤ `awl_ahb_hwc_scanout_ok` 不作用于原生缓冲 ⑥ 原生缓冲只走显式 release ⑦ GL / SC 路径正确处理 RGBA | 不依赖高通、Mali 可用;保留 UBWC 与 HWC 直出;glibc client 不碰 gralloc |
| 部署 | `service.sh` 拉起 MobileGL server;sepolicy 新域:`droidspacesd` connectto、双向 fd use、SurfaceFlinger / HWC / system_server 对新域 fd 的 use | 必需 |
| 可选 | `linux-dmabuf` v4 feedback(main_device)、`wp_presentation` | Xwayland / 帧时统计 |
"推荐"档要 Anland 作者合入,先给他们接口草案。
## 分期
1. **M0**(Anland 不改):aarch64 client + Wayland WSI + `wl_shm` 回读,单应用单窗口闭环;验节奏、resize、隐藏窗口。
2. **M1**:真 fence + Anland 原生 AHB 入口,零拷贝。
3. **M2**:多 client / 多窗口 / 多 context,GLES context。
4. **M3**:X11 走 MIT-SHM;glamor / GBM 视需求。
## 只能上设备回答的
- root 守护进程能否加载厂商 Vulkan(GLES 有 waylandbridge 先例)。
- enforcing 下完整的 SELinux 规则。
- 各家 gralloc 的 RGBA / UBWC 缓冲能否被 SF 直接上屏。
- Mali 上回读路径的性能。
## 旁支
- Termux 原生(bionic)程序可以进程内直接加载 MobileGL(monolith,厂商驱动),不需要 split,只要上表 1、2、4;但 Termux 线目前基于 Anland 5.x(lfdevs 维护)。
- 这项工作不在 [`../../ROADMAP.md`](../../ROADMAP.md) 里,要做是一个新阶段。
@@ -0,0 +1,24 @@
# Brief A — Anland deep dive (READ-ONLY research)
Context: we are evaluating whether MobileGL (a desktop-OpenGL implementation for Android that translates GL onto the device's GLES driver ("Magma" backend) or Vulkan driver ("Espryt" backend), and which can now run split into a *client* process (the app's libGL/libEGL, can be glibc Linux) and a *render server* process (on Android, uses the vendor bionic GPU driver), connected by unix socket + shared memory or TCP) could be the GL provider for graphical Linux apps shown through **Anland**. We need precise facts about what Anland accepts and how it works, so we can say what MobileGL must implement and what Anland must change.
Repos are already cloned (shallow, read-only) under:
`<scratchpad>/anland/`
- `SuperTurtleDev_anland` (main = 6.x; the core: `services/waylandbridge/`, `app/`, `app/libawl/`, `module/`, `anland-session/`, `patches/`)
- `SuperTurtleDev_anland-shell`, `lfdevs_anland-termux`, `E7G_wlroots-anland`, `asveroid_anland-plasma-termux`, `Yizhou147_anland-drm`
You may also `git clone --depth 1 -b legacy https://github.com/SuperTurtleDev/anland.git` into that same `anland/` folder if you need to compare with 5.x, and use the web / GitHub (`gh`) for issues/discussions about GPU acceleration. Do NOT modify any other location. Use the shell available to you (Git Bash on Windows is fine; WSL `wsl.exe -d Arch -- bash -lc "..."` also works).
Answer each question with file:line citations. Be concrete; quote struct/enum values and constants where relevant.
1. **Buffer ingress contract of waylandbridge.** Which wl_buffer kinds are accepted (wl_shm formats; zwp_linux_dmabuf_v1 version, formats, modifiers, number of planes, feedback/default-feedback support, `main_device`/dev_t advertised?). What exactly happens to a dma-buf from `create`/`create_immed` to display: read `awl_dmabuf.c`, `awl_bufferqueue.*`, `awl_ahb.cpp` (the "forging" of an AHardwareBuffer around a container dma-buf: donor blob, calibration, `AHardwareBuffer_recvHandleFromUnixSocket`), `awl_gl.cpp`, `awl_sc.cpp`, `awl_renderer.cpp`. What are the preconditions for a dma-buf to be accepted (linear only? stride rules? size? format BGRA only? what if the buffer came from gralloc already?) and failure modes (refuse vs GPU copy). Is there any path that accepts a *native* AHardwareBuffer / gralloc handle from a client directly (not a raw dma-buf)? How is UBWC/compression handled or excluded?
2. **Sync.** `awl_esync.c`: which explicit-sync protocol (zwp_linux_explicit_synchronization_v1 version, linux-drm-syncobj?), acquire fence handling (waits CPU-side? hands to SF as acquire fence?), release fences, `wl_buffer.release` timing in SC vs EGL modes. Implicit sync assumptions for clients that don't use explicit sync.
3. **Presentation / frame pacing.** frame callbacks, presentation-time, how many buffers a client should cycle, what "parking" of hidden windows does to clients (frame callbacks stop?), viewporter/fractional-scale, subsurfaces.
4. **Connection & process model.** How a container app reaches waylandbridge (socket path, bind mount, binder fd passing, `anland-session`/`setup.sh`), what uid / SELinux domain the daemon runs in (`module/sepolicy.rule`, `plat_service_contexts.anland`, `service.sh`), what the container's processes run as, and whether a *second* Android-side daemon (e.g., a GL render server executable shipped by us) could be launched the same way and reached from the container (socket location, SELinux rules that would be needed for fd passing between container processes and that daemon, or an untrusted_app APK process). How does libawl let a third-party Android app host Wayland windows (binder API, `Awl.java`, `AwlClient.java`, `include/awl.h`) — could an Android-side GL server use it?
5. **GPU acceleration today.** How container apps get GPU rendering now (Mesa turnip/freedreno on kgsl? zink? llvmpipe on Mali?): check `patches/xwayland/anland-kgsl-glamor.patch` + README, `anland-session/*`, `lfdevs_anland-termux` (mesa version/build flags, what drivers, termux-native vs proot vs chroot), `asveroid_anland-plasma-termux`, anland-shell. Any mention of Mali/PowerVR/Xclipse support or lack thereof, GL version reached, known perf numbers. What does Xwayland glamor need (GBM, EGL_EXT_image_dma_buf_import, EGL_MESA_image_dma_buf_export, DRI3) and what did the patch change?
6. **The waylandbridge renderer itself.** Does waylandbridge use Android's own EGL/GLES (bionic, vendor driver) — how is it statically linked yet using the vendor driver? What does it tell us about a root native executable on Android loading the vendor GLES/Vulkan driver (linker namespaces)?
7. **Derivatives.** `E7G_wlroots-anland` ("native Anland dma-buf backend"), `Yizhou147_anland-drm`, legacy 5.x "Anland Display Protocol": one paragraph each on what they reveal about alternative frame paths (e.g., a private protocol that could carry AHB handles).
8. **Where Anland would need to change** to (a) accept buffers rendered by an Android-side GL server that allocates them with AHardwareBuffer_allocate (gralloc, possibly UBWC, RGBA8888 i.e. DRM ABGR8888), and (b) avoid the forge round-trip. List the concrete insertion points (functions/files) and the smallest viable change vs the clean change.
Output: write the full report (Markdown, Chinese or English, tables welcome, every claim cited file:line) to
`<scratchpad>/report-anland.md`
**BEFORE** your final message; then make your final message a 10-line summary. Mark anything you inferred (not read) as "inferred".
@@ -0,0 +1,21 @@
# Brief B — MobileGL inventory for a "GL provider for Linux-on-Android (Anland)" scenario (READ-ONLY)
Context: Anland (github.com/SuperTurtleDev/anland, 6.x) is a Wayland host on rooted Android: Linux apps run in a glibc container (Droidspaces chroot; also Termux native (bionic) and PRoot) and connect to a root Android daemon `waylandbridge` over a wayland socket. waylandbridge accepts `wl_shm` and `zwp_linux_dmabuf_v1` buffers (today: single-plane ARGB8888/XRGB8888, LINEAR/INVALID modifier only), forges an AHardwareBuffer around the dma-buf and hands it to SurfaceFlinger (SurfaceControl mode) or composites it with GLES (EGL mode); it also implements zwp_linux_explicit_synchronization_v1. Container apps get GPU today only through Mesa (turnip/freedreno on kgsl, zink) — i.e. Adreno only.
The question: what must **MobileGL** implement so that Linux apps in that container (and Xwayland/X11 apps) render through MobileGL — most plausibly by using the disaggregated split: a glibc aarch64 *client* in the container, the Android *render server* using the vendor driver — and hand frames to Anland.
Code: the up-to-date integration tree is in Arch WSL at `~/w7/p9-main` (branch feat/disaggregated, P8 closed). Operate it ONLY through `wsl.exe -d Arch -- bash -lc "<cmd>"` and read-only commands (cat/grep/git log/git grep/find). Do NOT build, do NOT edit, do NOT run git commands that change the tree (checkout/restore/stash/reset/commit), do NOT touch other trees or devices. Docs to start from: `docs/Disaggregated/ARCHITECTURE.md`, `design/*.md` (esp. 06-transport, 08-runtime-and-platform, 09-build-switches-counters), `ROADMAP.md`, `notes/p12/*`, `notes/DEBTS.md`, `notes/OPEN-QUESTIONS.md`, `MobileGL/MG_Remote/CONTRACT-*.md`, then the code (`MobileGL/MG_Remote/`, `MobileGL/MG_Impl/EGLImpl*`, `MobileGL/MG_Impl/GLXImpl/`, backends' surface/swapchain/present code, CMake options for Linux/client/server builds, `android-plugin/` server APK / `MobileGLDisplayActivity` / `MobileGLServerService`).
Answer each with file:line citations (paths relative to the tree root):
1. **Linux client build.** Can the client side be built for Linux glibc today (x86_64 WSL/CI yes? aarch64?) Which CMake options/presets; which libraries are produced (names/sonames: libGL? libEGL? libMobileGL.so?); which API entry points are exported (desktop GL core/compat versions, GLES API via eglBindAPI(EGL_OPENGL_ES_API)? GLX? EGL?). Is there libglvnd vendor integration (`__egl_Main`, `__glx_Main`, egl_vendor.d JSON) or does it replace libGL/libEGL directly?
2. **EGL frontend capabilities.** Supported EGL platforms/native window types on Linux (surfaceless only? `EGL_PLATFORM` handling, x11/wayland/gbm?), `eglGetPlatformDisplay`, config attributes, window/pbuffer/pixmap surfaces, context sharing, multiple contexts/threads per client, which EGL extensions are advertised (esp. EGL_EXT_image_dma_buf_import(_modifiers), EGL_MESA_image_dma_buf_export, EGL_KHR_fence_sync / EGL_ANDROID_native_fence_sync, EGL_KHR_swap_buffers_with_damage, EGL_EXT_buffer_age). What does GLXImpl do (does it talk to an X server? DRI? or is it a stub for desktop builds)?
3. **Present path in split mode today.** Trace `eglSwapBuffers` from client to server for (a) client-owned window (`SetWindowHandle`, Rule H), (b) `MOBILEGL_IPC_SURFACE=server` ServerOwned (P12), (c) pbuffer/surfaceless. Where does the server get its presentation target in each backend (Espryt: VkSurfaceKHR/VkSwapchainKHR from ANativeWindow? Magma: EGL window surface?). Is there ANY existing code that renders the default framebuffer into an exportable buffer (AHardwareBuffer, dma-buf, VK_ANDROID_external_memory_android_hardware_buffer, VK_KHR_external_memory_fd, EGLImage from AHB, `eglGetNativeClientBufferANDROID`) and sends it back to the client, or that exports a fence fd (VK_KHR_external_semaphore_fd SYNC_FD / EGL_ANDROID_native_fence_sync)? Grep for AHardwareBuffer, dma_buf, DMA_BUF, SCM_RIGHTS, sync_file, SYNC_FD, external_memory across the tree and report every hit's purpose (e.g. P11 adoption / T0 POST).
4. **Fd passing & transports.** Which transports can carry file descriptors (control plane is said not to; the ShmLink aux AF_UNIX rendezvous does SCM_RIGHTS) — where is that code, and how hard is it to add "server → client: here is a buffer fd + a fence fd per present"? Who creates the shm segments (client-owned SEG_CMD/SEG_STAGE via memfd on Linux) — relevant because an Android untrusted_app server may be SELinux-denied `fd use` on fds created by a root container process.
5. **Session/multiplicity limits.** One server per device, one session at a time (`Refuse{Busy}`), one surface mode per session, server-owned single window, "fork-per-session" supervisor for offscreen — cite where these limits live and how deep they are (supervisor only, or process-global state in backends?). What would it take to serve N concurrent clients each with M windows (a Linux desktop runs many GL apps + possibly Xwayland glamor)?
6. **Window-system-facing events already in the protocol.** Resize/geometry, `SurfaceOp/SurfaceReply`, `WindowKind`, device-lost behavior, present credit (`MOBILEGL_IPC_PRESENT_CREDIT`) and how a compositor's frame callbacks / buffer release would plug in.
7. **GL coverage relevant to generic Linux desktop apps** (not only Minecraft): max GL version per backend, compatibility profile / fixed-function support, GLES contexts, GLX_ARB_create_context, known gaps listed in docs. One short table.
8. **Anything in docs/notes/OPEN-QUESTIONS/DEBTS that already anticipates Linux-on-Android, Wayland, dma-buf, AHB export, multi-client, or Termux** — quote it.
Output: write the full report (Markdown; Chinese OK; tables welcome; every claim cited) to the Windows path
`<scratchpad>/report-mobilegl.md`
using your own file-writing tool (not a heredoc inside bash -lc), **BEFORE** your final message; then make your final message a 10-line summary. Mark anything you inferred (not read) as "inferred".
@@ -0,0 +1,270 @@
# Anland × MobileGL: buffer, synchronization, process and integration study
Research date: 2026-09-30. This is a source audit, not a device validation. All audited checkouts were clean; exact revisions are in the table below. Repository citations link to those revisions. Citations of third-party material that was snapshotted during the audit (Xwayland, drm_fourcc.h, Mesa/Termux build files, libwayland, the AHB header, Anland issues/PRs) link to the upstream source at the snapshotted revision; `refs/heads/main` links (the Android header) may have drifted since 2026-09-30. Statements marked **inferred** are architectural conclusions or proposed changes, not implemented behavior.
| Tree | Audited revision | Scope |
|---|---|---|
| `SuperTurtleDev_anland` | `cc1691805fe6aca6851b6fcccb6a1e33019026c1` | Current 6.x main |
| `SuperTurtleDev_anland-shell` | `920fcfc8159690f5232e2d9c7c3294d4c1481145` | Droidspaces launcher |
| `lfdevs_anland-termux` | `a70879f059a2e8439fdb132195c3dd10d4810106` | Legacy-derived Termux integration |
| `E7G_wlroots-anland` | `351399132de0b208ddb36d0ea2fa74cbe668fb72` | Private-protocol wlroots backend |
| `asveroid_anland-plasma-termux` | `099710d413b47d2f3f8c5091a95ee2732d3be0e6` | Termux Plasma installer |
| `Yizhou147_anland-drm` | `850f7ca0e0f25d34dd04baa7e12e8751bcff4951` | Experimental DRM consumer |
| `SuperTurtleDev_anland_legacy` | `9ab13eb146bc9f3dd3cc44cabc268659d9eb0a46` | 5.x comparison |
Main explicitly identifies itself as the 6.x rewrite and explains that 5.x used a private display protocol requiring compositor-specific backends. Do not apply Termux/5.x results automatically to waylandbridge 6.x. [anland/README.md:9–25](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/README.md#L9-L25>) [Termux/README.md:7–13](<https://github.com/lfdevs/anland-termux/blob/a70879f059a2e8439fdb132195c3dd10d4810106/README.md#L7-L13>)
## Decision in brief
**Inferred:** MobileGL can supply rendering to Anland, but successful GL command execution is only half the integration. Current 6.x needs either a `wl_shm` buffer or its narrow raw-dma-buf representation. It does **not** currently expose a native AHardwareBuffer producer import API. The best path for an Android render server is an added native-AHB buffer ingress that preserves the complete gralloc handle, with Wayland buffer lifetime and sync-file fences carried alongside it. The existing Android rendering side already imports AHBs as EGLImages and submits AHBs to SurfaceControl. [waylandbridge/awl_server.c:385–401](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_server.c#L385-L401>) [waylandbridge/awl_internal.h:65–81](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_internal.h#L65-L81>) [waylandbridge/awl_gl.cpp:257–289](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_gl.cpp#L257-L289>) [waylandbridge/awl_sc.cpp:727–743](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L727-L743>)
The highest-impact findings are:
- dma-buf is **v3, one plane, AR24/XR24**, with no device feedback. Native RGBA8888/DRM ABGR8888 is outside that format list. [waylandbridge/awl_dmabuf.c:17–22](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L17-L22>) [waylandbridge/awl_dmabuf.c:105–127](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L105-L127>) [waylandbridge/awl_dmabuf.c:212–237](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L212-L237>) [drm-uapi/drm_fourcc.h:193–199](https://github.com/lfdevs/mesa-for-android-container/blob/98f3d6229d61452cef80f8563af7c56ae599dc14/include/drm-uapi/drm_fourcc.h#L193-L199)
- The actual local `DRM_FORMAT_MOD_INVALID` constant is **wrong relative to DRM UAPI**: `0x00ffffff00000000ULL`, versus UAPI `0x00ffffffffffffff`. Linear `0` is unambiguous. [waylandbridge/awl_internal.h:35–40](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_internal.h#L35-L40>) [drm-uapi/drm_fourcc.h:467–492](https://github.com/lfdevs/mesa-for-android-container/blob/98f3d6229d61452cef80f8563af7c56ae599dc14/include/drm-uapi/drm_fourcc.h#L467-L492) [drm-uapi/drm_fourcc.h:527–544](https://github.com/lfdevs/mesa-for-android-container/blob/98f3d6229d61452cef80f8563af7c56ae599dc14/include/drm-uapi/drm_fourcc.h#L527-L544)
- Both dma-buf rendering modes depend on a **Qualcomm snapalloc-style donor forge**. A GPU-copy fallback for pitch or pacing still needs the forge to succeed; it is not a generic fallback for unknown gralloc layouts. [waylandbridge/awl_ahb.cpp:139–146](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L139-L146>) [waylandbridge/awl_ahb.cpp:325–340](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L325-L340>) [waylandbridge/awl_sc.cpp:903–935](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L903-L935>)
- The “statically-linked ELF” description does not mean a fully static graphics stack: the target links Android `EGL`, `GLESv3`, `nativewindow`, `android`, and `binder_ndk`. [anland/README.md:73–78](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/README.md#L73-L78>) [waylandbridge/CMakeLists.txt:303–308](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/CMakeLists.txt#L303-L308>) [waylandbridge/CMakeLists.txt:364–365](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/CMakeLists.txt#L364-L365>)
## 1. Buffer ingress contract and the complete dma-buf path
### 1.1 What the Wayland endpoint advertises and accepts
| Item | Exact current behavior |
|---|---|
| Core compositor | `wl_compositor` **v4**. [waylandbridge/awl_surface.c:1110–1120](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_surface.c#L1110-L1120>) |
| Shared memory | The pinned libwayland's `wl_display_init_shm()` creates `wl_shm` **v2** and supplies ARGB8888 and XRGB8888. Anland adds no extra formats in server initialization. In `wl_shm` these are **0 and 1**, not DRM fourcc values. [waylandbridge/awl_server.c:385–401](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_server.c#L385-L401>) [libwayland/wayland-shm.c:451–475](https://github.com/SuperTurtleDev/libwayland/blob/37032ecd5bf7657629b9d9725c084025497840d9/src/wayland-shm.c#L451-L475) [waylandbridge/awl_surface.c:1155–1160](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_surface.c#L1155-L1160>) |
| dma-buf global | `zwp_linux_dmabuf_v1` **v3**, with client binds capped at 3. Only `destroy` and `create_params` are implemented on the factory. [waylandbridge/awl_dmabuf.c:212–237](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L212-L237>) |
| dma-buf formats | `AWL_FORMAT_ARGB8888 = fourcc('A','R','2','4')` and `AWL_FORMAT_XRGB8888 = fourcc('X','R','2','4')`; little-endian memory is `[B,G,R,A]` or `[B,G,R,X]`. No AB24/XB24, RGB565, YUV or multi-plane video format. [waylandbridge/awl_internal.h:29–33](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_internal.h#L29-L33>) [waylandbridge/awl_dmabuf.c:17–22](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L17-L22>) [waylandbridge/awl_dmabuf.c:54–57](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L54-L57>) |
| Advertised modifiers | Each format has entries named `DRM_FORMAT_MOD_INVALID` and `DRM_FORMAT_MOD_LINEAR`. The former is locally defined as **`0x00ffffff00000000ULL`**, the latter as **`0ULL`**. Bind sends `format` for every entry, so the two formats are each announced twice; modifier events are conditional on protocol version. [waylandbridge/awl_dmabuf.c:17–22](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L17-L22>) [waylandbridge/awl_dmabuf.c:217–229](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L217-L229>) [waylandbridge/awl_internal.h:35–40](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_internal.h#L35-L40>) |
| Planes and offset | Only `plane_idx == 0`; other planes close the supplied fd and post `ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_PLANE_IDX`. Repeated plane-0 `add` overwrites the previous fd. **Offset is ignored**, not validated or retained. [waylandbridge/awl_dmabuf.c:105–127](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L105-L127>) |
| Feedback / device | No `get_default_feedback`, `get_surface_feedback`, feedback object, format-table/tranche events, or `main_device`/`dev_t` advertisement in this v3 implementation. This is absence of a device advertisement, not a zero-valued or fabricated `dev_t`. The Xwayland patch explicitly compensates for it. [waylandbridge/awl_dmabuf.c:212–237](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L212-L237>) [anland/patches/xwayland/README.anland.md:29–39](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/patches/xwayland/README.anland.md#L29-L39>) |
**Modifier mismatch:** DRM UAPI defines INVALID as `fourcc_mod_code(NONE, DRM_FORMAT_RESERVED)`, with `NONE=0` and `DRM_FORMAT_RESERVED=((1ULL<<56)-1)`. Thus the advertised nonzero value in Anland is not standard INVALID. **Inferred:** a client that compares exact modifier values can reject/misinterpret it. However, Anland's creation path itself does not reject an unadvertised modifier: it only passes the value into logging, then discards it from the persistent buffer wrapper. Therefore “only linear supported” is the intended usable layout, **not a correctly enforced request validator**. [drm-uapi/drm_fourcc.h:467–492](https://github.com/lfdevs/mesa-for-android-container/blob/98f3d6229d61452cef80f8563af7c56ae599dc14/include/drm-uapi/drm_fourcc.h#L467-L492) [drm-uapi/drm_fourcc.h:527–544](https://github.com/lfdevs/mesa-for-android-container/blob/98f3d6229d61452cef80f8563af7c56ae599dc14/include/drm-uapi/drm_fourcc.h#L527-L544) [waylandbridge/awl_internal.h:35–40](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_internal.h#L35-L40>) [waylandbridge/awl_dmabuf.c:49–85](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L49-L85>)
### 1.2 From `create` / `create_immed` to a displayed frame
1. **Protocol creation:** `params_add` records one fd, byte stride and modifier; `create`/`create_immed` require an fd and positive width/height. `dmabuf_buffer_create` rejects formats outside AR24/XR24, takes the fd, records its inode with `fstat`, and constructs a `wl_buffer`. There is no EGL/gralloc import at this stage. `create` sends `created` or `failed`; `create_immed` creates the requested object or posts `INVALID_WL_BUFFER`. Both ignore the `flags` argument. [waylandbridge/awl_dmabuf.c:49–85](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L49-L85>) [waylandbridge/awl_dmabuf.c:105–175](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L105-L175>)
2. **Commit:** `awl_surface_apply_buffer` duplicates the dma-buf fd, takes the explicit acquire fence or snapshots implicit write completion with `awl_dmabuf_export_sync_file`, copies geometry/format into `struct awl_bq_buffer`, and references the `awl_buffer` through an `awl_bufref` release cookie. A full queue returns/drops the new frame immediately. Destroying the protocol buffer does not invalidate already queued frames, which hold their own fd and wrapper references. [waylandbridge/awl_surface.c:184–218](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_surface.c#L184-L218>) [waylandbridge/awl_dmabuf.c:33–46](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L33-L46>) [waylandbridge/awl_bufferqueue.h:63–76](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.h#L63-L76>)
3. **Queue:** mailbox-like draining drops superseded heads only while the next element is ready, assuming FIFO completion. The retained head and consumer references determine lifetime; the last reference runs the release callback and closes its owned fds. Capacity is **8** elements, including the head. [waylandbridge/awl_bufferqueue.c:43–48](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.c#L43-L48>) [waylandbridge/awl_bufferqueue.c:201–210](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.c#L201-L210>) [waylandbridge/awl_bufferqueue.c:379–388](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.c#L379-L388>)
4. **AHB resolution:** each layer has an eight-slot cache. Its key is **`(ino,width,height,stride)`**, not modifier or format. A miss calls `awl_ahb_wrap`; a hit reuses the registered AHB and, for GL, its EGLImage/texture payload. A failed forge leaves the cache unchanged for a later retry. [waylandbridge/awl_ahb.hpp:53–69](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.hpp#L53-L69>) [waylandbridge/awl_ahb.cpp:534–569](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L534-L569>)
5. **EGL renderer:** ready dma-buf → forged AHB → `eglGetNativeClientBufferANDROID` → `eglCreateImageKHR(..., EGL_NATIVE_BUFFER_ANDROID, ...)` → `glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, ...)` → per-window GPU composition → `eglSwapBuffers`. A missing texture skips that layer; no direct `EGL_LINUX_DMA_BUF_EXT` fallback is attempted here. [waylandbridge/awl_renderer.cpp:292–323](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_renderer.cpp#L292-L323>) [waylandbridge/awl_gl.cpp:257–289](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_gl.cpp#L257-L289>) [waylandbridge/awl_renderer.cpp:382–419](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_renderer.cpp#L382-L419>)
6. **SurfaceControl renderer:** `enum sc_mode { SC_MODE_NONE=0, SC_MODE_SCANOUT, SC_MODE_EGL, SC_MODE_EGL_SHM }`. `SCANOUT` submits the forged client AHB through `ASurfaceTransaction_setBuffer[WithRelease]`. `EGL` samples that forged AHB into a platform-allocated AHB for this layer. `EGL_SHM` uploads shared-memory pixels into a texture and blits into such a target. Every Wayland layer becomes a SurfaceControl sibling. **Inferred:** the name `SCANOUT` describes Anland's zero-copy submission; actual HWC-plane assignment remains SurfaceFlinger's decision. [waylandbridge/awl_sc.cpp:1–30](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L1-L30>) [waylandbridge/awl_sc.cpp:358–364](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L358-L364>) [waylandbridge/awl_sc.cpp:727–743](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L727-L743>) [waylandbridge/awl_sc.cpp:903–975](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L903-L975>)
### 1.3 What the forge actually does
The source describes a specific Qualcomm **snapalloc** layout: native handle **fd[0] = pixel dma-buf, fd[1] = metadata blob**, observed as about **28 KiB**. It explains that a container KGSL dma-buf lacks that descriptor and a bare `GB01+fd` import was rejected. `donor_blob_fd` explicitly refuses a donor unless `numFds == 2`. This is not a vendor-neutral construction of an AHB from any dma-buf. [waylandbridge/awl_ahb.cpp:5–28](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L5-L28>) [waylandbridge/awl_ahb.cpp:139–146](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L139-L146>)
Calibration allocates BGRA donors of **300×300** and **1134×567**, both with `AWL_AHB_DONOR_USAGE = AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE`. It reads allocator-reported stride and pixel-allocation size, mmaps their metadata blobs, and locates geometry/size fields by comparing the two layouts. Blob sizes must agree and be positive; native-handle integer counts must agree and be at most **64**. It requires recognized stride-in-pixels, stride-in-bytes, height, allocation/exact size, extent and native-handle integer fields; failure reports **“vendor layout changed, refusing to forge.”** [waylandbridge/awl_ahb.hpp:19–23](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.hpp#L19-L23>) [waylandbridge/awl_ahb.cpp:172–220](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L172-L220>) [waylandbridge/awl_ahb.cpp:223–274](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L223-L274>)
`awl_ahb_wrap` serializes calibration/import with a mutex and hardcodes **`AWL_HAL_BGRA_8888 = 5`**. It reuses an existing matching-geometry AHB as donor, without modifying its live blob, or allocates a **4×4** donor. It patches the cold donor's blob and integer payload to client geometry, **`stride/4`** and **`stride*height`**. Both calibrated allocation-size and exact-size metadata fields are set to that product; this path does not query or validate the actual client dma-buf extent. [waylandbridge/awl_geom.h:42–51](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_geom.h#L42-L51>) [waylandbridge/awl_ahb.cpp:300–320](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L300-L320>) [waylandbridge/awl_ahb.cpp:325–395](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L325-L395>)
It then fabricates the Android `GraphicBuffer::flatten` representation: **13 int32 header words**, magic **`0x47423031` (`GB01`)**, width/height/stride/HAL format, layer count **1**, usage words, synthetic buffer id with **bit 63 set**, generation **0**, **two fds**, and the donor's integer count. A local `AF_UNIX/SOCK_STREAM` socketpair carries the flattened bytes plus `SCM_RIGHTS` containing **`dup(client_pixel_fd)` and `dup(donor_blob_fd)`**. `AHardwareBuffer_recvHandleFromUnixSocket` reconstructs/registers the AHB through Android/gralloc. That socketpair is entirely inside the daemon; it is **not** a client-facing native-AHB transport. [waylandbridge/awl_ahb.cpp:398–480](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L398-L480>)
### 1.4 Usable layout preconditions versus checks that are actually implemented
| Condition | What is checked / practical implication |
|---|---|
| Format | Protocol admits only AR24/XR24; forge always describes HAL BGRA8888. RGBA8888 is DRM **AB24**, so simply relabeling it AR24 swaps red/blue. [waylandbridge/awl_dmabuf.c:54–57](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L54-L57>) [waylandbridge/awl_ahb.cpp:334–336](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L334-L336>) [drm-uapi/drm_fourcc.h:193–199](https://github.com/lfdevs/mesa-for-android-container/blob/98f3d6229d61452cef80f8563af7c56ae599dc14/include/drm-uapi/drm_fourcc.h#L193-L199) |
| Linear, zero-offset data | Offset is ignored and modifier is not kept in `awl_buffer` or the queue. **Inferred:** correct pixels require the simple packed layout described by the forge; arbitrary tiling/compression cannot be represented by supplying an fd alone. [waylandbridge/awl_dmabuf.c:105–127](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L105-L127>) [waylandbridge/awl_internal.h:71–81](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_internal.h#L71-L81>) [waylandbridge/awl_bufferqueue.h:63–76](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.h#L63-L76>) |
| Dimensions / byte extent | Only `width>0,height>0` are validated at request time. There is no request-time `stride>=width*4`, overflow, actual-fd-size or maximum-texture-size check in this constructor. **Inferred:** the client must provide sufficiently large storage with sane geometry; protocol creation success does not establish import or sampling safety. [waylandbridge/awl_dmabuf.c:49–85](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L49-L85>) [waylandbridge/awl_dmabuf.c:130–175](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L130-L175>) [waylandbridge/awl_ahb.cpp:377–395](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L377-L395>) |
| Byte stride | Forge converts with integer `stride/4`. Scanout rejects a stride not divisible by 4; that is not a universal ingress rejection. **Inferred:** valid packed-32-bit buffers should use a stride divisible by 4 and at least width×4. [waylandbridge/awl_ahb.cpp:87–91](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L87-L91>) [waylandbridge/awl_ahb.cpp:377–395](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L377-L395>) |
| HWC-compatible stride | Let `p = stride/4`. `awl_ahb_hwc_scanout_ok` probes allocator stride for **width p**, height **64**, BGRA and donor usage. It accepts if the returned pitch equals p, or if the probe returns **0** (no verdict, keep HWC). It does not merely compare allocator stride at the buffer's logical width. [waylandbridge/awl_ahb.cpp:60–91](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L60-L91>) |
| Non-fixed-point pitch | Forces a GPU blit into a platform allocation. The source documents pitch **1024 px → gralloc 1280 px** causing DRM `ADDFB2` failure/blank HWC output while GPU composition/screenshots looked correct. The forge must still succeed for that source texture. [waylandbridge/awl_sc.cpp:22–30](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L22-L30>) [waylandbridge/awl_sc.cpp:903–935](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L903-L935>) |
| Unsupported donor layout | Wrong fd count, unrecognized metadata, mmap/allocation/import failure → `NULL`, log, blank/skipped or old retained layer. There is no generic CPU upload fallback in the audited main. [waylandbridge/awl_ahb.cpp:139–146](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L139-L146>) [waylandbridge/awl_ahb.cpp:264–274](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L264-L274>) [waylandbridge/awl_ahb.cpp:337–340](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L337-L340>) [waylandbridge/awl_renderer.cpp:295–323](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_renderer.cpp#L295-L323>) [waylandbridge/awl_sc.cpp:729–735](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L729-L735>) |
**Already-gralloc-allocated input:** extracting only its pixel fd and submitting it through linux-dmabuf still enters this forge; the original gralloc metadata and complete native handle never reach the renderer. There is no detection of “this came from gralloc, use its original handle.” **Inferred:** a genuinely linear BGRA allocation with compatible pitch might happen to work, but native allocation provenance alone is no guarantee. A compressed native allocation is especially unsuitable for this reconstruction. [waylandbridge/awl_internal.h:71–81](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_internal.h#L71-L81>) [waylandbridge/awl_ahb.cpp:422–464](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L422-L464>) [waylandbridge/awl_ahb.cpp:562–569](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L562-L569>)
**UBWC/compression:** neither supported modifier list names a Qualcomm compressed modifier; no modifier or compression metadata survives in the queue. The donor path assumes the sampled BGRA layout, but contains no general UBWC detection, decompressor, or universal vendor “disable compression” operation. **Inferred:** compression is excluded from the usable raw-dma-buf contract, although the request handler fails to enforce that exclusion. `DRM_FORMAT_MOD_INVALID` must not be treated as permission to send an opaque compressed AHB pixel fd. A later GPU copy does not solve this: first it must import/sample the source correctly. [waylandbridge/awl_dmabuf.c:17–22](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L17-L22>) [waylandbridge/awl_dmabuf.c:49–85](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L49-L85>) [waylandbridge/awl_bufferqueue.h:63–76](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.h#L63-L76>) [waylandbridge/awl_ahb.cpp:334–395](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L334-L395>) [waylandbridge/awl_sc.cpp:922–930](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L922-L930>)
**Native-handle ingress today:** none in the audited buffer factory/global list or Binder transaction table. Binder `T_CONNECT=18` transfers a Wayland **connection socket**; `T_SURFACE=1` transfers an Android **destination Surface**. Neither submits a producer AHardwareBuffer. The sole `recvHandleFromUnixSocket` in the frame-import path consumes the daemon's fabricated local wire message. [waylandbridge/awl_server.c:385–401](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_server.c#L385-L401>) [waylandbridge/waylandbridge.cpp:140–197](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/waylandbridge.cpp#L140-L197>) [libawl/AwlClient.java:80–95](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/app/libawl/src/main/java/com/anlandnext/awl/AwlClient.java#L80-L95>) [libawl/AwlClient.java:335–381](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/app/libawl/src/main/java/com/anlandnext/awl/AwlClient.java#L335-L381>) [waylandbridge/awl_ahb.cpp:444–464](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L444-L464>)
**External evidence, not merged behavior:** draft PR [#92](https://github.com/SuperTurtleDev/anland/pull/92), open and unmerged when retrieved, reports black Nautilus/Kitty/Chromium content on Snapdragon 870/Adreno 650 with `sc_enabled=0`; its sample is AR24 **2024×1344, stride 8192, modifier 0**, with nonzero CPU-mappable pixels but forge failure. The proposal adds synchronized mmap/CPU upload. It is not present in the audited main and is explicitly limited to linear packed data. [anland PR #92](https://github.com/SuperTurtleDev/anland/pull/92) [anland PR #92](https://github.com/SuperTurtleDev/anland/pull/92) [anland PR #92](https://github.com/SuperTurtleDev/anland/pull/92)
Android service access can also fail more severely than a returned import error: closed issue [#84](https://github.com/SuperTurtleDev/anland/issues/84) reports a 6.1.2 process abort inside `AHardwareBuffer_allocate`, with **“Failed to load matching allocator for mapper version 4”** and allocator/mapper service-discovery denials. Current policy contains the corresponding mapper/allocator `find` grants. This is historical device evidence, not a claim that the same defect remains unfixed in the audited revision. [anland issue #84](https://github.com/SuperTurtleDev/anland/issues/84) [anland/module/sepolicy.rule:159–161](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/sepolicy.rule#L159-L161>)
## 2. Synchronization and buffer release
### 2.1 Protocol and producer completion
The implemented protocol is **`zwp_linux_explicit_synchronization_v1` v2**, using per-commit Linux **sync_file fds**. `set_acquire_fence` validates with `SYNC_IOC_FILE_INFO`, rejects invalid fds and duplicate pending fences, and stores `pend_acquire_fd`. `get_release` creates a `zwp_linux_buffer_release_v1` object. Commit validation rejects acquire/release without an attached buffer; an acquire fence on `wl_shm` is `UNSUPPORTED_BUFFER`, although requesting a release object alone for shm is permitted. Sync-subsurface latching moves fence/release state with the buffer. [waylandbridge/awl_esync.c:1–26](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_esync.c#L1-L26>) [waylandbridge/awl_esync.c:121–170](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_esync.c#L121-L170>) [waylandbridge/awl_esync.c:179–200](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_esync.c#L179-L200>) [waylandbridge/awl_esync.c:265–277](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_esync.c#L265-L277>) [waylandbridge/awl_bufferqueue.c:175–179](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.c#L175-L179>)
No **linux-drm-syncobj** global is registered or implemented by waylandbridge. The XML comment saying the older explicit-sync protocol is superseded is not an implementation of its successor. In particular, the pinned Xwayland source has its own syncobj-related code; that does not mean the Anland compositor advertises it. [waylandbridge/awl_server.c:385–401](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_server.c#L385-L401>) [waylandbridge/CMakeLists.txt:309–349](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/CMakeLists.txt#L309-L349>) [waylandbridge/protocols/linux-explicit-synchronization-unstable-v1.xml:39](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/protocols/linux-explicit-synchronization-unstable-v1.xml#L39>) [xserver/hw/xwayland/xwayland-glamor-gbm.c:1788–1797](https://gitlab.freedesktop.org/xorg/xserver/-/blob/5a873951579f1ff894f71489f3651a55d6dde250/hw/xwayland/xwayland-glamor-gbm.c#L1788-1797)
| Consumer path | Acquire fence handling |
|---|---|
| Whole-window EGL renderer | Calls `awl_bufferqueue_gethead(q,100)`. This is a CPU `poll`; **100 ms is only a warning threshold**. On timeout it waits again with **`-1`**, i.e. indefinitely, before sampling. A real wait error logs and can return the head anyway. Header descriptions calling the wait “bounded” are incomplete compared with this body. [waylandbridge/awl_renderer.cpp:276–279](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_renderer.cpp#L276-L279>) [waylandbridge/awl_bufferqueue.c:121–137](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.c#L121-L137>) [waylandbridge/awl_bufferqueue.c:395–417](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.c#L395-L417>) |
| SC scanout / SC source selection | `tryhead` never waits; an unsignaled frame retains the previous buffer/geometry. The render-thread looper watches completion and triggers another pass. When scanout submits the buffer, its original acquire fence is already signaled, so `setBuffer` receives **`-1`**, not the client fence. [waylandbridge/awl_bufferqueue.c:420–425](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.c#L420-L425>) [waylandbridge/awl_sc.cpp:472–501](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L472-L501>) [waylandbridge/awl_sc.cpp:727–740](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L727-L740>) [waylandbridge/awl_sc.cpp:847–860](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L847-L860>) |
| SC GPU-copy destination | The daemon exports the blit's native fence and passes that fence to SF as the destination AHB's acquire fence. Reusing a target waits on SF's prior release fence via `eglWaitSyncKHR` where available; fallback is CPU wait. These are the daemon-owned target's fences, distinct from the client-source fence. [waylandbridge/awl_sc.cpp:752–796](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L752-L796>) [waylandbridge/awl_gl.cpp:399–411](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_gl.cpp#L399-L411>) |
Poll treats error/hangup/invalid-fd events as completion to avoid permanent stalls; `SYNC_IOC_FILE_INFO` validates the explicit fence type but does not make these error paths successful rendering. **Inferred:** MobileGL should send valid, signaled-on-completion sync_files and propagate rendering failure separately rather than rely on error-event behavior. [waylandbridge/awl_bufferqueue.c:111–137](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.c#L111-L137>) [waylandbridge/awl_bufferqueue.c:175–192](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.c#L175-L192>)
### 2.2 Release fences and `wl_buffer.release`
The common rule is **last queue/consumer reference → `bq_release_cb`**. If the commit has an explicit release object, it gets `fenced_release(release_fd)` or `immediate_release` when no fence exists. Otherwise the daemon tries to import its read-completion fence into the dma-buf reservation with `DMA_BUF_IOCTL_IMPORT_SYNC_FILE`, `DMA_BUF_SYNC_READ`. A live `wl_buffer` then gets **`wl_buffer.release` in both cases**, even with explicit sync. `release` therefore need not mean the fence has already signaled. [waylandbridge/awl_bufferqueue.c:201–210](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.c#L201-L210>) [waylandbridge/awl_surface.c:84–108](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_surface.c#L84-L108>) [waylandbridge/awl_esync.c:66–78](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_esync.c#L66-L78>)
| Mode | When the consumer reference is returned |
|---|---|
| EGL whole-window | After draw submission, with a native GPU-read fence; `glFinish()` if native-fence creation fails. `put` happens **before** the vsync-blocking `eglSwapBuffers`. The ring may still retain its current head, so this is not an unconditional immediate protocol release of the newest buffer. [waylandbridge/awl_renderer.cpp:382–405](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_renderer.cpp#L382-L405>) [waylandbridge/awl_bufferqueue.c:379–388](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.c#L379-L388>) |
| SC `SCANOUT` | Held while SF uses it. API **36+**, if the symbol is available: `setBufferWithRelease` → per-buffer callback → `put(element,release_fence)`. Older **29–35** strategy: transaction `OnComplete` reports the **previous** buffer's release fence after replacement. [waylandbridge/awl_sc.cpp:86–97](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L86-L97>) [waylandbridge/awl_sc.cpp:329–353](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L329-L353>) |
| SC `EGL` | Client source is put with the blit's fence after copying; SF keeps a reference to Anland's separate pool slot instead. Again the ring head may defer actual protocol release. [waylandbridge/awl_sc.cpp:94–97](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L94-L97>) [waylandbridge/awl_sc.cpp:922–935](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L922-L935>) |
| shm, either renderer | Logic stores the latest shm source; backend uploads the damaged pixels. `awl_surface_shm_end(consumed=1)` sends source `wl_buffer.release` and immediate explicit release after the CPU source has been read. Failed uploads leave the source pending. [anland/include/awl.h:325–342](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/include/awl.h#L325-L342>) [waylandbridge/awl_surface.c:1201–1209](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_surface.c#L1201-L1209>) |
Without explicit sync, commit snapshots existing writer fences using `DMA_BUF_IOCTL_EXPORT_SYNC_FILE` with `DMA_BUF_SYNC_READ`; `ENOTTY` or `EINVAL` disables future export attempts and readiness falls back to polling the dma-buf itself for `POLLIN`. This assumes the producer driver records completion in the dma-buf reservation. The release-side import return value is ignored by `bq_release_cb`, so there is no implemented CPU-wait fallback if that ioctl is unsupported. **Inferred:** a split MobileGL producer should prefer explicit acquire **and** release synchronization; CPU-complete submission is a slower safe producer fallback, but reuse must still honor the consumer's release fence. [waylandbridge/awl_surface.c:199–209](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_surface.c#L199-L209>) [waylandbridge/awl_bufferqueue.c:140–159](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.c#L140-L159>) [waylandbridge/awl_bufferqueue.c:184–192](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.c#L184-L192>) [waylandbridge/awl_surface.c:90–102](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_surface.c#L90-L102>)
## 3. Presentation, pacing, buffering, scaling and subsurfaces
`wl_surface.frame` creates callbacks on the surface's list. `awl_surface_presented()` sends each outstanding callback `done(awl_now_ms())`; `awl_now_ms` derives from **CLOCK_MONOTONIC** and wraps into a 32-bit millisecond value. It does not deliver a hardware presentation timestamp. No `wp_presentation` global or presentation-time implementation appears in server setup/build registration. **Inferred:** frame callbacks are pacing opportunities here, not evidence that a particular frame physically scanned out. [waylandbridge/awl_surface.c:825–859](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_surface.c#L825-L859>) [waylandbridge/awl_surface.c:1221–1238](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_surface.c#L1221-L1238>) [waylandbridge/awl_internal.h:43–46](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_internal.h#L43-L46>) [waylandbridge/awl_server.c:385–401](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_server.c#L385-L401>) [waylandbridge/CMakeLists.txt:309–349](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/CMakeLists.txt#L309-L349>)
EGL uses **one render thread per window**, `eglSwapInterval(...,1)`, and sends callbacks for the layers drawn after `eglSwapBuffers` returns. SC has a shared Choreographer render loop: callbacks go out on the **vsync tick** for visible layers that have a buffer; commits can trigger one off-tick latch opportunity per window/interval, and fence completion can retry it. Off-tick passes do not send frame callbacks. The comments document that sending callbacks from SF `OnComplete` introduced an extra vsync and reduced a paced client to **29 fps**. [waylandbridge/awl_renderer.cpp:417–439](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_renderer.cpp#L417-L439>) [waylandbridge/awl_sc.cpp:46–75](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L46-L75>) [waylandbridge/awl_sc.cpp:431–440](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L431-L440>) [waylandbridge/awl_sc.cpp:982–984](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L982-L984>) [waylandbridge/awl_sc.cpp:1105–1145](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L1105-L1145>)
**How many buffers:** there is no protocol requirement to use exactly two or three. The queue holds **8** and the AHB cache holds **8**. SC's own copy-target pool is **4** because three slots skipped alternate frames in the documented SF pipeline. SC comments describe up to three client buffers held by SF plus the newest queue head as a fourth, and Mesa mailbox commonly having four. **Inferred recommendation:** start a dma-buf/AHB swapchain with **four reusable buffers**, pace normal GUI rendering by callbacks, and handle release/fence backpressure; allow more buffers if device testing requires them. A one-buffer renderer cannot assume the current head will be released without replacement. Do not interpret an eight-slot queue as eight-buffer minimum. [waylandbridge/awl_bufferqueue.c:43–48](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.c#L43-L48>) [waylandbridge/awl_ahb.hpp:53–63](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.hpp#L53-L63>) [waylandbridge/awl_sc.cpp:224–235](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L224-L235>) [waylandbridge/awl_sc.cpp:389–400](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L389-L400>) [waylandbridge/awl_bufferqueue.c:379–388](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.c#L379-L388>)
A client repeatedly running ahead of vsync switches from SC scanout to GPU-copy mode after **15** consecutive ticks with dropped/superseded frames, and returns after **120** quiet ticks. The comments call these roughly ¼ s / 2 s, but the code thresholds are ticks, so their duration depends on refresh rate. The stated experiment is **vkmark 123 fps scanned out versus ~1300 fps copying**; those are source-comment measurements of producer throughput, not 1300 screen refreshes or a portable benchmark result. [waylandbridge/awl_sc.cpp:389–400](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L389-L400>) [waylandbridge/awl_sc.cpp:871–884](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L871-L884>)
**Parking:** detaching/pausing an Android host window marks it unattached and tears down its renderer/SC tree. New dirty notifications become no-ops and do not send `frame_done`. Commit-time queue draining is disabled for detached roots, intentionally withholding buffers so ordinary clients park on swap/release/callback waits. Cursor queues are an explicit exception and still drain. **Inferred:** this is cooperative backpressure, not SIGSTOP or a guarantee that an app ignoring callbacks and continually allocating new buffers uses zero CPU; queue-full frames are returned immediately. [waylandbridge/waylandbridge.cpp:328–333](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/waylandbridge.cpp#L328-L333>) [waylandbridge/waylandbridge.cpp:1118–1122](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/waylandbridge.cpp#L1118-L1122>) [waylandbridge/awl_surface.c:231–249](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_surface.c#L231-L249>) [waylandbridge/awl_surface.c:211–215](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_surface.c#L211-L215>)
**Scaling:** actual globals are **`wp_viewporter` v1** and **`wp_fractional_scale_manager_v1` v1** (some comments inaccurately use a `zwp_` prefix). Source/destination state is double buffered; output scale stays 1; preferred scale is quantized in **1/120** units as `(zoom_pct*120+50)/100`, sent on object creation and on zoom changes. Viewport destination determines logical size when set. MobileGL WSI must distinguish surface logical size from pixel-buffer dimensions. The last sentence is **inferred** from these transformations. [waylandbridge/awl_viewport.c:1–17](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_viewport.c#L1-L17>) [waylandbridge/awl_viewport.c:53–63](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_viewport.c#L53-L63>) [waylandbridge/awl_viewport.c:352–369](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_viewport.c#L352-L369>) [waylandbridge/awl_viewport.c:416–456](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_viewport.c#L416-L456>)
**Subsurfaces:** `wl_subcompositor` v1 supports synchronized and desynchronized children, parent-applied position/stacking, ancestor-recursive effective sync, and cascade application of latched state. Each child has its own buffer queue; SC maps layers to siblings, EGL composites the traversal. The public collection limit is **`AWL_MAX_LAYERS=16`**; the renderer separately includes a cursor slot. **Inferred:** whole-desktop nested compositors and clients with many layers should be tested against this finite layer collection, and a MobileGL integration must preserve per-surface rather than only per-window buffer/fence state. [waylandbridge/awl_subsurface.c:10–35](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_subsurface.c#L10-L35>) [waylandbridge/awl_subsurface.c:396–417](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_subsurface.c#L396-L417>) [waylandbridge/awl_subsurface.c:494–506](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_subsurface.c#L494-L506>) [anland/include/awl.h:369–388](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/include/awl.h#L369-L388>) [waylandbridge/awl_renderer.cpp:284–288](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_renderer.cpp#L284-L288>)
## 4. Connection and process model, including another Android daemon
### 4.1 Container connection and identities
The actual default is **`/data/local/tmp/awl/wayland-0`**. Config keys `runtime_dir` and `socket_listen` choose another directory or disable the pathname listener. `socket_listen` defaults true; the daemon makes the runtime directory mode **0777**, binds an `AF_UNIX/SOCK_STREAM` listener with backlog **8**, and chmods the socket **0666**. This contradicts the README table's blanket “No socket file” statement; that statement describes Binder-only operation, not the default code path. [waylandbridge/waylandbridge.cpp:1175–1199](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/waylandbridge.cpp#L1175-L1199>) [waylandbridge/waylandbridge.cpp:2085–2105](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/waylandbridge.cpp#L2085-L2105>) [waylandbridge/waylandbridge.cpp:2126–2143](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/waylandbridge.cpp#L2126-L2143>) [anland/README.md:31–38](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/README.md#L31-L38>)
Droidspaces is expected to bind **`/data/local/tmp/awl:/run/anland`** into the container. This checkout documents/assumes that preconfiguration; `anland-session/setup.sh` does not create the Android/container bind mount. Setup runs as the non-root desktop user and installs the user service and patched Xwayland. The session sets `XDG_RUNTIME_DIR=/run/user/$(id -u)` if absent, links **`$XDG_RUNTIME_DIR/wayland-anland` → `/run/anland/wayland-0`**, and exports **`WAYLAND_DISPLAY=wayland-anland`**. It launches rootless Xwayland, obtains the display number with `-displayfd`, runs miniwm, and publishes environment through `~/.anlandx-env` and `systemctl --user set-environment`. [shell/src/main/java/com/anland/shell/ds/DsCli.java:31–44](<https://github.com/SuperTurtleDev/anland-shell/blob/920fcfc8159690f5232e2d9c7c3294d4c1481145/src/main/java/com/anland/shell/ds/DsCli.java#L31-L44>) [anland/anland-session/setup.sh:1–13](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/anland-session/setup.sh#L1-L13>) [anland/anland-session/setup.sh:61–64](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/anland-session/setup.sh#L61-L64>) [anland/anland-session/anland-session.sh:26–45](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/anland-session/anland-session.sh#L26-L45>) [anland/anland-session/anland-session.sh:108–120](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/anland-session/anland-session.sh#L108-L120>) [anland/anland-session/anland-session.sh:146–184](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/anland-session/anland-session.sh#L146-L184>)
`service.sh` is the module's late-start service: it labels `waylandbridge` **`u:object_r:awl_daemon_exec:s0`** and starts it directly with `nohup`. Policy transitions **`ksu + awl_daemon_exec → awl_daemon`**, and explicitly marks **`awl_daemon` permissive**. There is no UID drop in this launch/main path. **Inferred:** in the intended root-manager launch, the daemon remains **UID 0**, SELinux domain **`u:r:awl_daemon:s0`**; the executable label is a different SELinux object type. Do not generalize this to launches through an unconfigured root manager/domain. [anland/module/service.sh:1–26](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/service.sh#L1-L26>) [anland/module/sepolicy.rule:14–26](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/sepolicy.rule#L14-L26>) [waylandbridge/waylandbridge.cpp:2110–2124](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/waylandbridge.cpp#L2110-L2124>)
Container apps run as the selected **Linux desktop account**, not a universal fixed UID: anland-shell defaults to the first non-root account, probes passwd for the UID, then uses `su - <user>` and `systemd-run --user`; explicit root launches use a different direct path. Anland's policy comments identify container Chrome as **`droidspacesd`**, and rules grant that domain socket/fd access. **Inferred:** this is the expected Android SELinux domain for the documented Droidspaces deployment; exact host UID mapping and domain for another chroot/PRoot/LXC setup must be measured because Droidspaces implementation/user-namespace configuration is not included here. [shell/src/main/java/com/anland/shell/ds/DsCli.java:318–339](<https://github.com/SuperTurtleDev/anland-shell/blob/920fcfc8159690f5232e2d9c7c3294d4c1481145/src/main/java/com/anland/shell/ds/DsCli.java#L318-L339>) [shell/src/main/java/com/anland/shell/ds/DsCli.java:374–392](<https://github.com/SuperTurtleDev/anland-shell/blob/920fcfc8159690f5232e2d9c7c3294d4c1481145/src/main/java/com/anland/shell/ds/DsCli.java#L374-L392>) [shell/src/main/java/com/anland/shell/ds/DsCli.java:435–458](<https://github.com/SuperTurtleDev/anland-shell/blob/920fcfc8159690f5232e2d9c7c3294d4c1481145/src/main/java/com/anland/shell/ds/DsCli.java#L435-L458>) [anland/module/sepolicy.rule:76–87](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/sepolicy.rule#L76-L87>) [anland/module/sepolicy.rule:142–154](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/sepolicy.rule#L142-L154>)
The Binder name is **`anland.host`**, interface **`anland.IHost`**, service label **`u:object_r:anland_host_service:s0`**. `customize.sh` copies the device's live platform service contexts and appends the supplied mapping. Third-party app domains `untrusted_app_29` and `untrusted_app` are allowed to find the service. Socket pathname access is deliberately narrower: `awl_runtime_sock` is created by a type transition and container `droidspacesd` gets socket-file access and `connectto`; APKs are intended to use Binder connection injection. World-writable DAC permissions alone are insufficient. [anland/module/plat_service_contexts.anland:1](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/plat_service_contexts.anland#L1>) [anland/module/customize.sh:13–26](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/customize.sh#L13-L26>) [anland/module/sepolicy.rule:4–7](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/sepolicy.rule#L4-L7>) [anland/module/sepolicy.rule:76–92](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/sepolicy.rule#L76-L92>) [waylandbridge/waylandbridge.cpp:2153–2177](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/waylandbridge.cpp#L2153-L2177>)
### 4.2 Binder fd injection and libawl
`Awl.getWaylandFd()` delegates to `AwlClient.connect()`, which creates **the socketpair in the app**, sends one end through Binder **`T_CONNECT=18`**, closes its local duplicate of the sent end, and keeps the other for `wl_display_connect_to_fd`. Creating the pair in the app preserves its `SO_PEERCRED` UID/PID for ownership checks. The exact Java parcel body is **`writeInt(1); writeInt(0); writeFileDescriptor(theirs)`**, after the interface token. Use that implementation as the authority: nearby daemon comments/log text contain inconsistent abbreviated descriptions of the ParcelFileDescriptor wire. [libawl/Awl.java:69–78](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/app/libawl/src/main/java/com/anlandnext/awl/Awl.java#L69-L78>) [libawl/AwlClient.java:335–381](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/app/libawl/src/main/java/com/anlandnext/awl/AwlClient.java#L335-L381>) [anland/include/awl.h:140–150](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/include/awl.h#L140-L150>) [waylandbridge/waylandbridge.cpp:1820–1847](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/waylandbridge.cpp#L1820-L1847>)
The Binder handler passes the fd to `awl_server_add_client`; a pipe marshals the integer fd to the Wayland event thread, which calls `wl_client_create`. Binder is used to establish the connection; subsequent Wayland messages and buffer/fence fd passing use that socket. [waylandbridge/awl_server.c:308–347](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_server.c#L308-L347>) [waylandbridge/waylandbridge.cpp:1837–1847](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/waylandbridge.cpp#L1837-L1847>)
`Awl.java` exposes connection, window listing/events, `attachWindow`, and native client spawning. `spawnClient` inherits the connection as **`WAYLAND_SOCKET=<fd>`** through fork/exec. `attachWindow` hosts a Wayland window in an Activity; `AwlClient.surface` sends window id, dimensions, Android `Surface`, death token and host identity through **`T_SURFACE=1`**. The daemon compares the Binder caller UID with the Wayland client's UID for non-allowlisted hosts; root/self/host APK have privileged scope. [libawl/Awl.java:25–41](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/app/libawl/src/main/java/com/anlandnext/awl/Awl.java#L25-L41>) [libawl/Awl.java:188–227](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/app/libawl/src/main/java/com/anlandnext/awl/Awl.java#L188-L227>) [libawl/Awl.java:279–294](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/app/libawl/src/main/java/com/anlandnext/awl/Awl.java#L279-L294>) [libawl/AwlClient.java:28–40](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/app/libawl/src/main/java/com/anlandnext/awl/AwlClient.java#L28-L40>) [libawl/AwlClient.java:80–95](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/app/libawl/src/main/java/com/anlandnext/awl/AwlClient.java#L80-L95>) [waylandbridge/waylandbridge.cpp:1528–1567](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/waylandbridge.cpp#L1528-L1567>)
`include/awl.h` is the daemon's **logic-layer C API**, despite its header comment saying v2 while **`AWL_ABI_VERSION=3`**. It provides `awl_server_start/add_client`, window callbacks, per-surface queue access and shm access. It is not an Android client AHB-submission library; the Android AAR and this server-internal API serve different roles. [anland/include/awl.h:1–25](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/include/awl.h#L1-L25>) [anland/include/awl.h:132–150](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/include/awl.h#L132-L150>) [anland/include/awl.h:309–342](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/include/awl.h#L309-L342>)
**Could an Android GL server use libawl? — inferred:** yes, as a Wayland client/host under its own identity, or by implementing the same Binder connection protocol natively. It still needs Wayland WSI and one of Anland's accepted buffer types. An unprivileged server APK cannot use `attachWindow` to claim arbitrary existing container-UID windows. For split rendering while the Linux application owns the Wayland connection, keep that ownership and associate imported buffers with that client's resources through a new controlled native-buffer import/broker interface. `libawl` alone does not create this association. [libawl/Awl.java:69–81](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/app/libawl/src/main/java/com/anlandnext/awl/Awl.java#L69-L81>) [libawl/Awl.java:279–294](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/app/libawl/src/main/java/com/anlandnext/awl/Awl.java#L279-L294>) [waylandbridge/waylandbridge.cpp:1528–1567](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/waylandbridge.cpp#L1528-L1567>) [waylandbridge/awl_internal.h:71–81](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_internal.h#L71-L81>)
### 4.3 Launching a second Android-side daemon and required access
**Inferred: feasible using the same deployment pattern.** A bionic MobileGL render-server ELF can be launched by a root-module service and expose, for example, **`/data/local/tmp/awl/mobilegl.sock`**, seen as **`/run/anland/mobilegl.sock`** in the existing bind mount. Anland already demonstrates a second Android native service: PulseAudio is launched from the same module, in `awl_daemon` but under the host APK UID because Android audio policy requires a package-associated UID. That audio-specific UID rule is not evidence that GLES requires an APK UID. [anland/module/service.sh:29–42](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/service.sh#L29-L42>) [anland/module/service.sh:119–138](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/service.sh#L119-L138>) [anland/module/service.sh:153–170](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/service.sh#L153-L170>) [shell/src/main/java/com/anland/shell/ds/DsCli.java:31–35](<https://github.com/SuperTurtleDev/anland-shell/blob/920fcfc8159690f5232e2d9c7c3294d4c1481145/src/main/java/com/anland/shell/ds/DsCli.java#L31-L35>)
The following are **inferred policy requirements**, mapped to working Anland rules rather than claimed as a tested complete policy for every vendor:
| Direction / resource | Existing evidence and implication for MobileGL |
|---|---|
| Container connects to render server | Need runtime-directory traversal, socket-file read/write/open permissions, and `droidspacesd → mobilegl_daemon:unix_stream_socket connectto`; mirror the existing runtime socket labeling/allow rules. Reusing `awl_daemon` and its runtime socket type is the smallest deployment experiment; a separate domain/type is the maintainable change. [anland/module/sepolicy.rule:76–102](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/sepolicy.rule#L76-L102>) |
| Cross-domain fd passing | Grant **both relevant directions of `fd use`**, e.g. `mobilegl_daemon ↔ droidspacesd` and `mobilegl_daemon ↔ awl_daemon`, plus communication and underlying file/device access. Anland has explicit `droidspacesd ↔ awl_daemon` grants. Shared memory/dma-buf/fence access is more than pathname connectivity. [anland/module/sepolicy.rule:142–146](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/sepolicy.rule#L142-L146>) [anland/module/sepolicy.rule:111–120](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/sepolicy.rule#L111-L120>) |
| APK-based GL server | Anland's grants for `untrusted_app[_29] ↔ awl_daemon` do not automatically authorize `untrusted_app ↔ droidspacesd`. Either add appropriate direct socket/fd permissions for the new relation, or use a trusted Android broker to pass a socketpair through Binder. Binder service labeling/find, `call transfer`, `fd use`, and socket read/write rights are separate requirements. [anland/module/sepolicy.rule:4–7](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/sepolicy.rule#L4-L7>) [anland/module/sepolicy.rule:39–51](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/sepolicy.rule#L39-L51>) [anland/module/sepolicy.rule:76–87](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/sepolicy.rule#L76-L87>) |
| Native server's Android graphics access | Mirror GPU node, dma-buf heap, vendor library, allocator/mapper service access; root DAC does not replace SELinux/service-manager policy. The audited domain is permissive, so its allow list is not proof of completeness in enforcing mode. [anland/module/sepolicy.rule:18](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/sepolicy.rule#L18>) [anland/module/sepolicy.rule:111–125](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/sepolicy.rule#L111-L125>) [anland/module/sepolicy.rule:159–161](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/sepolicy.rule#L159-L161>) |
| Imported native buffers reach SF/HWC | Consumers may need `fd use` for the domain that originally opened/allocated the fd, not merely the relay daemon. Existing rules explicitly grant `surfaceflinger`, `system_server`, and `hal_graphics_composer_default` access to `awl_daemon` fds. For a new allocation domain, audit/add that new origin's grants too. [anland/module/sepolicy.rule:126–141](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/sepolicy.rule#L126-L141>) |
**Inferred transport limit:** local Unix fd passing is a natural fit. TCP cannot transmit a kernel fd/AHB handle as a usable remote kernel object; TCP rendering needs a local allocation broker and pixel/data transfer, or another explicitly implemented transport, before the final local Wayland buffer submission. Anland's relevant existing paths all use local fd passing or local shm, not TCP buffer ingress. [waylandbridge/waylandbridge.cpp:2085–2105](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/waylandbridge.cpp#L2085-L2105>) [libawl/AwlClient.java:342–365](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/app/libawl/src/main/java/com/anlandnext/awl/AwlClient.java#L342-L365>) [waylandbridge/awl_ahb.cpp:444–464](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L444-L464>) [waylandbridge/awl_bufferqueue.h:63–76](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.h#L63-L76>)
## 5. GPU acceleration supplied today and Xwayland requirements
### 5.1 What each project actually configures
| Project / environment | Observed rendering stack |
|---|---|
| Main 6.x container session | Defaults **`MESA_LOADER_DRIVER_OVERRIDE=kgsl`**, **`GALLIUM_DRIVER=kgsl`**, **`FD_FORCE_KGSL=1`**. Dependency setup installs an external lfdevs Mesa tarball containing EGL/GLX/GBM/Gallium/`kgsl_dri.so` and Turnip Vulkan. These are container-side Mesa drivers; waylandbridge's Android EGL is separate. [anland/anland-session/anland-session.sh:108–112](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/anland-session/anland-session.sh#L108-L112>) [anland/anland-session/deps_noble.sh:104–113](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/anland-session/deps_noble.sh#L104-L113>) [anland/anland-session/deps_noble.sh:130–141](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/anland-session/deps_noble.sh#L130-L141>) |
| anland-shell | Root/Droidspaces app launcher, not a renderer. It supplies the same KGSL defaults and starts the selected user's app in the container session. [shell/src/main/java/com/anland/shell/ds/DsCli.java:31–44](<https://github.com/SuperTurtleDev/anland-shell/blob/920fcfc8159690f5232e2d9c7c3294d4c1481145/src/main/java/com/anland/shell/ds/DsCli.java#L31-L44>) [shell/src/main/java/com/anland/shell/ds/DsCli.java:59–68](<https://github.com/SuperTurtleDev/anland-shell/blob/920fcfc8159690f5232e2d9c7c3294d4c1481145/src/main/java/com/anland/shell/ds/DsCli.java#L59-L68>) [shell/src/main/java/com/anland/shell/ds/DsCli.java:374–382](<https://github.com/SuperTurtleDev/anland-shell/blob/920fcfc8159690f5232e2d9c7c3294d4c1481145/src/main/java/com/anland/shell/ds/DsCli.java#L374-L382>) |
| lfdevs Anland: Termux | Explicitly legacy-based; supports Termux native and PRoot/Chroot/LXC. Qualcomm acceleration uses **Freedreno OpenGL and Turnip Vulkan**. Native installation guide currently points to **26.3.0-devel-20260824**, except Weston to **26.2.0-devel-20260709-weston**; container guide points to mesa-for-android-container. Image package URLs pin the 26.3 snapshot. [Termux/README.md:7–13](<https://github.com/lfdevs/anland-termux/blob/a70879f059a2e8439fdb132195c3dd10d4810106/README.md#L7-L13>) [Termux/docs/user-guide.md:148–152](<https://github.com/lfdevs/anland-termux/blob/a70879f059a2e8439fdb132195c3dd10d4810106/docs/user-guide.md#L148-L152>) [Termux/images/packages.json:1–16](<https://github.com/lfdevs/anland-termux/blob/a70879f059a2e8439fdb132195c3dd10d4810106/images/packages.json#L1-L16>) |
| Termux Mesa build at that release tag | Package version **26.3.0**, Mesa commit **`98f3d6229d61452cef80f8563af7c56ae599dc14`**. `-Dgbm=enabled -Dopengl=true -Degl=enabled -Dgles2=enabled -Dglx=dri -Dllvm=enabled -Dplatforms=x11,wayland -Dglvnd=enabled`; Gallium **llvmpipe,softpipe,virgl,zink**, plus **freedreno** on ARM/aarch64; Vulkan **swrast**, plus **freedreno**; **`-Dfreedreno-kmds=msm,kgsl`**. [termux-packages/mesa/build.sh:6–35](https://github.com/lfdevs/termux-packages/blob/ccc9cc550efc604188242285f99884183596ebb0/packages/mesa/build.sh#L6-L35) [termux-packages/mesa/build.sh:177–185](https://github.com/lfdevs/termux-packages/blob/ccc9cc550efc604188242285f99884183596ebb0/packages/mesa/build.sh#L177-L185) |
| Container Mesa workflow at the same Mesa commit | `-Dplatforms=x11,wayland`, Gallium **freedreno,zink,virgl,llvmpipe**, Vulkan **freedreno**, EGL/GLES2/GLVND enabled, GLX DRI, **`-Dfreedreno-kmds=kgsl`**. These are build settings in the release-tag tree, not proof every installed package/device selects every built driver. [mesa-for-android-container/build-check.yml:57–81](https://github.com/lfdevs/mesa-for-android-container/blob/98f3d6229d61452cef80f8563af7c56ae599dc14/.github/workflows/build-check.yml#L57-L81) |
| asveroid Plasma installer | Explicitly **Termux Native**, no root, Snapdragon/Adreno. Installs patched KWin/Xwayland and Freedreno; script still pins **26.2.0-devel-20260709** Mesa and `mesa-vulkan-icd-freedreno`, older than lfdevs' current guide. [Plasma/README.md:3–23](<https://github.com/asveroid/anland-plasma-termux/blob/099710d413b47d2f3f8c5091a95ee2732d3be0e6/README.md#L3-L23>) [Plasma/install-anland-plasma.sh:26–31](<https://github.com/asveroid/anland-plasma-termux/blob/099710d413b47d2f3f8c5091a95ee2732d3be0e6/install-anland-plasma.sh#L26-L31>) |
**Zink:** it is built in both Mesa configurations above, but neither main 6.x's defaults nor Termux's documented KGSL overrides establish it as the default path. Termux's manual examples use `GALLIUM_DRIVER=freedreno`, `TURNIP_KMD=kgsl`, `FD_FORCE_KGSL=1` and `XWAYLAND_FORCE_KGSL_SURFACELESS=1`; the native example also uses `ANLAND_NO_DRM_DEVICE=1 EGL_PLATFORM=surfaceless`. Do not conflate this legacy Termux surfaceless integration with the four-hunk main 6.x Xwayland patch. [termux-packages/mesa/build.sh:177–185](https://github.com/lfdevs/termux-packages/blob/ccc9cc550efc604188242285f99884183596ebb0/packages/mesa/build.sh#L177-L185) [mesa-for-android-container/build-check.yml:65–80](https://github.com/lfdevs/mesa-for-android-container/blob/98f3d6229d61452cef80f8563af7c56ae599dc14/.github/workflows/build-check.yml#L65-L80) [Termux/docs/user-guide.md:251–262](<https://github.com/lfdevs/anland-termux/blob/a70879f059a2e8439fdb132195c3dd10d4810106/docs/user-guide.md#L251-L262>) [Termux/docs/user-guide.md:294–300](<https://github.com/lfdevs/anland-termux/blob/a70879f059a2e8439fdb132195c3dd10d4810106/docs/user-guide.md#L294-L300>) [anland/patches/xwayland/anland-kgsl-glamor.patch:1–109](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/patches/xwayland/anland-kgsl-glamor.patch#L1-L109>)
**Native vs containers:** Termux-native uses Android/Termux packages; container images install distro-appropriate Mesa into `/usr`. PRoot-Distro examples use `--shared-tmp`; the general guide bind-mounts Termux `$TMPDIR` to container `/tmp`, so the legacy daemon socket is shared. Official GitHub Termux APK variants use shared UID; the compatible variant instead holds the socket in Termux and transfers its fd over Binder. These are legacy transport arrangements, not the 6.x `/run/anland/wayland-0` setup. [Termux/README.md:31–34](<https://github.com/lfdevs/anland-termux/blob/a70879f059a2e8439fdb132195c3dd10d4810106/README.md#L31-L34>) [Termux/docs/user-guide.md:60–96](<https://github.com/lfdevs/anland-termux/blob/a70879f059a2e8439fdb132195c3dd10d4810106/docs/user-guide.md#L60-L96>) [Termux/docs/user-guide.md:199–206](<https://github.com/lfdevs/anland-termux/blob/a70879f059a2e8439fdb132195c3dd10d4810106/docs/user-guide.md#L199-L206>) [Termux/images/debian-plasma.Dockerfile:55–58](<https://github.com/lfdevs/anland-termux/blob/a70879f059a2e8439fdb132195c3dd10d4810106/images/debian-plasma.Dockerfile#L55-L58>) [Termux/docs/user-guide.md:294–300](<https://github.com/lfdevs/anland-termux/blob/a70879f059a2e8439fdb132195c3dd10d4810106/docs/user-guide.md#L294-L300>)
**Non-Adreno GPUs:** lfdevs says MediaTek Dimensity, Google Tensor and Samsung Exynos currently use **LLVMpipe**, may fail to enter the desktop, and only **Tensor G1** had been personally tested successfully in PRoot/Chroot. The Plasma installer repeats the software-rendering limitation. This is not a verified hardware-accelerated Mali, PowerVR or Xclipse support statement. No specific accelerated PowerVR/Xclipse result or desktop GL-version claim was established in the reviewed docs/builds. **Inferred:** MobileGL may remove the Mesa KGSL dependency for rendering, but current 6.x's snapalloc-dependent buffer import is a separate obstacle on other vendors. [Termux/README.md:25–29](<https://github.com/lfdevs/anland-termux/blob/a70879f059a2e8439fdb132195c3dd10d4810106/README.md#L25-L29>) [Plasma/README.md:59](<https://github.com/asveroid/anland-plasma-termux/blob/099710d413b47d2f3f8c5091a95ee2732d3be0e6/README.md#L59>) [termux-packages/mesa/build.sh:177–185](https://github.com/lfdevs/termux-packages/blob/ccc9cc550efc604188242285f99884183596ebb0/packages/mesa/build.sh#L177-L185) [waylandbridge/awl_ahb.cpp:139–146](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L139-L146>) [waylandbridge/awl_ahb.cpp:264–274](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L264-L274>)
**GL versions and performance:** the evidence establishes Freedreno FD650 direct acceleration in a device issue, and waylandbridge requests an **OpenGL ES 3 context**; neither establishes that graphical Linux apps universally get desktop GL 4.6 or any other specific maximum. No `glxinfo`/`eglinfo` version result was found in the cited compatibility docs or device report. The concrete performance figures available in the current code are the **29 fps** callback-placement regression and **123 vs ~1300 fps** vkmark scanout/copy comparison, with the measurement limitations described in §3. [anland issue #84](https://github.com/SuperTurtleDev/anland/issues/84) [waylandbridge/awl_gl.cpp:102–105](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_gl.cpp#L102-L105>) [Termux/README.md:25–29](<https://github.com/lfdevs/anland-termux/blob/a70879f059a2e8439fdb132195c3dd10d4810106/README.md#L25-L29>) [waylandbridge/awl_sc.cpp:60–75](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L60-L75>) [waylandbridge/awl_sc.cpp:389–400](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L389-L400>)
### 5.2 What Xwayland glamor needs, and what the patch changes
The vendored source is Xwayland **24.1.10**. The patch README explicitly says the display GPU is reached via KGSL and that the chosen fallback `/dev/dri/renderD128` is redirected by the patched Mesa stack. It does not demonstrate that a stock distro GBM can open a working DRM render node on every phone. [anland/patches/xwayland/README.anland.md:1–9](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/patches/xwayland/README.anland.md#L1-L9>) [anland/patches/xwayland/README.anland.md:29–39](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/patches/xwayland/README.anland.md#L29-L39>)
| Requirement / interface | Actual pinned GBM implementation |
|---|---|
| GBM device and EGL platform | Opens/uses a device fd, calls `gbm_create_device`, gets `EGL_PLATFORM_GBM_MESA`, and initializes EGL. It tries desktop GL then GLES, requires a renderer and `GL_OES_EGL_image`, and rejects named llvmpipe/softpipe glamor renderers. [xserver/hw/xwayland/xwayland-glamor-gbm.c:1710–1766](https://gitlab.freedesktop.org/xorg/xserver/-/blob/5a873951579f1ff894f71489f3651a55d6dde250/hw/xwayland/xwayland-glamor-gbm.c#L1710-1766) |
| dma-buf image import | Tests both dma-buf import and modifiers extension support for `dmabuf_capable`; constructs `EGL_LINUX_DMA_BUF_EXT` images with plane fds, offsets, pitches and modifier words. **Inferred:** a replacement provider for this path needs compatible GBM allocation/import and EGL image behavior, not only GL draw entry points. [xserver/hw/xwayland/xwayland-glamor-gbm.c:243–277](https://gitlab.freedesktop.org/xorg/xserver/-/blob/5a873951579f1ff894f71489f3651a55d6dde250/hw/xwayland/xwayland-glamor-gbm.c#L243-277) [xserver/hw/xwayland/xwayland-glamor-gbm.c:1769–1773](https://gitlab.freedesktop.org/xorg/xserver/-/blob/5a873951579f1ff894f71489f3651a55d6dde250/hw/xwayland/xwayland-glamor-gbm.c#L1769-1773) |
| dma-buf export | The pinned GBM path obtains fds through **`gbm_bo_get_fd_for_plane` / `gbm_bo_get_fd`**. It does **not** require/call `EGL_MESA_image_dma_buf_export` in this file. That extension can be useful for an EGL-owned-image export design, but calling it a universal glamor prerequisite would overstate this implementation. [xserver/hw/xwayland/xwayland-glamor-gbm.c:486–533](https://gitlab.freedesktop.org/xorg/xserver/-/blob/5a873951579f1ff894f71489f3651a55d6dde250/hw/xwayland/xwayland-glamor-gbm.c#L486-533) [xserver/hw/xwayland/xwayland-glamor-gbm.c:844–881](https://gitlab.freedesktop.org/xorg/xserver/-/blob/5a873951579f1ff894f71489f3651a55d6dde250/hw/xwayland/xwayland-glamor-gbm.c#L844-881) |
| DRI3 | Registers `dri3_screen_init` and import/export callbacks for pixmaps/fds. The patch fixes a modifier problem specifically in imported DRI3 buffers. **Inferred:** accelerated X11 clients need a compatible GLX/DRI3/GBM integration (or another deliberate X11 route); a MobileGL Wayland EGL swap implementation alone does not transparently replace that client/server contract. [xserver/hw/xwayland/xwayland-glamor-gbm.c:1812–1826](https://gitlab.freedesktop.org/xorg/xserver/-/blob/5a873951579f1ff894f71489f3651a55d6dde250/hw/xwayland/xwayland-glamor-gbm.c#L1812-1826) [anland/patches/xwayland/anland-kgsl-glamor.patch:22–37](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/patches/xwayland/anland-kgsl-glamor.patch#L22-L37>) |
The four patch changes are precise:
1. Submit **`DRM_FORMAT_MOD_INVALID`** via linux-dmabuf without requiring it to be found in the advertised modifier set. [anland/patches/xwayland/anland-kgsl-glamor.patch:3–21](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/patches/xwayland/anland-kgsl-glamor.patch#L3-L21>)
2. Rewrite bogus modifier **`1274ULL` (`0x4FA`) → DRM_FORMAT_MOD_LINEAR`** before GBM import, for the documented Mesa/KGSL DRI3 bug. This is not general tiled-buffer conversion. [anland/patches/xwayland/anland-kgsl-glamor.patch:22–37](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/patches/xwayland/anland-kgsl-glamor.patch#L22-L37>)
3. Wait for default feedback only when protocol version is **≥4**; initialize `main_dev=NULL`; when unavailable or without a render node, use **`XWAYLAND_GBM_DEVICE`**, default **`/dev/dri/renderD128`**. [anland/patches/xwayland/anland-kgsl-glamor.patch:38–91](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/patches/xwayland/anland-kgsl-glamor.patch#L38-L91>)
4. Permit glamor when **linux-dmabuf v3** exists despite no `wl_drm` or v4 feedback. [anland/patches/xwayland/anland-kgsl-glamor.patch:92–109](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/patches/xwayland/anland-kgsl-glamor.patch#L92-L109>)
**Inferred:** these changes solve device selection and buffer-routing assumptions in that Mesa-based stack. They do not implement a GBM backend for MobileGL, import full AHB handles into Anland, add AB24/UBWC support, or make container glibc load Android vendor GLES directly. [anland/patches/xwayland/anland-kgsl-glamor.patch:1–109](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/patches/xwayland/anland-kgsl-glamor.patch#L1-L109>) [waylandbridge/awl_dmabuf.c:17–22](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L17-L22>) [waylandbridge/awl_ahb.cpp:334–340](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L334-L340>)
## 6. waylandbridge's own renderer and Android driver loading
The build uses the Android NDK toolchain, **arm64-v8a**, platform **android-35**. Wayland/ffi are static dependencies, and Anland's protocol/adapter source is compiled into one executable. The graphics/system dependencies remain **`binder_ndk android log EGL GLESv3 nativewindow`**; there is no evidence here of a fully static libc+vendor-GLES binary. The README's “single statically-linked ELF” should be read in light of the executable's actual link configuration. [anland/Makefile:77–83](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/Makefile#L77-L83>) [waylandbridge/CMakeLists.txt:225–244](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/CMakeLists.txt#L225-L244>) [waylandbridge/CMakeLists.txt:303–308](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/CMakeLists.txt#L303-L308>) [waylandbridge/CMakeLists.txt:364–365](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/CMakeLists.txt#L364-L365>) [anland/README.md:73–78](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/README.md#L73-L78>)
The renderer calls ordinary Android EGL entry points: `eglGetDisplay(EGL_DEFAULT_DISPLAY)`, `eglInitialize`, `eglChooseConfig` for ES3 and window/pbuffer use, and `eglCreateContext(...CLIENT_VERSION,3)`. It resolves EGLImage/native-buffer/fence procedures with `eglGetProcAddress`. Root executable startup and policy explicitly provide GPU/vendor-file access. **Inferred:** this is a bionic Android-native consumer of the platform EGL/GLES dispatch stack and device graphics implementation, not container Mesa doing the daemon's composition. [waylandbridge/awl_gl.cpp:34–106](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_gl.cpp#L34-L106>) [anland/module/service.sh:20–26](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/service.sh#L20-L26>) [anland/module/sepolicy.rule:111–120](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/sepolicy.rule#L111-L120>)
There is no custom graphics linker namespace creation or `android_dlopen_ext` bypass in these renderer files. The explicit `dlopen` shown in `waylandbridge.cpp` loads **`libbinder_ndk.so`** to resolve platform-only service-manager/thread-pool functions, not a vendor GLES driver. **Inferred:** a root bionic executable can follow this platform-EGL route without being an APK; root is not itself a linker-namespace bypass. This source does not prove that arbitrary vendor DSOs can be dlopened directly from arbitrary namespaces, nor that a glibc executable can load them. [waylandbridge/waylandbridge.cpp:100–119](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/waylandbridge.cpp#L100-L119>) [waylandbridge/awl_gl.cpp:34–76](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_gl.cpp#L34-L76>) [waylandbridge/CMakeLists.txt:364–365](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/CMakeLists.txt#L364-L365>)
The target does not link Vulkan or call it in these rendering paths. **Inferred:** Anland provides concrete precedent for MobileGL's bionic GLES/Magma server deployment; an Espryt/Vulkan server using Android's Vulkan loader is a separate validation task. Linker/loader policy, extension support and buffer interoperability for that Vulkan path cannot be certified from Anland's GLES implementation. [waylandbridge/CMakeLists.txt:350–365](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/CMakeLists.txt#L350-L365>) [waylandbridge/awl_gl.cpp:34–106](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_gl.cpp#L34-L106>)
## 7. What the derivatives reveal about other frame paths
**E7G wlroots-anland.** This is a wlroots **0.20.x** native backend for the **E7G private Anland protocol**, not a backend for 6.x linux-dmabuf Wayland ingress. It connects to `ANLAND_SOCKET` (default `/tmp/display_daemon.sock`) and imports a **consumer-owned pool**. Its allocator gets the selected pool fd/info, wraps a one-plane `wlr_dmabuf_attributes` with offset/stride/modifier, and advertises `WLR_BUFFER_CAP_DMABUF`. Commit locks the submitted buffer until consumer-ready, then sends a wlroots presentation event and a new frame opportunity. **Inferred:** this demonstrates an alternative allocation direction useful for MobileGL—Android supplies render targets—but does not supply native-AHB ingress to current waylandbridge. Its `VSYNC|ZERO_COPY` presentation flags are backend claims based on consumer-ready, not proof of a physical scanout timestamp. [wlroots/README.anland.md:3–19](<https://github.com/E7G/wlroots-anland/blob/351399132de0b208ddb36d0ea2fa74cbe668fb72/README.anland.md#L3-L19>) [wlroots/backend/anland/allocator.c:33–58](<https://github.com/E7G/wlroots-anland/blob/351399132de0b208ddb36d0ea2fa74cbe668fb72/backend/anland/allocator.c#L33-L58>) [wlroots/backend/anland/allocator.c:64–76](<https://github.com/E7G/wlroots-anland/blob/351399132de0b208ddb36d0ea2fa74cbe668fb72/backend/anland/allocator.c#L64-L76>) [wlroots/backend/anland/output.c:21–34](<https://github.com/E7G/wlroots-anland/blob/351399132de0b208ddb36d0ea2fa74cbe668fb72/backend/anland/output.c#L21-L34>) [wlroots/backend/anland/output.c:67–76](<https://github.com/E7G/wlroots-anland/blob/351399132de0b208ddb36d0ea2fa74cbe668fb72/backend/anland/output.c#L67-L76>)
**Yizhou147 anland-drm.** This replaces the legacy Android APK consumer with a DRM/KMS consumer. The implemented main display allocation uses **DRM dumb buffers**, exports PRIME fds, sends a pool with format **1 (RGBA8888)**, modifier **0**, offset **0**, selects a producer render target, then page-flips it. Although the README lists dma-heap/ion helpers, those are not the allocation calls used by this main display path. Its README says untested, but the newer progress note reports a binary running on **houji/Snapdragon 8 Gen 3**, detecting a **5120×2560@60** connector/input, while `drmModeSetCrtc` still fails **Permission denied**, even after stopping SF and trying root. **Inferred:** it demonstrates the protocol's independence from Android windowing, not a working universal replacement for HWC. Its loop closes the returned render fence before page-flip without waiting/passing it onward, so it is also not a reliable synchronization precedent. [anland-drm/consumer/drm_display.c:146–196](<https://github.com/Yizhou147/anland-drm/blob/850f7ca0e0f25d34dd04baa7e12e8751bcff4951/consumer/drm_display.c#L146-L196>) [anland-drm/consumer/drm_consumer.c:242](<https://github.com/Yizhou147/anland-drm/blob/850f7ca0e0f25d34dd04baa7e12e8751bcff4951/consumer/drm_consumer.c#L242>) [anland-drm/consumer/drm_consumer.c:275–320](<https://github.com/Yizhou147/anland-drm/blob/850f7ca0e0f25d34dd04baa7e12e8751bcff4951/consumer/drm_consumer.c#L275-L320>) [anland-drm/README.md:3–13](<https://github.com/Yizhou147/anland-drm/blob/850f7ca0e0f25d34dd04baa7e12e8751bcff4951/README.md#L3-L13>) [anland-drm/PROGRESS.md:14–34](<https://github.com/Yizhou147/anland-drm/blob/850f7ca0e0f25d34dd04baa7e12e8751bcff4951/PROGRESS.md#L14-L34>)
**Legacy 5.x “Anland Display Protocol.”** `common/protocol.h` defines packed control/data messages (`CONSUMER_HELLO=1`, `PRODUCER_HELLO=2`, `SCREEN_INFO=7`, `PICKUP_FDS=9`, `FDS_READY=10`; data `BUF_READY=100`, `REFRESH_DONE=101`, `BUFS_READY=200`; `MAX_BUFS=8`) and `buf_info {uint32_t stride,width,height,format; uint64_t modifier; uint32_t offset;}`. Android consumer dequeues **real ANativeWindow buffers**, retains the original `ANativeWindowBuffer*`, exports only native-handle **fd[0]** plus descriptor, and sets modifier/offset **0**. It waits on dequeue fences before selecting a producer target; producer completion returns a sync_file that is passed to `queueBuffer` for SF to wait on. There is no need to forge a return-path AHB because the Android consumer kept the original native buffer. **Inferred:** this is a strong pattern for a native-handle extension or Android-owned target pool, but the existing private protocol itself does **not** transmit a complete arbitrary native_handle/AHB; compressed storage cannot safely be represented just by claiming modifier 0. [legacy/common/protocol.h:7–49](<https://github.com/SuperTurtleDev/anland/blob/9ab13eb146bc9f3dd3cc44cabc268659d9eb0a46/common/protocol.h#L7-L49>) [legacy/consumers/anland_v5/android_consumer/app/src/main/jni/native_consumer.c:133–188](<https://github.com/SuperTurtleDev/anland/blob/9ab13eb146bc9f3dd3cc44cabc268659d9eb0a46/consumers/anland_v5/android_consumer/app/src/main/jni/native_consumer.c#L133-L188>) [legacy/consumers/anland_v5/android_consumer/app/src/main/jni/native_consumer.c:778–813](<https://github.com/SuperTurtleDev/anland/blob/9ab13eb146bc9f3dd3cc44cabc268659d9eb0a46/consumers/anland_v5/android_consumer/app/src/main/jni/native_consumer.c#L778-L813>) [legacy/consumers/anland_v5/android_consumer/app/src/main/jni/native_consumer.c:953–1003](<https://github.com/SuperTurtleDev/anland/blob/9ab13eb146bc9f3dd3cc44cabc268659d9eb0a46/consumers/anland_v5/android_consumer/app/src/main/jni/native_consumer.c#L953-L1003>)
## 8. Concrete changes for MobileGL AHB output and avoiding the forge
This section is **inferred design**, not existing Anland functionality. The starting constraint is that MobileGL allocates genuine Android AHBs, commonly **`AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM`**, with DRM identity **ABGR8888/AB24** for little-endian RGBA bytes. Current Anland admits AR24/XR24 and then overwrites the storage description with BGRA donor metadata. In contrast, Anland's **own SC copy pool already allocates RGBA AHBs** with `GPU_COLOR_OUTPUT | GPU_SAMPLED_IMAGE | COMPOSER_OVERLAY` and imports/displays them. Thus the output side is already capable of consuming suitable genuine RGBA AHBs; ingress, representation and lifetime are the missing pieces. [drm-uapi/drm_fourcc.h:193–199](https://github.com/lfdevs/mesa-for-android-container/blob/98f3d6229d61452cef80f8563af7c56ae599dc14/include/drm-uapi/drm_fourcc.h#L193-L199) [waylandbridge/awl_dmabuf.c:17–22](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L17-L22>) [waylandbridge/awl_ahb.cpp:334–336](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L334-L336>) [waylandbridge/awl_sc.cpp:279–300](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L279-L300>)
### 8.1 Smallest paths, and exactly what each buys
| Path | Changes and limits — all inferred |
|---|---|
| **No Anland change, functional baseline** | MobileGL finishes/readbacks or otherwise converts to packed BGRA/XRGB in `wl_shm`, and its client-side Wayland WSI commits it. This avoids forge/vendor metadata dependence but pays readback/transfer/upload and does not preserve compressed zero-copy buffers. Anland's shm upload/release path already exists. [waylandbridge/awl_gl.cpp:331–379](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_gl.cpp#L331-L379>) [anland/include/awl.h:325–342](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/include/awl.h#L325-L342>) |
| **No Anland change, narrow dma-buf experiment** | Produce actual linear, zero-offset AR24/XR24 storage, send modifier **0**, correct byte pitch and sync_files. Requires a device where the snapalloc calibration/import works; allocating an RGBA/UBWC AHB and sending fd[0] is not this path. There is no generic portability guarantee. [waylandbridge/awl_dmabuf.c:17–22](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L17-L22>) [waylandbridge/awl_ahb.cpp:139–146](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L139-L146>) [waylandbridge/awl_ahb.cpp:264–274](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L264-L274>) [waylandbridge/awl_ahb.cpp:334–395](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L334-L395>) |
| **Smallest meaningful native-AHB change** | Add a native-AHB registration/import side channel and a way to create/associate a Wayland `wl_buffer` with the registered object. Keep the existing renderers/SC transactions, but resolve registered buffers directly to retained AHBs instead of `awl_ahb_wrap`. Add correct RGBA/AB24 format handling and propagate lifetime/fences. This avoids donor allocation/calibration/patching and the fabricated local socketpair round-trip. [waylandbridge/awl_internal.h:71–81](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_internal.h#L71-L81>) [waylandbridge/awl_surface.c:184–218](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_surface.c#L184-L218>) [waylandbridge/awl_ahb.cpp:534–569](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L534-L569>) [waylandbridge/awl_gl.cpp:257–289](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_gl.cpp#L257-L289>) [waylandbridge/awl_sc.cpp:727–743](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L727-L743>) |
| **Clean native buffer path** | Versioned Wayland extension or authenticated broker protocol, typed buffer payload, resource-owned native import and stable generation/identity; preserve linux-dmabuf as a separate raw-layout importer. Full AHB metadata stays on Android; the glibc client carries an opaque resource/token and fences. This makes native compressed layouts opaque to Anland's logical layer and leaves import interpretation to gralloc/EGL/SF. [waylandbridge/awl_bufferqueue.h:5–8](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.h#L5-L8>) [waylandbridge/awl_bufferqueue.h:63–76](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.h#L63-L76>) [anland/include/awl.h:309–323](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/include/awl.h#L309-L323>) [waylandbridge/awl_gl.cpp:257–289](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_gl.cpp#L257-L289>) |
Adding only AB24 to `k_supported` is **insufficient**: `awl_ahb_wrap` still forces HAL BGRA, the cache does not include format, and no original native metadata is available. Extending the forge to another HAL format could help a narrowly compatible linear layout but would still retain the vendor-layout dependency and would not preserve UBWC. [waylandbridge/awl_dmabuf.c:17–22](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L17-L22>) [waylandbridge/awl_ahb.cpp:334–336](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L334-L336>) [waylandbridge/awl_ahb.cpp:546–568](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L546-L568>)
### 8.2 Concrete insertion points
| Function / file | Small viable edit → clean design direction — all inferred |
|---|---|
| `awl_dmabuf_setup`, `params_*`, `dmabuf_buffer_create` in `awl_dmabuf.c`; `awl_server_start`; protocol generation in `CMakeLists.txt` | Add a distinct native-buffer factory/registration protocol and register it at startup; do not overload linux-dmabuf plane fds with arbitrary gralloc metadata. For the existing raw path, fix INVALID and explicitly validate supported modifier, zero offset, format, dimensions and extent instead of discarding layout information. [waylandbridge/awl_dmabuf.c:49–85](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L49-L85>) [waylandbridge/awl_dmabuf.c:105–175](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L105-L175>) [waylandbridge/awl_server.c:385–401](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_server.c#L385-L401>) [waylandbridge/CMakeLists.txt:309–349](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/CMakeLists.txt#L309-L349>) [waylandbridge/awl_internal.h:35–40](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_internal.h#L35-L40>) |
| `host_on_transact` / Binder transaction enum in `waylandbridge.cpp`, if choosing an Android broker | Add a **new** registration operation for complete AHB handle/descriptor import, returning a scoped token. Reuse Binder only as transport/identity infrastructure: `T_CONNECT` currently transfers a Wayland socket. Bind a token to the right client/resource or an explicit delegated registration capability, accounting for the different container and Android-server UIDs. [waylandbridge/waylandbridge.cpp:184–196](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/waylandbridge.cpp#L184-L196>) [waylandbridge/waylandbridge.cpp:1528–1567](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/waylandbridge.cpp#L1528-L1567>) [waylandbridge/waylandbridge.cpp:1820–1847](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/waylandbridge.cpp#L1820-L1847>) |
| `struct awl_buffer` / destruction in `awl_internal.h`, `awl_surface.c`, `awl_dmabuf.c` | Add payload kind and opaque native import reference, with acquire/release ownership, descriptor and stable identity. Keep the imported AHB alive after `wl_buffer.destroy` while queue/SF references exist, following the existing wrapper lifetime pattern. [waylandbridge/awl_internal.h:65–81](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_internal.h#L65-L81>) [waylandbridge/awl_dmabuf.c:33–46](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_dmabuf.c#L33-L46>) [waylandbridge/awl_surface.c:58–67](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_surface.c#L58-L67>) |
| `awl_surface_apply_buffer` and `struct awl_bq_buffer` | Carry an opaque native-buffer reference/token with each frame; preserve acquire/release fences and format/geometry. The current queue treats **`dmabuf_fd<0` as NULL/unmap**, so merely adding an AHB pointer while leaving fd=-1 silently breaks readiness/render selection. Introduce a tagged payload or retain a real backing fd in the narrow implementation; update readiness, close/unref, and all fd-based branches. [waylandbridge/awl_surface.c:184–218](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_surface.c#L184-L218>) [waylandbridge/awl_bufferqueue.h:63–76](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.h#L63-L76>) [waylandbridge/awl_bufferqueue.c:184–210](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.c#L184-L210>) [waylandbridge/awl_sc.cpp:896–898](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L896-L898>) |
| `awl_ahb_cache_get` / `awl_ahb_wrap` | Resolve native registrations directly to an acquired AHB, bypassing the forge. An inode-only association can be a controlled prototype, but the clean key is an imported-buffer identity/generation plus complete descriptor; include format and distinguish native handles from reconstructed raw buffers. Multiple metadata handles or reuse must not collide. Cache the real AHB/EGLImage per swapchain buffer. [waylandbridge/awl_ahb.cpp:534–569](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L534-L569>) [waylandbridge/awl_ahb.hpp:53–86](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.hpp#L53-L86>) |
| `awl_gl_tex_import`, `render_frame` in `awl_renderer.cpp` | `awl_gl_tex_import` already takes any suitable AHB through native-buffer EGL import. Feed it the real AHB; extend source selection and format/opacity handling for AB24/XB24. Keep shm's BGRA byte uploader separate; do not apply an unnecessary R/B swap to native RGBA. [waylandbridge/awl_gl.cpp:257–289](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_gl.cpp#L257-L289>) [waylandbridge/awl_gl.cpp:331–345](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_gl.cpp#L331-L345>) [waylandbridge/awl_renderer.cpp:292–334](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_renderer.cpp#L292-L334>) |
| `sc_render_window`, `latch_scanout`, `latch_egl` in `awl_sc.cpp`; `awl_ahb_hwc_scanout_ok` | The pitch oracle is specifically for forged linear BGRA and must not decide native opaque/compressed AHB eligibility. Submit a real allocation with its original metadata; require suitable AHB usage and let Android import/composition determine support. Retain a real-AHB-to-real-AHB GPU-copy mode for pacing or unsupported direct composition where source sampling succeeds. [waylandbridge/awl_ahb.cpp:60–91](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L60-L91>) [waylandbridge/awl_sc.cpp:279–300](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L279-L300>) [waylandbridge/awl_sc.cpp:727–796](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L727-L796>) [waylandbridge/awl_sc.cpp:903–935](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L903-L935>) |
| `awl_esync.c`, queue readiness/release, SC release callbacks | Reuse sync_file per-commit semantics. Minimal implementation can keep current ready-before-latch behavior. A later SC optimization can pass the producer fence directly to SF instead of waiting for readiness, but requires redesigning mailbox selection, ownership and fence lifetime; it is not a one-line replacement of `-1`. Native payloads without a raw dma-buf need explicit release, not the current implicit-reservation fallback. [waylandbridge/awl_esync.c:121–170](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_esync.c#L121-L170>) [waylandbridge/awl_bufferqueue.c:184–192](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_bufferqueue.c#L184-L192>) [waylandbridge/awl_surface.c:84–108](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_surface.c#L84-L108>) [waylandbridge/awl_sc.cpp:329–353](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L329-L353>) [waylandbridge/awl_sc.cpp:727–740](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L727-L740>) |
| `module/service.sh`, `module/sepolicy.rule`, service contexts; container mount/session configuration | Launch the bionic server and expose the local socket/broker, with domain-specific communication, allocator/GPU and fd-origin consumer permissions as in §4. Keep normal Wayland surface ownership tied to the Linux app unless explicitly choosing an APK-owned client architecture. [anland/module/service.sh:20–26](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/service.sh#L20-L26>) [anland/module/sepolicy.rule:76–87](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/sepolicy.rule#L76-L87>) [anland/module/sepolicy.rule:111–161](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/sepolicy.rule#L111-L161>) [waylandbridge/waylandbridge.cpp:1528–1567](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/waylandbridge.cpp#L1528-L1567>) |
### 8.3 Native handle transport, UBWC and the remaining MobileGL responsibilities
**Inferred native transport design:** use **`AHardwareBuffer_sendHandleToUnixSocket` → `AHardwareBuffer_recvHandleFromUnixSocket`** on a **dedicated local Unix channel** between the two bionic processes, or design a Binder HardwareBuffer/native-handle transport. The two Unix APIs are documented for `AF_UNIX` and available since **API 26**. Preserve **all** handle fds and integer metadata, original descriptor/usage and allocation identity; do not copy the forge's hardcoded two-fd/13-word reconstruction as a universal format. Associate the imported object with a Wayland `wl_buffer` by a scoped token/protocol object. Do not interleave AHB's byte stream into the ordinary Wayland socket without a defined protocol envelope. A real interprocess AHB receive/import remains, but the fabricated local donor round-trip and its calibration are eliminated. [android/hardware_buffer.h:528–549](https://android.googlesource.com/platform/frameworks/native/+/refs/heads/main/libs/nativewindow/include/android/hardware_buffer.h#528) [waylandbridge/awl_ahb.cpp:139–146](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L139-L146>) [waylandbridge/awl_ahb.cpp:398–464](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L398-L464>) [waylandbridge/awl_internal.h:65–81](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_internal.h#L65-L81>) [waylandbridge/waylandbridge.cpp:1820–1847](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/waylandbridge.cpp#L1820-L1847>)
For SC presentation, allocate with the intended usage from the start. Android's header specifically says **`AHARDWAREBUFFER_USAGE_COMPOSER_OVERLAY`** is needed for `ASurfaceTransaction_setBuffer` when the buffer was allocated directly with `AHardwareBuffer_allocate`; the framework normally adds it for framework-managed buffers. **Inferred:** MobileGL's native target pool should use the render/sample/composer combination already used by `pool_create`, subject to device support, rather than changing usage words after allocation. [android/hardware_buffer.h:270–290](https://android.googlesource.com/platform/frameworks/native/+/refs/heads/main/libs/nativewindow/include/android/hardware_buffer.h#270) [waylandbridge/awl_sc.cpp:284–300](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L284-L300>)
**Inferred UBWC policy:** allow only genuine native allocations that the consuming Android stack can import/sample/present with their original metadata. The extension should carry them opaquely, not assert a linear DRM modifier or patch a donor blob. Unsupported native import should fail clearly before claiming the buffer usable; an optional GPU blit requires the native source to be importable first. RGBA support and compressed-layout support are related but distinct. Anland's own RGBA target pool demonstrates the right allocation/import pattern, not proof of every vendor's compression support. [waylandbridge/awl_sc.cpp:279–300](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L279-L300>) [waylandbridge/awl_gl.cpp:257–285](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_gl.cpp#L257-L285>) [waylandbridge/awl_ahb.cpp:334–395](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L334-L395>)
**Inferred MobileGL work items:** client-side Wayland EGL/GL window-system integration must create/resize buffers, attach/damage/commit the correct `wl_surface`, obey configure/viewport geometry, pace frames, and retain each buffer until release plus fence completion. Android-side rendering must allocate/import the target, export a real completion sync_file, and honor consumer release before reuse. The Anland changes above solve buffer handoff, not missing GL entry points or X11 GLX/DRI3/GBM integration. A staged validation should first prove `wl_shm`, then native uncompressed RGBA AHB import, then fence/lifetime/resize/parking correctness, and only then vendor compression and direct-SC behavior. These stages are recommendations grounded in the existing independent paths, not tests performed in this audit. [waylandbridge/awl_surface.c:184–218](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_surface.c#L184-L218>) [waylandbridge/awl_surface.c:825–859](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_surface.c#L825-L859>) [waylandbridge/awl_viewport.c:1–17](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_viewport.c#L1-L17>) [waylandbridge/awl_esync.c:121–200](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_esync.c#L121-L200>) [waylandbridge/awl_sc.cpp:279–300](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L279-L300>) [waylandbridge/awl_sc.cpp:727–796](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L727-L796>) [xserver/hw/xwayland/xwayland-glamor-gbm.c:1710–1773](https://gitlab.freedesktop.org/xorg/xserver/-/blob/5a873951579f1ff894f71489f3651a55d6dde250/hw/xwayland/xwayland-glamor-gbm.c#L1710-1773) [xserver/hw/xwayland/xwayland-glamor-gbm.c:1812–1826](https://gitlab.freedesktop.org/xorg/xserver/-/blob/5a873951579f1ff894f71489f3651a55d6dde250/hw/xwayland/xwayland-glamor-gbm.c#L1812-1826)
**Preferred integration, inferred:** keep Linux applications as ordinary Wayland clients, keep MobileGL's render server bionic, and add a small native-buffer bridge into Anland's existing AHB-consuming renderers. This addresses both RGBA/opaque gralloc layouts and the donor-forge dependency without making the glibc client understand vendor gralloc internals. The exact viable compressed formats, enforced SELinux policy and release-depth behavior remain device-validation questions. [waylandbridge/awl_gl.cpp:257–289](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_gl.cpp#L257-L289>) [waylandbridge/awl_sc.cpp:279–300](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L279-L300>) [waylandbridge/awl_sc.cpp:727–743](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_sc.cpp#L727-L743>) [waylandbridge/awl_ahb.cpp:139–146](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/services/waylandbridge/awl_ahb.cpp#L139-L146>) [anland/module/sepolicy.rule:18](<https://github.com/SuperTurtleDev/anland/blob/cc1691805fe6aca6851b6fcccb6a1e33019026c1/module/sepolicy.rule#L18>)
@@ -0,0 +1,591 @@
# MobileGL → Anland:只读代码盘点
审计日期:2026-09-30。对象:Arch WSL 的 ~/w7/p9-main。实际分支为 **p8/main**,HEAD **648800a2da231e8152760d400da33e500d511ca6**,提交说明为关闭 P8;不是任务描述里的 feat/disaggregated。依据是本次只读 git status / git branch --show-current / git log -1;未切换分支。路线图也将 P8 标记完成(docs/Disaggregated/ROADMAP.md:3、:36)。所有源码引用均为此目录、此时点的树根相对路径。未构建、未执行测试或设备操作;“已验证”只指被引用的历史证据。Anland 的格式、modifier、同步和部署条件采用题目给定前提,未另行审计 Anland。
**结论:拆分 GL 执行已存在,Anland 所需的窗口系统与帧交付链尚不存在。** 已有 Linux client → Android vendor-driver server 的历史跨机验收;当前 P12 在服务器自己的 SurfaceView 上呈现,未把每帧 dma-buf / fence fd 交回 Linux client。要作为通用 Linux desktop GL provider,仍需 Linux WSI、可交付图像、跨进程同步、buffer 生命周期、多会话/多窗口与真实 context/share-group 支持。前两句有代码/验收直接依据;“所需工作”是 **inferred**,详见各节。(docs/Disaggregated/notes/p12/CROSSHOST-ACCEPTANCE.md:3–17;MobileGL/MG_Remote/CONTRACT-P12.md:7、:16、:44;MobileGL/MG_Pipe/MGPipeTypes.h:1807–1809;MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp:17252–17283;MobileGL/MG_Backend/DirectVulkan/Renderer/VulkanRenderer.cpp:14528–14547)
先纠正名称:**Espryt = DirectGLES(原生 EGL/GLES);Magma = DirectVulkan(Vulkan)**。题目第 3 项括号中的两个后端正好相反。(MobileGL/MG_Backend/DirectGLES/BackendObject_DirectGLES.cpp:812–822;MobileGL/MG_Backend/DirectVulkan/BackendObject_DirectVulkan.cpp:543–551)
## 1. Linux client 构建、库与加载器
### 1.1 哪些平台能确认
| 平台 / 问题 | 当前结论及依据 |
|---|---|
| Linux glibc x86_64 / WSL | **有实际 client 证据**。P6.5 明确部署 x86_64 WSL client ↔ aarch64 Redmi server;P12 的 WSL trace client 对 Android DirectGLES/stream 已验收 OpenRA 和 rd12。它证明 glibc client 可运行和跨 ABI 的特定组合可工作,不证明任意 Linux GUI 程序已可在 Anland 上显示。(docs/Disaggregated/notes/p65/README.md:61、:93;docs/Disaggregated/notes/p12/CROSSHOST-ACCEPTANCE.md:3–17) |
| Linux CI | 存在 Ubuntu split build,clang/clang++ 20、Release、disaggregated/inproc/push 和 integration tests 配置。这里没有重跑 CI。(.github/workflows/test.yml:1206、:1260、:1269–1296) |
| Linux glibc aarch64 | **未找到该组合的现成 preset 或运行验收,不能写成“已验证支持”**。Linux POSIX transport 路径不限制 x86,wire 已为 x86_64↔aarch64 固定宽度/布局校验;因此原生或交叉 glibc aarch64 构建是合理移植目标,属于 **inferred**。Android arm64 NDK 构建不能替代 glibc arm64 验收。(CMakeLists.txt:177–183、:503–545、:783–835、:954–962;MobileGL/MG_Remote/Transport/ShmSegmentPosix.cpp:61–77;docs/Disaggregated/notes/p65/README.md:93;docs/Disaggregated/notes/OPEN-QUESTIONS.md:28) |
| “纯 client”库 | 当前是同一 libMobileGL 内编入两种角色,remote client 不构造本地具体 backend;server 可执行文件也链接这份库。没有产品级 client-only / server-only CMake 目标开关。**inferred**:精简 glibc client 的链接依赖是可选后续工作,而不是使用 split 的先决条件。(MobileGL/MG_Remote/Client/BackendObject_Remote.cpp:22–26、:98–105;CMakeLists.txt:594–623、:783–785、:1033–1040;docs/Disaggregated/design/07-memory-readback-verification.md:27) |
可复用的配置形状(仅示意,本次未执行):
cmake -S . -B build-split -G Ninja
-DCMAKE_BUILD_TYPE=Release
-DMOBILEGL_BUILD_DISAGGREGATED=ON
-DMOBILEGL_PIPE_PUSH=ON
-DMOBILEGL_BUILD_DISAGGREGATED_INPROC=ON
-DMOBILEGL_BUILD_BENCHMARK=OFF
INPROC 是测试/同进程两角色形态的超集,不是跨进程 client 必需项;INPROC 隐含 DISAGGREGATED,后者隐含 PIPE_PUSH。FlatBuffers submodule runtime header 缺失时 CMake 会警告并把 split 在本次配置中关闭。根目录/两层查找未见 CMakePresets 文件;项目说明和 CI 都用直接 CMake 选项。(CMakeLists.txt:23–30、:503–545;docs/Disaggregated/guide/build-and-run.md:7–12;.github/workflows/test.yml:1275–1293)
工具链最低 CMake 3.22.1、C++23;glslang、SPIRV-Cross、SPIRV-Tools、SPIRV-Reflect、xxHash、VMA、Threads 被链接,非 Android 配置还查找 Vulkan。CI 安装 Mesa EGL/GLES/Vulkan 开发依赖用于主机后端和测试。aarch64 glibc 应用同样需合适 sysroot/工具链并验证 wireFingerprint;目前没有证据可指定一个现成 arm64 glibc preset。(CMakeLists.txt:1、:177–183、:277–283、:719–731、:954–962;.github/workflows/test.yml:1260;docs/Disaggregated/design/06-transport.md:64;最后一句为 **inferred**。)
### 1.2 产物与 SONAME
| 产物 | 源码能确认的事实 |
|---|---|
| libMobileGL.so | CMake 项目 MobileGL 的 SHARED target;GL、EGL、Linux GLX 都在这份库里。(CMakeLists.txt:3、:401–406、:783–785) |
| libEGL.so、libEGL.so.1 | 非 Android、非 Apple UNIX 构建后创建的符号链接,指向上述 target。代码实际只列了这两个 alias。(CMakeLists.txt:825–834) |
| libGL.so / libGL.so.1、libOpenGL.so、libGLESv2.so | 未见同等构建 alias / 独立输出目标。不能因为 comment 写“GL/EGL loaders”就称已经产出 libGL;使用 libGL 的系统程序还需 loader 包装/部署策略,后半句为 **inferred**。(CMakeLists.txt:825–834;GL 导出见 MobileGL/MG_Impl/GLImpl/Exporting/Definitions.cpp:26–59) |
| libMobileGL_s.a | NOT ANDROID 下另建 MobileGL_s STATIC,同一源集合。(CMakeLists.txt:849–881) |
| libMobileGLServer.so | 实际是 PIE **executable**,不是供应用当 EGL vendor dlopen 的库;Android 与 desktop 都强制 lib 前缀、.so 后缀,链接 libMobileGL 并设 $ORIGIN RPATH。(CMakeLists.txt:1033–1085) |
| ELF SONAME | 未发现 VERSION/SOVERSION 或 SONAME override。按 CMake Linux 默认,预期 SONAME 为 libMobileGL.so(**inferred,未读 ELF 动态段**);libEGL.so.1 是文件系统 alias,不证明 ELF SONAME 变成 libEGL.so.1。(CMakeLists.txt:783–835) |
### 1.3 API 导出与 GLVND
GL/EGL/GLX 导出宏都是 extern C + default visibility;EGL 导出覆盖 display/config/context/current、window/pbuffer/pixmap、swap、查询、EGL 1.5 sync/image/platform 接口,以及 eglGetPlatformDisplayEXT。除通用 glXGetProcAddress/ARB 包装外,具体 GLX 导出在 Linux 非 Android 条件下编译,包含 glXCreateContextAttribsARB(MobileGL/MG_Impl/GLXImpl/Exporting/Definitions.cpp:12–23;MobileGL/MG_Impl/GLXImpl/GLXImpl.h:38)。大量 GL core/extension 名称也被导出,但部分明确是 stub;“dlsym 成功”不能当能力证明。(MobileGL/Defines.h:33–44;MobileGL/MG_Impl/EGLImpl/Exporting/Definitions.cpp:12–25、:112–155、:198–240;MobileGL/MG_Impl/GLXImpl/GLXImpl.h:12–39;MobileGL/MG_Impl/GLImpl/Exporting/Definitions.cpp:26–35、:152、:395–429)
两个 backend 的目标/报告 GL 和 GLSL 都为 **4.6.0**,静态 identity 的 IsCompatibilityProfile=false;前端 GL_VERSION 直接从这个 TargetGLVersion 生成,而不是按当前 EGL bound API 切换 OpenGL ES 字符串。README 仍写短期目标 OpenGL 4.2 Core,不能把这些数字解释为“已完成 GL 4.6 conformance”。GLX 可接受 compatibility context 请求,但固定功能不完整,见第 7 节。(MobileGL/MG_Backend/DirectGLES/BackendObject_DirectGLES.cpp:817–822;MobileGL/MG_Backend/DirectVulkan/BackendObject_DirectVulkan.cpp:546–551;MobileGL/MG_Impl/GLImpl/Getter/GL_Getter.cpp:619–638;README.md:49–56)
**没有查到 libglvnd vendor 集成**:全项目检索没有 MobileGL 的 __egl_Main / __glx_Main 定义或 MobileGL egl_vendor.d JSON;目前是直接导出入口、libEGL alias / 由应用指定 MobileGL 加载的形态。CI/测试出现 egl_vendor.d 是选择服务器侧 Mesa/NVIDIA 原生 EGL vendor,不是注册 MobileGL 为 vendor。(CMakeLists.txt:825–834;MobileGL/MG_Impl/EGLImpl/Exporting/Definitions.cpp:12–127;MobileGL/MG_IntegrationTest/CMakeLists.txt:280–299;MobileGL/MG_Benchmark/Driver/run_driver_bench.sh:19)
**inferred:**Anland 集成需要决定“私有库搜索路径下直接替代 GL/EGL”还是实现 GLVND vendor ABI;已有 GLX 入口不会自动让系统 GLVND 将所有 GLX 应用派发给 MobileGL。依据为上述 alias 和导出形态。
## 2. EGL frontend 与 GLX 的实际能力
### 2.1 平台与 native window
- eglGetDisplay 将 native display key 登记为 EGL_NONE 平台;eglGetPlatformDisplay 将任意 platform/native key 放进显示表,前端并没有按 Wayland/X11/GBM 平台进行真实 WSI 分派。因此“返回非空 EGLDisplay”不构成该平台支持。(MobileGL/MG_State/EGLState/Core.cpp:316–324;MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp:708–715)
- window backend 按**编译平台**决定:Android / MetalLayer / Win32 / Linux X11;Linux 不是运行时看到 EGL_PLATFORM=wayland 就变为 Wayland。没有 wl_display、wl_egl_window 或 gbm_surface 的实现分支。(MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp:64–75、:744–770;未发现这些 WSI 集成的检索结论也与 docs/Disaggregated/design/08-runtime-and-platform.md:32 一致。)
- EGL_PLATFORM=surfaceless 是 headless 测试 harness 在未显式设置时写给原生 Mesa loader 的环境变量;DirectGLES 后端仍调用原生 eglGetDisplay(EGL_DEFAULT_DISPLAY)。这不是 MobileGL frontend 完整实现了所有 EGL platform。(MobileGL/MG_IntegrationTest/Harness/HeadlessGL.cpp:172–191;MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp:16587–16593)
- Linux **并非源码只有 surfaceless**:有真实 X11 window 代码,GLX 查询 XGetGeometry,Magma 创建 VkXlibSurfaceKHR;而拆分验收/WSL/CI 的平台政策是不打开窗口。Linux-local X11 支持和“Linux client → Android server → Anland”是不同能力,后一个并未打通。(MobileGL/MG_Impl/GLXImpl/GLXImpl.cpp:258–327;MobileGL/MG_Backend/DirectVulkan/Renderer/VulkanRenderer.cpp:16450–16500;docs/Disaggregated/design/08-runtime-and-platform.md:32)
- “surfaceless 平台”也应与 EGL_NO_SURFACE context 区分:backend MakeEGLCurrent 要求注册 surface、draw=read,并拒绝 draw/read 为 EGL_NO_SURFACE 的有效 context bind。因此不能宣称完整 EGL_KHR_surfaceless_context;其广告表也没有该扩展。(MobileGL/MG_Backend/BackendObject.cpp:314–338;MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp:465–473)
### 2.2 Config 与 surface
Config 是前端合成值:每 display 两个默认 config(stencil=0 和 8),RGBA 各 8、depth 24;surface bits 宣告 WINDOW|PBUFFER|PIXMAP,renderable bits 宣告 OPENGL|ES2|ES3;swap interval 0..4;Linux visual 来自 X11 查询,Android visual ID 是 RGBA8888 AHB format 常量。它们不是由每个 frontend config 对等选择的 vendor config 完整镜像。(MobileGL/MG_State/EGLState/Core.cpp:153–182;DirectGLES 实际另选 native config:MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp:16500–16531、:16593)
查询还固定返回 EGL_RGB_BUFFER、EGL_CONFIG_CAVEAT=EGL_NONE、EGL_NATIVE_RENDERABLE=TRUE、EGL_SAMPLES/SAMPLE_BUFFERS=0,EGL_CONFORMANT 直接等于 RenderableType;这些广告不补足尚缺的 ES/pixmap 实现。(MobileGL/MG_State/EGLState/Core.cpp:535–599;第 2.2、2.3 节实现证据)
| Surface / API | 实际路径 |
|---|---|
| Window / platform window | 创建前端状态后调用 backend CreateEGLWindowSurface;split 经 SurfaceOp。普通模式拒绝空 native window;ServerOwned 可为空,且丢弃客户端窗口 token。(MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp:121–204、:718–776) |
| Pbuffer | 创建前端状态,随后真调用 backend CreateEGLPbufferSurface;缺省 width/height=1;原生实现见第 3 节。(MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp:498–520) |
| Pixmap / platform pixmap | frontend 只建 SurfaceObject,EGLImpl 没有配套 backend pixmap 创建;没有 GLX pixmap / DRI pixmap 通路可据此认定。**inferred:**广告 EGL_PIXMAP_BIT 高于当前可证明的原生能力。(MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp:580–587、:801–807;MobileGL/MG_State/EGLState/Core.cpp:886–915、:991–1020;MobileGL/MG_Backend/BackendObject.cpp:324–338) |
| PbufferFromClientBuffer | 只转给 EGLState 登记,并无对应 backend 导入调用。(MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp:571–578;MobileGL/MG_State/EGLState/Core.cpp:922–956) |
| BindTexImage / ReleaseTexImage / CopyBuffers | 检查句柄/参数后直接成功,未进行纹理绑定或 native pixmap copy;不是可用的图像共享捷径。(MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp:523–568) |
### 2.3 Context、GLES、sharing 与线程
eglBindAPI(EGL_OPENGL_ES_API) **返回成功**,EGL_CLIENT_APIS 也写 OpenGL OpenGL_ES;甚至 OPENVG_API 也被接受。CreateContext 只检查 display/config/shareCtx 的存在,存 ClientAPI、version、profile、flags,然后铸造 frontend handle;不会在这里选择 ES 实现或创建原生 share context。(MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp:240–245、:414–428、:463–464;MobileGL/MG_State/EGLState/Core.cpp:615–689)
所以答案是:**有 ES API 接受和 ES2/ES3 config bits,但没有证据可称为完整 GLES provider、或给出一个经确认的 frontend GLES 最大版本。** Espryt 内部确实请求原生 ES 3.2→3.1→3.0,但那是实现 desktop GL 的 backend context,不等于应用请求的独立 GLES context。GL_VERSION 路径依然返回 desktop target;glGetShaderPrecisionFormat 还是 stub。(MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp:16591–16612;MobileGL/MG_Impl/GLImpl/Getter/GL_Getter.cpp:619–626;MobileGL/MG_Impl/GLImpl/Exporting/Definitions.cpp:152)
前端 EGLState 有多个 context handle、per-thread current/error/API 表、context owner 检查;shareCtx 被存为 SharedContext。然而 GL 状态仍通过全局 pGLContext,active backend 是全局单例,Espryt 只有一套 g_Display/g_Context/g_Surface,Magma 只有全局 pVulkanRenderer。协议 SurfaceOp 没有 CreateContext/DestroyContext/share-group 消息。**inferred:**多个 EGL handle 可创建、context 可在线程间迁移,不等于 N 个独立 GL context 或正确 share-group 隔离;多线程同时发 GL 命令的通用实现不能视为已支持。(MobileGL/MG_State/EGLState/Core.cpp:101–126、:637–641、:1204–1278;MobileGL/MG_State/GLState/Core.h:701;MobileGL/GlobalObjects.cpp:23–24;MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp:16183–16185、:16685;MobileGL/MG_Backend/DirectVulkan/DirectVulkan.cpp:38–39;MobileGL/MG_Remote/Protocol/protocol.fbs:240–258)
文档明确把多 context 留作未做;INPROC 角色隔离也明确不是给 1494 个 pGLContext 读点加 TLS。服务器 native context 常驻 apply 线程,客户端 ReleaseCurrent 只改变逻辑 live 状态,不真实解绑 native context。(MobileGL/MG_Remote/CONTRACT-P12.md:64;docs/Disaggregated/design/09-build-switches-counters.md:21;MobileGL/MG_Remote/Server/ServerLoop.cpp:330–391)
### 2.4 EGL extension 广告与真实实现
完整广告字符串如下,没有隐藏的 dma-buf/fence/damage/buffer-age 附加表:(MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp:458–473)
| QueryString 范围 | 广告 |
|---|---|
| EGL_NO_DISPLAY | EGL_EXT_client_extensions、EGL_EXT_platform_base、EGL_KHR_platform_base、EGL_MESA_platform_surfaceless |
| initialized display | EGL_KHR_create_context、EGL_MESA_platform_surfaceless |
以下均**未广告**:EGL_EXT_image_dma_buf_import、EGL_EXT_image_dma_buf_import_modifiers、EGL_MESA_image_dma_buf_export、EGL_KHR_fence_sync、EGL_ANDROID_native_fence_sync、EGL_KHR_swap_buffers_with_damage、EGL_EXT_swap_buffers_with_damage、EGL_EXT_buffer_age、EGL_KHR_surfaceless_context。(同上 MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp:465–473)
eglCreateImage 虽有入口,却忽略 attribList,仅保存 target/buffer/context 到 map,不调用 driver 或解析 plane fd/offset/stride/modifier。eglCreateSync 只接受 EGL_SYNC_FENCE,创建时直接标 EGL_SIGNALED;ClientWaitSync 直接返回 EGL_CONDITION_SATISFIED,WaitSync 只验证归属。因此这些入口不能用作 Anland 的 dma-buf import/export 或 explicit sync。include/EGL/eglext.h 中的声明也不能改变这一事实。(MobileGL/MG_State/EGLState/Core.cpp:1336–1359、:1378–1394、:1430–1466;include/EGL/eglext.h:784–829、:1103–1111)
### 2.5 GLXImpl 是否是 stub
**不是纯 stub,也不是 Mesa DRI/DRI3 provider。** 它是 MobileGL EGL 上的一层 GLX facade;动态加载 libX11 并解析 XGetGeometry、XGetVisualInfo、XDefaultScreen/Visual、XVisualIDFromVisual、XFree、XSync;按 drawable 建立 EGL surface,swap 前最多每 250ms 查询一次几何并 resize,再调用 EGLImpl::SwapBuffers。没有查到实现 X11 GLX wire rendering、DRI loader driver 或 DRI3/Present buffer 交付的代码。(MobileGL/MG_Impl/GLXImpl/GLXImpl.h:12–17;MobileGL/MG_Impl/GLXImpl/GLXImpl.cpp:129–149、:258–327、:956–965、:1019–1023;后一个“没有”是对本实现及检索的结论。)
它的 QueryVersion 固定答 GLX 1.4,QueryServerString 复用本地 client string,并未向 X server 查询 GLX 能力。(MobileGL/MG_Impl/GLXImpl/GLXImpl.cpp:543–571)它广告 GLX_ARB_create_context、_no_error、_profile、ARB_get_proc_address,以及 EXT/MESA/SGI swap_control;CreateContextAttribsARB 把版本/profile/flags 翻译为 MobileGL EGL 属性。legacy CreateContext/NewContext 默认请求 3.3 compatibility。GLXWindow 就是输入 XID;draw/read 不同时实际用 draw 同时充当 read,却记录用户 read handle。(MobileGL/MG_Impl/GLXImpl/GLXImpl.cpp:84–86、:785–883、:941–953、:968–979)
**inferred:**这可作为将来 Linux X11 frontend 的复用起点;对 Anland/Xwayland,需要新增本地 X drawable 的图像提交机制(例如 DRI3/Present,或先用 CPU image copy),不能把 XID 发给 Android 后端当 ANativeWindow,更不能仅把 ServerOwned 打开就得到每个 X 窗口的内容。依据为该 facade、下面 Rule H / native window 路径。
## 3. Split 模式的 present 路径
### 3.1 共用调用链
1. 导出的 eglSwapBuffers → EGLImpl::SwapBuffers,检查 surface,进入 BackendObject_Remote::SwapEGLBuffers。
2. Remote 调用 base SwapEGLBuffers,验证当前线程、display、唯一 active surface,再通过 GetBackendFunctions().Present 调用 client emitter;不额外调用 ServerSwapEGLBuffers。
3. EmitPresent 先获取 present credit,铸造 FrameSerial,再 EmitAndWait(Present);MGPPresent 本体**只有 FrameSerial**。
4. server 解码至 ServerVerbSink::OnPresent → backend table Present();返回后更新 frame serial、报告已完成 GL fences、ReturnPresentCredit。
(MobileGL/MG_Impl/EGLImpl/Exporting/Definitions.cpp:112–117;MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp:207–228;MobileGL/MG_Remote/Client/BackendObject_Remote.cpp:396–404;MobileGL/MG_Backend/BackendObject.cpp:369–397;MobileGL/MG_Remote/Client/EmitTables.cpp:1165–1188;MobileGL/MG_Pipe/MGPipeTypes.h:1807–1809;MobileGL/MG_Remote/Server/PipeApplier.cpp:388–438)
没有一条 present 回包包含 image/buffer fd、fence fd、surface id、format、stride、offset 或 modifier。它目前确认服务器本地 Present 已返回,不是“Linux compositor 已经采用或释放某个 buffer”。(上述 MGPPresent / OnPresent;后一语义解释为 **inferred**。)
### 3.2 三类 surface
| 模式 | 创建/目标/呈现 |
|---|---|
| (a) Client-owned native window | Remote 先 ServerSetWindowHandle 再 ServerCreateEGLWindowSurface;每个 EGL forwarder 先等已提交命令 apply,避免跨批次乱序。(MobileGL/MG_Remote/Client/BackendObject_Remote.cpp:178–220)Rule H 永久禁止 peer-window-system-local value 跨进程,不是等 P12 将来补。(MobileGL/MG_Remote/CONTRACT-P6.md:31–45)wire 的 AndroidNativeWindow 和 MetalLayer 被 decoder 拒绝、以 UnmigratedSurface 闩会话。(MobileGL/MG_Remote/Protocol/SurfaceOpCodec.cpp:216–224、:303–314) |
| (a) X11/Win32/None 的残留例外 | decoder 仍接受这些 token,UnpackWindowHandle 强转 void*;Linux-local Magma 可用 XID+XOpenDisplay 建 Xlib surface,但 Android build 创建的是 VkAndroidSurfaceKHR。**inferred:**被 decoder 接受不是容器 XID 对 Android 有效,更不是 Anland 集成,存在未封住的窗口种类路径。(MobileGL/MG_Remote/Protocol/SurfaceOpCodec.cpp:124–143、:226–236;MobileGL/MG_Remote/Server/ServerLoop.cpp:1226–1264;MobileGL/MG_Backend/DirectVulkan/Renderer/VulkanRenderer.cpp:16429–16500) |
| (b) MOBILEGL_IPC_SURFACE=server | Remote 不发 SetWindowHandle;WindowKind=ServerOwned,nativeToken=0。服务器从 ServerDisplay 取得窗口租约,替换为本进程 Android WindowHandle,调用同一 backend window 创建;reply 返回实际尺寸。Java SurfaceView 是目标,**不是 Anland wl_surface**。(MobileGL/MG_Remote/Client/BackendObject_Remote.cpp:216–218;MobileGL/MG_Remote/Protocol/SurfaceOpCodec.cpp:160–169;MobileGL/MG_Remote/Server/ServerLoop.cpp:1600–1652;MobileGL/MG_Remote/Server/DisplayServerJni.cpp:11–24) |
| (c) Pbuffer / headless | CreatePbufferSurface → SurfaceOp → server backend pbuffer;会话闩为 Offscreen。Espryt 建原生 EGL pbuffer;Magma 创建带尺寸的 windowless renderer,在 Linux 用 VK_EXT_headless_surface,在 Android 无此扩展时使用 AImageReader 的 ANativeWindow 作为不可见 producer target。该 Android fallback 明确“never acquires images”,没有把图像回给 client。(MobileGL/MG_Remote/Client/BackendObject_Remote.cpp:271–288;MobileGL/MG_Remote/Server/ServerLoop.cpp:1361–1381;MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp:16667–16680;MobileGL/MG_Backend/DirectVulkan/BackendObject_DirectVulkan.cpp:378–387;MobileGL/MG_Backend/DirectVulkan/Renderer/VulkanRenderer.cpp:16344–16410) |
即使 pbuffer 调用 eglSwapBuffers,也走同一 Present 命令,不是 readback-pixels 的自动交付。真正 EGL_NO_SURFACE 的应用 bind 受第 2 节限制;文档里的“surfaceless”通常描述 headless native display/pbuffer 路线。(MobileGL/MG_Backend/BackendObject.cpp:314–338、:369–397;MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp:498–520)
### 3.3 后端如何拿到 presentation target
**Espryt / DirectGLES:**窗口来自 backend 的 WindowHandle(ServerOwned 时为租约中的 ANativeWindow),用 vendor EGL 的 eglGetDisplay / eglInitialize / eglBindAPI(ES),创建一个原生 ES context 和 eglCreateWindowSurface;Present 在 native GL 命令流插 GLsync,然后原生 eglSwapBuffers(g_Display,g_Surface),轮询 GLsync 推进资源回收水位。这里不是 EGL native-fence fd。(MobileGL/MG_Remote/Server/ServerLoop.cpp:1623–1635;MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp:16587–16612、:16639–16664、:17252–17290)
**Magma / DirectVulkan:**InitWindowSurface 将 m_windowHandle.Handle 放入全局 VulkanRenderer;Android CreateSurface 以此 ANativeWindow 调 vkCreateAndroidSurfaceKHR,再 vkCreateSwapchainKHR。Present 提交 VkCommandBuffer,调用 vkQueuePresentKHR,并继续 acquire/重建逻辑;VkFence/VkSemaphore 是该 renderer 内部同步。(MobileGL/MG_Backend/DirectVulkan/BackendObject_DirectVulkan.cpp:359–374;MobileGL/MG_Backend/DirectVulkan/Renderer/VulkanRenderer.cpp:16429–16435、:14528–14569、:14634–14645;MobileGL/MG_Backend/DirectVulkan/Renderer/SwapchainObject.cpp:284)
### 3.4 AHB、dma-buf 与 fence fd:现有命中的真正用途
**未找到产品帧导出路径。** 有 AHB import、有 external-memory 扩展、有 fd passing;用途与“default framebuffer 导出给 client”不同。完整逐命中位置/用途索引见附录 A(主仓库 tracked tree 586 个匹配行、134 个文件;包含文档、历史日志、公共 EGL header,不把 submodule 内上游声明算作 MobileGL 实现)。
| 命中类别 | 用途与是否可直接用于 Anland present |
|---|---|
| P11 AdoptT0 | client 分配 **AHARDWAREBUFFER_FORMAT_BLOB**,height=1,usage=CPU read/write + GPU_DATA_BUFFER,持 CPU lock;通过 hop socket 传 handle,server 收到后校验 BLOB 宽度=size。是 persistent GL buffer 的 backing store,**不是颜色图像**。(MobileGL/MG_Remote/Transport/AdoptT0.cpp:35–75、:78–96、:108–125) |
| GLES eglGetNativeClientBufferANDROID | 用在 glBufferStorageExternalEXT(nativeClientBuffer),然后 MapBufferRange persistent/coherent。没有把该 AHB 做 EGLImage render target。(MobileGL/MG_Backend/DirectGLES/Managers.cpp:2799–2817、:2835–2857、:2875–2897) |
| Vulkan VK_ANDROID_external_memory_android_hardware_buffer | VkBufferManager 将 client 的 AHB BLOB 导入 **VkBuffer**、dedicated VkDeviceMemory,并处理持久映射/生命周期;VulkanRenderer 按条件启用扩展供它用。不是导出 VkImage / swapchain image。(MobileGL/MG_Backend/DirectVulkan/Renderer/VkBufferManager.cpp:631–742;MobileGL/MG_Backend/DirectVulkan/Renderer/VulkanRenderer.cpp:15348–15362;MobileGL/MG_Backend/DirectVulkan/Renderer/VkBufferObject.h:75–80) |
| POST / T0 self-test | server bind 时按允许开关、平台 AHB、后端 import op 和 POST 决定 kCapAdoptT0;失败退 T2。产品 T1 已关闭;显式选择 T1 也退 T2。(MobileGL/MG_Remote/Server/ServerSession.cpp:1092–1143;MobileGL/MG_Remote/CONTRACT-P11.md:233–248) |
| extmem_probe 的 external_memory_fd / DMA_BUF / SCM_RIGHTS | 独立探针测试 T1 host-visible buffer fd 导出、T0 AHB BLOB 导入、T3 host memory。它确实有 vkGetMemoryFdKHR 与跨进程读写,但不是 renderer 的逐帧图像输出。(tools/spikes/extmem_probe/README.md:23–60;tools/spikes/extmem_probe/extmem_probe.cpp:8–20、:1718–1773、:2182–2188、:2356–2378、:3590–3664) |
| AImageReader / AHARDWAREBUFFER_USAGE_GPU_COLOR_OUTPUT | integration、CTS、piglit harness 创建 Android 测试窗口;Magma headless fallback 也使用 AImageReader window,但未 acquire 导出图像。(MobileGL/MG_IntegrationTest/Harness/HeadlessGL.cpp:102;tools/cts/platform/tcuMobileGLPlatform.cpp:129–130;tools/cts/probe/mgprobe.c:158–159;tools/piglit-android/patches/waffle-mobilegl-android.patch:277–278;MobileGL/MG_Backend/DirectVulkan/Renderer/VulkanRenderer.cpp:16355–16390) |
| SCM_RIGHTS 产品实现 | 共享段和门铃交付、supervisor 数据连接 handoff,以及 T0 的 hop;详见第 4 节。没有定义 FrameReady(bufferFd,fenceFd) 消息。(MobileGL/MG_Remote/Transport/FdPassing.cpp:108–149;MobileGL/MG_Remote/Client/ClientSession.cpp:1186–1251;MobileGL/MG_Remote/CONTRACT-P11.md:257) |
| include/EGL/eglext.h | Khronos 公共声明:AHB native client buffer、dma-buf import/modifiers/export。只有声明,不是 MobileGL 功能。(include/EGL/eglext.h:517–520、:784–829、:1103–1111) |
| 历史日志 | vendor Vulkan extension 枚举及运行诊断;证明该次 driver 暴露了名字,不证明 MobileGL 调用该扩展输出帧。逐行出处见附录 A。 |
对主仓库 tracked tree 的指定精确子串检索中,**sync_file 和 SYNC_FD 无命中**;另外检索未找到产品 vkGetSemaphoreFdKHR / eglDupNativeFenceFDANDROID 调用。EGL_ANDROID_native_fence_sync 未广告,前端 EGL sync 只是状态对象;GLsync / 完成水位也不是可交给 zwp_linux_explicit_synchronization_v1 的 sync_file fd。(检索范围见附录 A;MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp:465–473;MobileGL/MG_State/EGLState/Core.cpp:1336–1394;MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp:17252–17283)
**inferred:**Anland 需要新增 image 路线,不能把 P11 BLOB 改个名字就用。最直接候选是 server 分配/导入可渲染 AHB image(GLES:EGLImage+FBO;Vulkan:external-memory VkImage),输出单平面图像描述及真实同步;也可改造 AImageReader 为实际 acquire/release 的 buffer 消费链。必须验证四字符格式、stride/offset、LINEAR/INVALID modifier 以及 AHB/gralloc native handle 与普通 dma-buf 的可转换性,不能把 opaque fd 或 AHB 多 fd handle 默认当成 Anland 可导入的线性 ARGB/XRGB。依据:当前 BLOB/import 代码与题目给定 Anland buffer 限制;历史探针甚至在 Adreno/Mali 两台上都没得到 T1-dma-buf 导出(docs/Disaggregated/notes/p0/p0-device-findings.md:18–27),但该 buffer 探针也不能证明所有 image 路线必然失败。
## 4. Fd passing、transport 与 SELinux
### 4.1 今天实际可用的组合
| 拓扑/端点 | 实际数据面 | fd 能力 |
|---|---|---|
| inproc | 同进程共享段/双角色 | InProcessTransport 复制描述符给 peer,模拟所有权;不是跨 Android 安全域方案。(MobileGL/MG_Remote/Transport/InProcessTransport.cpp:200;docs/Disaggregated/guide/build-and-run.md:20–22) |
| spawn + fork | ShmLink | launch server 后连接本机 AF_UNIX;四段+三个门铃经 aux fd passing。配置只收 auto/shm。(MobileGL/MG_Remote/Client/ClientSession.cpp:954–1005、:1186–1251) |
| spawn + unix:path / @abstract | ShmLink | control 与 aux 配对;ShareFd/ReceiveFd 在 aux 上 SCM_RIGHTS。(MobileGL/MG_Remote/Client/ClientSession.cpp:928–950;MobileGL/MG_Remote/Transport/SocketTransport.cpp:849–868) |
| spawn + fd:control,aux | ShmLink | P11 B1 已连接的两根 AF_UNIX SOCK_STREAM socket;可由 Android helper/broker 交接。只收 auto/shm。(MobileGL/MG_Remote/CONTRACT-P11.md:110–125;MobileGL/MG_Remote/Client/ClientSession.cpp:877–924) |
| spawn + tcp://host:port | StreamLink | **不传 fd**。SocketTransport::ShareFd/ReceiveFd 对 m_tcp 返回 UNSUPPORTED;client 只接 auto/stream。(MobileGL/MG_Remote/Transport/SocketTransport.cpp:849–868;MobileGL/MG_Remote/Client/ClientSession.cpp:928–950、:1025–1026) |
| TCP control + shm data | 设计过,**当前未接线** | design/06 描述的 ShmLink 独立 AF_UNIX rendezvous 是第二波设计;同文件最后明确第一波仅 TCP+stream。当前上层按 IsTcp 选数据面并拒绝混搭,不能按愿景回答已经支持。(docs/Disaggregated/design/06-transport.md:54–67;MobileGL/MG_Remote/Client/ClientSession.cpp:928–936、:1025–1026) |
“控制面不传 fd”作为协议层概念成立:SCM_RIGHTS 不塞进 FlatBuffers 控制字节流。但当前实现的 **ITransport 接口仍保留 ShareFd / ReceiveFd**,由 SocketTransport 的 aux socket 实现;并非代码已经完全迁到 ShmLink 自有交付 API。新实现应尊重实际的 ITransport/aux 接口,而不是仅照旧契约措辞接线。(MobileGL/MG_Remote/Transport/ITransport.h:87–108;MobileGL/MG_Remote/Transport/SocketTransport.cpp:849–868;对照 MobileGL/MG_Remote/CONTRACT-P6.md:636–648)
### 4.2 “每帧 server → client buffer fd + fence fd”有多少现成基础
基础发送已是**双向**接口;server 现在就把共享段 fd 发给 client。SendFd 的 ancillary buffer 只放一个 int;ReceiveFd 虽收集至多四个以便关闭多余 fd,随后明确要求 receivedCount==1。sideband 最大 256 字节。不能原样把“两 fd”塞进一次现有消息。(MobileGL/MG_Remote/Transport/ITransport.h:89–108;MobileGL/MG_Remote/Transport/FdPassing.h:36–38、:48–73;MobileGL/MG_Remote/Transport/FdPassing.cpp:131–149、:253–267、:289–301;MobileGL/MG_Remote/Client/ClientSession.cpp:1194–1217)
**inferred:fd 搬运本身是局部扩展,完整呈现协议是显著工作。** 可选择两个带相同 frame/buffer serial、不同 fd-kind 的单 fd offer,或定义版本化 multi-fd packet;更有效的是 buffer pool 首次注册发 buffer fd,之后每次 present 仅发 buffer id + acquire fence。需要同时实现:
1. session/surface/buffer/generation/frame 关联、format/plane metadata、协商和协议修订;
2. client 持续接收 server aux offer 的 dispatcher,不能只在握手读取 7 个 fd;与已有 T0 aux 用途协调;
3. fence=-1 / 无 fence 情况、重复/陈旧/中断消息及 fd 关闭规则;
4. buffer release / release fence 的反向通道,在 compositor 未释放前禁止复用;
5. 有界发送和背压,避免 apply 线程在 client 不读 fd 时永久阻塞;
6. StreamLink 没有本地 fd 传递的 fallback:如同机额外 AF_UNIX,或显式像素传输模式。
这些是设计建议,不是现有功能。依据:一次一个 fd、有限 sideband、仅 serial 的 Present、T0 offer 协议及当前单独的阶段性接收逻辑。(MobileGL/MG_Remote/Transport/FdPassing.h:36–73;MobileGL/MG_Remote/Client/ClientSession.cpp:1186–1251;MobileGL/MG_Remote/CONTRACT-P11.md:257;MobileGL/MG_Pipe/MGPipeTypes.h:1807–1809;MobileGL/MG_Remote/Transport/SocketTransport.cpp:849–868)
### 4.3 谁创建共享段:文档 owner 不等于 allocation owner
**当前跨进程产品代码由 server 创建全部四段**:
- ServerSession::Accept 的非 stream 分支调用 Memory().Create(sizes, MemoryRole::Server)。
- SessionSegments::Create 枚举 mgl-cmd、mgl-stage、mgl-reply、mgl-event,并逐个 ShmSegment::Create / Map。
- client 收 7 个 fd(4 段+3 门铃),再 AdoptFromDescriptors(..., MemoryRole::Client)。
(MobileGL/MG_Remote/Server/ServerSession.cpp:713–737;MobileGL/MG_Remote/Transport/ShmSegment.cpp:236–284;MobileGL/MG_Remote/Client/ClientSession.cpp:1186–1251)
设计表把 SEG_CMD/SEG_STAGE “拥有者”写 client,适合解释写者/语义归属,**不能用于证明 fd 是 root container client 创建的**。Linux 的 ShmSegment::Create 用 raw memfd_create syscall + ftruncate,失败退 shm_open+立即 unlink;Android 用 ASharedMemory_create。若 server 是 Android app,其握手段走 Android 创建分支,而非 Linux client 的 memfd 分支。(docs/Disaggregated/design/06-transport.md:9–17;MobileGL/MG_Remote/Transport/ShmSegmentPosix.cpp:51–109;上段调用点)
StreamLink 用私有段传字节,本地 memfd/存储并不以 fd 共享给对端;这与 ShmLink 的跨进程共享不同。(docs/Disaggregated/design/06-transport.md:17、:59;MobileGL/MG_Remote/Server/ServerSession.cpp:713–737)
**inferred:**因此题目担心的“Android untrusted_app 使用 root-client 创建的 CMD/STAGE fd”不是当前握手路径的准确模型;真正需要验证的是 root/container 域接收和映射 app-origin fds、AF_UNIX connectto/namespace 可达性,以及今后客户端返回 release fence 的 fd use。P11 T0 确实是相反方向的 client-origin AHB,但 glibc client 没有该 Android AHB allocator,不能自动享有 T0;可先明确选择 T2。(MobileGL/MG_Remote/Transport/AdoptT0.cpp:35–54;MobileGL/MG_Remote/Transport/AdoptT0.h:56–61;MobileGL/MG_Remote/CONTRACT-P11.md:233–248)
历史 SELinux 测量:shell 和另一个 untrusted_app 连 server 的 abstract unix socket 被 connectto 拒;root relay 打通连接后,另一 app mmap server 创建的段可用。B1 因而实现令牌 broker + app_process helper + Binder PFD 交接,helper exec 外部程序并设置 fd: 端点。**该证据不是 Droidspaces root glibc/chroot 域的测试结论**,不能承诺所有 ROM 或 root 策略都允许。(docs/Disaggregated/notes/p11/B0-CROSS-APP.md:3–15;MobileGL/MG_Remote/CONTRACT-P11.md:110–125、:195–197)
还有部署限制:目前 broker 只认离屏 MobileGLServerService,显示 Activity :mglwin 在跑时也可答 server-not-running;它不是 P12 onscreen server 的通用 broker。(MobileGL/MG_Remote/CONTRACT-P11.md:147)
## 5. Session / 多 client / 多窗口限制
### 5.1 哪些是宿主管理策略,哪些深入进程状态
| 限制 | 所在层与深度 |
|---|---|
| “同设备一个 server” | P12 APK 产品策略:DisplayActivity 启动会 stopService;Service 启动会结束显示 server。不是 kernel / wire 全设备唯一锁。(MobileGL/MG_Remote/CONTRACT-P12.md:46;android-plugin/app/src/main/java/top/mobilegl/plugin/MobileGLDisplayActivity.java:119;android-plugin/app/src/main/java/top/mobilegl/plugin/MobileGLServerService.java:85–103、:139) |
| 这个口号已有例外 | B1 在主监听为 TCP 时另起一个私有 UNIX broker supervisor。两者是独立 process/supervisor;所以不能把“一个 device 最多一个 session”当已严格执行的全局不变量。**inferred:**不同 supervisor 各自的 Busy 不互相协调。(android-plugin/app/src/main/java/top/mobilegl/plugin/MobileGLServerService.java:147–162;MobileGL/MG_Remote/CONTRACT-P11.md:113;MobileGL/MG_Remote/Server/ServerMain.cpp:1222、:1363、:1548) |
| 每 supervisor 一个 active session | TCP authenticated second Hello → Refuse Busy;UNIX/thread/fork 路线也做 Busy。单个慢启动但已配对 client 可占槽;很晚才发 Hello 的第二个 client 可能只看见发送失败。(MobileGL/MG_Remote/Server/ServerMain.cpp:915、:1222–1260、:1363、:1548–1565;MobileGL/MG_Remote/CONTRACT-P11.md:130) |
| Offscreen fork-per-session | Service exec libMobileGLServer.so endpoint --serve;每 session 子进程 fork,并设 PR_SET_PDEATHSIG 随 supervisor 退出。它本来具备进程隔离结构,但调度仍串行。(android-plugin/app/src/main/java/top/mobilegl/plugin/MobileGLServerService.java:180–188;MobileGL/MG_Remote/Server/ServerMain.cpp:317、:1240、:1553;MobileGL/MG_Remote/CONTRACT-P12.md:45) |
| Onscreen 串行进程内 session | Activity 的 :mglwin 持 SurfaceView,server 用 Handoff::Thread;backend 按进程钉住,首次 session 可决定类型,之后不能换另一 backend。会话间重置 latch / 清 backend 状态。(MobileGL/MG_Remote/CONTRACT-P12.md:44;MobileGL/MG_Remote/Server/ServerMain.cpp:520–542、:1623;docs/Disaggregated/notes/p12/INTEGRATOR-DECISIONS-P12.md:10–14) |
| 一会话一个 surface mode | 首次成功 pbuffer → Offscreen;ServerOwned → OnScreen。另一类返回 SurfaceModeMismatch,拒绝不等于杀 session。X11/Win32/None 残留路径不闩模式,是未收紧的例外。(MobileGL/MG_Remote/CONTRACT-P12.md:17、:23;MobileGL/MG_Remote/Server/ServerLoop.cpp:1361–1381、:1539–1543、:1606–1614) |
| ServerOwned 只有一个实际窗口 | 多个 surface token 可以存在,但都指 server 的同一窗口;一个 extent 应用到全部。不是 M 个独立窗口。(docs/Disaggregated/notes/p12/INTEGRATOR-DECISIONS-P12.md:16;MobileGL/MG_Remote/Server/ServerLoop.cpp:1627–1648;MobileGL/MG_Remote/Client/ClientSession.cpp:449–463) |
| Session 单例 | ServerSession::Active 是一个进程全局 atomic 指针,ServerSessionInstance / ClientSessionInstance 为单例;segment resolver 也明确全进程唯一,反向 callback 表为全局。(MobileGL/MG_Remote/Server/ServerSession.cpp:527–543、:832–857;MobileGL/MG_Remote/Client/ClientSession.cpp:616–619;MobileGL/MG_Pipe/MGPipeCallbacks.h:76–77) |
| Backend / frontend 单例 | pGLContext、pActiveBackendObject、global function table;Espryt g_Display/g_Context/g_Surface;Magma pVulkanRenderer。切换 surface 会替换 renderer/运行时状态,不是独立 per-window/context renderer 集合。(MobileGL/MG_State/GLState/Core.h:701;MobileGL/GlobalObjects.cpp:23–24;MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp:16183–16185;MobileGL/MG_Backend/DirectVulkan/DirectVulkan.cpp:38–39;MobileGL/MG_Backend/DirectVulkan/BackendObject_DirectVulkan.cpp:359–387) |
| 热路径缺乏多窗口身份 | Present 只有 FrameSerial;MGPSurfaceInfo 只有尺寸/格式/samples/layers/default 标记,没有 surface id。当前依赖 session 当前绑定目标,无法直接表达并行多窗口完成/释放。(MobileGL/MG_Pipe/MGPipeTypes.h:1807–1809、:1999–2005) |
### 5.2 要服务 N clients × M windows,需要什么
以下均为 **inferred**,基于上表结构:
- **N 个 client 最小方案:每 client 一个 worker process。** 扩展 offscreen supervisor 为多 child/session registry、把控制/数据配对、认证、额度、日志、退出清理路由到对应 worker;这样可以暂时保留大量 backend process-global 状态。仅删一个 Busy 判断不够,当前 child/session handoff 和 Active 指针模型必须保持隔离。(基础:MobileGL/MG_Remote/Server/ServerMain.cpp:915、:1222–1260;MobileGL/MG_Remote/Server/ServerSession.cpp:527–543)
- **同一进程并发 N sessions** 则要 session 化 active backend、resolver、callback 表、latch、caps、backend resource/cache 全局,或完整线程/对象归属隔离;目前 P12 的结束清理只服务串行重用。(基础:MobileGL/MG_Remote/Server/ServerSession.cpp:832–857;MobileGL/MG_Pipe/MGPipeCallbacks.h:76–77;docs/Disaggregated/notes/p12/INTEGRATOR-DECISIONS-P12.md:12–14)
- **单 client 的 M windows** 要有每 surface 独立 framebuffer / image pool、尺寸世代、swap interval / credits、present/release identity;修改 active-surface backend 生命周期,避免换窗即丢弃该进程唯一 renderer。共享 GL 资源不能粗暴一窗口一进程来保证,还要真实 context/share-group。(基础:MobileGL/MG_Backend/DirectVulkan/BackendObject_DirectVulkan.cpp:359–387;MobileGL/MG_Backend/BackendObject.cpp:314–338;MobileGL/MG_Pipe/MGPipeTypes.h:1807–1809、:1999–2005)
- **Xwayland glamor** 应单独当系统级 EGL/GLES/图像共享消费者验证;应用 GLX facade 可用并不能保证 glamor 所需 EGLImage、dma-buf import/export、同步和 renderer 资源互通。可以先让 Xwayland 保持其他渲染/软件路径,仅给选定 GL 应用使用 MobileGL;这属于分阶段部署选择,不是现成配置承诺。(基础:第 2 节 image/sync/config 和 GLX 证据;Anland/Xwayland 场景取自题目。)
## 6. 窗口系统事件、几何、失效与 pacing
### 6.1 现有协议能表达什么
SurfaceOpKind 完整列表为 InitializeDisplay、CreateWindowSurface、CreatePbufferSurface、ResizeWindowSurface、ReleaseSurface、MakeCurrent、ReleaseCurrent、SetSwapInterval、ReleaseResources、SetWindowHandle、InitCapabilities(另有 None)。它有 seq/display/surface/windowKind/nativeToken/width/height/swapInterval/readSurface/context;没有 Wayland object、DRM format/modifier、damage region 或 buffer release。(MobileGL/MG_Remote/Protocol/protocol.fbs:240–305)
WindowKind 为 None=0、AndroidNativeWindow=1、X11=2、Win32Hwnd=3、Surfaceless=4、Pbuffer=5、MetalLayer=6、ServerOwned=7;**没有 Wayland/GBM**。ServerOwned 只合法于 CreateWindowSurface,token 必须 0。(MobileGL/MG_Remote/Protocol/protocol.fbs:261–276;MobileGL/MG_Remote/Protocol/SurfaceOpCodec.cpp:199–214)
SurfaceReply 含 seq/ok/EGL version/eventHead/width/height/refusal;defaultFb schema 字段还在,但 encoder 固定传 0,实际 framebuffer 几何通过 kEventSurfaceChanged。eventHead 保证更早的数据面事件先于 reply 被观察。(MobileGL/MG_Remote/Protocol/protocol.fbs:308–323;MobileGL/MG_Remote/Protocol/SurfaceOpCodec.cpp:242–260)
ServerOwned 的 resize 为 Java SurfaceHolder.setFixedSize / setSizeFromLayout 请求,窗口实际尺寸经 reply/event 返回;Activity 做等比 letterbox。kEventSurfaceChanged 带 Width/Height/InternalFormat/Samples/Layers/IsDefault,client 更新默认 framebuffer 和所有 ServerOwned surface extent。没有 frame callback、presentation timestamp 或 input forwarding。(MobileGL/MG_Remote/CONTRACT-P12.md:31–35、:64;MobileGL/MG_Remote/Server/DisplayServerJni.cpp:27–34;MobileGL/MG_Remote/Client/ClientSession.cpp:449–463;MobileGL/MG_Pipe/MGPipeTypes.h:1999–2005)
SurfaceProgress 是冷启动 SurfaceOp 心跳,不是“该帧可显示”的事件。P10 的 kEventFenceSignaled 是逻辑 GL fence 完成报告,不是 sync_file fd。(MobileGL/MG_Remote/Protocol/protocol.fbs:390–398;docs/Disaggregated/ROADMAP.md:38;MobileGL/MG_Remote/Server/PipeApplier.cpp:433–438)
### 6.2 device-lost:文档承诺与代码差异
现有 peer hangup 设置 ClientSession::m_deviceLost,一次日志后后续 wire verbs DECLINED;不自动 respawn。窗口被撤销时,先在 apply 线程释放 backend surface,再 Fatal ServerWindowLost,最后归还 lease;Detach 有界 3 秒。纯等待超时不应被当成 peer 死亡,但仍有自己的 Fatal timeout 失败家族。(MobileGL/MG_Remote/Client/ClientSession.cpp:595–613;MobileGL/MG_Remote/CONTRACT-P12.md:27–40;MobileGL/MG_Remote/Client/ClientSession.cpp:2432–2438)
**不能照抄“eglSwapBuffers 返回 EGL_CONTEXT_LOST”为当前已实现行为。** design/08:33 确实这样写,但实际 EGLImpl swap 只有 validation/backend false 时 SetError(EGL_BAD_SURFACE),成功则 TRUE;base 调 void Present() 后返回 true,Remote 直接复用 base。检索产品代码中 EGL_CONTEXT_LOST 仅见 enum-to-string,未见 lost→EGL error 映射。因此:GL reset/device-lost 机制存在,EGL swap 的标准错误映射有缺口;**inferred:**死亡后某些调用可仍沿现有 Bool 路径成功,具体时序未运行验证。(docs/Disaggregated/design/08-runtime-and-platform.md:33;MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp:207–228;MobileGL/MG_Backend/BackendObject.cpp:390–397;MobileGL/MG_Remote/Client/BackendObject_Remote.cpp:396–404;MobileGL/MG_Util/Converters/EGLToStr/EGLEnumConverter.cpp:77)
### 6.3 Present credit 与 compositor 怎样接
MOBILEGL_IPC_PRESENT_CREDIT 默认 1、范围 1..8;client 在编码 present **之前**等待 serial-credit 的 presentAckSerial。server 在 backend Present() 返回之后还 credit。它限制命令执行/本地 swap 的 run-ahead,独立于 CMD/STAGE 字节 credit。(docs/Disaggregated/design/08-runtime-and-platform.md:7–8;MobileGL/MG_Remote/Client/ClientSession.cpp:2385–2438;MobileGL/MG_Remote/Client/EmitTables.cpp:1165–1181;MobileGL/MG_Remote/Server/PipeApplier.cpp:426–438)
文档 design/08 仍称 credit>1 未测,但后来的 P12 跨机验收已测 1/2/3;报告应以后者为准,不能把它写成仍完全未知。(docs/Disaggregated/design/08-runtime-and-platform.md:8;docs/Disaggregated/notes/p12/CROSSHOST-ACCEPTANCE.md:16、:23–34)
**inferred:接 Anland 至少要分开三种事件。**
| 事件 | 建议接线 / 不可混用的语义 |
|---|---|
| GPU frame ready | server 输出 image identity + acquire fence;client 可将 fd 交给 Wayland explicit synchronization。不能用现有 presentAckSerial 冒充 GPU fence。(基础:MobileGL/MG_Remote/Server/PipeApplier.cpp:426–438;题目给定 explicit sync) |
| compositor frame callback | 用于允许/建议下一帧节奏;可控制 frontend swap pacing、有限 credit 或单独 queue-depth。不能证明旧 buffer 已可重写。(基础:当前 credit 返回条件同上;新 compositor 语义为集成设计推断) |
| wl_buffer.release / explicit release fence | 发回 server 的 BufferReleased(surface,buffer,generation[,fence]),决定 image pool 的复用。多窗口要每窗/每池计数,不能只用全会话一个 frame serial。(基础:MobileGL/MG_Pipe/MGPipeTypes.h:1807–1809、:1999–2005;题目给定 Anland buffer 路线) |
还需让隐藏/最小化/长期无 frame callback 的窗口不会触发现有“credit 长期不还→PresentCreditTimeout”而丢会话;必须定义暂停、丢帧、buffer pool 耗尽和断连回收规则。这是 **inferred** 的协议设计需求,不是现有行为。(MobileGL/MG_Remote/Client/ClientSession.cpp:2432–2438;MobileGL/MG_Remote/CONTRACT-P12.md:64)
## 7. 通用 Linux 桌面 GL 覆盖:一张短表
| 能力 | Espryt / DirectGLES | Magma / DirectVulkan | 对 Linux 应用的含义 |
|---|---|---|---|
| 最大报告/目标 GL、GLSL | 4.6.0 / 4.6.0,静态 core identity。(MobileGL/MG_Backend/DirectGLES/BackendObject_DirectGLES.cpp:817–822) | 同为 4.6.0,静态 core identity。(MobileGL/MG_Backend/DirectVulkan/BackendObject_DirectVulkan.cpp:546–551) | 是广告/目标,不是完整一致性认证;README 仍写 4.2 Core 目标。(README.md:49–56) |
| Compatibility / fixed function | 两者共用前端:compat profile 属性可保存并用于宽松语义,但不是完整 legacy pipeline。导出/lookup 未找到核心 glBegin/glEnd、glMatrixMode、glLightfv、glMaterialfv、glNewList、glDrawPixels 的真实链;一些 EXT matrix 名只是扩展符号表存在。 | 同左 | 无法承诺旧 GL1.x/2.x fixed-function 桌面程序。依据:MobileGL/MG_State/GLState/Core.h:703–708;MobileGL/MG_Impl/GLImpl/Getter/GL_Getter.cpp:2426;MobileGL/MG_Impl/GetProcAddress.cpp:896–910、:1406–1407;MobileGL/MG_Impl/GLImpl/Exporting/Definitions.cpp:26–35;“无法承诺”为 **inferred**。 |
| GLES contexts | frontend BindAPI(ES) 接受;backend 内部 ES3.2→3.0 negotiation。 | frontend 同样接受 ES;backend 是 Vulkan。 | 没有完整 GLES profile/version 保证;GL_VERSION 不切 ES,GetShaderPrecisionFormat stub。(MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp:414–428;MobileGL/MG_Backend/DirectGLES/DirectGLES.cpp:16595–16612;MobileGL/MG_Impl/GLImpl/Getter/GL_Getter.cpp:619–626;MobileGL/MG_Impl/GLImpl/Exporting/Definitions.cpp:152) |
| GLX_ARB_create_context | 共用 Linux GLX facade;广告并将版本/profile 转到 EGL。(MobileGL/MG_Impl/GLXImpl/GLXImpl.cpp:84–86、:818–883) | 同左 | 入口可用≠完整 share group / DRI3 / Xwayland present。(第 2、5 节证据;判断为 **inferred**。) |
| 已知非游戏专属缺口 | DebugMessageControl/Callback/GetDebugMessageLog、若干 robustness/GetnUniform 等导出仍 stub;EGL image/sync 属于状态壳。 | 同样共用前端 | 会影响调试、robustness、图像互通和 compositor 消费者。(MobileGL/MG_Impl/GLImpl/Exporting/Definitions.cpp:397–429;MobileGL/MG_State/EGLState/Core.cpp:1336–1466;影响判断为 **inferred**。) |
| docs 记录的未完项 | fp64 server 广告/client 编译配置不一致;driver-written texture 拒读仍可变 session Fatal;多 context 未做。 | 有 malformed indirect fixture 丢设备、设备对齐约束及 monolith 特有债。 | 应以真实目标应用/GL CTS 子集验收,不能用 Minecraft 或 trace 成功覆盖全部 desktop workloads。(docs/Disaggregated/notes/DEBTS.md:14、:22、:25–28、:42;验收建议为 **inferred**。) |
这里的固定功能否定基于实际入口/前端检索,不把“IsCompatibilityProfile=false”单独当证明;相反,EGL/GLX 的 compatibility 请求和 getter 确实存在,必须与完整功能实现区分。(MobileGL/MG_Impl/GLXImpl/GLXImpl.cpp:794–812;MobileGL/MG_State/EGLState/Core.cpp:657–659;MobileGL/MG_Impl/GLImpl/Getter/GL_Getter.cpp:2426)
## 8. 文档是否已预见 Linux-on-Android / Wayland / AHB / 多 client / Termux
以下为原文节录。保留“历史设计”与“当前实现”的区别,不把旧推测当新验收。
| 主题 | 原文与出处 | 如何解读 |
|---|---|---|
| 容器 Linux / Termux | “**B 容器类 guest(DroidSpace / Winlator / Termux,共享内核)** … AF_UNIX … 同上(含 AHardwareBuffer_sendHandleToUnixSocket,API 26) … **整套 P6 机制逐字可用**。”(docs/Disaggregated/notes/p6/P6-ENDSTATE-REVIEW.md:138) | 同内核 transport 的历史论证;并非 Anland WSI 或 glibc AHB API 验收。 |
| 后来场景变更 | “**形态 B 不再是操作性场景;终局是 D,P6.5 在关键路径上。**”(docs/Disaggregated/notes/p6/P6-ENDSTATE-REVIEW.md:142) | 不能据历史容器表声称已为 Anland 交付。 |
| Linux client 范围 | “**默认先 Linux + Android(现有 CI 能验),Windows client 第二批 … macOS 仍不拆分。**”(docs/Disaggregated/notes/OPEN-QUESTIONS.md:28) | Linux client 是明确目标,但无 aarch64 glibc 专项验收。 |
| Wayland | “**Linux / WSL / CI 永不开窗(EGL_PLATFORM=surfaceless);Wayland 不支持。**”(docs/Disaggregated/design/08-runtime-and-platform.md:32) | 当前声明不支持;本次也没有查到 Wayland frontend/present 实现。 |
| 历史 X11 设想 | “**Window 是 XID,nativeToken:u64 直接送。backend 自己 XOpenDisplay(getenv(\"DISPLAY\")) 并构造 VkXlibSurfaceCreateInfoKHR … Wayland 今天不支持 … 维持。**”(docs/Disaggregated/notes/recovered/wf1/final/part3.md:80) | 是同 X server 的 XID 设想,不能移植成 Android ANativeWindow token。 |
| T0 与 T1 | “**T0 = client 分配 AHardwareBuffer、server 导入;T1 = server 导出 opaque fd;T2 = 拒绝,client 保留 shadow 并推送。**”(MobileGL/MG_Remote/CONTRACT-P11.md:3) | 全部处于 persistent-map store 议题;不是 frames。T1 当前关闭见 :239。 |
| AHB 帧输出方案曾被讨论 | “**Child renders into AHardwareBuffers, sends them over a unix socket, app presents.**” 并明确需 “**a new buffer-ring/fence protocol, an Espryt default-framebuffer-to-AHB FBO, Magma AHB import**”。(docs/Disaggregated/notes/p12/map-apk-process.md:87–90;另见 docs/Disaggregated/notes/p12/map-docs-contract.md:103、docs/Disaggregated/notes/p12/map-server-surface.md:113) | 这是 P12 调研中的备选方案,确实预见了帧 AHB 交付;并未落地为当前 present 路径。 |
| P12 为何没有交付该方案 | “**in-process server … renders straight into its SurfaceView; sessions run sequentially in that process. (Not fork + AHB.)**”(docs/Disaggregated/notes/p12/BRIEF-onscreen.md:14–15) | 最终范围明确选服务器进程内 SurfaceView,放弃这一阶段的 fork+AHB 帧桥。 |
| dma-buf 历史设想 | “**T0 — server 导入 client 分配:client 分配 AHardwareBuffer/dma-buf … 理想但可用性未知。**”(docs/Disaggregated/notes/recovered/wf1/final/part2.md:172) | 旧设计;落地是 AHB BLOB T0。 |
| Export 的实际局限 | “**T1-dma-buf … UNSUPPORTED**”两台设备;“**Tier decision for P11 (persistent maps across the process boundary)** … T0 … BLOB。”(docs/Disaggregated/notes/p0/p0-device-findings.md:21、:27) | 不要将 persistent VkBuffer opaque-fd 成功解释为线性 frame dma-buf 成功。 |
| Termux 消费者 | “**消费者:同一台手机上从另一个 app(Termux、adb shell)启动、没有 Java Context 的原生 GL 程序。**”(MobileGL/MG_Remote/CONTRACT-P11.md:104) | 已落地 helper/broker/fd: 路线的真实目标;历史验收用 retrace/shell/第二 APK,非真实 Termux glibc 图形桌面。 |
| 跨 app 限制 | “**SELinux 挡的是连接这一步。** … 一旦连上 … 现有代码就走 SharedSegments … **缺的是跨上下文的连接中介。**”(docs/Disaggregated/notes/p11/B0-CROSS-APP.md:7) | 之后 B1 已实现中介;root container 仍是不同待验证安全域。 |
| 多 session / context | “**DirectGLES g_Display / g_Surface / g_Context 仍是全局 … 多 context;server 窗口不转发输入**”,状态为“**等出现第二个会话 / 第二个 context 的需求**”。(docs/Disaggregated/notes/DEBTS.md:42) | 明确尚未进入通用桌面多上下文阶段。 |
| 唯一会话 / Busy | “**同时只服务一个会话,第二个连接 Refuse{Busy}**。”(docs/Disaggregated/design/08-runtime-and-platform.md:17) | 精确实施范围是每个 supervisor;B1 双 supervisor 例外见第 5 节。 |
| 跨机 client | “**client 是 trace 重放器,不是活的 Minecraft 实例**。”(docs/Disaggregated/notes/p12/CROSSHOST-ACCEPTANCE.md:11) | 更不能扩大成已经验证任意 Linux desktop app。 |
本次对 docs、notes、contracts 检索未找到 “Anland” 的专项实施方案;也未找到“导出 framebuffer AHB/dma-buf 给 Wayland client”的已落地设计。P12 调研**确实提出过 AHB frame bridge**,列明 buffer-ring/fence、GLES FBO、Magma AHB import 等新增工作;最终 brief 明确选择进程内 SurfaceView,未选择 fork+AHB。P11 则另行落地 persistent-buffer T0。这三件事应分开阅读。(docs/Disaggregated/notes/p12/map-apk-process.md:87–94;docs/Disaggregated/notes/p12/BRIEF-onscreen.md:14–15;MobileGL/MG_Remote/CONTRACT-P11.md:227–257;MobileGL/MG_Remote/CONTRACT-P12.md:7、:16、:44)
### 8.1 对接 Anland 的可实施分解(全部 inferred)
这些是基于本次源码盘点的实现建议,尚未构建或原型验证:
| 工作包 | 应做的具体事 | 可复用基础 / 缺口依据 |
|---|---|---|
| A. glibc arm64 client 与加载器 | 增加 aarch64 glibc toolchain/CI 和与 Android arm64 server 的 wireFingerprint 验收;决定 libGL/libEGL 直接替代部署或 GLVND vendor;先锁定目标 API/profile,修正虚假成功/广告。 | CMakeLists.txt:503–545、:783–835;.github/workflows/test.yml:1269–1293;MobileGL/MG_State/EGLState/Core.cpp:615–689、:1336–1466 |
| B. Linux WSI | EGL Wayland native display/window + resize/current/swap;client 在 glibc 侧持 wl_surface / wl_buffer。X11 路线补 local drawable 的 buffer present;另列 Xwayland glamor 支持门。 | MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp:64–75;MobileGL/MG_Impl/GLXImpl/GLXImpl.cpp:258–327、:956–965 |
| C. server image provider | 新增导出型 offscreen surface,而非重用 P12 fullscreen DisplayActivity 作为目标;GLES AHB-image/EGLImage/FBO 或 Vulkan external VkImage;初期只协商题设 Anland 接受的单平面格式/modifier。若图像导出不可行,可先显式 readback 到 wl_shm 建立正确性基线,不能称其零拷贝。 | MobileGL/MG_Remote/Server/ServerLoop.cpp:1600–1652;MobileGL/MG_Backend/DirectGLES/Managers.cpp:2799–2809;MobileGL/MG_Backend/DirectVulkan/Renderer/VulkanRenderer.cpp:14528–14547;现有 readback 入口/成本清单:docs/Disaggregated/design/07-memory-readback-verification.md:21–22 |
| D. transport 与同步 | 复用 UNIX/fd: aux,版本化 BufferCreate/FrameReady/BufferRelease;真实 acquire/release fence fd;buffer pool 与 fd 生命周期;compositor callback pacing。root-container 域做定向 fd/connect/mmap 验证。 | MobileGL/MG_Remote/Transport/FdPassing.cpp:108–149、:289–301;MobileGL/MG_Remote/Protocol/protocol.fbs:290–323;MobileGL/MG_Pipe/MGPipeTypes.h:1807–1809 |
| E. 多用户态 client / 多窗口 / context | N clients 先用 worker-per-client 隔离;M windows 要 per-surface image pool/事件/credit;context 状态、share groups、同步归属和并发 frontends 必须从全局状态拆出。 | MobileGL/MG_Remote/Server/ServerMain.cpp:1222–1260;MobileGL/GlobalObjects.cpp:23–24;MobileGL/MG_State/GLState/Core.h:701;MobileGL/MG_Backend/DirectVulkan/DirectVulkan.cpp:38–39 |
| F. 通用应用验收 | 最小现代 GL EGL/GLX 程序→多 context/thread/share/window→桌面 toolkit/browser/Electron/Qt/Gtk 等目标工作负载→Xwayland glamor;按实测决定 GLES、compatibility 和 GL 版本广告。验证 resize、遮挡、无 callback、断连、释放 fence 与内容正确性。 | 第 2、5、6、7 节的具体缺口;历史跨机验收仅 trace:docs/Disaggregated/notes/p12/CROSSHOST-ACCEPTANCE.md:10–17、:39–44 |
**inferred 的优先级判断:**最先证明“单 glibc arm64 client、单窗口、现代 GL、Android server 渲染→Anland 接受图像和同步→release 后复用”这一闭环,再扩大到 N×M 与 legacy/GLES。现有代码最有价值的是完整 command/state split 和已工作的 vendor-driver backend;最关键的新边界是 **frame/image ownership**,它目前不在 Present 协议中。(MobileGL/MG_Remote/Client/EmitTables.cpp:1165–1181;MobileGL/MG_Remote/Server/PipeApplier.cpp:388–438;MobileGL/MG_Pipe/MGPipeTypes.h:1807–1809)
### 8.2 本次识别的文档/代码漂移
| 文档说法 | 当前应采用的结论 |
|---|---|
| CMD/STAGE owner=client | producer 语义仍可这样称呼;跨进程四段的 allocator 是 server。(docs/Disaggregated/design/06-transport.md:9–17;MobileGL/MG_Remote/Server/ServerSession.cpp:737;MobileGL/MG_Remote/Transport/ShmSegment.cpp:253–284) |
| ShmLink 独立 aux,可 TCP+shm | 这是第二波设计;当前 client 拒绝该组合,fd API 仍在 ITransport/SocketTransport。(docs/Disaggregated/design/06-transport.md:62、:67;MobileGL/MG_Remote/Client/ClientSession.cpp:928–936;MobileGL/MG_Remote/Transport/ITransport.h:98–108) |
| split 今天固定 T2 / T0 握手 Fatal | 已被 P11 B2 取代:默认尝试 T0、不可用退 T2,T1 关闭。(docs/Disaggregated/design/07-memory-readback-verification.md:13;MobileGL/MG_Remote/CONTRACT-P11.md:233–248) |
| D8 debt 将 MetalLayer 列为仍接受 | 映射函数有 MetalLayer,但 wire decoder 先明确拒绝它;X11/Win32/None 才是残留接受项。(docs/Disaggregated/notes/DEBTS.md:34;MobileGL/MG_Remote/Protocol/SurfaceOpCodec.cpp:216–236) |
| device-lost 时 swap 返回 EGL_CONTEXT_LOST | 未找到实现映射;当前 Bool/void Present 链不能据文档认定标准 EGL 错误正确。(docs/Disaggregated/design/08-runtime-and-platform.md:33;MobileGL/MG_Impl/EGLImpl/EGLImpl.cpp:207–228;MobileGL/MG_Backend/BackendObject.cpp:396–397) |
| present credit>1 从未测 | P12 已有 1/2/3 的跨机 trace 测量。(docs/Disaggregated/design/08-runtime-and-platform.md:8;docs/Disaggregated/notes/p12/CROSSHOST-ACCEPTANCE.md:23–34) |
| 一设备一个 server | 是 APK display/service 模式策略;B1 TCP service 同时有独立 UNIX broker supervisor,且进程全局不等于设备全局。(MobileGL/MG_Remote/CONTRACT-P12.md:46;android-plugin/app/src/main/java/top/mobilegl/plugin/MobileGLServerService.java:147–162) |
## 附录 A. 指定关键词逐命中用途索引(主仓库)
检索通过指定 WSL 入口进行;模式为大小写不敏感的 AHardwareBuffer / dma_buf / DMA_BUF / SCM_RIGHTS / sync_file / SYNC_FD / external_memory。先对主仓库 git tracked 内容做 git grep,再补查实际展开的 3rdparty 目录(附录 B)。主仓库结果 **586 个匹配行、134 个文件**,附录 B 另有 **2108 个匹配行、88 个文件**。同一行多个关键词只算一个匹配行。未把 build 产物、Git 元数据或二进制的任意字节串当产品代码;未执行被检索脚本。
下表列出每一个匹配行的位置;同文件同用途合并,连续数字表示区间内每一行均命中。引用方式为“文件路径 + 行号”。无主仓库 sync_file / SYNC_FD 命中;3rdparty 有标准 SYNC_FD 枚举,Asio 有 async_file 子串匹配,因此**不能说整个磁盘树完全没有这些字符串**。
| 文件(树根相对路径) | 所有命中行 | 用途 |
|---|---|---|
| CMakeLists.txt | 621 | 编译 P11 T0 store/hop 的产品源文件。 |
| CMakeLists.txt | 1138 | 将独立 extmem_probe 打包成 server 替身,测试 AHB 跨 app 路由。 |
| MobileGL/Config.h | 635 | T0 不可用时退 T2 的配置说明。 |
| MobileGL/MG_Backend/DirectGLES/Managers.cpp | 33, 1242, 1244, 2192, 2349, 2406, 2799, 2814, 2878, 3304, 3857, 4060 | P11 T0:导入 client AHB BLOB 为 GL buffer,persistent map / POST / GPU 完成后的引用释放;非 EGLImage 颜色目标。 |
| MobileGL/MG_Backend/DirectGLES/Managers.h | 1055, 1133, 1333 | P11 T0:导入 client AHB BLOB 为 GL buffer,persistent map / POST / GPU 完成后的引用释放;非 EGLImage 颜色目标。 |
| MobileGL/MG_Backend/DirectVulkan/Renderer/VkBufferManager.cpp | 266, 576, 631, 678, 683–684, 710, 742, 798, 920 | P11 T0:AHB BLOB→VkBuffer 的 external-memory import、映射、回读和延迟释放;非帧图像。 |
| MobileGL/MG_Backend/DirectVulkan/Renderer/VkBufferManager.h | 145, 147, 265 | P11 T0:AHB BLOB→VkBuffer 的 external-memory import、映射、回读和延迟释放;非帧图像。 |
| MobileGL/MG_Backend/DirectVulkan/Renderer/VkBufferObject.cpp | 129 | P11 T0:AHB BLOB→VkBuffer 的 external-memory import、映射、回读和延迟释放;非帧图像。 |
| MobileGL/MG_Backend/DirectVulkan/Renderer/VkBufferObject.h | 75–76, 80 | P11 T0:AHB BLOB→VkBuffer 的 external-memory import、映射、回读和延迟释放;非帧图像。 |
| MobileGL/MG_Backend/DirectVulkan/Renderer/VulkanRenderer.cpp | 15348, 15358, 15361–15362 | 仅为 P11 T0 buffer import 启用/记录 AHB external-memory device extensions。 |
| MobileGL/MG_Backend/DirectVulkan/Renderer/VulkanRenderer.h | 171–172, 596 | 仅为 P11 T0 buffer import 启用/记录 AHB external-memory device extensions。 |
| MobileGL/MG_IntegrationTest/CMakeLists.txt | 2543, 2560, 4120, 4126 | T0 adoption 集成用例、主机没有 AHB 的回退断言和测试注册。 |
| MobileGL/MG_IntegrationTest/Harness/HeadlessGL.cpp | 102 | AImageReader 测试窗口的 sampled-image/color-output usage;测试 harness,不向 Linux compositor 导出帧。 |
| MobileGL/MG_IntegrationTest/Scenarios/LargeArenaAdoptionScenario.cpp | 103, 328, 414, 704 | T0 adoption 集成用例、主机没有 AHB 的回退断言和测试注册。 |
| MobileGL/MG_Pipe/MGPipeTypes.h | 155 | P11 T0 capability / resource ImportExternal 边界声明;persistent buffer store。 |
| MobileGL/MG_Pipe/PipeApply.h | 131, 134, 1319 | P11 T0 capability / resource ImportExternal 边界声明;persistent buffer store。 |
| MobileGL/MG_Remote/CONTRACT-P11.md | 3, 227, 240, 257, 275, 311–312 | P11 persistent map tiers、T0 BLOB offer/hop/import/POST 与测试;不是 present。 |
| MobileGL/MG_Remote/CONTRACT-P11.md | 80 | PairBind 后 aux 是 SCM_RIGHTS 的配对纪律。 |
| MobileGL/MG_Remote/CONTRACT-P11.md | 116 | B1 外部 client 握手接收 7 fd 的契约。 |
| MobileGL/MG_Remote/CONTRACT-P6.md | 39, 644 | Rule G 描述符边界及 aux/未来 ShmLink delivery 设计;不是帧协议。 |
| MobileGL/MG_Remote/Client/ClientSession.cpp | 858, 1187 | Client 采用 server 创建并发送的匿名共享段 fd。 |
| MobileGL/MG_Remote/Client/ClientSession.cpp | 2734, 2746, 2832, 2845 | T0 AHB store 协商、导入回复和回退/成功日志。 |
| MobileGL/MG_Remote/Client/ClientSession.h | 153, 171 | 共享段 Attach/Adopt/SCM_RIGHTS 启动契约。 |
| MobileGL/MG_Remote/Client/PersistentMapTracker.h | 272 | T0 persistent GL buffer 的客户端 backing store、wire map_persistent 及 CPU shadow 语义。 |
| MobileGL/MG_Remote/Client/WireTables.cpp | 951 | T0 persistent GL buffer 的客户端 backing store、wire map_persistent 及 CPU shadow 语义。 |
| MobileGL/MG_Remote/Protocol/mg_protocol_base.h | 105 | 跨进程 fd 交付/句柄存活期的协议边界说明。 |
| MobileGL/MG_Remote/Protocol/protocol.fbs | 46, 155 | SegmentRef/PairBind:fd 在 aux 交付,不把 fd 数字当跨进程对象。 |
| MobileGL/MG_Remote/Protocol/protocol.fbs | 73 | Hello 的 persistent-map adoptTier 说明。 |
| MobileGL/MG_Remote/Server/InProcessServer.h | 38 | Server 连接配对与 UNIX aux/共享段启动;不是 per-present buffer 交付。 |
| MobileGL/MG_Remote/Server/PairAcceptor.h | 12 | Server 连接配对与 UNIX aux/共享段启动;不是 per-present buffer 交付。 |
| MobileGL/MG_Remote/Server/ServerMain.cpp | 357, 1327 | Server 连接配对与 UNIX aux/共享段启动;不是 per-present buffer 交付。 |
| MobileGL/MG_Remote/Server/ServerSession.cpp | 1101, 1127, 1143, 1172, 1182, 1192 | T0 grant / 平台判定 / POST / 收 hop AHB / import / 回退。 |
| MobileGL/MG_Remote/Server/ServerSession.h | 302, 318 | T0 grant / 平台判定 / POST / 收 hop AHB / import / 回退。 |
| MobileGL/MG_Remote/Transport/AdoptT0.cpp | 42, 46, 50–54, 56, 60–61, 63–64, 85–86, 88, 101–103, 110–111, 113, 116–118, 121, 129, 133, 138, 144, 155, 172 | T0 AHB BLOB 分配、lock、hop send/recv、引用释放、host fallback;tier 名称/测试钩子。 |
| MobileGL/MG_Remote/Transport/AdoptT0.h | 10, 13, 18, 56, 61, 75, 85, 95 | T0 AHB BLOB 分配、lock、hop send/recv、引用释放、host fallback;tier 名称/测试钩子。 |
| MobileGL/MG_Remote/Transport/AdoptTier.h | 12 | T0 AHB BLOB 分配、lock、hop send/recv、引用释放、host fallback;tier 名称/测试钩子。 |
| MobileGL/MG_Remote/Transport/FdPassing.cpp | 147, 259 | 通用 AF_UNIX SCM_RIGHTS 单 fd sendmsg/recvmsg 与平台可用性。 |
| MobileGL/MG_Remote/Transport/FdPassing.h | 9, 12, 40 | 通用 AF_UNIX SCM_RIGHTS 单 fd sendmsg/recvmsg 与平台可用性。 |
| MobileGL/MG_Remote/Transport/ITransport.h | 89 | ITransport::ShareFd 契约:通过 aux 交 fd,调用者保留原 fd。 |
| MobileGL/MG_Remote/Transport/InProcessTransport.cpp | 200 | 同进程 transport 复制 fd,模拟 SCM_RIGHTS 所有权。 |
| MobileGL/MG_Remote/Transport/SessionRings.h | 129, 153, 165 | 匿名共享段创建、Attach/Adopt、映射/大小校验和描述符交付职责。 |
| MobileGL/MG_Remote/Transport/ShmSegment.cpp | 349, 423 | 匿名共享段创建、Attach/Adopt、映射/大小校验和描述符交付职责。 |
| MobileGL/MG_Remote/Transport/ShmSegment.h | 22, 55 | 匿名共享段创建、Attach/Adopt、映射/大小校验和描述符交付职责。 |
| MobileGL/MG_Remote/Transport/ShmSegmentPosix.cpp | 84 | 匿名共享段创建、Attach/Adopt、映射/大小校验和描述符交付职责。 |
| MobileGL/MG_Remote/Transport/ShmSegmentWin32.cpp | 89 | Windows 没有 SCM_RIGHTS;共享 section 按名称访问的说明。 |
| MobileGL/MG_Remote/Transport/SocketTransport.cpp | 650, 892 | control/aux socket 组织与 POSIX fd passing,Windows 不支持的路径。 |
| MobileGL/MG_Remote/Transport/SocketTransport.h | 34, 63, 77, 131 | control/aux socket 组织与 POSIX fd passing,Windows 不支持的路径。 |
| MobileGL/MG_Remote/Wire/PipeWireCodec.cpp | 1830 | T0 persistent GL buffer 的客户端 backing store、wire map_persistent 及 CPU shadow 语义。 |
| MobileGL/MG_Remote/Wire/PipeWireCodec.h | 509 | T0 persistent GL buffer 的客户端 backing store、wire map_persistent 及 CPU shadow 语义。 |
| MobileGL/MG_State/EGLState/Core.cpp | 180 | Android EGL config NativeVisualId 使用 RGBA8888 AHB format 常量;不是 AHB 分配/导出。 |
| MobileGL/MG_State/GLState/BufferState/BufferObject.cpp | 594 | T0 persistent GL buffer 的客户端 backing store、wire map_persistent 及 CPU shadow 语义。 |
| MobileGL/MG_Test/Wire/AdoptInboxTest.cpp | 11 | T0 offer/order/回退测试,主机用测试钩子;不证明 host 有 AHB allocator。 |
| MobileGL/MG_Test/Wire/CMakeLists.txt | 4, 26, 40 | SCM_RIGHTS / 共享段 / socket transport / spawn 的单元测试及构建注册。 |
| MobileGL/MG_Test/Wire/FdPassingTest.cpp | 9 | SCM_RIGHTS / 共享段 / socket transport / spawn 的单元测试及构建注册。 |
| MobileGL/MG_Test/Wire/InProcessTransportTest.cpp | 191 | SCM_RIGHTS / 共享段 / socket transport / spawn 的单元测试及构建注册。 |
| MobileGL/MG_Test/Wire/RemoteClientAdoptT0.inc | 3, 246, 249, 292, 303 | T0 offer/order/回退测试,主机用测试钩子;不证明 host 有 AHB allocator。 |
| MobileGL/MG_Test/Wire/ServerSpawnTest.cpp | 33, 257, 939 | SCM_RIGHTS / 共享段 / socket transport / spawn 的单元测试及构建注册。 |
| MobileGL/MG_Test/Wire/SessionTest.cpp | 1124 | SCM_RIGHTS / 共享段 / socket transport / spawn 的单元测试及构建注册。 |
| MobileGL/MG_Test/Wire/SocketTransportTest.cpp | 470 | SCM_RIGHTS / 共享段 / socket transport / spawn 的单元测试及构建注册。 |
| docs/Disaggregated/design/06-transport.md | 17 | 文档/历史审查:共享段、SCM_RIGHTS、配对、线程或 transport 平台边界;不新增实现。 |
| docs/Disaggregated/design/07-memory-readback-verification.md | 11 | 文档/历史设计或探针结果:外部内存 tiers、AHB BLOB persistent-map 或同内核 transport 可行性;不能当成当前 frame export。 |
| docs/Disaggregated/notes/p0/BRIEF-DOCS.md | 16 | 文档/历史审查:共享段、SCM_RIGHTS、配对、线程或 transport 平台边界;不新增实现。 |
| docs/Disaggregated/notes/p0/README.md | 37 | 文档/历史设计或探针结果:外部内存 tiers、AHB BLOB persistent-map 或同内核 transport 可行性;不能当成当前 frame export。 |
| docs/Disaggregated/notes/p0/p0-device-findings.md | 21, 23–24, 27 | 文档/历史设计或探针结果:外部内存 tiers、AHB BLOB persistent-map 或同内核 transport 可行性;不能当成当前 frame export。 |
| docs/Disaggregated/notes/p11/B0-CROSS-APP.md | 7, 43 | 文档/历史审查:共享段、SCM_RIGHTS、配对、线程或 transport 平台边界;不新增实现。 |
| docs/Disaggregated/notes/p11/INTEGRATOR-DECISIONS-P11.md | 23 | 文档/历史设计或探针结果:外部内存 tiers、AHB BLOB persistent-map 或同内核 transport 可行性;不能当成当前 frame export。 |
| docs/Disaggregated/notes/p11/PLAN-P11.md | 33, 37 | 文档/历史设计或探针结果:外部内存 tiers、AHB BLOB persistent-map 或同内核 transport 可行性;不能当成当前 frame export。 |
| docs/Disaggregated/notes/p12/device/2-onscreen-magma/check.log | 76, 99 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p12/device/trial-a4a940db/2-onscreen-magma/check.log | 64, 87 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p12/map-apk-process.md | 87–88 | P12 调研备选方案:child 渲染到 AHB,经 UNIX/SCM_RIGHTS 交 APK presenter;最终未选(BRIEF-onscreen.md:14–15)。 |
| docs/Disaggregated/notes/p12/map-docs-contract.md | 103 | P12 调研备选方案:child 渲染到 AHB,经 UNIX/SCM_RIGHTS 交 APK presenter;最终未选(BRIEF-onscreen.md:14–15)。 |
| docs/Disaggregated/notes/p12/map-server-surface.md | 113 | P12 调研备选方案:child 渲染到 AHB,经 UNIX/SCM_RIGHTS 交 APK presenter;最终未选(BRIEF-onscreen.md:14–15)。 |
| docs/Disaggregated/notes/p5/p5-results/s1-v1.md | 126, 358 | 文档/历史审查:共享段、SCM_RIGHTS、配对、线程或 transport 平台边界;不新增实现。 |
| docs/Disaggregated/notes/p5/scout-backend-install-and-thread.md | 350 | 文档/历史审查:共享段、SCM_RIGHTS、配对、线程或 transport 平台边界;不新增实现。 |
| docs/Disaggregated/notes/p5/scout-transport.md | 89, 100, 261, 289, 321 | 文档/历史审查:共享段、SCM_RIGHTS、配对、线程或 transport 平台边界;不新增实现。 |
| docs/Disaggregated/notes/p5c/p5c-audit-v1.md | 99 | 文档/历史审查:共享段、SCM_RIGHTS、配对、线程或 transport 平台边界;不新增实现。 |
| docs/Disaggregated/notes/p6/P6-CONTRACT-DRAFT.md | 33, 58 | 文档/历史审查:共享段、SCM_RIGHTS、配对、线程或 transport 平台边界;不新增实现。 |
| docs/Disaggregated/notes/p6/P6-ENDSTATE-REVIEW.md | 30, 137, 139, 143, 186, 399 | 文档/历史审查:共享段、SCM_RIGHTS、配对、线程或 transport 平台边界;不新增实现。 |
| docs/Disaggregated/notes/p6/P6-ENDSTATE-REVIEW.md | 138 | 文档/历史设计或探针结果:外部内存 tiers、AHB BLOB persistent-map 或同内核 transport 可行性;不能当成当前 frame export。 |
| docs/Disaggregated/notes/p6/P6-SPAWN-PLAN.md | 17 | 文档/历史审查:共享段、SCM_RIGHTS、配对、线程或 transport 平台边界;不新增实现。 |
| docs/Disaggregated/notes/p6/README.md | 7, 16, 46 | 文档/历史审查:共享段、SCM_RIGHTS、配对、线程或 transport 平台边界;不新增实现。 |
| docs/Disaggregated/notes/p6/a6-audit-rows.md | 28 | 文档/历史审查:共享段、SCM_RIGHTS、配对、线程或 transport 平台边界;不新增实现。 |
| docs/Disaggregated/notes/p65/README.md | 17 | 文档/历史审查:共享段、SCM_RIGHTS、配对、线程或 transport 平台边界;不新增实现。 |
| docs/Disaggregated/notes/p7/device-window-1/E0-attribution/E0a-inproc.log | 94, 158, 359, 416, 480, 1550, 1607, 1671, 1809, 1986, 2043, 2107, 2248, 2743, 2800, 2864, 2960, 3024, 3178, 3235, 3299, 3397, 3461, 3613, 3670, 3734, 3830, 3894, 4145, 4209, 4336 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/E0-attribution/E0a-monolith.log | 175, 232, 296, 1914, 1971, 2035 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/E1-lockstep/E1.log | 94, 158, 330, 387, 451, 592, 766, 823, 887, 983, 1047, 1201, 1258, 1322, 1419, 1483, 1693, 1757, 1902 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/E7-coldcache/E7-cold-ra1-1.log | 94, 158 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/E7-coldcache/E7-cold-ra1-2.log | 94, 158 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/E7-coldcache/E7-cold-ra1-3.log | 94, 158 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/E7-coldcache/E8-cold-fif1-2.log | 94, 158 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/F1-verify/F1-ra0.log | 130, 194, 367, 431 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/F1-verify/F1-ra1.log | 94, 158 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/audit-cold-2.log | 94, 158 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/audit-warm-1.log | 94, 158 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/bsl-mem-inproc.log | 68, 132, 263 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/bsl-mem-spawn.log | 67, 131 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/bsl-spawn.log | 67, 131, 499, 563 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/dump-inproc-1.log | 96, 160 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/dump-inproc-2.log | 96, 160 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/dump-inproc-3.log | 96, 160 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/dump-inproc-4.log | 96, 160 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/dump2-inproc-1.log | 96, 160 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/dump2-inproc-2.log | 96, 160 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/dump2-inproc-3.log | 96, 160 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/dump2-spawn-1.log | 96, 160 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/dump2-spawn-2.log | 96, 160 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/fif1-cold-2.log | 94, 158 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/fif4-1.log | 94, 158 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/fif4-2.log | 94, 158 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/fif4-3.log | 94, 158 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/fif8-1.log | 94, 158 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/fif8-2.log | 94, 158 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/fif8-3.log | 94, 158 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/matrix-inproc.log | 94, 158, 359, 416, 480, 1978, 2035, 2099, 2362, 2426, 2571 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/openra-cold-2.log | 94, 158 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/openra-cold-3.log | 94, 158 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/plain-cold-5.log | 94, 158 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/plain-warm-1.log | 94, 158 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/spawn-1.log | 93, 157 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/spawn-3.log | 93, 157 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/W4-verify/stats-lockstep-cold-1.log | 100 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/device-window-1/X1-verify/X1-dv-inproc.log | 41, 98, 162 | 历史运行日志中的 vendor Vulkan extension 枚举;不是调用点,也不是 frame export。 |
| docs/Disaggregated/notes/p7/ph-f.md | 104 | 文档/历史审查:共享段、SCM_RIGHTS、配对、线程或 transport 平台边界;不新增实现。 |
| docs/Disaggregated/notes/recovered/wf1/final/part1.md | 135 | 文档/历史审查:共享段、SCM_RIGHTS、配对、线程或 transport 平台边界;不新增实现。 |
| docs/Disaggregated/notes/recovered/wf1/final/part2.md | 18 | 文档/历史审查:共享段、SCM_RIGHTS、配对、线程或 transport 平台边界;不新增实现。 |
| docs/Disaggregated/notes/recovered/wf1/final/part2.md | 171–172 | 文档/历史设计或探针结果:外部内存 tiers、AHB BLOB persistent-map 或同内核 transport 可行性;不能当成当前 frame export。 |
| docs/Disaggregated/notes/recovered/wf1/final/part3.md | 16 | 文档/历史审查:共享段、SCM_RIGHTS、配对、线程或 transport 平台边界;不新增实现。 |
| docs/Disaggregated/notes/recovered/wf1/final/part4.md | 13, 20, 50, 176–177, 191 | 文档/历史审查:共享段、SCM_RIGHTS、配对、线程或 transport 平台边界;不新增实现。 |
| docs/Disaggregated/notes/recovered/wf1/final/part4.md | 178 | 文档/历史设计或探针结果:外部内存 tiers、AHB BLOB persistent-map 或同内核 transport 可行性;不能当成当前 frame export。 |
| docs/Disaggregated/notes/recovered/wf2/final/part3.md | 139 | 文档/历史审查:共享段、SCM_RIGHTS、配对、线程或 transport 平台边界;不新增实现。 |
| docs/Disaggregated/notes/recovered/wf2/final/part4.md | 19, 256 | 文档/历史审查:共享段、SCM_RIGHTS、配对、线程或 transport 平台边界;不新增实现。 |
| docs/Disaggregated/notes/recovered/wf2/final/part4.md | 233 | 文档/历史设计或探针结果:外部内存 tiers、AHB BLOB persistent-map 或同内核 transport 可行性;不能当成当前 frame export。 |
| docs/Disaggregated/notes/recovered/wf2/final/synth-part3.md | 89 | 文档/历史审查:共享段、SCM_RIGHTS、配对、线程或 transport 平台边界;不新增实现。 |
| docs/Disaggregated/notes/recovered/wf2/final/synth-part4.md | 16, 182 | 文档/历史审查:共享段、SCM_RIGHTS、配对、线程或 transport 平台边界;不新增实现。 |
| docs/Disaggregated/notes/recovered/wf2/final/synth-part4.md | 161 | 文档/历史设计或探针结果:外部内存 tiers、AHB BLOB persistent-map 或同内核 transport 可行性;不能当成当前 frame export。 |
| include/EGL/eglext.h | 517–518, 520 | Khronos EGL_ANDROID_get_native_client_buffer 的 AHB 类型/入口声明。 |
| include/EGL/eglext.h | 784–786, 788–796, 808, 810–822, 829 | Khronos dma-buf import/modifiers token 和 guard 声明;非实现。 |
| include/EGL/eglext.h | 1103–1104, 1111 | Khronos EGL_MESA_image_dma_buf_export guard 声明;非实现。 |
| scripts/ci/fatal_census.py | 206 | CI fatal/refusal census 对 T0 不可用→T2 的说明。 |
| tools/cts/platform/tcuMobileGLPlatform.cpp | 129–130 | AImageReader 测试窗口的 sampled-image/color-output usage;测试 harness,不向 Linux compositor 导出帧。 |
| tools/cts/probe/mgprobe.c | 158–159 | AImageReader 测试窗口的 sampled-image/color-output usage;测试 harness,不向 Linux compositor 导出帧。 |
| tools/piglit-android/README.md | 94 | 构建 piglit 时明确关闭 DMA_BUF tests 与 GBM。 |
| tools/piglit-android/patches/waffle-mobilegl-android.patch | 277–278 | AImageReader 测试窗口的 sampled-image/color-output usage;测试 harness,不向 Linux compositor 导出帧。 |
| tools/spikes/extmem_probe/CMakeLists.txt | 28 | 独立 probe 的 host 构建关闭 Android-only T0;保留其它 tier 探测。 |
| tools/spikes/extmem_probe/README.md | 23, 33, 50, 52–53, 55, 59–60, 157, 197–198 | 独立探针的 T0/T1/T3、BLOB 跨进程与真实 route 说明;不接 renderer Present。 |
| tools/spikes/extmem_probe/extmem_probe.cpp | 8, 16, 18, 20 | 独立探针 T1 fd export / T0 AHB import / T3 host import 的范围说明。 |
| tools/spikes/extmem_probe/extmem_probe.cpp | 407, 428, 469 | 独立探针自己的 SCM_RIGHTS sendmsg/recvmsg。 |
| tools/spikes/extmem_probe/extmem_probe.cpp | 580–581, 609, 627–630, 646–649, 651, 916, 918, 920, 925, 1477, 1491, 1628–1630, 1653–1657, 1673–1674, 1676, 1678–1679, 1695 | 探针 extension 枚举、external buffer capabilities/配置/类型和报告;没有 renderer 帧交付。 |
| tools/spikes/extmem_probe/extmem_probe.cpp | 1718, 1721–1722, 1771, 1773, 1904, 1983–1984, 1991, 2012, 2015, 2116, 2182–2183, 2188 | T1:host-visible VkBuffer 外部内存导出/接收/导入,opaque fd 或 DMA_BUF,及 GL memory-object import 对照。 |
| tools/spikes/extmem_probe/extmem_probe.cpp | 2356, 2370, 2374–2378, 2384, 2388–2389, 2395, 2404, 2407–2408, 2414, 2420, 2428, 2432, 2479–2480, 2487–2488, 2501, 2504, 2507, 2513, 2522, 2535–2536, 2778 | T0:AHB BLOB client allocation、CPU lock、socket handoff、Vulkan/GL buffer import 与字节验证。 |
| tools/spikes/extmem_probe/extmem_probe.cpp | 2784, 2796, 2808, 2812–2816, 2822, 2826–2827, 2830–2831, 2837, 2842, 2846, 2853, 2884, 2886, 2891, 2943, 2972–2973, 2981, 2989, 2999, 3005–3006 | T0S:保持 AHB CPU lock 的持续 CPU/GPU 读写一致性 probe。 |
| tools/spikes/extmem_probe/extmem_probe.cpp | 3219, 3232–3233, 3360, 3364, 3372, 3381–3383, 3394, 3399, 3451, 3455–3459, 3463, 3467–3468, 3471, 3488, 3492, 3515, 3569, 3576 | B2 route probe:经真实 app/socket direct 或 hop 交 AHB BLOB;host SKIP 分支。 |
| tools/spikes/extmem_probe/extmem_probe.cpp | 3590, 3632, 3638–3639, 3664, 3793, 3925–3926 | T3:VK_EXT_external_memory_host 导入 memfd/host mapping 的测试。 |
| tools/spikes/extmem_probe/extmem_probe.cpp | 4199–4200, 4204, 4206, 4208 | 探针 main 调度 T1/T0/T0S/T3,各为 buffer 内存测试。 |
## 附录 B. 已展开第三方目录的全部匹配
这些文件随依赖源码在树内,但不是 MobileGL 已接通的帧协议。其中 DiligentCore 的 add_subdirectory 在主 CMake 中仍注释掉(CMakeLists.txt:277),VMA/Vulkan headers/utilities 则进入依赖(CMakeLists.txt:280–282)。任何上游函数声明、loader、sample 或 Win32 export 都没有改变第 3 节的产品 Present 调用链。
| 文件(树根相对路径) | 所有命中行 | 用途 |
|---|---|---|
| 3rdparty/DiligentCore/ThirdParty/Vulkan-Headers/include/vulkan/vulkan.cppm | 525, 1233, 1237, 1242, 1304, 1309, 1315, 1320, 1504, 1522, 1690, 2246, 2271, 2441, 2619, 2738, 3554, 3557, 3562, 3585, 3592, 3724, 3868, 4293, 4327, 4480, 4683, 4847, 6534, 6538, 6545, 6589, 6600, 6801, 7038, 7693, 7746, 7982, 8311, 8583 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/DiligentCore/ThirdParty/Vulkan-Headers/include/vulkan/vulkan.hpp | 3087, 3104, 3217, 3227, 3244, 3715, 3718, 3726, 4268, 5205, 5301, 6036, 6246, 7196, 7199, 7507–7511, 7513–7517, 7520–7524, 7589–7591, 7593–7595, 7598–7600, 7603–7605, 7791–7793, 7808–7810, 7977–7979, 8534–8536, 8559–8561, 8729–8731, 8904–8906, 9022–9024, 11655, 11675, 11755, 11775, 12124, 12706, 15066, 15163, 16070, 17299, 18135, 18780, 18784, 18817, 18821, 18829, 18967, 19073, 19338, 19377, 19544, 19596, 20088, 20093, 20152, 20159, 20165, 20325, 20472, 20843, 20876, 21084, 21157, 21469, 21491, 21496, 21599, 21739, 22053, 22086, 22276, 22341 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/DiligentCore/ThirdParty/Vulkan-Headers/include/vulkan/vulkan_android.h | 46–50, 80, 108–109, 114, 120 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/DiligentCore/ThirdParty/Vulkan-Headers/include/vulkan/vulkan_core.h | 311–312, 565, 730, 973, 1052, 1165, 1302–1303, 5241–5265, 5270–5276, 5284, 5288, 5321, 5328, 10023–10026, 10058–10061, 10071–10074, 13544–13547, 13550–13554, 13559–13562, 13587–13590, 14152–14155, 15239–15242, 18172–18173, 18175–18176, 19325–19328 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/DiligentCore/ThirdParty/Vulkan-Headers/include/vulkan/vulkan_enums.hpp | 450–453, 887, 1059, 1312, 1389, 1509, 4239–4246, 4248, 4250–4251, 4253, 4255, 4257, 4260–4262, 4302–4304, 4329, 4419, 6184, 6190–6193, 6214–6216 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/DiligentCore/ThirdParty/Vulkan-Headers/include/vulkan/vulkan_extension_inspection.hpp | 55–56, 58, 114, 116, 127, 129, 131, 170, 174, 219, 356, 362, 402, 446, 476, 512, 519, 696, 699, 702, 705, 710, 743, 749, 752, 756, 759, 763, 766, 773, 990, 993, 998, 1008, 1013, 1170, 1173, 1929, 1932–1933, 1945, 1950, 1974, 1977, 2199, 2202, 2263, 2432, 2437, 2563, 2566, 2663–2664, 2778, 2780, 2782, 2784, 2787, 2789, 2907, 2911, 3269–3270, 3272, 3302, 3304, 3309, 3311, 3313, 3335, 3338, 3362, 3432, 3434, 3455, 3477, 3492, 3523, 3528, 3576 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/DiligentCore/ThirdParty/Vulkan-Headers/include/vulkan/vulkan_fuchsia.h | 45–48 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/DiligentCore/ThirdParty/Vulkan-Headers/include/vulkan/vulkan_funcs.hpp | 7522, 13547, 13590, 13610, 13632, 14389, 14415, 14428, 14449, 14486, 14502, 14522, 14556, 17337, 17343, 17357, 17362, 17377, 17382, 17401, 17413, 17419, 17422, 20728, 20757, 26007, 26031, 26072, 26466, 26489, 30367, 30390, 30409, 31687, 31708, 31747 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/DiligentCore/ThirdParty/Vulkan-Headers/include/vulkan/vulkan_handles.hpp | 756, 759, 764, 787, 794, 926, 1070, 1495, 1529, 1682, 1885, 2049, 13578, 13625, 13656, 14084, 14090, 14098, 14103, 14110, 14116, 15099, 16209, 16405, 17308, 17628, 18716, 18912 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/DiligentCore/ThirdParty/Vulkan-Headers/include/vulkan/vulkan_metal.h | 192–195 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/DiligentCore/ThirdParty/Vulkan-Headers/include/vulkan/vulkan_raii.hpp | 190, 233, 507, 529, 983, 1005, 1010, 1113, 1253, 1567, 1600, 1790, 1855, 2147, 2162, 2170, 2258, 2363, 2575, 2614, 2767, 2815, 3694, 3770, 4606, 4617, 4735, 4740, 4746, 4750, 4985, 5252, 5289, 5499, 5577, 9559, 17061, 19577, 19590, 19608, 19613, 19993, 20001, 20012, 20018, 20034, 20048, 20053, 20067, 21222, 21227, 21230, 21244, 21247, 21261, 21265, 21267, 22737, 22745, 25028, 25035, 25051, 25213, 25219, 26994, 27002, 27019, 27488, 27494, 27511 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/DiligentCore/ThirdParty/Vulkan-Headers/include/vulkan/vulkan_screen.h | 52–55 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/DiligentCore/ThirdParty/Vulkan-Headers/include/vulkan/vulkan_static_assertions.hpp | 2897, 2905, 2920, 2979, 3006, 3497, 4214, 6021, 6170, 6826, 7729, 8586 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/DiligentCore/ThirdParty/Vulkan-Headers/include/vulkan/vulkan_structs.hpp | 56639, 56668, 56699, 56728 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/DiligentCore/ThirdParty/Vulkan-Headers/include/vulkan/vulkan_to_string.hpp | 2803, 8124 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/DiligentCore/ThirdParty/Vulkan-Headers/include/vulkan/vulkan_win32.h | 51–54, 216–219 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/DiligentCore/ThirdParty/Vulkan-Headers/registry/validusage.json | 2596, 7211, 7216, 7310, 7315, 8044, 8049, 8373, 8378, 8735, 20628, 20683, 20703, 20708, 20743, 20748, 20753, 20758, 20763, 20768, 20773, 20783, 20788, 20793, 20798, 20803, 20808, 20813, 20833, 20873, 20878, 20883, 20937, 20942, 20947, 20952, 20962, 20967, 21179, 21213, 21445, 21503, 21537, 21580, 21590, 21595, 21619, 21629, 21634, 21682, 21692, 21711, 21720, 21749, 21759, 21867, 21891, 21953, 22345, 22403, 22437, 22690, 22883, 23299, 23990, 23995, 24020, 24025, 24446, 24460, 24705, 24798, 27017, 27022, 27185, 27190, 27419, 27577, 27744, 27912, 103968, 104608, 105427, 106451 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/DiligentCore/ThirdParty/Vulkan-Headers/registry/vk.xml | 236, 2441, 2485, 2937, 2943, 4275, 4559, 6973, 9052, 9612, 11249–11252, 11255–11257, 11361–11367, 11370–11372, 11380, 11393, 14840, 14847, 17627, 17646–17648, 19478, 19480–19481, 19490, 19492–19494, 19500, 19502–19503, 19511, 19731, 19733–19734, 19743–19749, 19752–19754, 19764, 19766–19769, 19778, 19780–19781, 19794, 19796–19797, 19808, 19830, 20274, 20464, 20466–20468, 20471, 20524, 20526–20528, 20543, 21488, 21490–21491, 21494–21496, 24101, 24103–24104, 24108, 24129, 24213, 24215–24216, 24218, 24220, 24278, 24280–24281, 24286–24288, 25124, 25126–25128, 25432, 26388, 26390–26392, 26397, 27139, 27232, 27234–27235, 27239–27241 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/DiligentCore/ThirdParty/glew/auto/doc/log.html | 40 | 上游 GLEW EGL extension 元数据、入口加载和 glewinfo 枚举;不实现 image 导入/导出。 |
| 3rdparty/DiligentCore/ThirdParty/glew/auto/extensions/gl/EGL_EXT_image_dma_buf_import | 1, 3, 5, 7–15 | 上游 GLEW EGL extension 元数据、入口加载和 glewinfo 枚举;不实现 image 导入/导出。 |
| 3rdparty/DiligentCore/ThirdParty/glew/auto/extensions/gl/EGL_EXT_image_dma_buf_import_modifiers | 1, 3, 5–15 | 上游 GLEW EGL extension 元数据、入口加载和 glewinfo 枚举;不实现 image 导入/导出。 |
| 3rdparty/DiligentCore/ThirdParty/glew/auto/extensions/gl/EGL_MESA_image_dma_buf_export | 1, 3 | 上游 GLEW EGL extension 元数据、入口加载和 glewinfo 枚举;不实现 image 导入/导出。 |
| 3rdparty/DiligentCore/ThirdParty/glew/doc/log.html | 138 | 上游 GLEW EGL extension 元数据、入口加载和 glewinfo 枚举;不实现 image 导入/导出。 |
| 3rdparty/DiligentCore/ThirdParty/glew/include/GL/eglew.h | 798, 800–801, 803, 805–813, 826, 828, 830, 832–833, 835–845, 853, 855, 1801, 1803–1804, 1812, 1814, 2506–2507, 2568 | 上游 GLEW EGL extension 元数据、入口加载和 glewinfo 枚举;不实现 image 导入/导出。 |
| 3rdparty/DiligentCore/ThirdParty/glew/src/glew.c | 17567–17568, 17629, 17861, 17863, 17873, 18177, 18179, 18189, 18476–18482, 18684–18687, 27867–27868, 27870, 27874–27875, 27877, 28313–28314, 28316 | 上游 GLEW EGL extension 元数据、入口加载和 glewinfo 枚举;不实现 image 导入/导出。 |
| 3rdparty/DiligentCore/ThirdParty/glew/src/glewinfo.c | 10644, 10646, 10648, 10651, 10653, 10655, 10657, 10663, 11276, 11278, 11280, 11286, 15990–15995, 16176–16178 | 上游 GLEW EGL extension 元数据、入口加载和 glewinfo 枚举;不实现 image 导入/导出。 |
| 3rdparty/DiligentCore/ThirdParty/volk/volk.c | 329, 331, 416, 418, 677, 680, 749, 751–752, 755, 863, 866, 983, 986–987, 990, 1187, 1189–1190, 1192, 1261, 1263, 1621, 1624, 1693, 1695–1696, 1699, 1807, 1810, 1927, 1930–1931, 1934, 2131, 2133–2134, 2136, 2205, 2207, 2601, 2604, 2710, 2712–2713, 2716, 2835, 2838, 2983, 2985–2986, 2989–2990, 2993, 3264, 3266–3267, 3269–3270, 3272, 3342, 3344 | 上游 volk Vulkan entrypoint dispatch loader;有函数指针不代表 MobileGL 调用了它。 |
| 3rdparty/DiligentCore/ThirdParty/volk/volk.h | 477, 482, 579, 583–584, 589, 743, 748, 909, 914–915, 920, 1201, 1205–1206, 1210, 1307, 1311, 1753, 1756, 1862, 1864–1865, 1868, 1987, 1990, 2135, 2137–2138, 2141–2142, 2145, 2416, 2418–2419, 2421–2422, 2424, 2494, 2496 | 上游 volk Vulkan entrypoint dispatch loader;有函数指针不代表 MobileGL 调用了它。 |
| 3rdparty/Vulkan-Headers/include/vulkan/vulkan.cppm | 434, 438, 467, 471, 476, 601, 708, 955, 982, 1057, 1184, 1247 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/Vulkan-Headers/include/vulkan/vulkan.hpp | 4111, 4128, 4241, 4251, 4270, 4751, 4754, 4762, 5385, 6397, 6493, 6818, 7462, 7728, 8839, 8842, 9158–9162, 9164–9168, 9171–9175, 9240–9242, 9244–9246, 9249–9251, 9254–9256, 9442–9444, 9459–9461, 9636–9638, 10203–10205, 10228–10230, 10407–10409, 10412–10414, 10629–10631, 10785–10787, 13505, 13525, 13605, 13625, 13992, 14702, 17015, 17112, 18058, 18132, 19895, 21009, 22090, 22094, 22127, 22131, 22139, 22277, 22395, 22666, 22705, 22783, 22913, 22980, 23495, 23500, 23559, 23566, 23572, 23732, 23892, 24273, 24306, 24403, 24565, 24652, 24988, 25010, 25015, 25118, 25269, 25593, 25626, 25714, 25859, 25933 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/Vulkan-Headers/include/vulkan/vulkan_android.h | 48–52, 82, 110–111, 117, 125 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/Vulkan-Headers/include/vulkan/vulkan_core.h | 292–293, 563, 744, 986, 1073, 1099, 1258, 1450–1451, 5481–5506, 5511–5517, 5525, 5529, 5562, 5569, 10409–10412, 10446–10449, 10459–10462, 14715–14718, 14721–14725, 14730–14733, 14760–14763, 15355–15358, 16916–16919, 20010–20011, 20013–20014, 21289–21292 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/Vulkan-Headers/include/vulkan/vulkan_enums.hpp | 421–424, 893, 1081, 1333, 1420, 1446, 1619, 4437–4451, 4453, 4455–4456, 4458, 4460, 4462, 4465, 4468–4470, 4513–4518, 4546–4547, 4645–4646, 6697, 6703–6706, 6727–6729 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/Vulkan-Headers/include/vulkan/vulkan_extension_inspection.hpp | 58–59, 61, 117, 119, 130, 132, 134, 173, 177, 224, 363, 369, 412, 414, 469, 507, 557, 564, 756, 759, 763, 766, 771, 807, 813, 816, 821, 824, 829, 832, 840, 1067, 1070, 1075, 1086, 1091, 1268, 1271, 2063, 2066–2067, 2079, 2084, 2109, 2112, 2367, 2372, 2381, 2384, 2447, 2724, 2729, 2943, 2946, 3164–3165, 3289, 3291, 3293, 3295, 3298, 3300, 3422, 3426, 3824–3825, 3827, 3857, 3859, 3864, 3866, 3868, 3890, 3893, 3917, 3987, 3989, 4012, 4014, 4041, 4059, 4097, 4102, 4158 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/Vulkan-Headers/include/vulkan/vulkan_fuchsia.h | 47–50 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/Vulkan-Headers/include/vulkan/vulkan_funcs.hpp | 6628, 12530, 12573, 12593, 12613, 13345, 13370, 13383, 13403, 13438, 13454, 13473, 13504, 16197, 16203, 16215, 16220, 16239, 16244, 16261, 16272, 16278, 16281, 19666, 19691, 24641, 24663, 24702, 25064, 25085, 26384, 26406, 26425, 26456, 30136, 30158, 30177, 31542, 31562, 31597 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/Vulkan-Headers/include/vulkan/vulkan_handles.hpp | 755, 758, 763, 786, 793, 925, 1102, 1523, 1557, 1715, 1724, 2027, 2244, 14312, 14361, 14393, 14853, 14860, 14869, 14878, 14886, 14893, 16022, 17210, 17422, 17790, 18888, 19245, 20392, 20616 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/Vulkan-Headers/include/vulkan/vulkan_metal.h | 196–199 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/Vulkan-Headers/include/vulkan/vulkan_ohos.h | 22–23, 25–26 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/Vulkan-Headers/include/vulkan/vulkan_raii.hpp | 179, 222, 526, 548, 1033, 1055, 1060, 1163, 1314, 1638, 1671, 1759, 1904, 1978, 2282, 2297, 2305, 2393, 2509, 2727, 2766, 2835, 2957, 3013, 3893, 3976, 4763, 4774, 4895, 4900, 4906, 4910, 5147, 5403, 5440, 5543, 5751, 5824, 9910, 17419, 19870, 19883, 19901, 19907, 20295, 20303, 20314, 20320, 20336, 20350, 20355, 20369, 21554, 21559, 21562, 21576, 21579, 21592, 21596, 21598, 23134, 23142, 25369, 25376, 25392, 25554, 25560, 26225, 26232, 26248, 26263, 27776, 27784, 27801, 28316, 28322, 28339 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/Vulkan-Headers/include/vulkan/vulkan_screen.h | 56–59 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/Vulkan-Headers/include/vulkan/vulkan_static_assertions.hpp | 2897, 2905, 2920, 2979, 3006, 3497, 4415, 6212, 6361, 7023, 7061, 8456, 9528 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/Vulkan-Headers/include/vulkan/vulkan_structs.hpp | 77061, 77096, 77102, 77130, 77157 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/Vulkan-Headers/include/vulkan/vulkan_to_string.hpp | 2907, 8814 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/Vulkan-Headers/include/vulkan/vulkan_win32.h | 55–58, 232–235 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/Vulkan-Headers/registry/validusage.json | 2846, 7751, 7756, 7850, 7855, 8529, 8534, 8883, 8888, 9163, 9168, 9603, 22402, 22462, 22482, 22487, 22522, 22527, 22532, 22537, 22542, 22547, 22552, 22562, 22567, 22572, 22577, 22582, 22587, 22592, 22612, 22652, 22657, 22662, 22716, 22721, 22726, 22731, 22741, 22746, 22833, 22982, 23016, 23248, 23306, 23340, 23383, 23393, 23398, 23422, 23432, 23437, 23485, 23495, 23514, 23523, 23552, 23562, 23670, 23694, 23756, 24148, 24206, 24240, 24503, 24691, 25132, 25939, 25944, 25969, 25974, 26425, 26556, 26801, 26894, 29264, 29269, 29513, 29518, 29752, 29920, 30097, 30270, 30575, 31144, 118352, 119055, 120081, 121223 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/Vulkan-Headers/registry/vk.xml | 245, 2565, 2609, 3082, 3088, 4549, 4833, 7281, 9443, 10058, 10954, 12457–12460, 12463–12465, 12571–12577, 12580–12582, 12590, 12603, 16214, 16221, 19260, 19279–19281, 21272, 21274–21275, 21284, 21286–21288, 21294, 21296–21297, 21305, 21535, 21537–21538, 21547–21553, 21556–21558, 21568, 21570–21573, 21582, 21584–21585, 21598, 21600–21601, 21612, 21634, 22104, 22294, 22296–22298, 22301, 22354, 22356–22358, 22373, 23486, 23488–23489, 23492–23494, 26166, 26168–26169, 26173, 26194, 26278, 26280–26281, 26283, 26285, 26343, 26345–26346, 26351–26353, 27203, 27205–27206, 27220, 27225, 27227–27229, 27427, 27620, 28724, 28726–28728, 28733, 29676, 29678–29679, 29683–29685 | 上游 Vulkan C/C++ API 类型、常量、dispatch/RAII wrapper 或 registry/valid-usage 规则;含 AHB/external memory/SYNC_FD 声明,不是 MobileGL 接线。 |
| 3rdparty/Vulkan-Utility-Libraries/include/vulkan/utility/vk_safe_struct.hpp | 11766 | 上游 Vulkan enum→string、sType、safe-struct 拷贝和生成器支持;不创建或发送呈现 buffer。 |
| 3rdparty/Vulkan-Utility-Libraries/include/vulkan/utility/vk_struct_helper.hpp | 106–107, 580, 701, 909, 998, 1023, 1124 | 上游 Vulkan enum→string、sType、safe-struct 拷贝和生成器支持;不创建或发送呈现 buffer。 |
| 3rdparty/Vulkan-Utility-Libraries/include/vulkan/vk_enum_string_helper.h | 295–298, 837–838, 1175–1176, 1641–1642, 1805–1806, 1857–1858, 2169–2170, 7719–7754, 7778–7783, 7813–7814, 7923–7924, 9969–9976, 10000–10005, 11602, 11604, 12530, 12760, 13160, 13332, 13382, 13579 | 上游 Vulkan enum→string、sType、safe-struct 拷贝和生成器支持;不创建或发送呈现 buffer。 |
| 3rdparty/Vulkan-Utility-Libraries/scripts/generators/safe_struct_generator.py | 53 | 上游 Vulkan enum→string、sType、safe-struct 拷贝和生成器支持;不创建或发送呈现 buffer。 |
| 3rdparty/Vulkan-Utility-Libraries/src/vulkan/vk_safe_struct_core.cpp | 7708, 7756 | 上游 Vulkan enum→string、sType、safe-struct 拷贝和生成器支持;不创建或发送呈现 buffer。 |
| 3rdparty/Vulkan-Utility-Libraries/src/vulkan/vk_safe_struct_ext.cpp | 5408, 14352 | 上游 Vulkan enum→string、sType、safe-struct 拷贝和生成器支持;不创建或发送呈现 buffer。 |
| 3rdparty/Vulkan-Utility-Libraries/src/vulkan/vk_safe_struct_utils.cpp | 129, 132, 1064, 1292, 1707, 1915, 1963, 2157, 2508, 2511, 3443, 3671, 4086, 4294, 4342, 4536 | 上游 Vulkan enum→string、sType、safe-struct 拷贝和生成器支持;不创建或发送呈现 buffer。 |
| 3rdparty/Vulkan-Utility-Libraries/src/vulkan/vk_safe_struct_vendor.cpp | 799, 10627, 14544, 19724 | 上游 Vulkan enum→string、sType、safe-struct 拷贝和生成器支持;不创建或发送呈现 buffer。 |
| 3rdparty/VulkanMemoryAllocator/CHANGELOG.md | 27 | 上游 VMA 通用 external-memory allocation/Win32 handle 导出支持、示例测试及文档;没有 MobileGL 帧 dma-buf/fence 协议。 |
| 3rdparty/VulkanMemoryAllocator/Doxyfile | 2469–2470 | 上游 VMA 通用 external-memory allocation/Win32 handle 导出支持、示例测试及文档;没有 MobileGL 帧 dma-buf/fence 协议。 |
| 3rdparty/VulkanMemoryAllocator/README.md | 56 | 上游 VMA 通用 external-memory allocation/Win32 handle 导出支持、示例测试及文档;没有 MobileGL 帧 dma-buf/fence 协议。 |
| 3rdparty/VulkanMemoryAllocator/docs/html/faq.html | 126 | 上游 VMA 通用 external-memory allocation/Win32 handle 导出支持、示例测试及文档;没有 MobileGL 帧 dma-buf/fence 协议。 |
| 3rdparty/VulkanMemoryAllocator/docs/html/globals.html | 110 | 上游 VMA 通用 external-memory allocation/Win32 handle 导出支持、示例测试及文档;没有 MobileGL 帧 dma-buf/fence 协议。 |
| 3rdparty/VulkanMemoryAllocator/docs/html/globals_eval.html | 103 | 上游 VMA 通用 external-memory allocation/Win32 handle 导出支持、示例测试及文档;没有 MobileGL 帧 dma-buf/fence 协议。 |
| 3rdparty/VulkanMemoryAllocator/docs/html/group__group__alloc.html | 2500–2501, 2547–2552, 2561, 2565 | 上游 VMA 通用 external-memory allocation/Win32 handle 导出支持、示例测试及文档;没有 MobileGL 帧 dma-buf/fence 协议。 |
| 3rdparty/VulkanMemoryAllocator/docs/html/group__group__init.html | 132, 359, 557, 569 | 上游 VMA 通用 external-memory allocation/Win32 handle 导出支持、示例测试及文档;没有 MobileGL 帧 dma-buf/fence 协议。 |
| 3rdparty/VulkanMemoryAllocator/docs/html/other_api_interop.html | 84, 89–90, 97, 101, 153, 191, 195, 209, 212 | 上游 VMA 通用 external-memory allocation/Win32 handle 导出支持、示例测试及文档;没有 MobileGL 帧 dma-buf/fence 协议。 |
| 3rdparty/VulkanMemoryAllocator/docs/html/quick_start.html | 162 | 上游 VMA 通用 external-memory allocation/Win32 handle 导出支持、示例测试及文档;没有 MobileGL 帧 dma-buf/fence 协议。 |
| 3rdparty/VulkanMemoryAllocator/docs/html/search/all_14.js | 66 | 上游 VMA 通用 external-memory allocation/Win32 handle 导出支持、示例测试及文档;没有 MobileGL 帧 dma-buf/fence 协议。 |
| 3rdparty/VulkanMemoryAllocator/docs/html/search/enumvalues_0.js | 29 | 上游 VMA 通用 external-memory allocation/Win32 handle 导出支持、示例测试及文档;没有 MobileGL 帧 dma-buf/fence 协议。 |
| 3rdparty/VulkanMemoryAllocator/docs/html/vk__mem__alloc_8h.html | 220 | 上游 VMA 通用 external-memory allocation/Win32 handle 导出支持、示例测试及文档;没有 MobileGL 帧 dma-buf/fence 协议。 |
| 3rdparty/VulkanMemoryAllocator/docs/html/vk_khr_external_memory_win32.html | 8, 78, 81–82, 86–87, 89, 91, 96, 100, 147, 151, 177, 189, 193 | 上游 VMA 通用 external-memory allocation/Win32 handle 导出支持、示例测试及文档;没有 MobileGL 帧 dma-buf/fence 协议。 |
| 3rdparty/VulkanMemoryAllocator/include/vk_mem_alloc.h | 242–245, 247, 251–254, 256, 480, 486, 1062, 1136, 1147, 1711, 2169, 2195, 2199–2200, 2221–2226, 2234, 2249–2250, 2265, 6396, 6483, 6552, 6559, 6670, 6672, 10716, 10721, 10729, 10731, 11137, 11143, 11458, 11474, 12078, 12086, 13217, 13310, 13313, 13324, 13326, 13350, 13356, 13540, 13648, 13702, 13959, 13967, 15625–15626, 17112, 17118, 17124–17129, 17133, 17298, 17523, 18933, 18946, 18949, 18966, 18970, 19028, 19070, 19075, 19120, 19123 | 上游 VMA 通用 external-memory allocation/Win32 handle 导出支持、示例测试及文档;没有 MobileGL 帧 dma-buf/fence 协议。 |
| 3rdparty/VulkanMemoryAllocator/src/Tests.cpp | 42, 8490–8491, 8497, 8506, 8530, 8536, 8584–8585, 8591, 8600, 8624, 8632 | 上游 VMA 通用 external-memory allocation/Win32 handle 导出支持、示例测试及文档;没有 MobileGL 帧 dma-buf/fence 协议。 |
| 3rdparty/VulkanMemoryAllocator/src/VulkanSample.cpp | 72, 1494, 1540, 1542, 1933–1934, 2095–2096 | 上游 VMA 通用 external-memory allocation/Win32 handle 导出支持、示例测试及文档;没有 MobileGL 帧 dma-buf/fence 协议。 |
| 3rdparty/apitrace/specs/dxgi.py | 732, 740 | DXGI DMA_BUFFER_BOUNDARY 枚举;与 Linux dma-buf 无关的子串匹配。 |
| 3rdparty/apitrace/specs/eglapi.py | 62, 302, 304–312, 318–329, 422, 477 | apitrace 的 EGL API/enum trace 描述及 Khronos header;不是 MobileGL EGL extension 实现。 |
| 3rdparty/apitrace/specs/eglenum.py | 275, 277–285, 340–350 | apitrace 的 EGL API/enum trace 描述及 Khronos header;不是 MobileGL EGL extension 实现。 |
| 3rdparty/apitrace/thirdparty/khronos/EGL/eglext.h | 517–518, 520, 770–772, 774–782, 794, 796–808, 815, 1089–1090, 1097 | apitrace 的 EGL API/enum trace 描述及 Khronos header;不是 MobileGL EGL extension 实现。 |
| 3rdparty/asio/asio.manifest | 6515 | async_file_copy 示例/清单;sync_file 命中是 async_file 的子串,非 Linux GPU sync_file。 |
| 3rdparty/asio/asio/src/examples/cpp11/Makefile.am | 32, 184 | async_file_copy 示例/清单;sync_file 命中是 async_file 的子串,非 Linux GPU sync_file。 |
| 3rdparty/asio/asio/src/examples/cpp11/files/.gitignore | 1 | async_file_copy 示例/清单;sync_file 命中是 async_file 的子串,非 Linux GPU sync_file。 |
| 3rdparty/asio/asio/src/examples/cpp11/files/async_file_copy.cpp | 2, 79 | async_file_copy 示例/清单;sync_file 命中是 async_file 的子串,非 Linux GPU sync_file。 |
| 3rdparty/asio/asio/src/examples/cpp11/local/fd_passing_stream_client.cpp | 71 | Asio 的独立 AF_UNIX SCM_RIGHTS 示例程序;非 MobileGL transport。 |
| 3rdparty/asio/asio/src/examples/cpp11/local/fd_passing_stream_server.cpp | 87 | Asio 的独立 AF_UNIX SCM_RIGHTS 示例程序;非 MobileGL transport。 |
| 3rdparty/asio/boost_asio.manifest | 6951 | async_file_copy 示例/清单;sync_file 命中是 async_file 的子串,非 Linux GPU sync_file。 |
| 3rdparty/asio/src/examples/cpp11/Makefile.am | 32, 184 | async_file_copy 示例/清单;sync_file 命中是 async_file 的子串,非 Linux GPU sync_file。 |
| 3rdparty/asio/src/examples/cpp11/files/.gitignore | 1 | async_file_copy 示例/清单;sync_file 命中是 async_file 的子串,非 Linux GPU sync_file。 |
| 3rdparty/asio/src/examples/cpp11/files/async_file_copy.cpp | 2, 79 | async_file_copy 示例/清单;sync_file 命中是 async_file 的子串,非 Linux GPU sync_file。 |
| 3rdparty/asio/src/examples/cpp11/local/fd_passing_stream_client.cpp | 71 | Asio 的独立 AF_UNIX SCM_RIGHTS 示例程序;非 MobileGL transport。 |
| 3rdparty/asio/src/examples/cpp11/local/fd_passing_stream_server.cpp | 87 | Asio 的独立 AF_UNIX SCM_RIGHTS 示例程序;非 MobileGL transport。 |