xshader: skip uniform scalar arithmetic and bitcounts in scc_from_mask #558
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/558"
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 brcly/TuxBox. Originally posted by glovepost on 2026-11-29T23:17:59Z.
Split out from #523 per review. Extends
hlsl::driver::abi::scc_from_maskso uniform scalar arithmetic and bit counts (s_add_*,s_sub_*,s_min_*,s_max_*,s_abs_i32,s_bcnt1_*) whose sources do not readexecorvccare recognized as wave-uniform rather than treated as per-lane masks.Changes
tools/shader-compiler/src/hlsl/driver/abi.rs: skip uniform scalar arithmetic and bit counts withoutexec/vccsources inscc_from_mask.tools/shader-compiler/src/tests/hlsl/abi.rs: addscc_from_mask_skips_uniform_scalar_arithmetic_and_bit_counts.Verification
python3 tuxbox.py check --no-gpupassed 9/9 checks:host_profilesunchanged)1.9.2609.5) flags (-disable-lifetime-markers -fnew-inlining-behavior, plus-O1forcs_6_6):213/213translated shaders compiled with 0 DXC segfaults (45unsupported byxshader, identical toorigin/main).tools/stage_baseline.py cpuacross the 58 locally recordedtools/reference/stage-baseline/sample.jsonrequests (89translations):89/89compiled and89/89had byte-identical HLSL and DXIL (0regressions).tuxbox.py check) and ProjectScarlett were not run against this split branch.AI-assisted: split, rebased, and tested with LLM tooling.
Imported from brcly/TuxBox. Originally posted by glovepost on 2026-11-30T01:00:47Z.
Rebased onto
main(f482572a, commit6d414666358b) with no functional changes fromcf5c43f0, and ran the changed GPU checks on NVIDIA:TUXBOX_CHECK_JOBS=2 DXC=<dxc> python3 tuxbox.py check --changed --adapter 10de:1e84 --proton <proton> --prefix <prefix> --windows-dxc <windows-dxc>10de:1e84), driver620.73.04,GE-Proton11-14Lanes and fixtures on the GPU(lanes-bindless-compute,lanes-compute-root,lanes-compute-root-recovery,lanes-raster-tables,lanes-shader-cache) andShader translator on the GPUall passed (13 passed, 0 failed, 0 not run).Evidence: TuxBox check of 6d414666358b, no uncommitted changes, GPU 10de:1e84: 13 passed, 0 failed, 0 not runImported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T01:52:32Z.
The AMD check you were missing, on
6d414666: AMD iGPU (1002:13c0, RADV, Mesa 26.0.8, GE-Proton11-14, Linux), fullpython tuxbox.py check: 197 pass, 2 fail. The two ared3d12-streamandguest-frame-rgb10, each stopped by its 30 s limit at load 15 (another card's check and a game were running). Their suites run separately afterwards, at load about 6, pass in 3 of 3 runs, so I read the timeouts as our load, not the change. It isn't a clean full check. ProjectScarlett wasn't run on it. We also have mesh-program runs queued for this and #555 on both cards.Evidence: TuxBox check of
6d41466635, no uncommitted changes, GPU 1002:13c0: 13 passed, 1 failed, 0 not runImported from brcly/TuxBox. Originally posted by Claudineijoseprill on 2026-11-30T03:35:40Z.
AMD discrete RDNA 1 run, on
6d414666: Radeon RX 5700 XT (1002:731f, RADV, Mesa 25.2.8, GE-Proton11-14, Ubuntu 24.04),python tuxbox.py check --changedwith--proton,--prefixand--windows-dxc: 101 pass, 9 fail.Every gate matches a full check of unchanged
main(f482572a) on the same machine; no regressions. The 9 failures are features this card or driver lacks and fail the same onmain: 5lanes-mesh-*andtranslated-mesh(no mesh shaders),bvh64-queryandbvh32-query(no ray tracing), andpixel-interp(flatandhalffail with pipelineE_INVALIDARG; RADV doesn't exposeVK_KHR_fragment_shader_barycentricon this card).Not run: a game.
Evidence: TuxBox check of
6d41466635, no uncommitted changes, GPU default adapter: 11 passed, 2 failed, 0 not runImported from brcly/TuxBox. Originally posted by brcly on 2026-11-30T04:12:10Z.
Heads-up: main just landed a large cleanup (up to
e5d2e913), so this PR needs a rebase.rustfmt.toml).unwrap(), lossyascasts and undocumentedunsafeoutside tests.cargo fmt --check, rustdoc with warnings denied, and Miri on the providers' unit tests.The least painful way is to format your branch first, so the rebase only shows real changes:
Then run
python tuxbox.py check --no-gpu, which now includes the format step.If clippy flags something new:
Fromfor widening,TryFromfor narrowing, and a mask for bit fields.unwrap(): use?, orexpectwith the reason it can't fail.unsafeblock: it needs a// SAFETY:comment.CONTRIBUTING's "Code checks" section lists the commands. Thanks!