Tests: the GPU tests load the D3D12 Agility SDK, as victory.exe does #2878
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2878
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2878"
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?
@lhnizdo on GitHub · 2026-11-25 22:57 UTC · original
lhnizdo:pr/tests-agility-sdk→main· +111 −0 · 4 files · 4 commits · openWhat this fixes
On Windows 10 the system's D3D12 runtime has no shader model 6.6, so every GPU test in
victory-shaderandvictory-gpuskipped its hardware device ("no SM 6.6 hardware device; skipped"), and then failed its "at least one device ran" check where WARP has no 6.6 either (Windows 10's WARP stops at 6.2). #2460 makesvictory.exeload the Agility SDK from.\D3D12\; the test binaries had no such exports.Changes
victory-shaderandvictory-gpuexportD3D12SDKVersion(620) andD3D12SDKPath, likevictory.exe. A test binary sits intarget\<profile>\deps\, so the path is..\D3D12\: the runtime is looked for intarget\<profile>\D3D12\, whereD3D12Core.dllfrom the NuGet package is copied once (as forvictory.exein #2460). Without that folder nothing changes: Windows uses its own runtime..drectvesection of acfg(test)static, so only test binaries get them.cargo:rustc-link-arg-testsis refused in a package without atests\target, andrustc-link-argwould also reach the shader crate's benchmark, which doesn't define the values.victory-gpu'sbuffer_srvdoes with #2464, with the sameVICTORY_RAW_STRUCTUREDoverride. With the hardware device running,a_heap_buffer_read_by_element_takes_the_views_strideread the wrong records there: lanelgot the first word of element3l + 1.Host::from_deviceall get it.Tested
RTX 2080 (32-lane waves), Windows 10 19045, driver 32.0.16.1742,
mainf3578e3plus this PR, withtarget\debug\D3D12\holdingD3D12Core.dll1.620.2:stride_tests, for example).cargo test -p victory-gpu --lib: 226 passed, 2 failed. The two are the NVIDIA view-heap cap pair (dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views), which #2461 fixes.cargo test -p victory-shader --lib: 300 passed, 2 failed:a_heap_buffer_read_where_no_buffer_view_is_reads_zeros: the same heap cap, also fixed by #2461.pops_wait_loop_exits_immediately_for_inactive_laneswants a shader model 6.6 WARP device, and Windows 10's WARP is 6.2.a_heap_buffer_read_by_element_takes_the_views_stridepasses on NVIDIA.cargo clippy -p victory-shader -p victory-gpu --all-targets -- -D warningsis clean.Still skipped here, as before: WARP (no 6.6 on Windows 10) and the tests that need the console's shader compiler.
AI-assisted (Claude Code); the runs were on my machine.
🤖 Generated with Claude Code
https://claude.ai/code/session_018sSQTfPXZpSkjMMNa7RB5G
@fuzeofficlal on GitHub · 2026-11-25 23:18 UTC · original
Tested
6fc5deffon Windows 11 (RTX 5090 + WARP) and hit a blocking regression whentarget\<profile>\D3D12\D3D12Core.dllis not present (defaultcargo testand CI):1. Exporting
D3D12SDKVersion/D3D12SDKPathfails with0x887E0003instead of falling back..\D3D12\D3D12Core.dllis missing. In practice, once a test binary exportsD3D12SDKVersion = 620andD3D12SDKPath = "..\\D3D12\\", the D3D12 loader hard-fails bothD3D12CreateDeviceandD3D12SerializeVersionedRootSignaturewith0x887E0003(DXGI_ERROR_SDK_COMPONENT_MISSING/-2005008381).D3D12Core.dll:victory-shader --lib stride_tests: 0/8 passed, 8/8 failed (neither hardware nor WARP SM 6.6 device available).victory-gpu --lib root::tests: 4/4 host tests failed (host_serialized_blobs_create_root_signatures,our_blobs_deserialize_on_the_host,versioned_descriptions_serialize_on_the_host,malformed_blobs_are_rejected_by_the_hostall returned-2005008381=0x887E0003on both RTX 5090 and WARP), while all other GPU tests silently skipped viahost() -> None.2. Other issues
6fc5deff): mixes an NVIDIAraw_structuredSRV-only workaround inemit/host.rsthat overlaps (and is less complete than)#2885.D3D12SDKVersion/D3D12SDKPathare gated only on#[cfg(test)]without#[cfg(target_os = "windows")], MSVC emitslinker stdout.lib/.expwarnings,apps/victory/src/main.rsonmaindoes not have these exports, and#[cfg(test)]does not apply to integration tests (tests/*.rs).Suggest dropping
6fc5deffand gating Agility SDK test exports behind an explicit opt-in feature or build-script deployment that guaranteesD3D12Core.dllis staged beside the test binary.@Marvisak on GitHub · 2026-11-26 04:27 UTC · original · edited 2026-11-26 07:23 UTC
Automated triage for the maintainers.
Thanks. The NVIDIA change is reverted, and the exports now depend on
cfg(agility_runtime), so the0x887E0003failure is gone and CI passes. Needs the maintainer's decision: this adds a newcrates/victory-gpu/build.rsand changescrates/victory-shader/build.rs, and build scripts need the maintainer's approval. Two smaller points:D3D12SDKVersionis fixed at 620. If someone stages aD3D12Core.dllfrom a different Agility release, the loader may still refuse to make a device. A note on which version to stage would help.rerun-if-changedpath that does not exist as always stale. If so, without aD3D12folder (the default) both build scripts rerun on every build, and victory-shader's script hashes its sources each time. Please check this, and emit the line only when the folder exists if needed.CI: passing.
Generated by Claude Code
@lhnizdo on GitHub · 2026-11-26 06:12 UTC · original
Thanks @fyernald, and for the triage. You're right, and my description was wrong: exported without the runtime, the loader refuses to make a device instead of falling back. Changes, pushed as new commits (
405d851,5e63ca3):build.rssetcfg(agility_runtime)only whentarget/<profile>/D3D12/D3D12Core.dllexists, as #486 does forvictory-shader, and the statics and the.drectvedirective hang off it. The scripts watch theD3D12folder rather than the missing file, so they don't rerun on every build.main. Theon_software_adapterdoc-comment mix-up went with the revert.On an RTX 2080, Windows 10 19045,
cargo test -p victory-gpu --lib --test-threads=1:0x887E0003target\debug\D3D12\mainon this card: the in-box runtime refusing the0xC00root flags and lackingID3D12Device10, plus the heap-cap pair.@lerapeurdu62280-debug on GitHub · 2026-11-26 16:04 UTC · original
Test report on Windows 10 Pro 19045, AMD RX 6600 (Adrenalin 32.0.21045), head
5e63ca3merged onmain63bcca4, Agility SDK 1.620.2 from NuGet intarget\debug\D3D12\. No game files.target\debug\D3D12\victory-gpumainalone: 229 passed, 3 failed)ID3D12Device10)victory-shadermainSo the opt-in
cfg(agility_runtime)works as described: nothing changes without the folder (no 0x887E0003 here either), and with it the hardware tests run on Windows 10. The onevictory-shaderfailure left ispops_wait_loop_exits_immediately_for_inactive_lanes, which needs an SM 6.6 WARP; Windows 10's WARP is 6.2 even with the Agility SDK. #3283 makes it, and threevictory-gputests, skip on a runtime without 6.6. With #3283 on top: 231 / 0 and 302 / 0.Same loader behaviour for the exe: #2460 exports unconditionally and fails with 0x887E0003 without the folder (reported there).
AI-assisted: yes (Claude Code)
@kotekompotek on GitHub · 2026-11-25 23:36 UTC · original · reviewed
Mechanically right: the .drectve export trick under cfg(test) puts the Agility SDK exports only in test binaries (mirroring victory-shader and victory.exe's own load path), and the ..\D3D12\ relative path matches where the NuGet runtime lands. This is what makes the SM 6.6-dependent GPU tests actually run on Win10 hosts. LGTM.
@fyernald on GitHub · 2026-11-26 01:57 UTC · original · requested changes
Tested on an RTX 3080 (driver 617.42), Windows 10 19045,
main63bcca4+ this head (6fc5def),--test-threads=1,D3D12Core.dll1.620.2 intarget\debug\D3D12\.With the runtime staged it does what it says. The
.drectveexports reach the linker here.cargo test -p victory-gpu --libmainmain+ #2878The three it fixes:
compute_view_marks_rebind_after_depth_twin_conversion(#2155) anddepth_bounds_control_a_title_draw(#158) are new onmaintoday. On Windows 10's in-box runtime, they fail because it refuses the root signature flags0xC00(*_HEAP_DIRECTLY_INDEXED) withE_INVALIDARG.a_texture_written_in_one_format_reads_in_another_through_a_placed_viewfails because there is noID3D12Device10in the in-box runtime.The two left are the NVIDIA heap-cap pair.
victory-shader(main+ #2596 for #2571, the suite crashes here without it): 298 passed / 4 failed with #486 in place of this PR, 300 / 2 with this PR. The raw structured views fixa_heap_buffer_read_by_element_takes_the_views_stride, and alsogathers_at_a_level_match_the_hardware, whose coordinates come from aStructured(16)view. Both fail withVICTORY_RAW_STRUCTURED=0and pass with=1, deterministically.Without the runtime it is worse than
main, and that is what CI hits. Same build, folder renamed away:root::testsfail with-2005008381(0x887E0003), as on CI.host()isNone, and counts as passed. The heap-cap pair that fails onmain"passes" here (227 / 4). So on a machine without the folder, this turns off the GPU suite's hardware coverage silently, not just those four tests.What worked here: decide at build time and export only when the runtime is staged, as #486's
build.rsdoes (cfg(agility_runtime)only iftarget/<profile>/D3D12/D3D12Core.dllexists). I copied that build script intovictory-gpulocally. With the DLL: 229 / 2. Without it: 226 / 5, the same five asmain, with nothing skipped.Also:
victory-shader's test build fails withsymbol `D3D12SDKPath` is already defined. One of the two should own the shader crate's opt-in.emit/host.rs,raw_structuredwent in betweenon_software_adapter's doc comment and itsfn. That comment now documentsraw_structured, andon_software_adapterhas none.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.