[pr-fix] Avoid AMD DXIL crash on raw buffer size queries #3

Manually merged
github merged 1 commit from gh-pr/3/head into gh-pr/3/base 2026-12-03 06:24:30 +00:00
Owner

@⁠saifzetoney-ui on GitHub · 2026-11-29 16:29 UTC · original
saifzetoney-ui:fix/amd-raw-buffer-pipeline → main · +13 −1 · 1 files · 1 commits · merged 2026-11-29 16:53 UTC

What it changes

On an RX 9070 XT, D3D12 compute pipeline creation can crash when the generated DXIL queries a raw buffer's size and then loads from the same buffer in one block. End the block after the size query when the shader reads the record count and also accesses the buffer. Shaders that never read the count retain existing handle reuse.

Ports the fix from DoubleGhosty/cool_fox#174 to this fork's descriptor lowering.

How it was tested

  • GPU: Radeon RX 9070 XT, driver 32.0.32029.2010. Synthetic shaders, with no game assets or game profile required.
  • Before: the indexed structured-buffer size test crashed during pipeline creation with 0xc0000005 in amdxc64.dll.
  • After: the regression test passes on hardware and WARP. The regression shader uses wave32. cargo test --locked -p victory-shader --lib passed with 462 passed and 9 ignored.
  • Shader Clippy with warnings denied and the staged asset policy check passed.

Checked for overlap

  • Checked the open pull requests in this repository for overlapping changes.
**@⁠saifzetoney-ui** on GitHub · 2026-11-29 16:29 UTC · [original](https://github.com/MahanYTT/VIctory-MA/pull/3) `saifzetoney-ui:fix/amd-raw-buffer-pipeline` → `main` · +13 −1 · 1 files · 1 commits · merged 2026-11-29 16:53 UTC ## What it changes On an RX 9070 XT, D3D12 compute pipeline creation can crash when the generated DXIL queries a raw buffer's size and then loads from the same buffer in one block. End the block after the size query when the shader reads the record count and also accesses the buffer. Shaders that never read the count retain existing handle reuse. Ports the fix from DoubleGhosty/cool_fox#174 to this fork's descriptor lowering. ## How it was tested - GPU: Radeon RX 9070 XT, driver 32.0.32029.2010. Synthetic shaders, with no game assets or game profile required. - Before: the indexed structured-buffer size test crashed during pipeline creation with `0xc0000005` in `amdxc64.dll`. - After: the regression test passes on hardware and WARP. The regression shader uses wave32. `cargo test --locked -p victory-shader --lib` passed with 462 passed and 9 ignored. - Shader Clippy with warnings denied and the staged asset policy check passed. ## Checked for overlap - [x] Checked the open pull requests in this repository for overlapping changes.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 06:24:28 +00:00
github manually merged commit f025b85056 into gh-pr/3/base 2026-12-03 06:24:30 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.