compute: indexed atomic UAV dispatch (takeover of #3417) #3454

Merged
Leyukaka merged 7 commits from upstream-pr/3454 into main 2026-11-29 14:14:55 +00:00
Leyukaka commented 2026-11-29 13:07:36 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T13:07:36Z.


Takeover of #3417 by @Ammmae0x.

What is merged

  • The three commits of #3417 (9895ec1c, fa269a85, 10d7d41b), unchanged.
  • Three merge commits of main: e1143678 (merge of 77d1ba4d), 393b80eb (merge of af1cab5c, #3389) and a96d1f6b (merge of 4b0586d4, #3398 and #3400). Head is a96d1f6b. main is e3f9a64f; its commits after 4b0586d4 touch no file of this PR.

e1143678 has one conflict, in src/startup_stubs/d3d12_compute_dispatch.inl, at the slot setup in translate_compute_natively. Both lines are kept: if (atomic) slots.back().atomic = true; from #3417 and slots.back().requires_identity_dst_sel = view.requires_identity_dst_sel; from main. They set different fields. git show --remerge-diff e1143678 shows nothing else.

393b80eb has one conflicting file, tests/native_compute_manifest_reasons.cpp, in two places. Both sides are kept in each:

  • in cases[], the two indexed_atomic_uav entries from #3417, then the packed_d16_x_uav entry from main;
  • after the published loop, the uav 0 atomic table 1 32 block from #3417, then the uav 0 packed_d16_x table 1 32 block from main.

One line is our edit and comes from neither side: the count in the final printf is + 3 instead of + 2. Each side had raised it from + 1 to + 2 for its own standalone block, and the merged file has both blocks. The count is only printed; the exit code of the test does not depend on it. git show --remerge-diff 393b80eb shows nothing else.

a96d1f6b has one conflicting file, src/startup_stubs/d3d12_compute_dispatch.inl, in the view loop of translate_compute_natively, which #3398 rewrote. Main's side is kept: the Kind alias, texture_output and the dimension switch, the supported list and auto& slot. Three lines carry the atomic UAV:

  • const bool atomic = view.kind == Kind::indexed_atomic_uav;, and || atomic at the end of output;
  • || atomic in supported, after texture_input. Main refuses any kind missing from that list;
  • slot.atomic = atomic; on main's auto& slot, replacing if (atomic) slots.back().atomic = true;.

The volume flag of the branch is dropped: main's dimension switch covers it. git show --remerge-diff a96d1f6b shows nothing else.

Run

Full build of a96d1f6b, dev preset with -DX2W_WITH_OPUS=OFF, in a fresh isolated environment with a hardware adapter (not the one in the PR) and the inbox WARP.

ctest --preset dev --no-tests=error -R '^(startup_compute_indexed_atomic_uav_|native_compute_manifest_reasons|startup_compute_dispatch_native_|startup_compute_dispatch_texture|startup_compute_dispatch_two_mips_|startup_compute_input_view_token|startup_input_view_token)'

native_compute_manifest_reasons                    Passed     0.07 s
native_compute_manifest_reasons_requests           Passed     1.57 s
startup_compute_indexed_atomic_uav_controls        Passed     2.24 s
startup_compute_indexed_atomic_uav_warp            ***Skipped 2.41 s
startup_compute_indexed_atomic_uav_hardware        Passed    10.31 s
startup_compute_dispatch_native_warp               ***Skipped 5.67 s
startup_compute_dispatch_native_hardware           Passed    15.82 s
startup_compute_dispatch_texture_native_warp       ***Skipped 3.64 s
startup_compute_dispatch_texture_native_hardware   Passed     9.25 s
startup_compute_dispatch_texture_warp              Passed    19.27 s
startup_compute_dispatch_texture_hardware          Passed    37.45 s
startup_compute_dispatch_texture_dims_warp         Passed     8.87 s
startup_compute_dispatch_texture_dims_hardware     Passed    19.73 s
startup_compute_dispatch_two_mips_warp             Passed     3.64 s
startup_compute_dispatch_two_mips_hardware         Passed     4.95 s
startup_compute_input_view_token_reference         Passed     0.30 s
startup_compute_input_view_token_controls          Passed     0.31 s
startup_compute_input_view_token_warp              Passed     3.22 s
startup_compute_input_view_token_hardware          Passed     7.78 s
100% tests passed, 0 tests failed out of 27

The eight startup_input_view_token* tests, not listed, pass too. The three skips are the WARP variants that need a 32-lane adapter.

native_compute_manifest_reasons output includes ok UAV kind packed_d16_x_uav, ok publishes uav 0 atomic table 1 32, ok publishes uav 0 packed_d16_x table 1 32 and 0 of 32 manifest reasons wrong.

_hardware output:

raw: 12 adds per addressed dword match on hardware (debug layer unavailable)
raw: 4 token shapes and a hardware descriptor refused, each with its own reason and an untouched output
structured: 12 adds per addressed dword match on hardware (debug layer unavailable)
typed: 12 adds per addressed dword match on hardware (debug layer unavailable)
startup_compute_indexed_atomic_uav: PASS on hardware

The native: line of that output, separately, as asked in the reviews of #3417 and of 393b80eb:

native: the same program translated in-process and matched on hardware

_warp did not reach the dispatch. Its output has native_lane_range=4..4 and ends with:

skip: shader wave32 fixture requires SM 6.6, WaveOps, and a 32-lane wave

_controls output includes indexed atomic UAV published as `uav 0 atomic table 1 32` .

Not covered

  • No passing WARP run: the inbox WARP is 4-lane, so _warp skips before any dispatch and prints no native: line.
  • The red Windows Server 2025 run reported on #3417 is not explained by this. Here _controls and _hardware get past compile_dxil at the same commits plus the merges.
  • The u0 root=... bytes=... line asked for on #3417 is not in the output of this test when it passes, so it is not posted.
  • The debug layer was unavailable in this run.
  • Adding _controls to the pr preset (SHOULD 1 of the review) is not done here, because it edits CMakePresets.json.
  • The two test gaps from the review of 393b80eb are open: count does not decide the result, and u0 is the only atomic UAV. The test files are unchanged since 393b80eb.

Refs #3417

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5551005422 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3454). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T13:07:36Z. --- Takeover of #3417 by @Ammmae0x. ## What is merged - The three commits of #3417 (`9895ec1c`, `fa269a85`, `10d7d41b`), unchanged. - Three merge commits of `main`: `e1143678` (merge of `77d1ba4d`), `393b80eb` (merge of `af1cab5c`, #3389) and `a96d1f6b` (merge of `4b0586d4`, #3398 and #3400). Head is `a96d1f6b`. `main` is `e3f9a64f`; its commits after `4b0586d4` touch no file of this PR. `e1143678` has one conflict, in `src/startup_stubs/d3d12_compute_dispatch.inl`, at the slot setup in `translate_compute_natively`. Both lines are kept: `if (atomic) slots.back().atomic = true;` from #3417 and `slots.back().requires_identity_dst_sel = view.requires_identity_dst_sel;` from `main`. They set different fields. `git show --remerge-diff e1143678` shows nothing else. `393b80eb` has one conflicting file, `tests/native_compute_manifest_reasons.cpp`, in two places. Both sides are kept in each: - in `cases[]`, the two `indexed_atomic_uav` entries from #3417, then the `packed_d16_x_uav` entry from `main`; - after the `published` loop, the `uav 0 atomic table 1 32` block from #3417, then the `uav 0 packed_d16_x table 1 32` block from `main`. One line is our edit and comes from neither side: the count in the final `printf` is `+ 3` instead of `+ 2`. Each side had raised it from `+ 1` to `+ 2` for its own standalone block, and the merged file has both blocks. The count is only printed; the exit code of the test does not depend on it. `git show --remerge-diff 393b80eb` shows nothing else. `a96d1f6b` has one conflicting file, `src/startup_stubs/d3d12_compute_dispatch.inl`, in the view loop of `translate_compute_natively`, which #3398 rewrote. Main's side is kept: the `Kind` alias, `texture_output` and the dimension switch, the `supported` list and `auto& slot`. Three lines carry the atomic UAV: - `const bool atomic = view.kind == Kind::indexed_atomic_uav;`, and `|| atomic` at the end of `output`; - `|| atomic` in `supported`, after `texture_input`. Main refuses any kind missing from that list; - `slot.atomic = atomic;` on main's `auto& slot`, replacing `if (atomic) slots.back().atomic = true;`. The `volume` flag of the branch is dropped: main's dimension switch covers it. `git show --remerge-diff a96d1f6b` shows nothing else. ## Run Full build of `a96d1f6b`, `dev` preset with `-DX2W_WITH_OPUS=OFF`, in a fresh isolated environment with a hardware adapter (not the one in the PR) and the inbox WARP. ``` ctest --preset dev --no-tests=error -R '^(startup_compute_indexed_atomic_uav_|native_compute_manifest_reasons|startup_compute_dispatch_native_|startup_compute_dispatch_texture|startup_compute_dispatch_two_mips_|startup_compute_input_view_token|startup_input_view_token)' native_compute_manifest_reasons Passed 0.07 s native_compute_manifest_reasons_requests Passed 1.57 s startup_compute_indexed_atomic_uav_controls Passed 2.24 s startup_compute_indexed_atomic_uav_warp ***Skipped 2.41 s startup_compute_indexed_atomic_uav_hardware Passed 10.31 s startup_compute_dispatch_native_warp ***Skipped 5.67 s startup_compute_dispatch_native_hardware Passed 15.82 s startup_compute_dispatch_texture_native_warp ***Skipped 3.64 s startup_compute_dispatch_texture_native_hardware Passed 9.25 s startup_compute_dispatch_texture_warp Passed 19.27 s startup_compute_dispatch_texture_hardware Passed 37.45 s startup_compute_dispatch_texture_dims_warp Passed 8.87 s startup_compute_dispatch_texture_dims_hardware Passed 19.73 s startup_compute_dispatch_two_mips_warp Passed 3.64 s startup_compute_dispatch_two_mips_hardware Passed 4.95 s startup_compute_input_view_token_reference Passed 0.30 s startup_compute_input_view_token_controls Passed 0.31 s startup_compute_input_view_token_warp Passed 3.22 s startup_compute_input_view_token_hardware Passed 7.78 s 100% tests passed, 0 tests failed out of 27 ``` The eight `startup_input_view_token*` tests, not listed, pass too. The three skips are the WARP variants that need a 32-lane adapter. `native_compute_manifest_reasons` output includes `ok UAV kind packed_d16_x_uav`, `ok publishes uav 0 atomic table 1 32`, `ok publishes uav 0 packed_d16_x table 1 32` and `0 of 32 manifest reasons wrong`. `_hardware` output: ``` raw: 12 adds per addressed dword match on hardware (debug layer unavailable) raw: 4 token shapes and a hardware descriptor refused, each with its own reason and an untouched output structured: 12 adds per addressed dword match on hardware (debug layer unavailable) typed: 12 adds per addressed dword match on hardware (debug layer unavailable) startup_compute_indexed_atomic_uav: PASS on hardware ``` The `native:` line of that output, separately, as asked in the reviews of #3417 and of `393b80eb`: ``` native: the same program translated in-process and matched on hardware ``` `_warp` did not reach the dispatch. Its output has `native_lane_range=4..4` and ends with: ``` skip: shader wave32 fixture requires SM 6.6, WaveOps, and a 32-lane wave ``` `_controls` output includes ``indexed atomic UAV published as `uav 0 atomic table 1 32` ``. ## Not covered - No passing WARP run: the inbox WARP is 4-lane, so `_warp` skips before any dispatch and prints no `native:` line. - The red Windows Server 2025 run reported on #3417 is not explained by this. Here `_controls` and `_hardware` get past `compile_dxil` at the same commits plus the merges. - The `u0 root=... bytes=...` line asked for on #3417 is not in the output of this test when it passes, so it is not posted. - The debug layer was unavailable in this run. - Adding `_controls` to the `pr` preset (SHOULD 1 of the review) is not done here, because it edits `CMakePresets.json`. - The two test gaps from the review of `393b80eb` are open: `count` does not decide the result, and u0 is the only atomic UAV. The test files are unchanged since `393b80eb`. Refs #3417
JohnConnorNPC commented 2026-11-29 13:47:52 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-29T13:47:52Z.


Review of 393b80eb against main c3cae611. Verdict: hold (one MUST). This checks the points from the #3417 review and the default native path.

MUST

  1. It conflicts with main again. #3398 (merged as dc936253) rewrote the view classification in translate_compute_natively: git merge-tree --write-tree origin/main 393b80eb → CONFLICT (content): Merge conflict in src/startup_stubs/d3d12_compute_dispatch.inl, and gh shows CONFLICTING. Restoring atomic in output isn't enough:

    • main now refuses any kind that is missing from its new supported list ("is not bound for a natively translated program"), so indexed_atomic_uav has to be added there too;
    • slot.atomic = true has to move onto main's auto& slot = slots.back();.

    If supported is missed, the in-process path still refuses the kind. Only native_check() on a 32-lane adapter would catch that: CI doesn't run it, and the inbox WARP skips. Please post the native: line of _hardware again after the resolution.

What this PR settles from the #3417 review

  • The old conflict is resolved in e1143678. git show --remerge-diff of both merges shows only the resolutions in the description, and the + 3 count is right (21 cases[] + 4 published[] + 3 standalone blocks = 28).

  • The default native path is tested. native_check() sets X2W_NATIVE_SHADERS in a fresh work directory with no published manifest, so if the in-process translation refused, the readback check would fail. It asserts translated natively: 2 entry values, 0 inputs, 1 outputs. It doesn't set X2W_NATIVE_SHADERS_ONLY=1 the way the launchers do. That makes no difference here: after a successful in-process translation, load_compute_translation never runs. Your hardware run at 393b80eb has the native: line, so with the author's RTX 4050 that's two adapters.

  • The Server 2025 red is still unexplained, but this code can't produce it:

    • At both 10d7d41b and 393b80eb, the formatter publishes indexed_atomic_uav when array_count == 1 && required_bytes == 4.
    • The translator creates the kind in one place, with 4 bytes (indexed ? ComputeViewKind::indexed_atomic_uav : ComputeViewKind::raw_buffer_uav, 4, &reg).
    • Your fresh build passes _controls, which is the same compile_dxil step that failed there.

    My guess is stale binaries, but I haven't measured it. Binaries built from main would match both results: main's compile_dxil prints exactly UAV kind indexed_atomic_uav for this binding (view_shape), and main's native_compute_manifest_reasons has none of the new cases, so it passes. Also, the full SHA quoted in that report (10d7d41b7740…) is not this commit's (10d7d41b77d4…).

SHOULD

  1. There is still no WARP dispatch at any head: the inbox WARP gives native_lane_range=4..4 and exit 77. If the Server 2025 run was at 10d7d41b, its _warp and _hardware got past main()'s --shader-wave32 probe and only then failed in compile_dxil. That environment may be the only one so far that can dispatch this test, so a re-run there by tedin7 at the resolved head would close this.

  2. The hardware report doesn't name the adapter, driver or Windows build, which AGENTS.md asks for in GPU reports.

  3. CI still selects none of the four tests: a re.search of the pr filter gives False for _controls, _warp and native_compute_manifest_reasons. The description already says so.

  4. Two gaps from the #3417 approval review are still open:

    • count never decides the result. The largest index is 124 and the smallest count is 160, so atomic_count = ~0u passes.
    • Only u0 is atomic, so atomic_registers.push_back(i) → push_back(0) survives.

    A wrapped stride-8 index and a u0-raw/u1-atomic layout would cover both.

NIT

  1. Two comments say the constants are bound at "parameter 2 + its UAV index": the one on the ViewRecord fields and the one above the SetComputeRoot32BitConstants loop. The code uses 2 plus the view's rank among the atomic UAVs, which is correct. The comments are wrong when a non-atomic UAV comes first.
  2. The in-process path accepts indexed_atomic_uav without the formatter's required_bytes == 4 check, and the record path hard-codes 4 (ComputeViewBinding{..., 0, 0, 0, 4}). This can't happen today, since the translator always records 4, but a matching check would keep the two routes aligned.
  3. The docs page says the four token negatives each refuse "with their own reason". Three of them share an indexed atomic output view has an unsupported stride or range.

Not run here: build, ctest, WARP or GPU. This is a read-only review on Linux.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7256808399 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3454#issuecomment-7256808399). Originally posted by [JohnConnorNPC](https://github.com/JohnConnorNPC) on 2026-11-29T13:47:52Z. --- Review of `393b80eb` against main `c3cae611`. **Verdict: hold** (one MUST). This checks the points from the #3417 review and the default native path. **MUST** 1. It conflicts with main again. #3398 (merged as `dc936253`) rewrote the view classification in `translate_compute_natively`: `git merge-tree --write-tree origin/main 393b80eb` → `CONFLICT (content): Merge conflict in src/startup_stubs/d3d12_compute_dispatch.inl`, and gh shows `CONFLICTING`. Restoring `atomic` in `output` isn't enough: - main now refuses any kind that is missing from its new `supported` list (`"is not bound for a natively translated program"`), so `indexed_atomic_uav` has to be added there too; - `slot.atomic = true` has to move onto main's `auto& slot = slots.back();`. If `supported` is missed, the in-process path still refuses the kind. Only `native_check()` on a 32-lane adapter would catch that: CI doesn't run it, and the inbox WARP skips. Please post the `native:` line of `_hardware` again after the resolution. **What this PR settles from the #3417 review** - **The old conflict** is resolved in `e1143678`. `git show --remerge-diff` of both merges shows only the resolutions in the description, and the `+ 3` count is right (21 `cases[]` + 4 `published[]` + 3 standalone blocks = 28). - **The default native path** is tested. `native_check()` sets `X2W_NATIVE_SHADERS` in a fresh work directory with no published manifest, so if the in-process translation refused, the readback check would fail. It asserts `translated natively: 2 entry values, 0 inputs, 1 outputs`. It doesn't set `X2W_NATIVE_SHADERS_ONLY=1` the way the launchers do. That makes no difference here: after a successful in-process translation, `load_compute_translation` never runs. Your hardware run at `393b80eb` has the `native:` line, so with the author's RTX 4050 that's two adapters. - **The Server 2025 red** is still unexplained, but this code can't produce it: - At both `10d7d41b` and `393b80eb`, the formatter publishes `indexed_atomic_uav` when `array_count == 1 && required_bytes == 4`. - The translator creates the kind in one place, with 4 bytes (`indexed ? ComputeViewKind::indexed_atomic_uav : ComputeViewKind::raw_buffer_uav, 4, &reg`). - Your fresh build passes `_controls`, which is the same `compile_dxil` step that failed there. My guess is stale binaries, but I haven't measured it. Binaries built from main would match both results: main's `compile_dxil` prints exactly `UAV kind indexed_atomic_uav` for this binding (`view_shape`), and main's `native_compute_manifest_reasons` has none of the new cases, so it passes. Also, the full SHA quoted in that report (`10d7d41b7740…`) is not this commit's (`10d7d41b77d4…`). **SHOULD** 1. There is still no WARP dispatch at any head: the inbox WARP gives `native_lane_range=4..4` and exit 77. If the Server 2025 run was at `10d7d41b`, its `_warp` and `_hardware` got past `main()`'s `--shader-wave32` probe and only then failed in `compile_dxil`. That environment may be the only one so far that can dispatch this test, so a re-run there by tedin7 at the resolved head would close this. 2. The hardware report doesn't name the adapter, driver or Windows build, which AGENTS.md asks for in GPU reports. 3. CI still selects none of the four tests: a `re.search` of the `pr` filter gives `False` for `_controls`, `_warp` and `native_compute_manifest_reasons`. The description already says so. 4. Two gaps from the #3417 approval review are still open: - `count` never decides the result. The largest index is 124 and the smallest count is 160, so `atomic_count = ~0u` passes. - Only u0 is atomic, so `atomic_registers.push_back(i)` → `push_back(0)` survives. A wrapped stride-8 index and a u0-raw/u1-atomic layout would cover both. **NIT** 1. Two comments say the constants are bound at "parameter 2 + its UAV index": the one on the `ViewRecord` fields and the one above the `SetComputeRoot32BitConstants` loop. The code uses 2 plus the view's rank among the atomic UAVs, which is correct. The comments are wrong when a non-atomic UAV comes first. 2. The in-process path accepts `indexed_atomic_uav` without the formatter's `required_bytes == 4` check, and the record path hard-codes 4 (`ComputeViewBinding{..., 0, 0, 0, 4}`). This can't happen today, since the translator always records 4, but a matching check would keep the two routes aligned. 3. The docs page says the four token negatives each refuse "with their own reason". Three of them share `an indexed atomic output view has an unsupported stride or range`. Not run here: build, ctest, WARP or GPU. This is a read-only review on Linux. AI-assisted.
Leyukaka commented 2026-11-29 13:54:34 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T13:54:34Z.


New head a96d1f6b: merge of main 4b0586d4 (#3398 and #3400 included). git merge-tree --write-tree against current main e3f9a64f is clean.

MUST 1

One conflicting file, src/startup_stubs/d3d12_compute_dispatch.inl, in the view loop of translate_compute_natively. Main's side is kept (the Kind alias, texture_output and the dimension switch, supported, auto& slot). Three lines carry the atomic UAV, from git show --remerge-diff a96d1f6b:

+            const bool atomic = view.kind == Kind::indexed_atomic_uav;
+            const bool output = texture_output || view.kind == Kind::raw_buffer_uav || half_typed || atomic;
-                                   x2w::accepts_cbv_window(view.kind) || texture_input ||
+                                   x2w::accepts_cbv_window(view.kind) || texture_input || atomic ||
                                    dimension != D3D12_UAV_DIMENSION_UNKNOWN;
             slot.packed_d16_x = packed_x;
+            slot.atomic = atomic;

The branch's volume flag is dropped: main's dimension switch covers it. The remerge diff shows nothing else.

Run

Full build of a96d1f6b, dev preset with -DX2W_WITH_OPUS=OFF, in a fresh isolated environment with a hardware adapter and the inbox WARP.

ctest --preset dev --no-tests=error -R '^(startup_compute_indexed_atomic_uav_|native_compute_manifest_reasons|startup_compute_dispatch_native_|startup_compute_dispatch_texture|startup_compute_dispatch_two_mips_|startup_compute_input_view_token|startup_input_view_token)'

100% tests passed, 0 tests failed out of 27

24 passed, 3 skipped. The skips are the WARP variants that need a 32-lane adapter: startup_compute_indexed_atomic_uav_warp, startup_compute_dispatch_native_warp, startup_compute_dispatch_texture_native_warp.

The tests from main that go through the same function pass on hardware:

startup_compute_dispatch_native_hardware           Passed
startup_compute_dispatch_texture_native_hardware   Passed
startup_compute_dispatch_texture_hardware          Passed
startup_compute_dispatch_texture_dims_hardware     Passed
startup_compute_dispatch_two_mips_hardware         Passed
startup_compute_input_view_token_hardware          Passed

startup_compute_dispatch_texture_warp, _texture_dims_warp, _two_mips_warp and startup_compute_input_view_token_warp pass too, as do the eight startup_input_view_token* tests and native_compute_manifest_reasons (0 of 32 manifest reasons wrong).

The native: line of startup_compute_indexed_atomic_uav_hardware at a96d1f6b:

native: the same program translated in-process and matched on hardware

The rest of that output:

raw: 12 adds per addressed dword match on hardware (debug layer unavailable)
raw: 4 token shapes and a hardware descriptor refused, each with its own reason and an untouched output
structured: 12 adds per addressed dword match on hardware (debug layer unavailable)
typed: 12 adds per addressed dword match on hardware (debug layer unavailable)
startup_compute_indexed_atomic_uav: PASS on hardware

SHOULD

  1. No WARP dispatch here either. The inbox WARP is 4-lane, so _warp stops before any dispatch:

    native_lane_range=4..4 shader_model_capped_at_6_6=0x66
    skip: shader wave32 fixture requires SM 6.6, WaveOps, and a 32-lane wave
    

    A run on a 32-lane WARP has to come from another environment.

  2. The run above is on a hardware adapter.

  3. Unchanged: CMakePresets.json is not edited by this PR, so the pr filter still selects none of these tests.

  4. Not addressed in this push. The three test files of the PR are identical at 393b80eb and a96d1f6b: count still does not decide the result, and u0 is still the only atomic UAV.

The NITs are not addressed in this push either.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7256893560 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3454#issuecomment-7256893560). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T13:54:34Z. --- New head `a96d1f6b`: merge of `main` `4b0586d4` (#3398 and #3400 included). `git merge-tree --write-tree` against current `main` `e3f9a64f` is clean. **MUST 1** One conflicting file, `src/startup_stubs/d3d12_compute_dispatch.inl`, in the view loop of `translate_compute_natively`. Main's side is kept (the `Kind` alias, `texture_output` and the dimension switch, `supported`, `auto& slot`). Three lines carry the atomic UAV, from `git show --remerge-diff a96d1f6b`: ``` + const bool atomic = view.kind == Kind::indexed_atomic_uav; + const bool output = texture_output || view.kind == Kind::raw_buffer_uav || half_typed || atomic; ``` ``` - x2w::accepts_cbv_window(view.kind) || texture_input || + x2w::accepts_cbv_window(view.kind) || texture_input || atomic || dimension != D3D12_UAV_DIMENSION_UNKNOWN; ``` ``` slot.packed_d16_x = packed_x; + slot.atomic = atomic; ``` The branch's `volume` flag is dropped: main's dimension switch covers it. The remerge diff shows nothing else. **Run** Full build of `a96d1f6b`, `dev` preset with `-DX2W_WITH_OPUS=OFF`, in a fresh isolated environment with a hardware adapter and the inbox WARP. ``` ctest --preset dev --no-tests=error -R '^(startup_compute_indexed_atomic_uav_|native_compute_manifest_reasons|startup_compute_dispatch_native_|startup_compute_dispatch_texture|startup_compute_dispatch_two_mips_|startup_compute_input_view_token|startup_input_view_token)' 100% tests passed, 0 tests failed out of 27 ``` 24 passed, 3 skipped. The skips are the WARP variants that need a 32-lane adapter: `startup_compute_indexed_atomic_uav_warp`, `startup_compute_dispatch_native_warp`, `startup_compute_dispatch_texture_native_warp`. The tests from `main` that go through the same function pass on hardware: ``` startup_compute_dispatch_native_hardware Passed startup_compute_dispatch_texture_native_hardware Passed startup_compute_dispatch_texture_hardware Passed startup_compute_dispatch_texture_dims_hardware Passed startup_compute_dispatch_two_mips_hardware Passed startup_compute_input_view_token_hardware Passed ``` `startup_compute_dispatch_texture_warp`, `_texture_dims_warp`, `_two_mips_warp` and `startup_compute_input_view_token_warp` pass too, as do the eight `startup_input_view_token*` tests and `native_compute_manifest_reasons` (`0 of 32 manifest reasons wrong`). The `native:` line of `startup_compute_indexed_atomic_uav_hardware` at `a96d1f6b`: ``` native: the same program translated in-process and matched on hardware ``` The rest of that output: ``` raw: 12 adds per addressed dword match on hardware (debug layer unavailable) raw: 4 token shapes and a hardware descriptor refused, each with its own reason and an untouched output structured: 12 adds per addressed dword match on hardware (debug layer unavailable) typed: 12 adds per addressed dword match on hardware (debug layer unavailable) startup_compute_indexed_atomic_uav: PASS on hardware ``` **SHOULD** 1. No WARP dispatch here either. The inbox WARP is 4-lane, so `_warp` stops before any dispatch: ``` native_lane_range=4..4 shader_model_capped_at_6_6=0x66 skip: shader wave32 fixture requires SM 6.6, WaveOps, and a 32-lane wave ``` A run on a 32-lane WARP has to come from another environment. 2. The run above is on a hardware adapter. 3. Unchanged: `CMakePresets.json` is not edited by this PR, so the `pr` filter still selects none of these tests. 4. Not addressed in this push. The three test files of the PR are identical at `393b80eb` and `a96d1f6b`: `count` still does not decide the result, and u0 is still the only atomic UAV. The NITs are not addressed in this push either.
Leyukaka commented 2026-11-29 13:59:27 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T13:59:27Z.


SHOULD 2 on 393b80eb: adapter details for the 27-test run on a96d1f6b, as printed by the tests.

Backend Adapter Driver
hardware NVIDIA GeForce RTX 5080 32.0.16.2101
WARP Microsoft Basic Render Driver 10.0.26100.9818

Windows Sandbox on a Windows 11 host, build 10.0.26300. The debug layer was unavailable in the Sandbox, on both backends.
The earlier Sandbox runs posted here (e1143678, 393b80eb) used the same machine.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7256954475 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3454#issuecomment-7256954475). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T13:59:27Z. --- SHOULD 2 on 393b80eb: adapter details for the 27-test run on a96d1f6b, as printed by the tests. | Backend | Adapter | Driver | | --- | --- | --- | | hardware | NVIDIA GeForce RTX 5080 | 32.0.16.2101 | | WARP | Microsoft Basic Render Driver | 10.0.26100.9818 | Windows Sandbox on a Windows 11 host, build 10.0.26300. The debug layer was unavailable in the Sandbox, on both backends. The earlier Sandbox runs posted here (e1143678, 393b80eb) used the same machine.
JohnConnorNPC commented 2026-11-29 14:02:24 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-29T14:02:24Z.


Re-review of the delta 393b80eb → a96d1f6b (read-only, on Linux; no build or run here). Verdict: merge (0 MUST).

  • MUST 1 is resolved. git show --remerge-diff a96d1f6b touches only src/startup_stubs/d3d12_compute_dispatch.inl. Main's view loop is kept, and the atomic UAV goes into all three places: output (... || half_typed || atomic), main's supported predicate (... || texture_input || atomic ||) and slot.atomic = atomic on main's auto& slot. An atomic view leaves dimension UNKNOWN and slot.texture false, as before. Dropping the branch's volume flag is safe: main's texture_output switch maps dimension 2 to TEXTURE3D.
  • Apart from those three lines, the PR's own diff is the same at 393b80eb and a96d1f6b (7 files, +455/−7).
  • git merge-tree --write-tree origin/main a96d1f6b rc 0. Windows, Linux and gfx1013 CI pass at a96d1f6b. The hardware run at a96d1f6b (27 tests: 24 pass, 3 WARP capability skips) and the adapter table close SHOULD 2.

These earlier SHOULDs remain open but do not block the merge: SHOULD 1 (no 32-lane WARP dispatch), SHOULD 3 (the pr preset selects none of the tests) and SHOULD 4 (count does not decide the result, and u0 is the only atomic UAV). The NITs are unchanged.

AI-assisted review.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7256992121 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3454#issuecomment-7256992121). Originally posted by [JohnConnorNPC](https://github.com/JohnConnorNPC) on 2026-11-29T14:02:24Z. --- Re-review of the delta `393b80eb` → `a96d1f6b` (read-only, on Linux; no build or run here). **Verdict: merge** (0 MUST). - **MUST 1 is resolved.** `git show --remerge-diff a96d1f6b` touches only `src/startup_stubs/d3d12_compute_dispatch.inl`. Main's view loop is kept, and the atomic UAV goes into all three places: `output` (`... || half_typed || atomic`), main's `supported` predicate (`... || texture_input || atomic ||`) and `slot.atomic = atomic` on main's `auto& slot`. An atomic view leaves `dimension` UNKNOWN and `slot.texture` false, as before. Dropping the branch's `volume` flag is safe: main's `texture_output` switch maps dimension 2 to TEXTURE3D. - Apart from those three lines, the PR's own diff is the same at `393b80eb` and `a96d1f6b` (7 files, +455/−7). - `git merge-tree --write-tree origin/main a96d1f6b` rc 0. Windows, Linux and gfx1013 CI pass at `a96d1f6b`. The hardware run at `a96d1f6b` (27 tests: 24 pass, 3 WARP capability skips) and the adapter table close SHOULD 2. These earlier SHOULDs remain open but do not block the merge: SHOULD 1 (no 32-lane WARP dispatch), SHOULD 3 (the `pr` preset selects none of the tests) and SHOULD 4 (`count` does not decide the result, and u0 is the only atomic UAV). The NITs are unchanged. AI-assisted review.
JohnConnorNPC commented 2026-11-29 14:02:52 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-29T14:02:52Z.


Follow-up: the merge didn't go through. #3351 merged first (0ed385dc), and the branch now conflicts with main in one comment-only region. git merge-tree --write-tree origin/main a96d1f6b rc 1 gives CONFLICT (content) … src/startup_stubs/d3d12_compute_dispatch.inl, with one conflict region: the header comment above volume_uav_range_error.

  • main: srv <i> tex1d|tex2d|tex2da|tex3d|texcubearr table <param> <byte> (#3351 added texcubearr)
  • branch: the same line without texcubearr, followed by the indexed buffer atomic sentence (uav <i> atomic table <param> <byte> … matching the native compute pipeline.)

Resolution: keep main's line with texcubearr, then the branch's atomic sentence, then `smp`, `smpl` and `smpc` lines become static samplers. Entry. No code changes. Once that is pushed and CI passes, this is ready to merge. The review above (0 MUST) still holds.

AI-assisted review.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7256997935 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3454#issuecomment-7256997935). Originally posted by [JohnConnorNPC](https://github.com/JohnConnorNPC) on 2026-11-29T14:02:52Z. --- Follow-up: the merge didn't go through. #3351 merged first (`0ed385dc`), and the branch now conflicts with `main` in one comment-only region. `git merge-tree --write-tree origin/main a96d1f6b` rc 1 gives `CONFLICT (content) … src/startup_stubs/d3d12_compute_dispatch.inl`, with one conflict region: the header comment above `volume_uav_range_error`. - main: `srv <i> tex1d|tex2d|tex2da|tex3d|texcubearr table <param> <byte>` (#3351 added `texcubearr`) - branch: the same line without `texcubearr`, followed by the indexed buffer atomic sentence (`uav <i> atomic table <param> <byte>` … `matching the native compute pipeline.`) Resolution: keep main's line with `texcubearr`, then the branch's atomic sentence, then `` `smp`, `smpl` and `smpc` lines become static samplers. Entry ``. No code changes. Once that is pushed and CI passes, this is ready to merge. The review above (0 MUST) still holds. AI-assisted review.
JohnConnorNPC commented 2026-11-29 14:14:51 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-29T14:14:51Z.


Re-review of the delta a96d1f6b → d3d0a657 (read-only, on Linux; no build or run here). Verdict: merge (0 MUST).

  • d3d0a657 merges main 0ed385dc (#3351 included), so the branch is current with main. git show --remerge-diff d3d0a657 touches only the header comment of src/startup_stubs/d3d12_compute_dispatch.inl: it keeps main's texcubearr input list and the PR's indexed atomic UAV sentence.
  • Apart from hunk offsets and that comment line, the PR's own diff is the same at a96d1f6b and d3d0a657 (7 files, +455/−7). The atomic flag still sits in output, in main's supported predicate and in slot.atomic = atomic.
  • Windows, Linux and gfx1013 CI pass at d3d0a657.

The SHOULDs and NITs from the earlier reviews are unchanged and don't block the merge.

AI-assisted review.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7257154717 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3454#issuecomment-7257154717). Originally posted by [JohnConnorNPC](https://github.com/JohnConnorNPC) on 2026-11-29T14:14:51Z. --- Re-review of the delta `a96d1f6b` → `d3d0a657` (read-only, on Linux; no build or run here). **Verdict: merge** (0 MUST). - `d3d0a657` merges main `0ed385dc` (#3351 included), so the branch is current with main. `git show --remerge-diff d3d0a657` touches only the header comment of `src/startup_stubs/d3d12_compute_dispatch.inl`: it keeps main's `texcubearr` input list and the PR's indexed atomic UAV sentence. - Apart from hunk offsets and that comment line, the PR's own diff is the same at `a96d1f6b` and `d3d0a657` (7 files, +455/−7). The `atomic` flag still sits in `output`, in main's `supported` predicate and in `slot.atomic = atomic`. - Windows, Linux and gfx1013 CI pass at `d3d0a657`. The SHOULDs and NITs from the earlier reviews are unchanged and don't block the merge. AI-assisted review.
Sign in to join this conversation.
No reviewers
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!3454
No description provided.