compute: lower 3D and NSA typed image atomics #3338
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3338
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3336"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Leyukaka on GitHub · 2026-11-28 10:49 UTC · original
Leyukaka:compute-image-atomic-3d-nsa→main· +185 −11 · 6 files · 1 commits · merged 2026-11-29 08:36 UTCPart of #3226.
Typed uint image atomics in the direct compute path (
src/gfx1013_direct_compute.inl,image_atomic) accepted only a 2D image with a contiguous address. Two forms are added:dim:SQ_RSRC_IMG_3D). It is bound as aRWTexture3D<uint>UAV, with x, y and z passed toatomicBinOp/atomicCompareExchange. The cache records it astex3d(src/direct_compute_cache.cpp), and the runtime binds aD3D12_UAV_DIMENSION_TEXTURE3Dview for it (src/startup_stubs/d3d12_compute_dispatch.inl).[vX, vY], or[vX, vY, vZ]for 3D): y and z are read from the VGPRs named in the NSA word.NSA forms with more than one extra address word, cube and array dimensions keep
unsupported typed 2D image atomic operands.Tests (Windows 11, RTX 5080, SDK 10.0.26100 DXC, Release,
main3926a289plus this commit):native_image_atomic_3d_nsa_controlscompiles a 3Dimage_atomic_add, a 2D NSAimage_atomic_umax, and a 3D NSAimage_atomic_cmpswap. It checks the atomic call, theRWTexture3D/RWTexture2Dhandle properties and the coordinate and data VGPRs. NSA with two extra words, cube and 2D array stay refused.mainthe 3D program is refused withunsupported typed 2D image atomic operands.native_image_atomic_3d_nsa_hardwarepasses: the 2D NSAumaxover 336 texture words and the 3Daddover 1,168 words of a three-mip volume.native_image_atomic_3d_nsa_warpreports a capability skip (77).tests/compute_check.cppgains the 3D atomic texture case it uses.ctest -R "native_|startup_compute|compile_dxil|salu": 529 of 531. The two failures were the new control, which passes after a fix to the test's coordinate tracing (not rerun in the full selection), andnative_scalar_lds_hardware, which fails as onmain.compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests: 250 to 252. The added programs are the two above, 8,564 dispatches in the issue's run. None is lost, and the existing output is byte-identical.Not covered: no source mutations were run; the 3D
cmpswapcase is checked in DXIL only; thetex3d uintmanifest line and its runtime reader are not exercised by a test.@Leyukaka on GitHub · 2026-11-29 05:03 UTC · original
Open for review at
cdfc5264(CI green, no conflict withmain212d4b5f). A reviewer can checknative_image_atomic_3d_nsa_controlsfor the DXIL shape andnative_image_atomic_3d_nsa_hardwareon a hardware adapter; the 3Dcmpswapcase is covered in DXIL only.