Repository navigation
Conversation
lukaslw-lab
approved these changes
Dec 2, 2026
lukaslw-lab
left a comment
Contributor
There was a problem hiding this comment.
Reviewed 9421e92a (draft) by reading the diff; not built or run.
Verdict: approve. A varying s_cbranch_vccz over a VCC-guarded body is equivalent per invocation to a DXIL branch on the lane's own VCC bit, and only that shape is accepted. No MUST.
- SHOULD Run a before/after
ps86census onf365f125. On our local stack this wall grew from 73 to 85 stages as other PRs cleared earlier walls, so the census on main and the stacked count would both show the real gain. - NIT This conflicts with #3829 and #3834 in
gfx1013_direct_graphics.inl. - Checked, no finding:
pixel_vcc_skip(gfx1013_direct_graphics.inl:1482): VCCZ only, forward, with the target reached by this branch alone and nothing entering the body. The producer must be av_cmpinto VCC, or a wave64s_and_b64 vcc, exec, x. Without SAVEEXEC, every lasting write must bev_cndmask dst, dst, x, vcc(:1536), which keeps the value of a lane whose VCC is clear. That makes "skip when the wave's VCC is zero" equal to "skip per lane". Every other write is scratch and is cleared at the join. With SAVEEXEC on VCC and a matching restore, the incoming edge already selects those lanes, so the save and restore are lowered as no-ops.local_aluand the carry exclusion keep the body free of cross-lane reads and VCC writes. The join adds VCC's dependencies to the merged values (:1594), so later branches on them stay varying.- Folding: integer
v_cmp_eq/neands_cmp_eq/lgof a register with itself are exact (:2870), as isv_and_b32with 0 (:3167). Loops and predicates are excluded.
Tests: _controls is in the pr filter. The 21 WARP and hardware draws with wrong references ran only locally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #3814.
Summary
Targets
graphics scalar condition depends on a varying input(73 pixel stages in #3814):s_cbranch_vcczshortcuts over lane-preservingv_cndmask_b32writes or a matchings_and_saveexec+ restore (pixel_vcc_skip), expiring scratch registers and saved mask state at the join and propagating input dependencies onto merged PHIs. Varyings_cbranch_vccnzwith invertedv_cndmask_b32remains refused.uniform_operand) and folds pure pixel integer self-comparisons (s_cmp_eq/lg,v_cmp_eq/ne) andv_and_b32with zero while preserving flat-attribute input dependencies.Verification
ctest --preset pr --no-tests=error --output-on-failure -R '^native_pixel_varying_vcc_branch_controls$': passed.dev) and Release (release): 15/15 passed in each build, zero skips, zero new C++20/W4warnings on edited lines.10.0.26100.9818) and NVIDIA GeForce RTX 5080 (32.0.16.2140) on Windows 11 (26200.9974), with every wrong reference mismatching.tests/bidi_controls_check.py,tests/docs_links_check.py, andgit diff --check origin/main..HEADpassed.#3514's 5-PR ready cap.