Skip to content

shader: use published slot 57 pairs when native translation refuses - #3531

Merged
R0Y00 merged 6 commits into
R0Y00:mainfrom
lambirou:fix/mesh57-runtime
Dec 1, 2026
Merged

R0Y00 merged 6 commits into
R0Y00:mainfrom
lambirou:fix/mesh57-runtime

Conversation

@lambirou

@lambirou lambirou commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem

A fixed slot 57 request whose mesh shader uses the R1 group-index exchange shape (raw 0xbefe0481) is still refused by the native mesh frontend. The request publisher can produce a reviewed .ms57.cso / .ps57.cso pair, but the loader previously reached it in a default native-only run, where it could replace the native refusal without an explicit choice.

The runtime fixture also failed for a second reason: it published a request against one root blob but created the guest root from a separately serialized description, so the request key and CSO names did not match.

Change

  • The published pair is opt-in. X2W_ALLOW_PUBLISHED_MESH57_PAIR=1 is required before prepare_native_mesh57 opens <key>.ms57.txt or either CSO. Without it, the exact native mesh57_group_index exception is rethrown, including in the launchers' default X2W_NATIVE_SHADERS_ONLY=1 mode; a pair on disk no longer changes a native-only run.
  • Native translation runs first. Even with the opt-in, only the exact mesh57_group_index refusal for a buffer-view (X2WM574) profile with no direct heap opens the published pair; every other refusal propagates.
  • The published path reads the pair's manifest (version 4, stage ms) and derives the buffer reads from its srv lines in register order: root parameter, table byte offset and the accessed bytes span. The draw refuses a view shorter than that span. A two-descriptor fixture proves the second table record binds its own buffer.
  • The mesh key revision moves from x2w-startup-mesh-57-3 to -4 in the request publisher, the loader, the draw path, the translator and the fixtures. The published path requires manifest version 4 with stage ms, so a pair from an older translator revision cannot load.
  • Create the fixture's guest root from the exact root blob the publisher compiled against, so the request key, profile key and CSO names agree.
  • Do not add the vertex rectangle-list selector to mesh pipelines in gfx2hlsl.py; it shifted both root constants by one and made the shader see a vertex count of 0.
  • The runtime control publishes one pair and runs it twice in native-only mode. Without the opt-in it requires a cleared target, no forwarded DispatchMesh and the native refusal. With the opt-in, the same bytes must load and match 1,024 pixels with one forwarded call. The test compares the pair bytes before and after, builds a fresh subprocess environment with inherited switches removed, and restores the pair after the missing/truncated cases.
  • The native-priority controls now also set X2W_ALLOW_PUBLISHED_MESH57_PAIR=1, so they prove native wins and a non-R1 refusal stays a refusal with the fallback authorized.
  • NITs: the CMakePresets.json filter has its indentation restored while keeping both sides' test families; the version 4 header/stage check now runs before the ud layout check; the version 1 manifest case pins stderr_contains.

Merged origin/main at a3bfd019 (merge 6ee7d764). CMakePresets.json keeps main's native_*, native_direct_mesh and startup_triage_run entries plus this PR's startup_mesh57_* and native_fixed_mesh57_published_pair* families. src/startup_stubs/native_mesh57.inl keeps this PR's native-first/published-pair structure and re-inserts main's mesh_heap_tokens refusal from #3619 inside prepare_native; neither side was taken wholesale.

Validation

Debug dev build after merging origin/main at a3bfd019 (merge 6ee7d764):

. .\tools\dev.ps1
cmake --preset dev
cmake --build --preset dev

The build completed successfully. ctest --preset pr -N selects 253 tests and includes startup_mesh57_runtime_warp, native_fixed_mesh57_published_pair_warp and native_fixed_mesh57_published_pair_refusal_warp.

Targeted Python checks:

.\out\pe-env\Scripts\python.exe -B tests\startup_mesh57_skeleton_check.py
.\out\pe-env\Scripts\python.exe -B tests\startup_gfx2hlsl_ps57in_check.py
.\out\pe-env\Scripts\python.exe -B tests\startup_mesh57_depth_only_check.py
.\out\pe-env\Scripts\python.exe -B tests\startup_mesh57_interface_check.py
.\out\pe-env\Scripts\python.exe -B tests\startup_mesh57_lane_spill_check.py
.\out\pe-env\Scripts\python.exe -B tests\startup_mesh57_loop_check.py
.\out\pe-env\Scripts\python.exe -B tests\startup_mesh57_loop_refusal_check.py
.\out\pe-env\Scripts\python.exe -B tests\docs_links_check.py

