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

Merged
Leyukaka merged 1 commit from upstream-pr/3418 into main 2026-11-29 09:01:38 +00:00
Leyukaka commented 2026-11-28 23:58:37 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-28T23:58:37Z.


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, #3416. 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.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5545829849 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3418). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-28T23:58:37Z. --- ## 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, #3416. 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.
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!3418
No description provided.