Repository navigation
Shader: image atomics name a U32 element in the handle annotation - #525
Closed
spidercraft wants to merge 1 commit into
Closed
spidercraft wants to merge 1 commit into
spidercraft wants to merge 1 commit into
Conversation
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 <noreply@anthropic.com>
Author
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
victory translate --pipelinesover 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.--validatecounts unchanged.cargo test -p victory-shaderpasses; Windows target type-checks with no diagnostics.🤖 Generated with Claude Code