shader: guessed pixel inputs take a word-only entry VGPR as the fixed-point position #407
No reviewers
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS!407
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-403"
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?
@teamusec-krause on GitHub · 2026-11-27 16:57 UTC · original
teamusec-krause:vibe/fixed-point-ps-position-b4986d→main· +66 −1 · 3 files · 1 commits · draftWhat this changes
Pixel programs whose description gives no input enables (no
SPI_PS_INPUT_ENAword in the register image) had their last entry VGPR laid out as the next float system value. Some full-screen programs that address their source by pixel read that VGPR only as 16-bit words (SDWAWORD_0/WORD_1): it is the fixed-point position (POS_FIXED_PT, bit 15). With float position bits there, every pixel of a row read the same source texel, and the final scene pass into the 3840x2160 swapchain buffer came out as bands of one colour each (rows 0-127 one colour, 128-2047 another, every 16th row from 2048 a third). On screen that was the flat grey world.graphics::word_only_entry_vgprs: entry VGPRs whose every explicit read is a VALU source taken as a 16-bit word.graphics::infer_with: when the enables are guessed and the last entry VGPR is one of those, it gets bit 15 instead of the next float component. A VGPR also read whole keeps the old guess.What a run shows with it. This was measured on a local branch that carries this commit plus other changes I have not sent yet, so the numbers are not from this PR alone. The run was warm-cache, headless, on an M-series Mac. The world appears about 82 s after start, at 1.1–1.3 fps; loading runs at about 20 fps. The picture is a recognisable lit scene at a plausible exposure: an interior with a window onto a sunlit yard, with plants and a figure. No screenshot is attached (game content). ROADMAP gets a short note under "Solved recently".
Still wrong in that picture, and not addressed here:
Refs #412
How it was tested
cargo test -p victory-shader(host): 403 + 5 passed, 0 failed, 3 ignored. That includes the newan_entry_vgpr_read_only_as_words_is_guessed_as_the_fixed_point_position, which checks both cases: read only as words gives bit 15, and also read whole stays a float.cargo test --target x86_64-apple-darwin -p victory-hle -p victory-loader -p victory: all passed, 0 failed.cargo test --target x86_64-apple-darwin -p victory-gpu(with the Metal Shader Converter): 412 passed, 0 failed, 6 ignored.cargo build --release --target x86_64-apple-darwin -p victory: builds.cargo xtask policy: 398 files ok.cargo clippy ... --target x86_64-pc-windows-gnullvm -- -D warnings: not run here, because the gnullvm target isn't installed on this machine.cargo clippy -p victory-shader --all-targets -- -D warningsis clean on the host and onx86_64-pc-windows-msvc. CI will run the real gate.Checklist
VICTORY_*variable and documented (none added)github-bot referenced this pull request2026-11-28 05:17:37 +00:00
@AnastasisKon on GitHub · 2026-11-28 17:11 UTC · original · approved these changes
Read the diff:
word_only_entry_vgprsclassifies entry VGPRs whose every explicit read is an SDWA WORD_0/WORD_1 VALU source, andinfer_withthen marks the last such entry VGPR as the fixed-point position (bit 15) instead of a float system value — the guess is marked in the code and ROADMAP as the repo requires. Synthetic testan_entry_vgpr_read_only_as_words_is_guessed_as_the_fixed_point_positionpasses on the head49adfe97(27/27 graphics tests), and the whole-dorkspace windows clippy with-D warningsis clean. Approving.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.