tooling: compile requests written during a compile_dxil watch pass first #3403
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3403"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-28T22:05:26Z.
Change
compile_dxil --watchsorted pending requests by marker path and compiled the whole list before it scanned again, so a request written during a pass waited for the whole backlog. Asgfx2hlsl.py --watchnow does (#3396), requests whose ready marker is newer than the watcher's start go first, newest first, in batches of up to four keys per worker, with a rescan between batches at most once per second (steady clock). A key is attempted once per pass; the first-pass retry of earlier failures,--skip-failedand--requestsare unchanged, and each key's outputs are the same.Refs #3392 (the
compile_dxilhalf; thegfx2hlsl.pyhalf is #3396).Verification
Commit
e270b240onmain6747721c(the headc901a1f2is that commit rebased onto0614f68c, which adds only #3329 in other files), Windows 11, release preset.ctest --test-dir out/build/release -R "^native_compile_dxil_watch$": passes. The new case writes five old requests and one new compute request that sorts last by path, then runs--watch --oncetwice: with every marker old (the old order) the new key is processed last; with its marker newer than the watcher's start it is processed first; the output files are byte-identical in both runs.main'scompile_dxilfails atwatch_orders["fresh"] == [fresh_key, *backlog](the new key comes last).ctest -j 6 -R "native_compile_dxil|compile_dxil|startup_gfx2hlsl_watch": 5/5 pass.Evidence and follow-up
Synthetic requests only, written by the test. Not covered by the test: a request written during the pass (the rescan between batches) and the once-per-pass filter; only the order of requests present at start is tested. If a rescan fails in the middle of the first pass,
--skip-failedis not switched on, so keys already refused in that pass get one more attempt in the next one. Not measured: the wait in a real run, and passes with several workers (the test uses one); with--jobs > 1,new_worker()now runs per worker per batch instead of per pass.Checklist