Repository navigation
PR 0010 PGRAPH reject oversized inline packets atomically
- GitHub state: Merged
- Disposition at review: Merged
-
Current head at review:
659ad30be0488e85bea0df9514a5e52a31fcf290(feature/eng-2026-433-s-pr09-pfifo-bulk-uc037deed) -
Reviewed head:
659ad30be0488e85bea0df9514a5e52a31fcf290 - Last reviewed: 2026-09-14 UTC
-
Base:
mainatdb0905eabd5a1fd0ee1a8e8eb81585db104e256e - Subsystem: NV2A / PGRAPH
Review freshness: this page records the final/known PR head at review time. If the PR is reopened or rewritten, re-review before relying on implementation details.
- What it changes: PGRAPH: reject oversized inline packets atomically
- Why it was attempted: Observed problem: Oversized ARRAY ELEMENT16 , ARRAY ELEMENT32 , and INLINE ARRAY packets could reach assertion-backed expansion or mutation paths before the complete packet capacity was known. Profiling evidence: The earlier valid-packet work showed that bulk inline handling can reduce repeated PFIFO dispatch/bookkeeping. The current-main reconstruction therefore had two requirements: preserve that accepted-packet path and restore whole-packet preflight b…
- Current/final result: Merged: atomic packet-boundary tests, scalar/bulk equivalence, validation, and accepted-packet performance gates passed.
- Lesson: Validate the complete inline packet capacity before expanding pending draw work or mutating an inline destination; oversized packets must be rejected atomically.
| Implementation file | Δ | Why it matters |
|---|---|---|
hw/xbox/nv2a/pgraph/inline-elements.h |
+27/-6 | PGRAPH inline-packet capacity and atomic-mutation contract. |
hw/xbox/nv2a/pgraph/pgraph.c |
+50/-0 | Shared PGRAPH guest-state/method handling and renderer boundary. |
tests/xbox/pgraph-inline-elements/pgraph-inline-elements-test.c |
+25/-0 | Focused/regression validation for the implementation contract. |
flowchart LR
subgraph Before
A[Guest inline packet] --> B[Begin expansion/mutation] --> C[Discover capacity problem] --> D[Partial state possible]
end
subgraph PR_10[PR #10]
E[Guest inline packet] --> F[PR #10 capacity preflight] --> G[Atomic accept or reject] --> H[Consistent PGRAPH state]
end
Restore pending-draw-aware packet planning. - Preflight complete inline packets before handler dispatch/mutation. - Account for ELEMENT16's two values per word. - Consume malformed dispatch units through a controlled guest-error path. - Preserve existing valid bulk/scalar loops and add focused boundary/equivalence coverage. Main code path: hw/xbox/nv2a/pgraph/pgraph.c , inline-elements.h , focused PFIFO tests Commits: merged candidate 659ad30be0488e85bea0df9514a5e52a31fcf290
Merged: atomic packet-boundary tests, scalar/bulk equivalence, validation, and accepted-packet performance gates passed.
Validate the complete inline packet capacity before expanding pending draw work or mutating an inline destination; oversized packets must be rejected atomically.
Do not begin ARRAY_ELEMENT/INLINE_ARRAY mutation and then discover the packet is oversized; partial mutation leaves PGRAPH state inconsistent.
Pointers only; the detailed evidence remains in its original location.
tests/xbox/pgraph-inline-elements/- https://github.com/Mainkill1/xemu-perf-tests/pull/16
- https://github.com/Mainkill1/xemu-perf-tests/pull/18
- https://github.com/Mainkill1/xemu-perf-tests/pull/17
- https://github.com/Mainkill1/xemu/blob/13cb6d7384b26490cdec2ccf08fc1d607efc426a/evidence/eng-2026-433-pr10-pfifo-hardening/REPORT.md
DSP tooling guide and navigation updated November 2, 2026 for experimental PR #384, source 8f51d237. Capture/replay usage and limits.
The earlier wiki-wide review was published November 1, 2026. Emulator source: b7140848. Reviewed wiki content: 1d2b671. Current status · Release availability · Publication process.
- Home
- Current status
- Stable versus main
- Implemented mechanisms
- Controls and defaults
- Measured results and limits
- Complete change register
- System
- CPU and vCPU
- Memory and DMA
- Graphics / NV2A
- APU and audio
- Timing and timers
- Platform and I/O
- Hardware observations
- Fidelity boundaries
- Methodology
- PGR2 routes
- Debugging lag / hot paths
- Tools and commands
- DSP capture, replay and fuzzing
- HLE readiness and public XISO proof
- Concurrent DSP shadow and OpenAL proof
- DSP HLE operation inventory
- DSP HLE fix examples and testing
- Development
- Upstream shortlist
- Wiki maintenance
- Research / retired work
- Optimization catalog
- Hot-path shortcuts
- Researched experiments
- Unproven proposal directory
- PR lessons
- September26 snapshot
Repository · PRs · Issues