All exited 0. The docs check reported 195 Markdown files and 757 links.

WARP:

ctest --preset dev --no-tests=error -R '^startup_mesh57_runtime_warp$' -V
ctest --preset dev --no-tests=error -R '^native_fixed_mesh57_published_pair(_refusal)?_warp$' -V

startup_mesh57_runtime_warp passed. Its gate lines were published pair without opt-in: 1024 pixels matched, 0 forwarded mesh calls and published pair with opt-in: 1024 pixels matched, 1 forwarded mesh calls. The missing/truncated cases stayed cleared with no forwarded call, and compiled pair restored drew again. The two published_pair controls passed 2/2.

Physical GPU (reported separately):

ctest --preset dev --no-tests=error -R '^(startup_mesh57_runtime_hardware|native_fixed_mesh57_published_pair(_refusal)?_hardware)$' -V

3/3 passed on AMD Radeon RX 9060 XT, driver 32.0.32029.2010, Windows build 26200, debug layer unavailable. startup_mesh57_runtime_hardware also passed the two-table-entry case; that sub-case skips on WARP because the CI WARP build faults with exit code 2173 when the runtime writes the second descriptor's view token.

ctest --preset dev --no-tests=error -R '^startup_mesh57_real_shape$' -V passed as well.

Whole mesh57 family on this head:

ctest --test-dir out/build/dev -R mesh57 --output-on-failure

58/58 passed in 302 s, including every _hardware variant on the local RX 9060 XT. An initial -j4 run made startup_mesh57_skeleton_{draw_warp,draw_hardware,exchange_hardware} exceed the 70 s test timeout; each passed alone in 4-31 s, so that was CPU contention rather than a regression.

CI at head 6ee7d764: Build and test on Windows passed (8m49s), Run platform-independent Python checks on Linux passed (3m0s), and Assemble and translate gfx1013 fixtures passed (3m9s). The /O2, coverage-chart and other non-PR jobs were skipped by the workflow.

Limits

The accessed span is a lower bound computed from the immediate offset and the load width; dynamic vaddr/soffset/idxen addresses remain bounded by the view at draw time. The fallback is deliberately narrow and now opt-in: buffer-view profile only, no direct heap, no uav line, and every manifest read must match a profile view entry. A truncated published pair fails pipeline creation rather than silently falling back.

The D3D12 debug layer is unavailable on this host, so no debug-layer result is claimed. This does not establish full-game startup or frame rate.

Refs #2413
Refs #3094

AI-assisted.

@lukaslw-lab lukaslw-lab left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 9791a2ea by reading the diff; not built or run.

Verdict: comment. No MUST. The published-pair path works for the fixture shape, but it changes which pair wins for every buffer-view profile, and its buffer guards are weaker than the native ones.

  • SHOULD make the published pair a fallback. At src/startup_stubs/native_mesh57.inl:359 the pair is used whenever both CSOs exist, and translate_mesh_program never runs. So a buffer-view (X2WM574) profile that translates natively today switches to the gfx2hlsl pair once a translated cache sits beside it. That contradicts the title ("when native translation refuses"). Trying native first and reading the CSOs only in the refusal path keeps native the default.
  • SHOULD derive the reads instead of using placeholders. At native_mesh57.inl:432 the code pushes one read per view entry with offset 0 and minimum_bytes 4. The native path uses the reflected register order, the table byte offset and required_bytes (:376-400). The draw-time check at :52 therefore accepts a 4-byte view for a shader that reads 512 bytes, and a table entry past the first descriptor binds the wrong record. It also assumes that gfx2hlsl's SRV register order equals the profile's view-entry order. With one view entry the fixture cannot tell the difference.
  • SHOULD tie the CSOs to the translator. Until now nothing in src/ loaded .ms57.cso. Pairs published before the gfx2hlsl.py:12036 fix still carry the shifted constants (the black target this PR describes), and the key revision x2w-startup-mesh-57-3 is unchanged. A stale pair from an older cache would load without any warning. Either bump the revision or check the .ms57.txt manifest.
  • Not related to issue #3560: our title caches have no .mesh57-state profiles, so this path does not run there.

