D3D12.X: give the queue-specific barrier layouts their resource states #839
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!839
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-839"
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?
@mastrr9 on GitHub · 2026-11-24 06:39 UTC · original
mastrr9:fix/d3d12x-barrier-layout-states→main· +48 −11 · 1 files · 1 commits · openExtends
device_x::layout_state()(used byCreateCommittedResource#127 andCreatePlacedResourceX#133 when creating resources with aD3D12_BARRIER_LAYOUT) to mapSHADING_RATE_SOURCE(11) and allDIRECT_QUEUE_*/COMPUTE_QUEUE_*layouts (18–29) to their legacyD3D12_RESOURCE_STATESequivalents instead of falling back toCOMMON.COMPUTE_QUEUE_SHADER_RESOURCE(27) toNON_PIXEL_SHADER_RESOURCE(0x40),DIRECT_QUEUE_SHADER_RESOURCE(21) toALL_SHADER_RESOURCE(0xC0),SHADING_RATE_SOURCE(11) to0x100_0000, and the remaining direct/compute queue layouts (GENERIC_READ,UNORDERED_ACCESS,COPY_SOURCE,COPY_DEST) to their corresponding states.barrier_layouts_become_resource_statesverifying every layout constant by name against thewindowscrate definitions.Tested
617.42/32.0.16.1742), Windows 11 Pro 25H2 (26200.9974),rustc 1.100.0 (0ef1bc386 2026-11-09)MSVC debug, DXC Windows SDK10.0.26100.0,d3d12SDKLayers.dllinstalledba90058f7c5017469e2acd411aa0dd61ae6fc343cargo build --workspace: clean (only pre-existingfetch_updatedeprecation warning)cargo test --workspace -- --test-threads=4: 714 passed, 0 failed, 41 ignored (new testhle::d3d12x::device_x::tests::barrier_layouts_become_resource_statespassed)SKIPPEDGPU tests:gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64,gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64Regression run
Smoke run by @CuteBooty in comment below: #839
Contributed by a community tester; the PR author did not run it. Both blocks are pasted as posted.
main:
PR:
Tester's setup: RTX 3070 8 GB (32-lane waves), NVIDIA 621.24; Ryzen 5 3600, 32 GB; Windows 11 Pro 26200; rustc 1.100.0 MSVC; release build.
Tester's method:
scripts\smoke.ps1 -Game <folder> -Seconds 60, no input, on this PR's head as it is and onmainbeaa245, the commit it branches from, each from a clean checkout. Each build ran twice back to back; the blocks are the second runs. Themainblock is shared with the tester's reports on other PRs of the same base.Tester's AI use: Claude Code (Claude Opus 5.5) made the runs with the tester present and wrote the report from the script's output.
Not tested
AI use
@futurepro62 on GitHub · 2026-11-24 07:06 UTC · original
Full-suite run, since this PR has no test report yet. Tested exact head
ba90058(on its basebeaa245).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 714 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.barrier_layouts_become_resource_states.Not tested
AI use
@SlopTart on GitHub · 2026-11-24 07:17 UTC · original
Linux / AMD RDNA3 datapoint.
Merged state: head
ba90058onto maina1672ef, clean merge.Full suite,
cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 709 passed, 7 failed, 41 ignored. Failures are the known Wine-lane set from my #42 rows plus #718 trio members; nothing here fails because of your change. Queue-specific barrier layout tests green; no new failures.Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.
Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross
x86_64-pc-windows-gnu,XCL_NETWORK=0, release profile,--test-threads=4. Linux rows: #42 / #718.AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
@CuteBooty on GitHub · 2026-11-24 19:41 UTC · original
Regression run on a retail title for
b904fda: pass (no device removal, no crash, frames and peak commit within the check's limits).Tested
scripts\smoke.ps1 -Game <folder> -Seconds 60, no input, on this PR's head as it is and onmainbeaa245, the commit it branches from, each from a clean checkout. Each build ran twice back to back; the blocks are the second runs. Themainblock is shared with my reports on other PRs of the same base.main:
this PR:
Not tested
mainmerged in, AMD and Intel GPUs.AI use
@JJAutoCompare on GitHub · 2026-11-25 05:57 UTC · original
Empirical test report (
b904fda4)Verified PR #839 at commit
b904fda4535b225f2feabe62fd41cbc68d489680.Hardware / environment
1.100.0 (0ef1bc386 2026-11-09). DXC1.9.2609.5 (01b62ad47).XCL_ADAPTER=NONE_CPU_ONLYandRUST_TEST_NOCAPTURE=1, outside the Arc test wrapper.Commands and results
cargo test --workspace --no-runexited 0 and built the workspace test executables. The compiler emitted a deprecation warning forAtomicU32::fetch_updatein XGameRuntime.cargo test -p xcl --lib hle::d3d12x::device_x::tests::barrier_layouts_become_resource_states -- --exactexited 0. The fixture log recorded 1 passed, 0 failed, 0 ignored, 0SKIPPEDlines, and 693 filtered out.Observed behavior
The fixture called
layout_statedirectly and all assertions against D3D12 resource state constants passed. Direct-queue shader resources mapped to all shader stages and compute-queue shader resources mapped to non-pixel shader access. Both queues' generic-read, unordered-access, copy-source and copy-destination layouts mapped to their corresponding legacy states. The shading-rate-source layout mapped to its dedicated state. Undefined and the queue-common cases covered by the fixture mapped toCOMMON. The fixture requires no D3D12 device.Not tested
The full GPU workspace suite and game smoke runs were omitted. The focused run exercised the translation function only. Resource creation and runtime barrier behavior on a D3D12 device remain unverified.
AI use
Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against
pr839-focused.logand published.@DavidM1911 on GitHub · 2026-11-25 10:27 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.