gpu(native): trim unused mesh outputs to paired pixel shader reads #572
No reviewers
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS!572
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-568"
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?
@tarcisioads on GitHub · 2026-11-28 05:28 UTC · original
tarcisioads:vibe/mesh-output-limit-528→main· +170 −10 · 7 files · 1 commits · openRefs #532
Summary
Options::trim_outputs: Option<(u32, u64)>invictory-shaderso mesh shaders paired with a pixel shader dropTEXCOORD(< 32) andHALF(< 64) outputs fromOSG1that the pixel shader'sISG1does not read.trim_mesh_if_neededinvictory-gpu/src/native/glue.rsfor both described (pipe) and guessed (guess) mesh+pixel pipelines whenOSG1exceeds 12 elements and has unread generic outputs.oversized_mesh_outputs_fit_when_trimmed_to_pixel_readsinvictory-gpu/src/native/mesh_tests.rs, confirming Metal rejects 17 rows (34,816 bytes at 128 vertices) withTotal mesh size exceeds the maximum mesh size allowed (32768)and accepts + renders the pipeline once trimmed to the pixel shader's reads.How it was tested
tools/macos/test-native.sh -j6 -p victory-shader -p victory-gpu -p victory -p xtask(420victory-shader, 5sweep, 449victory-gpu, 16victory, 6xtaskpassed, 0 failed)cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings(passed, 0 warnings)cargo xtask policy(404 files ok)Checklist
cargo xtask policypasses)x86_64-pc-windows-gnullvm)@AnastasisKon on GitHub · 2026-11-28 17:49 UTC · original · approved these changes
Read the diff:
Options::trim_outputsin victory-shader plustrim_mesh_if_neededin glue.rs drop meshOSG1outputs (TEXCOORD <32 / HALF <64) the paired pixel shader'sISG1never reads, for both described and guessed mesh+pixel pipelines, with the option in the cache key (shader_cache.rs). Verified on the headb3b75cd4: darwinvictory-gpumesh tests 28/28 (incl. the new mesh_tests), hostvictory-shader420/420, workspace windows clippy-D warningsclean. Approving.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.