Repository navigation
Shaders: the level of detail of an array texture takes no slice (3 programs) - #720
Closed
JRamos1993 wants to merge 1 commit into
Closed
JRamos1993 wants to merge 1 commit into
JRamos1993 wants to merge 1 commit into
Conversation
`image_get_lod` was lowered to `calculateLOD` with three coordinates
whatever the texture, so on a 2D array the slice went in as the third. The
validator refuses that ("out of bound coord must be undef"): 3 pixel
programs of the retail pack stopped there. The coordinates past the spatial
ones are now undefined; for every other texture they already were.
A test emits `image_get_lod` of a 2D array, validates it and makes a
pipeline of it.
Author
|
Closing as a duplicate of #260, which I missed when I checked for existing work (I searched issues, not pull requests). Sorry for the noise. Measured on the retail pack against
The synthetic test here ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #279.
Problem
3 pixel programs of the retail shader pack fail validation with
out of bound coord must be undef. Their draws are dropped.All three take the level of detail of a 2D array texture (
image_get_lod,dim:SQ_RSRC_IMG_2D_ARRAY). The lowering passedcalculateLODall three coordinates, so the array slice went in ascoord2. A level of detail only uses the spatial coordinates, and the validator wants the rest undefined. (The samples of the same texture in those programs pass the slice correctly.)What
lower,image, op 81:calculateLODtakes the coordinates up tospatial, which iscoordsminus the slice of a 1D or 2D array; the others areundef. For every other texture kind they already were, sincecsstarts asundef.the_level_of_detail_of_a_2d_array_takes_no_slice, a synthetic pixel program withimage_get_lodof a 2D array from a table. It emits, validates, and makes a pipeline on hardware and WARP. Without the change it fails with the same validator error as the title's programs.Tested
RTX 5090, driver 621.24, Windows 11,
main310c6eb.victory translate --validate --list:--pipelineson the 3 creates 3 pipelines, 0 refused.cargo test -p victory-shader --locked --no-fail-fast -- --test-threads=4: 215 passed, 0 failed, 3 ignored.cargo clippy -p victory-shader --all-targets --locked -- -D warnings, with and without--all-features: clean.cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4: 511 passed, 0 failed, 9 ignored.Not tested
AI use
Claude Code with Claude Opus 5.5 found the failure on the retail pack, wrote the change and the test, ran the checks above and wrote this. The test uses a synthetic program. The title's shaders were only read on my machine, and nothing from them is in this PR.