Shaders: CalculateLOD gets only the spatial coordinates #260
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!260
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-260"
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?
@Ortomanic on GitHub · 2026-11-24 23:02 UTC · original
Ortomanic:fx/calculate-lod-coords→main· +181 −0 · 3 files · 2 commits · openChanges
CalculateLODwas passed every coordinate component of the sample it was derived from. The DXIL validator wants the components beyond the texture's spatial dimensions to beundef(out of bound coord must be undef). The level-of-detail query now passes only the spatial coordinates.Validation
34e55a0e,cc182397,d52fbc59). Only those three programs' DXIL changes; none is lost and there are no new dxv or dxil-spirv failures.cargo clippy --workspace --all-targets --locked -- -D warningsfor the Windows target, with and without--all-features, andcargo test -p victory-shader -p xtaskpass on this branch (cross-compiled from Linux with the pinned toolchain).AI-assisted patch with local build and offline validation.
A pixel program with image_get_lod of a 2D array is emitted, validated and made into a pipeline on each device there is. It fails without the fix in this branch ("out of bound coord must be undef"). Test taken from JRamos1993's lod-array-coords (970bc3d7de), offered in review of #260; its lowering change is left out, since this branch already has an equivalent one. Port note: the program's image word is a parameter and a second test runs the same program on a 1D array, the case iGoldenNinja reported on #260 (there the slice is the second coordinate). Both tests fail without the fix. Co-authored-by: Ortomanic <[email protected]>@JRamos1993 on GitHub · 2026-11-25 06:10 UTC · original
Offline check on the retail shader pack: this PR, merged onto current
main310c6eb, fixes the 3 "out of bound coord must be undef" pixel programs, loses none, and changes nothing else.Setup: RTX 5090, Windows 11.
victory translate --validate --listover the title's full shader pack, with a local DXIL hash on each validated line:--pipelineson the 3 creates 3 pipelines, 0 refused.Duplicate closed: I had opened #720 for the same thing without seeing this PR; it emits byte-identical DXIL for all programs, and I closed it. It has a small synthetic test (
image_get_lodof a 2D array: emits, validates, makes a pipeline, and fails without the fix) onJRamos1993:lod-array-coordsincrates/victory-shader/src/emit/image_lod_tests.rs, if you want one here.AI use: Claude Code with Claude Opus 5.5 ran the pack and wrote this. Nothing from the title is in it.
@iGoldenNinja on GitHub · 2026-11-25 11:48 UTC · original
Independent RTX 5080 result on NVIDIA fork
f85101b6095e8cf3cecf8f0647cc7f5428daa177, Windows 11 Pro 25H2 build 26200.9974, driver 617.14 and DXIL validator 1.9.2609.5.I adapted ZTRX PR 103's synthetic fixture to require validation and pipeline creation on both the hardware adapter and WARP. The parent failed on the 1D array case with
out of bound coord must be undef. The port that leaves the slice operand undefined passed validation and made pipelines for all five dimensions in the fixture (1D, 2D, 3D, 1D array and 2D array). This adds a 1D-array check alongside the 2D-array cases reported above. The measured stage was D3D12 graphics pipeline creation. Pinned port and fixtureTesting and reporting assisted by OpenAI Codex.
@Ortomanic on GitHub · 2026-11-25 15:11 UTC · original
Thanks @JRamos1993 and @iGoldenNinja, and thanks for closing the duplicate.
d140e4etakes @JRamos1993'simage_lod_tests.rsfromlod-array-coords(970bc3d, authorship kept), without its lowering change, since this branch has an equivalent one.out of bound coord must be undef(the 2D array passes the slice as the third coordinate, the 1D array as the second). Pipeline creation ran on the hardware device; I did not confirm that the WARP half of the loop ran in this prefix.0b0074e;cargo test -p victory-shader -p xtaskpasses on the merged tree, and clippy with-D warningspasses on the branch in both feature sets (the merged tree fails only with main's own errors, #982 and #841).The tests are
cfg(all(test, windows)), like the file they come from. The head was not rebased.AI-assisted (Claude Code); built and tested locally.
@HAL9000RELOADED on GitHub · 2026-11-25 19:30 UTC · original
RX 7900 XTX (RDNA3), Windows 10 + #402 for SM 6.6, main
d510ee4: both new tests pass on the card with this PR. No other test changed. Run table: #129 (#129).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.