mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-07 01:53:24 +09:00
[Docs] (.claude/skills, .github/workflows, CMakeLists.txt, docs/archive, docs/Disaggregated, docs/MobileVA, docs/Performance, MG_Backend, MG_Backend/DirectGLES, MG_Backend/DirectVulkan, MG_Backend/Record, MG_Gbm, MG_Impl, MG_Impl/EGLImpl, MG_Impl/GLImpl, MG_Impl/GLXImpl, MG_Impl/Pipe, MG_IntegrationTest, MG_IntegrationTest/Harness, MG_IntegrationTest/Scenarios, MG_Pipe, MG_Pipe/generated, MG_Remote, MG_Remote/Client, MG_Remote/Server, MG_Remote/Transport, MG_Remote/Wire, MG_State/GLState, MG_Test/Pipe, MG_Test/Util, MG_Test/Wire, MobileGL, scripts, scripts/data, tools/device_bench, userguide): archive the planning notes and agent contracts under docs/archive
- DEBTS.md and OPEN-QUESTIONS.md stay maintained, now in docs/Disaggregated.
This commit is contained in:
@@ -6,8 +6,8 @@ description: Bring up, rebuild, deploy, switch backends on, test and debug the "
|
||||
# MobileGL on anland KDE Plasma
|
||||
|
||||
**Setting this up on a new machine or phone from source: `reproduce.md` next to this file.**
|
||||
Human-readable runbook (Chinese, same content): `docs/Disaggregated/notes/anland/runbook-plasma.md`.
|
||||
Background: `docs/Disaggregated/notes/anland/handoff-legacy-mobilegl-unified.md` (state, commits, known
|
||||
Human-readable runbook (Chinese, same content): `docs/archive/notes/anland/runbook-plasma.md`.
|
||||
Background: `docs/archive/notes/anland/handoff-legacy-mobilegl-unified.md` (state, commits, known
|
||||
issues) and `plan-ahb-dmabuf.md` (zero-copy design). All scripts are in `scripts/` next to this file;
|
||||
parameters are documented at the top of each script and in `scripts/env.sh`.
|
||||
|
||||
@@ -26,7 +26,7 @@ nobody else is mid-test. Use your own `ct.sh` channel names (others use c, c2,
|
||||
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.
|
||||
10. X11 (`docs/Disaggregated/notes/anland/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.
|
||||
10. X11 (`docs/archive/notes/anland/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)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# x11-verify.sh <step> [...] - device verification of X11 on the GPU (docs/Disaggregated/notes/anland/
|
||||
# x11-verify.sh <step> [...] - device verification of X11 on the GPU (docs/archive/notes/anland/
|
||||
# plan-x11-gpu.md): Xwayland drawing with glamor on MobileGL, and GLX windows presented through
|
||||
# DRI3 + Present from shared images. Steps, in the order a full run takes them:
|
||||
#
|
||||
|
||||
@@ -1821,7 +1821,7 @@ jobs:
|
||||
MOBILEGL_IPC_STRICT_ERRORS: "1"
|
||||
run: ctest --output-on-failure -L unit --no-tests=error -j "$(nproc)" --output-junit "${RUNNER_TEMP}/unit-strict.xml"
|
||||
|
||||
# ---- P5e (ra), MG_Remote/CONTRACT-P5E.md §7: ONE STEP, TWO ARMS, AND THE TREE PICKS ----
|
||||
# ---- P5e (ra), docs/archive/contracts/CONTRACT-P5E.md §7: ONE STEP, TWO ARMS, AND THE TREE PICKS ----
|
||||
#
|
||||
# This lane was written as an EXPECTED-RED control: under strict every integration-split
|
||||
# entry aborts on its first BARRIER-PULLED read, so the step gated on the run failing and
|
||||
|
||||
+3
-3
@@ -600,7 +600,7 @@ if (MOBILEGL_BUILD_DISAGGREGATED AND
|
||||
set(MOBILEGL_BUILD_DISAGGREGATED_INPROC OFF)
|
||||
endif()
|
||||
|
||||
# P13 W5 (notes/p13/W5-DESIGN.md): the record arm is part of every library - the one without
|
||||
# P13 W5 (docs/archive/notes/p13/W5-DESIGN.md): the record arm is part of every library - the one without
|
||||
# MG_Remote (FCL's) runs it too. Its temporary guard, MOBILEGL_BUILD_RECORD_ARM, was folded away at
|
||||
# S8 (scripts/ci/retired_switches.py keeps it from coming back).
|
||||
|
||||
@@ -712,7 +712,7 @@ if (MOBILEGL_BUILD_DISAGGREGATED)
|
||||
# P11 B2: T0's Offers on the aux socket, matched to their map_persistent records by seq.
|
||||
MobileGL/MG_Remote/Server/AdoptInbox.cpp
|
||||
# Shared images: server-allocated AHardwareBuffers exported to clients as dma-buf descriptors
|
||||
# (docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md).
|
||||
# (docs/archive/notes/anland/plan-ahb-dmabuf.md).
|
||||
MobileGL/MG_Remote/Server/SharedImageRegistry.cpp
|
||||
MobileGL/MG_Remote/Server/ServerSpawn.cpp
|
||||
# P5f fc: the value frame that replaced the control mailbox's function-pointer payload,
|
||||
@@ -1009,7 +1009,7 @@ if (UNIX AND NOT APPLE)
|
||||
endif()
|
||||
|
||||
# ---- Shared images outside GL: the C ABI and the GBM backend (Linux client, split builds) ----
|
||||
# docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md. libMobileGL.so exports the shared-image C ABI
|
||||
# docs/archive/notes/anland/plan-ahb-dmabuf.md. libMobileGL.so exports the shared-image C ABI
|
||||
# (MG_Impl/SharedImageApi.h); mobilegl_gbm.so (MG_Gbm/) is a separate GBM loader module that reaches
|
||||
# it through dlsym. Self-contained: nothing outside this block refers to either.
|
||||
if (MOBILEGL_BUILD_DISAGGREGATED AND UNIX AND NOT APPLE AND NOT ANDROID)
|
||||
|
||||
+3
-3
@@ -657,7 +657,7 @@ namespace MobileGL::MG_Config {
|
||||
// (WireTables.cpp), half of the stream link's 24-entry answer store.
|
||||
// Measurements: docs/Performance/ipc-create-window.md.
|
||||
Uint32 CreateWindow = 10;
|
||||
// MOBILEGL_IPC_PBO_READBACK_SYNC (P9 W1, MG_Remote/CONTRACT-P9.md §1): 1 = a glReadPixels
|
||||
// MOBILEGL_IPC_PBO_READBACK_SYNC (P9 W1, docs/archive/contracts/CONTRACT-P9.md §1): 1 = a glReadPixels
|
||||
// or glGetTexImage into a bound GL_PIXEL_PACK_BUFFER takes the reply-slot form again -
|
||||
// the client waits for the pixels and uploads them into the buffer itself, as before P9.
|
||||
// 0 (default) sends read_pixels_to_buffer / get_texture_image_to_buffer, waits for
|
||||
@@ -665,7 +665,7 @@ namespace MobileGL::MG_Config {
|
||||
// red-once of the wait-count gate (PackBufferReadbackScenario): it must show a reply
|
||||
// wait per read.
|
||||
Uint32 PboReadbackSync = 0;
|
||||
// MOBILEGL_IPC_POLL_ESCALATE (P10, MG_Remote/CONTRACT-P10.md §1): a glClientWaitSync with a
|
||||
// MOBILEGL_IPC_POLL_ESCALATE (P10, docs/archive/contracts/CONTRACT-P10.md §1): a glClientWaitSync with a
|
||||
// zero timeout or a glGetSynciv(GL_SYNC_STATUS) is answered by the client from what the
|
||||
// server reported (kEventFenceSignaled) - "signaled" when it has been, "not yet" otherwise
|
||||
// - and only the Nth "not yet" in a row on one fence crosses as a real round trip, so a
|
||||
@@ -697,7 +697,7 @@ namespace MobileGL::MG_Config {
|
||||
// GLContext by the client's residual fill and a free-running queue lets the server
|
||||
// read a FUTURE value of them.
|
||||
Uint32 VerbBarrier = 1;
|
||||
// MOBILEGL_IPC_RUN_AHEAD (P5e, MG_Remote/CONTRACT-P5E.md §1): 1 = after publishing an
|
||||
// MOBILEGL_IPC_RUN_AHEAD (P5e, docs/archive/contracts/CONTRACT-P5E.md §1): 1 = after publishing an
|
||||
// UNBARRIERED record the client returns immediately instead of waiting for its apply.
|
||||
// It is one half of a conjunction and never a switch on its own - the client arms
|
||||
// run-ahead only when the server also publishes kCapRunAheadApply, so on Magma, and on
|
||||
|
||||
@@ -616,7 +616,7 @@ namespace MobileGL::MG_ConfigLoader {
|
||||
// P11 B2: the server's own T0 allow switch (Config.h).
|
||||
ipc.AllowAdoptT0 = QueryEnvUint32("MOBILEGL_IPC_ALLOW_ADOPT_T0", 1, 0, 1);
|
||||
ipc.VerbBarrier = QueryEnvUint32("MOBILEGL_IPC_VERB_BARRIER", 1, 0, 1);
|
||||
// P5e (MG_Remote/CONTRACT-P5E.md §1). The wait rule's A/B, parsed here like every
|
||||
// P5e (docs/archive/contracts/CONTRACT-P5E.md §1). The wait rule's A/B, parsed here like every
|
||||
// other IPC knob and armed only where the server publishes kCapRunAheadApply.
|
||||
ipc.RunAhead = QueryEnvUint32("MOBILEGL_IPC_RUN_AHEAD", 1, 0, 1);
|
||||
// ... and forced OFF by the verify harness for BatchWaits' reason, one step further:
|
||||
|
||||
@@ -656,7 +656,7 @@ namespace MobileGL {
|
||||
Uint32 Height = 0;
|
||||
};
|
||||
|
||||
// SHARED IMAGES (docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md): server-allocated colour
|
||||
// SHARED IMAGES (docs/archive/notes/anland/plan-ahb-dmabuf.md): server-allocated colour
|
||||
// buffers exported to clients as dma-buf descriptors.
|
||||
//
|
||||
// The server-side view of one image, as a backend sees it: `NativeBuffer` is the image's
|
||||
@@ -756,7 +756,7 @@ namespace MobileGL {
|
||||
(void)region;
|
||||
return true;
|
||||
}
|
||||
// IMPLICIT SYNC BY FLUSH (docs/Disaggregated/notes/anland/plan-x11-gpu.md): the session
|
||||
// IMPLICIT SYNC BY FLUSH (docs/archive/notes/anland/plan-x11-gpu.md): the session
|
||||
// on this (the apply) thread ends a frame at a glFlush. Every shared image it used since
|
||||
// its last boundary is published as written and read by one fence of everything it
|
||||
// submitted (SharedImages::ReadTracker::PublishFrameAsWrite), and from now on its first
|
||||
|
||||
@@ -10391,7 +10391,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
// format, not only the redundant-encoding ones this mirror serves, and marks the store
|
||||
// driver-written where it cannot. The store is what answers a split glGetTexImage the
|
||||
// driver refuses to read back (WireTextureReadback.inc's store route); every other split
|
||||
// read of the destination reads the GPU level itself (notes/p8/E.md).
|
||||
// read of the destination reads the GPU level itself (docs/archive/notes/p8/E.md).
|
||||
//
|
||||
// BEHIND #if MOBILEGL_BUILD_DISAGGREGATED so the pull build's code does not move (G1),
|
||||
// and the arm is the TRANSPORT and not the build - build-split runs its unit and
|
||||
@@ -10425,7 +10425,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
MGLOG_E_ONCE("%s: source or destination image failed to sync; declining the copy", __func__);
|
||||
return;
|
||||
}
|
||||
// P8-E (notes/p8/E.md): THE SERVER'S STAGED STORE FOLLOWS THE COPY. Both endpoints are synced,
|
||||
// P8-E (docs/archive/notes/p8/E.md): THE SERVER'S STAGED STORE FOLLOWS THE COPY. Both endpoints are synced,
|
||||
// so every byte the store holds for them is on the driver, and the copy below is a raw
|
||||
// texel-block move - the store makes the same move, which keeps the destination level
|
||||
// answerable from here when the driver will not read it back (ReadTextureImageWire's store
|
||||
@@ -12668,7 +12668,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
// server process has no frontend at all, so pDefaultFramebufferInfo is null there. Gating on
|
||||
// it returned before the post, the client kept Init.cpp's GL_DEPTH32F_STENCIL8 guess for a
|
||||
// D24S8 pbuffer, and a blit into a buffer allocated from that guess lost depth and stencil
|
||||
// (notes/p8/SE.md). Inproc only passed because client and server share the process.
|
||||
// (docs/archive/notes/p8/SE.md). Inproc only passed because client and server share the process.
|
||||
if (!g_GLESFuncs.glGetFramebufferAttachmentParameteriv) return;
|
||||
if (!defaultFBOInfo && MG_Pipe::gMGPipeCallbacks.OnSurfaceChanged == nullptr) return;
|
||||
|
||||
@@ -14659,7 +14659,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
}
|
||||
|
||||
#if MOBILEGL_BUILD_DISAGGREGATED
|
||||
// ---- SHARED IMAGES (DirectGLES.h; docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md) ------
|
||||
// ---- SHARED IMAGES (DirectGLES.h; docs/archive/notes/anland/plan-ahb-dmabuf.md) ------
|
||||
namespace SharedImageImpl {
|
||||
#if defined(__ANDROID__)
|
||||
namespace {
|
||||
|
||||
@@ -515,7 +515,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
} // namespace RenderStateImpl
|
||||
|
||||
#if MOBILEGL_BUILD_DISAGGREGATED
|
||||
// ---- SHARED IMAGES (docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md) ----
|
||||
// ---- SHARED IMAGES (docs/archive/notes/anland/plan-ahb-dmabuf.md) ----
|
||||
//
|
||||
// A shared image reaches the driver only through the Android import path: its AHardwareBuffer
|
||||
// becomes an EGLImage (EGL_ANDROID_get_native_client_buffer + EGL_ANDROID_image_native_buffer)
|
||||
|
||||
@@ -2720,7 +2720,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
const Uint16 uploadTarget = MG_Pipe::MGPipeSubDataUploadTargetOf(record.Target);
|
||||
const IntVec3 extent = MG_Record::StagedTextureUploadExtent(stored->Desc, record);
|
||||
const SizeT runBytes = static_cast<SizeT>(record.Blob.Size);
|
||||
// P8-E (notes/p8/E.md): THE LEVEL HOLDS A COPY THE CLIENT NEVER SAW
|
||||
// P8-E (docs/archive/notes/p8/E.md): THE LEVEL HOLDS A COPY THE CLIENT NEVER SAW
|
||||
// (FollowCopyImageInStagedStore). The run is the client's shadow, stale everywhere it
|
||||
// did not write, so only the texels it names land - its regions, or its union box
|
||||
// when it carries none (D-D3's "the box is the whole story"). A run the store cannot
|
||||
@@ -5769,7 +5769,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
m_forceTextureParamsResync = true;
|
||||
return;
|
||||
}
|
||||
// P9 W2 (notes/p9/W2-REMINT.md): EVERY BYTE THIS RE-MINT REPLAYS IS ALREADY ON THE
|
||||
// P9 W2 (docs/archive/notes/p9/W2-REMINT.md): EVERY BYTE THIS RE-MINT REPLAYS IS ALREADY ON THE
|
||||
// SERVER. The GPU image holds what the GPU wrote (render targets, clears, copies,
|
||||
// generated mips, image stores) and the staged store holds what the client uploaded;
|
||||
// the client is never asked, so no pull protocol exists. Reading only the store would
|
||||
@@ -7174,7 +7174,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
: (obj)->GetStorageType())
|
||||
|
||||
#if MOBILEGL_BUILD_DISAGGREGATED
|
||||
// SHARED IMAGES (docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md). The client defined
|
||||
// SHARED IMAGES (docs/archive/notes/anland/plan-ahb-dmabuf.md). The client defined
|
||||
// level 0 as WxH RGBA8 with no data and then attached the image; the record's descriptor
|
||||
// still says so, but the texels are the image's, so nothing below may allocate or upload.
|
||||
Bool BackendTextureObject::SyncSharedImageStorage(const MG_Pipe::MGPipeResourceRecord& record) {
|
||||
@@ -14009,7 +14009,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
|
||||
// =====================================================================================
|
||||
// P5e SEAMS: DECLARED AND REFUSED HERE, BODIED BY THE FAMILY PACKAGES
|
||||
// (MG_Remote/CONTRACT-P5E.md §4.2; BRIEF-P5E §1's "each such seam is a declared signature
|
||||
// (docs/archive/contracts/CONTRACT-P5E.md §4.2; BRIEF-P5E §1's "each such seam is a declared signature
|
||||
// in c0e so both sides compile from day one")
|
||||
// =====================================================================================
|
||||
//
|
||||
|
||||
@@ -1557,7 +1557,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
// applier stored, so the answer is the same whichever side resolved it first.
|
||||
Bool BackendUsesNativeBaseInstance();
|
||||
|
||||
// ---- P5e SEAM (MG_Remote/CONTRACT-P5E.md §4.2; declared by c0e, bodied by id/vi) ----
|
||||
// ---- P5e SEAM (docs/archive/contracts/CONTRACT-P5E.md §4.2; declared by c0e, bodied by id/vi) ----
|
||||
//
|
||||
// THE VAO TWIN, RESOLVED FROM THE HANDLE THE RECORD CARRIED - MGPipeApplierState::
|
||||
// BoundVertexElements - instead of from the frontend VertexArrayObject the draw's
|
||||
@@ -1733,7 +1733,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
// flag, allocator or pixel-store object participates. P9 W2: a level
|
||||
// the driver does not hold (defined after the last sync) is never read
|
||||
// back, and a readback the driver refuses falls back to the staged
|
||||
// level when the store covers it (notes/p9/W2-REMINT.md).
|
||||
// level when the store covers it (docs/archive/notes/p9/W2-REMINT.md).
|
||||
void RequireImageBindableStorageByHandle(MG_Pipe::MGPipeHandle res,
|
||||
const MG_Pipe::MGPipeResourceRecord& record);
|
||||
#if MOBILEGL_BUILD_DISAGGREGATED
|
||||
@@ -2057,7 +2057,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
// table's answer is an array element and only a GetOrCreate that GROWS the table moves
|
||||
// it, which this function has already done by the time it returns.
|
||||
BackendTextureObject* ResolveTextureTwin(MG_Pipe::MGPipeHandle res);
|
||||
// ---- P5e SEAM (MG_Remote/CONTRACT-P5E.md §4.2, §5.2; declared by c0e, bodied by
|
||||
// ---- P5e SEAM (docs/archive/contracts/CONTRACT-P5E.md §4.2, §5.2; declared by c0e, bodied by
|
||||
// id/tx2) --------------------------------------------------------------------------
|
||||
//
|
||||
// EVERY DRAW-PATH TEXTURE ENTRY, BY HANDLE. The caller holds a Texture handle - a
|
||||
@@ -2084,7 +2084,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
// glCopyImageSubData passes: it tries FollowCopyImageInStagedStore first and marks the store
|
||||
// itself when that fails.
|
||||
void NoteDriverSideTextureWriteByHandle(MG_Pipe::MGPipeHandle texture, Bool storeFollowsTheWrite = false);
|
||||
// P8-E (notes/p8/E.md): make glCopyImageSubData's texel-block move in the server's staged
|
||||
// P8-E (docs/archive/notes/p8/E.md): make glCopyImageSubData's texel-block move in the server's staged
|
||||
// store too (StagedTextureStore::FollowCopy), so the destination level's bytes stay its
|
||||
// content. Box in each image's own texel grid. False when the store cannot follow: a cube
|
||||
// map or 1D array endpoint (copy-image puts faces / layers on z, the store does not), a view,
|
||||
@@ -2143,7 +2143,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
~BackendFramebufferObject();
|
||||
BackendFramebufferObject(const BackendFramebufferObject&) = delete;
|
||||
BackendFramebufferObject& operator=(const BackendFramebufferObject&) = delete;
|
||||
// P5e SEAM (MG_Remote/CONTRACT-P5E.md §5.4; declared by c0e, bodied by fb): the same
|
||||
// P5e SEAM (docs/archive/contracts/CONTRACT-P5E.md §5.4; declared by c0e, bodied by fb): the same
|
||||
// sync keyed on the framebuffer HANDLE. The record's eleven surfaces ARE the point
|
||||
// set - the emitter refuses a point at or above the wire width - so the attachment
|
||||
// walk needs no frontend FramebufferObject and no m_pushedSyncHandle handshake: the
|
||||
@@ -3143,7 +3143,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
};
|
||||
ImageFormatBakeInputs CollectImageFormatBakeInputs(const ProgramBuildSource& src);
|
||||
|
||||
// ---- P5e SEAM (MG_Remote/CONTRACT-P5E.md §4.2, §5.5; declared by c0e, bodied by
|
||||
// ---- P5e SEAM (docs/archive/contracts/CONTRACT-P5E.md §4.2, §5.5; declared by c0e, bodied by
|
||||
// id/pg) ---------------------------------------------------------------------------
|
||||
//
|
||||
// THE PROGRAM TWIN, RESOLVED FROM MGPipeApplierState::DrawProgram / DispatchProgram /
|
||||
|
||||
@@ -327,7 +327,7 @@
|
||||
return width == extent.x() && height == extent.y() && (!layered || depth == extent.z());
|
||||
}
|
||||
|
||||
// P8-E (notes/p8/E.md). MGITEST_ESPRYT_REFUSE_TEXTURE_READBACK_EXTENT=<w>x<h>, READ BY THE SERVER:
|
||||
// P8-E (docs/archive/notes/p8/E.md). MGITEST_ESPRYT_REFUSE_TEXTURE_READBACK_EXTENT=<w>x<h>, READ BY THE SERVER:
|
||||
// a colour level of exactly that extent is treated as one the driver refused to attach - what an
|
||||
// Adreno does for RGB16 and the 16-bit SNORM formats, and what no host driver can be made to do.
|
||||
// Scoped by the extent so the tcp lane's shared supervisor can carry it for the whole lane: only
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
||||
// (MG_Remote::Client::EmitObjectDeathRecord, CONTRACT-P5C §5.2).
|
||||
//
|
||||
// WHY THAT MATTERS, measured rather than argued (package L's probe,
|
||||
// notes/p7/magma-two-process-first-run.md §6): under SPAWN the client process has no
|
||||
// docs/archive/notes/p7/magma-two-process-first-run.md §6): under SPAWN the client process has no
|
||||
// DirectVulkan backend at all, so InstallClientWireTables' own emitter already
|
||||
// answered the notice and CtWireScenario's two death cases PASSED. Under INPROC the
|
||||
// server role's backend is a thread of this process, Transport is Split rather than
|
||||
@@ -247,7 +247,7 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
||||
// SPIRV-Reflect rebuild and `ClearProgramResourceCaches`, verbatim; only this build drops
|
||||
// them - and with them the rehash hazard the ordering comment below the block-binding
|
||||
// setter documents. Retiring the pull half is the day the member stops needing its guard,
|
||||
// which is a G1/P13 decision and not a wave-2 one; recorded in notes/p7/magma-c.md.
|
||||
// which is a G1/P13 decision and not a wave-2 one; recorded in docs/archive/notes/p7/magma-c.md.
|
||||
void ClearProgramResourceCaches() {
|
||||
// Nothing to clear: there is no cache in this build. Kept as an entry point so
|
||||
// BackendObject_DirectVulkan's two EGL-teardown call sites stay statement for
|
||||
|
||||
@@ -811,7 +811,7 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
||||
// is not the answer either: the transient arena carries no
|
||||
// {UNIFORM,STORAGE}_TEXEL_BUFFER usage (VkBufferManager::InitializeTransientArenas),
|
||||
// so no VkBufferView can be made over it, and widening a shared per-frame
|
||||
// allocation to buy an unreachable path is the wrong trade. See notes/p7/magma-a.md.
|
||||
// allocation to buy an unreachable path is the wrong trade. See docs/archive/notes/p7/magma-a.md.
|
||||
return writable ? false : placeholder();
|
||||
}
|
||||
VkBufferViewCreateInfo viewInfo{VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO};
|
||||
@@ -942,7 +942,7 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
||||
// record that is the draw/dispatch tail in VulkanRenderer.cpp / WireDraw.inc,
|
||||
// which belong to wave-2 packages B and C, not to this file. Losing the
|
||||
// dispatch with a named line in the role log beats returning stale counters
|
||||
// with no error at all. notes/p7/magma-a.md carries the recipe.
|
||||
// with no error at all. docs/archive/notes/p7/magma-a.md carries the recipe.
|
||||
MGLOG_E_ONCE("ResolveStorageBufferDescriptor: block '%s' is bound at offset %llu, which is not a "
|
||||
"multiple of this device's minStorageBufferOffsetAlignment (%llu); %s ranges cannot be "
|
||||
"expressed as a descriptor and the shader's writes would be dropped by a read-only "
|
||||
@@ -1114,7 +1114,7 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
||||
// GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, and that is a multiple of four on every
|
||||
// device - but GL 4.6 core 6.1.1 puts no such rule on the SIZE, so `copied` is free
|
||||
// to end mid-word and the Redmi Minecraft run lands there
|
||||
// (notes/p5f/magma-inproc-fix.md #5). An unaligned start is not reachable through
|
||||
// (docs/archive/notes/p5f/magma-inproc-fix.md #5). An unaligned start is not reachable through
|
||||
// the public API and only a protocol-level offset can produce one; the sub-word arm
|
||||
// handles it anyway rather than leaving a second shape to trip over later. Both arms
|
||||
// copy the same bytes to the same place: the sub-word one pays one extra transient
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
||||
// attribute whose base offsets cannot be added is one Vulkan cannot fetch, the
|
||||
// monolith arm never computes that sum at all, and masking is strictly safer than
|
||||
// a Fatal for a number no application can reach on purpose. Recorded in
|
||||
// notes/p7/magma-c.md rather than silently reconciled.
|
||||
// docs/archive/notes/p7/magma-c.md rather than silently reconciled.
|
||||
const auto describe = [&](const char* reason, VkFormat format) {
|
||||
MGLOG_E_ONCE("Magma wire vertex layout: %s location=%u type=%u size=%u normalized=%u integer=%u long=%u bgra=%u stride=%d offset=%llu format=%d bufferWindow=%u+%u activeMask=0x%x",
|
||||
reason, location, attr.Type, static_cast<Uint32>(attr.Size), static_cast<Uint32>(attr.Normalized),
|
||||
|
||||
@@ -593,7 +593,7 @@ public:
|
||||
void MarkWireTextureGpuWritten(MG_Pipe::MGPipeHandle handle, Uint32 mipLevel,
|
||||
Uint32 baseArrayLayer = 0, Uint32 layerCount = 1);
|
||||
|
||||
// SHARED IMAGES (docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md): a server shared image's
|
||||
// SHARED IMAGES (docs/archive/notes/anland/plan-ahb-dmabuf.md): a server shared image's
|
||||
// AHardwareBuffer bound as a single-level 2D colour image on THIS session's device, on dedicated
|
||||
// memory imported from the buffer. Android only (false with `why` elsewhere, or when the device
|
||||
// did not take the AHardwareBuffer extension). The image is born UNDEFINED; whoever uses it
|
||||
|
||||
@@ -664,7 +664,7 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
||||
// and the default draw framebuffer alike. The CAPABILITY decline inside
|
||||
// ResolveWireDepthStencil (a stencil-only resolve without VK_EXT_shader_stencil_export
|
||||
// on a device without VK_KHR_depth_stencil_resolve) is still decided per aspect, after
|
||||
// colour ran; rule I (a) accepts that (notes/p7/magma-b2.md §2.10).
|
||||
// colour ran; rule I (a) accepts that (docs/archive/notes/p7/magma-b2.md §2.10).
|
||||
Bool DeclineWireDepthStencilResolveShape(const WireImage& source, const WireImage& destination,
|
||||
GLint sx0, GLint sy0, GLint sx1, GLint sy1,
|
||||
GLint dx0, GLint dy0, GLint dx1, GLint dy1);
|
||||
|
||||
@@ -884,7 +884,7 @@
|
||||
// (BlitDepthAcrossFormats, shared with the monolith arm) has no flip either. Both
|
||||
// decline by name, each under its OWN once-site (review round 2: one site covered both,
|
||||
// so after the first X decline a cross-format Y decline logged nothing); §6 in
|
||||
// notes/p7/magma-b2.md carries them. These are declines of a LEGAL blit - GL would
|
||||
// docs/archive/notes/p7/magma-b2.md carries them. These are declines of a LEGAL blit - GL would
|
||||
// raise no error here - so the INVALID_OPERATION is rule I (a)'s named refusal, not
|
||||
// GL's answer.
|
||||
const Bool mirrorX = (spanX < 0) != (dstSpanX < 0);
|
||||
@@ -1159,7 +1159,7 @@
|
||||
// so a shader decline (a stencil aspect without VK_EXT_shader_stencil_export, a format
|
||||
// that is not SAMPLED_IMAGE + DEPTH_STENCIL_ATTACHMENT, a failed pipeline create -
|
||||
// WireMultisampleResolve.inc) that lands on the render pass is the resolve most likely
|
||||
// to read back as zeroes with no GL error. A recorded debt (notes/p7/g5-msrbo.md §4).
|
||||
// to read back as zeroes with no GL error. A recorded debt (docs/archive/notes/p7/g5-msrbo.md §4).
|
||||
if (resolvedByShader) {
|
||||
MGLOG_I_ONCE("DirectVulkan::ResolveWireDepthStencil: resolved by the shader pass "
|
||||
"(prefer-shader=%d, render-pass arm available=%d)",
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-only
|
||||
// End of Source File Header
|
||||
|
||||
// SHARED IMAGES (docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md). Included by VulkanRenderer.cpp
|
||||
// SHARED IMAGES (docs/archive/notes/anland/plan-ahb-dmabuf.md). Included by VulkanRenderer.cpp
|
||||
// inside the backend namespace, after WireFramebuffer.inc, whose readback the present side's copy
|
||||
// is modelled on: the same flush, the same write-visibility barrier, the same transition of the
|
||||
// default framebuffer's image.
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace MobileGL::MG_Backend {
|
||||
// (VkBufferManager::RegisterWireResourceOps, VkBufferManager.cpp): under a transport it
|
||||
// owns buffer stores and claims bit 7 (the P4a mask, see ConsumedSubsystemsFor below);
|
||||
// under monolith it registers none and its buffers keep the legacy BufferBackendOps path.
|
||||
// P5e (MG_Remote/CONTRACT-P5E.md §6.2). THE ONE CONSTANT THE WHOLE PHASE HANGS ON.
|
||||
// P5e (docs/archive/contracts/CONTRACT-P5E.md §6.2). THE ONE CONSTANT THE WHOLE PHASE HANGS ON.
|
||||
//
|
||||
// kCapRunAheadApply says "this server applies an unbarriered record without reading
|
||||
// client memory". That is only true once EVERY per-draw family reads records instead
|
||||
|
||||
@@ -309,7 +309,7 @@ namespace MobileGL::MG_Record {
|
||||
return false;
|
||||
}
|
||||
|
||||
// ---- P9 (W1, MG_Remote/CONTRACT-P9.md §1): the pack-buffer readbacks ------------------------
|
||||
// ---- P9 (W1, docs/archive/contracts/CONTRACT-P9.md §1): the pack-buffer readbacks ------------------------
|
||||
//
|
||||
// WHY THE ROWS GO THROUGH THE APPLIER'S BUFFER-WRITE GATE AND NOT THROUGH THE DRIVER'S OWN
|
||||
// PBO READ. Monolith binds the driver buffer as GL_PIXEL_PACK_BUFFER and lets glReadPixels
|
||||
@@ -503,7 +503,7 @@ namespace MobileGL::MG_Record {
|
||||
slot);
|
||||
}
|
||||
|
||||
// P5b d1 (MG_Remote/CONTRACT-P5B.md §2 d1): draw_vbo's whole cross product. The record
|
||||
// P5b d1 (docs/archive/contracts/CONTRACT-P5B.md §2 d1): draw_vbo's whole cross product. The record
|
||||
// carries the GL call verbatim (rule D) and this body reproduces the backend call the
|
||||
// monolith makes for that shape, reading only the record and the backend's own
|
||||
// barrier-pulled state; the twenty GL entry points collapse onto the arms below:
|
||||
@@ -812,7 +812,7 @@ namespace MobileGL::MG_Record {
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// P5b: the stubs the four migration packages replace (MG_Remote/CONTRACT-P5B.md).
|
||||
// P5b: the stubs the four migration packages replace (docs/archive/contracts/CONTRACT-P5B.md).
|
||||
//
|
||||
// Each dies by the GL slot's own name. The record has crossed and been validated by the
|
||||
// codec by the time one of these runs, so the only thing missing is the backend call, and
|
||||
@@ -821,7 +821,7 @@ namespace MobileGL::MG_Record {
|
||||
// in the same words), the call, and a tally the lane can assert moved.
|
||||
// -----------------------------------------------------------------------------------
|
||||
|
||||
// ---- i1 ---- (MG_Remote/CONTRACT-P5B.md §2 i1; landed by package p5b/i1)
|
||||
// ---- i1 ---- (docs/archive/contracts/CONTRACT-P5B.md §2 i1; landed by package p5b/i1)
|
||||
//
|
||||
// RULE D IN FIVE BODIES. Each reproduces the backend call the monolith makes, from the
|
||||
// record and from server state, and NOTHING ELSE: the backend goes on reading the frontend
|
||||
@@ -973,7 +973,7 @@ namespace MobileGL::MG_Record {
|
||||
return true;
|
||||
}
|
||||
|
||||
// ---- t2 ---- (MG_Remote/CONTRACT-P5B.md §2 t2)
|
||||
// ---- t2 ---- (docs/archive/contracts/CONTRACT-P5B.md §2 t2)
|
||||
//
|
||||
// SIX BODIES, SIX BACKEND CALLS, NO STATE OF THEIR OWN. Rule D: the record IS the call, and
|
||||
// everything the backend reads around it - the capture program, the capture-buffer
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace MobileGL::MG_Record {
|
||||
const MG_Pipe::MGHostSpan* userIndices,
|
||||
const MG_Pipe::MGPDrawIndirect* indirect) override;
|
||||
|
||||
// ---- P5b (MG_Remote/CONTRACT-P5B.md): one override per row a migration package owns.
|
||||
// ---- P5b (docs/archive/contracts/CONTRACT-P5B.md): one override per row a migration package owns.
|
||||
// At the contract commit EVERY BODY BELOW IS A STUB that dies
|
||||
// Fatal{UnmigratedVerb, "<GL slot>"} by the slot's own name - the same line the client's
|
||||
// class-C table raises and the census greps - so a client flipped ahead of its server
|
||||
|
||||
@@ -524,7 +524,7 @@ namespace MobileGL::MG_Record {
|
||||
EraseSession(m_driverWritten, session);
|
||||
}
|
||||
|
||||
// ---- P8-E (docs/Disaggregated/notes/p8/E.md): WHEN THESE BYTES ARE THE LEVEL'S CONTENT ----
|
||||
// ---- P8-E (docs/archive/notes/p8/E.md): WHEN THESE BYTES ARE THE LEVEL'S CONTENT ----
|
||||
//
|
||||
// The store holds what the client uploaded. It is also the only CPU copy of a level the
|
||||
// server has, so a readback the driver refuses (a format the ES driver will not attach -
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
// mobilegl_gbm.so: a GBM backend (the loader's backend ABI, gbm_backend_abi.h) whose buffer
|
||||
// objects are MobileGL shared images - colour buffers the MobileGL server allocates and exports
|
||||
// as dma-bufs (docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md). Selected with
|
||||
// as dma-bufs (docs/archive/notes/anland/plan-ahb-dmabuf.md). Selected with
|
||||
// GBM_BACKEND=mobilegl; the loader then finds <dir>/mobilegl_gbm.so on its backend path.
|
||||
//
|
||||
// THE DEVICE DESCRIPTOR IS OPAQUE. The fd a gbm_device is created on is only the identity the
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// WHEN glFlush IS A SHARED-IMAGE BOUNDARY (docs/Disaggregated/notes/anland/plan-x11-gpu.md).
|
||||
// WHEN glFlush IS A SHARED-IMAGE BOUNDARY (docs/archive/notes/anland/plan-x11-gpu.md).
|
||||
//
|
||||
// A dma-buf producer that renders into its buffers and hands them on after a glFlush (an X
|
||||
// server's glamor committing a window pixmap) relies on implicit sync: whoever samples the buffer
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
// call sites below are declarations only, exactly as the frontend's mutators are.
|
||||
#include <MG_Pipe/PipeMutation.h>
|
||||
|
||||
// P9 (W1, MG_Remote/CONTRACT-P9.md §1): AN UNPACK SOURCE IS READ FROM THE BUFFER'S CLIENT SHADOW,
|
||||
// P9 (W1, docs/archive/contracts/CONTRACT-P9.md §1): AN UNPACK SOURCE IS READ FROM THE BUFFER'S CLIENT SHADOW,
|
||||
// and under a transport a GPU write into that buffer - a read_pixels_to_buffer, which is how a
|
||||
// glReadPixels into a pack buffer now crosses, or a shader store - reaches the shadow only through
|
||||
// SyncGpuWrites, exactly as glMapBufferRange and glGetBufferSubData already do. Monolith keeps its
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// GLX WINDOWS PRESENTED THROUGH DRI3 + PRESENT (docs/Disaggregated/notes/anland/plan-x11-gpu.md).
|
||||
// GLX WINDOWS PRESENTED THROUGH DRI3 + PRESENT (docs/archive/notes/anland/plan-x11-gpu.md).
|
||||
//
|
||||
// A GLX window's frames are drawn by the server into a pbuffer. Instead of reading each frame back
|
||||
// and putting it on the window, the frame is copied GPU-side into one of a few server-allocated
|
||||
|
||||
@@ -2407,7 +2407,7 @@ namespace MobileGL::MG_Pipe {
|
||||
// emission gate is the subsystem bit plus the whole-record hash and nothing else.
|
||||
case MGPipeFieldEmitter::SetContextValues:
|
||||
return kMGPipeSubsystemResidualValues;
|
||||
// P5e's one emitted row (MG_Remote/CONTRACT-P5E.md §5.6): the indexed buffer
|
||||
// P5e's one emitted row (docs/archive/contracts/CONTRACT-P5E.md §5.6): the indexed buffer
|
||||
// binding points. Written HERE at the contract commit, with the Coverage.def row
|
||||
// and EmittedCallSuppliesTheWholeField's arm beside it, for the reason
|
||||
// kMGPipeWiredSubsystems' block states one paragraph down - this file belongs to
|
||||
@@ -2484,7 +2484,7 @@ namespace MobileGL::MG_Pipe {
|
||||
MG_State::GLState::VertexArrayObject::MAX_VERTEX_ATTRIBS,
|
||||
"the MGPipe vertex-attribute capacity and the frontend's have drifted");
|
||||
|
||||
// P5e (MG_Remote/CONTRACT-P5E.md §1, ruling 10), pinned here for the same reason and in
|
||||
// P5e (docs/archive/contracts/CONTRACT-P5E.md §1, ruling 10), pinned here for the same reason and in
|
||||
// the same place: this translation unit sees the frontend constant and the MG_Pipe one,
|
||||
// and nothing else does. 84 is what the emitter may describe and what the wire carries;
|
||||
// the BACKEND clamps to the device's real GL_MAX_UNIFORM_BUFFER_BINDINGS, as it does
|
||||
|
||||
@@ -135,7 +135,7 @@ namespace MobileGL::MG_Pipe {
|
||||
// published ahead of it are wiped by the create that follows. What the draft was
|
||||
// protecting - "a rebuild inside the verb must already see the bindings" - is
|
||||
// satisfied by both records going out at the SAME validate point, ahead of the verb,
|
||||
// which is what this ordering does. See MG_Remote/CONTRACT-P5E.md §5.5 and the
|
||||
// which is what this ordering does. See docs/archive/contracts/CONTRACT-P5E.md §5.5 and the
|
||||
// record's own comment in PipeApply.h.
|
||||
if (drawProgram) bytes += EmitProgramBindings(*drawProgram, drawCso);
|
||||
// THE COMPOSITE'S SECOND RELEASE PATH is spoken here, not in a destructor: when the
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace MobileGL::MG_Pipe {
|
||||
SetSamplerViews, // P4a - wired (backend debounce deletion: P3b/P4b)
|
||||
BindSamplerStates, // P4a - wired (backend debounce deletion: P3b/P4b)
|
||||
SetShaderImages, // P4a - wired (backend debounce deletion: P3b/P4b)
|
||||
// P5e (MG_Remote/CONTRACT-P5E.md §1, ruling 11): THREE SLOTS, ONE PER CLASS, not one
|
||||
// P5e (docs/archive/contracts/CONTRACT-P5E.md §1, ruling 11): THREE SLOTS, ONE PER CLASS, not one
|
||||
// for the call. set_shader_buffers is emitted per Class (Uniform / ShaderStorage /
|
||||
// AtomicCounter) because the record's own Class field says which binding-point array
|
||||
// it describes - so a single slot would make every emission of one class cancel the
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <Includes.h>
|
||||
|
||||
// The CLIENT side of set_shader_buffers - the INDEXED BUFFER BINDING POINTS (P5e package sb,
|
||||
// MG_Remote/CONTRACT-P5E.md §5.6, rulings 10 and 11). The call has been in the catalogue since
|
||||
// docs/archive/contracts/CONTRACT-P5E.md §5.6, rulings 10 and 11). The call has been in the catalogue since
|
||||
// P4a with no emitter, no route and no applier; this file is the emitter half.
|
||||
//
|
||||
// ONE RECORD PER CLASS, THREE CLASSES. MGPShaderBuffers::Class names which binding-point array
|
||||
|
||||
@@ -210,7 +210,7 @@ namespace MobileGL::MG_Pipe {
|
||||
case MGPipeDirty::NewSamplers:
|
||||
case MGPipeDirty::NewShaderImages:
|
||||
return kMGPipeSubsystemSamplers;
|
||||
// P5e's three, one subsystem (MG_Remote/CONTRACT-P5E.md §1): the indexed buffer
|
||||
// P5e's three, one subsystem (docs/archive/contracts/CONTRACT-P5E.md §1): the indexed buffer
|
||||
// binding points. Bits 15/16/17 have been computed and counted since P2 and have named
|
||||
// no subsystem since - "the remaining bits have no call of their own until P4b", which
|
||||
// the default arm below used to say for them. set_shader_buffers is the call, and
|
||||
@@ -690,7 +690,7 @@ namespace MobileGL::MG_Pipe {
|
||||
now[Index(MGPipeDirty::NewShaderImages)] = MGPipeMixShutter(
|
||||
MGPipeMixShutter(MGPipeMixShutter(textureContent, textureParams), programImages),
|
||||
ctx.GetTextureBindGeneration());
|
||||
// ---- bits 15/16/17, REWRITTEN AT P5e (sb, MG_Remote/CONTRACT-P5E.md §5.6) ----
|
||||
// ---- bits 15/16/17, REWRITTEN AT P5e (sb, docs/archive/contracts/CONTRACT-P5E.md §5.6) ----
|
||||
//
|
||||
// ALL THREE USED TO READ `buffers` - the buffer CONTENT aggregate - AND THAT WAS
|
||||
// WRONG IN BOTH DIRECTIONS AT ONCE. Over: any glBufferSubData anywhere fired all
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
"Pixel packing exceeds the destination or its addressable range."));
|
||||
}
|
||||
|
||||
// P9 (W1, MG_Remote/CONTRACT-P9.md §1): MAY A READ INTO THIS PACK BUFFER GO WITHOUT A
|
||||
// P9 (W1, docs/archive/contracts/CONTRACT-P9.md §1): MAY A READ INTO THIS PACK BUFFER GO WITHOUT A
|
||||
// REPLY? The answer is the buffer's handle when it may - the read then crosses as
|
||||
// read_pixels_to_buffer / get_texture_image_to_buffer, lands server-side, and the buffer
|
||||
// is marked GPU-written - and the null handle when the reply-slot form has to carry it.
|
||||
|
||||
@@ -593,7 +593,7 @@ namespace MobileGL::MG_Record {
|
||||
|
||||
// =============================================================================
|
||||
// P5b d1 - the nineteen indexed / instanced / multi-draw / indirect draw slots
|
||||
// (MG_Remote/CONTRACT-P5B.md §2 d1). ONE ROW, draw_vbo (59): the record carries the GL
|
||||
// (docs/archive/contracts/CONTRACT-P5B.md §2 d1). ONE ROW, draw_vbo (59): the record carries the GL
|
||||
// call verbatim (rule D) beside the handle the P8 form will dispatch on, and the sink
|
||||
// reproduces the backend call the monolith makes.
|
||||
// =============================================================================
|
||||
@@ -1286,7 +1286,7 @@ namespace MobileGL::MG_Record {
|
||||
|
||||
// =============================================================================
|
||||
// CLASS B - P5b package i1: image bind, compute, barriers, copy-image, SSBO block
|
||||
// (MG_Remote/CONTRACT-P5B.md §2 i1). Seven slots, five wire rows.
|
||||
// (docs/archive/contracts/CONTRACT-P5B.md §2 i1). Seven slots, five wire rows.
|
||||
// =============================================================================
|
||||
//
|
||||
// RULE D, WHICH IS WHY THESE ARE SHORT. A P5b verb crosses AS THE CALL: the record
|
||||
@@ -1513,7 +1513,7 @@ namespace MobileGL::MG_Record {
|
||||
}
|
||||
|
||||
// CLASS B - P5b package t2: the transform-feedback spans, the XFB object bind and the
|
||||
// tessellation patch parameter (MG_Remote/CONTRACT-P5B.md §2 t2).
|
||||
// tessellation patch parameter (docs/archive/contracts/CONTRACT-P5B.md §2 t2).
|
||||
// =============================================================================
|
||||
//
|
||||
// SIX SLOTS, SIX ROWS, AND NOT ONE OF THEM STARTS A SHADER. Every one of the six is a
|
||||
|
||||
@@ -200,7 +200,7 @@ namespace MobileGL::MG_Record {
|
||||
Bool ReadbackReplyIsComplete(Int32 status, Uint64 replySize, Uint64 expected);
|
||||
|
||||
// =============================================================================
|
||||
// P5b d1 - the draw family's record plan (MG_Remote/CONTRACT-P5B.md §2 d1)
|
||||
// P5b d1 - the draw family's record plan (docs/archive/contracts/CONTRACT-P5B.md §2 d1)
|
||||
// =============================================================================
|
||||
//
|
||||
// The nineteen indexed / instanced / multi-draw / indirect entry points all ride draw_vbo
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* SPDX-License-Identifier: LGPL-3.0-only
|
||||
* End of Source File Header */
|
||||
|
||||
/* SHARED IMAGES, AS A C ABI (docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md).
|
||||
/* SHARED IMAGES, AS A C ABI (docs/archive/notes/anland/plan-ahb-dmabuf.md).
|
||||
*
|
||||
* libMobileGL.so exports these on Linux (not Android) in split builds, so a component that is not
|
||||
* a GL entry point - the GBM backend (MG_Gbm), above all - can ask the server for an image and
|
||||
|
||||
@@ -2525,7 +2525,7 @@ if (MOBILEGL_BUILD_DISAGGREGATED)
|
||||
mgl_itest_register_split_arms("TextureUnitSamplingScenario.*" "")
|
||||
mgl_itest_register_split_arms("TriangleScenario.*" "")
|
||||
mgl_itest_register_split_arms("PersistentCoherentMapScenario.*" "")
|
||||
# P11 A2 (MG_Remote/CONTRACT-P11.md §2): the >= 16 MiB arena on all three arms. Its tier case
|
||||
# P11 A2 (docs/archive/contracts/CONTRACT-P11.md §2): the >= 16 MiB arena on all three arms. Its tier case
|
||||
# is declared emulated per entry by SplitLogPaths (T2: every acquisition declines); the mpr and
|
||||
# adopt-tier assertions are registered only in their configured controls. The Magma arms are the
|
||||
# gated `Arena.` block beside `Pbo.` / `Fence.` below, plus the Buffers lane.
|
||||
@@ -2670,14 +2670,14 @@ if (MOBILEGL_BUILD_DISAGGREGATED)
|
||||
# buffer, depth and packed depth/stencil, and glGetTexImage's windowed twin. The Magma arms of
|
||||
# the same cases are the `Band.` block after the Fm lane below.
|
||||
mgl_itest_register_split_arms("BandedReadbackScenario.*" "")
|
||||
# P9 (W1, MG_Remote/CONTRACT-P9.md §1): the pack-buffer readback crosses as
|
||||
# P9 (W1, docs/archive/contracts/CONTRACT-P9.md §1): the pack-buffer readback crosses as
|
||||
# read_pixels_to_buffer / get_texture_image_to_buffer and is answered by nothing. Six parity
|
||||
# cases (every pack parameter, the map reader, a byte swap, a layered glGetTexImage, an upload
|
||||
# FROM the buffer the read filled, a later write over part of it) and the wire case (no
|
||||
# reply-slot record, one mark per read). The Magma arms are the `Pbo.` block after the Band
|
||||
# block below.
|
||||
mgl_itest_register_split_arms("PackBufferReadbackScenario.*" "")
|
||||
# P10 (A, MG_Remote/CONTRACT-P10.md §1): fence polls answered from kEventFenceSignaled - the
|
||||
# P10 (A, docs/archive/contracts/CONTRACT-P10.md §1): fence polls answered from kEventFenceSignaled - the
|
||||
# idiom's poll loops end (with and without the flush bit), a signaled fence's polls cross
|
||||
# nothing, and an idle server still reports a fence that finishes. The Magma arms are the
|
||||
# `Fence.` block beside the `Pbo.` block below.
|
||||
@@ -2920,7 +2920,7 @@ if (MOBILEGL_BUILD_DISAGGREGATED)
|
||||
)
|
||||
endforeach()
|
||||
|
||||
# ---- P5b package i1 (MG_Remote/CONTRACT-P5B.md §2 i1) --------------------------------
|
||||
# ---- P5b package i1 (docs/archive/contracts/CONTRACT-P5B.md §2 i1) --------------------------------
|
||||
#
|
||||
# THE LANE CASE THAT PROVES THE RECORDS CROSSED, and it is a RESULT and not a probe (R-16:
|
||||
# a probe may not arm against a stub). Each of these four scenarios asserts a value that
|
||||
@@ -2980,7 +2980,7 @@ if (MOBILEGL_BUILD_DISAGGREGATED)
|
||||
#
|
||||
# The ROADMAP's `TextureRemintPullScenario`, and it proves the opposite of its name: the
|
||||
# server re-mints from the GPU level and its own staged store, so no pull protocol exists
|
||||
# (notes/p9/W2-REMINT.md). Espryt's three arms here; the Magma arms are laid by hand in the
|
||||
# (docs/archive/notes/p9/W2-REMINT.md). Espryt's three arms here; the Magma arms are laid by hand in the
|
||||
# `DirectVulkan.<arm>.Remint.` block, where the gated Magma flavour lives; both backends' monolith
|
||||
# entries come from the whole-binary discovery.
|
||||
mgl_itest_register_split_arms("TextureRemintPullScenario.*" "")
|
||||
@@ -3039,7 +3039,7 @@ if (MOBILEGL_BUILD_DISAGGREGATED)
|
||||
|
||||
# ---- P5b t2: the transform-feedback spans, the XFB object bind, the patch parameter -------
|
||||
#
|
||||
# MG_Remote/CONTRACT-P5B.md §2 t2. The three P5 lanes above are the REDUCED PATH's targets
|
||||
# docs/archive/contracts/CONTRACT-P5B.md §2 t2. The three P5 lanes above are the REDUCED PATH's targets
|
||||
# (a clear, a triangle, a persistent map); these two are the first lane entries whose GREEN
|
||||
# DEPENDS ON A t2 RECORD HAVING CROSSED AND BEEN APPLIED BY THE BACKEND, which is the only
|
||||
# statement a package flipping a verb can make that a unit case cannot:
|
||||
@@ -3084,7 +3084,7 @@ if (MOBILEGL_BUILD_DISAGGREGATED)
|
||||
# block as the XfbQuery. ones.
|
||||
mgl_itest_register_split_arms("XfbPrimitiveQueryScenario.*" "")
|
||||
|
||||
# ---- P5e package vi (MG_Remote/CONTRACT-P5E.md §5.1, ID-82 / ruling 2) --------------------
|
||||
# ---- P5e package vi (docs/archive/contracts/CONTRACT-P5E.md §5.1, ID-82 / ruling 2) --------------------
|
||||
#
|
||||
# Client-memory vertices and indices now cross as owned ordinary buffers.
|
||||
# Keep the original names and private logs; all six scenarios join the full
|
||||
@@ -3253,7 +3253,7 @@ if (MOBILEGL_BUILD_DISAGGREGATED)
|
||||
#
|
||||
# PLAN-PH-P34B-P7.md 1.2, "门:纹理 / program 场景 split 覆盖". Each candidate was run once
|
||||
# under MOBILEGL_TRANSPORT=inproc on build-split and its FIRST BLOCKER recorded; the row per
|
||||
# scenario x backend x blocker is in notes/p34b/split-scenario-census.md. What follows is the
|
||||
# scenario x backend x blocker is in docs/archive/notes/p34b/split-scenario-census.md. What follows is the
|
||||
# result of that census, not a guess: every scenario listed here passed, and every case that
|
||||
# did not is excluded BY NAME below with its blocker.
|
||||
#
|
||||
@@ -3301,7 +3301,7 @@ if (MOBILEGL_BUILD_DISAGGREGATED)
|
||||
# case that produced no record RED for having nothing to say - which is the rule working, not
|
||||
# a defect. They stay unregistered for that reason and are listed in the census note.
|
||||
|
||||
# P8-E (docs/Disaggregated/notes/p8/E.md): glCopyImageSubData into a level the driver will not
|
||||
# P8-E (docs/archive/notes/p8/E.md): glCopyImageSubData into a level the driver will not
|
||||
# read back, then glGetTexImage. The knob-free cases on Espryt's three arms; Magma's gated arms
|
||||
# are the `DirectVulkan.<arm>.CopyStore.` entries just below; both monolith entries come from
|
||||
# the whole-binary discovery.
|
||||
@@ -3483,7 +3483,7 @@ if (MOBILEGL_BUILD_DISAGGREGATED)
|
||||
ENVIRONMENT "${MGL_ITEST_GLES_SPLIT_STRICT_ENVIRONMENT}"
|
||||
)
|
||||
|
||||
# P8-B: glGenerateMipmap ON ESPRYT'S SERVER (notes/p8/B.md). The window a record names (B1) and
|
||||
# P8-B: glGenerateMipmap ON ESPRYT'S SERVER (docs/archive/notes/p8/B.md). The window a record names (B1) and
|
||||
# RGB16F / RGB32F (B2) on the three Espryt arms; the Magma control is the gated
|
||||
# `DirectVulkan.<arm>.Mip.` block beside `Remint.`, and both monoliths come from the ambient
|
||||
# discovery. The FORCED-CPU entries run the three-channel cases with
|
||||
@@ -3713,7 +3713,7 @@ if (MOBILEGL_BUILD_DISAGGREGATED)
|
||||
#
|
||||
# Making the tcp lane able to carry these would need the fixture to take a per-case
|
||||
# server environment - a supervisor control, not a ctest property - and that is a debt,
|
||||
# recorded in notes/p7/magma-b2.md §6.
|
||||
# recorded in docs/archive/notes/p7/magma-b2.md §6.
|
||||
set(mglItestServerEnvKnobArm TRUE)
|
||||
if(mglItestArm STREQUAL "Tcp")
|
||||
set(mglItestServerEnvKnobArm FALSE)
|
||||
@@ -4158,7 +4158,7 @@ if (MOBILEGL_BUILD_DISAGGREGATED)
|
||||
${mglItestArmProperties}
|
||||
ENVIRONMENT "${mglItestMagmaBandEnvironment}\;MOBILEGL_LOG_FILE_PATH=${CMAKE_CURRENT_BINARY_DIR}/p10-fence${mglItestArmLogTag}-${fenceCase}.log")
|
||||
endforeach()
|
||||
# P11 A2 (MG_Remote/CONTRACT-P11.md §2): the >= 16 MiB arena on Magma's three arms, in the
|
||||
# P11 A2 (docs/archive/contracts/CONTRACT-P11.md §2): the >= 16 MiB arena on Magma's three arms, in the
|
||||
# same flavour, declared per arm (mglItestArenaArm above); DirectVulkan.ArenaArm. is its
|
||||
# monolith (adopted) half.
|
||||
foreach(arenaCase IN LISTS MGL_ITEST_ARENA_CASES)
|
||||
@@ -4231,7 +4231,7 @@ endif()
|
||||
|
||||
# P9 W2: THE TEXTURE RE-MINT ON MAGMA, all three arms, GATED. A storage-usage upgrade recreates
|
||||
# the VkImage and copies the old one into it GPU to GPU (PreserveTextureContentsOnRecreate), so
|
||||
# no byte comes from the client here either (notes/p9/W2-REMINT.md). The gated band flavour
|
||||
# no byte comes from the client here either (docs/archive/notes/p9/W2-REMINT.md). The gated band flavour
|
||||
# (role-split state, strict errors, run-ahead), one entry per case for a private log each.
|
||||
if (MOBILEGL_BUILD_DISAGGREGATED)
|
||||
foreach(mglItestArm IN LISTS MGL_ITEST_MAGMA_ARMS)
|
||||
@@ -4493,7 +4493,7 @@ if (MOBILEGL_BUILD_DISAGGREGATED)
|
||||
PersistentCoherentMapScenario.AWriteAfterAFrameBoundaryReachesTheNextFramesDraw
|
||||
StorageBufferRegrowScenario.AGrownStoreIsVisibleThroughItsExistingIndexedBinding
|
||||
# P11 A2: the >= 16 MiB arena, the flavour's MGITEST_PERSISTENT_MAP_ARM=emulated
|
||||
# asserted by its tier case (MG_Remote/CONTRACT-P11.md §2).
|
||||
# asserted by its tier case (docs/archive/contracts/CONTRACT-P11.md §2).
|
||||
LargeArenaAdoptionScenario.SubDataAfterAnInFlightDrawReachesTheNextDraw
|
||||
LargeArenaAdoptionScenario.RespecifiedVertexArenaKeepsVaoBindings
|
||||
LargeArenaAdoptionScenario.RespecifiedIndexArenaKeepsVaoBinding
|
||||
@@ -4698,7 +4698,7 @@ if (MOBILEGL_BUILD_DISAGGREGATED)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# P5c ct (MG_Remote/CONTRACT-P5C.md §5): the two control records, split-only source for the
|
||||
# P5c ct (docs/archive/contracts/CONTRACT-P5C.md §5): the two control records, split-only source for the
|
||||
# same reason as f1's - the scenario reads the SERVER sink's tallies, which a monolith build
|
||||
# has no symbol for. One block per case with a LOG PATH OF ITS OWN, the F1 pattern:
|
||||
# SplitLogPaths.PrivateAndDistinct fails a lane whose cases share one file, and the death
|
||||
@@ -4920,7 +4920,7 @@ if (MOBILEGL_BUILD_DISAGGREGATED)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/P8Coverage.cmake)
|
||||
endif()
|
||||
|
||||
# P8-D: the Magma wire arm issues indirect draws natively (docs/Disaggregated/notes/p8/D.md).
|
||||
# P8-D: the Magma wire arm issues indirect draws natively (docs/archive/notes/p8/D.md).
|
||||
# Public GL, so the source joins the binary unguarded and the ambient `DirectGLES.` /
|
||||
# `DirectVulkan.` monolith discovery runs it too. Split arms: DirectGLES through the registration
|
||||
# macro (which also replays it on Magma's informational tier), Magma's gated tier by hand, all
|
||||
@@ -4955,7 +4955,7 @@ if (MOBILEGL_BUILD_DISAGGREGATED)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# P8-SE (docs/Disaggregated/notes/p8/SE.md): Espryt split residuals.
|
||||
# P8-SE (docs/archive/notes/p8/SE.md): Espryt split residuals.
|
||||
if (MOBILEGL_BUILD_DISAGGREGATED)
|
||||
# The default framebuffer's depth/stencil format reaches a spawn / tcp client now (the server
|
||||
# process has no frontend placeholder, and the publish used to return on it before posting),
|
||||
@@ -4993,7 +4993,7 @@ if (MOBILEGL_BUILD_DISAGGREGATED)
|
||||
PipeCatalogue.UnmigratedEmulationSitesMatchTheList PROPERTIES LABELS unit TIMEOUT 60)
|
||||
endif()
|
||||
|
||||
# P8-SV: Magma split residuals (docs/Disaggregated/notes/p8/SV.md) - the 3D native mip blit's layer
|
||||
# P8-SV: Magma split residuals (docs/archive/notes/p8/SV.md) - the 3D native mip blit's layer
|
||||
# count, the 1D depth mip decline, the depth/stencil mip decline's tally row (asserted inside
|
||||
# F1WireScenario) and the wire arm's native glDispatchComputeIndirect. Public GL, so the sources join
|
||||
# the binary unguarded and the ambient `DirectGLES.` / `DirectVulkan.` monolith discovery runs them
|
||||
@@ -5193,7 +5193,7 @@ endif()
|
||||
# THIS IS WHERE THE @P7 REFUSALS LIVE. None of tier 2's scenarios reaches one; the readback
|
||||
# matrices, the same-texture copy shapes and the odd-offset uniform ranges do, and they are in
|
||||
# this set and nowhere else in the disaggregated registry. THE FIRST RUN'S RED LIST IS WHAT
|
||||
# WAVE 2's CLUSTERS ARE SCHEDULED FROM - see notes/p7/magma-two-process-first-run.md.
|
||||
# WAVE 2's CLUSTERS ARE SCHEDULED FROM - see docs/archive/notes/p7/magma-two-process-first-run.md.
|
||||
#
|
||||
# IN NO CI GATING STEP, and that is the whole design: a lane that must be green cannot carry a
|
||||
# census. A case leaves this tier for a gated one with the commit that retires its blocker.
|
||||
@@ -5346,7 +5346,7 @@ if (MOBILEGL_BUILD_DISAGGREGATED AND MOBILEGL_PIPE_VERIFY)
|
||||
# (GL error 0x0502 where the decline promises none, or none where it promises one; the
|
||||
# overlap copy writes the level the decline leaves alone) - because Espryt does not decline
|
||||
# those shapes at all. That is a finding about the DirectGLES whole-binary set on split, not
|
||||
# about verify, and it is recorded in notes/p7/verify-split.md rather than hidden in a green.
|
||||
# about verify, and it is recorded in docs/archive/notes/p7/verify-split.md rather than hidden in a green.
|
||||
# This lane was NOT the only DirectGLES split lane to reach them: the primary integration job
|
||||
# runs every integration-gpu entry under MOBILEGL_TRANSPORT=inproc, and there the same four
|
||||
# were red in CI (the depth-stencil and overlap pair from run 35781886930, the two blits from
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
# are the monolith-arm and the no-pulled-read scenarios, 4 skips are the two PersistentMapArm-
|
||||
# and two StrictArming-only cases skipping outside their own lanes, all by design).
|
||||
# Entry counts are first-blocker counts: an entry aborts on its FIRST pulled read, so retiring
|
||||
# a row advances those entries to their next one. See docs/Disaggregated/notes/p5f/f1-report.md.
|
||||
# a row advances those entries to their next one. See docs/archive/notes/p5f/f1-report.md.
|
||||
# ---------------------------------------------------------------------------------------------
|
||||
#
|
||||
# P5f wave 2: the expected set is empty after fc -> fe -> fm integration.
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
# monolith DirectGLES. / DirectVulkan. case is on a gated split arm or is named, with a reason
|
||||
# class, in scripts/data/split_coverage_exemptions.txt. Deleting a line below reds it BY NAME.
|
||||
# The per-case census this list was cut from (inproc / spawn / tcp, junit per arm) is
|
||||
# docs/Disaggregated/notes/p8/A.md.
|
||||
# docs/archive/notes/p8/A.md.
|
||||
|
||||
# ---- (a) THE AMBIENT CASES -----------------------------------------------------------------
|
||||
#
|
||||
@@ -190,7 +190,7 @@ set(MGL_P8A_KNOB_FILTER_WidenedPacked16 "CopyImagePacked16Scenario.*")
|
||||
set(MGL_P8A_KNOB_ENV_WidenedPacked16 "MOBILEGL_ESPRYT_WIDEN_PACKED16_STORAGE=1")
|
||||
# ForcedDs keeps the spelling the existing Split/Spawn DepthStencilReadbackMatrix block uses. The
|
||||
# default-framebuffer case was left out here while it was red on spawn and tcp; P8-SE fixed it
|
||||
# (notes/p8/SE.md) and it runs under the knob on every arm like the rest.
|
||||
# (docs/archive/notes/p8/SE.md) and it runs under the knob on every arm like the rest.
|
||||
set(MGL_P8A_KNOB_FILTER_ForcedDs
|
||||
"DepthStencilReadbackScenario.*:DepthStencilReadbackAttachmentShapeScenario.*")
|
||||
set(MGL_P8A_KNOB_ENV_ForcedDs "MOBILEGL_ESPRYT_FORCE_DS_READBACK_EMULATION=1")
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
// End of Source File Header
|
||||
//
|
||||
// Scenario - glCopyImageSubData INTO A LEVEL THE DRIVER WILL NOT READ BACK (P8-E,
|
||||
// docs/Disaggregated/notes/p8/E.md).
|
||||
// docs/archive/notes/p8/E.md).
|
||||
//
|
||||
// The formats are the ones an ES driver keeps as texture-only storage: GL_RGB16 (EXT_texture_norm16
|
||||
// makes the three-channel spelling sampleable, never colour-renderable) and the 16-bit SNORM family
|
||||
@@ -28,13 +28,13 @@
|
||||
// (WireTextureReadback.inc, ReadTextureImageWire): a colour level of exactly that extent is
|
||||
// treated as a level the driver refused to attach - what a driver without EXT_texture_norm16 /
|
||||
// EXT_render_snorm does for these formats (an Adreno 750, which has both, reads them all back
|
||||
// through the GPU; measured in P13), and what llvmpipe can be made to do no other way. The `DirectGLES.<arm>.StoreRead.`
|
||||
// entries set it, and this scenario then builds its textures at THAT extent instead of the default
|
||||
// one - so the knob is scoped by the extent, and the tcp lane's shared supervisor can carry it
|
||||
// (the TcpServer.Start fixture's ENVIRONMENT) without touching any other entry, this scenario's
|
||||
// own knob-free tcp entries included. Under the knob every read must still be right, and the
|
||||
// server log must name the store route - otherwise the entry would be pinning the GPU route a
|
||||
// second time under a name that claims otherwise.
|
||||
// through the GPU; measured in P13), and what llvmpipe can be made to do no other way. The
|
||||
// `DirectGLES.<arm>.StoreRead.` entries set it, and this scenario then builds its textures at
|
||||
// THAT extent instead of the default one - so the knob is scoped by the extent, and the tcp
|
||||
// lane's shared supervisor can carry it (the TcpServer.Start fixture's ENVIRONMENT) without
|
||||
// touching any other entry, this scenario's own knob-free tcp entries included. Under the knob
|
||||
// every read must still be right, and the server log must name the store route - otherwise the
|
||||
// entry would be pinning the GPU route a second time under a name that claims otherwise.
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-only
|
||||
// End of Source File Header
|
||||
|
||||
// P5c ct (MG_Remote/CONTRACT-P5C.md §5): the two control records, end to end over inproc.
|
||||
// P5c ct (docs/archive/contracts/CONTRACT-P5C.md §5): the two control records, end to end over inproc.
|
||||
//
|
||||
// applier_reset (§5.1): this process's first validate primes the pipe tracker, and the
|
||||
// FreshlyPrimed edge is the record's producer (MG_Impl/Pipe/PipeFill.cpp). What the scenario
|
||||
@@ -155,7 +155,7 @@ namespace {
|
||||
// (DirectVulkan.cpp, CONTRACT-P7 §5.5) and emits the same `object_death`. Package L
|
||||
// measured that the SPAWN arm already passed once the WireTables install condition
|
||||
// went backend-agnostic and that the INPROC arm failed here with `deaths` 0 vs 0
|
||||
// (notes/p7/magma-two-process-first-run.md §6); the table is what closes the inproc
|
||||
// (docs/archive/notes/p7/magma-two-process-first-run.md §6); the table is what closes the inproc
|
||||
// half, and this case is the gate on it. It is also the RED-ONCE for that table: with
|
||||
// the install site short-circuited, both cases red on the two EXPECT_GT below.
|
||||
const GLubyte red[4] = {255, 0, 0, 255};
|
||||
@@ -259,7 +259,7 @@ namespace {
|
||||
// "A SPLIT BUILD RUNS AT TIER T2 AND DECLINES EVERY ACQUISITION, ALWAYS"; T0/T1 are
|
||||
// unimplemented, refused by name at the handshake since P11 A1). So the capability is wired
|
||||
// AHEAD of its consumer on purpose, and `rsd=` on the PipeStats line is the counter that
|
||||
// will show the records the day P11 lands a tier that adopts. See notes/p7/magma-c.md.
|
||||
// will show the records the day P11 lands a tier that adopts. See docs/archive/notes/p7/magma-c.md.
|
||||
TEST_F(CtWireScenario, TheServerPublishesTheResidentSubDataCapabilityFromItsOwnTable) {
|
||||
if (!Ready()) return;
|
||||
// A REAL WORKLOAD FIRST, and it is not decoration: ScenarioFixture's arming rule
|
||||
|
||||
@@ -534,7 +534,7 @@ namespace MGITest {
|
||||
// THE CASE IS ARMED ON THE MAGMA WIRE ARM ONLY, and the two gates below say which of the
|
||||
// other arms that discover it (the suite is registered whole on the monolith DirectVulkan
|
||||
// arm and on every DirectGLES arm) owe this picture and do not yet produce it. Both are
|
||||
// recorded debts (notes/p7/magma-b2.md §6), not agreements with the wrong answer:
|
||||
// recorded debts (docs/archive/notes/p7/magma-b2.md §6), not agreements with the wrong answer:
|
||||
// - Espryt (DirectGLES, monolith and split alike): the flipped resolve writes nothing and
|
||||
// raises no error, and the scaled one raises no error either. P3b/P4b.
|
||||
// - the monolith DirectVulkan arm: `VulkanRenderer.cpp` refuses a depth blit with a
|
||||
@@ -560,17 +560,19 @@ namespace MGITest {
|
||||
TEST_F(DepthStencilReadbackMatrixScenario, AFlippedMultisampleResolveMirrorsTheBandsAndAScaleDeclines) {
|
||||
if (!Ready()) return;
|
||||
if (Gl().BackendName() != "DirectVulkan") {
|
||||
GTEST_SKIP() << "Espryt (" << Gl().BackendName() << ") does not produce this picture yet: a "
|
||||
GTEST_SKIP() << "Espryt (" << Gl().BackendName()
|
||||
<< ") does not produce this picture yet: a "
|
||||
"flipped multisample depth resolve writes nothing with no error and a scaled "
|
||||
"one raises no INVALID_OPERATION - a P3b/P4b debt (notes/p7/magma-b2.md §6)";
|
||||
"one raises no INVALID_OPERATION - a P3b/P4b debt (docs/archive/notes/p7/magma-b2.md §6)";
|
||||
}
|
||||
if (!PeekSplitRuntime().transportResolved) {
|
||||
GTEST_SKIP() << "the monolith DirectVulkan transport (this process resolved no split "
|
||||
"transport, so BlitFramebuffer takes the monolith arm) refuses a flipped "
|
||||
"depth blit (\"depth blits with flipped rectangles are not supported yet\", "
|
||||
"destination untouched, no error) and scales a multisample depth blit GL "
|
||||
"calls INVALID_OPERATION - a wire-vs-monolith divergence where the wire arm "
|
||||
"is the correct one; the monolith fix is P13/G1-bound (notes/p7/magma-b2.md §6)";
|
||||
GTEST_SKIP()
|
||||
<< "the monolith DirectVulkan transport (this process resolved no split "
|
||||
"transport, so BlitFramebuffer takes the monolith arm) refuses a flipped "
|
||||
"depth blit (\"depth blits with flipped rectangles are not supported yet\", "
|
||||
"destination untouched, no error) and scales a multisample depth blit GL "
|
||||
"calls INVALID_OPERATION - a wire-vs-monolith divergence where the wire arm "
|
||||
"is the correct one; the monolith fix is P13/G1-bound (docs/archive/notes/p7/magma-b2.md §6)";
|
||||
}
|
||||
DepthSource multisampled = MakeRenderbufferSource(GL_DEPTH24_STENCIL8, 4);
|
||||
if (!SourceIsUsable()) {
|
||||
|
||||
@@ -1175,7 +1175,7 @@ TEST_F(F1WireScenario, SubWordUniformBufferRangePadsMissingBytes) {
|
||||
// The sibling of ShortUniformBufferRangePadsMissingBytes whose bound range does NOT
|
||||
// end on a four-byte boundary. That window is what `uniform-buffer-byte-tail`
|
||||
// used to refuse (a named Fatal that took the whole session with it), and it is the
|
||||
// live boundary the Redmi Minecraft run reported (notes/p5f/magma-inproc-fix.md #5).
|
||||
// live boundary the Redmi Minecraft run reported (docs/archive/notes/p5f/magma-inproc-fix.md #5).
|
||||
//
|
||||
// Only the SIZE can land off a word here. glBindBufferRange constrains the offset to
|
||||
// GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT and records GL_INVALID_VALUE otherwise
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-only
|
||||
// End of Source File Header
|
||||
//
|
||||
// P10 (A, MG_Remote/CONTRACT-P10.md §1): FENCE POLLS ANSWERED FROM THE REVERSE CHANNEL.
|
||||
// P10 (A, docs/archive/contracts/CONTRACT-P10.md §1): FENCE POLLS ANSWERED FROM THE REVERSE CHANNEL.
|
||||
//
|
||||
// A glClientWaitSync / glGetSynciv(GL_SYNC_STATUS) used to be a kWaitReply record: its answer
|
||||
// came back only after the server had applied every record before it, so a poll was a full
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
// End of Source File Header
|
||||
//
|
||||
// Scenario - glGenerateMipmap ON THE FORMATS ESPRYT DOES NOT HAND STRAIGHT TO THE DRIVER
|
||||
// (P8-B, docs/Disaggregated/notes/p8/B.md).
|
||||
// (P8-B, docs/archive/notes/p8/B.md).
|
||||
//
|
||||
// Espryt generates R11F_G11F_B10F and depth chains with per-level blits, and RGB16F / RGB32F
|
||||
// chains outside glGenerateMipmap because ES refuses a three-channel float format there. Until
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-only
|
||||
// End of Source File Header
|
||||
//
|
||||
// Scenario - THE DRAW FAMILY P5b's d1 PUTS ON THE WIRE (MG_Remote/CONTRACT-P5B.md §2 d1): one
|
||||
// Scenario - THE DRAW FAMILY P5b's d1 PUTS ON THE WIRE (docs/archive/contracts/CONTRACT-P5B.md §2 d1): one
|
||||
// VBO, one EBO, one program, one VAO, and one picture per draw entry point whose correctness
|
||||
// DEPENDS on the fields that entry point adds to draw_vbo. Two quads live in the vertex buffer,
|
||||
// a left one and a right one, and every case draws exactly one of them or both through a
|
||||
|
||||
@@ -611,7 +611,7 @@ void main() { word = 0xC0FFEEu; }
|
||||
<< window.line;
|
||||
}
|
||||
|
||||
// P11 A2 (MG_Remote/CONTRACT-P11.md §2): WHICH TIER THE ARENA REALLY LANDED IN. The cases above
|
||||
// P11 A2 (docs/archive/contracts/CONTRACT-P11.md §2): WHICH TIER THE ARENA REALLY LANDED IN. The cases above
|
||||
// are green whether the arena adopted or stayed emulated, so the lane declares the arm
|
||||
// (MGITEST_PERSISTENT_MAP_ARM) and this case asserts it, the way
|
||||
// PersistentCoherentMapScenario.TheMapLandsInTheArmItsLaneDeclares does for a sub-16-MiB map.
|
||||
@@ -665,7 +665,7 @@ void main() { word = 0xC0FFEEu; }
|
||||
ExpectDeclaredArm(declared, "after a frame of draws, an SSBO binding and a dispatch");
|
||||
}
|
||||
|
||||
// P11 A1 (MG_Remote/CONTRACT-P11.md §1): THE TCP LANE WITH MOBILEGL_IPC_ADOPT_TIER=0. A stream
|
||||
// P11 A1 (docs/archive/contracts/CONTRACT-P11.md §1): THE TCP LANE WITH MOBILEGL_IPC_ADOPT_TIER=0. A stream
|
||||
// data plane has no memory the two sides share, so the client refuses the knob by name at its
|
||||
// handshake - exactly one `Refuse{AdoptTierOnStream, "T0"}` line in its log - and the session
|
||||
// runs T2: the other cases in the same `.AdoptTier0.` lane are green and the arena is emulated.
|
||||
@@ -699,7 +699,7 @@ void main() { word = 0xC0FFEEu; }
|
||||
EXPECT_EQ(log.find("Fatal{UnimplementedAdoptTier"), std::string::npos) << log;
|
||||
}
|
||||
|
||||
// P11 B2 (MG_Remote/CONTRACT-P11.md B2): A SHARED-SEGMENT SESSION THAT ASKS T0 AND CANNOT RUN IT.
|
||||
// P11 B2 (docs/archive/contracts/CONTRACT-P11.md B2): A SHARED-SEGMENT SESSION THAT ASKS T0 AND CANNOT RUN IT.
|
||||
// MOBILEGL_IPC_ADOPT_TIER=0 over shared segments asks T0 in the Hello (A1 made it die at the
|
||||
// handshake; ruling ID-P11-14 made it this). The lane's server cannot grant it - a host has no
|
||||
// AHardwareBuffer, or `.AdoptT0Disallowed.` turned its allow switch off - so it refuses by name
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-only
|
||||
// End of Source File Header
|
||||
//
|
||||
// P9 (W1, MG_Remote/CONTRACT-P9.md §1): READS INTO A PIXEL PACK BUFFER ARE ANSWERED BY NOTHING.
|
||||
// P9 (W1, docs/archive/contracts/CONTRACT-P9.md §1): READS INTO A PIXEL PACK BUFFER ARE ANSWERED BY NOTHING.
|
||||
//
|
||||
// Under a transport a glReadPixels / glGetTexImage whose destination is a bound
|
||||
// GL_PIXEL_PACK_BUFFER no longer waits for its pixels: it crosses as read_pixels_to_buffer /
|
||||
@@ -418,7 +418,7 @@ namespace MGITest {
|
||||
// under a transport a pack-buffer read posts NO reply-slot record and marks the buffer
|
||||
// GPU-written, once per read. MOBILEGL_IPC_PBO_READBACK_SYNC=1 puts the reply form back,
|
||||
// and this case must then fail on both counters - that is its red-once, recorded in
|
||||
// docs/Disaggregated/notes/p9/.
|
||||
// docs/archive/notes/p9/.
|
||||
TEST_F(PackBufferReadbackScenario, APackBufferReadPostsNoReplyAndMarksTheBuffer) {
|
||||
if (!Ready()) return;
|
||||
const std::string split = SplitRuntimeSkipReason();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-only
|
||||
// End of Source File Header
|
||||
//
|
||||
// Scenario - A TEXTURE RE-MINT NEEDS NO BYTE FROM THE CLIENT (P9 W2, notes/p9/W2-REMINT.md).
|
||||
// Scenario - A TEXTURE RE-MINT NEEDS NO BYTE FROM THE CLIENT (P9 W2, docs/archive/notes/p9/W2-REMINT.md).
|
||||
//
|
||||
// The name is the ROADMAP's: P4a named `texture-remint-pull` the one new stall class of the
|
||||
// split - a texture first bound to an image unit AFTER the backend allocated it has to be
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
// table below.
|
||||
//
|
||||
// THE CLIENT EMITTER LANDED TOO, and three places in the tree said otherwise until this commit:
|
||||
// this header, the CMake probe's comment, and notes/p4a/p4a-results/gates-v1.md's re-run table.
|
||||
// this header, the CMake probe's comment, and docs/archive/notes/p4a/p4a-results/gates-v1.md's re-run table.
|
||||
// MG_Impl/Pipe/TextureEmit.h's EmitOneLevel increments CallClass::ClientTextureUploadEmissions on
|
||||
// every piece it emits, so `ctu=` is a live reading and `ctu == emit` is a live assertion. The
|
||||
// CMake probe's `else()` arm is kept - it is what makes the arming decision falsifiable - but it
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
// That is exactly the shape SSIM and every ordinary pixel case go green over.
|
||||
//
|
||||
// SO THE CLAIM IS ASSERTED ON BOTH CHANNELS AT ONCE, and neither alone is the gate
|
||||
// (notes/recovered/wf2/final/part3.md 7.3, "门:新增场景,通过 view 上传、经属主采样(以及反
|
||||
// (docs/archive/notes/recovered/wf2/final/part3.md 7.3, "门:新增场景,通过 view 上传、经属主采样(以及反
|
||||
// 向),跨 draw 边界各一次"):
|
||||
//
|
||||
// PIXELS an upload through one name must be visible through the other name, in the SAME
|
||||
@@ -51,7 +51,7 @@
|
||||
// MarkStorageDirtyRegion call PipeNoteLevelDirty on ITSELF instead of forwarding to the owner -
|
||||
// i.e. build the two-cursor shape the design rejects. Case (a) then goes red on stale OWNER
|
||||
// texels AND on a SubDataCount that did not move, which is the pair this file exists to make
|
||||
// simultaneous. Recorded in docs/Disaggregated/notes/p34b/espryt-d2.md.
|
||||
// simultaneous. Recorded in docs/archive/notes/p34b/espryt-d2.md.
|
||||
//
|
||||
// VIEWS ARE OPT-IN ON ESPRYT. DirectGLES withholds GL_ARB_texture_view unless
|
||||
// MOBILEGL_ESPRYT_ENABLE_TEXTURE_VIEW=1 (ConfigLoader.cpp:213, Config.h:72), so every lane that
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
// in every lane; the DirectGLES.Split. entries run the same two cases with
|
||||
// MOBILEGL_TRANSPORT=inproc, where the same body is the smallest workload that crosses a real
|
||||
// ring. Four things about its shape are decisions rather than defaults, and all four come from
|
||||
// the measured verb census (~/w7/notes/p5/verb-census.md):
|
||||
// the measured verb census (docs/archive/notes/p5/verb-census.md):
|
||||
//
|
||||
// 1. THE DRAW IS VBO-BACKED AND HAS NO CLIENT-ARRAY INDICES. glDrawArrays against a buffer
|
||||
// bound to GL_ARRAY_BUFFER, never glDrawElements with a client pointer. That keeps
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
// End of Source File Header
|
||||
//
|
||||
// P8-SV: THE MAGMA WIRE ARM ISSUES glDispatchComputeIndirect FROM THE WIRE STORE, AS THE MONOLITH
|
||||
// ARM DOES (docs/Disaggregated/notes/p8/SV.md).
|
||||
// ARM DOES (docs/archive/notes/p8/SV.md).
|
||||
//
|
||||
// Before P8-SV the wire arm read the three group counts through ReadWireBuffer and dispatched them
|
||||
// from the CPU, so a dispatch buffer a shader had written cost a whole-GPU wait per call - the
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-only
|
||||
// End of Source File Header
|
||||
//
|
||||
// P8-SV: TWO glGenerateMipmap SHAPES THE MAGMA WIRE ARM GOT WRONG (docs/Disaggregated/notes/p8/SV.md).
|
||||
// P8-SV: TWO glGenerateMipmap SHAPES THE MAGMA WIRE ARM GOT WRONG (docs/archive/notes/p8/SV.md).
|
||||
//
|
||||
// * A 3D chain through the NATIVE blit. The wire arm passed the level's depth as the blit's
|
||||
// subresource layerCount on an image with one array layer (VUID-vkCmdBlitImage-srcImage-00240,
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
// keyed by GL name, they are object lookups rather than verb state, and a forwarded field has
|
||||
// no storage for an emitted call to supply.
|
||||
//
|
||||
// P5e ADDS ONE ROW, GetBufferBindingPoint -> SetShaderBuffers (MG_Remote/CONTRACT-P5E.md §5.6),
|
||||
// P5e ADDS ONE ROW, GetBufferBindingPoint -> SetShaderBuffers (docs/archive/contracts/CONTRACT-P5E.md §5.6),
|
||||
// and it is SHAPE-ONLY like P3a's and P4a's six: the field's storage is four raw bases into the
|
||||
// frontend's Array<Array<BindingSlotRange1D, 84>, 4>, and set_shader_buffers carries RESOLVED
|
||||
// {handle, offset, size} ranges per class. The applier has no way to produce a pointer and P5e
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
X(ResumeStreamOutput, ResumeTransformFeedback) \
|
||||
X(GenerateMipmap, GenerateMipmap) \
|
||||
X(GetTextureImage, GetTextureImage) \
|
||||
/* P5b (MG_Remote/CONTRACT-P5B.md). The ONE renamed, non-kCtxVerb boundary the file above */ \
|
||||
/* P5b (docs/archive/contracts/CONTRACT-P5B.md). The ONE renamed, non-kCtxVerb boundary the file above */ \
|
||||
/* said "the phase that emits it adds its row and decides which verb it is": P5b rules */ \
|
||||
/* resource_copy_region = glCopyImageSubData ONLY; the two framebuffer-sourced copies */ \
|
||||
/* (CopyTexImage2D / CopyTexSubImage2D) are copy_framebuffer_to_texture below, stamped as */ \
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace MobileGL::MG_Pipe {
|
||||
kOptional = 1u << 5,
|
||||
};
|
||||
|
||||
// P5e (MG_Remote/CONTRACT-P5E.md §2.2). THE FIFTH COLUMN OF PipeCalls.def: what the client
|
||||
// P5e (docs/archive/contracts/CONTRACT-P5E.md §2.2). THE FIFTH COLUMN OF PipeCalls.def: what the client
|
||||
// does after publishing a record of this call, on a server that publishes
|
||||
// kCapRunAheadApply. Unscoped for MGPipeCallClass's reason - PipeCalls.def spells these as
|
||||
// bare tokens so the same file can be read by the C++ preprocessor and by
|
||||
@@ -143,7 +143,7 @@ namespace MobileGL::MG_Pipe {
|
||||
// the three unit sets
|
||||
inline constexpr Uint64 kMGPipeSubsystemPrograms = 1ull << 12; // shader CSO, draw/dispatch
|
||||
// program, global constants
|
||||
// P5e's one (MG_Remote/CONTRACT-P5E.md §1). The INDEXED BUFFER BINDING POINTS: the three
|
||||
// P5e's one (docs/archive/contracts/CONTRACT-P5E.md §1). The INDEXED BUFFER BINDING POINTS: the three
|
||||
// dirty bits NewConstBuffers / NewShaderBuffers / NewSoTargets, the set_shader_buffers
|
||||
// emitter, and the backend's four binding-point walks. It is its own bit and not part of
|
||||
// bit 7's resource family for the reason every other split here has: a UBO/SSBO binding
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// OnTexturePullRequest, the server asking the client to re-send a texture's levels after
|
||||
// re-minting it (with op 50 ResourceSubDataComplete as the forward terminator). P9 W2 measured
|
||||
// that no re-mint needs the client: Espryt's server reads the GPU level back and replays its own
|
||||
// staged store, Magma copies GPU to GPU, on every arm (notes/p9/W2-REMINT.md). So the callback
|
||||
// staged store, Magma copies GPU to GPU, on every arm (docs/archive/notes/p9/W2-REMINT.md). So the callback
|
||||
// went; op 50 stays in the opcode table as a retired row (opcodes only ever grow) and its decoder
|
||||
// still declines it.
|
||||
//
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace MobileGL::MG_Pipe {
|
||||
// buffer. So the answer is the SERVER's table, published as a bit and read through
|
||||
// MGL_BACKEND_SLOT_CAP. The first of the "XFB span family" bits SlotCaps.h predicted.
|
||||
kCapBackendOwnsXfbCapture = 1ull << 9,
|
||||
// P5e (MG_Remote/CONTRACT-P5E.md §1, §6). THE SERVER APPLIES AN UNBARRIERED RECORD
|
||||
// P5e (docs/archive/contracts/CONTRACT-P5E.md §1, §6). THE SERVER APPLIES AN UNBARRIERED RECORD
|
||||
// WITHOUT READING CLIENT MEMORY: every object it needs is resolved from a handle the
|
||||
// record or the applier state carries, so the client may publish and move on instead
|
||||
// of waiting for appliedSeq at every verb (rule F).
|
||||
@@ -150,7 +150,7 @@ namespace MobileGL::MG_Pipe {
|
||||
// snapshot may only turn it OFF, because a caps re-run must not be able to make a
|
||||
// lockstep server run-ahead in the middle of a frame.
|
||||
kCapRunAheadApply = 1ull << 10,
|
||||
// P11 B2 (MG_Remote/CONTRACT-P11.md B2). THIS SESSION MAY RUN T0: the client asked for
|
||||
// P11 B2 (docs/archive/contracts/CONTRACT-P11.md B2). THIS SESSION MAY RUN T0: the client asked for
|
||||
// it in its Hello (LinkTerms.adoptTier = 0) on a shared-segment plane, the server's
|
||||
// allow switch is on, this platform has AHardwareBuffer, and the backend's POST
|
||||
// self-test of the sustained-lock pattern passed on its live context. Never set in the
|
||||
@@ -1022,7 +1022,7 @@ namespace MobileGL::MG_Pipe {
|
||||
// 0, or Count for the Uniform class under kCapNeedsHostUboBytes (RESERVED, P8-F: 0 today;
|
||||
// a range with nothing to ship carries an empty span, so the two arrays stay aligned).
|
||||
// MGPShaderBuffers::Class's three values, and the ONLY spelling of them (P5e,
|
||||
// MG_Remote/CONTRACT-P5E.md §1). The payload's comment has named them since P4a and
|
||||
// docs/archive/contracts/CONTRACT-P5E.md §1). The payload's comment has named them since P4a and
|
||||
// nothing numbered them, so the emitter and the applier were one literal each away from
|
||||
// disagreeing. Uniform is 0 so a zeroed record describes the uniform binding points, which
|
||||
// is the class every workload has.
|
||||
@@ -1624,7 +1624,7 @@ namespace MobileGL::MG_Pipe {
|
||||
};
|
||||
MGP_ASSERT_POD(MGPReadbackInfo, 64);
|
||||
|
||||
// P9 (W1, MG_Remote/CONTRACT-P9.md §1): read_pixels_to_buffer / get_texture_image_to_buffer,
|
||||
// P9 (W1, docs/archive/contracts/CONTRACT-P9.md §1): read_pixels_to_buffer / get_texture_image_to_buffer,
|
||||
// the two readbacks whose destination is a bound GL_PIXEL_PACK_BUFFER. The destination is
|
||||
// the pack buffer's RESOURCE HANDLE (CONTRACT-P5 row 23: "a PBO destination is a resource
|
||||
// handle and needs no Seg field"), so nothing comes back and the client does not wait: the
|
||||
@@ -1796,7 +1796,7 @@ namespace MobileGL::MG_Pipe {
|
||||
};
|
||||
MGP_ASSERT_POD(MGPFlush, 8);
|
||||
|
||||
// DAMAGE ON THE WIRE (eglSwapBuffersWithDamage, docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md
|
||||
// DAMAGE ON THE WIRE (eglSwapBuffersWithDamage, docs/archive/notes/anland/plan-ahb-dmabuf.md
|
||||
// item 5). At most kMGPMaxDamageRects rectangles, each x, y, width, height in GL window
|
||||
// coordinates - origin at the bottom-left, as EGL hands them over. A count of 0 means the whole
|
||||
// surface, which is also what every record from a client that sends no damage says.
|
||||
@@ -1819,7 +1819,7 @@ namespace MobileGL::MG_Pipe {
|
||||
MGP_ASSERT_POD(MGPSwapInterval, 8);
|
||||
|
||||
// ---------------------------------------------------------------------------------
|
||||
// P5b: the five appended rows (MG_Remote/CONTRACT-P5B.md). APPENDED, never inserted:
|
||||
// P5b: the five appended rows (docs/archive/contracts/CONTRACT-P5B.md). APPENDED, never inserted:
|
||||
// the wire opcode is a call's position in PipeCalls.def, so these sit after
|
||||
// FenceWaitServer at opcodes 72..76 and no earlier opcode moved.
|
||||
//
|
||||
@@ -1940,7 +1940,7 @@ namespace MobileGL::MG_Pipe {
|
||||
MGP_ASSERT_POD(MGPCopyFromFramebuffer, 48);
|
||||
|
||||
// ---------------------------------------------------------------------------------
|
||||
// P5c: the three appended rows (MG_Remote/CONTRACT-P5C.md §5). APPENDED, never inserted:
|
||||
// P5c: the three appended rows (docs/archive/contracts/CONTRACT-P5C.md §5). APPENDED, never inserted:
|
||||
// applier_reset is opcode 77, object_death opcode 78, and set_context_values (rv, §5.3)
|
||||
// opcode 79 - and no earlier opcode moved.
|
||||
//
|
||||
@@ -1981,7 +1981,7 @@ namespace MobileGL::MG_Pipe {
|
||||
};
|
||||
MGP_ASSERT_POD(MGPBindContext, 8);
|
||||
|
||||
// shared_image = opcode 85 (docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md). Colour
|
||||
// shared_image = opcode 85 (docs/archive/notes/anland/plan-ahb-dmabuf.md). Colour
|
||||
// buffers the SERVER allocates and exports as dma-buf descriptors, so one client's frames
|
||||
// reach another client's textures without leaving GPU memory. One row, five operations, all
|
||||
// answered through the reply slot with an MGPSharedImageReply:
|
||||
|
||||
@@ -3583,7 +3583,7 @@ namespace MobileGL::MG_Pipe {
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------------
|
||||
// P5e's two entry points, DECLARED BY c0e (MG_Remote/CONTRACT-P5E.md §1)
|
||||
// P5e's two entry points, DECLARED BY c0e (docs/archive/contracts/CONTRACT-P5E.md §1)
|
||||
// ---------------------------------------------------------------------------------
|
||||
//
|
||||
// set_shader_buffers HAS ITS BODY (package sb); set_program_bindings still refuses by name
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "MGPipeRenderStateSpans.h"
|
||||
#include "MGPipeTypes.h"
|
||||
// P5e (MG_Remote/CONTRACT-P5E.md §2.1): MGPipeBarriered takes an MGPWireOp and reads the
|
||||
// P5e (docs/archive/contracts/CONTRACT-P5E.md §2.1): MGPipeBarriered takes an MGPWireOp and reads the
|
||||
// generated wait-class and call-class tables, all of which live in MGPipe.h. It is a sibling
|
||||
// header in the same layer - MG_Pipe includes MG_Pipe - so the closure does not move.
|
||||
#include "MGPipe.h"
|
||||
@@ -126,7 +126,7 @@ namespace MobileGL::MG_Pipe {
|
||||
void (*TextureRespecify)(MGPipeHandle res, const MGPResourceDesc& desc,
|
||||
const MGPRespecifiedLevel* level);
|
||||
void (*TextureDestroy)(MGPipeHandle res);
|
||||
// P11 B2 (T0, MG_Remote/CONTRACT-P11.md B2): the two members a backend that can take a
|
||||
// P11 B2 (T0, docs/archive/contracts/CONTRACT-P11.md B2): the two members a backend that can take a
|
||||
// client's AHardwareBuffer as a store registers. Both null = this backend has no T0 and
|
||||
// every session it serves runs T2. Appended after the texture trio for the same reason.
|
||||
//
|
||||
@@ -296,7 +296,7 @@ namespace MobileGL::MG_Pipe {
|
||||
// DirectGLESBufferDrawProbe pair now pins from both sides.
|
||||
Bool HasLiveHostWrites = false;
|
||||
|
||||
// SHARED IMAGES (docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md). Nonzero: this
|
||||
// SHARED IMAGES (docs/archive/notes/anland/plan-ahb-dmabuf.md). Nonzero: this
|
||||
// texture's level-0 storage IS the server's shared image of this id (an EGLImage target),
|
||||
// set by shared_image's Attach and cleared by the next respecify that redefines storage.
|
||||
// The backend resolves the id at its texture sync (MG_Remote::Server::SharedImages::Find)
|
||||
@@ -412,7 +412,7 @@ namespace MobileGL::MG_Pipe {
|
||||
// GlobalConstants is the one allocation P4a adds per program, it is bounded by
|
||||
// Desc.GlobalUboSize, and it is NOT on the hot path: set_global_constants is
|
||||
// (ShaderCso, Version) keyed and fires at most once per program per frame.
|
||||
// P5e (MG_Remote/CONTRACT-P5E.md §1): one entry of set_program_bindings' third tail as the
|
||||
// P5e (docs/archive/contracts/CONTRACT-P5E.md §1): one entry of set_program_bindings' third tail as the
|
||||
// RECORD owns it. The wire carries the block name as an MGHostSpan into SEG_STAGE, which
|
||||
// retires with the record that named it (rule C), so the applier copies the bytes here
|
||||
// rather than keeping the span: a rebuild happens at the next bind, which may be a frame
|
||||
@@ -1150,7 +1150,7 @@ namespace MobileGL::MG_Pipe {
|
||||
Uint64 MGPipeApplierShareGroupKeyFor(Uint64 sessionKey, Uint64 contextToken);
|
||||
|
||||
// ---------------------------------------------------------------------------------
|
||||
// P5e: THE BARRIERED PREDICATE (MG_Remote/CONTRACT-P5E.md §2.1, ruling 3)
|
||||
// P5e: THE BARRIERED PREDICATE (docs/archive/contracts/CONTRACT-P5E.md §2.1, ruling 3)
|
||||
// ---------------------------------------------------------------------------------
|
||||
//
|
||||
// ONE FUNCTION, TWO CALLERS, AND THAT IS THE WHOLE POINT. The client calls it at the emit
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
// MGPipeContext (plan section 4.3).
|
||||
// Flags : kNone | kNeedsAck | kHasBlob | kVarTail | kHostSpan | kReplySlot | kOptional
|
||||
// WaitClass : kWaitNone | kWaitApplied | kWaitReply | kWaitPresent
|
||||
// P5e (MG_Remote/CONTRACT-P5E.md section 2.2). WHAT THE CLIENT DOES AFTER IT HAS
|
||||
// P5e (docs/archive/contracts/CONTRACT-P5E.md section 2.2). WHAT THE CLIENT DOES AFTER IT HAS
|
||||
// PUBLISHED A RECORD OF THIS CALL, on a server that publishes kCapRunAheadApply.
|
||||
// It is A VALUE AND NOT A NEW OP: the opcode order and the flag column are
|
||||
// untouched, and gen_pipe.py emits the column beside kMGPipeCallFlags as
|
||||
@@ -84,7 +84,7 @@
|
||||
// kCtxVerb 20 3 context-reading transfer calls + the 10 commands, plus the five
|
||||
// P5b-appended verbs (bind_shader_image, patch_parameter,
|
||||
// bind_stream_output, set_storage_block_binding,
|
||||
// copy_framebuffer_to_texture - MG_Remote/CONTRACT-P5B.md), plus
|
||||
// copy_framebuffer_to_texture - docs/archive/contracts/CONTRACT-P5B.md), plus
|
||||
// delete_stream_output 1 and read_pixels_to_buffer 1
|
||||
// total 85
|
||||
//
|
||||
@@ -123,7 +123,7 @@
|
||||
// 76 unique records. The catalogue footer's "ShaderStorageBlockBinding is folded into the
|
||||
// reflection archive" is CORRECTED by the row: the archive carries the bindings the
|
||||
// program LINKED with, and glShaderStorageBlockBinding moves one AFTER link.
|
||||
// - P5c (MG_Remote/CONTRACT-P5C.md §5.1/§5.2) appended TWO more after those (opcodes 77..78),
|
||||
// - P5c (docs/archive/contracts/CONTRACT-P5C.md §5.1/§5.2) appended TWO more after those (opcodes 77..78),
|
||||
// same rule: applier_reset, the make-current edge's server-side reset that used to be a
|
||||
// GL-thread direct call into server memory, and object_death, the framebuffer family's
|
||||
// FIRST wire delete opcode and the handle-keyed replacement for the death-notice mailbox.
|
||||
@@ -134,7 +134,7 @@
|
||||
// routed through gMGPipeContext like its seventeen siblings, and under monolith it has no
|
||||
// producer at all - the fields keep coming through the residual fill, byte for byte as
|
||||
// before (G1). 79 unique records.
|
||||
// - P5e (MG_Remote/CONTRACT-P5E.md section 1) appended ONE more (opcode 80):
|
||||
// - P5e (docs/archive/contracts/CONTRACT-P5E.md section 1) appended ONE more (opcode 80):
|
||||
// set_program_bindings, the three POST-LINK mutable reflection fields - the uniform-block
|
||||
// bindings, the sampler uniform units and the name-keyed storage-block override map. They
|
||||
// live inside the LinkArtifacts the reflection archive snapshots, and all three move AFTER
|
||||
@@ -143,7 +143,7 @@
|
||||
// refuses it by name until package pg wires the emitter, exactly as set_shader_buffers has
|
||||
// sat catalogued-and-dead since P4a. 80 unique records.
|
||||
// - delete_stream_output (opcode 81) took the XFB object's deletion across; 81 records.
|
||||
// - P9 (MG_Remote/CONTRACT-P9.md §1) appended TWO more (opcodes 82..83):
|
||||
// - P9 (docs/archive/contracts/CONTRACT-P9.md §1) appended TWO more (opcodes 82..83):
|
||||
// read_pixels_to_buffer and get_texture_image_to_buffer, the pack-buffer halves of the two
|
||||
// readbacks, answered by nothing (ID-57's fire-and-forget). Like P5b's five they reach
|
||||
// WireVerbSink only and have no monolith producer. 83 unique records.
|
||||
@@ -294,7 +294,7 @@
|
||||
/* glWaitSync - WaitSync, the GPU-side wait, distinct from FenceWait's client-side one. */ \
|
||||
/* TimeoutNs is GL_TIMEOUT_IGNORED by contract. */ \
|
||||
X(FenceWaitServer, MGPFenceWait, kScreen, kNone, kWaitNone) \
|
||||
/* ---- APPENDED BY P5b (MG_Remote/CONTRACT-P5B.md): five GLFunctionsTable verbs the ---- */ \
|
||||
/* ---- APPENDED BY P5b (docs/archive/contracts/CONTRACT-P5B.md): five GLFunctionsTable verbs the ---- */ \
|
||||
/* ---- class-C census measured as first blockers and that no existing row could carry. ---- */ \
|
||||
/* ---- Opcodes 72..76. Every one reaches WireVerbSink, none has an MGPipeApply* entry ---- */ \
|
||||
/* ---- point, and under monolith none has a producer - the backend slot is called ---- */ \
|
||||
@@ -313,7 +313,7 @@
|
||||
/* glCopyTexImage2D / glCopyTexSubImage2D - a copy whose SOURCE is the read framebuffer, */ \
|
||||
/* which resource_copy_region (resource -> resource) cannot express. */ \
|
||||
X(CopyFramebufferToTexture, MGPCopyFromFramebuffer, kCtxVerb, kNone, kWaitNone) \
|
||||
/* ---- APPENDED BY P5c (MG_Remote/CONTRACT-P5C.md §5): the two control records. Opcodes ---- */ \
|
||||
/* ---- APPENDED BY P5c (docs/archive/contracts/CONTRACT-P5C.md §5): the two control records. Opcodes ---- */ \
|
||||
/* ---- 77..78. Neither has an MGPipeApply* entry point and neither gains one: both reach ---- */ \
|
||||
/* ---- WireVerbSink, and under monolith neither has a producer - the reset is a direct ---- */ \
|
||||
/* ---- MGPipeApplierReset() call and the death notice's mailbox hop, byte for byte as ---- */ \
|
||||
@@ -340,7 +340,7 @@
|
||||
/* ---- (PipeFill.cpp gates both the emission and the residual-fill skip on it): under ---- */ \
|
||||
/* ---- monolith there is no producer and the fields keep being pulled, byte for byte (G1). ---- */ \
|
||||
X(SetContextValues, MGPContextValues, kCtxState, kNone, kWaitNone) \
|
||||
/* ---- P5e (MG_Remote/CONTRACT-P5E.md §1), opcode 80: the post-link binding record. ------ */ \
|
||||
/* ---- P5e (docs/archive/contracts/CONTRACT-P5E.md §1), opcode 80: the post-link binding record. ------ */ \
|
||||
/* ---- THREE POST-LINK MUTABLE REFLECTION FIELDS LIVE INSIDE THE FRONTEND'S LinkArtifacts ---- */ \
|
||||
/* ---- and therefore inside the archive create_shader_state carries - but glUniformBlock- ---- */ \
|
||||
/* ---- Binding, glUniform1i on a sampler and glShaderStorageBlockBinding all move one ---- */ \
|
||||
@@ -355,7 +355,7 @@
|
||||
X(SetProgramBindings, MGPProgramBindings, kCtxState, kVarTail|kHostSpan, kWaitNone) \
|
||||
/* Deletion carries the GL argument and its never-reused capture identity. */ \
|
||||
X(DeleteStreamOutput, MGPStreamOutputBind, kCtxVerb, kNone, kWaitNone) \
|
||||
/* ---- APPENDED BY P9 (MG_Remote/CONTRACT-P9.md §1), opcodes 82..83: the pack-buffer ---- */ \
|
||||
/* ---- APPENDED BY P9 (docs/archive/contracts/CONTRACT-P9.md §1), opcodes 82..83: the pack-buffer ---- */ \
|
||||
/* ---- halves of read_pixels and get_texture_image. The reply-slot rows above keep every ---- */ \
|
||||
/* ---- read into client memory; a read whose destination is a bound PIXEL_PACK_BUFFER ---- */ \
|
||||
/* ---- crosses as one of these instead, names the buffer by handle, and is answered by ---- */ \
|
||||
@@ -377,7 +377,7 @@
|
||||
/* ---- kWaitNone: the apply reads no client memory and the record's placement in the ring ---- */ \
|
||||
/* ---- is the whole of its ordering. ---- */ \
|
||||
X(BindContext, MGPBindContext, kScreen, kNone, kWaitNone) \
|
||||
/* ---- APPENDED FOR SHARED IMAGES (docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md), ---- */ \
|
||||
/* ---- APPENDED FOR SHARED IMAGES (docs/archive/notes/anland/plan-ahb-dmabuf.md), ---- */ \
|
||||
/* ---- opcode 85: allocate / import / release / present / attach of a server-allocated ---- */ \
|
||||
/* ---- colour buffer exported as a dma-buf. kScreen: the image table is the server's, and ---- */ \
|
||||
/* ---- present / attach act on the session's current context the way bind_context does. ---- */ \
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
#define MGP_FIELDS_MGPStreamOutputTargets(F) \
|
||||
F(Count) F(Generation) F(ContentHash)
|
||||
|
||||
// P5e (MG_Remote/CONTRACT-P5E.md §1): set_program_bindings and its two tail element types. The
|
||||
// P5e (docs/archive/contracts/CONTRACT-P5E.md §1): set_program_bindings and its two tail element types. The
|
||||
// third tail's element embeds an MGHostSpan, which has a list of its own below, so the
|
||||
// comparator sees the NAME SPAN's four members rather than memcmp'ing a struct with a pointer
|
||||
// and a pad word in it - the exact false-difference MGPSamplerDesc's blob used to produce.
|
||||
@@ -269,7 +269,7 @@
|
||||
#define MGP_FIELDS_MGPSurfaceInfo(F) \
|
||||
F(Width) F(Height) F(InternalFormat) F(Samples) F(Layers) F(IsDefault)
|
||||
|
||||
// ---- P5b's five appended rows (MG_Remote/CONTRACT-P5B.md). Pad-named members excluded, as
|
||||
// ---- P5b's five appended rows (docs/archive/contracts/CONTRACT-P5B.md). Pad-named members excluded, as
|
||||
// everywhere; MGPStorageBlockBinding's Name is an MGPBlobRef and recurses into that list.
|
||||
|
||||
#define MGP_FIELDS_MGPImageBind(F) \
|
||||
@@ -288,7 +288,7 @@
|
||||
F(Dst) F(Target) F(Level) F(InternalFormat) F(X) F(Y) F(Width) F(Height) F(XOffset) F(YOffset) \
|
||||
F(SubImage)
|
||||
|
||||
// ---- P5c's two appended rows (MG_Remote/CONTRACT-P5C.md §5). object_death's payload IS
|
||||
// ---- P5c's two appended rows (docs/archive/contracts/CONTRACT-P5C.md §5). object_death's payload IS
|
||||
// MGPHandleOnly, whose list already exists above; applier_reset's is one field.
|
||||
|
||||
#define MGP_FIELDS_MGPApplierReset(F) \
|
||||
|
||||
@@ -146,7 +146,7 @@ namespace MobileGL::MG_Pipe {
|
||||
// explicitly promises it is not ("zero serialisation cost on the
|
||||
// monolith path").
|
||||
// SetProgramBindings THREE tails in three index spaces plus a PARALLEL NAME ARRAY
|
||||
// (P5e, MG_Remote/CONTRACT-P5E.md §1/§5.5). One `varTail` +
|
||||
// (P5e, docs/archive/contracts/CONTRACT-P5E.md §1/§5.5). One `varTail` +
|
||||
// `varTailCount` pair cannot express three runs at all, and the
|
||||
// fourth argument is not a run: the storage-override key is a
|
||||
// `MGHostSpan` on the wire and a plain `const char*` under monolith,
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace MobileGL::MG_Pipe {
|
||||
return false;
|
||||
}
|
||||
|
||||
// ---- P5b (MG_Remote/CONTRACT-P5B.md): the rows the four migration packages consume.
|
||||
// ---- P5b (docs/archive/contracts/CONTRACT-P5B.md): the rows the four migration packages consume.
|
||||
//
|
||||
// Every one below is a GLFunctionsTable verb with NO MGPipeApply* entry point - the
|
||||
// census's correction - so, exactly like the five above, the codec validates and hands
|
||||
@@ -212,7 +212,7 @@ namespace MobileGL::MG_Pipe {
|
||||
return false;
|
||||
}
|
||||
|
||||
// ---- P5c (MG_Remote/CONTRACT-P5C.md §5): the two control records, opcodes 77..78.
|
||||
// ---- P5c (docs/archive/contracts/CONTRACT-P5C.md §5): the two control records, opcodes 77..78.
|
||||
//
|
||||
// Same hand-over shape as the P5b rows: the codec validates the record (a fixed-size
|
||||
// POD, no blob, no tail) and the SERVER'S sink does the work - OnApplierReset runs the
|
||||
@@ -244,7 +244,7 @@ namespace MobileGL::MG_Pipe {
|
||||
return false;
|
||||
}
|
||||
|
||||
// ---- shared images, opcode 85 (docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md).
|
||||
// ---- shared images, opcode 85 (docs/archive/notes/anland/plan-ahb-dmabuf.md).
|
||||
// `seq` is the record's reply-slot id, which an Import's descriptor names on the aux
|
||||
// socket. True fills `reply`; false is a DECLINED answer.
|
||||
virtual Bool OnSharedImage(const MGPSharedImageOp& op, Uint64 seq,
|
||||
|
||||
@@ -379,7 +379,7 @@ inline constexpr MGPipeCallClass MGPipeCallClassFor(MGPWireOp op) {
|
||||
: kCallClassCount;
|
||||
}
|
||||
|
||||
// P5e (MG_Remote/CONTRACT-P5E.md 2.2): THE WAIT CLASS OF EVERY OPCODE, indexed the same way.
|
||||
// P5e (docs/archive/contracts/CONTRACT-P5E.md 2.2): THE WAIT CLASS OF EVERY OPCODE, indexed the same way.
|
||||
// Index 0 is kWaitClassCount - never a real class - for the flags table's reason: the one
|
||||
// caller that can pass an opcode this catalogue never produced is a decoder holding bytes off
|
||||
// a stream, and it must reach its own Fatal{ProtocolCorruption} rather than a wait decision.
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace MobileGL::MG_Remote::Client {
|
||||
void ReleaseEGLSurface(EGLSurface surface) override;
|
||||
void ReleaseEGLResources() override;
|
||||
|
||||
// ---- shared images (docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md) -------------
|
||||
// ---- shared images (docs/archive/notes/anland/plan-ahb-dmabuf.md) -------------
|
||||
Bool AllocateSharedImage(Uint32 width, Uint32 height, Uint32 fourcc,
|
||||
MG_Backend::SharedImageExport* out) override;
|
||||
Bool ImportSharedImage(int fd, Uint32 width, Uint32 height, Uint32 fourcc, Uint64* outId) override;
|
||||
|
||||
@@ -2994,7 +2994,7 @@ namespace MobileGL::MG_Remote::Client {
|
||||
|
||||
Transport::ITransport* ClientSession::Control_Plane() { return m_transport; }
|
||||
|
||||
// ---- P11 B2: T0 (MG_Remote/CONTRACT-P11.md B2) --------------------------------------------
|
||||
// ---- P11 B2: T0 (docs/archive/contracts/CONTRACT-P11.md B2) --------------------------------------------
|
||||
|
||||
namespace {
|
||||
Uint64 T0Key(MG_Pipe::MGPipeHandle handle) {
|
||||
|
||||
@@ -278,7 +278,7 @@ namespace MobileGL::MG_Remote::Client {
|
||||
Uint64* replySizeOut = nullptr, Bool wantReply = true,
|
||||
Bool willReadReply = true);
|
||||
|
||||
// ---- P11 B2: T0 (MG_Remote/CONTRACT-P11.md B2) ------------------------------------
|
||||
// ---- P11 B2: T0 (docs/archive/contracts/CONTRACT-P11.md B2) ------------------------------------
|
||||
//
|
||||
// Does this session adopt persistent stores through T0? Decided ONCE, lazily, at the first
|
||||
// map_persistent - the first moment it matters, and one at which the server's first native
|
||||
@@ -294,7 +294,7 @@ namespace MobileGL::MG_Remote::Client {
|
||||
// adopts it as the store's mapping - or null on DECLINED (the store stays T2).
|
||||
void* AdoptPersistentT0(const MG_Pipe::MGPHandleOnly& handle, Uint64 size, const void* seed);
|
||||
void* AdoptPersistentInProcess(const MG_Pipe::MGPHandleOnly& handle, Uint64 size, const void* seed);
|
||||
// shared_image (docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md): emits `op` and waits
|
||||
// shared_image (docs/archive/notes/anland/plan-ahb-dmabuf.md): emits `op` and waits
|
||||
// for its answer. `sendFd` >= 0 (an Import) is queued on the aux socket for the record's
|
||||
// seq BEFORE the record is published; `receivedFd` non-null (an Allocate) takes the
|
||||
// descriptor the server queued before its answer. False = DECLINED (the server's log says
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// changes class without changing the arithmetic is a build break rather than a behaviour
|
||||
// change nobody reviewed.
|
||||
//
|
||||
// P5b MOVES SLOTS FROM C TO B, ONE PACKAGE AT A TIME (MG_Remote/CONTRACT-P5B.md §7). The three
|
||||
// P5b MOVES SLOTS FROM C TO B, ONE PACKAGE AT A TIME (docs/archive/contracts/CONTRACT-P5B.md §7). The three
|
||||
// numbers above are the partition AT THE P5b CONTRACT COMMIT and they are the ones the contract
|
||||
// states; the arithmetic below is what the tree currently has, and the per-package ownership
|
||||
// assertions say which package moved which slot. On this head t2 has landed: class B is 5 + 6
|
||||
@@ -506,8 +506,8 @@ namespace MobileGL::MG_Remote::Client {
|
||||
// CLASS C - each remaining slot names its first blocker.
|
||||
// =============================================================================
|
||||
//
|
||||
// PARTITIONED BY THE P5b PACKAGE THAT OWNS THE FLIP (MG_Remote/CONTRACT-P5B.md,
|
||||
// ~/w7/notes/p5b/BRIEF-P5B.md), so that four packages migrating in parallel edit four
|
||||
// PARTITIONED BY THE P5b PACKAGE THAT OWNS THE FLIP (docs/archive/contracts/CONTRACT-P5B.md,
|
||||
// docs/archive/notes/p5b/BRIEF-P5B.md), so that four packages migrating in parallel edit four
|
||||
// DISJOINT lists and four DISJOINT counts rather than one list and one number. To flip a
|
||||
// slot a package (1) removes its X row from ITS list, (2) assigns the real emitter in
|
||||
// BuildRemoteEmitTable's class-B block, (3) raises ITS kEmittedSlots* by one. The
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
// log level, MGLOG_F + std::abort.
|
||||
//
|
||||
// WHICH SLOTS GET A REAL EMITTER IS DECIDED BY THE VERB CENSUS (R-4), not guessed here:
|
||||
// ~/w7/notes/p5/verb-census.md. CONTRACT-P5.md §7 carries the resulting THREE-CLASS SPLIT and
|
||||
// docs/archive/notes/p5/verb-census.md. CONTRACT-P5.md §7 carries the resulting THREE-CLASS SPLIT and
|
||||
// it is not to be re-derived:
|
||||
//
|
||||
// A. ANSWERED LOCALLY from the caps mirror, never emitted and never Fatal (R-15) - two
|
||||
|
||||
@@ -356,7 +356,7 @@ namespace MobileGL::MG_Remote::Client {
|
||||
// same head for ever. Measured on the device (P12miss): `want=310` on every miss while
|
||||
// `replySeq` climbed from 1,504 to 102,915 - one answer lost to a bounded buffer wedges
|
||||
// the window permanently, and with 4,536 deferred answers that is a certainty rather
|
||||
// than a risk. notes/p12/CREATE-WINDOW-MEASURED.md section 8 has the numbers and the
|
||||
// than a risk. docs/archive/notes/p12/CREATE-WINDOW-MEASURED.md section 8 has the numbers and the
|
||||
// shape of the fix (abandon the head: un-latch the object, add it to the suspect list,
|
||||
// and pop - the DECLINE path reused for "unknown").
|
||||
//
|
||||
@@ -388,7 +388,7 @@ namespace MobileGL::MG_Remote::Client {
|
||||
// the drain above reads them, so a bit keyed on wantReply disables the mechanism it is
|
||||
// meant to enable. The bit has to mean "this answer will never be read" - which is true
|
||||
// of respecify/params/sub-data and false of a windowed create. See
|
||||
// docs/Disaggregated/notes/p12/CREATE-WINDOW-MEASURED.md section 7, reviewed).
|
||||
// docs/archive/notes/p12/CREATE-WINDOW-MEASURED.md section 7, reviewed).
|
||||
//
|
||||
// The gates that pin it are in MG_Test/Wire/RemoteClientControls.inc, and they still hold:
|
||||
// the window is a coherent mechanism, it is simply unusable on a frame with this much
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-only
|
||||
// End of Source File Header
|
||||
|
||||
// P11 B2 (MG_Remote/CONTRACT-P11.md B2): the server's end of T0's descriptor channel.
|
||||
// P11 B2 (docs/archive/contracts/CONTRACT-P11.md B2): the server's end of T0's descriptor channel.
|
||||
//
|
||||
// WHO READS THE FD, AND WHY IT CANNOT DEADLOCK THE APPLY THREAD. The APPLY THREAD reads it,
|
||||
// inline, when it decodes the map_persistent record whose seq the Offer names - nothing else reads
|
||||
|
||||
@@ -326,8 +326,7 @@ namespace MobileGL::MG_Remote::Server {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ---- P5c ct (MG_Remote/CONTRACT-P5C.md §5) ------------------------------------------
|
||||
// ---- P5c ct (docs/archive/contracts/CONTRACT-P5C.md §5) ------------------------------------------
|
||||
//
|
||||
// TWO CONTROL RECORDS, NO BACKEND TABLE AND NO DECLINE ARM. Neither body consults
|
||||
// Table(): the reset belongs to the applier this process owns, and the death release
|
||||
|
||||
@@ -184,7 +184,7 @@ namespace MobileGL::MG_Remote::Server {
|
||||
void ReleaseQueries();
|
||||
Bool OnPresent(const MG_Pipe::MGPPresent& present) override;
|
||||
|
||||
// ---- P5c ct (MG_Remote/CONTRACT-P5C.md §5): the two control records ----------------
|
||||
// ---- P5c ct (docs/archive/contracts/CONTRACT-P5C.md §5): the two control records ----------------
|
||||
//
|
||||
// REAL BODIES FROM THE DAY THE ROWS EXIST, not the P5b stub shape: the rows were
|
||||
// appended by the same package that lands these bodies, so there is no window in
|
||||
@@ -210,7 +210,7 @@ namespace MobileGL::MG_Remote::Server {
|
||||
// rather than a silent bind. Token 0 (the release) is always legal.
|
||||
Bool OnBindContext(const MG_Pipe::MGPBindContext& bind) override;
|
||||
|
||||
// shared_image, opcode 85 (docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md): the
|
||||
// shared_image, opcode 85 (docs/archive/notes/anland/plan-ahb-dmabuf.md): the
|
||||
// session's image table (allocate / import / release) and the two GL-ordered operations
|
||||
// (present the default framebuffer into an image, attach an image to a texture).
|
||||
Bool OnSharedImage(const MG_Pipe::MGPSharedImageOp& op, Uint64 seq,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-only
|
||||
// End of Source File Header
|
||||
|
||||
// PH-7 (5), CONTRACT-P7 §12, notes/p7/ph-f.md §6.4. THE TCP SUPERVISOR AUTHENTICATES BEFORE IT
|
||||
// PH-7 (5), CONTRACT-P7 §12, docs/archive/notes/p7/ph-f.md §6.4. THE TCP SUPERVISOR AUTHENTICATES BEFORE IT
|
||||
// FORKS, AND AN UNAUTHENTICATED PEER'S WORK IS BOUNDED.
|
||||
//
|
||||
// Two exposures were on the tree before wave 2-F and were recorded by its review:
|
||||
|
||||
@@ -321,7 +321,7 @@ int LeaveBeforeAccept(int sourceFd, DataSource sourceKind, int code) {
|
||||
|
||||
// P12 (D8). A FORKED SESSION CHILD DIES WITH ITS SUPERVISOR. The child used to outlive a supervisor
|
||||
// that was killed (MobileGLServerService.onDestroy destroys only the supervisor), holding its client
|
||||
// and its GPU context until that client went away (notes/p65/code-review-findings.md:9). With the
|
||||
// and its GPU context until that client went away (docs/archive/notes/p65/code-review-findings.md:9). With the
|
||||
// parent-death signal the kernel SIGKILLs it the moment the supervisor goes - and the getppid()
|
||||
// check closes the race of a supervisor that died between fork() and the prctl. Linux (and Android)
|
||||
// only; the signal fires when the THREAD that forked exits, and both fork sites run on the
|
||||
|
||||
@@ -1134,7 +1134,7 @@ namespace MobileGL::MG_Remote::Server {
|
||||
std::memory_order_release, std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
// ---- P11 B2: T0 (MG_Remote/CONTRACT-P11.md B2) ------------------------------------------
|
||||
// ---- P11 B2: T0 (docs/archive/contracts/CONTRACT-P11.md B2) ------------------------------------------
|
||||
|
||||
namespace {
|
||||
// THE POST VERDICT IS THE PROCESS'S, like DriverPost's: the driver and the device do not
|
||||
|
||||
@@ -301,7 +301,7 @@ namespace MobileGL::MG_Remote::Server {
|
||||
Transport::RoleMemorySample SampleMemory() const;
|
||||
void LogMemory(const char* phase) const;
|
||||
|
||||
// ---- P11 B2: T0 (MG_Remote/CONTRACT-P11.md B2) --------------------------------------
|
||||
// ---- P11 B2: T0 (docs/archive/contracts/CONTRACT-P11.md B2) --------------------------------------
|
||||
//
|
||||
// The client's Hello asked T0 (LinkTerms.adoptTier = 0 over shared segments).
|
||||
Bool AdoptT0Asked() const { return m_adoptT0Asked; }
|
||||
@@ -337,7 +337,7 @@ namespace MobileGL::MG_Remote::Server {
|
||||
Bool AdoptT0Quiet() const { return m_adoptT0Quiet; }
|
||||
AdoptInbox& T0Inbox() { return m_adoptInbox; }
|
||||
|
||||
// ---- shared images (docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md) -------------
|
||||
// ---- shared images (docs/archive/notes/anland/plan-ahb-dmabuf.md) -------------
|
||||
// The images this session allocated or imported and has not released; emptied when the
|
||||
// session closes. The control transport is where an allocation's descriptor goes out.
|
||||
SharedImages::SessionHolder& SharedImageHolder() { return m_sharedImages; }
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
// SHARED IMAGES: colour buffers the server allocates and hands to clients as dma-buf descriptors,
|
||||
// so a frame one client renders can be sampled by another (a Wayland window by its compositor)
|
||||
// without leaving GPU memory (docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md).
|
||||
// without leaving GPU memory (docs/archive/notes/anland/plan-ahb-dmabuf.md).
|
||||
//
|
||||
// THE SERVER IS THE ALLOCATOR AND THE ONLY IMPORTER. An image is an AHardwareBuffer; what leaves
|
||||
// the process is a duplicate of its first native-handle descriptor, which on every Android kernel
|
||||
@@ -174,7 +174,7 @@ namespace MobileGL::MG_Remote::Server::SharedImages {
|
||||
// Live images, for tests and diagnostics.
|
||||
SizeT LiveCount();
|
||||
|
||||
// ---- synchronisation (docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md) ---------------
|
||||
// ---- synchronisation (docs/archive/notes/anland/plan-ahb-dmabuf.md) ---------------
|
||||
//
|
||||
// THE SERVER ORDERS THE IMAGE BETWEEN ITS SESSIONS, the way a kernel's implicit sync would:
|
||||
// a writer publishes the fence of its write and moves on; a reader that finds the generation
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-only
|
||||
// End of Source File Header
|
||||
|
||||
// P11 B2 (MG_Remote/CONTRACT-P11.md B2): T0, the zero-copy adoption of a persistently mapped
|
||||
// P11 B2 (docs/archive/contracts/CONTRACT-P11.md B2): T0, the zero-copy adoption of a persistently mapped
|
||||
// store. The CLIENT allocates the store as an AHardwareBuffer (AHB), keeps a CPU lock on it for
|
||||
// the store's life and uses that pointer as the adopted mapping; the SERVER imports the same
|
||||
// pages as the store's resident twin (Espryt glBufferStorageExternalEXT, Magma
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-only
|
||||
// End of Source File Header
|
||||
|
||||
// P11 A1 + B2 (MG_Remote/CONTRACT-P11.md §1 and B2): THE PERSISTENT-MAP ADOPTION TIER IS ASKED
|
||||
// P11 A1 + B2 (docs/archive/contracts/CONTRACT-P11.md §1 and B2): THE PERSISTENT-MAP ADOPTION TIER IS ASKED
|
||||
// AT THE HANDSHAKE, BY THE SIDE THAT KNOWS THE DATA PLANE, BEFORE THE FIRST map_persistent.
|
||||
//
|
||||
// Tier names follow docs/Disaggregated/design/07: T0 = the client allocates an AHardwareBuffer
|
||||
|
||||
@@ -759,7 +759,7 @@ namespace MobileGL::MG_Remote::Wire {
|
||||
}
|
||||
case MGPWireOp::SetProgramBindings: {
|
||||
// THREE TAILS, THREE COUNTS, THREE INDEX SPACES (P5e,
|
||||
// MG_Remote/CONTRACT-P5E.md §1): Int32[BlockBindingCount] in GL uniform-block index
|
||||
// docs/archive/contracts/CONTRACT-P5E.md §1): Int32[BlockBindingCount] in GL uniform-block index
|
||||
// order, MGPProgramSamplerUnit[SamplerUnitCount] ascending by Location, and
|
||||
// MGPProgramStorageOverride[StorageOverrideCount] whose Name is a host span staged
|
||||
// whole - the override map is name-keyed by design.
|
||||
@@ -2138,7 +2138,7 @@ namespace MobileGL::MG_Remote::Wire {
|
||||
return true;
|
||||
|
||||
case MGPWireOp::SetShaderBuffers: {
|
||||
// P5e (sb, MG_Remote/CONTRACT-P5E.md §5.6): THE APPLIER ENTRY POINT EXISTS NOW and
|
||||
// P5e (sb, docs/archive/contracts/CONTRACT-P5E.md §5.6): THE APPLIER ENTRY POINT EXISTS NOW and
|
||||
// this is the row's sink. The paragraph that stood here said "no applier entry
|
||||
// point exists, and P5 does not invent one: the call is on BRIEF §4's exclusion
|
||||
// list" - true for the whole of P5 through P5d, and withdrawn by the phase whose
|
||||
@@ -2175,7 +2175,7 @@ namespace MobileGL::MG_Remote::Wire {
|
||||
return false;
|
||||
|
||||
case MGPWireOp::SetProgramBindings: {
|
||||
// P5e, opcode 80 (MG_Remote/CONTRACT-P5E.md §1). c0e wrote the shape check and left
|
||||
// P5e, opcode 80 (docs/archive/contracts/CONTRACT-P5E.md §1). c0e wrote the shape check and left
|
||||
// the arm declining; PACKAGE pg COMPLETES IT. What the record needs before its
|
||||
// consumer sees it is its shape - the three declared counts against their bounds
|
||||
// and the three-tail arithmetic, both of which MGPipeWireRecordLayout above has
|
||||
@@ -2341,7 +2341,7 @@ namespace MobileGL::MG_Remote::Wire {
|
||||
case MGPWireOp::ResourceSubDataComplete:
|
||||
// RETIRED (P9 W2). It was to be the forward terminator of a SERVER-initiated texture
|
||||
// pull (section 7.1), and no such pull exists: a re-mint reads the GPU level and the
|
||||
// server's own staged store (notes/p9/W2-REMINT.md). The row stays because opcodes
|
||||
// server's own staged store (docs/archive/notes/p9/W2-REMINT.md). The row stays because opcodes
|
||||
// only ever grow; no client emits it and a record that claims it is declined.
|
||||
return false;
|
||||
|
||||
@@ -2522,7 +2522,7 @@ namespace MobileGL::MG_Remote::Wire {
|
||||
m_verbs->OnCopyFramebufferToTexture(
|
||||
*static_cast<const MGPCopyFromFramebuffer*>(payload));
|
||||
|
||||
// ---- P5c's two control records, opcodes 77..78 (MG_Remote/CONTRACT-P5C.md §5) --------
|
||||
// ---- P5c's two control records, opcodes 77..78 (docs/archive/contracts/CONTRACT-P5C.md §5) --------
|
||||
//
|
||||
// Fixed-size PODs the bounds gate has already proved; neither carries a blob, a tail
|
||||
// or a reply, so each arm hands over and stops. ObjectDeath's null-handle refusal is
|
||||
@@ -2546,7 +2546,7 @@ namespace MobileGL::MG_Remote::Wire {
|
||||
return m_verbs != nullptr &&
|
||||
m_verbs->OnBindContext(*static_cast<const MGPBindContext*>(payload));
|
||||
|
||||
// ---- shared images (docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md), opcode 85.
|
||||
// ---- shared images (docs/archive/notes/anland/plan-ahb-dmabuf.md), opcode 85.
|
||||
//
|
||||
// A fixed-size POD; every operation is answered, and a refusal is an answer (DECLINED,
|
||||
// the sink logs why) rather than a fault: an import of a descriptor this server never
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
// G3: the MGPipe record codec. Owner: package w1.
|
||||
//
|
||||
// This header is the CONTRACT (MG_Remote/CONTRACT-P5.md) in C++ form; P5's c0 package wrote
|
||||
// This header is the CONTRACT (docs/archive/contracts/CONTRACT-P5.md) in C++ form; P5's c0 package wrote
|
||||
// it so the other seven could compile on day one against signatures that cannot then move
|
||||
// under them. Every body below is a named Fatal until w1 lands the real one.
|
||||
//
|
||||
@@ -203,7 +203,7 @@ namespace MobileGL::MG_Remote::Wire {
|
||||
// nothing now and is stated now because the phase that arms kDrawHasUserIndices would
|
||||
// otherwise have to discover it as a misaligned load on a device.
|
||||
// THREE TAILS AND NOT TWO SINCE P5e. set_program_bindings (opcode 80,
|
||||
// MG_Remote/CONTRACT-P5E.md §1) carries the uniform-block bindings, the sampler units and
|
||||
// docs/archive/contracts/CONTRACT-P5E.md §1) carries the uniform-block bindings, the sampler units and
|
||||
// the storage-override map as three arrays in three different index spaces, so the array
|
||||
// that used to be exactly "the two-tail rows plus draw_vbo's conditional second" grew by
|
||||
// one. Every loop over TailCount below already reads the count rather than the literal 2;
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace MobileGL::MG_State::GLState {
|
||||
void NoteBufferChanged() { ++m_anyBufferChangeGeneration; }
|
||||
Uint64 GetAnyBufferChangeGeneration() const { return m_anyBufferChangeGeneration; }
|
||||
|
||||
// P5e (sb, MG_Remote/CONTRACT-P5E.md §1, §5.6). "DID ANY INDEXED BINDING POINT OF THIS
|
||||
// P5e (sb, docs/archive/contracts/CONTRACT-P5E.md §1, §5.6). "DID ANY INDEXED BINDING POINT OF THIS
|
||||
// TARGET MOVE" - one counter per BufferBindPointTargets entry, and it is the P4b hole
|
||||
// closed rather than a new convenience.
|
||||
//
|
||||
|
||||
@@ -298,7 +298,7 @@ TEST_F(FieldOwnershipTest, VerbBoundaryOpsCoverEveryVerbShapedCall) {
|
||||
EXPECT_EQ(MGPipeVerbForWireOp(MGPWireOp::ResumeStreamOutput), MGPipeVerb::ResumeTransformFeedback);
|
||||
EXPECT_EQ(MGPipeVerbForWireOp(MGPWireOp::GenerateMipmap), MGPipeVerb::GenerateMipmap);
|
||||
EXPECT_EQ(MGPipeVerbForWireOp(MGPWireOp::GetTextureImage), MGPipeVerb::GetTextureImage);
|
||||
// P5b (MG_Remote/CONTRACT-P5B.md): the renamed boundary the file left to "the phase that
|
||||
// P5b (docs/archive/contracts/CONTRACT-P5B.md): the renamed boundary the file left to "the phase that
|
||||
// emits it" - resource_copy_region is glCopyImageSubData only - and the five appended verbs,
|
||||
// each stamped as the GLFunctionsTable verb it reproduces. copy_framebuffer_to_texture also
|
||||
// carries glCopyTexSubImage2D and stamps CopyTexImage2D for both: one kBlitOrCopy mask.
|
||||
|
||||
@@ -142,10 +142,10 @@ TEST(PipeCatalogue, GeneratedTablesHoldTheWholeCatalogue) {
|
||||
EXPECT_EQ(kMGPipeContextCallCount, kMGPipeCallCount - ClassCount<kScreen>());
|
||||
|
||||
// The per-class counts PipeCalls.def documents in its header.
|
||||
// kScreen is 11 + P5c's applier_reset (MG_Remote/CONTRACT-P5C.md §5.1); kCtxObject is
|
||||
// kScreen is 11 + P5c's applier_reset (docs/archive/contracts/CONTRACT-P5C.md §5.1); kCtxObject is
|
||||
// 9 + P5c's object_death (§5.2), the framebuffer family's first wire delete opcode.
|
||||
// kCtxState is 17 + P5c rv's set_context_values (§5.3), the residual-value record, + P5e's
|
||||
// set_program_bindings (MG_Remote/CONTRACT-P5E.md §1), the post-link binding record.
|
||||
// set_program_bindings (docs/archive/contracts/CONTRACT-P5E.md §1), the post-link binding record.
|
||||
// + P14 S1's bind_context (docs/Disaggregated/design/11-state-ownership.md), the in-band
|
||||
// context binding - a kScreen row for applier_reset's reason: a context switch is a
|
||||
// whole-session edge, not a context-family verb.
|
||||
@@ -153,9 +153,9 @@ TEST(PipeCatalogue, GeneratedTablesHoldTheWholeCatalogue) {
|
||||
EXPECT_EQ(ClassCount<kCtxQuery>(), 8u);
|
||||
EXPECT_EQ(ClassCount<kCtxCso>(), 13u);
|
||||
EXPECT_EQ(ClassCount<kCtxState>(), 19u);
|
||||
// + P9's get_texture_image_to_buffer (MG_Remote/CONTRACT-P9.md §1), beside get_texture_image.
|
||||
// + P9's get_texture_image_to_buffer (docs/archive/contracts/CONTRACT-P9.md §1), beside get_texture_image.
|
||||
EXPECT_EQ(ClassCount<kCtxObject>(), 11u);
|
||||
// 13 + the five P5b-appended verbs (MG_Remote/CONTRACT-P5B.md): bind_shader_image,
|
||||
// 13 + the five P5b-appended verbs (docs/archive/contracts/CONTRACT-P5B.md): bind_shader_image,
|
||||
// patch_parameter, bind_stream_output, set_storage_block_binding,
|
||||
// copy_framebuffer_to_texture; + delete_stream_output; + P9's read_pixels_to_buffer.
|
||||
EXPECT_EQ(ClassCount<kCtxVerb>(), 20u);
|
||||
@@ -595,7 +595,7 @@ TEST(PipeCatalogue, LateArrivalsAreAppendedWithoutRenumbering) {
|
||||
EXPECT_EQ(static_cast<Uint16>(MGPWireOp::QueryTimestamp), 69);
|
||||
EXPECT_EQ(static_cast<Uint16>(MGPWireOp::QueryCounter), 70);
|
||||
EXPECT_EQ(static_cast<Uint16>(MGPWireOp::FenceWaitServer), 71);
|
||||
// P5b (MG_Remote/CONTRACT-P5B.md) appended five verbs AFTER P0's three late arrivals, by
|
||||
// P5b (docs/archive/contracts/CONTRACT-P5B.md) appended five verbs AFTER P0's three late arrivals, by
|
||||
// the same rule: opcodes 72..76, and nothing before them moved. The five are pinned by
|
||||
// VALUE, because the pin is the protocol - a row inserted ahead of one would silently
|
||||
// re-point every record a P5b package emits at the wrong arm.
|
||||
@@ -604,7 +604,7 @@ TEST(PipeCatalogue, LateArrivalsAreAppendedWithoutRenumbering) {
|
||||
EXPECT_EQ(static_cast<Uint16>(MGPWireOp::BindStreamOutput), 74);
|
||||
EXPECT_EQ(static_cast<Uint16>(MGPWireOp::SetStorageBlockBinding), 75);
|
||||
EXPECT_EQ(static_cast<Uint16>(MGPWireOp::CopyFramebufferToTexture), 76);
|
||||
// P5c (MG_Remote/CONTRACT-P5C.md §5) appended the two control records AFTER P5b's five, by
|
||||
// P5c (docs/archive/contracts/CONTRACT-P5C.md §5) appended the two control records AFTER P5b's five, by
|
||||
// the same rule: opcodes 77..78, and nothing before them moved. applier_reset is a kScreen
|
||||
// row (a make-current is a whole-server edge, exactly as FenceWaitServer is a screen call)
|
||||
// and object_death a kCtxObject one; both carry no blob, no reply and no tail.
|
||||
@@ -615,13 +615,13 @@ TEST(PipeCatalogue, LateArrivalsAreAppendedWithoutRenumbering) {
|
||||
// - fixed POD, no blob, no tail, no reply - with an MGPipeApply* entry point, which the two
|
||||
// control records deliberately do not have.
|
||||
EXPECT_EQ(static_cast<Uint16>(MGPWireOp::SetContextValues), 79);
|
||||
// P5e (MG_Remote/CONTRACT-P5E.md §1) appended ONE more, by the same rule: opcode 80, and
|
||||
// P5e (docs/archive/contracts/CONTRACT-P5E.md §1) appended ONE more, by the same rule: opcode 80, and
|
||||
// nothing before it moved. set_program_bindings is a kCtxState row with THREE tails and a
|
||||
// host span in the third; it lands with a null route and a sink that refuses it by name,
|
||||
// exactly as set_shader_buffers has sat catalogued-and-dead since P4a.
|
||||
EXPECT_EQ(static_cast<Uint16>(MGPWireOp::SetProgramBindings), 80);
|
||||
EXPECT_EQ(static_cast<Uint16>(MGPWireOp::DeleteStreamOutput), 81);
|
||||
// P9 (MG_Remote/CONTRACT-P9.md §1) appended the two pack-buffer readbacks, by the same rule:
|
||||
// P9 (docs/archive/contracts/CONTRACT-P9.md §1) appended the two pack-buffer readbacks, by the same rule:
|
||||
// opcodes 82..83, one payload, no flag at all - no reply slot, no blob, no tail.
|
||||
EXPECT_EQ(static_cast<Uint16>(MGPWireOp::ReadPixelsToBuffer), 82);
|
||||
EXPECT_EQ(static_cast<Uint16>(MGPWireOp::GetTextureImageToBuffer), 83);
|
||||
@@ -630,7 +630,7 @@ TEST(PipeCatalogue, LateArrivalsAreAppendedWithoutRenumbering) {
|
||||
// kScreen control record with the applier_reset shape - one POD, no blob, no tail, no reply
|
||||
// and no MGPipeApply* entry point - so the row beside it is pinned the same way.
|
||||
EXPECT_EQ(static_cast<Uint16>(MGPWireOp::BindContext), 84);
|
||||
// Shared images (docs/Disaggregated/notes/anland/plan-ahb-dmabuf.md) appended opcode 85 by the
|
||||
// Shared images (docs/archive/notes/anland/plan-ahb-dmabuf.md) appended opcode 85 by the
|
||||
// same rule: a kScreen row with a reply slot - every operation is answered.
|
||||
EXPECT_EQ(static_cast<Uint16>(MGPWireOp::SharedImage), 85);
|
||||
EXPECT_EQ(static_cast<Uint16>(MGPWireOp::kOpCount), 86);
|
||||
@@ -738,7 +738,7 @@ TEST(PipeCatalogue, LateArrivalsAreAppendedWithoutRenumbering) {
|
||||
EXPECT_EQ(kMGPipeClearValueClassUint + 1, kMGPipeClearValueClassCount);
|
||||
}
|
||||
|
||||
// ---- P5e: the wait-class column (MG_Remote/CONTRACT-P5E.md §2.2) --------------------------
|
||||
// ---- P5e: the wait-class column (docs/archive/contracts/CONTRACT-P5E.md §2.2) --------------------------
|
||||
//
|
||||
// THE POINT OF THIS CASE IS THAT IT DOES NOT READ PipeCalls.def. Every other statement about
|
||||
// the column - the generated table, the two gates in gen_pipe.py, the static_asserts in
|
||||
@@ -1020,14 +1020,14 @@ TEST(PipeCatalogue, FloatVectorsCompareBitwise) {
|
||||
// a cache that read the padding would mint a fresh CSO per call and the verify lane would
|
||||
// abort at random.
|
||||
TEST(PipeCatalogue, SixValueStructsHaveFieldLists) {
|
||||
// 72 through P5; P5b appended five call payloads (MG_Remote/CONTRACT-P5B.md: MGPImageBind,
|
||||
// 72 through P5; P5b appended five call payloads (docs/archive/contracts/CONTRACT-P5B.md: MGPImageBind,
|
||||
// MGPPatchParameter, MGPStreamOutputBind, MGPStorageBlockBinding, MGPCopyFromFramebuffer),
|
||||
// each with its own field list, so the comparator sees every one of them: 77. P5c appended
|
||||
// applier_reset's MGPApplierReset (CONTRACT-P5C.md §5.1) - object_death reuses
|
||||
// MGPHandleOnly, which has had a list since P0 - and rv added set_context_values'
|
||||
// MGPContextValues (§5.3): 79. P5e appended set_program_bindings' MGPProgramBindings AND
|
||||
// the two TAIL ELEMENT types beside it, MGPProgramSamplerUnit and MGPProgramStorageOverride
|
||||
// (MG_Remote/CONTRACT-P5E.md §1) - the tails are listed for the same reason MGPBufferRange
|
||||
// (docs/archive/contracts/CONTRACT-P5E.md §1) - the tails are listed for the same reason MGPBufferRange
|
||||
// and MGPVertexAttribWire are: the comparator has to see INTO an element whose members
|
||||
// include an MGHostSpan and a pad word, or it would memcmp the padding: 82. P9 appended the
|
||||
// pack-buffer readbacks' one payload, MGPReadbackToBuffer (CONTRACT-P9.md §1): 83. P14 S1
|
||||
@@ -1115,7 +1115,7 @@ TEST(PipeCatalogue, PipelineSubsetMembersArePinned) {
|
||||
// than a claim, since the static_assert beside kMGPipeCallbackCount only proves the two agree.
|
||||
// P9 took two more, neither of which ever had a producer: W2 deleted OnTexturePullRequest (a
|
||||
// texture re-mint never needs the client's texels - the server reads the GPU level and its own
|
||||
// staged store, notes/p9/W2-REMINT.md), and W3 deleted OnLog (the server's log lines are LogLine
|
||||
// staged store, docs/archive/notes/p9/W2-REMINT.md), and W3 deleted OnLog (the server's log lines are LogLine
|
||||
// frames on the control plane, MG_Remote/Transport/LogForward.h, not reverse records).
|
||||
//
|
||||
// THE CASE NAME STAYS "…HasTenCallbacks" DELIBERATELY. G2/G14 say the ctest name set only ever
|
||||
@@ -1436,18 +1436,18 @@ TEST(PipeCatalogue, EveryUnmigratedEmulationIsNamedOnce) {
|
||||
// new stall class the design admitted. It went because the stall class did: under a transport
|
||||
// the re-mint is the server's own (RequireImageBindableStorageByHandle reads the GPU level and
|
||||
// replays the staged store), the frontend arm that carried the marker is monolith-only, and no
|
||||
// pull protocol or ResourceSubDataComplete terminator exists (notes/p9/W2-REMINT.md).
|
||||
// pull protocol or ResourceSubDataComplete terminator exists (docs/archive/notes/p9/W2-REMINT.md).
|
||||
//
|
||||
// AND THE LIST HAD DRIFTED BY ONE UNTIL P8-B. The tree carried a sixth name this list never
|
||||
// had: "generate-mipmap-cpu-filter", the split arm's RGB16F/RGB32F refusal in
|
||||
// GenerateMipmapByRecord. P8-B2 retired it (the server filters its own level,
|
||||
// GenerateThreeChannelFloatMipmapOnServer), and P8-B1 retired the split arm's two
|
||||
// "generate-mipmap-storage" sites (the record's plan is the window). Every name left is on a
|
||||
// MONOLITH arm - the split arms no longer reach an unmigrated emulation (notes/p8/B.md).
|
||||
// MONOLITH arm - the split arms no longer reach an unmigrated emulation (docs/archive/notes/p8/B.md).
|
||||
//
|
||||
// THREE, NOT FOUR (P8-SE). "copy-image-shadow-mirror" sat after the mirror's own
|
||||
// `Transport != Monolith` return, so no transport ever reached it and on monolith it was a
|
||||
// no-op; the call and the name went together (notes/p8/SE.md).
|
||||
// no-op; the call and the name went together (docs/archive/notes/p8/SE.md).
|
||||
//
|
||||
// NONE (P13 W6). "get-tex-image-shadow" sat in GetTexImageViaShadowConversion, the monolith
|
||||
// frontend arm's shadow readback, and the two mipmap names in that arm's storage grow and CPU
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
// End of Source File Header
|
||||
|
||||
// P5e's set_shader_buffers - the INDEXED BUFFER BINDING POINTS - on both sides of the call
|
||||
// (MG_Remote/CONTRACT-P5E.md §5.6, rulings 10 and 11; package sb).
|
||||
// (docs/archive/contracts/CONTRACT-P5E.md §5.6, rulings 10 and 11; package sb).
|
||||
//
|
||||
// WHAT THIS SUITE IS FOR. Three properties of this family are invisible in a picture and are
|
||||
// exactly what an optimisation or a merge deletes:
|
||||
|
||||
@@ -353,7 +353,7 @@ namespace {
|
||||
// the loop above, because "these three, together" is the phase's own scope statement.
|
||||
//
|
||||
// set_stream_output_targets stays UNEMITTED for the whole of P5e (XFB is lockstep by
|
||||
// escalation, MG_Remote/CONTRACT-P5E.md §5.7) and still names the subsystem, for the
|
||||
// escalation, docs/archive/contracts/CONTRACT-P5E.md §5.7) and still names the subsystem, for the
|
||||
// same reason: the bit answers "which A/B switch owns this family's legacy arm", not
|
||||
// "is there a record on the wire for me today".
|
||||
EXPECT_EQ(MGPipeSubsystemForDirty(MGPipeDirty::NewConstBuffers),
|
||||
|
||||
@@ -116,7 +116,7 @@ target_link_libraries(
|
||||
)
|
||||
|
||||
# GLX presentation through DRI3 + Present against a fake X server and fake shared images, and the
|
||||
# glFlush-as-shared-image-boundary policy (docs/Disaggregated/notes/anland/plan-x11-gpu.md).
|
||||
# glFlush-as-shared-image-boundary policy (docs/archive/notes/anland/plan-x11-gpu.md).
|
||||
add_executable(
|
||||
X11PresentTest
|
||||
X11PresentTest.cpp
|
||||
|
||||
@@ -567,7 +567,7 @@ namespace {
|
||||
}
|
||||
|
||||
// P8-D: the Magma wire arm's indirect-draw bracket. Its short names are what the create
|
||||
// fixtures' measurement (notes/p8/D.md) reads off the server's line, and its long names are
|
||||
// fixtures' measurement (docs/archive/notes/p8/D.md) reads off the server's line, and its long names are
|
||||
// what Harness/WireIndirectPeek.cpp's readers expect in the JSON dump.
|
||||
TEST_F(PipeStatsTest, WireIndirectCountersPrintInTheirOwnBracket) {
|
||||
PS::AddCalls(PS::CallClass::WireIndirectNativeDraws, 3);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-only
|
||||
// End of Source File Header
|
||||
|
||||
// P11 B2 (MG_Remote/CONTRACT-P11.md B2). Server::AdoptInbox - T0's Offers matched to their
|
||||
// P11 B2 (docs/archive/contracts/CONTRACT-P11.md B2). Server::AdoptInbox - T0's Offers matched to their
|
||||
// map_persistent records BY SEQ, never by arrival order - over both aux channels the product has:
|
||||
// the in-process queue (inproc) and a real socket pair with SCM_RIGHTS (fork spawn / unix / fd:).
|
||||
//
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-only
|
||||
// End of Source File Header
|
||||
|
||||
// P11 A1 (MG_Remote/CONTRACT-P11.md §1): MOBILEGL_IPC_ADOPT_TIER=0/1 ON A STREAM DATA PLANE.
|
||||
// P11 A1 (docs/archive/contracts/CONTRACT-P11.md §1): MOBILEGL_IPC_ADOPT_TIER=0/1 ON A STREAM DATA PLANE.
|
||||
//
|
||||
// Real servers on loopback TCP and forked peers (P12ServerRig.h), so the session is the product's
|
||||
// two-process tcp session and each side reads its OWN knob, as on the tcp lane:
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
// EGL_EXT_image_dma_buf_import + _modifiers (dmabuf_capable), XRGB8888/ARGB8888 importable,
|
||||
// eglCreateImageKHR(EGL_LINUX_DMA_BUF_EXT) of a shared image's descriptor.
|
||||
//
|
||||
// And the implicit-sync flush (docs/Disaggregated/notes/anland/plan-x11-gpu.md): the shared_image
|
||||
// And the implicit-sync flush (docs/archive/notes/anland/plan-x11-gpu.md): the shared_image
|
||||
// Flush verb the client sends from glFlush is answered by the server.
|
||||
//
|
||||
// Chrome's GPU process on the same kind of display (a GBM one) is the other dma-buf producer, and it
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
// other made `address < base` true for EVERY fault, so the handler chained every fault
|
||||
// on a page it had itself protected straight to debuggerd. No host produces a tagged
|
||||
// pointer of its own, so the cases below hand the real predicate the two addresses the
|
||||
// DEVICE produced (docs/Disaggregated/notes/p7/device-window-1,
|
||||
// DEVICE produced (docs/archive/notes/p7/device-window-1,
|
||||
// improved-transparency-minecraft-26.3 under inproc: x0 b4000073ac9a5000 against
|
||||
// "fault addr 0x00000073ac9a5000"). That works on any host only because the
|
||||
// normalisation is written without an architecture guard - masking bits 56-63 is the
|
||||
|
||||
@@ -1163,7 +1163,7 @@ TEST_F(PipeWireCodecTest, UserIndexSpanExactlyAtSegmentEndReachesTheSink) {
|
||||
}
|
||||
|
||||
// =====================================================================================
|
||||
// P5b (MG_Remote/CONTRACT-P5B.md): one round trip per row the four migration packages consume
|
||||
// P5b (docs/archive/contracts/CONTRACT-P5B.md): one round trip per row the four migration packages consume
|
||||
// =====================================================================================
|
||||
//
|
||||
// The shape is the one above: encode, pump one record through the ring and the decoder, and
|
||||
@@ -1373,7 +1373,7 @@ TEST_F(PipeWireCodecTest, BindStreamOutputReachesTheSink) {
|
||||
}
|
||||
|
||||
// =====================================================================================
|
||||
// P5c ct (MG_Remote/CONTRACT-P5C.md §5): the two control records round-trip
|
||||
// P5c ct (docs/archive/contracts/CONTRACT-P5C.md §5): the two control records round-trip
|
||||
// =====================================================================================
|
||||
//
|
||||
// Same shape as the P5b rows above: encode, pump, and assert the record reached the RIGHT
|
||||
@@ -1440,7 +1440,7 @@ TEST_F(PipeWireCodecTest, ObjectDeathReachesTheSinkWithItsHandleAndKind) {
|
||||
}
|
||||
|
||||
// =====================================================================================
|
||||
// P5c rv (MG_Remote/CONTRACT-P5C.md §5.3): the residual-value record round-trips
|
||||
// P5c rv (docs/archive/contracts/CONTRACT-P5C.md §5.3): the residual-value record round-trips
|
||||
// =====================================================================================
|
||||
//
|
||||
// Not a sink row: the decoder's arm runs the REAL applier (MGPipeApplySetContextValues), so
|
||||
@@ -1486,7 +1486,7 @@ TEST_F(PipeWireCodecTest, SetContextValuesRoundTripsIntoPipeInputs) {
|
||||
}
|
||||
|
||||
// =====================================================================================
|
||||
// P5b t2 (MG_Remote/CONTRACT-P5B.md §2 t2). c0b's cases above round-trip each row once; these
|
||||
// P5b t2 (docs/archive/contracts/CONTRACT-P5B.md §2 t2). c0b's cases above round-trip each row once; these
|
||||
// pin the fields t2's EMITTERS actually fill and the one ordering property the span family has.
|
||||
// =====================================================================================
|
||||
|
||||
@@ -3343,9 +3343,8 @@ TEST(FenceWireRoundTrip, MissingConsumerDeclinesWithoutInventingASignaledAnswer)
|
||||
EXPECT_TRUE(wire.Answers().All[0].Bytes.empty());
|
||||
}
|
||||
|
||||
|
||||
// =====================================================================================
|
||||
// P5c ct (MG_Remote/CONTRACT-P5C.md §5): the two control records, through the REAL sink
|
||||
// P5c ct (docs/archive/contracts/CONTRACT-P5C.md §5): the two control records, through the REAL sink
|
||||
// =====================================================================================
|
||||
//
|
||||
// The codec cases above pin the bytes and the dispatch with a recording sink; these pin what
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-only
|
||||
// End of Source File Header
|
||||
|
||||
// P11 B2 (MG_Remote/CONTRACT-P11.md B2): T0'S PROTOCOL ON THE HOST, over a live inproc session.
|
||||
// P11 B2 (docs/archive/contracts/CONTRACT-P11.md B2): T0'S PROTOCOL ON THE HOST, over a live inproc session.
|
||||
//
|
||||
// A host has no AHardwareBuffer, so what these prove is the protocol, the negotiation and the
|
||||
// fallback - never GPU correctness, which is the device's (B2's device gates). Two halves:
|
||||
|
||||
@@ -1558,7 +1558,7 @@ TEST(RemoteClientControls, ARefusedCreateUnlatchesItsObjectAndItsNextCreateBlock
|
||||
//
|
||||
// THE ASSERTIONS BELOW ARE THEREFORE A DEBT, NOT A SPEC, and they are written to be LOUD about it:
|
||||
// they pin today's numbers so that whoever lands the signal sees THIS case go red and knows the
|
||||
// repair started working. notes/p12/UNPUBLISH-GUARD-SIGNALS.md §4-§6 has the rest.
|
||||
// repair started working. docs/archive/notes/p12/UNPUBLISH-GUARD-SIGNALS.md §4-§6 has the rest.
|
||||
TEST(RemoteClientControls, DroppedApplierRecordsAreNotRepairedTodayAndThisCaseIsTheDebt) {
|
||||
const auto child = RunInChild([] {
|
||||
::setenv("MOBILEGL_PIPE_STATS", "1", 1);
|
||||
|
||||
@@ -398,7 +398,7 @@ TEST(RemoteEmitTable, SetSwapIntervalIsTheServerForwarderAndNotAFatal) {
|
||||
|
||||
#endif // MGTEST_HAVE_FORK
|
||||
|
||||
// ---- P5b package i1 (MG_Remote/CONTRACT-P5B.md §2 i1) -------------------------------------
|
||||
// ---- P5b package i1 (docs/archive/contracts/CONTRACT-P5B.md §2 i1) -------------------------------------
|
||||
|
||||
TEST(RemoteEmitTable, TheSevenI1SlotsAreClassBAndAreNotTheFatalThunk) {
|
||||
// The census's five measured slots plus the two companions that share their rows. Named
|
||||
@@ -927,7 +927,7 @@ TEST(CapsMirrorTest, TheConsumerBlockDoesNotCollideWithTheFeatureBits) {
|
||||
// =====================================================================================
|
||||
|
||||
// =====================================================================================
|
||||
// P5b d1: the draw family's record plan (MG_Remote/CONTRACT-P5B.md §2 d1). These drive the
|
||||
// P5b d1: the draw family's record plan (docs/archive/contracts/CONTRACT-P5B.md §2 d1). These drive the
|
||||
// PRODUCTION derivation the nineteen emitters call - PlanDrawInfo / PlanDrawRange /
|
||||
// PlanDrawIndirect over a RemoteDrawBindings snapshot - so the fields on the wire are pinned
|
||||
// here without a GL context (R-16: the production predicate, not a copy). The bindings' READ
|
||||
@@ -2570,7 +2570,7 @@ TEST(RemoteGuards, ClientPipeInputsFillWithTheApplierIdleIsAllowed) {
|
||||
|
||||
// ===========================================================================================
|
||||
// P5e (ra) - the wait rule, the present credit and gPipeInputs' ownership
|
||||
// (MG_Remote/CONTRACT-P5E.md §1, §2.3, §2.4, §3.1, §3.3, §3.5)
|
||||
// (docs/archive/contracts/CONTRACT-P5E.md §1, §2.3, §2.4, §3.1, §3.3, §3.5)
|
||||
// ===========================================================================================
|
||||
//
|
||||
// EVERY CASE BELOW ARMS RUN-AHEAD BY PUBLISHING THE CAP BIT, because that is the only thing
|
||||
|
||||
@@ -2534,7 +2534,7 @@ TEST(StagedShadowProductionTest, TheStreamingIdiomThroughAPoolReuseIsUploadedNot
|
||||
|
||||
// =====================================================================================
|
||||
// P5b d1: a draw_vbo record of every d1 shape crosses to the REAL ServerVerbSink with its
|
||||
// fields intact (MG_Remote/CONTRACT-P5B.md §2 d1). No backend object lives in this process,
|
||||
// fields intact (docs/archive/contracts/CONTRACT-P5B.md §2 d1). No backend object lives in this process,
|
||||
// so each record is DECLINED after the sink has witnessed it - which is exactly the point:
|
||||
// the witness is taken before the backend is consulted, so these cases pin the wire's fields
|
||||
// and not a backend call. The emitter half (GL args -> these fields) is RemoteClientTest's
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user