shader(lower): pass undef for unused array/1D calculateLOD coords #76
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!76
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/76/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-29 04:14 UTC · original
Androtim:feat/iter76-div-fixup-and-array-lod→main· +103 −2 · 2 files · 1 commits · merged 2026-11-29 07:06 UTCSummary
Extracts the remaining non-conflicting calculateLOD fix from the earlier consolidated shader branch (note: _div_fixup_f32 zero/infinity priority from commit
7ee9045is already on main via PR #18, and the signature/mesh-interpolation changes are untouched so there is zero overlap with PR #63):Rig Specs Tested On
Run Settings & Profile
@Androtim on GitHub · 2026-11-29 04:15 UTC · original · edited 2026-11-29 05: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:
crates/victory-shader/src/emit/lower.rs(op == 81/dx.op.calculateLOD.f32): Properly masks out the array slice coordinate withundefforTexture1DArray(kind == 6, settingc1andc2toundef) andTexture2DArray(kind == 7, settingc2toundef). Non-array 1D/2D dimensions already initialize unused slots ofcstofu(undef), 3D passes all three spatial coordinates, and cubes (kind == 5) are already rejected at line 12312.crates/victory-shader/src/emit/mod.rs(array_calculate_lod_passes_undef_for_slice_coord): Adds a focused regression test forimage_get_lodon a 2D array (dim=5) with optional DXIL validation matching the existing test pattern.Minor Nits (non-blocking)
let fu = self.s.m.undef(f32t);shadows the identicallet fu = self.s.m.undef(self.s.t.f32);already in scope at line 12248 ofcrates/victory-shader/src/emit/lower.rs.array_calculate_lod_passes_undef_for_slice_coordis placed insidemod atomic_testsincrates/victory-shader/src/emit/mod.rsrather than a dedicated/general emit test module.Next Step
Because this modifies emitted DXIL shader lowering (
calculateLOD.f32) andValidator::loadis skipped ifdxil.dllis unavailable in CI, a quick local Windows/GPU validation + smoke test is recommended before merging.Generated with Antigravity CLI (
agy).@Androtim on GitHub · 2026-11-29 06:58 UTC · original
Completed local shader/DXIL validation and live 75s Series S GPU verification on
6d853e3(pr76-div-fixup-array-lod):cargo test -p victory-shader --lib --locked -- array_calculate_lod_passes_undef_for_slice_coord --nocapture: 1 passed; 0 failed (dxil.dllpresent in Windows Kits10.0.22000.0\x64).11.55 fps(86.6 ms, vs8.9 fpsbaseline,+2.65 fps)5758 MB/6642 MBbudget (over=0 MB, vs5864 MBbaseline,-106 MB)3467(vs7121baseline) |mapped()stall rate:8.27 ms/suntranslated=1| Crashes / host texture errors:0/0frame-7830.png,frame-7918.png, median luma103.43, edge energy7.1,0.0%near-black/magenta): clean daylight rendering with no artifacts.