mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-07 01:53:24 +09:00
[Chore] (docs, MobileGL, scripts, tools, .github): use US spelling in identifiers and file names
This commit is contained in:
@@ -25,7 +25,7 @@ nobody else is mid-test. Use your own `ct.sh` channel names (others use c, c2,
|
||||
6. `desktop-session.service` (User=swung0x48, **enabled**: the container boots straight into it, as the original image does) has drop-in `/etc/systemd/system/desktop-session.service.d/mobilegl.conf` (anland `producers/kde/Arch_v5/desktop-session-mobilegl.conf`, installed + enabled by `sync-build-kwin.sh`): `ExecStartPre=mobilegl-startup.sh wait` (until `@anland-mobilegl` listens in `/proc/net/unix` and the daemon socket exists), `ExecStartPre=+... sync-backend`, `Restart=always`, then `ExecStart=/opt/mobilegl/bin/mobilegl-startup.sh plasma`, which deletes the sticky software-renderer key, sets `MOBILEGL_IPC_PROBE_TIMEOUT_MS=0` session-wide (MobileGL never declines, so glvnd never falls through to another GL stack), writes a user drop-in for `plasma-kwin_wayland.service` (kwin_wayland_wrapper -> `/opt/mobilegl/kwin/bin/kwin_wayland` + `/opt/mobilegl/kwin/lib/libkwin.so.6.7.4`, `ANLAND_MOBILEGL=1`, `MOBILEGL_IPC_SURFACE=server`) and runs `startplasma-wayland`.
|
||||
7. KWin 6.7.4 with anland's `anland` backend renders straight into the anland Android Surface through the server. While the window is not on screen (consumer disconnected) the backend powers its output down (DPMS Off + RenderLoop inhibited: no compositing, no frame callbacks) and back up when the window returns. Every other GL process is `MOBILEGL_IPC_SURFACE=offscreen` and presents through KWin.
|
||||
8. Client = `/opt/mobilegl/lib/libMobileGL.so` (glibc aarch64), the container's **system-wide** GL vendor (section below): glvnd EGL vendor `/usr/share/glvnd/egl_vendor.d/10_mobilegl.json` (sorts before the distribution's `50_*.json`, which serves whenever MobileGL declines), GLX vendor `/usr/lib/libGLX_mobilegl.so.0`, settings from `/etc/mobilegl/client.conf` (`MOBILEGL_TRANSPORT=spawn MOBILEGL_IPC_DATA=shm MOBILEGL_IPC_CONTROL=unix:@anland-mobilegl`) + `/etc/mobilegl/backend`. No per-process environment is needed.
|
||||
9. Zero-copy windows: client `wl_egl_window` frames are server-allocated AHardwareBuffer "shared images" exported as dma-buf fds over `zwp_linux_dmabuf_v1`; KWin imports them with EGL and the server recognises its own buffer by inode. KWin gets a DRM device via `GBM_BACKEND=mobilegl` -> `/usr/lib/gbm/mobilegl_gbm.so` (node is only an identity, never ioctl'd). Without linux-dmabuf the client falls back to wl_shm readback.
|
||||
9. Zero-copy windows: client `wl_egl_window` frames are server-allocated AHardwareBuffer "shared images" exported as dma-buf fds over `zwp_linux_dmabuf_v1`; KWin imports them with EGL and the server recognizes its own buffer by inode. KWin gets a DRM device via `GBM_BACKEND=mobilegl` -> `/usr/lib/gbm/mobilegl_gbm.so` (node is only an identity, never ioctl'd). Without linux-dmabuf the client falls back to wl_shm readback.
|
||||
10. X11 (`reference/plan-x11-gpu.md`): Xwayland draws with **glamor on MobileGL** (an offscreen session; `GBM_BACKEND=mobilegl` on KWin's render node; window pixmaps are shared images handed to KWin as linux-dmabuf buffers; its `glFlush` publishes them through the server, `/tmp/mgl-xwayland.client.log`); `ANLAND_XWAYLAND_GLAMOR=0` in KWin's drop-in brings back the software `-shm` Xwayland. GLX windows present their frames as shared images through **DRI3 + Present** (log `presented through DRI3+Present shared images`), falling back to readback + MIT-SHM / `xcb_put_image` when the X server has no DRI3 (`MOBILEGL_GLX_PRESENT=readback` forces it per app). Chrome runs ANGLE-GLES over MobileGL EGL with the GPU in its own process (`mobilegl-startup.sh chrome`; `MOBILEGL_CHROME_GPU=in-process` opts out), presenting GBM dma-bufs over linux-dmabuf; after a device loss Chrome restarts that process and repaints.
|
||||
|
||||
## First-time prerequisites (Windows host)
|
||||
|
||||
@@ -77,7 +77,7 @@ uses the application's). KWin's launcher also drops `DISPLAY` from Xwayland's en
|
||||
`ANLAND_MOBILEGL=1` and `ANLAND_XWAYLAND_GLAMOR != 0`: Xwayland starts **without** `-shm`, with
|
||||
`MOBILEGL_IPC_SURFACE=offscreen`, its own `MOBILEGL_LOG_FILE_PATH=/tmp/mgl-xwayland`, `GBM_BACKEND`
|
||||
kept, no `LIBGL_ALWAYS_SOFTWARE`/`GALLIUM_DRIVER`, no `DISPLAY`. Otherwise the old `-shm` +
|
||||
software environment. If glamor cannot initialise, Xwayland itself falls back to shm rendering.
|
||||
software environment. If glamor cannot initialize, Xwayland itself falls back to shm rendering.
|
||||
|
||||
## Stage 2 - GLX presentation through DRI3 + Present
|
||||
|
||||
|
||||
@@ -22,12 +22,12 @@ index 588cf7d2a..0721ffee7 100644
|
||||
height = (height == glu::RenderConfig::DONT_CARE) ? maxSize : height;
|
||||
}
|
||||
|
||||
+ // MOBILEGL: allow the colour attachment to be a texture instead of a
|
||||
+ // MOBILEGL: allow the color attachment to be a texture instead of a
|
||||
+ // renderbuffer. MobileGL's DirectVulkan backend returns zeros when reading
|
||||
+ // back a renderbuffer-attached FBO, which makes every image comparison fail
|
||||
+ // for one reason and hides everything else. Setting
|
||||
+ // MOBILEGL_CTS_FBO_COLOR_TEXTURE=1 isolates that single defect so the rest
|
||||
+ // of the suite can be measured. Off by default: stock behaviour.
|
||||
+ // of the suite can be measured. Off by default: stock behavior.
|
||||
{
|
||||
- pixelFormat = getPixelFormat(colorFormat);
|
||||
+ const char *useTexEnv = getenv("MOBILEGL_CTS_FBO_COLOR_TEXTURE");
|
||||
|
||||
@@ -138,7 +138,7 @@ def _sidecar(paths: Sequence[str], name: str) -> set[str]:
|
||||
def build_version_report(
|
||||
version: str, caselist: str, result_paths: Sequence[str]
|
||||
) -> dict:
|
||||
"""Build the serialisable report for one GL mustpass version."""
|
||||
"""Build the serializable report for one GL mustpass version."""
|
||||
|
||||
expected_cases, expected_duplicates = read_caselist(caselist)
|
||||
expected = set(expected_cases)
|
||||
|
||||
@@ -171,7 +171,7 @@ def _read_provenance(
|
||||
raise MultiReportInputError(f"suite run identity must be a JSON object: {path}")
|
||||
if state.get("backend") != spec.backend:
|
||||
raise MultiReportInputError(
|
||||
f"suite {spec.suite_id} is labelled {spec.backend}, but run_state.json "
|
||||
f"suite {spec.suite_id} is labeled {spec.backend}, but run_state.json "
|
||||
f"records {state.get('backend')!r}"
|
||||
)
|
||||
fingerprint, case_count = _caselist_fingerprint(spec.caselist)
|
||||
@@ -250,7 +250,7 @@ def build_report(
|
||||
require_run_state: bool = True,
|
||||
expected_run_identity: Optional[str] = None,
|
||||
) -> dict:
|
||||
"""Build suite, per-backend, and overall serialisable reports."""
|
||||
"""Build suite, per-backend, and overall serializable reports."""
|
||||
|
||||
provenance = _validate_specs(
|
||||
specs, require_run_state, expected_run_identity
|
||||
@@ -417,7 +417,7 @@ def _write_json(path: str, report: dict) -> None:
|
||||
_write_text(path, json.dumps(report, indent=2, sort_keys=True) + "\n")
|
||||
|
||||
|
||||
def _normalise_compact_suite_args(argv: Sequence[str]) -> list[str]:
|
||||
def _normalize_compact_suite_args(argv: Sequence[str]) -> list[str]:
|
||||
"""Expand ``--suite=b,l,c,r`` into the four-value argparse form."""
|
||||
|
||||
result: list[str] = []
|
||||
@@ -507,11 +507,11 @@ def _specs_from_args(values: Sequence[Sequence[str]]) -> list[SuiteSpec]:
|
||||
def main(argv: Optional[Iterable[str]] = None) -> int:
|
||||
raw_argv = list(argv) if argv is not None else sys.argv[1:]
|
||||
try:
|
||||
normalised = _normalise_compact_suite_args(raw_argv)
|
||||
normalized = _normalize_compact_suite_args(raw_argv)
|
||||
except MultiReportInputError as exc:
|
||||
print(f"cts_multi_report: {exc}", file=sys.stderr)
|
||||
return 2
|
||||
args = _parser().parse_args(normalised)
|
||||
args = _parser().parse_args(normalized)
|
||||
|
||||
if os.path.normcase(os.path.abspath(args.markdown)) == os.path.normcase(
|
||||
os.path.abspath(args.json_out)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
# tools/device_bench/bench.sh --device <this> --backend X --no-pin
|
||||
# tools/device_bench/pin_device.sh 35d0befa check # AFTER, exits non-zero on drift
|
||||
# tools/device_bench/pin_device.sh 35d0befa unpin
|
||||
# `--no-pin` is what keeps bench.sh from writing MediaTek paths into the void and labelling the
|
||||
# `--no-pin` is what keeps bench.sh from writing MediaTek paths into the void and labeling the
|
||||
# result pinned; pin_device.sh check is what replaces the pin-integrity fields it would have
|
||||
# sampled. (bench.sh's read_temp and its GPU-busy sampling ARE portable - they only read
|
||||
# /sys/class/thermal and $GPU_UTIL_NODE - so those fields stay meaningful.)
|
||||
|
||||
@@ -26,8 +26,8 @@ expected_cases = {
|
||||
'ClipDistanceScenario.ADisabledClipDistanceRemovesNothing',
|
||||
'ClipDistanceScenario.TheEnablesAreIndependentPerDistance',
|
||||
'CopyImageLayeredScenario.ArrayToArrayCopiesEverySlice',
|
||||
'CopyImageLayeredScenario.ArrayToArrayHonoursDifferentLayerOffsets',
|
||||
'CopyImageLayeredScenario.VolumeToVolumeHonoursNonZeroZ',
|
||||
'CopyImageLayeredScenario.ArrayToArrayHonorsDifferentLayerOffsets',
|
||||
'CopyImageLayeredScenario.VolumeToVolumeHonorsNonZeroZ',
|
||||
'CopyImageLayeredScenario.VolumeToVolumeAtNonZeroMipLevel',
|
||||
'CopyImageLayeredScenario.ArrayToVolumeCopiesEverySlice',
|
||||
'CopyImageLayeredScenario.VolumeToArrayCopiesEverySlice',
|
||||
|
||||
@@ -100,7 +100,7 @@ Each row starts with a per-leg trace, e.g.
|
||||
`rawmmap[i]=no vkimport[D]=rt gpu[D]=rt` — `[D]` decisive, `[i]` informational,
|
||||
`rt` = round-tripped, `read-only`/`write-only`/`no`/`notrun` otherwise. Driver
|
||||
error codes are printed verbatim (`VkResult` names, `errno`, GL enums) — that is
|
||||
the payload of the spike, so do not summarise them away.
|
||||
the payload of the spike, so do not summarize them away.
|
||||
|
||||
Two details worth knowing when reading T1 output:
|
||||
|
||||
|
||||
@@ -105,19 +105,19 @@ public final class ServerEnvironmentTest {
|
||||
// ---- P11 B1: the apply core the supervisor announces and the broker relays ---------------------
|
||||
// The native policy is the one source; the service only reads the supervisor's start-up line.
|
||||
expect("the announcement as the supervisor prints it",
|
||||
ServerEnvironment.parseReservedApplyCore("MG_Remote server: apply core reserved for dialled-in "
|
||||
ServerEnvironment.parseReservedApplyCore("MG_Remote server: apply core reserved for dialed-in "
|
||||
+ "shared-segment clients: 0x40 (auto: the lowest of the prime cores, the rest left to the "
|
||||
+ "dialled-in shared-segment client)"), 0x40L);
|
||||
+ "dialed-in shared-segment client)"), 0x40L);
|
||||
expect("none reserved is 0, not absent",
|
||||
ServerEnvironment.parseReservedApplyCore("MG_Remote server: apply core reserved for dialled-in "
|
||||
ServerEnvironment.parseReservedApplyCore("MG_Remote server: apply core reserved for dialed-in "
|
||||
+ "shared-segment clients: 0x0 (auto: unpinned - no asymmetric big/prime topology to split)"), 0L);
|
||||
expect("a 64-bit mask", ServerEnvironment.parseReservedApplyCore(
|
||||
"MG_Remote server: apply core reserved for dialled-in shared-segment clients: 0x8000000000000000 (x)"),
|
||||
"MG_Remote server: apply core reserved for dialed-in shared-segment clients: 0x8000000000000000 (x)"),
|
||||
Long.MIN_VALUE);
|
||||
expect("any other supervisor line is not the announcement",
|
||||
ServerEnvironment.parseReservedApplyCore("MG_Remote server: pid=12 listening on @x"), -1L);
|
||||
expect("a truncated announcement is not one",
|
||||
ServerEnvironment.parseReservedApplyCore("MG_Remote server: apply core reserved for dialled-in "
|
||||
ServerEnvironment.parseReservedApplyCore("MG_Remote server: apply core reserved for dialed-in "
|
||||
+ "shared-segment clients: 0x"), -1L);
|
||||
|
||||
if (failures != 0) {
|
||||
|
||||
@@ -73,7 +73,7 @@ public final class SpawnServerPathTest {
|
||||
// see LaunchServer refuse by name. contains("MOBILEGL_IPC_SERVER_PATH=") did not match
|
||||
// it, so a path was appended after the unset and - last entry wins - undid it.
|
||||
String unset = "MOBILEGL_TRANSPORT=spawn;MOBILEGL_IPC_SERVER_PATH";
|
||||
expect("the unset spelling is honoured, not overwritten",
|
||||
expect("the unset spelling is honored, not overwritten",
|
||||
SpawnServerPath.resolve(unset, DIR), unset);
|
||||
String emptied = "MOBILEGL_TRANSPORT=spawn;MOBILEGL_IPC_SERVER_PATH=";
|
||||
expect("an empty value is a value, and is left alone",
|
||||
|
||||
@@ -57,7 +57,7 @@ class ImageError(ValueError):
|
||||
# whatever interpreter is at hand, and an unavailable Pillow would turn "the repeats diverged"
|
||||
# into "the tool did not run", which are not the same finding. The accepted subset is what
|
||||
# libpng gives trace_replay_core after its own normalization (ReadPngRgba, :278): 8- and 16-bit
|
||||
# greyscale/RGB/greyscale+alpha/RGBA and 8-bit palette, non-interlaced. Anything else is
|
||||
# grayscale/RGB/grayscale+alpha/RGBA and 8-bit palette, non-interlaced. Anything else is
|
||||
# REFUSED BY NAME rather than guessed at.
|
||||
# ---------------------------------------------------------------------------------------------
|
||||
_PNG_MAGIC = b"\x89PNG\r\n\x1a\n"
|
||||
|
||||
@@ -237,7 +237,7 @@ endif()
|
||||
# * it carries none of the three MGPipe Fatals: Fatal{PipeVerifyDiffer (a push/pull divergence,
|
||||
# the thing the mode exists to find), Fatal{UnmigratedPipeInput (a backend read of a field the
|
||||
# verb's fill table does not list - fixed by adding the row to MG_Pipe/FillPoints.def, never by
|
||||
# marking the field sticky), and Fatal{PipeVerifyBadKnob (a misspelt MOBILEGL_PIPE_VERIFY_CORRUPT).
|
||||
# marking the field sticky), and Fatal{PipeVerifyBadKnob (a misspelled MOBILEGL_PIPE_VERIFY_CORRUPT).
|
||||
# The third is in the regex on purpose even though D2 makes it
|
||||
# abort the process: with MOBILEGL_PIPE_VERIFY_FATAL=0 the abort is exactly what does not
|
||||
# happen, and a typo'd knob would otherwise leave the negative-control lane looking healthy.
|
||||
@@ -285,7 +285,7 @@ if(DEFINED ENV{MOBILEGL_PIPE_VERIFY} AND NOT "$ENV{MOBILEGL_PIPE_VERIFY}" STREQU
|
||||
"MOBILEGL_PIPE_VERIFY. Fatal{PipeVerifyDiffer, \"<Field>@<Verb>\"} is a real push/pull "
|
||||
"divergence and is recorded, not silenced; Fatal{UnmigratedPipeInput, \"<Field>@<Verb>\"} "
|
||||
"is a missing row in MG_Pipe/FillPoints.def's class table - add it, regenerate, rerun "
|
||||
"(never mark the field sticky); Fatal{PipeVerifyBadKnob, ...} is a misspelt "
|
||||
"(never mark the field sticky); Fatal{PipeVerifyBadKnob, ...} is a misspelled "
|
||||
"MOBILEGL_PIPE_VERIFY_CORRUPT - fix the spelling, the vocabulary is "
|
||||
"kMGPipeInputFieldNames[].")
|
||||
endif()
|
||||
@@ -502,7 +502,7 @@ if(DEFINED ENV{MOBILEGL_TRANSPORT} AND NOT "$ENV{MOBILEGL_TRANSPORT}" STREQUAL "
|
||||
"${split_case}: ${split_floor_count} MGWIRE-FLOOR unsound-serial-complete line(s) under "
|
||||
"MOBILEGL_TRANSPORT=$ENV{MOBILEGL_TRANSPORT}. The completed-frame-serial floor was "
|
||||
"raised to a serial an in-flight submission still carries, so a streamed buffer write "
|
||||
"can take the unsynchronised host path over bytes that submission is still copying "
|
||||
"can take the unsynchronized host path over bytes that submission is still copying "
|
||||
"(magma-b3.md §2). The clamp in VulkanRenderer::OnSubmitsCompletedUpTo is what makes "
|
||||
"this unreachable; a line here means it was removed or bypassed.")
|
||||
endif()
|
||||
|
||||
@@ -267,7 +267,7 @@ class MatrixTests(unittest.TestCase):
|
||||
case=matrix.select_cases(self.manifest,None,[backend])[0]
|
||||
return matrix.plan_case(case,backend,catalog,self.plan_args(),{})
|
||||
|
||||
def test_selection_honours_per_case_backends_and_names_an_impossible_pairing(self):
|
||||
def test_selection_honors_per_case_backends_and_names_an_impossible_pairing(self):
|
||||
self.write_inputs(extra_cases=[dict(self.VULKAN_ONLY,name='VulkanOnly'),
|
||||
dict(self.GLES_ONLY,name='GlesOnly')])
|
||||
# The default subset is every split case; the per-backend filter happens in main(),
|
||||
|
||||
Reference in New Issue
Block a user