direct compute: accept EXEC as the destination of s_bitreplicate_b64_b32 #3170

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

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


Part of #2935 (instruction coverage). Target branch main. I am taking it. This is the direct C++ path; #3030 (merged) covered s_bitreplicate_b64_b32 in gfx2hlsl.py.

Gap. Captured compute programs set EXEC from a lane pattern with s_bitreplicate_b64_b32 exec, <constant>, for example 0xff00ff00. Direct compute refuses it with "bitreplicate requires an aligned general scalar pair or compute VCC".

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):

  • 11 requests stop first there.
  • With the change, 4 compile: 403 to 407, and 416 to 420 in the requests of one start-up run.
  • Of the others, 4 stop at v_permlanex16_b32 (#3021, PR #3022) and 3 at "direct scalar move destination".

Plan:

  • Accept EXEC (s126/s127) as the destination pair in compute, written like any other EXEC pair write.
  • Odd pairs, other special registers and graphics stay refused.

Tests: a hardware readback that sets EXEC from four patterns, stores under it, restores EXEC and stores the saved EXEC words, plus a refusal control.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6653841478 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3170). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-27T20:16:06Z. --- Part of #2935 (instruction coverage). Target branch `main`. I am taking it. This is the direct C++ path; #3030 (merged) covered `s_bitreplicate_b64_b32` in `gfx2hlsl.py`. **Gap.** Captured compute programs set EXEC from a lane pattern with `s_bitreplicate_b64_b32 exec, <constant>`, for example `0xff00ff00`. Direct compute refuses it with "bitreplicate requires an aligned general scalar pair or compute VCC". **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`): - 11 requests stop first there. - With the change, 4 compile: 403 to 407, and 416 to 420 in the requests of one start-up run. - Of the others, 4 stop at `v_permlanex16_b32` (#3021, PR #3022) and 3 at "direct scalar move destination". **Plan:** - Accept EXEC (s126/s127) as the destination pair in compute, written like any other EXEC pair write. - Odd pairs, other special registers and graphics stay refused. **Tests:** a hardware readback that sets EXEC from four patterns, stores under it, restores EXEC and stores the saved EXEC words, plus a refusal control. 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#3170
No description provided.