Tests: a console compute shader through the D3D12.X PSO hook, dispatched and read back #78
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!78
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/78/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?
@gefydev on GitHub · 2026-11-23 01:34 UTC · original
gefydev:compute-e2e→main· +208 −15 · 2 files · 1 commits · merged 2026-11-23 10:29 UTCA test with no synthetic shortcut between the title and the GPU:
crates/xcl/tests/gpu_compute_e2e.rsbuilds a console compute shader in the retail container layout (DXBC with a DXIL part, XDAT, XBCH/zlib, FSSM with the CS stage descriptor and COMPUTE_PGM_RSRC2) and gives it toCreateComputePipelineStateon the backend device, as a title would. Then it dispatches the PSO the hook built and checks the memory.The program is wave64, 128 threads per group (two waves). Each thread writes its global (x, y) from TGID and the thread ids, then reads the value of the mirrored thread through LDS after
s_barrier, which is in the other wave. The test waits for the background build (pso_async::resolve_wait) and requirestranslated_pipelinesto go up by one, so it cannot pass on a stand-in or a fallback.runner::dispatchis split so that its body is reusable:dispatch_on(dev, pso, rs, ...)runs a pipeline and root signature built elsewhere.dispatchitself is unchanged.On a 32-lane GPU this test needs #70. Without it, the driver rejects the pipeline:
Validation on Windows 11, GTX 1650 (driver 32.0.16.2124), full workspace with
--no-fail-fast:I don't have an RDNA card, so it is not run on a native wave64 GPU yet.
It merges cleanly with #70, #71 and #72 in either order.
github-bot referenced this pull request2026-11-26 04:19:41 +00:00
@certified-retart on GitHub · 2026-11-23 02:15 UTC · original
Tested
31a4001on Windows 10 (D3D12 Agility SDK 1.620.2 / DXC 10.0.26100.0) across both wave64 AMD and wave32 NVIDIA GPUs:XCL_ADAPTER=1,XCL_REQUIRE_GPU=wave64): PASS (1 passed; 0 failed, 0.38s,4260 B DXIL).XCL_ADAPTER=0):0x80070057— driver rejects the[WaveSize(64)]compute PSO andgpu_compute_e2edoes not skip on wave32-only adapters).recomp-compute-wave32) merged: PASS (1 passed; 0 failed, 0.53s,4376 B DXIL).Head's up on merge order: either merging PR #70 before #78, or skipping when the adapter lacks wave64 without wave32 compute translation, will keep
cargo testgreen on NVIDIA GPUs.@ivall on GitHub · 2026-11-23 10:29 UTC · original
Merged. On a native wave64 GPU (RX 9070) it passes, and also with
XCL_SPLIT_WAVE64=1: #67 (merged instead of #70) runs wave64 compute on 32-lane GPUs, so it should pass on NVIDIA now too. Your 16×8 group also exercises a fix found on AMD: the driver lays 2-D groups out in 2×2 quads, so the native form now hands console thread ids to waves in arrival order (46a1c3f). Tested on Windows 11 with an RX 9070 (RDNA4):cargo test --workspacegreen with the retail samples (shader pack, console DLLs, texture archive), also withXCL_SPLIT_WAVE64=1(the 32-lane split path forced on RDNA). Unicorn Overlord and XDefiant run with this round merged. Thanks!