Repository navigation
PR 0018 ENG 2026 523 Validate linear texture source spans
- GitHub state: Closed unmerged
- Disposition at review: Negative result
-
Current head at review:
2e801ab07c4a8d0a87defd2ba70ddad3b3e1041c(fix/eng-2026-523-linear-texture-source-span) -
Reviewed head:
2e801ab07c4a8d0a87defd2ba70ddad3b3e1041c - Last reviewed: 2026-09-14 UTC
-
Base:
fix/eng-2026-523-texture-dma-contract-ue7eb6770at37823ccf18263764c82ceb6698201330a22a6c65 - Subsystem: NV2A texture / layout
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: ENG-2026-523: Validate linear texture source spans
- Why it was attempted: Observed problem: A decoder-consumed packed row could exceed the separately approved linear source span. Profiling evidence: N/A — no matched current-main profile exists; historical evidence remains below. Suspected cause: Approved span length did not consistently include the format-aware decoder row consumption. Why this is worth investigating: The check prevents out-of-range source reads for linear texture conversion.
- Current/final result: Closed historical validation: guarded old-head failure plus repaired consuming-path tests established the texture-span fix for that source state.
- Lesson: Linear texture source-span calculations need consuming-path tests that fail on the old head and pass on the repair; exact byte spans matter for correctness and later overlap/coherency work.
| Implementation file | Δ | Why it matters |
|---|---|---|
hw/xbox/nv2a/pgraph/texture-layout.h |
+47/-4 | Shared texture byte-span, mip, and face-layout calculations. |
hw/xbox/nv2a/pgraph/texture.c |
+4/-5 | Texture source identity, cache, upload, binding, or freshness path. |
tests/unit/test-xbox-nv2a-texture.c |
+155/-0 | Focused/regression validation for the implementation contract. |
flowchart LR
subgraph Before
A[Guest texture state] --> B[Compute source/layout] --> C[Upload/cache decision] --> D[Draw]
end
subgraph PR_18[PR #18]
E[Guest texture state] --> F[PR #18 layout/identity rule] --> G[Validated reuse/copy/fallback] --> H[Draw]
end
Add checked linear-span arithmetic. - Handle packed YUY2/UYVY macropixels in consumed-row width. - Use the checked helper in public length and conversion paths. Main code path: NV2A linear texture source span calculation and conversion. Commits: 18
Closed historical validation: guarded old-head failure plus repaired consuming-path tests established the texture-span fix for that source state.
Linear texture source-span calculations need consuming-path tests that fail on the old head and pass on the repair; exact byte spans matter for correctness and later overlap/coherency work.
Do not accept formula-only tests that never exercise the real consuming path or rely on broad page/allocation spans when exact bytes are available.
Pointers only; the detailed evidence remains in its original location.
- https://github.com/Mainkill1/xemu-perf-tests/blob/bdd9effed6dc4cc30677c3d88d09b27e7b5b597c/docs/pr-metrics-20260909/data/xemu-18.json
- https://github.com/Mainkill1/xemu/blob/b4fd8f58a66cf125c8e1f1700d26112192cd2d4d/evidence/eng-2026-523-pr18-linear-span-2e801ab0/REPORT.md
- https://github.com/Mainkill1/xemu/blob/b4fd8f58a66cf125c8e1f1700d26112192cd2d4d/evidence/eng-2026-523-pr18-linear-span-2e801ab0/xiso-matched-per-test.csv
- https://github.com/Mainkill1/xemu/blob/b4fd8f58a66cf125c8e1f1700d26112192cd2d4d/evidence/eng-2026-523-pr18-linear-span-2e801ab0/xiso-group-summary.csv
- https://github.com/Mainkill1/xemu/blob/b4fd8f58a66cf125c8e1f1700d26112192cd2d4d/evidence/eng-2026-523-pr18-linear-span-2e801ab0/xiso-expanded-group-summary.csv
- https://github.com/Mainkill1/xemu/blob/b4fd8f58a66cf125c8e1f1700d26112192cd2d4d/evidence/eng-2026-523-pr18-linear-span-2e801ab0/pgr2-runs-and-resources.csv
- https://github.com/Mainkill1/xemu/blob/b4fd8f58a66cf125c8e1f1700d26112192cd2d4d/evidence/eng-2026-523-pr18-linear-span-2e801ab0/morrowind-summary.csv
- https://github.com/Mainkill1/xemu/blob/b4fd8f58a66cf125c8e1f1700d26112192cd2d4d/evidence/eng-2026-523-pr18-linear-span-2e801ab0/SHA256SUMS
Related PRs referenced by this PR:
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