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

Manually merged
github merged 1 commit from github-bot/gh-416 into gh-pr/416/base 2026-12-04 02:37:17 +00:00 AGit
Owner

@⁠Androtim on GitHub · 2026-12-04 02:11 UTC · original
Androtim:chore/split-emit-lower → main · +4505 −4473 · 4 files · 1 commits · merged 2026-12-04 02:32 UTC

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** on GitHub · 2026-12-04 02:11 UTC · [original](https://github.com/Androtim/MiniVI/pull/416) `Androtim:chore/split-emit-lower` → `main` · +4505 −4473 · 4 files · 1 commits · merged 2026-12-04 02:32 UTC ## 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\.
Pure structural refactor (zero behavioral changes) to bring
crates/victory-shader/src/emit/lower.rs back under xtask/src/policy.rs's
655,360-byte (640 KiB) single-file asset-policy cap on Windows CRLF,
unblocking release.yml.

Extracted cohesive impl Lower blocks into existing emit/lower/ child modules:
- emit/lower/valu.rs (126,722 bytes): VALU, DPP, 64-bit/16-bit/packed16, integer, compare, lane helpers
- emit/lower/image.rs (43,420 bytes): image_* lowering and cube_direction
- emit/lower/buffer.rs (23,748 bytes): buffer_* lowering

crates/victory-shader/src/emit/lower.rs: 661,845 -> 469,045 bytes (-192,800 bytes).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 02:13:44 +00:00
github-bot force-pushed github-bot/gh-416 from 9cbceb753e to c00c8063f1 2026-12-04 02:24:48 +00:00 Compare
github-bot force-pushed github-bot/gh-416 from c00c8063f1 to 608b314757 2026-12-04 02:30:33 +00:00 Compare
github-bot changed target branch from main to gh-pr/416/base 2026-12-04 02:37:10 +00:00
github manually merged commit 608b314757 into gh-pr/416/base 2026-12-04 02:37:17 +00:00
Author
Owner

@⁠Androtim on GitHub · 2026-12-04 02:32 UTC · original

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).

**@⁠Androtim** on GitHub · 2026-12-04 02:32 UTC · [original](https://github.com/Androtim/MiniVI/pull/416#issuecomment-7399050373) 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).
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Androtim--MiniVI!416
No description provided.