Skip to content

D3D12.X: log pipeline-state streams that use console subobject types - #3138

Open
KOLESNiii wants to merge 1 commit into
xcl-dev:mainfrom
KOLESNiii:d3d12x-pso-stream-console-types
Open

KOLESNiii wants to merge 1 commit into
xcl-dev:mainfrom
KOLESNiii:d3d12x-pso-stream-console-types

Conversation

@KOLESNiii

@KOLESNiii KOLESNiii commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Help wanted: evidence. This PR only measures and changes no behaviour; it is the first step for the console-layout guesses. Please run a title on this head and post D3D12.X: pipeline stream uses subobject types above 22: types [...], SizeInBytes ..., sum ... (console table, ...) / ... (PC table, ...) (at most 16 lines, always on) here (not the whole log). #3151 is stacked on this and assumes what it is meant to confirm. The retail game logs none of these lines in 60 s, so we need other titles, mesh-shader titles above all.

A console stream numbers its subobjects differently above type 22 (23 AS,

25-29 options and limits, 100-102 the PC's DEPTH_STENCIL2 / RASTERIZER1 / 2),

and XCL parses with the PC table. Log (at most 16 lines) each stream that

has a type above 22: the type sequence, SizeInBytes and whether the sum of

the 8-aligned subobject sizes matches it under the PC and the console table.

This is to confirm the numbering on a title's real streams. Parsing results

are unchanged and streams with only types up to 22 do not allocate.

What is in it

  • crates/xcl/src/hle/d3d12x/null.rs: +21 / -0

  • crates/xcl/src/hle/d3d12x/real.rs: +87 / -0

  • new tests: console_stream_sizes_add_up_under_the_console_table_only, pc_only_stream_adds_up_under_both_tables

Tested

Regression run

Both 60-second runs used the same warm DXIL cache directory.


xcl-smoke v1

commit: 336fdddafbcb3c3db753629f5f79a9f44b6c4b9d

gpu: NVIDIA GeForce RTX 2070 SUPER

title: retail game

seconds: 60

exit: 0x0

frames shown: 1228 (PresentX 1228)

presents per 2 s (last 3): 61 60 60

device removals: 0

crashes: 0

peak commit: 15234 MB


xcl-smoke v1

commit: 71a90238af389702e7d9b259466a1f60eea0a893

gpu: NVIDIA GeForce RTX 2070 SUPER

title: retail game

seconds: 60

exit: 0x0

frames shown: 1396 (PresentX 1397)

presents per 2 s (last 3): 61 60 60

device removals: 0

crashes: 0

peak commit: 16425 MB

Not tested

AI use

  • Codex (exact model name unavailable) verified the queued smoke results and drafted this description update.

  • patch-worker on Claude Sonnet 5.5 (self-reported); reviewed by Claude Opus 5.5: the code and tests. The description and the test / suite runs: Claude Code, Claude Sonnet 5.5 and Claude Opus 5.5.

🤖 Generated with Claude Code

A console stream numbers its subobjects differently above type 22 (23 AS,
25-29 options and limits, 100-102 the PC's DEPTH_STENCIL2 / RASTERIZER1 / 2),
and XCL parses with the PC table. Log (at most 16 lines) each stream that
has a type above 22: the type sequence, SizeInBytes and whether the sum of
the 8-aligned subobject sizes matches it under the PC and the console table.
This is to confirm the numbering on a title's real streams. Parsing results
are unchanged and streams with only types up to 22 do not allocate.

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

Foniass commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Triage (#1607) – head 71a9023

#3151 contains this PR's commit because it is stacked on it, so this is not a duplicate. No other PR adds this logging.
No problems found in the diff: diagnostics only, capped at 16 lines, and streams without a type above 22 do not allocate.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

@Foniass

Foniass commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

merge-check
base: 493dbd3
head: 71a9023
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2902 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none
review: read the whole diff (+108). It logs, up to 16 times, the pipeline-state streams that use subobject types above the PC's 22. Findings: (1) The walk never stops on a title that has none. real.rs ~7918 walks each stream once more on every pipeline creation, and the 16-line cap counts only streams that log. On a title with no type above 22 it never reaches 16. It doesn't allocate and is small next to creating a pipeline, but stopping after the first N streams, or putting it behind a trace switch, would bound it. (2) The walk stops at the first type neither table knows, so its "sizes sum to the stream" check is misleading for such a stream. (3) 23 = AS and 24 = MS have partial backing (HANDOFF ~1763: an MS container in slot 24). The names and payload sizes for 25-29 and the mapping of 100-102 cite no title call; please say how they were obtained. The PR's red CI is benches/runtime.rs failing to compile (E0451, input_profile private) from a base before main's f52da00; the run here merges onto current main. Fine: the 16-line cap is race-safe (fetch_add), and SizeInBytes is the full stream length. #3151 is stacked on it; #630 and #541 overlap on type 24.
performance: 60 s smoke of a retail title, main 493dbd3 vs this merge (a387cbd0): 1670 -> 1681 frames shown (100 %; last presents per 2 s: 61 60 60), peak commit 17083 -> 17303 MB, 0 device removals, 0 crashes. The retail title logged no stream with a type above 22 in this run, so the walk ran on every pipeline creation without ever logging, the case where it never stops.
verdict: safe to merge (a diagnostic; stopping the extra walk after the first N streams, or putting it behind a trace switch, would bound it on titles that never log)
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5

AI-written and posted by Foniass without a human check of each point.

@github-actions github-actions Bot added area:d3d12 D3D12.X runtime, command lists, resources, sparse memory gpu:both Code affects both AMD and NVIDIA GPUs (scope tag; see needs:*-test for remaining checks) labels Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:d3d12 D3D12.X runtime, command lists, resources, sparse memory gpu:both Code affects both AMD and NVIDIA GPUs (scope tag; see needs:*-test for remaining checks)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants