Skip to content

Shaders: match DXC resource annotations for 64-bit image atomics - #2

Open
MichaelSmithAI wants to merge 1 commit into
flapwarp78:shader/typed-atomics-and-branch-threadingfrom
MichaelSmithAI:fix/canonical-atomic-uav
Open

MichaelSmithAI wants to merge 1 commit into
flapwarp78:shader/typed-atomics-and-branch-threadingfrom
MichaelSmithAI:fix/canonical-atomic-uav

Conversation

@MichaelSmithAI

@MichaelSmithAI MichaelSmithAI commented Nov 24, 2026 •

Copy link
Copy Markdown

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 8536c54 shows 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 used RWTexture2D<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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant