Skip to content

Shaders: identify direct translation artifacts in dump manifests - #2553

Open
mokkamokacaffe wants to merge 7 commits into
xcl-dev:mainfrom
mokkamokacaffe:diagnostics/dxil-dump-identity
Open

mokkamokacaffe wants to merge 7 commits into
xcl-dev:mainfrom
mokkamokacaffe:diagnostics/dxil-dump-identity

Conversation

@mokkamokacaffe

@mokkamokacaffe mokkamokacaffe commented Nov 25, 2026 •

Copy link
Copy Markdown

Part of #2541.

What is in it

  • Direct shader dumps include a manifest tying guest bytecode to the translated DXIL or rejection diagnostic. The writer invalidates the previous manifest before replacing artifacts. The offline verifier checks the saved bytes.
  • XCL_SHADER_DEBUG_DIR preserves the exact DXIL submitted to D3D12, the full PDB from that same DXC compilation, generated HLSL, and a manifest in a separate local cache.
  • The manifest now records pdb_fnv64 from the compiler’s PDB output. Both the disk cache and the DXIL-to-symbol index verify it. A swapped PDB or a legacy manifest missing the hash triggers a rebuild.

Tested

Windows 11 Pro 24H2 build 26100.9711, i9-14900KF, 64 GiB RAM, RTX 4080 SUPER 16 GiB, NVIDIA 617.14, Rust/Cargo 1.100.0 MSVC, DXC/DXIL 1.9.2609.5.

  • Published PR head 3c95cdfab8ce9bde38d19976605a0ef9c48cb267. Main baseline 623d02e465a17497a757a4ce867f482b0a6c8f3b.
  • cargo build --workspace (dev), cargo build --release -p xcl (optimized with debug information), and git diff --check passed.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 on the published head with standard Windows runtime settings: 1,462 passed, 0 failed, 47 ignored across 38 completed harnesses. There were 25 explicit SKIPPED subcases: 21 for unavailable wave64, three unsupported wave32 FP16 operations, and one for unavailable heap windows.
  • The new regression compiled two different shaders with equal-length PDBs. The previous code accepted the swap. With the fix, both lookups rejected it, recompilation restored the original PDB byte-for-byte, and the repaired bundle gave a warm hit. A legacy manifest also refreshed successfully.
  • Four focused Rust reruns each selected and passed one test: same-size PDB swap, exact DXIL/full PDB, translated-shader cache identity, and stale dump-manifest invalidation. These are already represented in the workspace count.
  • Python suite: 30 passed, 0 failed, 0 skipped. The bounded direct shader run sampled eight records, skipped three above the size limit, and translated five. All five individual manifests passed the offline verifier.
  • Additional Agility SDK comparison. Forcing Agility SDK 1.620.2 in two four-thread PR workspace runs produced 1,461 passed, 1 failed, 47 ignored each. Both failed in d32s8_targets_take_their_own_size_of_video_memory while closing a D3D12 command list (0x80004005). Clean main reproduced the same failure in its four-thread library suite. The isolated test passed on both revisions.

Regression run

Main’s existing block and the refreshed PR block used clean worktrees, separate release binaries and saves, and independently verified copies of the same 31,056-file starting cache. Both used the same retail title, GPU, DXC and Agility settings, with networking disabled and no scripted input. Symbol capture, DRED, and the D3D12 debug layer were off for both runs.

Main

xcl-smoke v1
commit: 623d02e465a17497a757a4ce867f482b0a6c8f3b
gpu: NVIDIA GeForce RTX 4080 SUPER
title: retail-local
seconds: 60
exit: 0x0
frames shown: 1077 (PresentX 1077)
presents per 2 s (last 3): 35 38 35
device removals: 0
crashes: 0
peak commit: 15412 MB

PR

xcl-smoke v1
commit: 3c95cdfab8ce9bde38d19976605a0ef9c48cb267
gpu: NVIDIA GeForce RTX 4080 SUPER
title: retail-local
seconds: 60
exit: 0x0
frames shown: 1023 (PresentX 1023)
presents per 2 s (last 3): 29 28 28
device removals: 0
crashes: 0
peak commit: 14983 MB

Not tested

Retail symbol capture, end-to-end Nsight Aftermath crash resolution, AMD or Intel GPUs, and warm-cache PDB hashing overhead. The retail sample produced no rejected translation. Rejected bundles were covered by the Python suite.

