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

Merged
R0Y00 merged 1 commit from upstream-pr/3213 into main 2026-11-27 22:01:38 +00:00
R0Y00 commented 2026-11-27 21:50:45 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-27T21:50:45Z.


Refs #3209.

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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5533540309 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3213). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-27T21:50:45Z. --- Refs #3209. 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 commented 2026-11-27 22:01:06 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-27T22:01:06Z.

Review: COMMENTED


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6093763123 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3213#pullrequestreview-6093763123). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-27T22:01:06Z. **Review:** COMMENTED --- 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.
xiaoqi72665 commented 2026-11-27 23:18:06 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by xiaoqi72665 on 2026-11-27T23:18:06Z.


Adjacent regression note from the #3209 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 #3209 candidate in both configurations. The candidate has no production changes. Keeping the original tests unchanged in #3209; 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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7230034055 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3213#issuecomment-7230034055). Originally posted by [xiaoqi72665](https://github.com/xiaoqi72665) on 2026-11-27T23:18:06Z. --- Adjacent regression note from the #3209 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 #3209 candidate in both configurations. The candidate has no production changes. Keeping the original tests unchanged in #3209; 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.
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!3213
No description provided.