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 5c1c21d0 (draft) by reading the diff; not built or run.
Verdict: approve. Each newly flattened operation is safe to run for inactive lanes, and every scalar it writes expires where a skipped wave could differ. No MUST.
- SHOULD Run a before/after
ps86census onf365f125. Besides the 344 targeted stages, pixel CMPX arms now go throughflattened_op(gfx1013_direct_graphics.inl:1389), so VCC written in an arm now expires at the restore, where it used to stay readable. Expiring it is right, because the guest'sv_cmpleaves 0 for lanes outside the arm. But a stage that read that VCC after the arm would now be refused, and the census would show whether any did. - NIT This also conflicts with #3829 in
gfx1013_direct_graphics.inl, which makes #3829 conflict with four open pixel PRs. Merging #3829 last would keep that to one rebase. - Checked, no finding:
- Speculation (
:1002): images need a fixed descriptor (< 16) and either a texel load or an explicit-LOD or gradient sample with a constant sampler, so nothing depends on derivatives or another lane. A buffer read clamps an inactive lane's address to element 0 (gfx1013_direct_compute.inl:1060,:1086), and the binding's required size grows to cover it. - Scalars: only
s_movk/s_mov/s_add_u32/s_lshl_b32/s_cselecton numeric operands, and fixed-offsets_buffer_loadon a fixed descriptor. A write to the saved EXEC pair is refused.expire_arms(:1058) expires the first arm's writes at the complement and both arms' writes at the restore, SCC and VCC included. helper_result_unobserved(:2156) now also requires the predicate to be the coverage predicate, so a narrower arm keeps itsselect.masked-scalarwas replaced bymasked-scalar-escape: the scalar write is now accepted, and its later use outside the arm is refused. That is the intended change, not a weaker test.
- Speculation (
Tests: _controls (16 cases, 24 refusals) is in the pr filter. The 14 WARP and hardware draws 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
Extends lane-local lowering inside flattened masked pixel regions (
GraphicsMaskRegionsSAVEEXEC and CMPX partitions) so additional read-only and lane-local operations lower withselect-predicated VGPR writes instead of refusing withmasked graphics region requires lane-local vector arithmetic:s_clauseand all threev_fma_mix*forms (v_fma_mix_f32,v_fma_mixlo_f16,v_fma_mixhi_f16).image_load,image_load_mip,image_sample_d,image_sample_l,image_sample_lz,image_sample_c_lz) and fixed-tablebuffer_load_dword/buffer_load_formatloads, guarding inactive-lane buffer addresses to element0and recording the minimum required view size on the binding.v_cmp_* vcc, ...(consumed byv_cndmask_b32), fixed-offset bound-tables_buffer_load_dword*, and numeric scalar ALU (s_movk_i32,s_mov_b32,s_add_u32,s_lshl_b32,s_cselect_b32), expiring every arm-written SGPR/VCC/SCC at the complement and restore boundaries and refusing any overwrite of the saved EXEC pair.helper_result_unobservedto requirealu.graphics_predicate == coverage_predicateso narrower flattened arms never drop the incoming-valueselect.Verification
ctest --preset pr --no-tests=error --output-on-failure -R '^native_pixel_masked_region_alu_controls$': passed (16 accepted DXIL cases + 24 refusal controls).out/build/dev) and Release (out/build/release): 15/15 passed in each build with zero skips, including 14 exact 8×2 GPU readback draws on both WARP (10.0.26100.9818) and NVIDIA GeForce RTX 5080 (32.0.16.2140) on Windows 11 (26200.9974), plusoffscreen_check --self-testin both builds. Negative controls differed on the exact 6 inactive pixels starting at(0,0).tests/bidi_controls_check.py,tests/docs_links_check.py, andgit diff --check origin/main..HEADpassed with zero new/W4warnings on edited lines.#3514's 5-PR ready cap; ready to promote once a review slot opens.