AI use

OpenAI Codex assisted with implementation, Windows testing, and drafting. OpenAI Codex (GPT-6) wrote and tested the PDB cache fix and same-size swap regression. RavenCurseBurg contributed the offline verifier and its tests.

@RavenCurseBurg

RavenCurseBurg commented Nov 25, 2026 •

Copy link
Copy Markdown

Verified 76e7793dbb5ec337a0b30aa832d25f2fa2d1e5ee after the cherry-pick. The offline checker and its tests match the original files from 38cdb20f byte-for-byte. python -B -m unittest discover -s scripts -p "test_*.py" passed 30/30. All 12 two-manifest CLI cases passed again: a valid second manifest was processed after an invalid first one, and none of the saved file snapshots changed. This verifies the adopted offline checker. I did not execute XCL’s Rust dump writer or load a retail pack. Windows 11, Core i7-13700, Python 3.14.3. OpenAI Codex (GPT-6) ran the checks.

Earlier verification

I prepared an offline artifact checker and tests on effef6719d431ac360ce9d6f46c55e87b1bd486a for the success/error checks listed in this PR. Run python -B scripts/verify_shader_dump.py FILE.manifest.json on a saved dump. It reads the sibling guest file and the result selected by the manifest, recomputes the FNV-1a hashes, and compares a rejected translation's UTF-8 error bytes exactly. It also accepts multiple manifests and returns a failure status if any comparison fails.

I ran 12 two-manifest CLI cases using synthetic files, including a 131,073-byte binary guest with independently computed hash 9fd6a807c893b7df. Both outcome types passed. The ten mismatch, missing-file/field, schema and malformed-JSON cases returned 1, still processed the following valid manifest and left all files byte-identical. A rejection with an old DXIL file present selected the error file. python -B -m unittest discover -s scripts -p "test_*.py" passed all 30 tests, including five for the checker.

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.

Rechecked the offline verifier on b0d2fb814b92148710d0f91e590d6c1f9fe26cd2 following the writer change. With unchanged guest/DXIL files and a directory blocking the error-file path, a retained old manifest still verified. After I removed that manifest to represent an interrupted replacement, the CLI returned 1 and still verified a second intact bundle. Publishing a new error manifest selected its exact error text even with the old DXIL present. The verifier left all three fixture states unchanged.

I ran python -B scripts/verify_shader_dump.py sample.manifest.json other.manifest.json on those synthetic states, reran the 12 earlier CLI cases, and ran python -B -m unittest discover -s scripts -p "test_*.py" (30 passed). Windows 11 build 26100, Core i7-13700, Python 3.14.3. OpenAI Codex (GPT-6) ran these checks. I constructed the file states directly. The native Rust writer regression and paired retail smoke were outside this run.

Offline verifier retest on 9ebc4a21e5442515a8fc6546d903928181dcd1f7

The direct-dump verifier and its tests are byte-identical to b0d2fb81. All five focused Python tests passed. I reran the 12 two-manifest CLI cases and the three cases for retaining, invalidating and replacing a manifest. The verifier processed the second valid manifest after an error and preserved the fixture files in every case. OpenAI Codex (GPT-6) ran these CPU-only checks on Windows 11 with synthetic direct-DXIL bundles. The new DXC/PDB path and retail execution were outside this run.

The PR description check requests a clean xcl-smoke block for 9ebc4a21e544. The paired retail report in the description covers the previous head b0d2fb81.

@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 26 ignored.

Thanks!

— Devin

Comment thread crates/xcl/src/shaders.rs Resolved
mokkamokacaffe and others added 2 commits November 26, 2026 00:59
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)
@DavidM1911

Copy link
Copy Markdown
Contributor

Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

@SlopTart

Copy link
Copy Markdown

Tested: current PR head merged onto current origin/main (clean), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo target x86_64-pc-windows-gnu run under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).

gpu_ suite (cold cache): 165 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR.
Targeted run of direct_dump_does_not_publish_a_manifest_for_a_missing_artifact: passed.

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 luckyteagirl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Remove an existing manifest before replacing any of its sibling artifacts. A failed rerun can then leave incomplete files, but cannot make the verifier accept the previous generation as the new result.

Add a two-generation regression that forces the replacement error artifact to be unwritable and checks that the old manifest is gone.

Assisted-by: OpenAI Codex (GPT-6.2 Astra Ultra)
@mokkamokacaffe

