compute: share one raw UAV for reads and writes to the same slot #3215

Manually merged
github merged 1 commit from github-bot/gh-3213 into gh-pr/3213/base 2026-11-27 22:03:47 +00:00 AGit
Owner

@⁠R0Y00 on GitHub · 2026-11-27 21:50 UTC · original
R0Y00:codex/compute-share-raw-uav → main · +30 −2 · 4 files · 1 commits · merged 2026-11-27 22:01 UTC

Refs #3211.

When a reachable raw store and a raw load use the same proven fixed descriptor-table slot, use the same raw UAV handle for both. A second SRV for that slot gives the runtime conflicting states for one resource. The C++ solver still verifies the descriptor words.

The source-built control reads, transforms, and writes the same buffer within one dispatch. It checks all 320 dwords, including an untouched tail, and verifies that the dispatch binds one UAV and zero SRVs. Local verification on 8509b4951 (MSVC Release /O2, Windows 11 build 26200, RTX 4060 Laptop GPU driver 32.0.16.1656 and WARP). Hardware passed ctest --preset release --no-tests=error -R '^startup_compute_dispatch_native_(warp|hardware)$', including the shared UAV readback. WARP reported a wave32 capability skip.

**@⁠R0Y00** on GitHub · 2026-11-27 21:50 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3213) `R0Y00:codex/compute-share-raw-uav` → `main` · +30 −2 · 4 files · 1 commits · merged 2026-11-27 22:01 UTC Refs #3211. When a reachable raw store and a raw load use the same proven fixed descriptor-table slot, use the same raw UAV handle for both. A second SRV for that slot gives the runtime conflicting states for one resource. The C++ solver still verifies the descriptor words. The source-built control reads, transforms, and writes the same buffer within one dispatch. It checks all 320 dwords, including an untouched tail, and verifies that the dispatch binds one UAV and zero SRVs. Local verification on `8509b4951` (MSVC Release /O2, Windows 11 build 26200, RTX 4060 Laptop GPU driver 32.0.16.1656 and WARP). Hardware passed `ctest --preset release --no-tests=error -R '^startup_compute_dispatch_native_(warp|hardware)$'`, including the shared UAV readback. WARP reported a wave32 capability skip.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 21:56:44 +00:00
github-bot changed target branch from main to gh-pr/3213/base 2026-11-27 22:03:45 +00:00
github manually merged commit 8509b4951d into gh-pr/3213/base 2026-11-27 22:03:47 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-27 22:01 UTC · original · reviewed

Independent verification of exact head 8509b495 on main d474a393. The alias is based on a reachable raw store and the proven fixed descriptor table/offset; the emitter still validates the descriptor words and reuses the same writable handle. Built startup_stream_consumer d3d12_xs_shim compile_dxil native_store_replay in Debug and Release /O2. Ran ctest --test-dir <build> --no-tests=error -j1 -V -R '^(startup_compute_dispatch_native_(warp|hardware)|native_global_load_hardware|native_smem_vcc_hardware)$'. Each configuration had three passes and one WARP wave32 capability skip. The RTX 4060 Laptop readback matched all 320 dwords including the untouched tail, with one UAV, zero SRVs, and no D3D12 debug error. Windows 11 26200.9974, driver 32.0.16.1656, WARP 10.0.26100.9818. The current main trial at 6cc46a3c has identical PR source/fixture contents. Hosted Windows passed.

**@⁠R0Y00** on GitHub · 2026-11-27 22:01 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3213#pullrequestreview-6093763123) · **reviewed** Independent verification of exact head `8509b495` on `main` `d474a393`. The alias is based on a reachable raw store and the proven fixed descriptor table/offset; the emitter still validates the descriptor words and reuses the same writable handle. Built `startup_stream_consumer d3d12_xs_shim compile_dxil native_store_replay` in Debug and Release /O2. Ran `ctest --test-dir <build> --no-tests=error -j1 -V -R '^(startup_compute_dispatch_native_(warp|hardware)|native_global_load_hardware|native_smem_vcc_hardware)$'`. Each configuration had three passes and one WARP wave32 capability skip. The RTX 4060 Laptop readback matched all 320 dwords including the untouched tail, with one UAV, zero SRVs, and no D3D12 debug error. Windows 11 26200.9974, driver 32.0.16.1656, WARP 10.0.26100.9818. The current `main` trial at `6cc46a3c` has identical PR source/fixture contents. Hosted Windows passed.
Author
Owner

@⁠xiaoqi72665 on GitHub · 2026-11-27 23:18 UTC · original

Adjacent regression note from the #3211 work, on an independently built, unmodified upstream main at 2e12dd8 (Debug, Windows, app-local Agility 1.620.2, WARP 1.0.22.0 / RX 7900 XT driver 32.0.32029.2010):

  • startup_compute_dispatch_native_warp reports a native translation and one translated Dispatch(3,2,2), but word 0 is c5c5c5c5 rather than ea74e376, and 288 words differ. This is not the wave32 capability skip observed with your WARP build; it may be specific to this app-local WARP version. No conclusion about the cause yet.
  • startup_compute_dispatch_native_hardware gets past the first native readback, then fails the cache-file assertion because revision.txt is present (#2820). A local diagnostic copy allowing only that additional metadata filename passes the full check, including the shared guest UAV/untouched tail, in both Debug and Release on RX 7900 XT.

Reproduced the same two original failures on the #3211 candidate in both configurations. The candidate has no production changes. Keeping the original tests unchanged in #3211; this is separate evidence, not a request to reopen the merged shared-UAV change.

Repro: ctest --preset dev --no-tests=error -j1 -V -R "^startup_compute_dispatch_native_(warp|hardware)$"

AI-assisted.

**@⁠xiaoqi72665** on GitHub · 2026-11-27 23:18 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3213#issuecomment-7230034055) Adjacent regression note from the #3211 work, on an independently built, **unmodified** upstream main at 2e12dd8 (Debug, Windows, app-local Agility 1.620.2, WARP 1.0.22.0 / RX 7900 XT driver 32.0.32029.2010): - startup_compute_dispatch_native_warp reports a native translation and one translated Dispatch(3,2,2), but word 0 is c5c5c5c5 rather than ea74e376, and 288 words differ. This is not the wave32 capability skip observed with your WARP build; it may be specific to this app-local WARP version. No conclusion about the cause yet. - startup_compute_dispatch_native_hardware gets past the first native readback, then fails the cache-file assertion because revision.txt is present (#2820). A local diagnostic copy allowing only that additional metadata filename passes the full check, including the shared guest UAV/untouched tail, in both Debug and Release on RX 7900 XT. Reproduced the same two original failures on the #3211 candidate in both configurations. The candidate has no production changes. Keeping the original tests unchanged in #3211; this is separate evidence, not a request to reopen the merged shared-UAV change. Repro: ctest --preset dev --no-tests=error -j1 -V -R "^startup_compute_dispatch_native_(warp|hardware)$" AI-assisted.
This discussion has been locked. Commenting is limited to contributors.
No description provided.