Tests: startup_mesh57_runtime_{warp,hardware} reaches the new branch (published pair → 1024 pixels; missing/truncated → cleared target, 0 forwarded). It also covers the gfx2hlsl change indirectly. It does not cover a native-translatable profile with CSOs present, or more than one view. The pr preset filter does not include startup_mesh57_*, so CI did not run these tests. The green Windows job proves only that the change builds.

@lambirou
lambirou force-pushed the fix/mesh57-runtime branch 2 times, most recently from 04e1efc to 93523de Compare November 30, 2026 11:24
@lambirou

Copy link
Copy Markdown
Contributor Author

Thanks — all three SHOULDs are addressed at 93523de6, rebased on c7cbdf96.

  1. Native first. prepare_native_mesh57 now runs translate_mesh_program first. Only the exact mesh group-index exchange shape or entry state is not covered refusal, on an X2WM574 buffer-view profile without a direct heap, opens the published pair. Any other refusal propagates, and a non-buffer profile is refused. native_fixed_mesh57_published_pair_* proves native still wins when CSOs are present; ..._published_pair_refusal_* proves a non-R1 refusal is not masked.
  2. Manifest-derived reads. tools/startup/gfx2hlsl.py now publishes manifest version 4 (x2w-manifest 4, stage ms) with bytes <span> on every buffer srv line, computed from the mesh loads. The runtime parses the srv lines in register order and validates the index, kind, root parameter, table byte offset and span against the profile's view entries; bind_mesh57_buffers refuses a view shorter than minimum_bytes. A two-descriptor fixture proves the second table record binds its own buffer without aliasing the first.
  3. Revision tie. x2w-startup-mesh-57-3 is now x2w-startup-mesh-57-4 in src/shader_compute_request.cpp, src/startup_stubs/native_mesh57.inl, src/startup_stubs/d3d12_draw.inl, tools/startup/gfx2hlsl.py, the fixtures and the docs. The published path also requires manifest version 4 with stage ms, so a pair from an older translator revision is refused.

Local validation: startup_mesh57_* and native_fixed_mesh57_* pass 8/8 on WARP and 7/7 on the RX 9060 XT (driver 32.0.32029.2010), plus the Python mesh, rekey, manifest and docs checks. The only check not validated locally is the llvm-mc encoding comparison (the local ROCm llvm-mc differs from LLVM 15); the CI gfx1013 job is the authority for that. CI is running on this head.

@lambirou
lambirou force-pushed the fix/mesh57-runtime branch 4 times, most recently from e0a1b74 to fd8c787 Compare November 30, 2026 11:59

@lukaslw-lab lukaslw-lab left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed fd8c7874 by reading the diff; not built or run.

Verdict: changes requested. Native-first, manifest-derived reads and the revision tie are in place. One gap remains: the published pair's root-constant layout is never checked against the profile.

  • MUST check the manifest's ud / udsrc lines. read_published_mesh57_manifest (src/startup_stubs/native_mesh57.inl:300-341) reads only the header, stage, srv and uav, so it skips the constant layout. The published HLSL reads cbuffer entry : register(b0) as ud0..udN. setup_entry (tools/startup/gfx2hlsl.py:2605-2611) gives a ud to every constant word of every root-constant parameter, in root order. Later ones, such as ('stride', …) or ('descword3', …) (:7330, :7991), follow after those. The draw fills b0 with the words of mapping.root_parameter only (d3d12_xs_device.cpp:4441-4448). So a root with an earlier constant parameter, or a shader that needs a stride or descriptor-word ud, gets the wrong values or zeros in b0, and the PSO still creates. That is the same silent shift as the rect bug this PR fixes. The native path refuses this case through mapped_constants (native_mesh57.inl:514). Requiring ud n with n <= mapping.count, and udsrc i rootconst <mapping.root_parameter> i for every i, would close it. A fixture whose root has two constant parameters would prove the refusal.
  • NIT is_mesh57_group_index_refusal matches the message text. It is exact today (raised only at gfx1013_direct_mesh.inl:1239, raw 0xbefe0481), but a reworded refusal would silently turn the fallback off. A refusal code would be sturdier.
  • Checked, no finding: a native throw leaves nothing half-filled. Sampler, heap and PS-binding mismatches fail at PSO creation. A table slot that is not an SRV/CBV is refused at draw (native_mesh57.inl:43-48).

