Repository navigation
Shaders: identify direct translation artifacts in dump manifests - #2553
mokkamokacaffe wants to merge 3 commits into
Conversation
|
Verified Earlier verificationI prepared an offline artifact checker and tests on I ran 12 two-manifest CLI cases using synthetic files, including a 131,073-byte binary guest with independently computed hash Windows 11 26100.9711, i7-13700, Python 3.14.3. I tested the offline checker only. End-to-end generation with XCL and a shader pack remains unverified here. OpenAI Codex (GPT-6) prepared the checker and ran the tests. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! — Devin |
Check the guest hash and the result selected by the manifest. Compare exact diagnostic bytes for rejected translations so saved artifacts can be verified without the source pack or a GPU. Assisted-by: OpenAI Codex (GPT-6)
|
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
Thanks! — Devin |
|
Tested: current PR head merged onto current
Not tested: retail titles (no title data on this lane, counts only). AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting. |
luckyteagirl
left a comment
There was a problem hiding this comment.
Reusing a --dump directory can leave a manifest that still verifies after a rerun fails. The prefix is stable for the same record and program. If the first run writes DXIL and a later run produces a translation error, a failed write to .direct.err.txt returns before the old manifest is replaced. The unchanged guest and old DXIL still match that manifest.
I reproduced the file sequence on Windows by placing a directory at the error artifact path. The sibling write raised PermissionError and the exact-head verifier exited 0 with “guest and translated DXIL match.”
Could the writer invalidate the existing manifest before it starts replacing artifacts, or use separate names for each generation? A regression can seed a valid bundle, force an artifact write failure on the rerun, and check that the old manifest cannot be mistaken for its result.
Part of #2541.
What is in it
xcl shaders --direct --dump <dir>writes a versioned.manifest.jsonbeside each program'sguest.binanddirect.dxilordirect.err.txt. The files share a prefix so a report can be matched to its artifacts.guest.bin,direct.dxil, ordirect.err.txtcannot be saved, XCL reports the exact path and does not publish a manifest that advertises the missing file.scripts/verify_shader_dump.pyverifies saved bundles without the source shader pack or a GPU: it recomputes the guest/DXIL FNV-1a hashes or compares rejected-translation diagnostic bytes exactly.scripts/test_verify_shader_dump.pycovers successful and rejected translations, large binary inputs, mismatches, absent files/fields, invalid schemas, malformed JSON, and multi-manifest failure handling.translation_wall_usmeasures elapsed time around the translation worker call, including the wait for its result. Driver PSO creation is outside that interval.Tested
76e7793dbb5ec337a0b30aa832d25f2fa2d1e5ee:python3 -B -m unittest discover -s scripts -p 'test_*.py': 30 passed, 0 failed.git diff --check: passed.b6bd0c0:cargo check -p xcl --tests --target x86_64-pc-windows-msvc: passed in a Linux cross-check environment using a locallib.exe-compatible archive wrapper. This was compile-only.effef671, merged locally with the contributor's currentmain:cargo test -p xcl --lib: all tests that ran passed, 0 failed, 26 ignored.The Windows library run and earlier checker report predate the two commits added in response to review and are retained as supporting evidence, not exact-head runtime validation.
Regression run
Pending paired
xcl-smokeblocks from currentmainand this PR's clean head76e7793dbb5ec337a0b30aa832d25f2fa2d1e5ee, with the same title and duration.Not tested
AI use
38cdb20f, assisted by OpenAI Codex (GPT-6); the commit was cherry-picked with its original authorship preserved.