shader: say which 16-bit read of a 32-bit input is refused #136

Manually merged
github merged 1 commit from github-bot/gh-136 into main 2026-11-26 19:08:27 +00:00 AGit
Owner

@⁠Olima34 on GitHub · 2026-11-26 18:27 UTC · original
Olima34:fix/shader-f16-input-causes → main · +51 −1 · 3 files · 1 commits · merged 2026-11-26 19:02 UTC

A refusal split, like #131 and #134: it names the form instead of lowering it.

What it is. "a 16-bit read of a 32-bit input" refused 3 unique shaders in tester log #123. They are pixel shaders: the log's pipeline name starts with the vertex shader's, which made them look like vertex shaders. The refusal is raised in the interpolation path, when v_interp_p1ll_f16/v_interp_p2_f16, or a high-half read, hits a PS input whose stage data lacks the fp16 flag (bit 3).

Why not lowered. What the hardware returns for a 16-bit read of a 32-bit exported attribute is not documented. In guessed pipelines the missing flag may also come from our guessed stage data rather than from the program, so lowering it would be a guess.

What. The refusal now says which read it is:

  • a 16-bit read of a 32-bit input: the high half of an input not marked 16-bit (op_sel high);
  • a 16-bit read of a 32-bit input: an f16 interpolation of an input not marked 16-bit.

An input the stage data doesn't list at all is refused earlier ("an interpolated attribute the stage data does not list"), so it never reaches this refusal.

Test. emit::tests::a_16_bit_read_of_a_32_bit_input_says_which: a p1ll+p2 sequence with and without high. It fails on main with the generic text. No test or doc in crates/ cited the old text.

victory-shader and victory-gpu tests (arm64), Windows clippy and cargo xtask policy pass.

**@⁠Olima34** on GitHub · 2026-11-26 18:27 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/136) `Olima34:fix/shader-f16-input-causes` → `main` · +51 −1 · 3 files · 1 commits · merged 2026-11-26 19:02 UTC A refusal split, like #131 and #134: it names the form instead of lowering it. **What it is.** "a 16-bit read of a 32-bit input" refused 3 unique shaders in tester log #123. They are pixel shaders: the log's pipeline name starts with the vertex shader's, which made them look like vertex shaders. The refusal is raised in the interpolation path, when `v_interp_p1ll_f16`/`v_interp_p2_f16`, or a high-half read, hits a PS input whose stage data lacks the fp16 flag (bit 3). **Why not lowered.** What the hardware returns for a 16-bit read of a 32-bit exported attribute is not documented. In guessed pipelines the missing flag may also come from our guessed stage data rather than from the program, so lowering it would be a guess. **What.** The refusal now says which read it is: - `a 16-bit read of a 32-bit input: the high half of an input not marked 16-bit` (op_sel high); - `a 16-bit read of a 32-bit input: an f16 interpolation of an input not marked 16-bit`. An input the stage data doesn't list at all is refused earlier ("an interpolated attribute the stage data does not list"), so it never reaches this refusal. **Test.** `emit::tests::a_16_bit_read_of_a_32_bit_input_says_which`: a p1ll+p2 sequence with and without `high`. It fails on main with the generic text. No test or doc in `crates/` cited the old text. victory-shader and victory-gpu tests (arm64), Windows clippy and `cargo xtask policy` pass.
"a 16-bit read of a 32-bit input" did not say whether the pixel shader interpolated the attribute as f16 or read its high half. It now does, so the next tester log tells which form the guessed pipelines of issue #123 use. Nothing is lowered.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 18:30:53 +00:00
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-26 18:56 UTC · original · approved these changes

Reviewed and tested together with the other open PRs on main (macOS x86_64 tests for shader, hle, loader and gpu, the setup shell tests, and Windows clippy). Thanks!

**@⁠LakshanSivakumar** on GitHub · 2026-11-26 18:56 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/136#pullrequestreview-6079231159) · **approved these changes** Reviewed and tested together with the other open PRs on main (macOS x86_64 tests for shader, hle, loader and gpu, the setup shell tests, and Windows clippy). Thanks!
github manually merged commit 579c65183f into main 2026-11-26 19:08:27 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.