Copy link
Copy Markdown
Author

Fixed in b0d2fb8.

write_direct_dump now removes the existing manifest before replacing any sibling artifact. Failure to invalidate the manifest aborts before changing the bundle; failure of any later artifact write leaves no manifest that can authenticate the previous generation.

The new direct_dump_invalidates_an_old_manifest_before_replacing_artifacts regression reproduces the reported sequence: it writes a valid bundle, makes the next .direct.err.txt path unwritable, runs a failing replacement, and asserts that the old manifest is gone.

Checked

  • python3 -B -m unittest discover -s scripts -p 'test_*.py': 30 passed, 0 failed.
  • cargo check -p xcl --tests --target x86_64-pc-windows-msvc: passed as a compile-only Linux cross-check with a local archive wrapper.
  • git diff --check: passed.

Not tested

  • Native Windows execution of the new Rust regression.
  • Exact-head workspace GPU suite or paired retail smoke.

AI use

  • OpenAI Codex (GPT-6.2 Astra Ultra) reproduced the state transition from the review, implemented the invalidation and regression, ran the listed checks, and drafted this reply.

@mokkamokacaffe

Copy link
Copy Markdown
Author

XCL PR #2553 Windows test report

The PR workspace build, Rust tests, Python tests, whitespace check, and shader dump verification passed. Both retail smoke attempts stopped before launch because the unpacked title was missing the executable declared in MicrosoftGame.config. PR #2553

Machine and revisions

  • Physical Windows 11 Pro 24H2 PC, build 26100.9711, Intel Core i9-14900KF (24 cores, 32 logical processors), 64 GiB RAM installed.
  • NVIDIA GeForce RTX 4080 SUPER, 16 GiB VRAM, NVIDIA driver 617.14 (Windows driver 32.0.16.1714).
  • Rust 1.100.0 (0ef1bc386 2026-11-09), target x86_64-pc-windows-msvc, Cargo 1.100.0, MSVC linker 14.44.35230.0, Windows SDK libraries 10.0.26100.9457, Python 3.12.14.
  • Microsoft DXC release v1.9.2609. The dxc.exe, dxcompiler.dll, and dxil.dll file versions were all 1.9.2609.5. Tests and smoke attempts used the same XCL_DXC_DIR setting.
  • Main 8b957bec6f82495aec940944c6bf47faa02db590
  • PR head b0d2fb814b92148710d0f91e590d6c1f9fe26cd2
  • GitHub recheck on 2026-11-26 at 21:52 CET returned the same main tip and PR head. The PR head also matched the last known SHA. Both detached worktrees were clean at creation and at the end of testing.

Tested

Revision Command / profile Result
PR cargo build --workspace / dev Passed
PR cargo test --workspace --no-fail-fast -- --test-threads=4 / test 1,425 reported passed, 0 failed, 46 ignored. All 37 harness runs completed.
PR cargo test -p xcl --lib shaders::tests::direct_dump_invalidates_an_old_manifest_before_replacing_artifacts -- --exact / test Exactly 1 passed, 0 failed, 1,325 filtered out. This rerun is already represented in the workspace total.
PR python -B -m unittest discover -s scripts -p "test_*.py" -v 30 passed, 0 failed, 0 skipped
Main Same Python discovery command 25 passed, 0 failed, 0 skipped
PR git diff --check Passed, empty output
Main and PR cargo build --release -p xcl / release Both passed. Each worktree built its own optimized executable with full debug symbols.

Explicit Rust skips

The workspace emitted 29 SKIPPED events. A test that skips a subcase or returns early can contribute to the harness's reported pass total. The 46 ignored tests are a separate harness count.

Reported reason Count
cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D) 1
const_mask, wave64: no wave64 1
f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's)) 1
f16 arithmetic, wave64: no wave64 1
f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's)) 1
f16 packed, wave64: no wave64 1
f32 arithmetic, wave64: no wave64 1
f32 compares, wave64: no wave64 1
f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's)) 1
f32 conversions, wave64: no wave64 1
f32 rounding, wave64: no wave64 1
f32 three-source, wave64: no wave64 1
f32 transcendentals, wave64: no wave64 1
f64, wave64: no wave64 1
integer arithmetic, wave64: no wave64 1
integer carries, wave64: no wave64 1
mask_ff0_flbit, wave64: no wave64 1
no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)) 1
no d3d12SDKLayers.dll 2
no heap windows 1
no wave64 8

