Shaders: lower v_permlane16_b32 and v_permlanex16_b32 with EXEC/FI/BC #124
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/124"
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 Zettrox/ztrx. Originally posted by VastyViz on 2026-11-25T13:13:06Z.
Lower
v_permlane16_b32andv_permlanex16_b32directly to DXIL outside whole-wave sections, and modelv_permlane16_b32alongsidev_permlanex16_b32(withexec,fi, andbound_ctrl) in whole-wave section simulation:v_permlane*toconsole_lanesinemit/lower.rs(keeping it out ofcrosses, since both instructions stay inside 32-lane halves) so standalone permlane shaders get console lane order and still split cleanly into 32-lane halves on 32-lane hosts.v_permlane16_b32andv_permlanex16_b32invalu_op: decode the per-lane 4-bit source index fromsrc1(row lanes 0..7) orsrc2(row lanes 8..15), honorfi(opsel[0]) andbound_ctrl(opsel[1]), and check source-lane liveness withwaveActiveBallot(guard.unwrap_or(true))across both 32-lane and 64-lane host waves (guarded and branchedEXEC) without passing inactive lanes towaveReadLaneAt.emit/wave.rssection simulation to coverv_permlane16_b32and honorexec,fi, andbound_ctrl.emit/valu_tests.rsandemit/wave64_tests.rs(wave32, wave64 split into 32-lane halves, native wave64, guarded and branchedEXEC, all four(fi, bound_ctrl)modes) plus a section-simulation unit test inemit/wave.rs.Verified on the title's shader archive (
26,503containers,VICTORY_HOST_WAVE=32):emit: v_permlanex16_b32drops from1to0(2,622 -> 2,623compute shaders emitted & validated,0regressions), and the target compute shader creates a D3D12 pipeline on an RTX 3080. Fullcargo clippy(default &--all-features),cargo test --workspace --locked,cargo xtask policy, andgit diff --checkpass.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.