shader: say which cross-lane operation outside compute, and in which stage #158
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/158"
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 LakshanSivakumar/Native-Victory-macOS. Originally posted by m0rff on 2026-11-26T22:13:33Z.
A refusal split, like #118 and #131: it names the form instead of lowering it. Refs #4.
Why. "a cross-lane operation outside compute" is the largest refusal group nobody has claimed in the M5 Ultra log of #147 (commit
57b7ebd): 127 of 639, all vertex/pixel pairs.docs/native-host.mdputs them on the pixel programs into the HDR scene colour (RGBA16F + R32_UINT). The message does not say which operation, and the right lowering depends on it. A quad-local op can use quad operations. A row op (DPP16 row_*,v_permlane16) stays inside 16 lanes, and Metal SIMD-groups hold whole rows. A constant-lanev_readlanereads a console lane that a pixel wave on the host does not have. Lowering any of these blind risks wrong values with no refusal at all, which is worse than refusing.What.
cross_lanetakes the refusal text from each call site: the same prefix, then the operation and the stage (outside_compute!builds the two static strings withconcat!):ds_swizzle_b32 within a quad,ds_swizzle_b32 across quads,ds_bpermute_b32DPP8,DPP quad_perm(refused only outside pixel programs),DPP row_shl, row_shr or row_ror,DPP row_mirror or row_half_mirror,DPP row_share or row_xmask,DPP with another row control(DPP_CTRL ranges, RDNA2 ISA)v_readlane_b32 of a constant laneorof a computed lane,v_writelane_b32,v_permlane16_b32 or v_permlanex16_b32,v_mbcnt of a console lane maskEach one ends with
in a pixel programorin a vertex program, because the log line names both stages and not the one that refused. Tallies that group bya cross-lane operation outside computestill match. Nothing new is lowered.Test.
gfx_refusal_tests::a_cross_lane_operation_outside_compute_says_which_and_where: row_shr, ds_bpermute and a constant-lanev_readlanein a pixel program, and ds_bpermute and quad_perm in a vertex program, each with its exact text. A quad_perm DPP in a pixel program still lowers. It fails on main. No other test or doc used the old text.Checks.
cargo test -p victory-shader -p victory-hle -p victory -p victory-gpu -p xtask, Windows clippy with-D warnings, andcargo xtask policyall pass. I don't have the game, so this has not been run in game. The next tester log will show which form dominates, and the lowering for it comes next.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T22:39:29Z.
Review: DISMISSED
Reviewed and tested together with the other open PRs on main (macOS x86_64 workspace tests, the setup shell tests, and Windows clippy). Thanks!
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T22:39:47Z.
Review: APPROVED
I merged main into this branch and resolved the conflict with the PR merged before it (both changes kept). Reviewed and tested together with the other open PRs on main (macOS x86_64 workspace tests, the setup shell tests, and Windows clippy). Thanks!