Optional retail fixtures for the workspace suite were unset. It logged eight early returns for XCL_SAMPLE_RPF and one each for XCL_SAMPLE_AWC and XCL_SAMPLE_TTPF. It also logged one additional heap-window check skipped and two subcases skipped because the PC pipeline was a mesh shader.

Failures and main comparisons

  • The first Rust attempts stopped during compilation because the portable MSVC setup lacked the SDK include path. Both revisions showed the same libudis86-sys missing-header error. After setting the include path, the builds succeeded and the PR workspace and focused Rust runs had zero test failures.
  • The first Python run produced 16 permission-error entries with the shell's default temporary directory. Main reproduced all six error entries from the three shared test methods under the same settings. The remaining ten entries came from five PR-only verifier tests. With separate writable temporary directories in the scratch workspace, both suites passed as shown above.

Regression run

PowerShell confirmed the local title directory exists. Each worktree's full git status --porcelain was empty immediately before its own scripts/smoke.ps1 ran against its own release binary, main first. Both attempts requested 60 seconds against the same title, with networking disabled, no scripted input, and separate fresh XCL data, save, DXIL cache, temporary, and output directories. No system-wide cache reset was performed.

  • Main produced no xcl-smoke block. The script stopped because the launcher printed no log path. A separate invocation of the same release binary returned exit code 2 and confirmed the configured executable was missing.
  • PR produced no xcl-smoke block. The script stopped for the same reason. Its release binary also returned exit code 2 and confirmed the configured executable was missing.

Neither attempt reached retail gameplay. A paired 60-second performance and stability comparison is pending a complete local title. The title file list, sizes, and last-write times matched before and after testing.

Direct shader dump

The PR release binary ran xcl shaders <pack> --direct --sample 8 --seed 1 --threads 1 --dump <private-dir> against a local RPF9 shader pack and exited 0. Eight sampled records yielded five translated programs and three programs above the CLI's 16,384-byte limit. All five generated manifests passed individual verify_shader_dump.py invocations with exit code 0 and the result guest and translated DXIL match. This selection yielded zero rejected translations, so retail rejected-bundle verification remains untested. The Python suite exercised the rejected-bundle verifier with fixtures.

AI use

OpenAI Codex (GPT-6) ran the local checks and drafted this report. Raw logs and shader artifacts stayed local.

@mokkamokacaffe

Copy link
Copy Markdown
Author

I forgot to put the .exe at the right place - rerunning the smoke tests.

@mokkamokacaffe

Copy link
Copy Markdown
Author

XCL PR #2553 Windows test report

The PR workspace build, Rust tests, Python tests, whitespace check, and shader dump verification passed. The PR completed two 60-second retail runs with 753 and 733 frames respectively, each with zero crashes or device removals. Main timed out during cold shader preparation on both attempts, so a retail frame or memory comparison against main is unavailable. PR #2553

Machine and revisions

  • Physical Windows 11 Pro 24H2 PC, build 26100.9711, Intel Core i9-14900KF (24 cores, 32 logical processors), 64 GiB RAM installed.
  • NVIDIA GeForce RTX 4080 SUPER, 16 GiB VRAM, NVIDIA driver 617.14 (Windows driver 32.0.16.1714).
  • Rust 1.100.0 (0ef1bc386 2026-11-09), target x86_64-pc-windows-msvc, Cargo 1.100.0, MSVC linker 14.44.35230.0, Windows SDK libraries 10.0.26100.9457, Python 3.12.14.
  • Microsoft DXC release v1.9.2609. The dxc.exe, dxcompiler.dll, and dxil.dll file versions were all 1.9.2609.5. Tests and smoke attempts used the same XCL_DXC_DIR setting.
  • Main 8b957bec6f82495aec940944c6bf47faa02db590
  • PR head b0d2fb814b92148710d0f91e590d6c1f9fe26cd2
  • GitHub recheck on 2026-11-27 at 00:20 CET returned the same upstream main and PR head as the original suite and the start of the smoke reruns. Both detached worktrees finished clean.

Tested

