compile_dxil: index the graphics interface catalog on several threads (--jobs) #3536

Closed
opened 2026-11-30 02:16:20 +00:00 by github-bot · 1 comment
Owner

@⁠lukaslw-lab on GitHub · 2026-11-30 02:15 UTC · original

compile_dxil --index-graphics-interfaces reads, parses, hashes and publishes the .cdxil containers one after another (src/direct_compute_cache.cpp:300). For a full local corpus (23,619 vertex, pixel and mesh containers from tools/extract_shaders.py), one install takes 252 s into an empty cache and 140 s into the same cache again. With #3523 the launcher runs it before every run.

Proposal: --index-graphics-interfaces DIR CACHE [--jobs N] (1–64, default 1), like --refusals:

  • Workers read, parse and publish the containers. Their keys are merged afterwards in sorted file order, so the catalog is byte-identical for any N. The ambiguous-key rule does not depend on order.
  • The first failure in file order still fails the install, and no new index is written.
  • Test: on the existing synthetic library, the one-thread and --jobs 3 catalogs are byte-equal, ambiguous key included. --jobs 0 is refused, and a broken container still fails with --jobs.

Not covered: skipping the install when the catalog is already current (launcher side, raised on #3523).

Refs #3523, #2935

**@⁠lukaslw-lab** on GitHub · 2026-11-30 02:15 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/3534) `compile_dxil --index-graphics-interfaces` reads, parses, hashes and publishes the `.cdxil` containers one after another (`src/direct_compute_cache.cpp:300`). For a full local corpus (23,619 vertex, pixel and mesh containers from `tools/extract_shaders.py`), one install takes 252 s into an empty cache and 140 s into the same cache again. With #3523 the launcher runs it before every run. Proposal: `--index-graphics-interfaces DIR CACHE [--jobs N]` (1–64, default 1), like `--refusals`: - Workers read, parse and publish the containers. Their keys are merged afterwards in sorted file order, so the catalog is byte-identical for any N. The ambiguous-key rule does not depend on order. - The first failure in file order still fails the install, and no new index is written. - Test: on the existing synthetic library, the one-thread and `--jobs 3` catalogs are byte-equal, ambiguous key included. `--jobs 0` is refused, and a broken container still fails with `--jobs`. Not covered: skipping the install when the catalog is already current (launcher side, raised on #3523). Refs #3523, #2935
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 02:16:20 +00:00
Author
Owner

@⁠lukaslw-lab on GitHub · 2026-11-30 02:15 UTC · original

I'm taking this. The PR follows with 1/4/8-job timings on the same corpus.

**@⁠lukaslw-lab** on GitHub · 2026-11-30 02:15 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/3534#issuecomment-7266840072) I'm taking this. The PR follows with 1/4/8-job timings on the same corpus.
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#3536
No description provided.