refactor(shader): split emit/lower.rs under 640 KiB asset-policy cap #416

Merged
Androtim merged 1 commit from upstream-pr/416 into main 2026-12-04 02:32:19 +00:00
Androtim commented 2026-12-04 02:11:50 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-04T02:11:50Z.


Summary

Pure structural refactor (zero behavioral changes) of \crates/victory-shader/src/emit/lower.rs\ to unblock Windows
elease.yml, where \lower.rs\ reached \661,845\ bytes (CRLF) and exceeded \xtask/src/policy.rs's \655,360-byte (640 KiB) single-file asset-policy cap (\cargo xtask policy).

No policy limits were modified.

Extracted Submodules

Moved three cohesive \impl Lower<'_>\ method groups into child modules under \crates/victory-shader/src/emit/lower/:

  • \crates/victory-shader/src/emit/lower/valu.rs\ (\126,722\ bytes): \ alu, \dpp, \ alu_op, 64-bit/16-bit/packed16 helpers, \integer, \compare, \lane, \lane_bits_for\
  • \crates/victory-shader/src/emit/lower/image.rs\ (\43,420\ bytes): \image, \cube_direction\
  • \crates/victory-shader/src/emit/lower/buffer.rs\ (\23,748\ bytes): \uffer\

File Sizes (Windows CRLF)

File Before After Delta
\crates/victory-shader/src/emit/lower.rs\ \661,845\ B \469,045\ B -192,800\ B (~182 KiB\ headroom)
\crates/victory-shader/src/emit/lower/valu.rs\ — \126,722\ B new
\crates/victory-shader/src/emit/lower/image.rs\ — \43,420\ B new
\crates/victory-shader/src/emit/lower/buffer.rs\ — \23,748\ B new

Verification

Verified locally with +1.98.1-x86_64-pc-windows-gnu:

  • \cargo xtask policy: PASS (\sset policy: 363 files ok)
  • \cargo check --workspace: PASS (0 errors, 0 warnings)
  • \cargo test -p victory-shader --lib: \430 passed, \6 ignored; 3 local Windows \dxil.dll\ PSV validation failures on geometry-shader tests (
    ect::tests::the_rectangle_stage_is_a_geometry_shader,
    ect::tests::rectangles_are_drawn_whole, \arycentric_tests::first_half_values_render_on_hardware_and_warp) unrelated to \lower.rs.
<!-- greyfinch-sync:Androtim/MiniVI:issue:5638739803 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/416). Originally posted by [Androtim](https://github.com/Androtim) on 2026-12-04T02:11:50Z. --- ## Summary Pure structural refactor (**zero behavioral changes**) of \crates/victory-shader/src/emit/lower.rs\ to unblock Windows \ elease.yml\, where \lower.rs\ reached \661,845\ bytes (CRLF) and exceeded \xtask/src/policy.rs\'s \655,360\-byte (640 KiB) single-file asset-policy cap (\cargo xtask policy\). No policy limits were modified. ## Extracted Submodules Moved three cohesive \impl Lower<'_>\ method groups into child modules under \crates/victory-shader/src/emit/lower/\: - \crates/victory-shader/src/emit/lower/valu.rs\ (\126,722\ bytes): \ alu\, \dpp\, \ alu_op\, 64-bit/16-bit/packed16 helpers, \integer\, \compare\, \lane\, \lane_bits_for\ - \crates/victory-shader/src/emit/lower/image.rs\ (\43,420\ bytes): \image\, \cube_direction\ - \crates/victory-shader/src/emit/lower/buffer.rs\ (\23,748\ bytes): \uffer\ ## File Sizes (Windows CRLF) | File | Before | After | Delta | | --- | ---: | ---: | ---: | | \crates/victory-shader/src/emit/lower.rs\ | \661,845\ B | \469,045\ B | \-192,800\ B (\~182 KiB\ headroom) | | \crates/victory-shader/src/emit/lower/valu.rs\ | — | \126,722\ B | new | | \crates/victory-shader/src/emit/lower/image.rs\ | — | \43,420\ B | new | | \crates/victory-shader/src/emit/lower/buffer.rs\ | — | \23,748\ B | new | ## Verification Verified locally with \+1.98.1-x86_64-pc-windows-gnu\: - \cargo xtask policy\: **PASS** (\sset policy: 363 files ok\) - \cargo check --workspace\: **PASS** (0 errors, 0 warnings) - \cargo test -p victory-shader --lib\: \430 passed\, \6 ignored\; 3 local Windows \dxil.dll\ PSV validation failures on geometry-shader tests (\ ect::tests::the_rectangle_stage_is_a_geometry_shader\, \ ect::tests::rectangles_are_drawn_whole\, \arycentric_tests::first_half_values_render_on_hardware_and_warp\) unrelated to \lower.rs\.
Androtim commented 2026-12-04 02:32:16 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-04T02:32:16Z.


Audited #416 (608b3147, CI check PASS, cargo xtask policy PASS 363 files ok): pure structural split of crates/victory-shader/src/emit/lower.rs (661,845 -> 469,045 bytes CRLF, ~182 KiB headroom) into lower/{valu,image,buffer}.rs with zero behavioral changes. Merging via squash to unblock release.yml (v2026.12.04.03 queued once main CI finishes green).

<!-- greyfinch-sync:Androtim/MiniVI:comment:7399050373 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/416#issuecomment-7399050373). Originally posted by [Androtim](https://github.com/Androtim) on 2026-12-04T02:32:16Z. --- Audited `#416` (`608b3147`, **CI `check` PASS**, `cargo xtask policy` PASS `363 files ok`): pure structural split of `crates/victory-shader/src/emit/lower.rs` (`661,845 -> 469,045` bytes CRLF, `~182 KiB` headroom) into `lower/{valu,image,buffer}.rs` with zero behavioral changes. Merging via squash to unblock `release.yml` (`v2026.12.04.03` queued once `main` CI finishes green).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Androtim/MiniVI!416
No description provided.