D3D12.X: a stream-out pipeline names the PC's target and depth formats #1716
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1716
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1716/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@b3IKK on GitHub · 2026-11-24 19:41 UTC · original
b3IKK:d3d12x/stream-out-formats-translated→main· +45 −8 · 1 files · 1 commits · closed without mergingAddresses
XCL-BT-036from #1488.translated_gs_pso(the two-pass mesh emulation of a console VS+GS pair) builds a pipeline stream for the driver and copied the console desc'sRTVFormatsandDSVFormatinto it verbatim — unlikepc_topology_type, which translates them on the plain-desc path. The console's116–120are its depth formats and the PC reads those codes as video formats (116=P208, …), and itsB5G5R5A1/B4G4R4A4targets (86/115) are madeR8G8B8A8by XCL's resource creation — so a stream-out pipeline that named them would be refused byCreatePipelineState, or disagree with the target XCL made.This moves the translation into one place,
pc_pipeline_formats, used bypc_topology_typeand by the stream-out subobjects (stream_out_formats).What is in it
crates/xcl/src/hle/d3d12x/real.rs: addpc_pipeline_formats()andstream_out_formats();pc_topology_typeuses the first,translated_gs_psothe second; add testa_stream_out_pipeline_names_pc_formats(fails with the translation removed:left: (116, 115, 86, 28), right: (10, 28, 28, 28)).Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1).\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 960 passed, 0 failed, 43 ignored (SKIPPED: the wave64 / direct-DXIL per-lane tests that need 64-lane hardware or a semantics mode this adapter refuses,no heap windows, andcannot disable the driver cache (Windows Developer Mode is required))cargo test -p xcl --lib a_stream_out_pipeline_names_pc_formats: 1 passed, 0 failedRegression run
main (
1d027e5, clean tree, no local changes):PR (
c1c7ab0, clean tree, no local changes):(A first run of this head, with the machine still compiling the suite, showed 1229 frames and
13 10 33; the quoted run is the one after it.)Not tested
AI use
XCL-BT-036against the code, wrote the fix and unit test (and confirmed the test fails without the translation), rebased onto1d027e5, ran the test suite andscripts/smoke.ps1regression runs with #677's title hashing, and drafted this PR description.@b3IKK on GitHub · 2026-11-24 21:53 UTC · original
Rebased onto
1d027e5and re-ran both with the current scripts/smoke.ps1 (#677's hashed itle: line): 960 passed, 0 failed, 43 ignored. The first smoke run of the new head ran while the suite was still compiling (1229 frames); the quoted one is the run after it.@DavidM1911 on GitHub · 2026-11-24 22:19 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
@JJAutoCompare on GitHub · 2026-11-25 04:20 UTC · original
XCL PR #1716 verification
Tested clean detached head
c1c7ab0028ac579ef8d885c268a46940a2fb1384on STOR-WINLAB. The diff changescrates/xcl/src/hle/d3d12x/real.rs.AMD Ryzen 7 3800X, Intel Arc A770 (16 GiB, driver 32.0.101.9175), Windows 11 Enterprise Evaluation x64 build 26200.
dxc.exe --versionreported 1.9.2609.5. Rust 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc), unoptimized profiles with debug info and incremental compilation disabled.Tested
cargo build --workspaceandcargo test --workspace --no-runboth succeeded outside the Arc lock.cargo test -p xcl --lib hle::d3d12x::real::console_format_query_tests::a_stream_out_pipeline_names_pc_formats -- --exactwithXCL_ADAPTER=NONE_CPU_ONLY, outside the lock. 1 passed, 0 failed, 0 ignored, 0 skip markers. The test verified RTV codes 116/115/86/28 convert to 10/28/28/28, DSV code 118 (D16S8) maps to PC D24S8 (45), and the target count and unusedUNKNOWNslot are preserved.cargo test --workspace --no-fail-fast -- --test-threads=4ran once insideInvoke-ArcTest.ps1withXCL_ADAPTER=A770andRUST_TEST_NOCAPTURE=1. Cargo exited 101. All 20test result:lines (19 test binaries and one doctest target) sum to 941 passed, 19 failed, 43 ignored. The PR test also passed in this run.Workspace failures and skips
CreateComputePipelineStateerror0x80070057. Four hit assertions on FMA overflow, implicit-LOD sampling, f16 high-half preservation, and pixel-shader wave reductions.e2e::test_title_runs_and_game_folder_is_untouchedfailed theRSSetDepthBiasXcheck: the top-right pixel was blue, expected green.pr1716-suite.logcontains 25 lines starting withSKIPPEDacross 15 tests. Reasons include unavailable wave64 (17 markers), three refused wave32 lowering cases, tiled tier below 2, inability to disable the driver cache, missing D3D12 debug layers, and unavailable heap windows. These cases provide no coverage.Not tested
Matched
mainbaseline, retail-title smoke runs, and other GPUs. The focused test covers descriptor conversion on the CPU. Hardware creation and execution of the affected stream-out pipeline were unverified, andXCL_SAMPLE_*inputs were unset.AI use
T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against
pr1716-suite.logand published.@b3IKK on GitHub · 2026-11-25 15:53 UTC · original
Closing as already done on
main. Rebasing it onto06c9f55showed that the same translation now happens at every site this PR touched:real.rs6039/6041 (the two-pass / stream-out path):pc_target_formatfor eachRTFormatsentry andpc_view_formatforDSVFormat- exactly what this PR'sstream_out_formatsadded;pc_topology_type6264-6267 translatesg.RTVFormatsandg.DSVFormatthe same way before it builds the stream.So the console's format codes no longer reach
CreatePipelineStatefrom a stream-out pipeline, which is what this PR was for. It came in through the laterpc_pipeline_formats/ integer-RT-blend refactors rather than as this change, so there is nothing to salvage here.AI use: OpenCode, Claude Fable 5.2 rebased it, read the current
maincode and wrote this.@DavidM1911 on GitHub · 2026-11-26 06:17 UTC · original
Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current
mainon the new head — needs another rebase before it can be tested.Pull request closed