Repository navigation
Conversation
On Windows 10 the system's D3D12 has no shader model 6.6, so every GPU test skipped its hardware device (and failed where WARP has none either). The test binaries of victory-shader and victory-gpu now export D3D12SDKVersion and D3D12SDKPath like victory.exe, looking for the runtime in target\<profile>\D3D12\ (one level up from deps\). Without that folder nothing changes. The exports are linker directives in a cfg(test) object, so only test binaries get them (the shader crate's benchmark does not define the values). RTX 2080, Windows 10 19045: 247 shader tests and 143 GPU tests pass on the hardware device; before, they skipped it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018sSQTfPXZpSkjMMNa7RB5G
…aw, as victory-gpu does The view of a structured buffer read raw read the wrong records on an RTX 2080 (lane l got the first word of element 3l+1), the same NVIDIA behaviour victory-gpu's buffer_srv works around. The test host now makes those views raw too, by its adapter's vendor, with the same VICTORY_RAW_STRUCTURED override. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018sSQTfPXZpSkjMMNa7RB5G
|
Tested 1. Exporting
|
kotekompotek
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
Tested on an RTX 3080 (driver 617.42), Windows 10 19045, main 63bcca4 + this head (6fc5def), --test-threads=1, D3D12Core.dll 1.620.2 in target\debug\D3D12\.
With the runtime staged it does what it says. The .drectve exports reach the linker here.
cargo test -p victory-gpu --lib |
passed | failed |
|---|---|---|
main |
226 | 5 |
main + #2878 |
229 | 2 |
The 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 fix a_heap_buffer_read_by_element_takes_the_views_stride, and also gathers_at_a_level_match_the_hardware, whose coordinates come from a Structured(16) view. Both fail with VICTORY_RAW_STRUCTURED=0 and pass with =1, deterministically.
Without the runtime it is worse than main, and that is what CI hits. Same build, folder renamed away:
- The 4
root::testsfail with-2005008381(0x887E0003), as on CI. - Every other hardware test returns early because
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.rs does (cfg(agility_runtime) only if target/<profile>/D3D12/D3D12Core.dll exists). I copied that build script into victory-gpu locally. With the DLL: 229 / 2. Without it: 226 / 5, the same five as main, with nothing skipped.
Also:
- #486 and this PR can't both land. Merged together,
victory-shader's test build fails withsymbol `D3D12SDKPath` is already defined. One of the two should own the shader crate's opt-in. - In
emit/host.rs,raw_structuredwent in betweenon_software_adapter's doc comment and itsfn. That comment now documentsraw_structured, andon_software_adapterhas none. - The raw-view change overlaps #2885 and doesn't depend on the Agility part. Splitting it out would let each be judged on its own.
|
Automated triage for the maintainers. Thanks. The NVIDIA change is reverted, and the exports now depend on
CI: passing. Generated by Claude Code |
…t of their own Review of Marvisak#2878: the NVIDIA raw-structured change in the shader crate's test host is a separate matter (and is to be checked against Marvisak#2885). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018sSQTfPXZpSkjMMNa7RB5G
Review of Marvisak#2878: exported without target\<profile>\D3D12\D3D12Core.dll, the loader refused to make a device (0x887E0003) instead of using the in-box runtime, which failed CI's root tests and quietly skipped every other hardware test. build.rs now sets cfg(agility_runtime) only when the runtime is there (as Marvisak#486 does for victory-shader), and the exports hang off it. The comments no longer lean on code that is not in main. RTX 2080, Windows 10 19045: with the runtime staged, victory-gpu 226 passed, 2 failed (the NVIDIA heap-cap pair, Marvisak#2461); without it, 224 passed, 4 failed, the same failures as main, and no 0x887E0003. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018sSQTfPXZpSkjMMNa7RB5G
|
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 (
On an RTX 2080, Windows 10 19045,
|
… as victory.exe does
What 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 victory.exe: load the D3D12 Agility SDK from .\D3D12\ #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 GPU: on NVIDIA, structured buffer views are made raw #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 GPU and shaders: a host that caps its view heaps gets heaps at its ca… #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 GPU and shaders: a host that caps its view heaps gets heaps at its ca… #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