[Feat] (Backend selection, configuration, tests): prefer usable hardware Vulkan by default

This commit is contained in:
BZLZHH committed 2026-11-29 09:34:44 +08:00
1 parent adfed91a1e
commit 6ac2bb682a
13 files changed
+183 -78

No files matched your search

+5 -1
View File
@@ -45,9 +45,13 @@ environment too. The backend itself is the exception: the client asks for it (se
## Backend and general
The automatic probe checks the local Vulkan driver and verifies the pbuffer route where available
before the application supplies a window. On Linux, this requires `VK_EXT_headless_surface`. If the
renderer runs on another device, set `MOBILEGL_BACKEND_TYPE` for that server’s hardware.
| Variable | Values | Default | Meaning |
|---|---|---|---|
| `MOBILEGL_BACKEND_TYPE` | `DirectGLES`, `DirectVulkan` | `DirectGLES` | Espryt (GLES) or Magma (Vulkan). Case-sensitive. Any other value leaves MobileGL without a backend. In a split session the client's value is sent to the server, which uses it unless the server pinned a different one. |
| `MOBILEGL_BACKEND_TYPE` | `DirectGLES`, `DirectVulkan` | Automatic | Prefer DirectVulkan when a hardware device passes the Vulkan startup probe. Otherwise use DirectGLES. Explicit values are case-sensitive. Any other value leaves MobileGL without a backend. In a split session the client sends the selected backend to the server, which uses it unless the server pinned a different one. |
| `MOBILEGL_FRAMES_IN_FLIGHT` | 1-64 | 3 | How many frames may be queued ahead of the GPU. Magma: its frame contexts. Espryt: after presenting frame N it waits for frame N+1-value to finish (1 = full CPU/GPU sync). Split topologies: the client may run `max(1, value - 2)` presents ahead of the server, so 4 gives one more frame of overlap (and of latency). The old name `MOBILEGL_MAGMA_FRAMESINFLIGHT` still works but is deprecated. |
| `MOBILEGL_RELAXED_SEMANTICS` | flag | off | Apply legacy leniencies (for example drawing with vertex array object 0, reusing texture names after delete) even to contexts that explicitly requested a core profile. Contexts that did not request core get them anyway. |
| `MOBILEGL_ADVERTISE_FP64` | flag | off | Advertise `GL_ARB_gpu_shader_fp64`. `double` types compile either way but run at 32-bit precision. |