gpu: keep slot 57 descriptor keys stable across runs #3730

Merged
Not-Saii merged 7 commits from upstream-pr/3730 into main 2026-12-02 18:38:57 +00:00
Not-Saii commented 2026-12-01 12:07:07 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-12-01T12:07:07Z.


Refs #2413, #3416

Why

A reviewed slot 57 profile is found by <variant>.mesh57-state, where the variant hashes the descriptor after normalize_mesh57_descriptor. The helper only removed relocation when the low words at +0x110/+0x288 and +0x270/+0x120 sat 0x10 apart and the two allocation addresses at +0x160/+0x2c0 were equal. Both conditions depend on where the records are allocated. In captures, the same pipeline passed them in one run and failed them in the next. Even recognized descriptors kept the 32-bit values at +0x188/+0x1a8/+0x1c8/+0x2e8 raw.

Measured on two 600 s runs of a captured console package with the same scripted input, X2W_MESH57_CAPTURE_STATE=1, pairing creation archives by identical .m57/.ps57/.root bytes:

Pairs
Pipelines captured in both runs 304
Stored descriptor identical across the runs (current main) 0
Both archives raw (helper did not recognize the layout) 199
One archive already normalized by the helper (not comparable) 105

On the 199 raw pairs, every field that moved was one of:

  • a record pointer whose distance from the section pointer at +0x38 was stable: +0x78, +0x120, +0x128, +0x168, +0x178, +0x280, +0x288, +0x2c8, +0x2d8 in all pairs; +0x198, +0x1b8, +0x1d8, +0x2f8 when present;
  • the low word at +0x110 and +0x270 (section-relative, constant high word);
  • the allocation address at +0x160/+0x2c0 (unequal in 92 descriptors);
  • 32-bit values at +0x188, +0x1a8, +0x1c8, +0x2e8, 0x10 before a record pointer, whose spacing was stable.

So no reviewed profile for these pipelines could load in a later run.

What

For the 0x300-byte layout, recognition now uses the zero and length fields, the two 0x04010000 metadata words and the ten record pointers within 2 GiB of +0x38. The placement-dependent checks are dropped. Normalization:

  • makes the ten required and four optional record pointers relative to +0x38 (an optional slot that holds no such pointer keeps its value);
  • keeps +0x110/+0x270 section-relative, as before;
  • drops the allocation addresses at +0x160 and +0x2c0 whether or not they are equal, and stores in +0x160 a presence word: layout version 2 in bits 32..39 and one bit per optional pointer or second-base slot that held a relocated value (added after review, 2bdc7258: without it a pointer equal to the base and an absent one both normalized to zero);
  • re-bases the 32-bit values at +0x188/+0x1a8/+0x1c8/+0x2e8 on the first of them (values below 0x10000 or with a nonzero high word are kept).

