Difference between revisions of "OpenGL"
m (2026-11-12 status refresh: X/GLX fully green, GPU-rendered captures, direct-GL command-stream delivery wall) |
m (2026-11-18 late status refresh: CUDA CE push page + fresh-CE walk seed fixed; the wall is now the guest-side UVM page-tree-init push; GL pixel gate held; checkpoint 5b23a983 noted) |
||
| (10 intermediate revisions by the same user not shown) | |||
| Line 5: | Line 5: | ||
<blockquote>'''Scope.''' How a stock guest OpenGL application's commands travel through the unmodified NVIDIA stack on the emulated vGPU, and the honest state of running OpenGL on it. The host-side execution machinery shared by all graphics APIs is on [[Graphics Execution|<code>Graphics-Execution.md</code>]]; CUDA compute is on [[The Execution Frontier|<code>Execution-Frontier.md</code>]]. Canonical sources: [https://git.vgpu.io/open-iov.git/tree/docs/04-implementation/05-graphics-execution-plan.md <code>../docs/04-implementation/05-graphics-execution-plan.md</code>] (the plan and milestones), [https://git.vgpu.io/open-iov.git/tree/docs/04-implementation/04-real-render-walls.md <code>../docs/04-implementation/04-real-render-walls.md</code>] (the measured walls) and [https://git.vgpu.io/open-iov.git/tree/docs/03-architecture/02-guest-stack-and-cudasw.md <code>../docs/03-architecture/02-guest-stack-and-cudasw.md</code>] (the guest stack). The docs tree wins on disagreement.</blockquote> | <blockquote>'''Scope.''' How a stock guest OpenGL application's commands travel through the unmodified NVIDIA stack on the emulated vGPU, and the honest state of running OpenGL on it. The host-side execution machinery shared by all graphics APIs is on [[Graphics Execution|<code>Graphics-Execution.md</code>]]; CUDA compute is on [[The Execution Frontier|<code>Execution-Frontier.md</code>]]. Canonical sources: [https://git.vgpu.io/open-iov.git/tree/docs/04-implementation/05-graphics-execution-plan.md <code>../docs/04-implementation/05-graphics-execution-plan.md</code>] (the plan and milestones), [https://git.vgpu.io/open-iov.git/tree/docs/04-implementation/04-real-render-walls.md <code>../docs/04-implementation/04-real-render-walls.md</code>] (the measured walls) and [https://git.vgpu.io/open-iov.git/tree/docs/03-architecture/02-guest-stack-and-cudasw.md <code>../docs/03-architecture/02-guest-stack-and-cudasw.md</code>] (the guest stack). The docs tree wins on disagreement.</blockquote> | ||
Status: 2026-11- | Status: 2026-11-18, tree <code>master @ 5b23a983</code>. Tags: <code>[live]</code> observed with the stock guest driver; <code>[wip]</code> partial; <code>[wall]</code> current blocker; <code>[target]</code> defined success state. | ||
== 1. The guest OpenGL stack == | == 1. The guest OpenGL stack == | ||
| Line 86: | Line 86: | ||
| Client-allocated USERD resolved from the channel's memory objects (<code>hUserdMemory</code>/<code>userdOffset</code>); foreign-USERD adoption skipped; aperture-aware wire fallback | | Client-allocated USERD resolved from the channel's memory objects (<code>hUserdMemory</code>/<code>userdOffset</code>); foreign-USERD adoption skipped; aperture-aware wire fallback | ||
| <code>[live]</code> | | <code>[live]</code> | ||
|- | |||
| X DDX idle-DMA/ScreenInit, USERD-latch lifetime, re-probe thrash, Xorg kernel-mode spin (GET-past-PUT) and flip-event walls closed; X green >10 minutes (<code>13a0c5d6</code>, <code>acb51d53</code>, <code>6ebc7cd4</code>, <code>770d6b4a</code>, <code>b9213c57</code>, <code>29690635</code>) | |||
| <code>[live]</code> | |||
|- | |||
| Captured GL sections execute on the engine (<code>GR LAUNCH submitted</code> / <code>GUEST GR LAUNCH OK</code>); data window populated (<code>n_data</code> 0 -> 1024) | |||
| <code>[live]</code> | |||
|- | |||
| Client push bodies decode as real GR method streams above 10 GiB via the VAS walk (live-PA bound raised to the registered guest-RAM top, <code>436cbf9d</code>) | |||
| <code>[live]</code> | |||
|- | |||
| Direct-GL submission fully decoded: nine NV906F entries tile one contiguous buffer; no method-grammar draw header; per-frame work is data-block blobs + real state pushes (324/476/728 B) invoking MME macros; QMD-carrier hypothesis refuted | |||
| <code>[live]</code> | |||
|- | |||
| Recycled direct-GL pushes recovered (content-gated FB-shadow rescue <code>e1eac368</code>, LOW-band rescue <code>b7f09616</code>); the 324-B draw-state push opens a <code>C597</code> section, captures and is marked for the verbatim 3D lane | |||
| <code>[live]</code> | |||
|- | |||
| Direct-GL state push reaches the engine with the golden MME overlay (<code>GR LAUNCH submitted</code> + OK; MME-PRELUDE pack 1701 IR words; MME-GOLDEN slot 0 accepted) | |||
| <code>[live]</code> | |||
|- | |||
| <code>CODESRC</code> fault-park class prevented (program page relocated to the engine-mapped window-0 shadow, <code>17c7ed7c</code>; validated boot 31 relocations, 51 GR launches, 79 GP_GET advances, 0 <code>FAULT_PDE</code>, 0 <code>WEDGE-REARM</code>, <code>backend_ok=35</code>) | |||
| <code>[live]</code> | |||
|- | |||
| RT routing tested and refuted as the store cause: RT0 bind verified 16x with correct target/geometry, still 61/61 <code>wrote=0</code> | |||
| <code>[live]</code> (negative result) | |||
|- | |- | ||
| GZDoom passes <code>V_Init: allocate screen</code> with GL 4.6.0 when shared nvClip <code>modeNum</code> is even | | GZDoom passes <code>V_Init: allocate screen</code> with GL 4.6.0 when shared nvClip <code>modeNum</code> is even | ||
| Line 102: | Line 126: | ||
| <code>[live]</code> | | <code>[live]</code> | ||
|- | |- | ||
| | | Multi-part MME keep-window: multi-frame windows admitted; the 2799-word pack completes (2799/2799) | ||
| <code>[ | | <code>[live]</code> | ||
|- | |||
| Part-launch poison eliminated: client <code>SET_REPORT_SEMAPHORE</code>/<code>SET_NOTIFY</code> targets redirected to a mapped scratch slot (49 cycles, 0 poison, 0 MMU faults) | |||
| <code>[live]</code> | |||
|- | |||
| First <code>MME-PACK-REARM</code> captured (engine-global completion plus keep-done-across-recycle); fixed-CB region aliased; released calls run macros | |||
| <code>[live]</code> | |||
|- | |||
| <code>DRAW_IAB</code> (<code>mac=0x22</code>) executes on the released held window after the <code>MME-DRAW-PLAN</code>/<code>MME-DRAW-MOVE</code> reorder (c788: <code>MME-FAST ... mac=0x22 run=1</code>); the body decodes with the public Mesa MME toolchain (<code>mme_tu104_sim</code>: slot 34, 8 draws of 3 vertices) | |||
| <code>[live]</code> | |||
|- | |||
| DS stage-0/1 image: a VTG SPH is authored at <code>family+0x900</code> and the window's own slot-1 bind rewritten to it; the DS latch reads <code>st0=st1=020a0481</code> | |||
| <code>[live]</code> | |||
|- | |||
| Saved-window release carrier (held window snapshotted at <code>MME-CALL-HOLD</code> and re-submitted with calls released once the pack is resident, c772); held-CALL census + SA[34] golden fill (<code>client=golden=used=0x265</code>); synthetic full-RT viewport (<code>dab4a02c</code>); release chained after any GR launch (<code>3481e62d</code>) | |||
| <code>[live]</code> | |||
|- | |||
| Per-stage SPH disable (TCS off, <code>45dbcdcd</code>) clears the DS latch (the <code>0x84000420</code> was the synthesized TCS bind) | |||
| <code>[live]</code> | |||
|- | |||
| Real frame pushes admitted: persisted colour-target bind from an earlier trusted push (<code>RT-PERSIST</code>), draw markers accepted inside counted method runs, 14.8-thousand-word window admitted and replayed as 40 chunks, data-led start snap (<code>WIN-START-SNAP</code>), 128-slot candidate ring | |||
| <code>[live]</code> | |||
|- | |||
| Clean DS on the beef draw lane after the full-window chunking (<code>DS-FAST2 ... ds_after=80000000</code>, c963) at the live-derived GS attribute map (maps=6), no SPH18; draw anchor after the first <code>0x3810</code> and raster enables emitted | |||
| <code>[live]</code> | |||
|- | |||
| Golden 2799-word MME pack on capture-less boots (<code>MME-GOLDEN overlay</code>, <code>MME-PRELUDE pack ir_words=2799</code>); <code>MME-CALL-HOLD -> MME-CARRY-SAVE -> MME-CARRY-FIRE -> MME-PACK-REARM -> MME-SA-REARM</code> fires; prelude latch kept across the per-fire channel recycle (<code>MME-LATCH-KEEP</code>); admitted-window chunks forwarded in order | |||
| <code>[live]</code> | |||
|- | |||
| Guest GL submission crossed (late 11-16): offscreen SDL EGL/GBM shim (<code>GZ_EGL</code>) gives GZDoom a real NVIDIA GL context without Xorg/DDX (<code>GL_RENDERER: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2</code>, <code>GL_VERSION: 4.6.0 NVIDIA 570.144</code>; no llvmpipe) | |||
| <code>[live]</code> | |||
|- | |||
| Real GZDoom draw decoded and admitted: 12068 B window at push <code>0x402f9d8</code>, op=4 IMMD CALL to method <code>0x3800</code> (<code>imm=0xd48</code>) plus slots 44/57/58 (<code>0x3960/0x39c8/0x39d0</code>), no <code>0x3910/0x3914</code>; marker recognition, bind-free admission, draw-chunk-first, verbatim chunk replay (<code>3D chunk launch ... draw=1</code>) | |||
| <code>[live]</code> | |||
|- | |||
| <code>CALL(0)</code> executes without trapping: immediate resolved as an IR address through client SA[0] then golden (<code>MME-CALL-RESOLVE</code>), not-resident calls elided (<code>MME-CALL-UNMAPPED ... reason=not-resident</code>); c1026/c1027 entered the captured macro (<code>macro-status=00000004</code>, mpc 0->4), first DS with real stage data (<code>DS-FAST2 ds_after=83044206 stage=015e0900,015e0a00,015c0400</code>); trap <code>0x80001528</code> decoded as a sticky TRAPPED_ADDR latch, not a cause/PC | |||
| <code>[live]</code> | |||
|- | |||
| The GL pixel gate, closed 2026-11-18 (<code>b5a68b9a</code>): the first clear/CALL(0)-bearing window is archived and replayed (<code>GL-WIN-SELECT keep ... clear=0 call0=1 win=369 alias_gen=1</code>), the engine clear stores red on the guest surface (<code>OUT-UNCH ... guest=ff0000ff</code>), the readback fence is delivered with the copy (measured wait 11.03-11.05 s -> 2.3-7.2 ms), and the CE D2H copy's source VA is adopted as the readback surface (<code>RB-SURF adopt</code>, <code>RB-SNAP armed ... first0=ff0000ff</code>); two consecutive boots read <code>GL_FRAME nonblack=291840 px0=(255,0,0)</code> and live <code>t/04</code> is green (<code>EXPECT_GL_PIXELS=closed</code>); re-verified in r27e/r28d/r29c/r31b | |||
| <code>[live]</code> | |||
|- | |||
| Per-draw MME macro body capture (research path, no longer on the pixel critical path): never captured (the prelude carries only the 12 setup macros; <code>0xd48</code> is a length/argument); the synthetic golden body (<code>badf1201</code>) remains the wedge on a non-CALL(0) launch | |||
| <code>[wip]</code> | |||
|- | |||
| GZDoom video via the guest '''software GL''' path (Mesa llvmpipe): four byte-verified files (22 s flight + 18 s orbit, 640x480/1280x960, 30 fps) — a guaranteed-quality deliverable, '''not''' a vGPU rendering claim | |||
| <code>[live]</code> (software path) | |||
|- | |||
| Pack-completion and shallow-boot lotteries gate the deterministic release (throughput limiters) | |||
| <code>[wip]</code> | |||
|- | |- | ||
| | | Non-black '''window/screen''' pixels from the emulated vGPU's 3D pipeline (window/screen present) | ||
| <code>[wall]</code> | | <code>[wall]</code> | ||
|- | |- | ||
| X screen-init | | X screen-init first-generation lottery (<code>modeNum</code> parity; only an immediately-post-boot X passes DDX DMA init; dominant throughput limiter) | ||
| <code>[ | | <code>[wip]</code> | ||
|- | |- | ||
| 60 fps sustained, no forcing (M-GL4) | | 60 fps sustained, no forcing (M-GL4) | ||
| Line 121: | Line 193: | ||
== 5. Milestones on this path == | == 5. Milestones on this path == | ||
The graphics plan defines M-GL1 (client context-init decodes and executes; the client leaves its retry loop), M-GL2 (<code>glxgears</code> non-black), M-GL3 (GZDoom GL non-black through the mdev), M-GL4 (60 fps, no forcing), M-GL5 (two VMs, two mdevs), M-GL6 (split-screen video). The project sits '''between M-GL1 and M-GL2, with M-GL2's off-screen half proven''': the display/KMS stack registers, X and the stock GLX path are fully green (<code>glxinfo -B</code> rc 0, ~520 FPS <code>glxgears</code>, Xorg WAIT 0), the direct-GL ring/USERD machinery is hardened, and the GPU-rendered pbuffer path produced non-black animated frames and captured videos (45.4 s and 50 s). The | The graphics plan defines M-GL1 (client context-init decodes and executes; the client leaves its retry loop), M-GL2 (<code>glxgears</code> non-black), M-GL3 (GZDoom GL non-black through the mdev), M-GL4 (60 fps, no forcing), M-GL5 (two VMs, two mdevs), M-GL6 (split-screen video). The project sits '''between M-GL1 and M-GL2, with M-GL2's off-screen half proven''': the display/KMS stack registers, X and the stock GLX path are fully green (<code>glxinfo -B</code> rc 0, ~520 FPS <code>glxgears</code>, Xorg WAIT 0), the DDX/X-stability walls were closed (X green for more than 10 minutes), the direct-GL ring/USERD machinery is hardened, and the GPU-rendered pbuffer path produced non-black animated frames and captured videos (45.4 s and 50 s). Captured GL sections now execute on the engine, and the direct-GL client's submission is fully decoded: it carries no classic draw header — the work is macro-driven (data-block blobs plus small state pushes invoking MME macros), the recycled pushes are recovered, and the client's draw-state push opens, captures and reaches the engine. The MME chain now completes and executes the draw macro: multi-frame keep-windows land, the 2799-word pack completes (2799/2799), the first <code>MME-PACK-REARM</code> fires, the fixed-CB region is aliased, and <code>DRAW_IAB</code> (<code>mac=0x22</code>) runs with the SPH-BIND prelude intact (84 words) and the DS stage VAs populated. The '''DS stage-0/1 image is now authored and live''' (a VTG SPH at <code>family+0x900</code>, first word <code>020a0481</code>, with the window's own slot-1 bind rewritten to it): the DS latch reads <code>st0=st1=020a0481 code=ff007321</code> and the DS value falls <code>0x86040626 -> 0x84000420</code>, reproduced on two boots. The release path is now host-deterministic when the pack completes: the saved-window release carrier snapshots the held window and re-submits it with the calls released once the pack is resident (c772 end to end), and the held-CALL census plus the SA[34] golden fill prove the slot-34 <code>DRAW_IAB</code> call and its target are present (<code>MME-CALL-TARGET slot=34 method=0x3910 client=0x265 golden=0x265 used=0x265</code>). '''The draw macro now executes end to end''': c788 ran <code>DRAW_IAB</code> (<code>mac=0x22</code>) on a released held window after the <code>MME-DRAW-PLAN</code>/<code>MME-DRAW-MOVE</code> reorder, TCS-off (<code>45dbcdcd</code>) clears the DS latch (the <code>0x84000420</code> was the synthesized TCS bind), a synthetic full-RT viewport (<code>dab4a02c</code>) and a release chained after any GR launch (<code>3481e62d</code>) complete the replay, and the DRAW_IAB body decodes with the public Mesa MME toolchain (<code>mme_tu104_sim</code>: slot 34, 8 draws of 3 vertices). The 11-16 wave then proved the '''host-side chain end to end''': the real frame pushes are admitted (persisted colour-target bind from an earlier trusted push, draw markers accepted inside counted method runs, the 14.8-thousand-word window admitted and replayed as 40 chunks with a data-led start snap and a 128-slot candidate ring), the beef draw lane latches a '''clean DS''' (<code>DS-FAST2 ... ds_after=80000000</code>, c963) at the live-derived GS attribute map, capture-less boots get the '''golden 2799-word MME pack''' and <code>MME-CALL-HOLD -> MME-CARRY-SAVE -> MME-CARRY-FIRE -> MME-PACK-REARM -> MME-SA-REARM</code> fires, the prelude latch survives the per-fire channel recycle, and chunks are forwarded in order. The '''late-11-16 wave crossed the guest submission gap.''' An offscreen SDL EGL/GBM shim (<code>GZ_EGL</code>) gives GZDoom a real NVIDIA GL context without Xorg/DDX (<code>GL_RENDERER: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2</code>, <code>GL_VERSION: 4.6.0 NVIDIA 570.144</code>; no llvmpipe), and the real draw window surfaced: 12068 B at push <code>0x402f9d8</code>, an op=4 IMMD CALL to method <code>0x3800</code> (<code>imm=0xd48</code>) plus CALL slots 44/57/58 (<code>0x3960/0x39c8/0x39d0</code>), with no <code>0x3910/0x3914</code> and no colour-target bind of its own. Marker recognition now covers the real draw, admission happens on the marker even without a bind, the CALL-bearing chunk is forced first and every chunk is replayed verbatim. '''<code>CALL(0)</code> no longer wedges''': eng89t resolves the immediate as an IR address through client SA[0] (then golden) and elides a not-resident call to a NOP; c1026/c1027 entered the captured macro (<code>macro-status=00000004</code>, <code>mpc</code> 0->4) without trapping, and c1027 produced the first DS with real stage data (<code>DS-FAST2 ds_after=83044206 stage=015e0900,015e0a00,015c0400</code>). The remaining gate at that point was precise: the '''client's per-draw MME macro body was never captured''' (the 59580-byte prelude carries only the 12 setup macros; the draw push has no <code>0x114/0x11c</code>; <code>0xd48</code> is a length/argument), and the surviving wedge was the synthetic golden body (<code>badf1201 pc=513 mac=0xf1</code>). '''The pixel gate then closed on 2026-11-18 without that body''' (<code>b5a68b9a</code>): the host archives the first accepted window that carries the client clear or the direct-GL CALL(0) marker and replays it when a later window carries neither; the engine's clear stores red on the guest surface; the readback no longer guesses the X-screen span but adopts the CE D2H copy's source VA as the readback surface, with a generation-pinned snapshot and a fence delivered with the copy (the driver's ~11 s wait fell to 2.3-7.2 ms in the measured boots). Two consecutive boots read <code>GL_FRAME nonblack=291840 px0=(255,0,0)</code>, live <code>t/04</code> is green, and <code>EXPECT_GL_PIXELS=closed</code>; the gate was re-verified on the later CUDA-side rounds. What remains is the '''window/screen present''' (glxgears' window is black and a window draw can wedge X), X start speed (the per-boot X first-generation lottery), and the boot lottery where the engine stores after the guest's read. A GZDoom video was separately delivered through the guest's '''software GL''' path (Mesa llvmpipe) as a guaranteed-quality deliverable; it is not a vGPU rendering claim. | ||
== 6. What is not claimed == | == 6. What is not claimed == | ||
* No '''window/screen''' frame has rendered real pixels through the emulated vGPU yet; every screen capture so far is black. The non-black frames and the videos (45.4 s and 50 s) come from the off-screen pbuffer path (pbuffer -> sysmem -> kvmfr ivshmem -> host reader), not from a windowed X screen capture. | * No '''window/screen''' frame has rendered real pixels through the emulated vGPU yet; every vGPU screen capture so far is black. What is proven is a '''guest GL readback''': a stock <code>glReadPixels</code> reads a non-black frame (<code>GL_FRAME nonblack=291840 px0=(255,0,0)</code>, two consecutive boots) produced by the physical engine through the emulated vGPU, and the live acceptance lane enforces it (<code>EXPECT_GL_PIXELS=closed</code>). The non-black frames and the videos (45.4 s and 50 s) also come from the off-screen pbuffer path (pbuffer -> sysmem -> kvmfr ivshmem -> host reader), not from a windowed X screen capture. A synchronous window draw can still wedge X, and X start retains a per-boot first-generation lottery. Those are the current walls. | ||
* '''The 2026-11-16 GZDoom video is a software-GL deliverable, not a vGPU result.''' Mesa llvmpipe rendered it inside the guest; it is a guaranteed-quality demonstration while the GPU-GL pixel path is being worked, not evidence of the emulated vGPU's 3D pipeline. | |||
* GZDoom reaching <code>V_Init: allocate screen</code> is not a rendered-frame claim; it proves the client's GL init and the direct-GL GR lane, not the game loop or a presented frame. | * GZDoom reaching <code>V_Init: allocate screen</code> is not a rendered-frame claim; it proves the client's GL init and the direct-GL GR lane, not the game loop or a presented frame. | ||
* No frame-rate or latency numbers. | * No frame-rate or latency numbers. | ||
Latest revision as of 03:25, 19 November 2026
An absence of critical technical documentation has historically slowed growth and adoption of developer ecosystems for GPU virtualization.
This CC-BY-4.0 licensed content can either be used with attribution, or used as inspiration for new documentation, created by GPU vendors for public commercial distribution as developer documentation.
Where possible, this documentation will clearly label dates and versions of observed-but-not-guaranteed behaviour vs. vendor-documented stable interfaces/behaviour with guarantees of forward or backward compatibility.
OpenGL
Scope. How a stock guest OpenGL application's commands travel through the unmodified NVIDIA stack on the emulated vGPU, and the honest state of running OpenGL on it. The host-side execution machinery shared by all graphics APIs is on
Graphics-Execution.md; CUDA compute is onExecution-Frontier.md. Canonical sources:../docs/04-implementation/05-graphics-execution-plan.md(the plan and milestones),../docs/04-implementation/04-real-render-walls.md(the measured walls) and../docs/03-architecture/02-guest-stack-and-cudasw.md(the guest stack). The docs tree wins on disagreement.
Status: 2026-11-18, tree master @ 5b23a983. Tags: [live] observed with the stock guest driver; [wip] partial; [wall] current blocker; [target] defined success state.
1. The guest OpenGL stack
On Linux, an OpenGL application does not talk to the kernel driver directly: it talks to the GL implementation, and — when a display is involved — through the X server's GLX extension:
application (toolkit / SDL / GLFW / raw GLX) -> libGL (dispatch) -> libGLX_nvidia (NVIDIA GLX client) -> libnvidia-glcore (the vendor GL engine: state, programs, shaders, draws) -> ioctls + mappings to nvidia.ko -> channels, buffers, synchronization X server (Xorg) -> GLX extension module (glxserver_nvidia) and the NVIDIA DDX (X driver) -> owns the screen, drawables and the present path
Two forms of operation exist, and both are visible in the guest:
- Direct rendering — the normal desktop case. The GL client builds GPU commands in its own process and the X server coordinates buffers and presents. The client's channel is the source of truth for per-draw state.
- Indirect GLX — the client's GL protocol is serialised to the X server, which executes it against its own GL context. Here the X server's channel carries the graphics stream.
On the emulated vGPU the readable command sources today are the direct GL client's own channels — the GR channel 0xbeef0100 and its CE siblings 0xbeef0101/0xbeef0102 — and the X server's channels, whose graphics-class (0xC597, TURING_A) sections the emulation captures and whose DDX kick channel (0xbfef0002) is decoded from its ring head (Graphics-Execution.md §3).
2. What an NVIDIA GL frame involves (observed shapes)
- Context and state setup — shader programs (SASS) uploaded to device memory, constant/descriptor banks, render targets and depth surfaces allocated and mapped.
- Per-draw work — a graphics-class method stream: state binds (viewport, render target, ZS, blend/ROP), program and constant binds, vertex/index data, and draw-issuing methods that drive the fixed-function pipeline (vertex fetch, primitive assembly, rasterisation, fragment work, ROP).
- Program/descriptor delivery — the driver uploads shader code and descriptors through its copy/utility-channel inline-data path. The GL draw path decodes these uploads and the engine executes the draw; Vulkan's inline-to-memory arm is the remaining mirror-image gap (
Vulkan.md). - Present — the X server's present/readback path runs as light 2D-class and copy-engine operations; the emulator decodes and executes those shapes.
3. Status on the emulated vGPU
Rated honestly, against the milestone ladder in the plan:
| Item | State |
|---|---|
| X server initialises on the emulated vGPU (driver push-DMA sanity test, ScreenInit) | [live]
|
nvidia-modeset/NvKms registers (/dev/dri/card0, renderD128, fb0); nvidia-smi -L enumerates
|
[live] (campaign configuration)
|
glxinfo -B reports the NVIDIA renderer (OpenGL 4.6.0, driver 570.144, direct rendering)
|
[live]
|
The stock GLX path is fully green: glxinfo -B returns 0, glxgears renders ~520 FPS, Xorg WAIT count 0
|
[live]
|
| The X driver's RC-watchdog channel registers and its notifier is authored | [live]
|
X green on attempt 1 in three consecutive cycles (ebf3130f)
|
[live]
|
| GSP event-IRQ fix wakes the guest poll; glxgears completes swaps | [live]
|
2D path end-to-end: accelerated X fills read back via xwd
|
[live]
|
Guest's real GL draws forward and execute on the physical GPU (work_gr backend_ok=5-7)
|
[live]
|
GR backend timeouts fixed (backend_timeout=0; draws retire in 3-2400 ms)
|
[live]
|
DDX 3D replay executes (section captured + GR LAUNCH on 0x1000014, 12 launches/cycle)
|
[live]
|
First real GPU readback: pbuffer glClear(red)+glReadPixels -> pixel=ff0000ff
|
[live]
|
First non-black GPU-rendered frames: 500/500 off-screen 640x480 frames per run; 45.4 s video (r1769) and a 50 s capture (2026-11-12)
|
[live]
|
Direct-GL GR ring 0xbeef0100 resolves; releases advance; ring/VAS anchor hardened (verified page-directory discovery, eager push pins, per-rank scans)
|
[live]
|
Client-allocated USERD resolved from the channel's memory objects (hUserdMemory/userdOffset); foreign-USERD adoption skipped; aperture-aware wire fallback
|
[live]
|
X DDX idle-DMA/ScreenInit, USERD-latch lifetime, re-probe thrash, Xorg kernel-mode spin (GET-past-PUT) and flip-event walls closed; X green >10 minutes (13a0c5d6, acb51d53, 6ebc7cd4, 770d6b4a, b9213c57, 29690635)
|
[live]
|
Captured GL sections execute on the engine (GR LAUNCH submitted / GUEST GR LAUNCH OK); data window populated (n_data 0 -> 1024)
|
[live]
|
Client push bodies decode as real GR method streams above 10 GiB via the VAS walk (live-PA bound raised to the registered guest-RAM top, 436cbf9d)
|
[live]
|
| Direct-GL submission fully decoded: nine NV906F entries tile one contiguous buffer; no method-grammar draw header; per-frame work is data-block blobs + real state pushes (324/476/728 B) invoking MME macros; QMD-carrier hypothesis refuted | [live]
|
Recycled direct-GL pushes recovered (content-gated FB-shadow rescue e1eac368, LOW-band rescue b7f09616); the 324-B draw-state push opens a C597 section, captures and is marked for the verbatim 3D lane
|
[live]
|
Direct-GL state push reaches the engine with the golden MME overlay (GR LAUNCH submitted + OK; MME-PRELUDE pack 1701 IR words; MME-GOLDEN slot 0 accepted)
|
[live]
|
CODESRC fault-park class prevented (program page relocated to the engine-mapped window-0 shadow, 17c7ed7c; validated boot 31 relocations, 51 GR launches, 79 GP_GET advances, 0 FAULT_PDE, 0 WEDGE-REARM, backend_ok=35)
|
[live]
|
RT routing tested and refuted as the store cause: RT0 bind verified 16x with correct target/geometry, still 61/61 wrote=0
|
[live] (negative result)
|
GZDoom passes V_Init: allocate screen with GL 4.6.0 when shared nvClip modeNum is even
|
[live]
|
RM write-lock holder identified (Xorg in the DDX vidheap scrub wait) and fixed (df6e71bb)
|
[live]
|
Engine executes a launch built from the captured section (real sm_75 SASS retired)
|
[live]
|
| Verbatim 3D method-stream replay retired by the engine, no MMU fault | [live]
|
| Emulated FB/GART sizing traps fixed (FB info replies in KB; GART default 256 MiB), removing the 4 GiB guest-allocation class | [live]
|
| Multi-part MME keep-window: multi-frame windows admitted; the 2799-word pack completes (2799/2799) | [live]
|
Part-launch poison eliminated: client SET_REPORT_SEMAPHORE/SET_NOTIFY targets redirected to a mapped scratch slot (49 cycles, 0 poison, 0 MMU faults)
|
[live]
|
First MME-PACK-REARM captured (engine-global completion plus keep-done-across-recycle); fixed-CB region aliased; released calls run macros
|
[live]
|
DRAW_IAB (mac=0x22) executes on the released held window after the MME-DRAW-PLAN/MME-DRAW-MOVE reorder (c788: MME-FAST ... mac=0x22 run=1); the body decodes with the public Mesa MME toolchain (mme_tu104_sim: slot 34, 8 draws of 3 vertices)
|
[live]
|
DS stage-0/1 image: a VTG SPH is authored at family+0x900 and the window's own slot-1 bind rewritten to it; the DS latch reads st0=st1=020a0481
|
[live]
|
Saved-window release carrier (held window snapshotted at MME-CALL-HOLD and re-submitted with calls released once the pack is resident, c772); held-CALL census + SA[34] golden fill (client=golden=used=0x265); synthetic full-RT viewport (dab4a02c); release chained after any GR launch (3481e62d)
|
[live]
|
Per-stage SPH disable (TCS off, 45dbcdcd) clears the DS latch (the 0x84000420 was the synthesized TCS bind)
|
[live]
|
Real frame pushes admitted: persisted colour-target bind from an earlier trusted push (RT-PERSIST), draw markers accepted inside counted method runs, 14.8-thousand-word window admitted and replayed as 40 chunks, data-led start snap (WIN-START-SNAP), 128-slot candidate ring
|
[live]
|
Clean DS on the beef draw lane after the full-window chunking (DS-FAST2 ... ds_after=80000000, c963) at the live-derived GS attribute map (maps=6), no SPH18; draw anchor after the first 0x3810 and raster enables emitted
|
[live]
|
Golden 2799-word MME pack on capture-less boots (MME-GOLDEN overlay, MME-PRELUDE pack ir_words=2799); MME-CALL-HOLD -> MME-CARRY-SAVE -> MME-CARRY-FIRE -> MME-PACK-REARM -> MME-SA-REARM fires; prelude latch kept across the per-fire channel recycle (MME-LATCH-KEEP); admitted-window chunks forwarded in order
|
[live]
|
Guest GL submission crossed (late 11-16): offscreen SDL EGL/GBM shim (GZ_EGL) gives GZDoom a real NVIDIA GL context without Xorg/DDX (GL_RENDERER: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2, GL_VERSION: 4.6.0 NVIDIA 570.144; no llvmpipe)
|
[live]
|
Real GZDoom draw decoded and admitted: 12068 B window at push 0x402f9d8, op=4 IMMD CALL to method 0x3800 (imm=0xd48) plus slots 44/57/58 (0x3960/0x39c8/0x39d0), no 0x3910/0x3914; marker recognition, bind-free admission, draw-chunk-first, verbatim chunk replay (3D chunk launch ... draw=1)
|
[live]
|
CALL(0) executes without trapping: immediate resolved as an IR address through client SA[0] then golden (MME-CALL-RESOLVE), not-resident calls elided (MME-CALL-UNMAPPED ... reason=not-resident); c1026/c1027 entered the captured macro (macro-status=00000004, mpc 0->4), first DS with real stage data (DS-FAST2 ds_after=83044206 stage=015e0900,015e0a00,015c0400); trap 0x80001528 decoded as a sticky TRAPPED_ADDR latch, not a cause/PC
|
[live]
|
The GL pixel gate, closed 2026-11-18 (b5a68b9a): the first clear/CALL(0)-bearing window is archived and replayed (GL-WIN-SELECT keep ... clear=0 call0=1 win=369 alias_gen=1), the engine clear stores red on the guest surface (OUT-UNCH ... guest=ff0000ff), the readback fence is delivered with the copy (measured wait 11.03-11.05 s -> 2.3-7.2 ms), and the CE D2H copy's source VA is adopted as the readback surface (RB-SURF adopt, RB-SNAP armed ... first0=ff0000ff); two consecutive boots read GL_FRAME nonblack=291840 px0=(255,0,0) and live t/04 is green (EXPECT_GL_PIXELS=closed); re-verified in r27e/r28d/r29c/r31b
|
[live]
|
Per-draw MME macro body capture (research path, no longer on the pixel critical path): never captured (the prelude carries only the 12 setup macros; 0xd48 is a length/argument); the synthetic golden body (badf1201) remains the wedge on a non-CALL(0) launch
|
[wip]
|
| GZDoom video via the guest software GL path (Mesa llvmpipe): four byte-verified files (22 s flight + 18 s orbit, 640x480/1280x960, 30 fps) — a guaranteed-quality deliverable, not a vGPU rendering claim | [live] (software path)
|
| Pack-completion and shallow-boot lotteries gate the deterministic release (throughput limiters) | [wip]
|
| Non-black window/screen pixels from the emulated vGPU's 3D pipeline (window/screen present) | [wall]
|
X screen-init first-generation lottery (modeNum parity; only an immediately-post-boot X passes DDX DMA init; dominant throughput limiter)
|
[wip]
|
| 60 fps sustained, no forcing (M-GL4) | [target]
|
4. How OpenGL runs are verified
Instruments that matter, in order of usefulness: the X server log and xdpyinfo (did the server initialise?), glxinfo -B (which renderer is real), the application's own progress output, and frame capture at the GL source (a swap-hook capture is the ground truth for pixels — the X screen itself is not, on some stacks). Captures are decoded offline and scored: fraction of pixels above a luminance threshold, colour count, and frame-to-frame motion. A run counts only when the capture shows motion with the NVIDIA renderer in use.
5. Milestones on this path
The graphics plan defines M-GL1 (client context-init decodes and executes; the client leaves its retry loop), M-GL2 (glxgears non-black), M-GL3 (GZDoom GL non-black through the mdev), M-GL4 (60 fps, no forcing), M-GL5 (two VMs, two mdevs), M-GL6 (split-screen video). The project sits between M-GL1 and M-GL2, with M-GL2's off-screen half proven: the display/KMS stack registers, X and the stock GLX path are fully green (glxinfo -B rc 0, ~520 FPS glxgears, Xorg WAIT 0), the DDX/X-stability walls were closed (X green for more than 10 minutes), the direct-GL ring/USERD machinery is hardened, and the GPU-rendered pbuffer path produced non-black animated frames and captured videos (45.4 s and 50 s). Captured GL sections now execute on the engine, and the direct-GL client's submission is fully decoded: it carries no classic draw header — the work is macro-driven (data-block blobs plus small state pushes invoking MME macros), the recycled pushes are recovered, and the client's draw-state push opens, captures and reaches the engine. The MME chain now completes and executes the draw macro: multi-frame keep-windows land, the 2799-word pack completes (2799/2799), the first MME-PACK-REARM fires, the fixed-CB region is aliased, and DRAW_IAB (mac=0x22) runs with the SPH-BIND prelude intact (84 words) and the DS stage VAs populated. The DS stage-0/1 image is now authored and live (a VTG SPH at family+0x900, first word 020a0481, with the window's own slot-1 bind rewritten to it): the DS latch reads st0=st1=020a0481 code=ff007321 and the DS value falls 0x86040626 -> 0x84000420, reproduced on two boots. The release path is now host-deterministic when the pack completes: the saved-window release carrier snapshots the held window and re-submits it with the calls released once the pack is resident (c772 end to end), and the held-CALL census plus the SA[34] golden fill prove the slot-34 DRAW_IAB call and its target are present (MME-CALL-TARGET slot=34 method=0x3910 client=0x265 golden=0x265 used=0x265). The draw macro now executes end to end: c788 ran DRAW_IAB (mac=0x22) on a released held window after the MME-DRAW-PLAN/MME-DRAW-MOVE reorder, TCS-off (45dbcdcd) clears the DS latch (the 0x84000420 was the synthesized TCS bind), a synthetic full-RT viewport (dab4a02c) and a release chained after any GR launch (3481e62d) complete the replay, and the DRAW_IAB body decodes with the public Mesa MME toolchain (mme_tu104_sim: slot 34, 8 draws of 3 vertices). The 11-16 wave then proved the host-side chain end to end: the real frame pushes are admitted (persisted colour-target bind from an earlier trusted push, draw markers accepted inside counted method runs, the 14.8-thousand-word window admitted and replayed as 40 chunks with a data-led start snap and a 128-slot candidate ring), the beef draw lane latches a clean DS (DS-FAST2 ... ds_after=80000000, c963) at the live-derived GS attribute map, capture-less boots get the golden 2799-word MME pack and MME-CALL-HOLD -> MME-CARRY-SAVE -> MME-CARRY-FIRE -> MME-PACK-REARM -> MME-SA-REARM fires, the prelude latch survives the per-fire channel recycle, and chunks are forwarded in order. The late-11-16 wave crossed the guest submission gap. An offscreen SDL EGL/GBM shim (GZ_EGL) gives GZDoom a real NVIDIA GL context without Xorg/DDX (GL_RENDERER: NVIDIA GeForce RTX 2080 SUPER/PCIe/SSE2, GL_VERSION: 4.6.0 NVIDIA 570.144; no llvmpipe), and the real draw window surfaced: 12068 B at push 0x402f9d8, an op=4 IMMD CALL to method 0x3800 (imm=0xd48) plus CALL slots 44/57/58 (0x3960/0x39c8/0x39d0), with no 0x3910/0x3914 and no colour-target bind of its own. Marker recognition now covers the real draw, admission happens on the marker even without a bind, the CALL-bearing chunk is forced first and every chunk is replayed verbatim. CALL(0) no longer wedges: eng89t resolves the immediate as an IR address through client SA[0] (then golden) and elides a not-resident call to a NOP; c1026/c1027 entered the captured macro (macro-status=00000004, mpc 0->4) without trapping, and c1027 produced the first DS with real stage data (DS-FAST2 ds_after=83044206 stage=015e0900,015e0a00,015c0400). The remaining gate at that point was precise: the client's per-draw MME macro body was never captured (the 59580-byte prelude carries only the 12 setup macros; the draw push has no 0x114/0x11c; 0xd48 is a length/argument), and the surviving wedge was the synthetic golden body (badf1201 pc=513 mac=0xf1). The pixel gate then closed on 2026-11-18 without that body (b5a68b9a): the host archives the first accepted window that carries the client clear or the direct-GL CALL(0) marker and replays it when a later window carries neither; the engine's clear stores red on the guest surface; the readback no longer guesses the X-screen span but adopts the CE D2H copy's source VA as the readback surface, with a generation-pinned snapshot and a fence delivered with the copy (the driver's ~11 s wait fell to 2.3-7.2 ms in the measured boots). Two consecutive boots read GL_FRAME nonblack=291840 px0=(255,0,0), live t/04 is green, and EXPECT_GL_PIXELS=closed; the gate was re-verified on the later CUDA-side rounds. What remains is the window/screen present (glxgears' window is black and a window draw can wedge X), X start speed (the per-boot X first-generation lottery), and the boot lottery where the engine stores after the guest's read. A GZDoom video was separately delivered through the guest's software GL path (Mesa llvmpipe) as a guaranteed-quality deliverable; it is not a vGPU rendering claim.
6. What is not claimed
- No window/screen frame has rendered real pixels through the emulated vGPU yet; every vGPU screen capture so far is black. What is proven is a guest GL readback: a stock
glReadPixelsreads a non-black frame (GL_FRAME nonblack=291840 px0=(255,0,0), two consecutive boots) produced by the physical engine through the emulated vGPU, and the live acceptance lane enforces it (EXPECT_GL_PIXELS=closed). The non-black frames and the videos (45.4 s and 50 s) also come from the off-screen pbuffer path (pbuffer -> sysmem -> kvmfr ivshmem -> host reader), not from a windowed X screen capture. A synchronous window draw can still wedge X, and X start retains a per-boot first-generation lottery. Those are the current walls. - The 2026-11-16 GZDoom video is a software-GL deliverable, not a vGPU result. Mesa llvmpipe rendered it inside the guest; it is a guaranteed-quality demonstration while the GPU-GL pixel path is being worked, not evidence of the emulated vGPU's 3D pipeline.
- GZDoom reaching
V_Init: allocate screenis not a rendered-frame claim; it proves the client's GL init and the direct-GL GR lane, not the game loop or a presented frame. - No frame-rate or latency numbers.
7. Related pages
Graphics-Execution.md— the shared execution machinery and the ranked walls.Vulkan.md— the sibling API path, further along in the pipeline lifecycle.DirectX.md— the Windows/DirectX target.CUDA-Userspace-Driver.md— how the NVIDIA userspace stack is analysed.Install-and-First-Run.md— bringing the stack up.../docs/04-implementation/05-graphics-execution-plan.md— the canonical plan, gap list and gates.