Revision Command / profile Result
PR cargo build --workspace / dev Passed
PR cargo test --workspace --no-fail-fast -- --test-threads=4 / test 1,425 reported passed, 0 failed, 46 ignored. All 37 harness runs completed.
PR cargo test -p xcl --lib shaders::tests::direct_dump_invalidates_an_old_manifest_before_replacing_artifacts -- --exact / test Exactly 1 passed, 0 failed, 1,325 filtered out. This rerun is already represented in the workspace total.
PR python -B -m unittest discover -s scripts -p "test_*.py" -v 30 passed, 0 failed, 0 skipped
Main Same Python discovery command 25 passed, 0 failed, 0 skipped
PR git diff --check Passed, empty output
Main and PR cargo build --release -p xcl / release Both passed. Each worktree built its own optimized executable with full debug symbols.

Explicit Rust skips

The workspace emitted 29 SKIPPED events. A test that skips a subcase or returns early can contribute to the harness's reported pass total. The 46 ignored tests are a separate harness count.

Reported reason Count
cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D) 1
const_mask, wave64: no wave64 1
f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's)) 1
f16 arithmetic, wave64: no wave64 1
f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's)) 1
f16 packed, wave64: no wave64 1
f32 arithmetic, wave64: no wave64 1
f32 compares, wave64: no wave64 1
f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's)) 1
f32 conversions, wave64: no wave64 1
f32 rounding, wave64: no wave64 1
f32 three-source, wave64: no wave64 1
f32 transcendentals, wave64: no wave64 1
f64, wave64: no wave64 1
integer arithmetic, wave64: no wave64 1
integer carries, wave64: no wave64 1
mask_ff0_flbit, wave64: no wave64 1
no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)) 1
no d3d12SDKLayers.dll 2
no heap windows 1
no wave64 8

Optional retail fixtures for the workspace suite were unset. It logged eight early returns for XCL_SAMPLE_RPF and one each for XCL_SAMPLE_AWC and XCL_SAMPLE_TTPF. It also logged one additional heap-window check skipped and two subcases skipped because the PC pipeline was a mesh shader.

Failures and main comparisons

  • The first Rust attempts stopped during compilation because the portable MSVC setup lacked the SDK include path. Both revisions showed the same libudis86-sys missing-header error. After setting the include path, the builds succeeded and the PR workspace and focused Rust runs had zero test failures.
  • The first Python run produced 16 permission-error entries with the shell's default temporary directory. Main reproduced all six error entries from the three shared test methods under the same settings. The remaining ten entries came from five PR-only verifier tests. With separate writable temporary directories in the scratch workspace, both suites passed as shown above.

D3D12 debug-layer follow-up

Both revisions used the matching x64 core and debug DLLs from Microsoft.Direct3D.D3D12 1.620.2, file version 1.620.2.0.20261106.5. The exact uploads_start_from_each_subresources_state rerun selected one test per revision. Each harness recorded a pass with one explicit SKIPPED event for the same reason: no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)). These follow-ups are excluded from the workspace totals above.

The two stock end-to-end tests check for the Windows-installed debug DLL before starting. That DLL was absent. Separate diagnostic launches using the same synthetic title exercised DRED off and on for each revision. All four loaded Agility SDK v620, exited 0, and completed the fixture. Debug-layer activation returned 0x887A002D on both revisions, leaving debug validation untested. Microsoft requires the Windows Graphics Tools optional feature in addition to the redistributable SDK. Microsoft D3D12 redistributable specification

Regression run

PowerShell confirmed that the configured title executable was present. Main ran first, followed by the PR. Each worktree passed a full git status --porcelain check immediately before running its own release binary and smoke script. Both runs requested 60 seconds on the same title with networking disabled, no scripted input, the same DXC and Agility SDK settings, and the retail debug layer off. Each started with its own empty XCL data, save, DXIL cache, temporary, and output directories. System-wide driver caches were left in place.

For the second pair, main used its supported 7,200-second startup allowance. The PR script has a fixed 120-second startup allowance. Both retained the 60-second guest-run setting. The title file list, file sizes, and last-write times matched before and after the reruns.

Main

The script stopped the launcher after 7,260 seconds of wall time. Main was still preparing shaders, with 23,520 files in its private cache. The launcher printed no log path, and the stock script produced no xcl-smoke block. The 60-second guest run never started.

PR

xcl-smoke v1
commit: b0d2fb814b92148710d0f91e590d6c1f9fe26cd2
gpu: NVIDIA GeForce RTX 4080 SUPER
title: retail-local
seconds: 60
exit: 0x0
frames shown: 733 (PresentX 733)
presents per 2 s (last 3): 22 22 20
device removals: 0
crashes: 0
peak commit: 15054 MB

