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

Closed
spidercraft wants to merge 1 commit from upstream-pr/525 into main
spidercraft commented 2026-11-24 04:27:25 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by spidercraft on 2026-11-24T04:27:25Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:issue:6574612813 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/525). Originally posted by [spidercraft](https://github.com/spidercraft) on 2026-11-24T04:27:25Z. --- ## 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)
upstream-sync closed this pull request 2026-11-24 06:53:32 +00:00
spidercraft commented 2026-11-24 06:55:48 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by spidercraft on 2026-11-24T04:35:25Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7122157741 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/525#issuecomment-7122157741). Originally posted by [spidercraft](https://github.com/spidercraft) on 2026-11-24T04:35:25Z. --- 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

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
Marvisak/VIctory!525
No description provided.