Every caller (hash_guest_stream, the .s57 capture, native preparation and the fixture's profile writer) goes through the helper, so they change together.

Tests

mesh57_descriptor_relocations (run by startup_indirect_mesh_create_result_*):

  • The unrecognized-layout control used a mismatched allocation address. Captures show that is a normal layout, so the control now uses a wrong +0x11c metadata word and still expects the descriptor unchanged. All the other checks are kept.
  • New positive case: unequal allocations and unrelated +0x110/+0x288 and +0x270/+0x120 placements normalize like their relocated twin.
  • New second-base case: equal under a common shift, different when the spacing changes, idempotent.
  • New case: a small value at +0x188 survives unchanged and stays distinct.
  • Mutation: restoring the old +0x110/+0x288 and +0x270/+0x120 check fails startup_indirect_mesh_create_result_warp.

Commit 5132cbdb, release preset, Windows 11 Pro 10.0.26300, MSVC 19.44.35230 (Visual Studio 2022 Build Tools), WARP:

cmake --build --preset runtime
cmake --build out\build\release --target startup_indirect_draw_indexed
ctest --preset release --no-tests=error -j 1 -R '^(startup_indirect_mesh_create_result_warp|startup_indirect_mesh57_stream_key_warp|native_fixed_mesh57_warp|native_fixed_mesh57_mrt_warp)$'

4/4 passed, 0 skipped. The _hardware variants were not run.

The upstream PR check does not run the native_* tests, so I ran every non-hardware one on the same commit and host (full release build):

cmake --build --preset release
ctest --preset release --no-tests=error -j 4 -R '^native_' -E '_hardware$'
Result Tests
Passed 247
Failed 0
Capability skip (exit 77; WARP lacks the feature, e.g. compute requires wave32) 26
Total 273

Not run: the 189 native_*_hardware tests and the Debug configuration.

Review follow-up (2bdc7258): presence pairs in mesh57_descriptor_relocations, a current/earlier/raw archive control in tests/mesh57_profile_draft_check.py, and an earlier-profile-only cache in native_mesh57_outcomes_*. native_mesh57_outcomes_warp, startup_indirect_mesh_create_result_warp and startup_indirect_mesh57_stream_key_warp: 3/3 passed on WARP; _hardware not run.

Run check

From the previous run's raw descriptors I predicted each creation archive name under the new rule, using the variant formula of tools/startup/mesh57_profile.py. I then ran the same 600 s input on this commit (RTX 4090, driver 610.88):

New archives Count
Name equals the prediction 222
Name differs from the prediction 0
No prediction (that pipeline's earlier archive was already normalized, or it was not captured) 132
Descriptor left raw by the new rule 0

Not covered

  • Stability is shown across two runs with the same input on one host. A different allocation order (another route through the package, another host) is not measured.
  • The 105 pairs that the helper had already normalized in one run were not compared.
  • Existing .s57 archives and profiles keep their old names and are not looked up. tools/startup/mesh57_profile.py refuses an extended descriptor that is raw or lacks the layout 2 presence word; re-capture with X2W_MESH57_CAPTURE_STATE=1 and write the profile again from the same reviewed JSON.
  • The run check above was measured at 5132cbdb, before the presence word; not repeated.

🤖 Generated with Claude Code

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5585352647 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3730). Originally posted by [Not-Saii](https://github.com/Not-Saii) on 2026-12-01T12:07:07Z. --- Refs #2413, #3416 ## Why A reviewed slot 57 profile is found by `<variant>.mesh57-state`, where the variant hashes the descriptor after `normalize_mesh57_descriptor`. The helper only removed relocation when the low words at +0x110/+0x288 and +0x270/+0x120 sat 0x10 apart and the two allocation addresses at +0x160/+0x2c0 were equal. Both conditions depend on where the records are allocated. In captures, the same pipeline passed them in one run and failed them in the next. Even recognized descriptors kept the 32-bit values at +0x188/+0x1a8/+0x1c8/+0x2e8 raw. Measured on two 600 s runs of a captured console package with the same scripted input, `X2W_MESH57_CAPTURE_STATE=1`, pairing creation archives by identical `.m57`/`.ps57`/`.root` bytes: | | Pairs | |---|---:| | Pipelines captured in both runs | 304 | | Stored descriptor identical across the runs (current main) | 0 | | Both archives raw (helper did not recognize the layout) | 199 | | One archive already normalized by the helper (not comparable) | 105 | On the 199 raw pairs, every field that moved was one of: - a record pointer whose distance from the section pointer at +0x38 was stable: +0x78, +0x120, +0x128, +0x168, +0x178, +0x280, +0x288, +0x2c8, +0x2d8 in all pairs; +0x198, +0x1b8, +0x1d8, +0x2f8 when present; - the low word at +0x110 and +0x270 (section-relative, constant high word); - the allocation address at +0x160/+0x2c0 (unequal in 92 descriptors); - 32-bit values at +0x188, +0x1a8, +0x1c8, +0x2e8, 0x10 before a record pointer, whose spacing was stable. So no reviewed profile for these pipelines could load in a later run. ## What For the 0x300-byte layout, recognition now uses the zero and length fields, the two `0x04010000` metadata words and the ten record pointers within 2 GiB of +0x38. The placement-dependent checks are dropped. Normalization: - makes the ten required and four optional record pointers relative to +0x38 (an optional slot that holds no such pointer keeps its value); - keeps +0x110/+0x270 section-relative, as before; - drops the allocation addresses at +0x160 and +0x2c0 whether or not they are equal, and stores in +0x160 a presence word: layout version 2 in bits 32..39 and one bit per optional pointer or second-base slot that held a relocated value (added after review, 2bdc7258: without it a pointer equal to the base and an absent one both normalized to zero); - re-bases the 32-bit values at +0x188/+0x1a8/+0x1c8/+0x2e8 on the first of them (values below 0x10000 or with a nonzero high word are kept). Every caller (`hash_guest_stream`, the `.s57` capture, native preparation and the fixture's profile writer) goes through the helper, so they change together. ## Tests `mesh57_descriptor_relocations` (run by `startup_indirect_mesh_create_result_*`): - The unrecognized-layout control used a mismatched allocation address. Captures show that is a normal layout, so the control now uses a wrong +0x11c metadata word and still expects the descriptor unchanged. All the other checks are kept. - New positive case: unequal allocations and unrelated +0x110/+0x288 and +0x270/+0x120 placements normalize like their relocated twin. - New second-base case: equal under a common shift, different when the spacing changes, idempotent. - New case: a small value at +0x188 survives unchanged and stays distinct. - Mutation: restoring the old +0x110/+0x288 and +0x270/+0x120 check fails `startup_indirect_mesh_create_result_warp`. Commit `5132cbdb`, release preset, Windows 11 Pro 10.0.26300, MSVC 19.44.35230 (Visual Studio 2022 Build Tools), WARP: ```powershell cmake --build --preset runtime cmake --build out\build\release --target startup_indirect_draw_indexed ctest --preset release --no-tests=error -j 1 -R '^(startup_indirect_mesh_create_result_warp|startup_indirect_mesh57_stream_key_warp|native_fixed_mesh57_warp|native_fixed_mesh57_mrt_warp)$' ``` 4/4 passed, 0 skipped. The `_hardware` variants were not run. The upstream PR check does not run the `native_*` tests, so I ran every non-hardware one on the same commit and host (full release build): ```powershell cmake --build --preset release ctest --preset release --no-tests=error -j 4 -R '^native_' -E '_hardware$' ``` | Result | Tests | |---|---:| | Passed | 247 | | Failed | 0 | | Capability skip (exit 77; WARP lacks the feature, e.g. `compute requires wave32`) | 26 | | Total | 273 | Not run: the 189 `native_*_hardware` tests and the Debug configuration. Review follow-up (2bdc7258): presence pairs in `mesh57_descriptor_relocations`, a current/earlier/raw archive control in `tests/mesh57_profile_draft_check.py`, and an earlier-profile-only cache in `native_mesh57_outcomes_*`. `native_mesh57_outcomes_warp`, `startup_indirect_mesh_create_result_warp` and `startup_indirect_mesh57_stream_key_warp`: 3/3 passed on WARP; `_hardware` not run. ## Run check From the previous run's raw descriptors I predicted each creation archive name under the new rule, using the variant formula of `tools/startup/mesh57_profile.py`. I then ran the same 600 s input on this commit (RTX 4090, driver 610.88): | New archives | Count | |---|---:| | Name equals the prediction | 222 | | Name differs from the prediction | 0 | | No prediction (that pipeline's earlier archive was already normalized, or it was not captured) | 132 | | Descriptor left raw by the new rule | 0 | ## Not covered - Stability is shown across two runs with the same input on one host. A different allocation order (another route through the package, another host) is not measured. - The 105 pairs that the helper had already normalized in one run were not compared. - Existing `.s57` archives and profiles keep their old names and are not looked up. `tools/startup/mesh57_profile.py` refuses an extended descriptor that is raw or lacks the layout 2 presence word; re-capture with `X2W_MESH57_CAPTURE_STATE=1` and write the profile again from the same reviewed JSON. - The run check above was measured at 5132cbdb, before the presence word; not repeated. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Leyukaka commented 2026-12-01 21:57:38 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-01T21:57:38Z.

Review: COMMENTED


Reviewed 5132cbdb6. Thanks for the change. Two points:

  • In src/startup_stubs/mesh57_profile.h:59, an optional pointer at 0x198 equal to the section base normalizes to zero, which is also the value for an absent pointer. The two descriptors then pass the same profile-name and byte checks in src/startup_stubs/native_mesh57.inl:435 and :499. Please preserve presence separately from the relative offset and add a control for this pair.
  • src/startup_stubs/native_mesh57.inl:436 only looks up the new variant. For an existing profile whose descriptor has a newly normalized second base, the old file is missed, and renaming it leaves mismatched descriptor bytes. Please define how existing profiles are read or regenerated, and exercise an old-profile-only cache through the writer and runtime lookup. The new helper assertions cover relocation and spacing but leave that path untested.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6140881197 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3730#pullrequestreview-6140881197). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-12-01T21:57:38Z. **Review:** COMMENTED --- Reviewed `5132cbdb6`. Thanks for the change. Two points: - In `src/startup_stubs/mesh57_profile.h:59`, an optional pointer at `0x198` equal to the section base normalizes to zero, which is also the value for an absent pointer. The two descriptors then pass the same profile-name and byte checks in `src/startup_stubs/native_mesh57.inl:435` and `:499`. Please preserve presence separately from the relative offset and add a control for this pair. - `src/startup_stubs/native_mesh57.inl:436` only looks up the new variant. For an existing profile whose descriptor has a newly normalized second base, the old file is missed, and renaming it leaves mismatched descriptor bytes. Please define how existing profiles are read or regenerated, and exercise an old-profile-only cache through the writer and runtime lookup. The new helper assertions cover relocation and spacing but leave that path untested.
Not-Saii commented 2026-12-01 23:52:08 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-12-01T23:52:08Z.


Thanks, both points were real. Fixed in 2bdc7258, a new commit on top of 5132cbdb.

1. A pointer at the base vs no pointer. The same collision also happened in the second-base group: the first value re-bases to 0 in whichever slot holds it, so [A, 0] and [0, A] at +0x188/+0x1a8 normalized the same.

normalize_mesh57_descriptor now writes a presence word into the allocation word at +0x160, which it already discarded:

  • bits 32..39 hold layout version 2;
  • bit i is set for each optional pointer (+0x198/+0x1b8/+0x1d8/+0x2f8) that held a relocated value;
  • bit 4 + i is set for each second-base slot (+0x188/+0x1a8/+0x1c8/+0x2e8) that held one.

The descriptor stays 0x300 bytes, so neither the profile format nor the archive format changes.

mesh57_descriptor_relocations adds both pairs (pointer equal to the section base vs absent, and the same second-base value in either slot). It checks that each pair stays distinct and that each result is idempotent.

2. Existing profiles. They are regenerated, not read.

This change renames every extended-layout variant, including the ones 5132cbdb had already made stable. A .s57 archive stores the descriptor after normalization, so an old archive cannot be normalized again. So:

  • Writer: tools/startup/mesh57_profile.py (read_creation, which the draft, check and write paths all use) refuses an extended descriptor (both 0x04010000 metadata words) unless +0x38 is zero and +0x160 carries layout 2. That covers raw archives and archives from the earlier normalization. The message asks for a new capture with X2W_MESH57_CAPTURE_STATE=1, then a rewrite from the same reviewed JSON.
  • Runtime: it looks up only the current name. A cache that holds only an old profile reports profile_absent, and the file is never opened.

Tests:

  • tests/mesh57_profile_draft_check.py runs a current, an earlier and a raw archive through the writer CLI and build_draft. Only the current one writes a profile. Removing either half of the refusal (the presence test or the +0x38 test) fails the check.

  • native_mesh57_outcomes_* adds two extended records, each with a second base and a different metadata byte:

    • the first has only a profile written with the earlier normalization (second base raw, +0x160 zero);
    • the second has a profile written with the current normalization.

    Totals: profile_absent 65 (was 64), ready 2, lowering_reached 2, and 68 profile lookups with 3 opens (was 66 with 2). The earlier profile was never opened.

  • docs/experiments/native-fixed-mesh57.md describes the presence word and how to regenerate a profile.

Commit 2bdc7258, release preset, Windows 11 Pro 10.0.26300, MSVC 19.44, WARP:

cmake --build --preset release --target startup_indirect_draw_indexed compile_dxil
ctest --preset release --no-tests=error -R '^(native_mesh57_outcomes_warp|startup_indirect_mesh_create_result_warp|startup_indirect_mesh57_stream_key_warp)$'

3/3 passed, 0 skipped. python -B tests/mesh57_profile_draft_check.py and tests/docs_links_check.py pass.

Not done:

  • the _hardware variants;
  • a rebuild with the presence word reverted. The C++ pairs collide by construction without it (both sides normalize to the same bytes), but I haven't rebuilt to show that;
  • re-measuring run-to-run stability. The 222/222 prediction in the PR body was measured at 5132cbdb. The presence word depends only on which slots hold a relocated value, and I expect that to be stable too, but I haven't measured it.

AI-Assisted

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7329868175 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3730#issuecomment-7329868175). Originally posted by [Not-Saii](https://github.com/Not-Saii) on 2026-12-01T23:52:08Z. --- Thanks, both points were real. Fixed in 2bdc7258, a new commit on top of 5132cbdb. **1. A pointer at the base vs no pointer.** The same collision also happened in the second-base group: the first value re-bases to 0 in whichever slot holds it, so `[A, 0]` and `[0, A]` at +0x188/+0x1a8 normalized the same. `normalize_mesh57_descriptor` now writes a presence word into the allocation word at +0x160, which it already discarded: - bits 32..39 hold layout version 2; - bit `i` is set for each optional pointer (+0x198/+0x1b8/+0x1d8/+0x2f8) that held a relocated value; - bit `4 + i` is set for each second-base slot (+0x188/+0x1a8/+0x1c8/+0x2e8) that held one. The descriptor stays 0x300 bytes, so neither the profile format nor the archive format changes. `mesh57_descriptor_relocations` adds both pairs (pointer equal to the section base vs absent, and the same second-base value in either slot). It checks that each pair stays distinct and that each result is idempotent. **2. Existing profiles.** They are regenerated, not read. This change renames every extended-layout variant, including the ones 5132cbdb had already made stable. A `.s57` archive stores the descriptor after normalization, so an old archive cannot be normalized again. So: - **Writer:** `tools/startup/mesh57_profile.py` (`read_creation`, which the draft, check and write paths all use) refuses an extended descriptor (both `0x04010000` metadata words) unless +0x38 is zero and +0x160 carries layout 2. That covers raw archives and archives from the earlier normalization. The message asks for a new capture with `X2W_MESH57_CAPTURE_STATE=1`, then a rewrite from the same reviewed JSON. - **Runtime:** it looks up only the current name. A cache that holds only an old profile reports `profile_absent`, and the file is never opened. Tests: - `tests/mesh57_profile_draft_check.py` runs a current, an earlier and a raw archive through the writer CLI and `build_draft`. Only the current one writes a profile. Removing either half of the refusal (the presence test or the +0x38 test) fails the check. - `native_mesh57_outcomes_*` adds two extended records, each with a second base and a different metadata byte: - the first has only a profile written with the earlier normalization (second base raw, +0x160 zero); - the second has a profile written with the current normalization. Totals: `profile_absent 65` (was 64), `ready 2`, `lowering_reached 2`, and 68 profile lookups with 3 opens (was 66 with 2). The earlier profile was never opened. - `docs/experiments/native-fixed-mesh57.md` describes the presence word and how to regenerate a profile. Commit 2bdc7258, release preset, Windows 11 Pro 10.0.26300, MSVC 19.44, WARP: ```powershell cmake --build --preset release --target startup_indirect_draw_indexed compile_dxil ctest --preset release --no-tests=error -R '^(native_mesh57_outcomes_warp|startup_indirect_mesh_create_result_warp|startup_indirect_mesh57_stream_key_warp)$' ``` 3/3 passed, 0 skipped. `python -B tests/mesh57_profile_draft_check.py` and `tests/docs_links_check.py` pass. Not done: - the `_hardware` variants; - a rebuild with the presence word reverted. The C++ pairs collide by construction without it (both sides normalize to the same bytes), but I haven't rebuilt to show that; - re-measuring run-to-run stability. The 222/222 prediction in the PR body was measured at 5132cbdb. The presence word depends only on which slots hold a relocated value, and I expect that to be stable too, but I haven't measured it. AI-Assisted
Leyukaka commented 2026-12-02 02:13:23 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-02T02:13:23Z.


Thanks for the update in 2bdc7258. One observation from testing this head:

Some extended fixed descriptors (both metadata words 0x04010000 at +0x11C and +0x27C) have a zero section pointer at +0x38. In src/startup_stubs/mesh57_profile.h:45-48, normalize_mesh57_descriptor returns them unchanged through the !is_pointer(section) early return, so +0x160 and +0x2C0 are left as captured. In the captures I inspected, +0x160 still held an allocation address, so the variant can differ between runs. tools/startup/mesh57_profile.py then refuses those archives (+0x38 is zero, but +0x160 has no layout 2), which is consistent with its "layout the normalizer does not know" message.

In one test run, 77 of 318 new slot 57 captures were refused as extended descriptors without the presence word; the ones I inspected all had this shape.

Is this layout meant to stay unsupported in this PR, or should the +0x160/+0x2C0 addresses still be dropped when +0x38 is zero?

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7332603334 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3730#issuecomment-7332603334). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-12-02T02:13:23Z. --- Thanks for the update in `2bdc7258`. One observation from testing this head: Some extended fixed descriptors (both metadata words `0x04010000` at +0x11C and +0x27C) have a zero section pointer at +0x38. In `src/startup_stubs/mesh57_profile.h:45-48`, `normalize_mesh57_descriptor` returns them unchanged through the `!is_pointer(section)` early return, so +0x160 and +0x2C0 are left as captured. In the captures I inspected, +0x160 still held an allocation address, so the variant can differ between runs. `tools/startup/mesh57_profile.py` then refuses those archives (+0x38 is zero, but +0x160 has no layout 2), which is consistent with its "layout the normalizer does not know" message. In one test run, 77 of 318 new slot 57 captures were refused as extended descriptors without the presence word; the ones I inspected all had this shape. Is this layout meant to stay unsupported in this PR, or should the +0x160/+0x2C0 addresses still be dropped when +0x38 is zero?
Not-Saii commented 2026-12-02 11:50:57 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-12-02T11:50:57Z.


Thanks for checking. I see the same layout: in a 180 s capture at 2bdc7258, 82 of 349 extended archives had +0x38 zero and stayed raw. In every one, the other record pointers (+0x78, +0x120, +0x168, …) and +0x110/+0x270 are full process addresses. So dropping +0x160/+0x2C0 alone would not make the variant stable. The layout needs its own base, and choosing one needs the same descriptors from two runs.

It stays unsupported in this PR. The helper leaves those descriptors raw, and the writer refuses them, as you saw. I'll take the layout up separately. bcfb1dd3 records the limitation in docs/experiments/native-fixed-mesh57.md.

a63bb696 merges main (7c9f2639). The only conflict was the outcomes fixture. Main now has the mesh-only creation reach the profile lookup, so with the two extended records the totals are:

  • profile_absent 66;
  • ready 2;
  • 69 lookups (extra_limit + 1 + 2);
  • 3 opens.

Release preset, WARP, at bcfb1dd3:

ctest --preset release --no-tests=error -R '^(native_mesh57_outcomes_warp|startup_indirect_mesh_create_result_warp|startup_indirect_mesh57_stream_key_warp)$'
ctest --preset release --no-tests=error -j 4 -R '^native_fixed_mesh57(_[a-z0-9_]+)?_warp$'

3/3 and 17/17 passed, including native_fixed_mesh57_depth_only_warp. tests/mesh57_profile_draft_check.py and tests/docs_links_check.py pass. Hardware variants not run.

Separately, the profile regenerated from a new capture at 2bdc7258 loads in a 180 s run: ready 1, and every profile-rejection counter is 0.

AI-Assisted

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7344490317 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3730#issuecomment-7344490317). Originally posted by [Not-Saii](https://github.com/Not-Saii) on 2026-12-02T11:50:57Z. --- Thanks for checking. I see the same layout: in a 180 s capture at `2bdc7258`, 82 of 349 extended archives had +0x38 zero and stayed raw. In every one, the other record pointers (+0x78, +0x120, +0x168, …) and +0x110/+0x270 are full process addresses. So dropping +0x160/+0x2C0 alone would not make the variant stable. The layout needs its own base, and choosing one needs the same descriptors from two runs. It stays unsupported in this PR. The helper leaves those descriptors raw, and the writer refuses them, as you saw. I'll take the layout up separately. `bcfb1dd3` records the limitation in `docs/experiments/native-fixed-mesh57.md`. `a63bb696` merges main (`7c9f2639`). The only conflict was the outcomes fixture. Main now has the mesh-only creation reach the profile lookup, so with the two extended records the totals are: - `profile_absent 66`; - `ready 2`; - 69 lookups (extra_limit + 1 + 2); - 3 opens. Release preset, WARP, at `bcfb1dd3`: ```powershell ctest --preset release --no-tests=error -R '^(native_mesh57_outcomes_warp|startup_indirect_mesh_create_result_warp|startup_indirect_mesh57_stream_key_warp)$' ctest --preset release --no-tests=error -j 4 -R '^native_fixed_mesh57(_[a-z0-9_]+)?_warp$' ``` 3/3 and 17/17 passed, including `native_fixed_mesh57_depth_only_warp`. `tests/mesh57_profile_draft_check.py` and `tests/docs_links_check.py` pass. Hardware variants not run. Separately, the profile regenerated from a new capture at `2bdc7258` loads in a 180 s run: `ready 1`, and every profile-rejection counter is 0. AI-Assisted
Not-Saii commented 2026-12-02 14:00:44 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-12-02T14:00:44Z.


CI note for bcfb1dd3: "Build and test on Windows" fails on one test, native_direct_mesh. The cause is on main, not in this PR.

  • It reproduces locally on the same head (release preset, Windows 11 Pro 10.0.26300, MSVC 19.44): AssertionError: native compute +0x34: unmapped graphics export at tests/native_direct_mesh_check.py:883, in the integer-row / float-row gfx1013-container-ms case.
  • This PR doesn't touch what that test runs. Against main, it changes only src/startup_stubs/mesh57_profile.h (included by the runtime shim only), tools/startup/mesh57_profile.py, tests/mesh57_profile_draft_check.py, tests/startup_indirect_draw_indexed.cpp and docs/experiments/native-fixed-mesh57.md. compile_dxil and the mesh frontend are byte-identical to main at 7c9f2639, the merged base.
  • Main's CI hides it. Main's Windows runs at 7c9f2639 (run 46870369449) and 5770f14e (run 46880161821) stop earlier, at a compile error in native_compute_pack_refusal_check, so native_direct_mesh never runs there.

I haven't identified which merge on main introduced the failure. The recent mesh frontend merges (#3707, #3841, #3825) are the likely candidates.

AI-Assisted

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7347835563 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3730#issuecomment-7347835563). Originally posted by [Not-Saii](https://github.com/Not-Saii) on 2026-12-02T14:00:44Z. --- CI note for `bcfb1dd3`: "Build and test on Windows" fails on one test, `native_direct_mesh`. The cause is on main, not in this PR. - **It reproduces locally** on the same head (release preset, Windows 11 Pro 10.0.26300, MSVC 19.44): `AssertionError: native compute +0x34: unmapped graphics export` at `tests/native_direct_mesh_check.py:883`, in the `integer-row` / `float-row` `gfx1013-container-ms` case. - **This PR doesn't touch what that test runs.** Against main, it changes only `src/startup_stubs/mesh57_profile.h` (included by the runtime shim only), `tools/startup/mesh57_profile.py`, `tests/mesh57_profile_draft_check.py`, `tests/startup_indirect_draw_indexed.cpp` and `docs/experiments/native-fixed-mesh57.md`. `compile_dxil` and the mesh frontend are byte-identical to main at `7c9f2639`, the merged base. - **Main's CI hides it.** Main's Windows runs at `7c9f2639` (run 46870369449) and `5770f14e` (run 46880161821) stop earlier, at a compile error in `native_compute_pack_refusal_check`, so `native_direct_mesh` never runs there. I haven't identified which merge on main introduced the failure. The recent mesh frontend merges (#3707, #3841, #3825) are the likely candidates. AI-Assisted
R0Y00 commented 2026-12-02 16:33:24 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T16:33:24Z.

Review: CHANGES_REQUESTED


The six independent MSVC Debug checks passed (profile draft, create-result, stream key and outcomes, with WARP and RTX 4060 Laptop where registered). I found one uncovered raw-archive case. With both extended markers, +0x38 = 0, raw record pointers, +0x160 = 0x0000000230030000 and +0x2c0 = 0x0000000240040000, the current build_draft() accepts the source-built archive. The writer only checks the version byte inside +0x160, so this ordinary allocation address looks like layout 2. The runtime leaves the record raw when the section pointer is zero. Please validate the full presence-word shape (including reserved bits and the cleared allocation word), and add this zero-section/raw-allocation negative control to the draft and writer fixture.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6154985052 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3730#pullrequestreview-6154985052). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-02T16:33:24Z. **Review:** CHANGES_REQUESTED --- The six independent MSVC Debug checks passed (profile draft, create-result, stream key and outcomes, with WARP and RTX 4060 Laptop where registered). I found one uncovered raw-archive case. With both extended markers, `+0x38 = 0`, raw record pointers, `+0x160 = 0x0000000230030000` and `+0x2c0 = 0x0000000240040000`, the current `build_draft()` accepts the source-built archive. The writer only checks the version byte inside `+0x160`, so this ordinary allocation address looks like layout 2. The runtime leaves the record raw when the section pointer is zero. Please validate the full presence-word shape (including reserved bits and the cleared allocation word), and add this zero-section/raw-allocation negative control to the draft and writer fixture.
Not-Saii commented 2026-12-02 16:58:18 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-12-02T16:58:18Z.


Thanks, you're right: the writer only checked the version byte. Fixed in ea92597f.

read_creation (tools/startup/mesh57_profile.py) now accepts an extended descriptor only in the exact shape normalize_mesh57_descriptor leaves:

  • +0x38 is zero;
  • the other required record pointers (+0x78, +0x120, +0x128, +0x168, +0x178, +0x280, +0x288, +0x2C8, +0x2D8) are signed section-relative values within 2 GiB;
  • +0x160 is exactly layout 2 plus presence bits 0..7 (all reserved bits zero);
  • +0x2C0 is zero.

tests/mesh57_profile_draft_check.py adds your zero-section raw archive (raw record pointers, +0x160 = 0x0000000230030000, +0x2C0 = 0x0000000240040000). It is refused by both build_draft() and the writer CLI. There is also one control per condition: reserved bits set, allocation word kept, an absolute record pointer, a nonzero section pointer. I removed each condition from the writer in turn, and each time the matching control failed.

On a local 180 s capture, the shape check gives the same result as before: all 267 normalized extended archives are accepted, and the 82 raw zero-section ones are refused. The regenerated profile's archive still passes --check. The doc paragraph in docs/experiments/native-fixed-mesh57.md lists the conditions.

python -B tests/mesh57_profile_draft_check.py and tests/docs_links_check.py pass. The C++ side is unchanged, so I didn't rerun the WARP tests for this commit; they passed at 2796f82e.

AI-Assisted

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7352716524 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3730#issuecomment-7352716524). Originally posted by [Not-Saii](https://github.com/Not-Saii) on 2026-12-02T16:58:18Z. --- Thanks, you're right: the writer only checked the version byte. Fixed in `ea92597f`. `read_creation` (`tools/startup/mesh57_profile.py`) now accepts an extended descriptor only in the exact shape `normalize_mesh57_descriptor` leaves: - +0x38 is zero; - the other required record pointers (+0x78, +0x120, +0x128, +0x168, +0x178, +0x280, +0x288, +0x2C8, +0x2D8) are signed section-relative values within 2 GiB; - +0x160 is exactly layout 2 plus presence bits 0..7 (all reserved bits zero); - +0x2C0 is zero. `tests/mesh57_profile_draft_check.py` adds your zero-section raw archive (raw record pointers, +0x160 = `0x0000000230030000`, +0x2C0 = `0x0000000240040000`). It is refused by both `build_draft()` and the writer CLI. There is also one control per condition: reserved bits set, allocation word kept, an absolute record pointer, a nonzero section pointer. I removed each condition from the writer in turn, and each time the matching control failed. On a local 180 s capture, the shape check gives the same result as before: all 267 normalized extended archives are accepted, and the 82 raw zero-section ones are refused. The regenerated profile's archive still passes `--check`. The doc paragraph in `docs/experiments/native-fixed-mesh57.md` lists the conditions. `python -B tests/mesh57_profile_draft_check.py` and `tests/docs_links_check.py` pass. The C++ side is unchanged, so I didn't rerun the WARP tests for this commit; they passed at `2796f82e`. AI-Assisted
R0Y00 commented 2026-12-02 17:11:26 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T17:11:26Z.

Review: APPROVED


Re-reviewed ea92597f. The reader now checks the full layout word, cleared allocation and signed relative record pointers. The zero-section raw archive from my previous review is now refused by both the draft and the writer. Independent python -B tests/mesh57_profile_draft_check.py passed on this head. Compared to 2796f82e, the runtime and C++ fixtures are unchanged; the six earlier WARP, hardware and profile checks passed on that runtime.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6155601235 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3730#pullrequestreview-6155601235). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-02T17:11:26Z. **Review:** APPROVED --- Re-reviewed ea92597f. The reader now checks the full layout word, cleared allocation and signed relative record pointers. The zero-section raw archive from my previous review is now refused by both the draft and the writer. Independent `python -B tests/mesh57_profile_draft_check.py` passed on this head. Compared to 2796f82e, the runtime and C++ fixtures are unchanged; the six earlier WARP, hardware and profile checks passed on that runtime.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!3730
No description provided.