shader: guessed pixel input enables read the fixed-point position as a float #412

Open
opened 2026-11-27 17:05:42 +00:00 by github-bot · 2 comments
Owner

@⁠teamusec-krause on GitHub · 2026-11-27 17:01 UTC · original

Pixel programs whose description has no SPI_PS_INPUT_ENA word get their input enables guessed. In that guess the last entry VGPR is laid out as the next float system value. Some full-screen programs read that VGPR only as 16-bit words (SDWA WORD_0 / WORD_1), which matches the fixed-point position (POS_FIXED_PT, bit 15). With float position bits there, every pixel of a row reads the same source texel, and the final scene pass into the swapchain buffer comes out as horizontal bands of a single colour (the flat grey world).

Task: when the enables are guessed and the last entry VGPR is only ever read as words, guess it as the fixed-point position instead. Mark it as a guess in the code and in docs/native-host.md.

Draft fix: #407

**@⁠teamusec-krause** on GitHub · 2026-11-27 17:01 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/408) Pixel programs whose description has no `SPI_PS_INPUT_ENA` word get their input enables guessed. In that guess the last entry VGPR is laid out as the next float system value. Some full-screen programs read that VGPR only as 16-bit words (SDWA `WORD_0` / `WORD_1`), which matches the fixed-point position (`POS_FIXED_PT`, bit 15). With float position bits there, every pixel of a row reads the same source texel, and the final scene pass into the swapchain buffer comes out as horizontal bands of a single colour (the flat grey world). Task: when the enables are guessed and the last entry VGPR is only ever read as words, guess it as the fixed-point position instead. Mark it as a guess in the code and in docs/native-host.md. Draft fix: #407
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 17:05:42 +00:00
Author
Owner

@⁠teamusec-krause on GitHub · 2026-11-27 17:01 UTC · original

/claim

**@⁠teamusec-krause** on GitHub · 2026-11-27 17:01 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/408#issuecomment-7223944043) /claim
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-27 17:01 UTC · original

Claimed by @⁠teamusec-krause. Open a draft pull request with Refs #408 in its description within 24 hours, or the claim expires.

**@⁠github-actions[bot]** on GitHub · 2026-11-27 17:01 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/408#issuecomment-7223947684) Claimed by @⁠teamusec-krause. Open a draft pull request with `Refs #408` in its description within 24 hours, or the claim expires.
github-bot referenced this issue from a commit 2026-11-28 00:29:35 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.