cpp-migration: add --rekey mode to compile_dxil as native equivalent of shader_cache_rekey.py #3012

Closed
opened 2026-11-27 05:11:13 +00:00 by github-bot · 0 comments
Owner

@⁠stan495 on GitHub · 2026-11-27 05:06 UTC · original

Implements the native C++ equivalent of tools/startup/shader_cache_rekey.py directly in compile_dxil:

compile_dxil --rekey OLD_CACHE_DIR NEW_REQUEST_DIR [--jobs N]

  • Reads all graphics (.a), slot 67 compute (.c67), slot 57 mesh (.m57), and RTV variant (.rtv) requests from OLD_CACHE_DIR in parallel, counts .m86 markers, and ignores compiled results/diagnostics.
  • Recomputes current revision keys (x2w-startup-shader-28, x2w-startup-shader-28cs, x2w-startup-mesh-57-3) and rewrites .psin and .rtv payloads under the updated keys.
  • Fails with exit code 1 before creating/writing NEW_REQUEST_DIR if any request is incomplete, unreadable, or malformed; exits 2 on invalid usage or when OLD_CACHE_DIR and NEW_REQUEST_DIR are the same directory.
  • Publishes files atomically (ready markers last) without overwriting existing files in NEW_REQUEST_DIR.

Refs #2935

**@⁠stan495** on GitHub · 2026-11-27 05:06 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/3012) Implements the native C++ equivalent of `tools/startup/shader_cache_rekey.py` directly in `compile_dxil`: `compile_dxil --rekey OLD_CACHE_DIR NEW_REQUEST_DIR [--jobs N]` - Reads all graphics (`.a`), slot 67 compute (`.c67`), slot 57 mesh (`.m57`), and RTV variant (`.rtv`) requests from `OLD_CACHE_DIR` in parallel, counts `.m86` markers, and ignores compiled results/diagnostics. - Recomputes current revision keys (`x2w-startup-shader-28`, `x2w-startup-shader-28cs`, `x2w-startup-mesh-57-3`) and rewrites `.psin` and `.rtv` payloads under the updated keys. - Fails with exit code `1` before creating/writing `NEW_REQUEST_DIR` if any request is incomplete, unreadable, or malformed; exits `2` on invalid usage or when `OLD_CACHE_DIR` and `NEW_REQUEST_DIR` are the same directory. - Publishes files atomically (ready markers last) without overwriting existing files in `NEW_REQUEST_DIR`. Refs #2935
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 05:11:13 +00:00
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/R0Y00--Xbox2Windows#3012
No description provided.