First attempt with default timeouts

Main timed out during cold shader preparation and produced no block. The PR completed its first 60-second run with 753 frames, zero crashes, zero device removals, and 14,948 MB peak commit.

PR, first attempt

xcl-smoke v1
commit: b0d2fb814b92148710d0f91e590d6c1f9fe26cd2
gpu: NVIDIA GeForce RTX 4080 SUPER
title: retail-local
seconds: 60
exit: 0x0
frames shown: 753 (PresentX 753)
presents per 2 s (last 3): 24 24 24
device removals: 0
crashes: 0
peak commit: 14948 MB

Direct shader dump

The PR release binary ran xcl shaders <pack> --direct --sample 8 --seed 1 --threads 1 --dump <private-dir> against a local RPF9 shader pack and exited 0. Eight sampled records yielded five translated programs and three programs above the CLI's 16,384-byte limit. All five generated manifests passed individual verify_shader_dump.py invocations with exit code 0 and the result guest and translated DXIL match. This selection yielded zero rejected translations, so retail rejected-bundle verification remains untested. The Python suite exercised the rejected-bundle verifier with fixtures.

AI use

OpenAI Codex (GPT-6) ran the original checks. Codex (GPT-6.2 Astra) ran the retail and debug-layer follow-ups and updated this report. Raw logs and shader artifacts stayed local.

@JJAutoCompare

Copy link
Copy Markdown

Tested: Exact clean head b0d2fb814b92148710d0f91e590d6c1f9fe26cd2, Windows 11 26200.9974, Ryzen 7 3800X, Rust 1.100.0 MSVC and Python 3.14.3. cargo test -p xcl --lib shaders::tests::direct_dump_ -- --nocapture: 2 passed. python -B -m unittest discover -s scripts -p 'test_*.py': 30 passed. A standalone synthetic harness compiled the checked-in writer and called the verifier CLI (cargo test --offline --manifest-path <harness>/Cargo.toml -- --nocapture). At head, both Windows file-lock tests passed. With the parent writer (76e7793dbb5ec337a0b30aa832d25f2fa2d1e5ee), both failed as expected. Zero skips.

When Windows denied deleting the old manifest, head left the old bundle untouched and the verifier still accepted it. When Windows denied the DXIL write after successful invalidation, no manifest was published and the verifier exited 1. Both retries produced valid bundles once the file handles were released.

Not tested: GPU execution, full Rust workspace, retail packs, or retail smoke.

AI use: T3 Code / Codex (gpt-6.2-sol) wrote the probe, ran and independently reran the checks, and drafted the report.

@mokkamokacaffe

Copy link
Copy Markdown
Author

XCL PR #2553 Windows test report

The PR workspace build, Rust tests, Python tests, whitespace check, and shader dump verification passed. The retail results below use identical starting shader caches. PR #2553

Machine and revisions

  • Physical Windows 11 Pro 24H2 PC, build 26100.9711, Intel Core i9-14900KF (24 cores, 32 logical processors), 64 GiB RAM installed.
  • NVIDIA GeForce RTX 4080 SUPER, 16 GiB VRAM, NVIDIA driver 617.14 (Windows driver 32.0.16.1714).
  • Rust 1.100.0 (0ef1bc386 2026-11-09), target x86_64-pc-windows-msvc, Cargo 1.100.0, MSVC linker 14.44.35230.0, Windows SDK libraries 10.0.26100.9457, Python 3.12.14.
  • Microsoft DXC release v1.9.2609. The dxc.exe, dxcompiler.dll, and dxil.dll file versions were all 1.9.2609.5. Tests and smoke attempts used the same XCL_DXC_DIR setting.
  • Main 8b957bec6f82495aec940944c6bf47faa02db590
  • PR head b0d2fb814b92148710d0f91e590d6c1f9fe26cd2
  • GitHub recheck on 2026-11-27 at 04:07 CET returned the same upstream main and PR head as the original suite and the start of the smoke reruns. Both detached worktrees finished clean.

Tested

