compute: classify SCC-neutral SOP1 ops in the direct SCC liveness #3189
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3189"
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 Leyukaka on 2026-11-27T20:54:19Z.
Fixes #3174. Part of #2935. Target branch
main.Change (
src/gfx1013_direct_compute.inl,DirectCompute::uses_scc_after): SOP1 ops that the direct path lowers are classified by their SCC behaviour, instead of every SOP1 outside a short list being treated as an unknown SCC reader.s_ff0/s_ff1(b32, b64),s_flbit(b32, b64, i32, i64),s_brev(b32, b64),s_sext_i32_i8/_i16,s_bitset0/s_bitset1(b32, b64) ands_bitreplicate_b64_b32.s_abs_i32, the 32-bits_bcnt0/s_bcnt1, and the remaining b64 saveexec forms (xor, andn2, orn2, nand, nor, xnor).s_cmovis not touched; merged withmain, #3071's SCC-reader entry fors_cmov_b32/_b64/s_cmovk_i32is kept.An SCC written by a byte-window descriptor rewrite was kept live past such ops, for example
s_ff1_i32_b64. It was then refused as "numeric SCC from a symbolic descriptor field".Tests. The setup was Windows 11 build 26300.9974 with an NVIDIA GeForce RTX 5080 (driver 32.0.16.2101) and DXC from the Windows SDK 10.0.26100, on
main0f3e8248plus this commit.native_direct_containeradds two compile cases:s_ff1_i32_b64ands_brev_b32now compiles;s_cselect_b32reading SCC is still refused.native_salu*andnative_bytewin*pass.native_scalar_lds_hardwarefails with "native compute PSO creation failed", as it does onmainwithout this change.s_ff1from the SCC-neutral set failsnative_direct_container.Measured on a local capture (counts and instruction shape only) with
compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests. The baseline ismain6057071b, and the change is on0f3e8248; the commits in between do not touch the two native source files.s_ff1_i32_b64with an EXEC source, which stays refused.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-27T21:14:18Z.
LGTM on the code quality and test coverage. The SCC liveness improvements are solid, and the re-added
s_cmov*/ 64-bit comparison paths look correct.\n\nNote: This PR re-addss_cmov_b32,s_cmov_b64,s_cmovk_i32, and 64-bit scalar comparisons (s_cmp_eq_u64, etc.) which were removed in #3192. Please coordinate with the author of #3192 to ensure these changes don't conflict on merge, or clarify if one PR supersedes the other.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-27T21:41:34Z.
Review: APPROVED
Independently reviewed
e6e10838. An SCC-preserving SOP1 now passes liveness through to actual readers; known writers stop propagation unless the instruction explicitly reads SCC. The paired descriptor controls verify that the unused symbolic SCC is accepted and a later SCC read through a scan still refuses. The proposed #3192 head composes cleanly and keeps #3071’s conditional moves and #3081’s scalar comparisons.Built
compile_dxil native_store_replay native_compute_ir_dumpin Debug and Release overd99e0ae4plus #3190 (tree8afd409a70773b17d781bfe034b03dc5dd6f0ff9).ctest --test-dir <build> --no-tests=error -j 1 -V -R '^native_(direct_container$|(salu_(cmov|cmp64|bitscan64)|s_quadmask)_.*)'passed 11/11 in each configuration. Rebuilt Release over actualmainafe70bd7(tree51db1e8c4c331c0862a4c2d979e196adaf83b52b) and the same 11 passed. I also builtnative_sampler_heapfor #3140's adjacent suite. Its first run reported an iostream error in the temporary directory; rerunning^native_sampler_heap_(warp|hardware)$with a shorter temp path passed all 69 hardware assertions. WARP returned capability skip 77 because it has no wave32. Combined Release result on current main is 12 passes, 1 capability skip.NVIDIA GeForce RTX 4060 Laptop driver
32.0.16.1656, Windows build26200.9974, SDK/DXC10.0.26100.0.git diff --check HEAD^1 HEADand required hosted checks passed.