Tests: pin the IDXGIDevice answers() contract #2462
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from ivall/xcl. Originally posted by amazedturnip on 2026-11-25T19:39:22Z.
Pin 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
Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-11-25T20:25:50Z.
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.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T20:34:20Z.
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!
Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-25T20:37:12Z.
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.Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-30T08:39:52Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by amazedturnip on 2026-11-30T08:44:12Z.
Still merges cleanly onto main (
d52ff48c) with passing checks; pin the IDXGIDevice answers() contract — waiting on maintainer / post-goal review.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:08:40Z.
Triage (#1607) – head
6845526No open or merged PR adds this test; main has no test of
dxgi_device::answers. #3384 extendsanswersto IDXGIDevice3/IDXGIDevice4 with a unit test of its own. That does not break these assertions, but the file's header ("and nothing else") would then be out of date.No problems found in the diff:
xcl::hle::d3d12x::dxgi_deviceis public, and the test needs no GPU.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.