Repository navigation
shader: read concrete src_scc words in bounded mesh lowerers - #2434
Conversation
AI-assisted with Codex + GPT-6.2 Astra (xhigh).
tedin7
left a comment
There was a problem hiding this comment.
Review of head c696bd2 (diff against origin/main, 3 files, +50 lines).
What I checked
- Change is small and additive:
Wave.scalarintools/mesh_entry_aot.pynow returns the SCC bit as a 0/1 word, with specific refusals for an undefined SCC and for a constant-buffer-dependent (Dyn) SCC. No sibling table or callsite is left out. - Not a duplicate: the open #1821 covers
src_sccintools/startup/gfx2hlsl.py, a different lowerer. #2305 (merged) only refused stale SCC reads after descriptor arithmetic. - The new
check_scc_operandcovers both comparison forms in either source position, the undefined and dynamic refusals, and the carry froms_add_u32throughs_mov_b32. - The PR body cites WARP/RTX readbacks. I did not run them. I did not check which head SHA they cover.
Commands run locally (worktree at the PR head)
python3 tests/mesh_dynamic_aot_check.py: passpython3 tests/docs_links_check.py: passpython3 tests/bidi_controls_check.py: passgit diff --check origin/main...HEAD: clean- Mutation 1:
return int(self.scc)changed toreturn 0: the new check fails (AssertionError). - Mutation 2: changed to
return 1 - int(self.scc): the check fails (ValueError on the unproven geometry word). - Both mutations reverted.
No blocking findings. No Windows run on my side. This comment is not an approval.
AI-assisted; commands listed were executed locally.
|
Windows results at the exact PR head I also repeated the SCC-specific source-built programs at that checkout on Windows 11 build 26100.9711. The two operand forms, static/runtime translations, and triangle/quad geometry gave 16 matching 1,024-pixel images across the RTX 4060 (32.0.15.9579) and local WARP (10.0.26100.9711). Changing the comparison immediate produced 496 incorrect pixels in the rendering control on each. Intel UHD 770 reported no mesh support (exit 77). The local D3D12 debug layer was unavailable. |
|
Win2025 WARP receipt for head 0f5ae41 after updating with main. Note: the automatic Python check list included tests/mesh_entry_check.py, which needs a mode argument and exits 1 without one; it was left out via --py-checks (the PR does not touch it). Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
AI-assisted; commands listed were executed locally. |
Part of #2413. The T2 report identified
int("src_scc", 0)as the first refusal in 15 inputs in its what-if run. I reproduced that exception in both bounded mesh lowerers with a source-built triangle/quad program.The shared wave model now returns a 32-bit scalar word of 0 or 1 for a known SCC. A read before SCC is defined, or while SCC depends on a constant-buffer expression, produces a specific refusal. The source fixture checks
s_cmp_eq_u32 src_scc, 1ands_cmp_lg_u32 0, src_sccbetween a geometry comparison and its branch. It covers the flag in either source position and also reads the carry froms_add_u32throughs_mov_b32.Verification
fd8106bfand80fd07bf. Both lowerers returned the original fixture's HLSL on the patched source. Both failed on the parent with the invalid integer literal.I tested the source fixture on
b442b57f. The reported 15 private inputs weren't used.AI-assisted with Codex + GPT-6.2 Astra (xhigh).