direct compute: SCC liveness treats SCC-neutral SOP1 ops as SCC readers #3174

Closed
opened 2026-11-27 20:23:50 +00:00 by Leyukaka · 0 comments
Leyukaka commented 2026-11-27 20:23:50 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-27T20:23:50Z.


Part of #2935 (instruction coverage). Target branch main. I am taking it.

Gap. The direct compute SCC liveness (DirectCompute::uses_scc_after) treats every SOP1 outside a short list as an unknown SCC reader. An SCC written by a byte-window descriptor rewrite therefore stays live past instructions that neither read nor write SCC, such as s_ff1_i32_b64. The rewrite is then refused with "numeric SCC from a symbolic descriptor field".

Measured on a local capture of 2,689 compute requests (counts and instruction shape only), with compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests on main 6057071b (the commits since then do not touch gfx1013_compute_native.cpp or gfx1013_direct_compute.inl):

  • 13 requests stop first at that refusal; 6 of them because of this.
  • With the change, 1 compiles (403 to 404). 3 stop at "direct descriptor address outside bound table", and 2 at s_ff1_i32_b64 with an EXEC source, which stays refused.

Plan: classify the SOP1 ops the direct path lowers by their SCC behaviour.

  • SCC-neutral: the scans, s_brev, s_sext, s_bitset0/s_bitset1 and s_bitreplicate.
  • SCC writers: s_abs_i32, the 32-bit counts and the remaining b64 saveexec forms.
  • s_cmov is left to #3071 and stays conservative here.

Unclassified ops keep the conservative rule.

Tests: compile controls. The rewrite followed by s_ff1_i32_b64 and s_brev_b32 compiles. The same rewrite followed by s_cselect_b32 stays refused.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6653935668 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3174). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-27T20:23:50Z. --- Part of #2935 (instruction coverage). Target branch `main`. I am taking it. **Gap.** The direct compute SCC liveness (`DirectCompute::uses_scc_after`) treats every SOP1 outside a short list as an unknown SCC reader. An SCC written by a byte-window descriptor rewrite therefore stays live past instructions that neither read nor write SCC, such as `s_ff1_i32_b64`. The rewrite is then refused with "numeric SCC from a symbolic descriptor field". **Measured** on a local capture of 2,689 compute requests (counts and instruction shape only), with `compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests` on `main` `6057071b` (the commits since then do not touch `gfx1013_compute_native.cpp` or `gfx1013_direct_compute.inl`): - 13 requests stop first at that refusal; 6 of them because of this. - With the change, 1 compiles (403 to 404). 3 stop at "direct descriptor address outside bound table", and 2 at `s_ff1_i32_b64` with an EXEC source, which stays refused. **Plan:** classify the SOP1 ops the direct path lowers by their SCC behaviour. - SCC-neutral: the scans, `s_brev`, `s_sext`, `s_bitset0`/`s_bitset1` and `s_bitreplicate`. - SCC writers: `s_abs_i32`, the 32-bit counts and the remaining b64 saveexec forms. - `s_cmov` is left to #3071 and stays conservative here. Unclassified ops keep the conservative rule. **Tests:** compile controls. The rewrite followed by `s_ff1_i32_b64` and `s_brev_b32` compiles. The same rewrite followed by `s_cselect_b32` stays refused. AI-assisted.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows#3174
No description provided.