Skip to content

ng1: expand resident DID state on the GPU - #731

Merged
techomancer merged 5 commits into
techomancer:mainfrom
Tzeentchnet:feature/gpu-upstream-m2-display
Nov 14, 2026
Merged

techomancer merged 5 commits into
techomancer:mainfrom
Tzeentchnet:feature/gpu-upstream-m2-display

Conversation

@Tzeentchnet

Copy link
Copy Markdown
Contributor

Summary

  • Expand Newport VC2 DID state on the GPU rather than uploading the decoded 2 MiB map, with less than 128 KiB of initial display-state traffic.
  • Keep GPU DID history with the display across scanout replacement, source switches, and raster reset/restore epochs; preserve it while display timing or output is disabled.
  • Check the complete GPU DID map against the CPU oracle, including stale rows, malformed tables, geometry changes, headless handoff, and both hardware backends.
  • Update the test gate, architecture documentation, and incremental GPU integration plan.

Scope and limitations

This extends the test-only resident foundation from #569; it does not enable a production Newport GPU mode. Ordinary resident frames do not upload or read back raw framebuffer planes or silently fall back to CPU raster. DID metadata readback is used explicitly by the parity tests.

Initial resident scanout rejects retained CPU DID history that cannot be reconstructed from current VC2 state. Moving that history between devices or back to a CPU renderer remains future lifecycle work. The slice adapts the earlier candidate in Tzeentchnet#4 and does not depend on #698.

Validation

On Windows with an NVIDIA RTX 5070, using an isolated worktree with a refreshed ignored lockfile:

.\scripts\test-resident-gate.ps1
cargo check --locked --offline -p iris --lib --no-default-features
cargo check --locked --offline -p iris-gui --features iris/wgpu

The full resident gate passed 63 tests, including the required Vulkan and D3D12 hardware runs. The existing main-worktree lockfile was left unchanged.

@techomancer

Copy link
Copy Markdown
Owner

very interestiong. this is not parallelizable at all. but probably still a win to decode on gpu to reduce traffic.

@techomancer
techomancer merged commit 4921038 into techomancer:main Nov 14, 2026
9 checks passed
@Tzeentchnet

Copy link
Copy Markdown
Contributor Author

Thanks for taking a look! You’re right that decoding the runs within each scanline is serial in the current implementation. There is a bit of parallelism across scanlines, though: the shader assigns one GPU invocation to each row, so different rows can run at the same time. Each invocation still checks earlier line-table entries to respect the early terminator, so there’s some duplicated work there.

The hope is that avoiding the 2 MiB decoded-map upload when the map changes outweighs that extra work. I haven’t measured the tradeoff yet, so I’ll benchmark unchanged frames, cursor-only updates, and DID changes before claiming it’s faster. If it matters, I’ll also look at avoiding unnecessary re-expansion on cursor-only changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants