gpu: check that the built array-atomics probe keeps nonUniformIndex #429
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/435"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by roansystemlabs on 2026-11-22T02:48:02Z.
Refs #369
What
This adds one CTest,
array_atomics_dxil(tests/array_atomics_dxil_check.py), registered with the other DXIL checks in theINTAKE_PYTHONblock. It runs in the existing Windows job underctest --preset dev -E '_hardware$'and needs DXC only, no GPU.ProbeArrayAtomics.csofrom the build directory withdxc -dumpbin. That is thecs_6_0output of the same DXC command that writes theProbeArrayAtomics.hthatoffscreen_checkembeds. Locally the two hold the same 3360 bytes. The check finds the singledx.op.atomicBinOp/atomicCompareExchangeand follows its handle operand back to thecreateHandlethat defines it. It then checks three things:!dx.resourcesis theAliasesbinding (u0, space1, 8 descriptors);dx.op.threadId, traced through its defining instructions;nonUniformIndexistrue.tests/gpu_alias_writes.hlslascs_6_0withNonUniformResourceIndex(removed. It runs the same trace and requires the same handle and dynamic index, now withnonUniformIndexfalse.The check follows operands by value and never matches SSA numbers or fixed line text. It prints the compiler identification (
!llvm.ident) of each module it measures and thedxc --versionit ran.A pass establishes only that the compiled probe kept the flag. #332 still checks the actual per-device counts and fails on incorrect results. The probe, the write path,
gpu_alias_lookup_writes_*and the workflow are unchanged.Verification
Commit
292281d, Windows 11 build 26200, VS 2022 Build Tools, Windows SDK 10.0.26100.0dxc.exe, DXC 1.9.2602.17 (21d28f727):The existing device test is unchanged and still passes on WARP:
gpu_alias_lookup_writes_warppassed, witharray_atomics ... expected=64 actual=64,64,64,64anddebug_layer=unavailable. No hardware GPU run was made for this change.Negative checks: I passed a probe
.csobuilt from a modified source as the probe argument. Both cases failed with exit 1:NonUniformResourceIndex:nonUniformIndex=false, "the built probe lost nonUniformIndex on the atomic's handle";Aliases[0]instead of the dynamic index:dynamic_index=False, "the atomic does not use the probe's dynamic Aliases index".Manual diagnostics (not in CTest)
The built probe targets
cs_6_0, socs_6_6and other compilers stay manual. Compile the probe yourself and pass it as the.csoargument:v1.8.2502v1.8.2502The control always compiles
cs_6_0with the DXC given. 1.8.2502.8 is not the report's 1.8.2502.11 (239921522). That build ships with the Windows SDK and is not published as a GitHub release, and I have not measured it. Thecs_6_6rows also show that the trace does not depend on SSA numbering or on the creation form: the values are numbered differently there and the handle goes throughannotateHandle.AI-assisted: prepared and submitted with the support of Roan System (AI-assisted development), reviewed before posting.