Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -612,14 +612,24 @@ work. The test-only display worker inserts a typed GFIFO frame marker and
holds the consumer at that cut while it submits the exact resident prefix,
composes from the resident planes, and queues same-device presentation and
optional composed-output readback. Later draws cannot overtake the scanout.
Display-state refresh copies VC2, XMAP, palette and cursor state and decodes
DID metadata; it never forms CPU plane slices. Changed decoded DID metadata
may still be uploaded as a cached 2 MiB map, so this is not yet a
small-state-only or GPU-DID scanout. A mode-table fence published after the cut
defers the frame rather than forcing fence progress or presenting stale state.
GL and presenters using another device are rejected. Screenshot, frame
request, VNC and headless test capture read the composed output only, and
publish pixels and complete requests only after a successful copy/map.
Display-state refresh copies VC2, XMAP, palette and cursor state without
decoding DID or forming CPU plane slices. Changed VC2 state uploads at most
the 64 KiB VC2 RAM and a 32-byte parameter block; a GPU kernel expands DID
before scanout, so the 2 MiB decoded map is never uploaded. The complete
initial display-state transfer is below 128 KiB. CPU-oracle parity covers
disabled DID, malformed pointers, table termination, zero scanline length and
dimension changes on Vulkan and D3D12. The display retains GPU DID history
across scanout replacement and raster epochs, including rows and columns the
current VC2 tables leave untouched. An inactive display leaves this history
unchanged. A first resident frame checks the preserved parts of the CPU DID
map once and rejects nonzero history that cannot be reconstructed from
current VC2 state; it does not upload the decoded map. Moving that history
between devices or back to a CPU renderer is not implemented. A mode-table
fence published after the
cut defers the frame rather than forcing fence progress or presenting stale
state. GL and presenters using another device are rejected. Screenshot,
frame request, VNC and headless test capture read the composed output only,
and publish pixels and complete requests only after a successful copy/map.
After the initial seed, ordinary resident frames and idle/fence processing
perform no raw-plane transfer, CPU-plane access or CPU raster fallback.
Raw-plane observations explicitly select RGB, auxiliary or both, and return
Expand Down
18 changes: 13 additions & 5 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,21 @@ a single first-fault notification and reject restart.
These tests opt in to the test-only display worker; they do not enable resident
raster in the emulator. They do not complete board-level HOSTR, snapshot or
other raw consumers, full opcode/lifecycle coverage, or live-window validation.
Changed decoded DID metadata may still upload a cached 2 MiB map, so this is not
yet the small-state-only/GPU-DID completion of direct scanout.
Resident refresh skips CPU DID decoding. A GPU kernel expands changed VC2 DID
tables before scanout, and traffic assertions require zero decoded-map uploads
and less than 128 KiB for the complete initial display-state transfer. The
hardware oracle covers disabled DID, malformed line pointers, line-table
termination with stale-row preservation, zero scanline length, and width and
height changes on both backends. It explicitly reads the GPU DID metadata for
byte-for-byte comparison with the CPU map; ordinary frames do not perform that
test readback. The tests also cover scanout replacement, reset and restore
epochs, switching displays, inactive display controls, and rejection of
unreconstructible initial DID history or a different GPU device.

```sh
cargo test --locked -p iris --lib --features wgpu,rex-jit,rexdiag resident_ -- --test-threads=1
cargo test --locked -p iris --lib --features wgpu,rex-jit,rexdiag dev::ng1::rex3_flat_fill::tests -- --test-threads=1
cargo test --locked -p iris --lib --features wgpu,rex-jit,rexdiag direct_ng1_scanout_display_generations_track_real_changes -- --test-threads=1
cargo test --locked -p iris --lib --features wgpu,rex-jit,rexdiag direct_ng1_scanout_ -- --test-threads=1
REX3_RESIDENT_BACKEND=vulkan cargo test --locked -p iris --lib --features wgpu,rex-jit,rexdiag resident_gpu_ -- --ignored --nocapture --test-threads=1
REX3_RESIDENT_BACKEND=vulkan cargo test --locked -p iris --lib --features wgpu,rex-jit,rexdiag dev::ng1::wgpu::direct_tests -- --ignored --nocapture --test-threads=1
REX3_RESIDENT_BACKEND=dx12 cargo test --locked -p iris --lib --features wgpu,rex-jit,rexdiag resident_gpu_ -- --ignored --nocapture --test-threads=1
Expand All @@ -319,8 +327,8 @@ Remove-Item Env:\IRIS_NO_JIT -ErrorAction SilentlyContinue
.\scripts\test-resident-gate.ps1
```

The script requires 25 `resident_` CPU tests, three flat-fill tests and one
display-generation test, then **10 resident GPU tests and five direct
The script requires 25 `resident_` CPU tests, three flat-fill tests and three
direct-state tests, then **10 resident GPU tests and six direct
scanout tests on each backend**. It checks each libtest pass count, rejects
hardware skips and prints the selected adapter; both Vulkan and D3D12 must
succeed for the full gate. `.\scripts\test-resident-gate.ps1 -Backend vulkan`
Expand Down
2 changes: 1 addition & 1 deletion clanker/INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ Plans, task briefs and reviews written for agents. Each states its own status; m
|---|---|---|
| [wgpu-ui.md](plans/wgpu-ui.md) | plan | The iris window on wgpu: a presenter in `src/wgpu`, the board's device shared, VPro frames presented with no readback, then Newport's compositor in WGSL |
| [cow-chd-sync-plan.md](plans/cow-chd-sync-plan.md) | plan | Plan: copy-on-write protection + "Syncing CHD file…" apply-on-shutdown |
| [GPUTodo.md](plans/GPUTodo.md) | plan | REX3 proper GPU mode: M0 and gated test-only M1 complete, minimum M2 partial; live raster remains unavailable until M3, with HostRW, lifecycle and full opcode coverage still open |
| [GPUTodo.md](plans/GPUTodo.md) | plan | REX3 proper GPU mode: merged gated foundation, unmerged M2-M10 candidate stack and planned upstream PRs, with presenter/CI coordination |
| [gui-benchmark-plan.md](plans/gui-benchmark-plan.md) | plan | Benchmark in iris-gui |
| [iris-daynaport-target.md](plans/iris-daynaport-target.md) | plan | Task: add a DaynaPort SCSI/Link target to the IRIS emulator |
| [origin-octane-o2-landing-review.md](plans/origin-octane-o2-landing-review.md) | plan | Review of James Braid's SGI series (547 commits to 2026-11-11, two passes): Origin/Onyx2 two-node, Octane, O2, Fuel/Tezro (IP35), InfiniteReality (KONA); cache-as-RAM, DMA and interrupt paths per machine; ranked findings with status (KONA texture-bind race, Origin node-1 code never JIT-compiled, cross-node IRQs land on node 0, byte-wise DMA on Origin/IP35, BCM5701 lost coalescing wake) |
Expand Down
Loading