Test/shader random vs ms #3591
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3591"
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 Marvisak/VIctory. Originally posted by Levichu51 on 2026-11-27T19:36:03Z.
Builds on #1335. Until that lands, this branch also carries its three commits; only the last one,
cc3cae5, is new here.Why
The random-program test from #1335 generates compute and pixel programs only. Vertex and mesh programs go through their own I/O and export lowering (position, parameters, primitives, mesh limits), and the world is drawn with mesh programs. A panic in that code also ends the title.
What
The generator now makes four stages: compute 45%, pixel 25%, vertex 15%, mesh 15%. What each program reads and exports beyond the basics comes from a
Shapedrawn from the seed alone, and its container's signatures match it.param0as f32, 16-bit, or two 16-bit rows per dword;pos0, and clip distances inpos1PSG1) parameters;exp primwith a valid triangle or random indices;pos0; vertex/primitive limits now and then past the host's; lines 1 in 20p1/p2pairs over v0/v1, in f32 or completed withv_interp_p2_f16into either half; a 16-bit input; depth and stencil (exp mrtz) after the colourWhile measuring coverage I found and fixed two mistakes in the generator:
s_buffer_*used a root table's address as their descriptor, which mixed root parameters into it;Compute programs translate a bit more often as a result.
Coverage
Of 16,384 programs, every stage and every
Shapevariant translates some:The test now fails if any stage translates under 1% of its programs. I checked this: with mesh made to draw lines only, it fails with
Ms: 0 of 632 random programs translated.Results
cargo test -p victory-shader: 174 passedcargo clippy -p victory-shader --all-targets [--all-features] --target x86_64-pc-windows-msvc -- -D warnings: cleancargo xtask policy: okAs with #1335, I ran it on Linux only. The Windows target was checked with clippy, not run; the test uses no GPU and no
dxil.dll.Imported from Marvisak/VIctory. Originally posted by futurepro62 on 2026-11-29T17:06:28Z.
Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head
cc3cae5(on its base63bcca4).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 868 passed, 0 failed, 10 ignored.random_programs_translate_or_are_refused_the_same_way_every_time,random_programs_are_reproducible_from_their_seed.--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#2571), so without the skip the rest of that crate never reports;dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
Imported from Marvisak/VIctory. Originally posted by Levichu51 on 2026-11-29T19:18:14Z.
Thanks for the full run. Two corrections to my description: the default run takes about 4.5-5 s in a debug build, not 2 s, and the per-stage translation rates come from 8,192 programs, not 16,384.
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.