shader: read concrete src_scc words in bounded mesh lowerers #2426
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2434"
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 R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T16:37:43Z.
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).
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T18:23:51Z.
Review: COMMENTED
Review of head
c696bd2d(diff against origin/main, 3 files, +50 lines).What I checked
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.src_sccintools/startup/gfx2hlsl.py, a different lowerer. #2305 (merged) only refused stale SCC reads after descriptor arithmetic.check_scc_operandcovers both comparison forms in either source position, the undefined and dynamic refusals, and the carry froms_add_u32throughs_mov_b32.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: cleanreturn int(self.scc)changed toreturn 0: the new check fails (AssertionError).return 1 - int(self.scc): the check fails (ValueError on the unproven geometry word).No blocking findings. No Windows run on my side. This comment is not an approval.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T18:48:06Z.
Windows results at the exact PR head
c696bd2d48898bafd2c2c13ee8ef63c71a3704b2are now available. Windows Server 2025 WARP passed bothmesh_dynamic_aot_cpuandmesh_dynamic_aot_draw_warpin CMake Debug and Release. Each preset recorded 13 matching 1,024-pixel images. Build and CTest logs.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.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T20:17:02Z.
Win2025 WARP receipt for head
0f5ae41aafter 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
0f5ae41ad8a019fb3fa92c906594c5d344ae4080:--preset dev):cmake --build --preset dev -- -j 2):0.00s(configure0.00s)ctest --preset dev -R 'mesh_dynamic_aot_(cpu|cli_check|draw_warp)' --parallel 2 --no-tests=error --output-on-failure): 3/3 passed (6.80s:mesh_dynamic_aot_cli_check4.02s,mesh_dynamic_aot_draw_warp5.19s,mesh_dynamic_aot_cpu2.29s)/O2(--preset release):cmake --build --preset release -- -j 2):0.00s(configure0.00s)ctest --preset release -R 'mesh_dynamic_aot_(cpu|cli_check|draw_warp)' --parallel 2 --no-tests=error --output-on-failure): 3/3 passed (6.37s:mesh_dynamic_aot_cli_check3.80s,mesh_dynamic_aot_draw_warp4.99s,mesh_dynamic_aot_cpu2.31s)tests/mesh_dynamic_aot_check.pyok (1.3s),tests/mesh_dynamic_geometry_check.pyok (0.3s),tests/mesh_join_descriptor_check.pyok (0.6s),tests/mesh_lane_spill_check.pyok (0.6s)sccache: 0/12 hits; wall23.3sAI-assisted; commands listed were executed locally.