D3D12.X: keep the FLAGS subobject of a console compute stream (#2607) #2683
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2693"
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?
Imported from ivall/xcl. Originally posted by kotekompotek on 2026-11-26T06:29:52Z.
Fixes #2607 (part of #2508).
stream_pipeline's console-CS branch projects aPIPELINE_STATE_STREAMonto a zeroedD3D12_COMPUTE_PIPELINE_STATE_DESC, mapping only the root signature (type 0), the shader (6) and the node mask (18). A FLAGS subobject (type 20) in the stream was dropped, so a compute PSO built through a stream desc always reacheddev_create_compute_psowithFlags0 - while the same title's legacyD3D12_COMPUTE_PIPELINE_STATE_DESCkeeps its flags. SinceFlagsfeeds the driver's PSO cache key (compute_blob_key/driver_cache::path_for), a stream-created PSO could also alias a legacy-created one with different flags.The graphics branch of the same function already forwards type 20, and no console-to-PC flag normalisation exists anywhere in the code, so the fix passes the subobject through verbatim the same way.
What is in it
crates/xcl/src/hle/d3d12x/real.rs:20 => put(&mut c.Flags, p)in the compute branch ofstream_pipeline, matching the graphics branch; a unit test that feeds a synthetic stream (console CS + FLAGS=1) through it and asserts the projected descriptor keepsFlags.Tested
cargo test -p xcl --lib a_compute_stream_keeps_its_flags_subobject: fails without the fix (Flagsstays 0), passes with it.cargo test --workspace --no-fail-fast -- --test-threads=4onab87bf62(parentb49be183, which merges cleanly): 1433 passed / 3 failed / 47 ignored, 357 GPU tests SKIPPED. The 3 failures are the known environment-bound ones (SM 6.5 / driver HRESULT / DXC barrier diff), same set as upstreamb49be183- details under Not tested.Regression run
Run under load-matched conditions on
D:\GTA6.Xbox.v1.0.2.1,-Seconds 0(the only window that reliably precedes the title's entry-point int3 on this hardware), both binaries release-built.Main
b49be183:PR head
ab87bf62:Not tested
AI use
Devin (SWE-2 High) implemented the fix and test, ran the suite and smoke runs, and wrote this PR.
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T06:57:59Z.
RX 6800M verification at PR head
ab87bf620d811915898eabfaa185164070d11dd0against current mainb49be1836844fe0b0cdb3211dce3cb7fb4e21ac7(Windows 11, AMD driver30.0.13002.13003, Rust 1.99.0 MSVC):cargo test --locked -p xcl --lib a_compute_stream_keeps_its_flags_subobject -j 1 -- --test-threads=1 --show-output: 1 passed, 0 failed, 0 ignored, 1,336 filtered. This exercises the synthetic compute stream with FLAGS.cargo build --locked --release -p xcl -j 1: passed; head executable SHA-2561F41990B09FCE382DCD9180E5FC7CEB1F27B8DBAAB72C86EBE5E3C3D8ABF3FE5.scripts/smoke.ps1 -Seconds 12, pinnedXCL_ADAPTER=6800Mand separate data/DXIL cache directories, on the same locally owned title build (hash2ef5fd64):b49be183ab87bf620x00x0The title launched and presented frames on this AMD card. This short startup smoke does not establish that the title submitted a compute stream with nonzero FLAGS, and it does not cover world load or a performance comparison. I did not run the full workspace suite on this head. AI-assisted test report with Codex.
Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-26T07:00:08Z.
Tested (independent run, synthetic only): PR head
ab87bf620d811915898eabfaa185164070d11dd0vs its parentb49be1836844fe0b0cdb3211dce3cb7fb4e21ac7.cargo test --workspace --locked -j 4 --no-fail-fast -- --test-threads=4:b49be183: 1434 passed, 1 failed, 47 ignoredab87bf62: 1435 passed, 1 failed, 47 ignoredgpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1,seed 722: res[30] = 0x1, CPU 0x7fffffff.f16_programs_on_the_gpuand 2xf32_programs_on_the_gpu(refused, #1426 semantics), andheap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows). These are not counted as coverage.cargo test -p xcl --lib a_compute_stream_keeps_its_flags_subobject: passes on the head. Control: on the parent with only that test applied (the one-line20 => put(&mut c.Flags, p)absent) it fails withthe FLAGS subobject must reach the projected compute desc(left 0, right 1).Not tested
AI use
Claude Code (Claude Sonnet 5.5) ran the tests and wrote this report, coordinated by Codex (gpt-6.2-sol).
Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-26T06:50:56Z.
Tested on the Linux/Wine lane, full standard env (AMD rig: Ryzen 9 9900X, 96 GB DDR5, RX 7900 XT 20 GB, Arch kernel 7.2.15, Mesa 26.2.5 RADV, wine-11.0 Proton, rustc 1.94.0;
d3d12,d3d12core,dxgi,d3d11,d3d10core=n,boverrides, official DXC kit,VKD3D_CONFIG=ignore_shared_fence, threads=2), headab87bf62, mergeable against mainb49be183:non-gpu suite (
--skip gpu::): 598 passed, 2 failed, 4 ignored, 733 filtered.The failure set is identical to bare main
b49be183measured on the same rig the same day (596 passed, 3 failed): gpu_promoted_uav_clear (our #2490), xma2_source_voice (#2481, vendored-FAudio gate). The third red, the sparse tile video-memory test, is a known batch flake (green solo; it did not reproduce in this run).Zero delta from this PR; every test it adds passes inside the suite.
Not tested: gpu suite, Windows native.
Correction: an earlier version of this row reported three extra reds; those runs lacked the
d3d12,d3d12core=n,bDLL overrides and hit stub-DLL NOTIMPL artifacts. Re-ran with the standard env, artifacts gone.AI use: Hermes agent (local Qwen-class) ran the tests and drafted this; I checked it before posting.
Imported from ivall/xcl. Originally posted by sage-sage on 2026-11-26T07:05:49Z.
Test report: passes on NVIDIA. Exact head
ab87bf62(its base is currentmainb49be18, so head = merged).Tested
cargo test --workspace -- --test-threads=4: 1436 passed, 0 failed, 47 ignored;a_compute_stream_keeps_its_flags_subobjectpassesmainon this machine): 21 wave64 tests (NVIDIA is wave32 only), 3 per-lane wave32 f16/f32 forms (refused), 3 D3D12 debug layer (d3d12SDKLayers.dllnot installed), 1no heap windows, 1pso_measurement_compiles_an_exact_synthetic_record(Developer Mode off)20 => put(&mut c.Flags, p)line taken out (local only): the new test fails (the FLAGS subobject must reach the projected compute desc), so it covers the fix.Not tested
Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
Imported from ivall/xcl. Originally posted by relativespace2K on 2026-11-26T07:36:04Z.
Tested - retail title on native Windows AMD RDNA2, PR head
ab87bf620d811915898eabfaa185164070d11dd0onmainb49be1836844fe0b0cdb3211dce3cb7fb4e21ac7Tool: OpenCode with DeepSeek V4.1 Flash 1017
Windows 11 IoT Enterprise LTSC 26100; release build; DXC 1.9.2602.17.
cargo test --release -p xcl --lib -- a_compute_stream_keeps_its_flags_subobject --nocapture:1 passed, 0 failed, 0 ignored, 0 skipped, 1336 filtered out.
XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_FRAME_DUMP=1 XCL_RUN_SECONDS=240, no other XCL_* variables; warm shader/pipelinecaches.
main(warm)The first PR run rebuilt the compute PSO cache now that FLAGS is in the key: 658 s of
driver compiles and a 35.2 GB peak. The warm repeat normalized to 31.7 GB peak and 210 s
of compiles, against 183 s on
main- within run-to-run variance. No crash, no error,0 failed pipelines, 0 DXIL failures; 40 mesh refusals on both trees. The title still
stalls on its loading screen (last present around 100 s), so there is no world or FPS
comparison in this window.
Not tested: full workspace, NVIDIA, debug build, world/FPS runs.
AI use: OpenCode with DeepSeek V4.1 Flash 1017 ran the tests, read the logs and wrote this comment; the figures and crash lines were checked against the run logs.
Imported from ivall/xcl. Originally posted by jennydeth on 2026-11-26T15:25:20Z.
Windows / NVIDIA results for
ab87bf6with the retail title (1.0.2.1) on an RTX 3060 12 GB.Regression run (default settings, 600 s)
mainb49be18:This PR,
ab87bf6:main's 2,047 (95 %) and peak commit of 35,709 MB against 35,859 MB (100 %), with no removal and no crash in either. Neither run reaches the world: presents stop at 100.3 s onmainand at 94.4 s with this PR, while big compute programs are still compiling.mainin the pair, and 49 against 55 in the direct DXIL runs. Nothing is logged when a compute stream carries a FLAGS subobject, so I can't say whether this title's streams have one.XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_DRED=1, warm caches, 900 s): the device was lost (0x887a0005, #2403) at 113.9 s, last present at 110.2 s, with the same DRED line as onmain(page fault at GPU VA 0x0; allocations there: []; recently freed: []). Threeb49be18runs today with the same switches lost it at 110.6, 211.2 and 216.0 s, so one run can't tell this PR apart frommainthere.Tested
stable-x86_64-pc-windows-msvc); release; DXC 1.9.2609.5.cargo test --workspace --release --no-fail-fast -- --test-threads=4onab87bf6: 1436 passed, 0 failed, 47 ignored. SKIPPED (29): 21 × no wave64; 3 × per-lane form refused; 3 × no D3D12 debug layer /d3d12SDKLayers.dll; 1 × no heap windows; 1 ×pso_measurement_compiles_an_exact_synthetic_record(cannot disable the driver cache).scripts/smoke.ps1 -Game <folder>(XCL_NETWORK=0), the same scripted pad presses into the story load in every run;XCL_FRAME_DUMP=300in the pair,100in the direct DXIL runs. Every run was of a copy namedxcl-noprofile.exe: this machine has #2590's 1 GiB shader-heap profile onxcl.exe, and a copy under another name does not match it.Not tested: whether the title's compute streams carry nonzero flags (no log line); AMD / wave64.
AI use: Claude Code (Claude Opus 5.5) built the commit, ran the suite and the runs on my machine, read the logs and wrote this.
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T02:14:06Z.
Independent desktop NVIDIA verification of PR #2693 at head
ab87bf620d811915898eabfaa185164070d11dd0(1commit; exact parent & merge-base:b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7, pre-#2555ancestor ofmain).Environment
7956 MiBreported by D3D12), driver32.0.16.2114(NVIDIA621.14, WDDM 3.2)31.9 GiBusable), Windows 11 Home26200(Developer Mode off)rustc 1.100.0 (0ef1bc386 2026-11-09)MSVC, DXC1.9.2609.5,--releaseTargeted release tests & build (
ab87bf62)cargo test --release -p xcl --lib a_compute_stream_keeps_its_flags_subobject -- --nocapture(3 consecutive runs)1 passed; 0 failed; 0 ignored; 1336 filtered out× 3 (0.02s× 3,0skipped)cargo test --release -p xcl --lib hle::d3d12x::real:: -- --test-threads=1(3 consecutive runs)61 passed; 0 failed; 0 ignored; 1276 filtered out× 3 (1.91s,1.89s,1.91s,0skipped)cargo build --release -p xcl1m 08s, exit0,0new warnings)Paired quiet 60 s retail smoke (
title: 29640639)Exact parent & merge-base (
b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7, cached baseline on the same machine):PR #2693 (
ab87bf620d811915898eabfaa185164070d11dd0):Runtime log observations (
xcl.log)9221log lines,0[ERROR]/ device-removal / panic lines.19450 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample14011 MB committed by the process; video memory 6116 MB local, 4684 MB non-local.Limits of coverage
FLAGSsubobject in a console compute pipeline stream was verified directly viaa_compute_stream_keeps_its_flags_subobject(3/3) andhle::d3d12x::real::(61/61× 3,0skipped).title: 29640639confirms zero runtime regression on compute pipeline stream creation (frame-count delta vs. cached parent reflects single-run startup variance, not this PR).AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).
Imported from ivall/xcl. Originally posted by johnbf8x on 2026-11-30T02:07:33Z.
merge-check
base:
53e85fb124head:
ab87bf620dmerge: clean but empty: git merge --no-commit --no-ff onto origin/main stages no change. The PR's diff against its merge base has the same stable patch id (git patch-id --stable: 680ce539ded47f988ef2450ef5d1668c3b60fd06) as main's
1a6389d2"D3D12.X: preserve compute stream pipeline flags", which main got through the merge of #2959 (b0b041fd). main has both the20 => put(&mut c.Flags, p)line and the test a_compute_stream_keeps_its_flags_subobjectbuild: not run: the merge result is main itself
tests: not run for the same reason; main
53e85fb1on this PC: 137 passed, 2 failed (the two D3D12 debug-layer e2e tests, no debug layer here), 20 ignored outside the libreview: none needed beyond the above: nothing of this PR is left to merge
performance: none: no change
verdict: not yet: nothing to merge; already in main through
1a6389d2(#2959), so this PR can be closedhardware / tool and model: NVIDIA GeForce RTX 3070 Ti 8 GB (driver 621.40), Intel Core i7-12700K, Windows 10 Pro 19045, rustc 1.100.0 / Claude Code, Claude Opus 5.5
Imported from ivall/xcl. Originally posted by brainhay5 on 2026-11-30T02:18:38Z.
merge-check claim
head:
ab87bf620dImported from ivall/xcl. Originally posted by brainhay5 on 2026-11-30T02:25:19Z.
merge-check
base:
9335bc0d86head:
ab87bf620dmerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2800 passed, 2 failed, 50 ignored; 32 SKIPPED lines
failing: hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline
failing: test_title_runs_and_game_folder_is_untouched
both also fail on the base alone: run individually on
9335bc0d(no PR), same two, same result — neither is caused by this PRreview: one file (hle/d3d12x/real.rs), +44/-0.
stream_pipeline's console-CS branch now maps subobject type 20 (FLAGS) into the projected D3D12_COMPUTE_PIPELINE_STATE_DESC, which previously always arrived at dev_create_compute_pso with Flags 0. The added test asserts Flags is 0 when the subobject is absent and 1 / 3 when present, so it fails without the change. No scope creep, no change to any other subobject, no behaviour change when FLAGS is absent. #2607 is still open and this is the PR queued for it in #3041; no other open PR references it.performance: none by default — one extra match arm per stream-pipeline parse, no allocation, no new GPU work.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 610.88 (32.0.16.1088); Ryzen 7 5800X3D, 64 GB; Windows 11 22631; OpenCode agent, DeepSeek V4.1 Flash 1017
Imported from ivall/xcl. Originally posted by johnbf8x on 2026-11-30T03:11:58Z.
@brainhay5 thanks for the check. One thing to add: this PR's change is already on main, as
1a6389d2("D3D12.X: preserve compute stream pipeline flags", merged through #2959). That is why the merge comes out clean: it adds nothing. main already has the20 => put(&mut c.Flags, p)arm and thea_compute_stream_keeps_its_flags_subobjecttest.To see it:
git merge --no-commit --no-ff ab87bf6on main stages no change, and the PR's diff against its merge base has the same stable patch id as1a6389d2(git patch-id --stable: 680ce539…).So I think this one can be closed rather than merged.
Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-30T15:31:29Z.
merge-check claim
head:
ab87bf620dImported from ivall/xcl. Originally posted by Pipodi on 2026-11-30T15:34:55Z.
merge-check
base:
9dfbe3ea66head:
ab87bf620dmerge: clean but empty (git merge --no-ff onto origin/main stages no change; the PR's diff against its merge base
b49be183has stable patch id 680ce539ded47f988ef2450ef5d1668c3b60fd06, identical to main's1a6389d2"D3D12.X: preserve compute stream pipeline flags")build: cargo build --workspace on main
9dfbe3ea(the merge result is main itself) -> oktests: the full suite was not rerun: the merge result is main, so it would only measure main. On main, a_compute_stream_keeps_its_flags_subobject: 1 passed. With the
20 => put(&mut c.Flags, p)arm removed (temporary, restored): it fails, "the FLAGS subobject must reach the projected compute desc".review: the two earlier checks disagree on one point: johnbf8x says the PR is already in main (empty merge), brainhay5 says the merge is clean with +44 lines to merge. Settled: johnbf8x is right. brainhay5's "clean" is true but the merge adds nothing; main has the arm at real.rs:10658 and the test (real.rs map_tests), via
1a6389d2(#2959). The diff is correct against the local GDK 261000: D3D12_PIPELINE_STATE_SUBOBJECT_TYPE_FLAGS follows CACHED_PSO (xbox/include/gen9/d3d12_xs.h:14218; GDK docs d3d12_pipeline_state_subobject_type.md:43,79), i.e. 20, and maps to the compute desc Flags. Nothing of this PR is left to merge; #2607 can be closed with1a6389d2.performance: none: no change.
verdict: not yet: nothing to merge, already in main through
1a6389d2(#2959); close the PRhardware / tool and model: NVIDIA GeForce RTX 4090, driver 621.40; i9-13900K; Windows 11 Pro 10.0.26300; rustc 1.100.0; debug. AI use: Claude Code, Claude Opus 5.5
Imported from ivall/xcl. Originally posted by throny on 2026-11-30T20:10:41Z.
Closing: this change is already on
mainas commit1a6389d2(brought in byb0b041fdMerge pull request #2959 from bmjask/stack/308-benchmark-thre). This PR's diff applies in reverse cleanly on currentmain(ff0c364b), so merging it would change nothing. If something here is not onmain, say so and reopen it, or ask and I will.AI use: Claude Code (Claude Opus 5.5) checked this; part of the duplicate sweep on #3041.
Pull request closed