shaders(emit): normalize unread signature row modes and mesh outputs #63
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: launcher
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
run report
security: hold
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs gpu test
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/Androtim--MiniVI!63
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/63/head"
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?
@Androtim on GitHub · 2026-11-28 18:33 UTC · original
Androtim:feat/iter77-signature-row-interpolation→main· +116 −4 · 3 files · 1 commits · merged 2026-11-29 04:14 UTCSummary
Fixes two DXIL signature validation issues in
victory-shader:crates/victory-shader/src/emit/mod.rs): Extendsvertex_output_interpolationfrom vertex programs (HwStage::Vs, PSV0 stage1) to mesh programs (HwStage::Ms, PSV0 stage13) so floats packed beside integers keep their explicitly declared PSV0 interpolation modes while leaving per-primitive elements untouched.crates/victory-shader/src/emit/shader.rs): Addsone_mode_a_row, called inShader::finish, so unread packed pixel input rows (kindin0 | 13,usage == 0, such as_Firefoliage and prop shaders) whose elements disagree on default interpolation mode become constant (1), avoiding DXIL validator rejections.crates/victory-shader/src/emit/container.rs,shader.rs): Addsmesh_outputs_take_the_declared_interpolationandone_mode_tests::an_unread_row_of_two_modes_becomes_constant.Upstream reference:
Hasusmogus/cool_fox@7fbf561.Rig Specs Tested On
Run Settings & Profile
release&diagnostics@7521cfaseries-s—quality(0.6666667, 540p internal / 960x540 captured frames)offDLSS quality(Streamline 2.14.16)offVICTORY_*Overrides:verify-world.ps1(WorldSeconds=75,AutoNudgeMenu,VICTORY_CACHE_DIR=D:\victory-data\cache-minivi)first_world_frame=6717, 75s in-world / 15 windows, up to11244draws/frame)Measurements & Verification
10.6 fpsmedian (8.12 fpsmean,0.1 fpsmin,94.5 msmedian frame time;+1.70 fpsvs8.9 fpsbaseline)framegen=false)5898 MBpeak (5886.5 MBmedian) /6862 MBmin budget (0 MBover budget)45162uploaded,2392final waiting (-4729vs7121baseline);256median pipeline drops (261.0baseline);mapped()rate32.02 ms/s(longest20.7 ms);11/11gates PASS on first run, visually verified19/24lit frames (luma=104.96,edge_energy=7.13,0.0%near-black/magenta; inspectedframe-6747.png&frame-7349.png).0(no_host_texture_errors=0,untranslated_shaders=2)cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy(297 files ok)cargo +1.98.1-x86_64-pc-windows-gnu test -p xtask --locked(6 passed; 0 failed)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --locked -- -D warningscargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics --locked -- -D warningscargo +1.98.1-x86_64-pc-windows-gnu test -p victory-shader --lib emit::container::tests --locked -- --test-threads=1(3 passed; 0 failed)cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-shader --lib emit::shader::one_mode_tests --locked -- --test-threads=1(1 passed; 0 failed)cargo +1.98.1-x86_64-pc-windows-gnu build --release -p victory --bin victory --locked+objdump -p(Windows system DLLs only)@Androtim on GitHub · 2026-11-28 18:35 UTC · original · edited 2026-11-29 00:03 UTC
Automated triage for the maintainers (not an approval).
Verdict:
needs-gpu-test· CI (check):passingReview Summary
Logic and scope look clean and well-targeted, with unit tests covering both paths and CI passing.
crates/victory-shader/src/emit/mod.rs(emit_program_plain,vertex_output_interpolation): Extendingvertex_output_interpolationfromHwStage::Vs(PSV0 stage1) toHwStage::Ms(PSV0 stage13) matches the PSV0 layout incrates/victory-shader/src/emit/container.rs(psv()):info[28]is input count,info[29]is vertex output count, and primitive elements (info[30]) follow vertex outputs in the element table, so skippinginfo[28]and readinginfo[29]records updates only vertex outputs and leaves primitive outputs untouched.crates/victory-shader/src/emit/shader.rs(one_mode_a_row,Shader::finish): Normalizing mixed-mode pixel input rows to constant (1) only when every element in the row haskindin0 | 13(arbitrary semantic orSV_IsFrontFace) andusage == 0(unread) is safe—constant interpolation is valid for both integer and float components, and rows with any read element or other system value are left untouched.crates/victory-shader/src/emit/container.rs,crates/victory-shader/src/emit/shader.rs):mesh_outputs_take_the_declared_interpolationandone_mode_tests::an_unread_row_of_two_modes_becomes_constantcover both behaviors.Because this PR changes emitted DXIL signature metadata for mesh and pixel shaders, a local D3D12 GPU smoke test (with shader translation active) is warranted before merging.
Generated with Antigravity CLI (
agy).