rt: compare native ray queries with guest traversal fixtures #309

Manually merged
github merged 1 commit from github-bot/gh-309 into main 2026-12-03 16:31:21 +00:00 AGit
Owner

@⁠tommiehansen on GitHub · 2026-12-03 10:54 UTC · original
tommiehansen:perf/phase2-ray-hit-parity → main · +133 −0 · 2 files · 1 commits · merged 2026-12-03 16:26 UTC

Problem

Device-loss counters cannot detect mismatched candidates or incorrect committed hits between guest traversal and native RayQuery.

Implementation

Add a standalone comparator and a documented JSONL capture contract. Match rays by case and ray ID. Compare masks, hit or miss, committed instance/geometry/primitive IDs, and candidate IDs, acceptance and order. Distances are exact by default, with an explicit optional absolute tolerance. Missing, duplicate and malformed records are reported.

Source and dependencies

Upstream #262 motivates the parity work. The tool runs independently of the game and can land directly on main. A capture exporter and matched GPU traces are still required for real replay verification.

What the comparator checks

Field Comparison
Ray identity, mask and hit/miss Exact
Committed instance, geometry and primitive Exact
Candidate IDs, order and acceptance Exact
Hit distance Exact by default; optional absolute tolerance

This is an offline correctness tool for the native RT stack, including #262 and #306. It cannot establish runtime parity without matched captures.

Validation and limitations

Synthetic CLI checks covered exact agreement, a distance mismatch with and without tolerance, changed candidate ordering, changed masks and hit status, duplicate keys and empty input. No actual game traces were available. The tool adds no gameplay work and provides no FPS claim.

Hardware verification

Capture matching guest traversal and native RayQuery traces on the RX 9060 XT 16 GB (native 1080p) and RX 9070 XT (native 1440p), RT enabled and frame generation off. Run the comparator using the documented JSONL contract. FPS is not an acceptance criterion for this tool.

**@⁠tommiehansen** on GitHub · 2026-12-03 10:54 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/309) `tommiehansen:perf/phase2-ray-hit-parity` → `main` · +133 −0 · 2 files · 1 commits · merged 2026-12-03 16:26 UTC ## Problem Device-loss counters cannot detect mismatched candidates or incorrect committed hits between guest traversal and native RayQuery. ## Implementation Add a standalone comparator and a documented JSONL capture contract. Match rays by case and ray ID. Compare masks, hit or miss, committed instance/geometry/primitive IDs, and candidate IDs, acceptance and order. Distances are exact by default, with an explicit optional absolute tolerance. Missing, duplicate and malformed records are reported. ## Source and dependencies [Upstream #262](https://git.gtahub.st/github/lobomfz--VIctory-xmem/pulls/262) motivates the parity work. The tool runs independently of the game and can land directly on main. A capture exporter and matched GPU traces are still required for real replay verification. ## What the comparator checks | Field | Comparison | |---|---| | Ray identity, mask and hit/miss | Exact | | Committed instance, geometry and primitive | Exact | | Candidate IDs, order and acceptance | Exact | | Hit distance | Exact by default; optional absolute tolerance | This is an offline correctness tool for the native RT stack, including [#262](https://git.gtahub.st/github/lobomfz--VIctory-xmem/pulls/262) and [#306](https://git.gtahub.st/github/lobomfz--VIctory-xmem/pulls/306). It cannot establish runtime parity without matched captures. ## Validation and limitations Synthetic CLI checks covered exact agreement, a distance mismatch with and without tolerance, changed candidate ordering, changed masks and hit status, duplicate keys and empty input. No actual game traces were available. The tool adds no gameplay work and provides no FPS claim. ## Hardware verification Capture matching guest traversal and native RayQuery traces on the RX 9060 XT 16 GB (native 1080p) and RX 9070 XT (native 1440p), RT enabled and frame generation off. Run the comparator using the documented JSONL contract. FPS is not an acceptance criterion for this tool.
Compare paired replay rows by case and ray ID. Check masks, accepted and rejected candidates in order, hit IDs and distance, and report missing or invalid data explicitly.

Run synthetic CLI fixtures for exact agreement, tolerance, mismatches and invalid captures. Real GPU traces and a capture exporter remain outstanding.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 10:58:27 +00:00
github manually merged commit fadeefc52d into main 2026-12-03 16:31:21 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.