Tests: verify desc::image_d3d12 and sampler_d3d12 against D3D12 #540
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!540
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-540"
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?
@amazedturnip on GitHub · 2026-11-24 01:34 UTC · original
amazedturnip:xcl/tests-desc-d3d12-srv-and-sampler-debug-layer-con-012601→main· +431 −0 · 1 files · 1 commits · openAdd an integration test (
crates/xcl/tests/desc_d3d12_e2e.rs) that exercisesgpu::desc::image_d3d12andgpu::desc::sampler_d3d12against real D3D12CreateCommittedResource,CreateShaderResourceView, andCreateSamplercalls across allImageTypevariants, mip/slice subranges, RGBA/BGRA/BC formats and swizzles, and sampler filter/reduction/comparison modes, checkingID3D12InfoQueue/ID3D12InfoQueue1when the D3D12 debug layer is installed.What is in it
crates/xcl/tests/desc_d3d12_e2e.rs: add e2e test exercisingCreateCommittedResource,CreateShaderResourceView, andCreateSamplerfordesc::image_d3d12anddesc::sampler_d3d12across allImageTypevariants, mip/slice subranges, RGBA/BGRA/BC formats and component swizzles, and sampler filter/reduction/comparison modes, asserting zeroID3D12InfoQueue/ID3D12InfoQueue1errors when the D3D12 debug layer is presentTested
AMD Radeon(TM) Graphics (driver 32.0.21043.19003, DXC 1.9.2609, native wave64),XCL_ADAPTER=radeon):cargo test --workspace -- --test-threads=2— 681 passed, 0 failed, 41 ignored (SKIPPED GPU tests: none)Not tested
AI use
github-bot referenced this pull request2026-11-26 04:59:09 +00:00
@futurepro62 on GitHub · 2026-11-24 01:50 UTC · original
Tested exact head
5d7f6e1on NVIDIA and an AMD iGPU with the D3D12 debug layer installed (Graphics Tools), so theID3D12InfoQueuechecks and the negative control that Not tested lists ran.Tested
cargo test -p xcl --test desc_d3d12_e2e -- --nocapture, 3 runs each withXCL_ADAPTER=nvidiaandXCL_ADAPTER=radeon: 1 passed, 0 failed every time. The log showsD3D12: debug layer enabledandbackend 'real'on the adapter asked for.error, id 32:CreateShaderResourceView: The ViewDimension in the View Desc is incompatible with the type of the Resource..\scripts\test.ps1(noXCL_ADAPTER, RTX 5070 Ti): 681 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.Observations
error, id 232: ID3D12Device::RemoveDevice: Device removal has been triggered ... (DXGI_ERROR_INVALID_CALL ...). The test still passes because nothing uses the device after step 4. The device is XCL's shared backend device (real::device_raw()), so a test added to this file later, or run after this one in the same process, would get a removed device. I did not checkGetDeviceRemovedReasonmyself; this is from the debug layer's message.warning, id 1361fromCreateSampler2:ComparisonFuncisALWAYSwith non-comparison filters (MIN_MAG_MIP_LINEAR,ANISOTROPIC,MINIMUM_MIN_MAG_MIP_LINEAR,MAXIMUM_ANISOTROPIC). Warnings only; the test checks errors.Not tested
XCL_SAMPLE_*unset).AI use
@amazedturnip on GitHub · 2026-11-24 01:56 UTC · original
Addressed both observations from @futurepro62:
ID3D12Devicecreated on the same adapter LUID (create_adapter_device) with its ownID3D12InfoQueue/ID3D12InfoQueue1and descriptor heap, and addeddev.GetDeviceRemovedReason().is_ok()to confirmreal::device_raw()remains healthy.id 1361): Changedcompare_funcfrom7(ALWAYS) to0(NEVER) on the four non-comparison sampler test cases (comparison = false).Re-ran
cargo test -p xcl --test desc_d3d12_e2e -- --nocapturewithXCL_ADAPTER=radeon: 1 passed, 0 failed, 0 ignored (note: Graphics Tools / D3D12 debug layer is unavailable on this host,0x887A002D, so the debug-layer InfoQueue/negative-control path was not exercised locally).@MonkeyPython on GitHub · 2026-11-24 02:11 UTC · original
NVIDIA data point (the author excluded NVIDIA for VRAM hygiene; 12 GB is well clear of it): the desc verification passes on an RTX 3080 Ti with the debug layer active.
Setup: Windows 11 Pro 26300, Ryzen 7 7800X3D, 32 GB, RTX 3080 Ti 12 GB (driver 621.01), PR head
5d7f6e1, release build.Run:
cargo test -p xcl --release --test desc_d3d12_e2e -- --test-threads=4→desc_d3d12_srv_and_sampler_debug_layer ... ok, 1 passed / 0 failed / 0 ignored in 0.34 s. No D3D12 InfoQueue errors in the test output.Not tested: Intel, WARP, other NVIDIA cards.
AI use: Gentle Shell (Pi coding agent), model qwen4-max: ran the test and wrote this report from the log; a human reviews it before posting. No code changes.
@ecnarc on GitHub · 2026-11-24 02:43 UTC · original
On exact head
d665f505c49d8f8071bf8eeea2a4c45ffe558afe, I reproduced the shared-device health failure on an RTX 3090 with the D3D12 debug layer enabled. The subprocess-isolation patch below passes the focused test and the default full workspace suite on the same machine.Cause and proposed fix
create_adapter_device()enumerates the same adapter LUID and callsD3D12CreateDevice. Microsoft documents that this returns the existing per-adapter device in the current process. A new DXGI factory does not isolate the negative control.The patch runs the invalid SRV in a child invocation of this test executable, passing the parent's adapter LUID and using the existing Agility helpers for debug configuration and device creation. It requires the child InfoQueue, a clean setup error queue, a captured validation error, successful exit, and a completion marker. It preserves the positive cases and the parent's device-health assertion. Only
crates/xcl/tests/desc_d3d12_e2e.rschanges; the patch was tested as an uncommitted change on the exact head above.Tested
32.0.16.2124; Rust1.100.0MSVC; DXC/DXIL1.8.2502.11; debug build.XCL_ADAPTER=3090,XCL_REQUIRE_GPU=mesh.shared backend device should remain healthyat line 348.Commands:
Reported GPU skips, both
no wave64:gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_maskgpu::recomp::tests::gpu_wave32_program_in_wave64_hardwareThese skips are included in Cargo's passed count, separately from the 41 ignored. Optional sample-data tests also returned early; the log explicitly reports missing
XCL_SAMPLE_RPF,XCL_SAMPLE_TTPF, andXCL_SAMPLE_AWC. The existing compiler deprecation and debug-layer shutdown warnings remain.Not tested
AMD/Intel, native wave64 hardware, Agility SDK configuration, release build, debug-layer-unavailable/GPU-unavailable patch paths, the 41 ignored tests, retail titles or retail sample-data coverage. The descriptor test validates creation/error reporting, not shader sampling or rendering. The unpatched full workspace suite was not run for this report.
AI use
ChatGPT (GPT-6 Astra Pro) reviewed the source and logs, wrote/reviewed the patch, and drafted this report. I ran the commands above on the Windows machine described here.
Tested patch against d665f505 (89 additions, 63 deletions)
Patch SHA256:
06df70ffbafb47a8ac28b382437636b3994ec72212832dc3e33b8f6f78154d64@caua-an on GitHub · 2026-11-24 02:47 UTC · original
Tested: Clean head
d665f505c49d8f8071bf8eeea2a4c45ffe558afe; Windows 11 Home build 26200, Core Ultra 9 185H, Rust 1.100.0 MSVC x64, debug build,XCL_REQUIRE_GPU=1. Intel Arc integrated graphics driver 32.0.101.8860; RTX 4070 Laptop driver 616.92.With the D3D12 debug layer confirmed active,
cargo test --offline --locked -p xcl --test desc_d3d12_e2e -- --test-threads=1 --nocapturereported 0 passed, 1 failed on bothXCL_ADAPTER=intelandXCL_ADAPTER=nvidia. The negative control produced the expected invalid-view error, thenDXGI_ERROR_INVALID_CALLon device removal, and the finalshared backend device should remain healthyassertion failed. This is consistent with D3D12 returning the existing device for the same adapter in the same process. Suggest running the negative control in a separate process.Not tested: Full workspace suite, release builds, retail titles, or game-data samples (
XCL_SAMPLE_*unset).AI use: OpenCode with GPT-6.2 Sol ran the tests and drafted this report.
@amazedturnip on GitHub · 2026-11-24 03:16 UTC · original
Thanks for catching and reproducing the
D3D12CreateDeviceper-adapter singleton behavior when the D3D12 debug layer is active.Updated
crates/xcl/tests/desc_d3d12_e2e.rsto run the negative-control invalid SRV in a child process of the test executable (XCL_DESC_D3D12_NEG_CONTROL_LUID) targeting the parent's adapter LUID viaxcl::gpu::agility::{configuration_interface, create_device}, requiringID3D12InfoQueue, clean setup, a captured validation error, exit status 0, and a completion marker. This keeps the child'sRemoveDeviceisolated from XCL's shared backend device in the parent process.Local check (
XCL_ADAPTER=radeon, Windows Graphics Tools unavailable on this host):cargo test -p xcl --test desc_d3d12_e2e -- --test-threads=2 --nocapture-> 1 passed, 0 failed, 0 ignored.@thehollowedone on GitHub · 2026-11-24 01:40 UTC · original · edited 2026-11-24 03:40 UTC
Retest after subprocess isolation
The stock fixture passed 3/3 fresh runs on
09998c3. The D3D12 debug layer was active on the RTX 3080 Ti, with no GPU or validation skips. The parent passed all 23 SRV and seven sampler InfoQueue checks. The child captured the expected negative-control error and exited successfully, and the parent device passed its health assertion in every run.Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, debug.
cargo test --offline --locked -p xcl --test desc_d3d12_e2e desc_d3d12_srv_and_sampler_debug_layer -- --exact --nocapture --test-threads=1. GPU sampling readback, the full workspace suite, and retail use remain untested. Codex with GPT-6.2 Sol ran the tests and drafted this update.Earlier same-process result
Tested
Reran
d665f50with Windows Graphics Tools installed. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, debug.cargo test --offline --locked -p xcl --test desc_d3d12_e2e -- --test-threads=1 --nocaptureran the fixture on native D3D12 with the debug layer enabled (0 passed, 1 failed, 0 ignored, no GPU skip). All 23 SRV and seven sampler cases passed their InfoQueue assertions. The deliberate 3D SRV on a 2D resource triggered error 32, followed by device removal (error 232,DXGI_ERROR_INVALID_CALL). The fixture then failed its shared-device health assertion.A diagnostic-only rerun compared the two devices'
IUnknownidentities before the control. They matched. Microsoft documents reuse of the process's existing D3D12 device for the same adapter.Not tested
GPU sampling readback, full workspace suite, and retail titles.
AI use
Codex with GPT-6.2 Sol ran the tests and drafted this report.
@JoaoPauluu on GitHub · 2026-11-24 03:50 UTC · original
Test report: #540 under Wine with vkd3d-proton as the host driver (Linux, NVIDIA)
The other runs here are native Windows drivers. Under Wine, the host driver this test compares XCL with is vkd3d-proton (D3D12 on Vulkan), and the test passes there as well.
Setup
experimental-11.0-20261112(wine-11.0), vkd3d-proton v3.1 (4522cc1a) + the patch from #257, DXVK from Proton,DXVK_CONFIG="dxgi.hideNvidiaGpu = False"x86_64-pc-windows-gnu(mingw-w64-gcc 16.2.0), debug build of this PR's head09998c3Result:
desc_d3d12_e2etest binary under Wine,--test-threads=1: 1 passed, 0 failed, 0 ignored (one run).desc_d3d12_srv_and_sampler_debug_layer: ok. vkd3d-proton has no debug layer (d3d12core_GetDebugInterface: Returning DXGI_ERROR_SDK_COMPONENT_MISSING), so the debug layer was not active in this run.Not tested
AI use: Claude Code (Claude Opus 5.5) built the test, ran it on the machine above and wrote this report. The results are pasted from those runs. The account owner asked for test reports to be posted while they were away and has not reviewed this one.
@MesshM on GitHub · 2026-11-24 05:00 UTC · original
Test run of
09998c343280f2b5dc66fbe4cc06f0bebdfc7af8on AMD RDNA4. I merged it onto currentmain64b3f35locally (clean merge).Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 702 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 660 passed, 0 failed, 21 ignoredSKIPPED;desc_d3d12_srv_and_sampler_debug_layerand the otherdesc_d3d12_e2etests pass (single adapter here).Review: Test-only; adds an AMD RDNA4 run to the many above. I found nothing to change.
Not tested: no retail title or regression run (I have no unpacked game), no
XCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
@JJAutoCompare on GitHub · 2026-11-25 06:53 UTC · original
Empirical test report (09998c34)
Independent Intel Arc A770 D3D12 verification of PR #540 at detached head
09998c343280f2b5dc66fbe4cc06f0bebdfc7af8(clean worktree).Hardware / environment
32.0.101.9175), AMD Ryzen 7 3800X, Windows 11 Enterprise Evaluation x64 build26200.9974(D3D12 debug layerd3d12SDKLayers.dllabsent).rustc 1.100.0 (0ef1bc386 2026-11-09)(x86_64-pc-windows-msvc), DXC1.9.2609.5 (01b62ad47), unoptimized Cargo test profile with debug info and incremental compilation disabled.Commands and results
cargo test -p xcl --tests --no-run --message-format=jsonoutside the GPU lock.Invoke-ArcTest.ps1withXCL_ADAPTER=A770andRUST_TEST_NOCAPTURE=1:desc_d3d12_e2e.exe --nocapture --test-threads=1(exit 0, 0.30s).Observed behavior
desc_d3d12_srv_and_sampler_debug_layeropened real backendIntel(R) Arc(TM) A770 Graphicsand completed driverCreateCommittedResource,CreateShaderResourceView, andCreateSamplercalls with exit 0.0x887A002D), the test logged that it ran without InfoQueue validation.Not tested
AI use
Verified and published with T3 Code / Antigravity (gemini-4-neon).
@DavidM1911 on GitHub · 2026-11-25 13:43 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!
@amazedturnip on GitHub · 2026-11-25 15:55 UTC · original
Thanks for the reports. The subprocess isolation the review surfaced is already in place at this head (the negative control runs in a child process; parent device stays healthy). My local run on the current head found one additional real defect: the B5G5R5A1 case used GFX10 format 135, which is the 5_5_5_1 layout (no DXGI equivalent,
image_d3d12correctly returns None) instead of the actual B5G5R5A1 format 134 (1_5_5_5). Fixed the test's format number; the run now passes (0 passed, 1 failed -> 1 passed, 0 failed) on AMD Radeon (debug layer unavailable on this host). No other changes needed.@DavidM1911 on GitHub · 2026-11-26 03:00 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
@upipibi on GitHub · 2026-11-26 08:49 UTC · original
RTX 3070 8 GB run of
9a69001(as-is on its base0829441, not merged with currentmain) with the D3D12 debug layer on (inboxd3d12SDKLayers.dll), which the description's AMD run did not have.cargo test -p xcl --test desc_d3d12_e2e -- --nocapture --test-threads=1, 3 runs: 1 passed, 0 failed, 0 ignored each; no SKIPPED; log showsdebug layer enabledand the real backend on the 3070.5d7f6e1are gone.Not tested: the no-layer path, AMD, release builds, a merge with current
main.NVIDIA 616.56, Windows 11 26100, Rust 1.100.0, debug.
AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this.
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.