Tests: startup_mesh57_runtime_warp (pair, missing/truncated CSOs, short view, version 1 manifest, no pair) and native_fixed_mesh57_published_pair(_refusal)_warp ran and passed in CI. The two-descriptor case skips on WARP, so only the author's hardware run covers it.

@lambirou

Copy link
Copy Markdown
Contributor Author

Both points are addressed at d4b671fa.

MUST — constant layout. read_published_mesh57_manifest now parses ud/udsrc and requires ud n with n <= mapping.count, plus udsrc i rootconst <mapping.root_parameter> i for every i. A line sourced from another root parameter, or a udsrc for a stride/descword3 ud, refuses the pair with published MS57 manifest constant layout differs from the profile. The new runtime sub-case rewrites the first udsrc to a different root parameter and asserts the cleared target, zero forwarded calls and that message; it passes on WARP and on the RX 9060 XT.

NIT — refusal code. UnsupportedComputeShader now carries a code; the R1 refusal is thrown with mesh57_group_index and is_mesh57_group_index_refusal checks that code instead of the message text, so a reworded refusal cannot disable the fallback.

Re-run: startup_mesh57_runtime_warp and _hardware (the new foreign-constant case included), startup_mesh57_skeleton_draw/_exchange, native_fixed_mesh57_buffers, startup_logical_view_table, native_fixed_mesh57_constant and the published_pair/published_pair_refusal controls pass on both adapters. CI is running on this head.

@lukaslw-lab lukaslw-lab left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed d4b671fa by reading the diff; not built or run.

Verdict: approve. The published pair is now refused unless the manifest's entry constants are exactly the profile's constant words, in order. That closes the constant-layout gap. No MUST.

  • NIT In read_published_mesh57_manifest, the ud check (src/startup_stubs/native_mesh57.inl:363) now runs before the header/stage check (:367). A version-1 manifest, such as the test's x2w-manifest 1\nstage ms, is still refused, but it logs "constant layout differs" instead of "not a version 4 mesh manifest". Swap the two blocks, and let the "old revision manifest" case pass stderr_contains (tests/startup_mesh57_runtime_check.py:123) so the reason is pinned.
  • Checked, no finding:
    • The publisher always writes ud N and udsrc i <source…> (tools/startup/gfx2hlsl.py:12829-12831). A stride/descword3 source fails the rootconst %u %u parse and refuses the pair.
    • Requiring word == index and count <= mapping.count matches how the draw fills b0: words 0..count-1 of mapping.root_parameter, with no offset (native_mesh57.inl:680). The missing-index check also refuses a pair whose udsrc lines are duplicated or missing.
    • UnsupportedComputeShader::code points to a string literal, so it outlives every copy of the exception. Exceptions without a code keep nullptr and re-throw as before.

Tests: the new "foreign constant" case reaches the udsrc refusal through the real publisher output. It checks the cleared target, 0 forwarded calls and the message. It does not cover a ud count larger than the profile's. CI ran startup_mesh57_runtime_warp and native_fixed_mesh57_published_pair(_refusal)_warp at this head (the pr filter includes them), and they passed. The two-descriptor case still skips on WARP.

The fixed slot 57 frontend does not cover every group-index exchange shape
(raw 0xbefe0481). When the publisher has already written the reviewed
.ms57.cso/.ps57.cso pair for a buffer-view profile, build the mesh pipeline
from that pair and keep the profile's root and view mappings instead of
dropping the request.

The fixture now creates the guest root from the exact root blob the request
publisher compiled against, so the profile key, request key and CSO names
agree. gfx2hlsl no longer inserts the rectangle-list selector into mesh
pipelines, which had shifted both root constants by one word and produced a
black target.

Tests: startup_mesh57_runtime warp/hardware, startup_mesh57_skeleton_draw and
startup_mesh57_skeleton_exchange warp/hardware, native_fixed_mesh57_buffers
and native_fixed_mesh57_constant warp/hardware.

@lukaslw-lab lukaslw-lab left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2426afce by reading the diff; not built or run.

