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

Closed
opened 2026-11-30 02:15:03 +00:00 by lukaslw-lab · 1 comment
lukaslw-lab commented 2026-11-30 02:15:03 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-30T02:15:03Z.


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 #3521 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 #3521).

Refs #3521, #2935

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6687386145 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3534). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-11-30T02:15:03Z. --- `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 #3521 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 #3521). Refs #3521, #2935
lukaslw-lab commented 2026-11-30 02:15:07 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-30T02:15:07Z.


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

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7266840072 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3534#issuecomment-7266840072). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-11-30T02:15:07Z. --- I'm taking this. The PR follows with 1/4/8-job timings on the same corpus.
Sign in to join this conversation.
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#3534
No description provided.