Revision Command / profile Result
PR cargo build --workspace / dev Passed
PR cargo test --workspace --no-fail-fast -- --test-threads=4 / test 1,425 reported passed, 0 failed, 46 ignored. All 37 harness runs completed.
PR cargo test -p xcl --lib shaders::tests::direct_dump_invalidates_an_old_manifest_before_replacing_artifacts -- --exact / test Exactly 1 passed, 0 failed, 1,325 filtered out. This rerun is already represented in the workspace total.
PR python -B -m unittest discover -s scripts -p "test_*.py" -v 30 passed, 0 failed, 0 skipped
Main Same Python discovery command 25 passed, 0 failed, 0 skipped
PR git diff --check Passed, empty output
Main and PR cargo build --release -p xcl / release Both passed. Each worktree built its own optimized executable with full debug symbols.

Explicit Rust skips

The workspace emitted 29 SKIPPED events. A test that skips a subcase or returns early can contribute to the harness's reported pass total. The 46 ignored tests are a separate harness count.

Reported reason Count
cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D) 1
const_mask, wave64: no wave64 1
f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's)) 1
f16 arithmetic, wave64: no wave64 1
f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's)) 1
f16 packed, wave64: no wave64 1
f32 arithmetic, wave64: no wave64 1
f32 compares, wave64: no wave64 1
f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's)) 1
f32 conversions, wave64: no wave64 1
f32 rounding, wave64: no wave64 1
f32 three-source, wave64: no wave64 1
f32 transcendentals, wave64: no wave64 1
f64, wave64: no wave64 1
integer arithmetic, wave64: no wave64 1
integer carries, wave64: no wave64 1
mask_ff0_flbit, wave64: no wave64 1
no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)) 1
no d3d12SDKLayers.dll 2
no heap windows 1
no wave64 8

Optional retail fixtures for the workspace suite were unset. It logged eight early returns for XCL_SAMPLE_RPF and one each for XCL_SAMPLE_AWC and XCL_SAMPLE_TTPF. It also logged one additional heap-window check skipped and two subcases skipped because the PC pipeline was a mesh shader.

Failures and main comparisons

  • The first Rust attempts stopped during compilation because the portable MSVC setup lacked the SDK include path. Both revisions showed the same libudis86-sys missing-header error. After setting the include path, the builds succeeded and the PR workspace and focused Rust runs had zero test failures.
  • The first Python run produced 16 permission-error entries with the shell's default temporary directory. Main reproduced all six error entries from the three shared test methods under the same settings. The remaining ten entries came from five PR-only verifier tests. With separate writable temporary directories in the scratch workspace, both suites passed as shown above.

D3D12 debug-layer follow-up

Both revisions used the matching x64 core and debug DLLs from Microsoft.Direct3D.D3D12 1.620.2, file version 1.620.2.0.20261106.5. The exact uploads_start_from_each_subresources_state rerun selected one test per revision. Each harness recorded a pass with one explicit SKIPPED event for the same reason: no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)). These follow-ups are excluded from the workspace totals above.

The two stock end-to-end tests check for the Windows-installed debug DLL before starting. That DLL was absent. Separate diagnostic launches using the same synthetic title exercised DRED off and on for each revision. All four loaded Agility SDK v620, exited 0, and completed the fixture. Debug-layer activation returned 0x887A002D on both revisions, leaving debug validation untested. Microsoft requires the Windows Graphics Tools optional feature in addition to the redistributable SDK. Microsoft D3D12 redistributable specification

Regression run

Main ran first, followed by the PR. Each release binary and stock smoke script ran from its own clean detached worktree. Each started with a separate copy of the same 23,520-file cache from the earlier main preparation. Relative filenames and SHA-256 digests matched before each launch. Both requested 60 seconds with fresh save and data directories, identical DXC and Agility SDK settings, networking disabled and no scripted input. Main used its maximum 86,400-second startup allowance. The PR script uses a fixed 120-second allowance. System driver caches were left in place. Title filenames, sizes and last-write times matched the pre-run snapshot.

Main

xcl-smoke v1
commit: 8b957bec6f82495aec940944c6bf47faa02db590
gpu: NVIDIA GeForce RTX 4080 SUPER
title: retail-local
seconds: 60
exit: 0x0
frames shown: 691 (PresentX 691)
presents per 2 s (last 3): 25 26 28
device removals: 0
crashes: 0
peak commit: 15250 MB

PR

xcl-smoke v1
commit: b0d2fb814b92148710d0f91e590d6c1f9fe26cd2
gpu: NVIDIA GeForce RTX 4080 SUPER
title: retail-local
seconds: 60
exit: 0x0
frames shown: 998 (PresentX 999)
presents per 2 s (last 3): 51 55 57
device removals: 0
crashes: 0
peak commit: 14960 MB

