Shader: image atomics name a U32 element in the handle annotation #525

Closed
github-bot wants to merge 1 commit from gh-pr/525/head into gh-pr/525/base
Owner

@⁠spidercraft on GitHub · 2026-11-24 04:27 UTC · original
spidercraft:shader-image-atomics → main · +8 −3 · 1 files · 1 commits · closed without merging

What

Typed texture handles were annotated as four F32 components, image atomics included. DXIL's image atomics are 32-bit integer ones, but a host that takes the element type from the handle annotation (vkd3d-proton's DXIL-to-SPIR-V) then emits a float OpAtomicUMax, which is invalid SPIR-V; NVIDIA's shader compiler (620.73 on Linux) crashes on it instead of failing the pipeline.

An image atomic's handle now names one U32 component (0x105), and the per-function handle cache is keyed by both annotation words, so a texture that is both read and updated atomically gets both handles. Other handles are unchanged. Independent of the Linux work, though found there.

Tested

  • Linux, RTX 5090, vkd3d-proton, Microsoft's DXC v1.9.2609: victory translate --pipelines over the title's shader archive completed (it crashed in the driver before): every emitted vertex, pixel and mesh program made a pipeline; the compute programs that do not are the ones requiring 64-lane waves. --validate counts unchanged.
  • cargo test -p victory-shader passes; Windows target type-checks with no diagnostics.

🤖 Generated with Claude Code

**@⁠spidercraft** on GitHub · 2026-11-24 04:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/525) `spidercraft:shader-image-atomics` → `main` · +8 −3 · 1 files · 1 commits · closed without merging ## What Typed texture handles were annotated as four F32 components, image atomics included. DXIL's image atomics are 32-bit integer ones, but a host that takes the element type from the handle annotation (vkd3d-proton's DXIL-to-SPIR-V) then emits a float `OpAtomicUMax`, which is invalid SPIR-V; NVIDIA's shader compiler (620.73 on Linux) crashes on it instead of failing the pipeline. An image atomic's handle now names one U32 component (`0x105`), and the per-function handle cache is keyed by both annotation words, so a texture that is both read and updated atomically gets both handles. Other handles are unchanged. Independent of the Linux work, though found there. ## Tested - Linux, RTX 5090, vkd3d-proton, Microsoft's DXC v1.9.2609: `victory translate --pipelines` over the title's shader archive completed (it crashed in the driver before): every emitted vertex, pixel and mesh program made a pipeline; the compute programs that do not are the ones requiring 64-lane waves. `--validate` counts unchanged. - `cargo test -p victory-shader` passes; Windows target type-checks with no diagnostics. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Typed texture handles were annotated as four F32 components, image
atomics included. DXIL's atomics are 32-bit integer ones, but
vkd3d-proton's DXIL-to-SPIR-V takes the element type from the
annotation and made OpAtomicUMax on a float, invalid SPIR-V that NVIDIA's
Linux shader compiler (620.73) crashed on: victory translate --pipelines
over shaders.rpf died in libnvidia-gpucomp. An image atomic's handle now
names one U32 component; the handle cache is keyed by both annotation
words, so a texture read and updated atomically gets both handles.

Tested: on Linux (RTX 5090, vkd3d-proton, DXC 1.9.2609) translate
--pipelines over shaders.rpf completes: 12272/12272 vertex and pixel,
8191/8191 mesh, 1372/1693 compute pipelines (the rest need 64-lane
waves); --validate counts unchanged (12172, 1670, 8129).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:07:08 +00:00
github-bot closed this pull request 2026-11-26 04:07:08 +00:00
Author
Owner

@⁠spidercraft on GitHub · 2026-11-24 04:35 UTC · original

Closing as a duplicate of #177, which fixed the same bug first: main already annotates an atomic's handle as U32, so keying the handle cache by the element type is the whole fix. #526 now carries #177's commits instead of this one.

**@⁠spidercraft** on GitHub · 2026-11-24 04:35 UTC · [original](https://github.com/Marvisak/VIctory/pull/525#issuecomment-7122157741) Closing as a duplicate of #177, which fixed the same bug first: `main` already annotates an atomic's handle as U32, so keying the handle cache by the element type is the whole fix. #526 now carries #177's commits instead of this one.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!525
No description provided.