Support isolated P10 reads on pixel shader inputs #2036
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2038"
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?
Imported from Marvisak/VIctory. Originally posted by DoubleD17 on 2026-11-25T03:51:44Z.
Isolated P10 reads in v_interp_mov_f32 now lower to the difference between vertex 1 and vertex 0 for eligible generic float32 pixel inputs. Preserve the input signature and the existing modes for P0 and coordinate pairs. Reject conflicting interpolation modes on the same row. Four focused tests passed on Windows x64 with DXIL validation using SDK 10.0.26100.0. On D3D12 WARP (DXGI 1414:008C), the packed VS/PS synthetic draw read back 0.5 for P10 and 0.25 for P0. Draw validation covers an unclipped synthetic triangle in host vertex order.
Adapted from fxceless/victory-fork #439.
AI-assisted.
Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T03:57:08Z.
Review: APPROVED
Verified locally merged onto
origin/main(940d32f, Windows 11 x64, NVIDIA GeForce RTX 5090 + WARP, Rust 1.98.1 MSVC):cargo test -p victory-shader --lib isolated_p10— 3 passed, 0 failed (1 ignored) on both RTX 5090 hardware andVICTORY_D3D12_WARP=1cargo clippy -p victory-shader --all-targets— 0 warningscargo xtask policy— ok (183 files ok)Clean support for isolated P10 reads on pixel shader inputs preserving packed input linkage and rejecting incompatible live interpolation. Looks good.
AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by jeremygold02 on 2026-11-25T04:02:42Z.
Triage verdict — Keep for the tested generic float32 inputs (
8c498ab)Evidence
Checks and limits
Next step
This verification was AI-assisted.
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T04:17:00Z.
Review: APPROVED
Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main
940d32f69b,cargo test -p victory-shader --locked.147 passed / 0 failed. Isolated P10 reads on pixel shader inputs (+3 tests) — 10-bit pixel-input path; mixed apps+shader, apps half Windows-only.
Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-25T04:30:33Z.
Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at
8c498ab.victory-shader: 247 passed, 3 failed, 4 ignored; the 3 non-ignoredisolated_p10_*tests pass. I also ran the ignored one:isolated_p10_and_p0_draw_with_a_packed_signaturepasses with--ignored(Windows SDK DXC, the DXIL validator and WARP are on this machine). The 3 failures are #1744's NVIDIA failures onmain. Same asmainon this hardware. Not run: a title.AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-25T05:38:37Z.
The P10 path also covers standalone P20 with one change: select vertex 2 instead of vertex 1 before subtracting P0. 665452c extends the same generic float32 path in one commit on
8c498abd25.On that exact head, the extended packed-signature WARP draw read back P10 = 0.5 and stopped at P20 with "a non-provoking vertex value". With the commit, all three shaders passed DXIL validation and the draw read back P10 = 0.5, P20 = -0.125 and P0 = 0.25. Both coefficient selectors also pass the packed-signature and incompatible-live-interpolation tests. The draw uses an unclipped triangle in host vertex order.
The full forced-WARP shader suite reported 247 passed, 3 failed and 4 ignored on both builds. The gather, lane-permute and edge-flagged triangle failures were shared. Strict shader Clippy and staged asset policy passed.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T09:19:06Z.
Automated triage for the maintainers.
Needs work.
emit/lower.rsnow lowers av_interp_mov_f32of P10 (Interp::Vertex { vertex: 0 }, previously refused as "a non-provoking vertex value") on an unpacked generic float32 input toattributeAtVertex(1) - attributeAtVertex(0)in the newisolated_p10, marks the input used with constant interpolation, sets the SFI0 barycentrics feature (flags::BARYCENTRICS,0x2_0000, correct bit and no collision with the existing flags), and rejects a row that another live read needs in a different mode. The code is careful and the tests cover the signature, PSV and the conflict case.What it needs:
translatereports with "a non-provoking vertex value" today and how many this clears.emit/rect.rssplits into two triangles with different second vertices (raised in the earlier review). Before, these shaders failed to translate; now they would produce silently wrong values for such draws. Either show parity for those cases or document the limitation with ashortcut:note atisolated_p10.665452c, offered in the comments with WARP results) fits the same path; consider folding it in. #1738 covers P10/P20 for rows that are also interpolated; the two should agree on vertex order.CI: passing (
check).Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-25T10:04:31Z.
Your refreshed head documents the ISA and the vertex-order constraint. I ported the isolated P20 follow-up to that exact head,
30b0692c77, and added clipped triangles to the packed-signature draw. 8b8c90dOn
30b0692with the same test, P10 reads 0.5 with and without clipping, and P20 stops at “a non-provoking vertex value”. With the follow-up, P10, P20 and P0 validate and read 0.5, -0.125 and 0.25 respectively for both triangles. All four focused tests passed on WARP. The full WARP shader run went from 245 passed, 5 failed, 4 ignored to 247 passed, 3 failed, 4 ignored. The gather, lane-permute and edge-flag failures were present on both builds. Clippy and repository policy passed.The shortcut still documents the open vertex-order question for strips and rectangles. AMD's definition of P20 as P2 - P0 is in section 12.2 of the RDNA 3 ISA.
Please preserve the Git author if you take the follow-up. If the code or test is folded into your commit, please add:
Co-authored-by: andrewpozdnakov7-jpg [email protected]
AI-assisted. Synthetic tests only.
Imported from Marvisak/VIctory. Originally posted by sinan-cmyk on 2026-11-25T10:29:49Z.
Offline measurement on a retail dump
Result: no count change against
main.I merged head
30b0692contomain940d32f(clean merge) and ranvictory translate --validate --listonshaders.rpf(1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result withmainprogram by program (25,889 programs). Validated: 23,918 onmain, 23,918 with this PR.No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right.
No shader names or data are included, per the asset policy. AI-assisted (Claude Code).
Pull request closed