Shaders: accept FSPX heap/sampler-heap/constants root types #3934

Open
kotekompotek wants to merge 1 commit from upstream-pr/3934 into main
kotekompotek commented 2026-12-01 10:30:29 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-12-01T10:30:29Z.


Summary

  • fspx_program rejected every root kind but Table/Descriptor/ImmediateSampler. Compute pipelines the offline deserializer rebuilds carry three more: resource heap (5), sampler heap (6) and root constants (0), so they refused as "an FSPX resource of an unknown root type" — in a boot log that was the single largest refusal class.
  • Map them like the corpus census: heaps take one user SGPR, descriptors two, and root constants fill the consecutive user SGPRs up to the next resource's user_data index (the last block defaults to two, clamped to the 32-register signature).
  • The corrupt-parts test now writes root 7 — still unassigned — to keep asserting rejection of genuinely unknown kinds.

Test plan

  • cargo test -p victory-shader native — 13 tests green
  • Boot log: zero "FSPX resource of an unknown root type" refusals where there were 346

AI-assisted. Tested on GTX 1050 2GB, Windows 11.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5583835381 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3934). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-12-01T10:30:29Z. --- ## Summary - `fspx_program` rejected every root kind but Table/Descriptor/ImmediateSampler. Compute pipelines the offline deserializer rebuilds carry three more: resource heap (5), sampler heap (6) and root constants (0), so they refused as "an FSPX resource of an unknown root type" — in a boot log that was the single largest refusal class. - Map them like the corpus census: heaps take one user SGPR, descriptors two, and root constants fill the consecutive user SGPRs up to the next resource's `user_data` index (the last block defaults to two, clamped to the 32-register signature). - The corrupt-parts test now writes root 7 — still unassigned — to keep asserting rejection of genuinely unknown kinds. #### Test plan - [x] `cargo test -p victory-shader native` — 13 tests green - [x] Boot log: zero "FSPX resource of an unknown root type" refusals where there were 346 AI-assisted. Tested on GTX 1050 2GB, Windows 11.
passerbyyhx commented 2026-12-01 12:35:18 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by passerbyyhx on 2026-12-01T12:35:18Z.


At 074ff0bb, FSPX compute dispatches on RTX 4090 Laptop and WARP returned all 32 lane values when alternating resource slots 1→2→1. Swapping wrap/clamp across sampler slots 0 and 1 reversed the sampled pair from [7,19] to [19,7]. The parent stopped at parsing. A separate boundary test found that a final constant beginning at s31 was given width 2, extending into s32. The candidate constrains it to one remaining slot, rejects a start at s32, and passes 19/19 parser cases plus the two device probes: https://github.com/kotekompotek/VIctory/pull/3.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7311356281 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3934#issuecomment-7311356281). Originally posted by [passerbyyhx](https://github.com/passerbyyhx) on 2026-12-01T12:35:18Z. --- At 074ff0bb, FSPX compute dispatches on RTX 4090 Laptop and WARP returned all 32 lane values when alternating resource slots 1→2→1. Swapping wrap/clamp across sampler slots 0 and 1 reversed the sampled pair from [7,19] to [19,7]. The parent stopped at parsing. A separate boundary test found that a final constant beginning at s31 was given width 2, extending into s32. The candidate constrains it to one remaining slot, rejects a start at s32, and passes 19/19 parser cases plus the two device probes: https://github.com/kotekompotek/VIctory/pull/3.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3934:upstream-pr/3934'
git switch 'upstream-pr/3934'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3934'
git switch 'upstream-pr/3934'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3934'
git switch 'upstream-pr/3934'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3934'
git switch 'main'
git merge --squash 'upstream-pr/3934'
git switch 'main'
git merge --ff-only 'upstream-pr/3934'
git switch 'main'
git merge 'upstream-pr/3934'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!3934
No description provided.