Skip to content

Scripts: triage unknown D3D12.X slots and interfaces - #557

Open
wileyGray wants to merge 1 commit into
xcl-dev:mainfrom
wileyGray:codex/d3d12-triage
Open

wileyGray wants to merge 1 commit into
xcl-dev:mainfrom
wileyGray:codex/d3d12-triage

Conversation

@wileyGray

@wileyGray wileyGray commented Nov 24, 2026 •

Copy link
Copy Markdown

Unknown D3D12.X slots and IIDs are spread across reports and first-call logs. This adds an offline triage command that groups observations and recovers log evidence when the JSON report is unusable, without inferring crash causes or changing dispatch.

What is in it

  • Dependency-free Python CLI with deterministic text/JSON, interface/layout identities, callers and incomplete-input warnings.
  • Report counts are aggregated; log lines never increase them.
  • 15 synthetic regressions in Windows CI, plus design and reproduction docs. Five files, 392 added lines.

Tested

  • Rebased head 0506c659935775e6fdce1210500c9a67c6cd482a on main b7aa9f3. Windows 11 Home build 26300; Intel i9-14900K; NVIDIA RTX 4080 SUPER driver 32.0.16.2114; Rust 1.93.0, DXC 1.9.2609.5, Python 3.13.9; debug build.
  • python -B -m unittest discover -s scripts -p test_triage_d3d12.py -v: 15 passed, 0 failed/skipped.
  • scripts/test.ps1 (workspace build + standard four-thread suite) at stack head 61abda9ce0f413db3d6adfa1540700f5b25c3032: 770 passed, 0 failed, 41 ignored; synthetic console-title e2e passed. Its Rust runtime/tests are identical to this PR's.
  • Passing totals include 4 GPU/debug skips and 33 sample-gated early returns, excluded from executed coverage. All XCL_SAMPLE_* unset.
  • Earlier pre-rebase parallel stalls match the deadlock described in D3D12.X: replacing the sparse state deadlocks when the old state still holds placed buffers #344; current main includes D3D12.X: the sparse state is replaced outside its lock #443 and the rebased standard run completed.
  • Synthetic 100,000-line log: 0.164 s, one unique slot; offline parsing only. git diff --check: clean.

Regression run

  • Not required: scripts, CI and documentation only.

Not tested

  • Upstream CI still needs maintainer approval before jobs can run.
  • Retail titles, AMD/Intel adapters or gameplay. No proprietary data used.
  • Caller supplies matching report/log files; schema/logger drift can lose evidence. Unknown IIDs may be optional probes.

AI use

  • Codex (GPT-6; exact variant unavailable) implemented and reviewed the tool/tests, ran validation and wrote this description.

Recover unknown-slot and IID evidence from report.json or matching first-call logs. Preserve layout variants and callers without counting log lines as additional calls. Add synthetic regressions and Windows CI coverage.

Assisted-by: Codex (GPT-6; exact variant unavailable)
@wileyGray
wileyGray marked this pull request as ready for review November 24, 2026 17:01
@ivall ivall added the off-goal Does not bear on the current goal (world loading); waits until it is reached label Nov 24, 2026
@chaseb64

Copy link
Copy Markdown

I ran the triage script on synthetic input at 0506c65. The runtime emits ID3D12PipelineState(console)::#N and ID3D12GraphicsCommandList(console)::#N, but the parser warns and drops both names.

To reproduce, save this as report.json:

{"called_stubs":[{"dll":"d3d12_xs.dll","function":"ID3D12PipelineState(console)::#9","calls":1,"first_caller":"synthetic.exe+0x10"}],"d3d12":{"unknown_iids":[]}}

Save this as xcl.log:

[12:34:56 WARN] [STUB] d3d12_xs.dll!ID3D12GraphicsCommandList(console)::#70 first called from synthetic.exe+0x10 -> returning 0x0

Run python3 scripts/triage_d3d12.py report.json --log xcl.log --json. I get an unrecognized-name warning and an empty slots array. Preserving (console) in the interface name keeps both observations distinct from unqualified slots. I can share the locally prepared patch and regression if helpful. All 16 triage tests passed with the patch on macOS arm64 and Python 3.9.6.

AI-assisted using OpenAI Codex (GPT-6.2 Sol for implementation, reproduction and transfer verification, GPT-6.2 Astra for independent review, and GPT-6 Luna for prior combined validation).

@DavidM1911

Copy link
Copy Markdown
Contributor

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

Thanks!

@RavenCurseBurg

RavenCurseBurg commented Nov 25, 2026 •

Copy link
Copy Markdown

Tested the offline CLI on 0506c659935775e6fdce1210500c9a67c6cd482a with Windows 11 build 26100.9711, i7-13700 and Python 3.14.3.

I ran python -B scripts/triage_d3d12.py report.json --log xcl.log in text and --json modes. The inputs had a UTF-8 BOM, mixed CRLF/LF, no final log newline, Unicode callers, both arrow spellings, and the same interface/slot number on two DLLs. I repeated the runs in reverse record order and with redirected output using PYTHONIOENCODING=utf-8, cp1252 and cp936.

  • All 12 combinations produced byte-identical output within each format. The two report records for the XS DLL totaled 5 calls. Repeated log lines added evidence without increasing that count. The other DLL retained its separate count of 7, and one normalized IID had both sources.
  • With a truncated report and an invalid UTF-8 byte in the log, all three redirected JSON runs retained the valid caller and IID as log-only evidence, reported an unknown call count and emitted both warnings.
  • python -B -m unittest discover -s scripts -p test_triage_d3d12.py passed all 15 tests.

These cases used ordinary interface names, separately from the console-qualified names reported earlier. No real title, runtime or GPU run. OpenAI Codex (GPT-6) prepared the synthetic inputs and ran the checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

off-goal Does not bear on the current goal (world loading); waits until it is reached

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants