Repository navigation
Conversation
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>
… subobject numbers Above type 22 a console stream numbers its subobjects differently from the PC (23 AS, 25-29 options and limits, 100-102 the PC's DEPTH_STENCIL2 / RASTERIZER1 / RASTERIZER2). Read with the PC table, a 25 desyncs the offsets, a 26/27/28 overwrites the depth-stencil and rasterizer state with option and limit words, and a 23 or 29 ends the parse, so every subobject after it (blend, RT and DSV formats) was lost. A stream that holds a console shader (types 1-6, 23, 24, before the first type >= 25) and a type >= 23 is rewritten once, at the entry points (stream_pipeline, translated_graphics_stream_once, translated_mesh_stream_once, stream_has_unreadable_shader, fallback_stream, capture_stream_desc), into the PC's numbering that the existing code reads: - dropped: 23 with empty bytecode, 25, 27, 28, 29; - 100 / 101 / 102 become 26 / 27 / 28; - 26 is dropped too: its layout is not known yet, so its depth-stencil semantics are not applied; its bytes are logged once; - 24 is left as it was (xcl-dev#541 / xcl-dev#630 own the AS / MS numbers); - a stream with a non-empty 23 is not rewritten (renumbering it would collide with 24) and is parsed as before; logged once. Other streams, and subobject_payload (xcl-dev#2006), are unchanged. The detection is a heuristic: a console stream whose shaders all come after a type >= 25 is not rewritten. own_stream and record_mesh_stream still use the PC table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Ran the console stream subobject tests at Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5, debug build. All three new tests pass, covering console subobject numbering above type 22. They are CPU-side stream-parsing tests. The author ran the full workspace suite on an RTX 2070 SUPER; this adds a Blackwell desktop datapoint for the focused tests. The PR has no comments yet. Not tested: the full workspace suite here, a paired smoke run, a retail title, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data. AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used. |
|
Stacked on #3138, which is its first commit (71a9023, the console subobject table and logging); only the top commit 8462a9d belongs here. #3137 changes the pipeline-state flags, a different change. No other open PR renumbers console subobjects. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
|
Review (head 8462a9d, diff read, not a merge-check; draft, stacked on #3138):
Fine: 100-102 -> 26-28 keep the PC sizes (60 / 44 / 40) and 8-byte alignment, and an unknown type falls back to main's parse. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point. |
Stacked on #3138; only the top commit belongs here. This fix assumes #3138's reading of the console's subobject numbering is right. #3138 only logs the type sequences of titles' streams and checks their sizes under both tables; until its log from a title shows the console table matches, this PR is a guess built on it, and it changes with whatever #3138 finds.
Status: a guess that needs evidence before it can be merged. The console's subobject numbering above type 22 is reasoned from how titles call the API and from the PC's D3D12; it is not taken from any console documentation, and no title has confirmed it yet. Draft until then.
Evidence that would confirm it: #3138's log lines from a title (
pipeline stream uses subobject types above 22), where the sizes add up under the console table and not under the PC's. The retail game used for the regression run does not get there.If you run a title that gets there, please post those lines here (not the whole log, which names your paths).
Above type 22 a console stream numbers its subobjects differently from the
PC (23 AS, 25-29 options and limits, 100-102 the PC's DEPTH_STENCIL2 /
RASTERIZER1 / RASTERIZER2). Read with the PC table, a 25 desyncs the offsets,
a 26/27/28 overwrites the depth-stencil and rasterizer state with option and
limit words, and a 23 or 29 ends the parse, so every subobject after it
(blend, RT and DSV formats) was lost.
A stream that holds a console shader (types 1-6, 23, 24, before the first
type >= 25) and a type >= 23 is rewritten once, at the entry points
(stream_pipeline, translated_graphics_stream_once, translated_mesh_stream_once,
stream_has_unreadable_shader, fallback_stream, capture_stream_desc), into the
PC's numbering that the existing code reads:
dropped: 23 with empty bytecode, 25, 27, 28, 29;
100 / 101 / 102 become 26 / 27 / 28;
26 is dropped too: its layout is not known yet, so its depth-stencil
semantics are not applied; its bytes are logged once;
24 is left as it was (D3D12.X: a console MS in the AS slot is translated as the mesh shader it is #541 / D3D12.X: a console MS at subobject 24 is the stream's MS #630 own the AS / MS numbers);
a stream with a non-empty 23 is not rewritten (renumbering it would
collide with 24) and is parsed as before; logged once.
Other streams, and subobject_payload (#2006), are unchanged. The detection is a
heuristic: a console stream whose shaders all come after a type >= 25 is not
rewritten. own_stream and record_mesh_stream still use the PC table.
Stacked on #3138; only the top commit belongs here.
What is in it
crates/xcl/src/hle/d3d12x/null.rs: +2 / -0crates/xcl/src/hle/d3d12x/real.rs: +137 / -7new tests:
console_type_23_is_dropped_only_when_empty,console_stream_types_above_22_do_not_desync_the_parse,console_type_27_leaves_the_rasterizer_alone_and_101_sets_itTested
NVIDIA RTX 2070 SUPER (driver 32.0.16.2140), AMD Ryzen 5 3600XT, Windows 11 build 26300, Rust 1.100.0 MSVC; tests in debug
cargo test --workspace --no-fail-fast -- --test-threads=4on8462a9d4(built onmain336fddda; it merges into the currentmaine429936cwithout conflict): 2126 passed, 10 failed, 48 ignored, 25SKIPPEDlines (21 no wave64, 3 gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426, 1 no heap windows).The suite shows one more failure than the others,
hle::d3d12x::alloc_pool::tests::submit_marking_calls_out_unlocked_and_revalidates_the_queue_marker("fence creation must run outside STATE"). It passes 3 of 3 alone and the wholealloc_poolmodule passes (23 of 23); this change touches onlynull.rsandreal.rs, so I take it for a flaky test (a race on a shared lock), not this change.console_type_23_is_dropped_only_when_empty: ok in that runconsole_stream_types_above_22_do_not_desync_the_parse: ok in that runconsole_type_27_leaves_the_rasterizer_alone_and_101_sets_it: ok in that runRegression run
Both 60-second runs used the same warm DXIL cache directory.
Not tested
Full preparation. The smoke runs used
XCL_PREPARE=0.A title whose stream carries console subobject types 23-29 / 100-102: none logged. Type 26 has no known layout here: it is skipped and its raw bytes are logged.
AMD and Intel GPUs; wave64 hardware (the RTX 2070 SUPER is wave32).
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