tooling: count slot 57 mesh requests in compile_dxil --refusals #3420

Manually merged
github merged 1 commit from github-bot/gh-3418 into main 2026-11-29 09:04:52 +00:00 AGit
Owner

@⁠Leyukaka on GitHub · 2026-11-28 23:58 UTC · original
Leyukaka:tooling-mesh57-refusals → main · +198 −63 · 3 files · 1 commits · merged 2026-11-29 09:01 UTC

Change

compile_dxil --refusals counted graphics (req_<key>.a, .rtv) and slot 67 compute (req_<key>.c67) requests only. It now also reads slot 57 mesh requests (req_<key>.m57 with its .ps57 and .root). It checks the key against mesh57_request_key and takes the entry layout from <key>.mslayout, then req_<key>.mslayout, then the new --mesh-layout FILE. It then runs the mesh frontend and records the first refusal. Results go to a new Mesh requests (device slot 57) section and a mesh57 JSON object. Like the graphics and compute sections, it prints counts and reasons only, no request keys. As before, --refusals does not invoke DXC and writes nothing.

With --mesh-layout FILE, the JSON gains a leading "mesh_layout" field and the text report a first line caller-supplied mesh layout: <path>. Missing .ps57/.root files give unreadable mesh request files; .m57 files whose key is not 16 lower-case hex digits are skipped.

The .mslayout parser and the raw mesh translation moved out of compile_one into read_mesh_layout and translate_raw_mesh, which gfx1013-raw-ms and --refusals both use.

Refs #2413, #3418. The next PR in the plan takes the root inputs from the creation root signature.

Verification

Commit 664db4ca on main 0614f68c, Windows 11, release build. The checks below ran before a rewording of the doc paragraph; the code and test are identical.

  • ctest -R "^(native_compile_dxil_refusals|native_direct_mesh|native_compile_dxil_watch)$": 3/3 pass. native_compile_dxil_refusals adds four mesh requests: one that translates, one refused at an s_load_dwordx4 with no verified root mapping, one without a layout and one with a wrong key. It runs them without and with --mesh-layout, checks the counts and reasons in JSON and text, and checks that the request directory is unchanged (sizes, mtimes and now file contents).
  • Mutation, .m57 collection disabled (else if (false && path.extension() == L".m57" ...): native_compile_dxil_refusals fails.
  • Mutation, key check disabled (if (false && key != expected)): native_compile_dxil_refusals fails.
  • Real request directory with 543 slot 57 requests, --refusals DIR --jobs 8: 212 s for the whole directory (graphics and compute requests included); 543 examined, 543 mesh request has no entry layout; file count of the directory 47,032 before and after.

Evidence and follow-up

Not covered: a real request that translates (that needs layouts), and the --mesh-layout path on real data. Only the synthetic requests written by the test go through it.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed.
  • No application files, dumps, distribution links or secrets included.
**@⁠Leyukaka** on GitHub · 2026-11-28 23:58 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3418) `Leyukaka:tooling-mesh57-refusals` → `main` · +198 −63 · 3 files · 1 commits · merged 2026-11-29 09:01 UTC ## Change `compile_dxil --refusals` counted graphics (`req_<key>.a`, `.rtv`) and slot 67 compute (`req_<key>.c67`) requests only. It now also reads slot 57 mesh requests (`req_<key>.m57` with its `.ps57` and `.root`). It checks the key against `mesh57_request_key` and takes the entry layout from `<key>.mslayout`, then `req_<key>.mslayout`, then the new `--mesh-layout FILE`. It then runs the mesh frontend and records the first refusal. Results go to a new `Mesh requests (device slot 57)` section and a `mesh57` JSON object. Like the graphics and compute sections, it prints counts and reasons only, no request keys. As before, `--refusals` does not invoke DXC and writes nothing. With `--mesh-layout FILE`, the JSON gains a leading `"mesh_layout"` field and the text report a first line `caller-supplied mesh layout: <path>`. Missing `.ps57`/`.root` files give `unreadable mesh request files`; `.m57` files whose key is not 16 lower-case hex digits are skipped. The `.mslayout` parser and the raw mesh translation moved out of `compile_one` into `read_mesh_layout` and `translate_raw_mesh`, which `gfx1013-raw-ms` and `--refusals` both use. Refs #2413, #3418. The next PR in the plan takes the root inputs from the creation root signature. ## Verification Commit `664db4ca` on `main` `0614f68c`, Windows 11, release build. The checks below ran before a rewording of the doc paragraph; the code and test are identical. - `ctest -R "^(native_compile_dxil_refusals|native_direct_mesh|native_compile_dxil_watch)$"`: 3/3 pass. `native_compile_dxil_refusals` adds four mesh requests: one that translates, one refused at an `s_load_dwordx4` with no verified root mapping, one without a layout and one with a wrong key. It runs them without and with `--mesh-layout`, checks the counts and reasons in JSON and text, and checks that the request directory is unchanged (sizes, mtimes and now file contents). - Mutation, `.m57` collection disabled (`else if (false && path.extension() == L".m57" ...`): `native_compile_dxil_refusals` fails. - Mutation, key check disabled (`if (false && key != expected)`): `native_compile_dxil_refusals` fails. - Real request directory with 543 slot 57 requests, `--refusals DIR --jobs 8`: 212 s for the whole directory (graphics and compute requests included); 543 examined, 543 `mesh request has no entry layout`; file count of the directory 47,032 before and after. ## Evidence and follow-up Not covered: a real request that translates (that needs layouts), and the `--mesh-layout` path on real data. Only the synthetic requests written by the test go through it. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. - [x] I updated README/docs when a capability or build requirement changed. - [x] No application files, dumps, distribution links or secrets included.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 00:02:34 +00:00
github manually merged commit 1a0120ba72 into main 2026-11-29 09:04:52 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.