Verdict: approve. The rebase onto bee9c64d changed the PR's own diff in one place only, the pr test filter conflict in CMakePresets.json. Everything else is byte-identical to d4b671fa, which we approved. No MUST.

  • NIT The resolved "name" line in CMakePresets.json lost its indentation and now starts at column 0. The regex itself is right: it keeps main's startup_indirect_mesh_cache_heap(_wide)?_warp and runtime_mesh86_cache_cli_check and adds this PR's two families.
  • NIT (still open from our last review) the ud check runs before the header/stage check (src/startup_stubs/native_mesh57.inl:363 vs :367). A version-1 manifest therefore logs "constant layout differs".
  • Checked, no finding:
    • Main changed several of this PR's files in the rebase window, notably d3d12_draw.inl (#3593, #3597, #3627), gfx2hlsl.py and gfx1013_compute_native.cpp. No x2w-startup-mesh-57-3 string is left anywhere in the tree. The new slot 86 window code does not use the slot 57 key.
    • The revision bump turns every slot 57 key into a miss. In our revision 29 caches, that orphans 622 and 996 .m57 request files but no .ms57.cso pairs (there are none). So no published translation is lost there, and the requests are rewritten under the new keys.

Tests: CI ran startup_mesh57_runtime_warp (2.73 s), native_fixed_mesh57_published_pair_warp and native_fixed_mesh57_published_pair_refusal_warp at this head: 93/93 passed. The two-descriptor case still skips on WARP, so only the author's RX 9060 XT run covers it.

@R0Y00 R0Y00 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fallback can load a published pair in the default native-only run. In prepare_native_mesh57, the is_mesh57_group_index_refusal(error) catch takes the published manifest/CSO path without consulting X2W_NATIVE_SHADERS_ONLY. The runtime fixture also publishes its pair via gfx2hlsl.py. Please preserve the native refusal in the default C++-only mode for pairs without verified native provenance. If the legacy pair is supported, gate it behind explicit opt-in and add a control proving the same on-disk pair is refused in native-only mode and can draw when opted in.

Keep the exact native mesh57 refusal when no explicit opt-in is set, including in the default native-only run. X2W_ALLOW_PUBLISHED_MESH57_PAIR=1 permits only the mesh57_group_index fallback after native translation has been attempted.

The runtime control runs the same on-disk pair without and with the opt-in, and the native-priority controls now run with the fallback permitted. The version 1 manifest case pins the header/stage refusal reason.
@lambirou

lambirou commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks for the catch. Addressed at 4034d32a.

  • prepare_native_mesh57 now checks X2W_ALLOW_PUBLISHED_MESH57_PAIR before entering the published-manifest/CSO path. Without it, the original x2w::UnsupportedComputeShader is rethrown with throw;, preserving the exact message and code, including with X2W_NATIVE_SHADERS_ONLY=1. With the opt-in, native translation still runs first and only the mesh57_group_index refusal may fall back.
  • The runtime control publishes one pair through gfx2hlsl.py and runs that same on-disk pair twice in native-only mode. Without the opt-in it requires a cleared target, 0 forwarded mesh calls and the native mesh group-index exchange shape or entry state is not covered refusal. With the opt-in it requires 1,024 matching pixels and dispatchmesh 1. The test compares the pair bytes before and after, clears X2W_ALLOW_PUBLISHED_MESH57_PAIR in the default subprocess, sets X2W_NATIVE_SHADERS_ONLY=1 explicitly, and restores the CSOs after the missing/truncated cases.
  • native_fixed_mesh57_published_pair{,_refusal}_{warp,hardware} now set the opt-in too, so they prove native priority and a non-R1 refusal with the fallback authorized rather than merely relying on the default gate.
  • NITs fixed: the CMakePresets.json filter keeps both sides' test families with its indentation restored; the version 4 header/stage check now precedes the ud layout check; the version 1 manifest case pins stderr_contains.

Validation at 4034d32a after merging origin/main at d5970858:

  • cmake --preset dev and cmake --build --preset dev: success.
  • ctest --preset dev --no-tests=error -R '^startup_mesh57_runtime_warp$' -V: passed. Gate lines: published pair without opt-in: 1024 pixels matched, 0 forwarded mesh calls; published pair with opt-in: 1024 pixels matched, 1 forwarded mesh calls. Missing/truncated stages stayed cleared and compiled pair restored drew again.
  • ctest --preset dev --no-tests=error -R '^native_fixed_mesh57_published_pair(_refusal)?_warp$' -V: 2/2 passed.
  • Physical GPU: ctest --preset dev --no-tests=error -R '^(startup_mesh57_runtime_hardware|native_fixed_mesh57_published_pair(_refusal)?_hardware)$' -V: 3/3 passed on AMD Radeon RX 9060 XT, driver 32.0.32029.2010, Windows build 26200, debug layer unavailable. The two-table-entry case passed here and still skips on WARP for the existing descriptor-write fault.
  • Python mesh57, ps57in and docs checks passed, including tests/docs_links_check.py (192 Markdown files, 747 links), and startup_mesh57_real_shape passed.

