Skip to content

startup: translate shader requests in parallel and during a run - #1749

Closed
NiiRoZz wants to merge 6 commits into
R0Y00:mainfrom
NiiRoZz:startup/shader-translate-watch
Closed

NiiRoZz wants to merge 6 commits into
R0Y00:mainfrom
NiiRoZz:startup/shader-translate-watch

Conversation

@NiiRoZz

@NiiRoZz NiiRoZz commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Change

Two changes to how tools/startup/gfx2hlsl.py consumes the startup shader cache, so translations stop being the slow step between runs.

Parallel --pending. Requests are independent (each writes only its own <key>.* files), so a scan with more than one pending request now translates them in a process pool.

  • X2W_TRANSLATE_JOBS sets the worker count. The default is the processor count, capped at 61 on Windows because ProcessPoolExecutor refuses more there.
  • A single pending request is still translated in-process. Batches are sized to keep every worker busy.
  • An unexpected translator error is written to <key>.fail instead of ending the scan.

Translation during a run.

  • gfx2hlsl.py --watch <dir> [seconds] repeats the pending scan (every 2 s by default) until it is stopped.
  • run.ps1 -Render -Translate starts the watcher on the shader cache beside the debugger, logs to <log>/translate.txt, and stops it, together with its worker processes (taskkill /T), in a finally block that still returns the debugger's exit code.
  • A pipeline the title creates during the run is therefore translated within seconds, and the runtime picks it up on a later draw (the polling from gpu: recover a missing shader on later draws after cache publication #1416) instead of on the next run.
  • The watcher's first pass retries earlier failures once, so a translator update reaches them. After that, a failure is not retried during the run, because the runtime writes each request once and never rewrites it. The one-shot --pending still retries every failure, as before.

Related: #1641 caches the driver's PSO blobs. That is a different layer, and the two compose. A follow-up PR writes requests from the shader archive before any run.

Verification

Branch head 7b4275cb (baadbfae plus a commit addressing review findings), on main at a4d17cf5. Windows 11 (26300), Python 3.13, x64.

python -B tests/startup_gfx2hlsl_watch_check.py      # startup_gfx2hlsl_watch_check passed
python -B tests/startup_run_ps1_check.py             # 0 failed (executed with powershell)
python -B tests/startup_run_ps1_check.py --text-only # 0 failed (text only: requested)
python -B tests/startup_gfx2hlsl_capture_check.py    # passed
python -B tests/startup_gfx2hlsl_operand_count_check.py  # 0 failed
python -B tests/docs_links_check.py                  # 17 files, 367 links
python -B tests/bidi_controls_check.py               # no bidirectional controls

Mutation checks, each run against a temporary edit that was then reverted. Every mutant failed the check:

Mutant Caught by
Watch mode ignores the .fail-newer-than-marker rule startup_gfx2hlsl_watch (3 failures, including a failure rewritten on later passes)
First watcher pass does not retry earlier failures startup_gfx2hlsl_watch
Translator error not caught per request startup_gfx2hlsl_watch (no .fail written)
Invalid X2W_TRANSLATE_JOBS raises startup_gfx2hlsl_watch (ValueError)
Watcher stopped without its child processes (Stop-Process instead of taskkill /T) startup_run_ps1
Parallel results printed against the wrong keys startup_gfx2hlsl_watch (parallel output ≠ serial)
run.ps1 never stops the watcher startup_run_ps1 ("translator left running")

Local data, not in the repository. A Scarlett package's 3,513 shader requests (132 translated, 3,381 refused) took 56.9 s with one process and 7.8 s with 16 workers on a 16-thread Ryzen. Every result file (.txt, .hlsl, .cso, .fail) was byte-identical between the two runs. On this branch the eleven requests recorded by a cold startup run all translate in parallel, and their .cso files are identical to the sequential ones.

A cold-cache startup run with -Render -Translate translated all eleven requests during the run, and the presented surface went from mean level 0 to 87.8/255 in that same run. One pipeline still counted as missing at the end of that run; I did not trace why, so this run is not claimed as evidence for anything beyond the watcher translating during a run.

Evidence and follow-up

  • All fixtures are synthetic: request files written by the tests, and an invalid RTV request used as a deterministic failure that needs no GPU or compiler.
  • Assumption: the runtime publishes .b and .root before .a, each through a temporary file and a rename (publish_shader_request in d3d12_draw.inl), so .a existing means the request is complete.
  • Docs: docs/startup-runtime.md gains "Translating shaders during a run", a translate.txt row in the log table, and the X2W_SHADER_CACHE row now points to -Translate.

Checklist

  • This pull request covers one reviewable behavior: how pending shader requests are consumed (in parallel, and continuously during a run).
  • 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.
  • I did not include game files, dumps, distribution links or secrets.

AI-assisted (Claude Code).

🤖 Generated with Claude Code

gfx2hlsl.py --pending translated one request at a time. Requests are
independent, so a scan with more than one pending request now runs them
in parallel processes (X2W_TRANSLATE_JOBS, default the processor count,
at most 61 on Windows). Results are byte-identical; 3,513 requests went
from 44.0 s to 6.1 s on a 16-thread host.

gfx2hlsl.py --watch <dir> [seconds] repeats that scan until stopped, and
run.ps1 -Translate (with -Render) starts it beside the debugger and stops
it when the debugger returns, so a pipeline created during a run is
translated within seconds instead of on the next run. In watch mode a
failure is not retried until its request is rewritten.

Tests: startup_gfx2hlsl_watch (ready markers, failure retry rule, a live
watcher, parallel equals serial) and startup_run_ps1 (-Translate starts
the watcher on the cache and stops it; a mutant that leaves it running
is detected).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@tedin7 tedin7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Peer review at commit baadbfaea3d968d451781ccd2ac5abf512c75049 (PRODUCTION_REVIEW_ONLY).

Findings

  • P2 — run.ps1 Stop-Process does not terminate ProcessPoolExecutor child processes on Windows (tools/startup/run.ps1): Stop-Process -Id $translator.Id -Force in the finally block only kills the parent python.exe --watch process. If the debugger exits while translate_pending is running a ProcessPoolExecutor batch, spawned worker python.exe processes (and any fxc.exe children) are left running. Using taskkill /PID $($translator.Id) /T /F (or a job object) would tear down the process tree.
  • P2 — Unhandled decode/translation exceptions terminate --watch (tools/startup/gfx2hlsl.py): translate_request catches (Unsupported, OSError, UnicodeError) and translate_to catches Unsupported. Any unexpected exception from a malformed request (e.g. struct.error, ValueError, IndexError) propagates out of pool.map and stops the --watch loop instead of recording a .fail for that key.
  • Nit — X2W_TRANSLATE_JOBS="" (tools/startup/gfx2hlsl.py): int(os.environ.get('X2W_TRANSLATE_JOBS', 0)) raises ValueError when X2W_TRANSLATE_JOBS is set to an empty string (int(os.environ.get('X2W_TRANSLATE_JOBS') or 0) avoids it).
  • Nit — Parallel key-pairing check (tests/startup_gfx2hlsl_watch_check.py): All 8 synthetic RTV requests in pending_run fail with the same message (unsupported: invalid RTV variant request), so swapping keys in pool.map (tested locally with list(reversed(keys))) is not caught by the check.

Verification

  • Linux checks:
    • python3 -B tests/startup_gfx2hlsl_watch_check.py → startup_gfx2hlsl_watch_check passed
    • python3 -B tests/startup_run_ps1_check.py --text-only → 0 failed (text only: requested)
    • python3 -B tests/startup_gfx2hlsl_capture_check.py → startup_gfx2hlsl_capture_check passed
    • python3 -B tests/startup_gfx2hlsl_operand_count_check.py → operand count checks: 0 failed
    • python3 -B tests/docs_links_check.py → Checked 17 Markdown files and 367 links.
    • python3 -B tests/bidi_controls_check.py → Checked 1299 tracked source, script and build/CI files: no bidirectional controls.
  • Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at baadbfaea3d968d451781ccd2ac5abf512c75049:
    • Debug (--preset dev): cmake --build --preset dev --target startup_stub_consumer -- -j 8 (3.51s), ctest --preset dev -R '^(startup_gfx2hlsl_watch|startup_run_ps1|startup_gfx2hlsl_capture|startup_gfx2hlsl_operand_count|startup_translator)$' --parallel 6 --no-tests=error --output-on-failure → 5/5 passed (124.66s).
    • Release /O2 (--preset release): cmake --build --preset release --target startup_stub_consumer -- -j 8 (1.09s), ctest --preset release -R '^(startup_gfx2hlsl_watch|startup_run_ps1|startup_gfx2hlsl_capture|startup_gfx2hlsl_operand_count|startup_translator)$' --parallel 6 --no-tests=error --output-on-failure → 5/5 passed (124.74s).
  • Local mutation checks (each reverted immediately):
    1. Disabled skip_failed .fail mtime check in pending_keys → caught by tests/startup_gfx2hlsl_watch_check.py (rc=1: watch pass, failure left unchanged by later passes, watcher output lines).
    2. Allowed .b as a ready marker in pending_keys (r'req_([0-9a-f]{16})\.(?:a|b|rtv)') → caught by tests/startup_gfx2hlsl_watch_check.py (rc=1: watch pass, one-shot pass).

AI-assisted; commands listed were executed locally.

NiiRoZz and others added 2 commits November 24, 2026 19:26
- The runtime writes each request once and never rewrites it, so the
  watcher's "retry once the request is rewritten" never happened. Its
  first pass now retries earlier failures once; later passes skip them.
- run.ps1 stops the watcher with taskkill /T so its parallel workers and
  their fxc.exe do not outlive the run. -Translate without -Render warns.
- Batches are sized to keep every worker busy (len // (jobs * 4)) instead
  of a fixed 8, which left most workers idle on small scans.
- An unexpected translator error is written to <key>.fail instead of
  ending the scan and with it the watcher.
- An empty or invalid X2W_TRANSLATE_JOBS falls back to the processor
  count; the Windows cap of 61 is applied in one place and documented.

Tests cover each change, and a mutation of each is detected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… scan test

The sixteen synthetic requests all failed with the same message, so a
parallel scan that printed results against the wrong keys still matched
the serial one. Each request is now an RTV variant naming a different
missing base request, so every failure names its own base, and the test
checks each printed result against its key. A mutant that reverses the
key order is detected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NiiRoZz

NiiRoZz commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review. All four points are addressed. The review was on baadbfae.

Point Fix Commit
P2: Stop-Process leaves the pool workers and fxc.exe running run.ps1 stops the watcher with taskkill /T /F. The startup_run_ps1 stub watcher now starts a child process, and the check requires both to be gone; reverting to Stop-Process -Force is detected. 7b4275cb
P2: an unexpected exception escapes pool.map and stops --watch Each request runs through translate_one, which writes translator error: <type>: <message> to <key>.fail and carries on. Tested with an injected ZeroDivisionError. 7b4275cb
Nit: empty X2W_TRANSLATE_JOBS raises translation_jobs() falls back to the processor count for empty, non-numeric or non-positive values, and the Windows cap of 61 is applied there. 7b4275cb
Nit: identical failure messages hide a key-order mix-up The 16 parallel-test requests are RTV variants that each name a different missing base, so every failure names its own base, and the test checks each printed result against its key. A mutant that reverses the key order is detected. 95d59d2f

Two more changes from a separate review pass, also in 7b4275cb:

  • Failure retry. The runtime never rewrites a request (publish_shader_request returns early when the file exists), so "retry once the request is rewritten" could never fire. The watcher's first pass now retries earlier failures once, and later passes skip them.
  • Batch size. chunksize is now len(keys) // (jobs * 4) instead of a fixed 8, so small scans use every worker.

The PR description has the updated verification and timings.

AI-assisted (Claude Code).

NiiRoZz added a commit to NiiRoZz/Xbox2Windows that referenced this pull request Nov 24, 2026
R0Y00#1749 adds its check right after startup_gfx2hlsl_capture_check.py in
AGENTS.md and the workflow, as this PR did, so whichever merged second
conflicted. This entry now sits two lines further down, so the two PRs
merge in either order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@tedin7 tedin7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Peer review of head 95d59d2f7a6211708eca110e1d495638eaad9576 (retest after the earlier review at baadbfaea3d968d451781ccd2ac5abf512c75049).

Result: no P1/P2 defects found in the local verification. All four earlier points are addressed.

Earlier points:

  • Worker processes left running after the debugger exits (tools/startup/run.ps1): fixed. The finally block now runs taskkill.exe /T /F /PID $translator.Id, and tests/startup_run_ps1_check.py has a stand-in watcher that starts a child process and checks that both are gone, with two mutants (no stop at all, parent-only Stop-Process).
  • Unexpected translator exceptions ending --watch (tools/startup/gfx2hlsl.py): fixed. translate_one records any Exception as <key>.fail (translator error: ...), and the watch check covers it.
  • X2W_TRANSLATE_JOBS="": fixed. int(os.environ.get(...) or 0) inside a try, and the check covers '', 'abc', '-3'.
  • Key pairing in the parallel scan: fixed. The check now uses sixteen RTV variants that each name a different missing base, and requires every printed result to name its own base.

Read in full: the diff of tools/startup/gfx2hlsl.py, tools/startup/run.ps1, the two checks, CMake, the workflow list and the docs. Points checked:

  • Each request writes only its own <key>.* files, and the manifest is published with a temporary file and os.replace (gfx2hlsl.py:1392-1395), so killing the watcher in the middle of a translation cannot leave a half-written .txt.
  • The __main__ guard is in place for ProcessPoolExecutor on Windows (spawn), the 61-worker limit is applied, and an empty pending list gives zero jobs and no pool.
  • pending_keys yields each key once (an .a and an .rtv for the same key would need an FNV collision).
  • X2W_SHADER_CACHE is set in run.ps1:53 before the watcher starts.

Non-blocking notes (P3):

  • pool.map can still raise BrokenProcessPool if a worker is killed from outside (for example out of memory), which would end --watch. Catching it in the watch loop and retrying the pass would make the watcher match the new per-request error handling.
  • The Win2025 run used --regex '^(startup_stream_request_warp|startup_stubs)$', so startup_run_ps1 (the only check that executes taskkill) and startup_gfx2hlsl_watch did not run on Windows in that phase. The text-only mode of the run.ps1 check ran here on Linux.

Win2025 (coordinator run, Windows Server 2025 build 26100, WARP, target startup_stream_consumer): Debug dev and Release /O2 both gave startup_stubs and startup_stream_request_warp 2/2 passed (Debug 0.48 s and 1.42 s, Release 0.53 s and 1.45 s).

Linux checks run locally in a clean worktree at this head:

  • git diff --check origin/main...HEAD: clean
  • tests/docs_links_check.py: passed (17 files, 367 links)
  • tests/bidi_controls_check.py: passed (1299 files)
  • tests/startup_gfx2hlsl_watch_check.py: passed
  • tests/startup_run_ps1_check.py --text-only: 0 failed
  • tests/startup_gfx2hlsl_capture_check.py: passed
  • tests/startup_gfx2hlsl_operand_count_check.py: 0 failed

Mutations (local, each reverted with git checkout -- .; tree clean):

  1. zip(keys, pool.map(...)) changed to zip(reversed(keys), pool.map(...)): startup_gfx2hlsl_watch_check.py exits 1 (sixteen "names its own base" failures).
  2. except Exception changed to except ValueError in translate_one: the check exits 1 (a translator error escaped translate_pending).

AI-assisted; commands listed were executed locally.

NiiRoZz and others added 2 commits November 24, 2026 21:04
run.ps1: keep both new switches (-Translate and upstream's
-StartupBelow40). docs: take upstream's X2W_D3D12_RENDER row and keep
the -Translate pointer in the X2W_SHADER_CACHE row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A pool worker killed from outside (for example out of memory) raised
BrokenProcessPool out of pool.map and ended --watch for the rest of the
run. watch_pass() reports such a pass as incomplete; the next pass
retries its requests. Tested by injecting a BrokenProcessPool; a mutant
that drops the catch is detected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NiiRoZz

NiiRoZz commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for re-checking.

  • BrokenProcessPool: fixed in d4bfa263. A pass now goes through watch_pass(), which reports a broken pool on stderr and returns; the next pass retries those requests, and the watcher keeps running. Tested by injecting a BrokenProcessPool; a mutant that drops the catch is detected.
  • Windows coverage: agreed, the Win2025 phase you cite didn't run them. Locally on Windows 11 with Windows PowerShell 5.1 (no pwsh), both startup_run_ps1 (including the child-process and taskkill /T mutants) and startup_gfx2hlsl_watch pass on d4bfa263. The repository's own Windows job also runs both.
  • ead2227a merged current main: run.ps1 keeps both new switches (-Translate, -StartupBelow40), and the docs take upstream's X2W_D3D12_RENDER row. startup: write shader requests from the shader archive before a run #1750 and this PR still merge into main in either order.

AI-assisted (Claude Code).

@tedin7 tedin7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retest at head d4bfa26 (comment only, not an approval). Earlier review was at 95d59d2.

Result: no P1/P2 findings. Both P3 notes of the earlier review are addressed.

  • BrokenProcessPool ending --watch: tools/startup/gfx2hlsl.py now has watch_pass(), which catches BrokenProcessPool, reports "translation pass interrupted, retrying", and does not mark the pass as done, so the next pass retries; the watch check covers it. docs/startup-runtime.md describes it.
  • Windows coverage of the taskkill path: the Win2025 run below includes tests/startup_run_ps1_check.py and tests/startup_gfx2hlsl_watch_check.py on Windows.

Read the PR diff against origin/main (8 files) in full for tools/startup/gfx2hlsl.py, tools/startup/run.ps1 and the two checks. The run.ps1 finally block runs taskkill.exe /T /F /PID on the watcher, and the check's stand-in watcher starts a child and requires both to be gone.

Linux checks run locally in a clean worktree at this head:

  • git diff --check origin/main...HEAD: clean
  • tests/docs_links_check.py: passed (18 files, 378 links)
  • tests/bidi_controls_check.py: passed (1327 files)
  • tests/startup_gfx2hlsl_watch_check.py: passed
  • tests/startup_run_ps1_check.py --text-only: 0 failed
  • tests/startup_gfx2hlsl_capture_check.py: passed

Mutations (local, each reverted; tree clean afterwards), run against tests/startup_gfx2hlsl_watch_check.py:

  1. 'except BrokenProcessPool' replaced by 'except KeyError': exits 1 ("a broken process pool escaped watch_pass").
  2. watch_pass returning False after a successful pass: exits 1 (the check's subprocess hits its timeout, because the first-pass retry never ends). Killed, though by a timeout and not a named assertion.

Win2025 (Windows Server 2025 build 26100, WARP, coordinator run, target startup_stream_consumer set): Debug dev and Release /O2 builds succeeded; startup_stubs and startup_stream_request_warp 2/2 passed in both (Debug 1.74 s, Release 1.57 s). Windows Python checks: tests/startup_gfx2hlsl_watch_check.py ok (2.6 s), tests/startup_run_ps1_check.py ok (126.9 s).

AI-assisted; commands listed were executed locally.

docs: take upstream's X2W_D3D12_RENDER and X2W_SHADER_CACHE rows and keep
the -Translate pointer in the latter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cursor Bot pushed a commit to SimSalabimse/Xbox2Windows that referenced this pull request Nov 25, 2026
Cold -Render runs stay black when pipelines write req_* requests but
never get manifests (pipelines translated 0 / missing N). Add
gfx2hlsl.py --watch and run.ps1 -Translate so translations publish
while the title runs; keep R0Y00#2008 bytecode resume and -TraceCalls.

Rebases reviewed R0Y00#1749 onto current main. Refs R0Y00#870.

Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>
@R0Y00

R0Y00 commented Nov 25, 2026

Copy link
Copy Markdown
Owner

Superseded by #2120 (6921dcf), which rebased your watcher and launcher work onto current main while retaining the later bytecode-resume behavior. Thanks for the original implementation and controls. I reran the watcher, translator and PowerShell 5.1/7 process-tree checks at the merged candidate. The original review and contribution remain linked here.

@R0Y00 R0Y00 closed this Nov 25, 2026
R0Y00 pushed a commit that referenced this pull request Nov 25, 2026
…1750)

* startup: write shader requests from the shader archive before a run

Translation requests were only written when the title created a
pipeline, so every new pipeline cost a run before it could be drawn.
A traced startup run showed the native programs come from 64-byte
aligned zlib streams in the shader archive, byte for byte.

tools/startup/archive_requests.py inflates those streams, joins a stream
with the one that starts on the next 64-byte boundary, carves programs
(36-byte header, s_inst_prefetch, 64-byte blocks on 256-byte steps) and
pairs each pixel program with a directly following vertex program. Root
signatures are not in the archive, so they come from earlier req_*.root
files and every pair is written once per distinct root, with the
runtime's key. gfx2hlsl.py --pending then translates them.

Measured locally: 4,982 programs, 1,258 pairs, 3,774 requests in 22 s.
Eight of the eleven pipelines of a cold run were among them with
identical keys and byte-identical translations.

Test: startup_archive_requests on a synthetic archive, with controls for
unpaired programs, a pair cut off at the end of a stream, a stream off
the 64-byte grid, a pair split across two consecutive streams, missing
roots and a second run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* startup: address review findings in the archive request writer

- "Directly following" is now enforced: a vertex program pairs only when
  it starts on the 256-byte step right after the pixel program. Before,
  any vertex program after a pixel program paired, whatever the gap.
- A carved program must contain s_endpgm; one cut short by an all-zero
  block is counted as incomplete and never paired.
- The memory map is closed, and the docs use a neutral <shader archive>
  placeholder.

On the local archive both rules leave the result unchanged (1,258 pairs,
0 incomplete, 8 of 11 recorded keys), so every measured pair was already
adjacent. The test adds a gap pair and a program without s_endpgm as
controls, and a mutation of each rule is detected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* startup: bound archive inflation and harden the archive request tests

Review follow-up.

- A zlib stream that would inflate past 1 MiB (a measured one inflates
  to 64 KiB) is counted as oversized and skipped without inflating it in
  full, and a joined run of consecutive streams stops growing at 64 MiB.
  Before, a small crafted archive could make the tool allocate gigabytes.
- A part that cannot be written leaves no .a and no temporary file and
  the run exits with an error; an archive without any pair also fails.
  Root files are read with a context manager.
- The test computes the expected keys with its own copy of the runtime's
  FNV-1a (start value 1469598103934665603, as in d3d12_draw.inl) instead
  of gfx2hlsl.pipeline_key, parses the summary, and adds controls for an
  untagged program, a pair at offsets not a multiple of 4, an empty root
  file, an oversized stream, a blocked .root write and an archive
  without pairs.

All nine mutants (step size, write order, tag check, alignment check,
empty roots, inflate limit, temporary file cleanup, and both failure
exits) are detected. The local archive gives the same 1,258 pairs and
8 of 11 recorded keys, with 0 oversized streams.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* startup: classify carved programs from export targets, not translator support

main now refuses some forms inside gfx2hlsl.decode (v_cndmask_b32_e64
with NEG on an immediate), and gfx2hlsl.classify goes through decode, so
289 carved programs became "undecodable" and 143 pairs were lost. Which
programs pair must not depend on whether they can be translated.

stage_of() applies the same export-target rule as classify but reads the
disassembler directly. The local archive is back to 1,258 pairs with 0
undecodable programs, and 8 of the 11 recorded pipelines, re-keyed with
the current revision, are among the offline requests.

The test reads the key revision from src/startup_stubs/d3d12_draw.inl
(main bumped it to x2w-startup-shader-4) instead of hard-coding it, and
one vertex program now contains that refused v_cndmask form; going back
to classify() loses the pair and is detected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* startup: list the archive check apart from the watch check

#1749 adds its check right after startup_gfx2hlsl_capture_check.py in
AGENTS.md and the workflow, as this PR did, so whichever merged second
conflicted. This entry now sits two lines further down, so the two PRs
merge in either order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* startup: test the 64 MiB cap on joined archive streams

130 consecutive 512 KiB zlib streams (65 MiB inflated, a few KB on
disk) must come out as two joined runs. Before, removing the cap still
passed the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants