5.4 KiB
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-drmYou may alsogit clone --depth 1 -b legacy https://github.com/SuperTurtleDev/anland.gitinto that sameanland/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; WSLwsl.exe -d Arch -- bash -lc "..."also works).
Answer each question with file:line citations. Be concrete; quote struct/enum values and constants where relevant.
- 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 fromcreate/create_immedto display: readawl_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? - 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.releasetiming in SC vs EGL modes. Implicit sync assumptions for clients that don't use explicit sync. - 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.
- 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? - 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? - 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)?
- 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). - 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".