Direct shader dump

The PR release binary ran xcl shaders <pack> --direct --sample 8 --seed 1 --threads 1 --dump <private-dir> against a local RPF9 shader pack and exited 0. Eight sampled records yielded five translated programs and three programs above the CLI's 16,384-byte limit. All five generated manifests passed individual verify_shader_dump.py invocations with exit code 0 and the result guest and translated DXIL match. This selection yielded zero rejected translations, so retail rejected-bundle verification remains untested. The Python suite exercised the rejected-bundle verifier with fixtures.

AI use

OpenAI Codex (GPT-6) ran the original checks. Codex (GPT-6.2 Astra) ran the retail and debug-layer follow-ups and updated this report. Raw logs and shader artifacts stayed local.

Add an opt-in XCL_SHADER_DEBUG_DIR pipeline for DXC translations. Compile with full separate debug information and retain the exact stripped DXIL object, its matching PDB, the exact HLSL input, and a manifest as one local bundle.

Keep the diagnostic cache separate and reject lower- and upper-level cache hits when their symbol bundle is incomplete. Include non-default DXC arguments in the symbol identity, document the private-artifact and direct-DXIL limitations, and cover exact object/PDB matching plus recovery.

Tested on Windows with the full workspace suite (1,426 passed, 0 failed), a release build, and NVIDIA Nsight Aftermath shader hash/debug-name lookup.

Assisted-by: OpenAI Codex (GPT-6.2 Astra)
@mokkamokacaffe

Copy link
Copy Markdown
Author

Follow-up: opt-in local shader symbols

Added in c8234e4.

  • XCL_SHADER_DEBUG_DIR=<private-folder> enables full separate DXC debug information.
  • Each DXC translation retains the exact stripped DXIL returned to XCL, the matching PDB from the same IDxcResult, the exact HLSL compiler input, and a JSON manifest.
  • The diagnostic cache is isolated; incomplete bundles invalidate both DXC and translated-shader cache hits.
  • Non-default DXC arguments are part of the symbol identity. Bundles are published atomically.
  • Generated HLSL/title-derived artifacts must remain private. Direct-DXIL translations bypass DXC and still have no HLSL PDB.

Validation on the identical source tree before publication:

  • cargo build --workspace: passed.
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 1,426 passed, 0 failed, 46 ignored; all 37 harnesses completed.
  • cargo build --release -p xcl: passed.
  • Exact-DXIL/full-PDB and cache-recovery regression: passed.
  • git diff --check: passed.
  • NVIDIA Nsight Aftermath accepted the retained DXIL, produced its shader hash, and extracted a debug name exactly matching the saved PDB filename.

A new retail smoke was not run for this follow-up commit; the existing paired smoke blocks apply to the previous PR head. No shader artifacts, PDBs, title data, local paths, or raw logs were uploaded.

@ettehn

ettehn commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

I checked the new DXC symbol cache at 9ebc4a21e5442515a8fc6546d903928181dcd1f7 on Windows 11 26200.9974 (Rust 1.97.1 MSVC, SDK DXC/DXIL 1.8.2502.11). A standalone harness used the exact dxc.rs and the compile_cached_in and shader_symbols_available paths.

Two synthetic compute shaders produced different DXIL and different PDBs of the same size (5,632 bytes). After replacing A’s PDB with B’s, all three fresh runs still reported symbols available and a disk hit for A, preserving B’s PDB. Truncating A’s PDB to zero triggered a miss and restored the correct PDB in all three runs.

A local candidate recording pdb_fnv64 in the manifest and checking it during bundle validation restored A’s PDB byte-for-byte in all three swap tests. Clean warm hits remained hits. Manifests without the new field were refreshed on a miss. This covers synthetic CPU-side DXC/cache behavior only; no title, GPU, or workspace suite ran. I did not measure warm-hit I/O cost. AI use: OpenAI Codex (GPT-6) wrote and ran the probe, prepared the local candidate, and drafted this report.

Record the PDB hash with the DXIL and rebuild symbol bundles when it is missing or mismatched. Cover same-size PDB substitution and legacy manifests on both symbol lookup paths.

Assisted-by: OpenAI Codex (GPT-6)
@mokkamokacaffe
mokkamokacaffe marked this pull request as ready for review November 27, 2026 11:59
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.

7 participants