Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
0192a5e
feat: record the compute root signature and descriptor tables (slots …
tedin7 Nov 24, 2026
682b0e0
feat: record compute descriptor tables (slot 35) and clear them on a …
tedin7 Nov 25, 2026
bb6b9a1
merge: keep the main-based compute root rework over the first draft
tedin7 Nov 25, 2026
033f40c
startup: record SetComputeRoot32BitConstant(s) (list slots 37, 39)
tedin7 Nov 24, 2026
9c87260
merge: sync with origin/main (keep compute tables and compute root SR…
tedin7 Nov 25, 2026
d8cc1ac
feat: record command-list slot 14 Dispatch on the desktop list
tedin7 Nov 24, 2026
48635dd
startup: refuse Dispatch under a compute root with unforwarded argume…
tedin7 Nov 25, 2026
7307c2f
startup: gate Dispatch on bound compute root SRVs and a pipeline buil…
tedin7 Nov 25, 2026
cffe8ce
startup: record SetComputeRoot32BitConstant(s) (list slots 37, 39)
tedin7 Nov 24, 2026
e0966b9
feat: record command-list slot 14 Dispatch on the desktop list
tedin7 Nov 24, 2026
f3b91dd
startup: refuse Dispatch under a compute root with unforwarded argume…
tedin7 Nov 25, 2026
c18cacb
startup: gate Dispatch on bound compute root SRVs and a pipeline buil…
tedin7 Nov 25, 2026
24c5f55
fix: pass pipeline root out-param in slot86 mesh cached pipeline build
tedin7 Nov 25, 2026
8a4df52
Merge origin/main into x2w-frontier-slot14-dispatch
tedin7 Nov 25, 2026
be1bce6
Merge branch 'pr1803' into startup/compute-dispatch-translated
NiiRoZz Nov 25, 2026
9828b5d
fix: track which compute root constant words were set; drop slot 40 c…
tedin7 Nov 25, 2026
44f0a23
Merge branch 'pr1974' into startup/compute-dispatch-translated
NiiRoZz Nov 25, 2026
2e25282
Merge branch 'pr1975' into startup/compute-dispatch-translated
NiiRoZz Nov 25, 2026
1e567a0
Dispatch translated compute programs with raw table buffers
NiiRoZz Nov 25, 2026
aca6e89
Log untranslated compute dispatches on their own line budget
NiiRoZz Nov 25, 2026
8e14a74
Count compute dispatches per key with their first refusal
NiiRoZz Nov 25, 2026
f2f7bfc
Dispatch translated compute programs that store to 2D textures
NiiRoZz Nov 25, 2026
15e8b7a
Dispatch translated compute programs that read 2D textures
NiiRoZz Nov 25, 2026
509dc53
Check a compute manifest without entry values at Dispatch
NiiRoZz Nov 25, 2026
d3c396c
Document texture views and the census of translated compute Dispatch
NiiRoZz Nov 25, 2026
70b27f2
Check the device on every 64th translated Dispatch and drop a livenes…
NiiRoZz Nov 25, 2026
d0b9e77
Compute dispatch: allow two outputs of one texture, refuse packed out…
NiiRoZz Nov 25, 2026
6e64faa
Merge branch 'main' into startup/compute-dispatch-translated
tedin7 Nov 25, 2026
771b935
Merge origin/main into pr2470
NiiRoZz Nov 25, 2026
15cdaff
Merge pr2470 (origin/main) into pr2490
NiiRoZz Nov 25, 2026
b49c738
Merge remote-tracking branch 'fork/startup/compute-dispatch-translate…
NiiRoZz Nov 25, 2026
f67f80a
Merge branch 'pr2470' into pr2490
NiiRoZz Nov 25, 2026
d17d262
Merge the current slot 14 Dispatch head (8a4df523)
NiiRoZz Nov 25, 2026
a205217
Merge the current root-constant store head (9828b5d8); pin the entry-…
NiiRoZz Nov 25, 2026
c821b4b
startup: avoid calling the compute driver after process termination b…
RavenCurseBurg Nov 25, 2026
67f25a9
Merge the reworked dispatch branch; a compute list transitions a samp…
NiiRoZz Nov 25, 2026
1f5fb5e
Repair a broken line in the dispatch check
NiiRoZz Nov 25, 2026
7728caf
Merge branch 'pr2470' into pr2490
NiiRoZz Nov 25, 2026
76ce41b
Pin four existing texture dispatch refusals: integer view format, man…
NiiRoZz Nov 25, 2026
f5b0303
Drop the repeated compute root reset left by merging two slot 14 snap…
NiiRoZz Nov 25, 2026
190e00a
Merge startup/compute-dispatch-translated (f5b03039) into startup/com…
NiiRoZz Nov 25, 2026
5e185ab
Merge upstream main; use upstream's process-exit flag and DllMain
NiiRoZz Nov 25, 2026
1991fd0
Merge commit '5e185ab7df261b7574e92eca77df063b69bb0ba5' into pr2490-fu
NiiRoZz Nov 25, 2026
9caf8fd
Merge remote-tracking branch 'origin/main' into startup/compute-dispa…
NiiRoZz Nov 25, 2026
9d74bec
Merge branch 'startup/compute-dispatch-translated' into startup/compu…
NiiRoZz Nov 25, 2026
206749e
Merge upstream main
NiiRoZz Nov 26, 2026
d3fe030
Merge upstream main
NiiRoZz Nov 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4054,6 +4054,14 @@ if(EXISTS "${INTAKE_PYTHON}")
PROPERTIES TIMEOUT 120 SKIP_RETURN_CODE 77)
set_tests_properties(startup_compute_translate_e2e_wrong_group_${adapter} PROPERTIES
PASS_REGULAR_EXPRESSION "control wrong-group: rejected at word=[0-9]+ ")
add_test(NAME startup_compute_dispatch_${adapter} COMMAND "${INTAKE_PYTHON}" -B
"${CMAKE_CURRENT_SOURCE_DIR}/tests/startup_compute_dispatch_check.py" "$<TARGET_FILE:startup_stream_consumer>"
"${DXC_EXECUTABLE}" ${adapter})
add_test(NAME startup_compute_dispatch_texture_${adapter} COMMAND "${INTAKE_PYTHON}" -B
"${CMAKE_CURRENT_SOURCE_DIR}/tests/startup_compute_dispatch_texture_check.py" "$<TARGET_FILE:startup_stream_consumer>"
"${DXC_EXECUTABLE}" ${adapter})
set_tests_properties(startup_compute_dispatch_${adapter} startup_compute_dispatch_texture_${adapter}
PROPERTIES TIMEOUT 120 SKIP_RETURN_CODE 77)
endforeach()
add_test(NAME startup_stream_adapter_filter COMMAND "${INTAKE_PYTHON}" -B
"${CMAKE_CURRENT_SOURCE_DIR}/tests/startup_stream_rasterizer_check.py"
Expand Down
26 changes: 26 additions & 0 deletions docs/experiments.md
Original file line number Diff line number Diff line change
Expand Up @@ -15771,6 +15771,17 @@ ctest --preset dev --no-tests=error -R "^startup_image_sample_d_draw_(warp|hardw

`tests/startup_gfx2hlsl_mul24_align_check.py` translates each instruction, evaluates the emitted text on the CPU against a reference written with unbounded integers, and checks that `v_mul_hi_u32_u24` is refused. Run with `python3 -B tests/startup_gfx2hlsl_mul24_align_check.py` (`ctest --preset dev --no-tests=error -R '^startup_gfx2hlsl_mul24_align$' -V`). `tests/startup_gfx2hlsl_mul24_align_draw_check.py` draws the six translated instructions through FXC `ps_5_1` and DXC `ps_6_0` and compares the GPU readback with the same reference (`startup_gfx2hlsl_mul24_align_warp` and `_hardware`); both compilers run before the test fails, so one compiler's failure does not hide the other's result. The draw covers the six translated instructions only.

## Startup list Dispatch

Command-list slot 14 (`Dispatch`) is recorded on the desktop list only when the list is open and direct or compute, a desktop compute pipeline and a desktop compute root signature are bound, the compute root declares no static samplers and only root SRV parameters (slot 43), the compute pipeline was built against that same root signature, every root SRV the root declares was set since the root was bound (a rejected or unaligned replacement clears its binding), and every group count is at most 65535. Zero groups on an axis is forwarded and runs nothing. A root with other parameters is refused with `compute root arguments are not forwarded`, a pipeline from another root with `compute pipeline was built against another root signature`, an unset or rejected root SRV with `a compute root SRV is not bound`, because this path forwards none of the compute root-argument slots (35, 37, 39, 41, 45) to the desktop list and the dispatch would run with them unset. Other refusals are logged as `x2w-render Dispatch(x, y, z) refused: <reason>`.

Only the decision is checked: `tests/startup_list_dispatch_check.cpp` runs without a device and its five mutated runs must fail. Executing a dispatch on a GPU, with real results read back, is not verified yet.

```powershell
cmake --build --preset dev --target startup_list_dispatch_check
ctest --preset dev --no-tests=error -R "^startup_list_dispatch" -V
```

## Non-constant scalar symbols at branch targets in the startup translator

Follow-up to #2279, which drops scalar constants at a join that another path writes, over the textual range between
Expand Down Expand Up @@ -15813,6 +15824,21 @@ python -B tests/startup_compute_lds_dual_atomics_check.py binary llvm-mc-15

Not covered here: `llvm-mc-15` assembly step on Linux CI (`binary`), signed 32-bit (`ds_min_i32`/`ds_max_i32`), `ds_xor_b32`, `ds_sub_u32`/`ds_rsub_u32`, float LDS atomics, and 64-bit LDS dual/atomic forms.

## Translated compute Dispatch

With a device slot 67 placeholder bound, command-list slot 14 looks up the translation of the pipeline's published request (`<key>.txt` with `stage cs`, and `<key>.cs.cso`) and records it on the desktop list. It binds, from the compute descriptor tables of slot 35: raw buffers named by 16-byte hardware buffer descriptors, and 2D textures named by the token of a view the caller created (device slot 18 for an input, slot 19 for an output the program stores `float4` to). `smp` manifest lines become static samplers, and entry values come from the compute root constants of slots 37 and 39. A buffer input must resolve to a complete GPU-backed range; a buffer output must be a placed buffer that aliases the caller's memory and allows unordered access; a texture view must be 2D, created on the desktop, and for an output have a float or normalized format that is not packed, on a texture that is not also an input of the call. Any other manifest line (other texture kinds, sampler heaps, comparison samplers, root views, `stride` and `descword3` entry values) leaves the pipeline untranslated, and a Dispatch that cannot be bound completely is refused with one logged reason: no Dispatch is recorded and nothing is bound (the upload of an input texture the caller filled in memory may already be recorded; it only syncs content). No view is ever bound null. The entry values live in the compute root-constant store of #1975: a word no slot 37 or 39 call wrote since the compute root was set (slot 33 with another root, or a list reset) has no value and is refused with `an entry value was not set since the compute root`; setting the same root again keeps the words, and the graphics words of slot 40 are separate.

`tests/startup_compute_dispatch_check.py` drives a source-built gfx1013 program through the stand-in's list on WARP and on a physical adapter (exit 77 without one) and reads the 320 output words back from the aliased memory. Controls in the same run: before the offline translation, without a Dispatch, and with the two descriptors exchanged, every output word must keep its sentinel. The two entry values arrive through slot 37 and slot 39, with other values written through slot 40 in between; `dispatch-same-root` must still give the expected words, and five refused modes must log their reason and keep the sentinels: a missing word, another compute root set and the first set again, a list reset, a compute root that is not the pipeline's, and one buffer named as input and output. `tests/startup_compute_dispatch_texture_check.py` does the same for a program that stores to a 32x8 RGBA16_FLOAT texture (1024 halves read back through CopyTextureRegion; controls: before translation, without a Dispatch, a texture without unordered access) and for the raw buffer program with a level-zero sample of a 1x1 texture XORed into each stored word (control: no view at the table entry). The texture output program is also bound under a manifest edited to declare no entry values.

The log line `x2w-render compute dispatches: translated <n>, refused <n>, no translation <n>, not modelled <n>` follows the render totals; "not modelled" counts calls whose manifest exists but holds a line the runtime does not bind. It is followed by a census: the refused calls per first refusal reason of their key, and every dispatched key by call count, each with its count, the calls recorded and the first refused table descriptor.

Measured on three fixture programs. The sampling fixture uses a 1x1 texture, so it does not tell sampler filter or address modes apart. Programs with other texture kinds, sampler heaps, the same texture as input and output, or buffer outputs in memory that is not aliased are not dispatched.

```powershell
cmake --build --preset dev --target startup_stream_consumer
ctest --preset dev --no-tests=error -R "^startup_compute_dispatch_" -V
```

## Startup translator: a short operand list is refused, never a translator crash

The batch translator records any non-`Unsupported` exception from a handler as
Expand Down
Loading
Loading