Shaders: lower's tests in their own file, under the policy's size limit #3097
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!3097
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3097"
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?
@neonbyte1 on GitHub · 2026-11-26 07:46 UTC · original
neonbyte1:pr/lower-tests→main· +1296 −1290 · 2 files · 1 commits · openemit/lower.rsis 520,563 bytes onmain, 3,725 under the asset policy's 512 KiB per-file limit. Two open PRs grow it: #2968 by 601 bytes and #2977 by 3,097, which together leave about 27 bytes. The maintainer triage on #2977 suggested moving the tests out, so this does it on its own.The
mod testsblock moves toemit/lower_tests.rs, still a child module oflowerthrough#[path], so it keeps access to the private items it tests. Its contents are unchanged except for rustfmt's layout after losing one indentation level.lower.rsdrops to 468,320 bytes.Checks:
emit::lower::tests, 33 before and 33 after, all pass. Run undercargo xtask wine-test(#1218) on Linux: GE-Proton11-14 Wine, RTX 5090. These tests don't touch the GPU's results except through the optional DXIL validator.cargo clippy --workspace --all-targets, with and withoutdiagnostics, is clean, andcargo xtask policypasses.No behaviour change.
AI-assisted (Claude); measured on my machine, no game data shared.
@Marvisak on GitHub · 2026-11-26 08:20 UTC · original
Automated triage for the maintainers.
Merge candidate. The
mod testsblock ofcrates/victory-shader/src/emit/lower.rsmoves toemit/lower_tests.rs, still a child oflowerthrough#[path]under#[cfg(test)]. I compared the moved text withmain's block, and it is identical apart from indentation and rustfmt's commas. This bringslower.rsto 468,320 bytes, well underxtask/src/policy.rs'sMAX_FILE_SIZE(512 KiB), and it follows the*_tests.rslayoutemit/mod.rsalready uses. Open PRs that editlower.rs's tests (#2968, #2977) will need a rebase after this lands.CI: passing.
Generated by Claude Code
@fuzeofficlal on GitHub · 2026-11-26 08:56 UTC · original · approved these changes
Verified
9bca0871locally on Windows 11 x64:cargo clippy --all-targets --locked -- -D warningsandcargo clippy -p victory-shader --all-targets --all-features --locked -- -D warnings: clean (3.36s/4.11s).cargo test -p xtask --locked policy::tests::repository_passes_policy: 1 passed, 0 failed (0.33s).cargo test -p victory-shader --lib --locked emit::lower::tests: 33 passed, 0 failed (0.02s).rustfmt --edition 2024 --check crates/victory-shader/src/emit/lower_tests.rs: clean.The production prefix of
emit/lower.rs(468,320 bytes total) is byte-for-byte identical tomain,#[cfg(test)] #[path = "lower_tests.rs"] mod tests;keepslower::testsmodule visibility intact, and all 33 tests and helpers inemit/lower_tests.rs(47,450 bytes) match the original inline block aside from de-indentation and formatting. Both files sit comfortably under the 524,288-byte asset-policy limit.LGTM.
@potatoe0100 on GitHub · 2026-11-26 14:21 UTC · original
Some numbers on why this should go in early in a batch. I counted across all 582 open merge candidates against
main(63bcca4): 122 of them growemit/lower.rs, by about 150 KB between them. Five go over the 512 KiB limit on their own once merged ontomain: #166, #200, #1395, #2097 and #2723. Merging the 301 candidates that go in together cleanly, in PR order, leaveslower.rsat 555,490 bytes, sorepository_passes_policyfails. With this PR first,lower.rsstarts at 468,320.One snag: GitHub isn't serving
refs/pull/3097/headat the moment.git ls-remotelists the refs around it but not this one, so tooling that fetches PR heads by pull ref will skip this PR. The branch itself is fine (neonbyte1/VIctorypr/lower-testsat9bca087).AI-assisted (Claude).
@futurepro62 on GitHub · 2026-11-26 14:41 UTC · original
NVIDIA full-suite run, to go with the reports above by fuzeofficlal, since none of them names a GPU run. Tested exact head
9bca087(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: 866 passed, 0 failed, 10 ignored.the_code_table_starts_after_the_instructions,vop3_conversion_modifiers_affect_the_lowering,the_24_bit_multiplies_lower_both_halves,sums_of_absolute_differences_lower,buffer_cache_invalidations_lower_as_no_ops,a_scalar_carry_chain_reaches_the_select,v_cndmask_accepts_uniform_and_constant_masks,perm_constant_selector_needs_no_int64,perm_dynamic_selector_needs_no_int64,a_descriptor_selected_by_scc_picks_its_heap_index,a_descriptor_loaded_only_for_its_size_takes_the_kind_of_its_reload,a_waterfall_loop_that_only_sizes_takes_the_kind_of_the_sampled_one,compute_spills_beside_a_descriptor_word_read_back,waterfall_loops_over_per_lane_descriptors_sample_with_each_lanes_own,waterfall_loops_over_descriptors_joined_per_lane_sample_with_each_lanes_own,an_address_half_set_where_only_lanes_that_never_run_skip_is_known,a_descriptor_skipped_only_by_lanes_that_never_run_needs_no_source,descriptors_joined_by_nested_control_flow_lower_to_one_uniform_handle,descriptors_reloaded_from_a_root_table_share_one_handle,scalar_bit_tests_lower,a_missing_value_stays_missing_through_two_live_joins,a_value_no_lane_from_its_edge_reads_needs_no_form,a_mask_joined_with_data_needs_a_uniform_join,a_scalar_result_needs_no_exec,guarded_or_modified_v_mov_b32_is_not_folded_as_constant,a_missing_value_on_a_path_no_lane_takes_is_dead,a_guarded_scalar_write_kills_a_stale_sgpr,buffer_formats_by_number,packed_buffer_formats_by_number,small_floats_widen_as_halves,packed_halves_fill_parameters_first_fit,ds_bpermute_wave64_preserves_32_lane_half,ds_bpermute_refuses_gds.--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
9bca08710eto9e83d9715e@neonbyte1 on GitHub · 2026-11-26 15:00 UTC · original
@potatoe0100 thanks for the heads-up: GitHub had lost
refs/pull/3097/head(only the merge ref existed). I re-pushed the same tree as9e83d97and the head ref is back. No content changed.AI-assisted (Claude); no game data shared.
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.