Tests: pin the IDXGIDevice answers() contract #2472
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!2472
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2472"
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-25 19:39 UTC · original
amazedturnip:xcl/tests-dxgi-device-answers-contract-030352→main· +25 −0 · 1 files · 1 commits · openPin the console IDXGIDevice answers() contract: answers() is true exactly for IDXGIObject / IDXGIDevice / IDXGIDevice1 / IDXGIDevice2, and false for ID3D12Device, IDXGIFactory4, ID3D12Resource, and a zero GUID — tested through the public xcl API with no GPU dependence. The vtable layout contract (17-slot ordering) is not reachable from an integration test in non_runtime_only mode, so it is explicitly left out of scope rather than asserted incorrectly.
What is in it
answers()contract through the public API.answers()is true exactly for the four DXGI GUIDs (IDXGIObject / IDXGIDevice / IDXGIDevice1 / IDXGIDevice2), equal to the windows crate's GUIDs.answers()is false for ID3D12Device, IDXGIFactory4, ID3D12Resource, and a zero GUID — the same interfaces the surroundingqipath hands back to the device.Tested
AMD Radeon(TM) Graphics (driver 32.0.21043.19003, DXC 1.9.2609, native wave64),XCL_ADAPTER=radeon):cargo test --workspace -- --test-threads=1— 1287 passed, 1 failed, 26 ignored (SKIPPED GPU tests: 1 (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), 1 (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), 1 (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), 1 (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), 1 (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), 1 (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), 1 (cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)); pre-existing upstream/main failures excluded: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1)Not tested
AI use
@fromthemoonx on GitHub · 2026-11-25 20:25 UTC · original
Passes on NVIDIA, merged onto current
main; both new tests catch a deliberate break inanswers()that the existingdxgi_devicelib test does not.Tested:
6845526merged ontomain6d12f58(clean). RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug.cargo test --workspace --no-fail-fast -- --test-threads=4SKIPPEDlines (no wave64, refused per-lane forms)cargo test -p xcl --test dxgi_device, 3 runsDeliberate breaks in
dxgi_device::answers(scratch):IDXGIDevice2left out:answers_true_for_the_four_dxgi_guidsfails (IDXGIDevice2 must be answered);cargo test -p xcl --lib dxgi_devicestill passes.ID3D12Deviceadded:answers_false_for_other_interfaces_and_zero_guidfails (ID3D12Device must not be answered); the lib test still passes.The tests don't use the GPU, so NVIDIA vs AMD makes no difference to them.
Not tested: the full suite at the head itself (only merged), a release build.
AI use: Claude Code (Claude Opus 5.5) ran the tests and the scratch breaks, and wrote this report.
@DavidM1911 on GitHub · 2026-11-25 20:34 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!
@SlopTart on GitHub · 2026-11-25 20:37 UTC · original
gpu_suite (cold cache): 164 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, and the promoted-UAV-clear driver gap, PR #2490); none caused by this PR. Notegpu_depth_buffer_created_for_unordered_access_is_placedis green on main now, #2466 did its job on this lane.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.