The published pair remains legacy input and is unavailable by default. gh pr checks 3531 reached a terminal state at this head.

CI terminal state at 4034d32a: Build and test on Windows pass (4m21s), Run platform-independent Python checks on Linux pass (3m29s), Assemble and translate gfx1013 fixtures pass (3m56s). The /O2, coverage-chart and other non-PR jobs were skipped by the workflow.

@Leyukaka Leyukaka left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-read at 4034d32a, diff only. The published pair is now used only with X2W_ALLOW_PUBLISHED_MESH57_PAIR=1: without it, the mesh57_group_index refusal is rethrown before the manifest or a CSO is opened (src/startup_stubs/native_mesh57.inl:633-634). The version 4 header and stage check now runs before the ud layout check (:370-377).

Question on the key revision x2w-startup-mesh-57-3 -> -4 (src/shader_compute_request.cpp:203, src/startup_stubs/d3d12_draw.inl:536, src/startup_stubs/native_mesh57.inl:433, tools/startup/gfx2hlsl.py:13554): it changes every slot 57 request key, and the .mesh57-state variant derived from it (native_mesh57.inl:434-437). Every existing slot 57 request, translation and captured state profile is therefore asked for again, including in the default run that never loads a pair. The pair is now opt-in, and only a version 4 manifest is accepted, which only this PR's translator writes (tools/startup/gfx2hlsl.py:13039). Is the bump still needed? If it is, does the rekey mode carry -3 slot 57 entries over?

@R0Y00 R0Y00 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new opt-in addresses the default-path concern in my earlier review. I checked that an unset X2W_ALLOW_PUBLISHED_MESH57_PAIR rethrows the original native group-index refusal, and that the fixture runs the same published pair with the switch both unset and set.

#3619 has now landed and overlaps src/startup_stubs/native_mesh57.inl. Please sync with main and retain its explicit refusal for native heap-token reads until the runtime binds the token views and b1. Then rerun ^startup_mesh57_runtime_(warp|hardware)$ so the default native refusal, explicit published fallback, and native-priority controls are covered on the combined code.

@lambirou

lambirou commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

Synced with main at a3bfd019 in merge 6ee7d764. CMakePresets.json keeps main's native_*, native_direct_mesh and startup_triage_run entries plus this PR's startup_mesh57_* and native_fixed_mesh57_published_pair* families. src/startup_stubs/native_mesh57.inl keeps this PR's native-first/published-pair structure and re-inserts main's mesh_heap_tokens refusal from #3619 inside prepare_native; neither side was taken wholesale.

Validation on the merge head: the full mesh57 family passed 58/58 in 302 s, including every _hardware variant on the local RX 9060 XT. ctest --preset pr -N now selects 253 tests and includes all four mesh57 controls. docs_links checked 195 Markdown files and 757 links; native_direct_mesh, native_compile_dxil_{refusals,rekey} and the gfx2hlsl checks passed. CI is green at 6ee7d764: Windows 8m49s, Linux Python 3m0s, gfx1013 fixtures 3m9s.

On the key revision question: rekey mode recomputes mesh57_key for each .m57 request, so existing -3 entries are carried over under the -4 key rather than orphaned. The bump still separates old request/state names from the v4-only manifest path.

The -j4 run hit three skeleton timeouts at 70 s under CPU contention; each of those tests passed alone in 4-31 s, and the serial family run is clean.

@R0Y00 R0Y00 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up to my earlier change request. The current head retains the native heap-token refusal from #3619. An unset X2W_ALLOW_PUBLISHED_MESH57_PAIR rethrows the original native group-index refusal. With the explicit opt-in, the published pair can be used after that refusal.

ctest --test-dir <build> --no-tests=error -j1 -R '^startup_mesh57_runtime_(warp|hardware)$' --output-on-failure passed on WARP and RTX 4060 Laptop. For the same on-disk pair, both backends matched 1,024 pixels with zero forwarded calls by default and one forwarded call with the opt-in. The native-first and corrupt-pair controls passed.

@R0Y00
R0Y00 merged commit f211453 into R0Y00:main Dec 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: P0 Highest project priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants