Repository navigation
Shaders: match DXC resource annotations for 64-bit image atomics - #2
Open
MichaelSmithAI wants to merge 1 commit into
Conversation
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.
For the image-atomic lowering on Marvisak#48, use the scalar U32 component annotation (0x105) for both operand widths. DXC 1.8.2505.1 and 1.9.2609.5 both emitted this annotation for a descriptor-heap RWTexture2D<uint64_t> in our synthetic compile. The i64 atomic overload, wide operands, shader feature flags and R32G32_UINT host-view requirement still apply.
The existing width fixture now follows the atomic call's handle to its annotation and checks the operand and result widths in memory. It also exercises the existing emit path. The regression alone failed on the wide operation at 56f0072 (annotation 0x107). With the change, all 54 shader tests passed on Linux x86-64, Rust 1.99.1, with
cargo +stable test --offline --locked -p victory-shader.This establishes parity with DXC's metadata. The earlier RTX 5070 readbacks in the upstream discussion already succeeded on the original code. Hardware and retail rendering with this change are untested.
A separate compiler check on VIctory #705 at
8536c54shows why the regression follows the atomic's actual handle. Microsoft DXV rejected the add and compare/exchange fixtures for missing descriptor-heap atomic capability. Adding the flag alone passed validation, but the emitted atomic still used the bounds check's cached floating-point texture handle. With Marvisak#48's capability flags, distinct cache entries for distinct resource properties, and this U32 annotation, the atomic usedRWTexture2D<U32>and both fixtures passed DXV. This check used compilation and disassembly only.DXC component mapping · Shader Model 6.6 atomics
AI assistance: Codex compared the compiler output, implemented the change, reviewed it and ran the tests.