gpu_alias_lookup_writes_hardware: array atomics probe reads 256 per buffer on RX 9070 XT #363

Open
opened 2026-11-21 23:37:51 +00:00 by denn0x · 35 comments
denn0x commented 2026-11-21 23:37:51 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by denn0x on 2026-11-21T23:37:51Z.


Observed

At 9bdbb20 (main, after #332), gpu_alias_lookup_writes_hardware fails on an AMD Radeon RX 9070 XT. The array-atomics probe reads 256 in every buffer instead of 64. This is the same signature docs/experiments.md records for the Windows 10 in-box WARP 10.0.19041. The fixture itself is exact on this adapter. gpu_alias_lookup_writes_warp (WARP 10.0.26100.9818) passes.

backend=hardware debug_layer=enabled
adapter=AMD Radeon RX 9070 XT vendor=1002 device=7550
driver=32.0.32015.7029
array_atomics threads=256 buffers=4 expected=64 actual=256,256,256,256
gpu_alias_lookup_writes add_sub words=2 add=0001f5a0 sub=000d4ca0 expected_add=0001f5a0 expected_sub=000d4ca0 mismatches=0
gpu_alias_lookup_writes other results=1047 words=147454 mismatches=0
gpu_alias_lookup_writes ranges=4 records=1047 stores=14 contenders=256 sum=128416 min=-1250 max=1241.62 misses=9 words_checked=147456 mismatches=0
debug_errors=0 debug_warnings=0

The result is the same in 3 of 3 runs. Environment: Windows 11 build 26200, MSVC 19.50.35720, Windows SDK 10.0.26100.0, DXC 1.8.2502.11 (cs_6_0), D3D12 debug layer enabled.

Probe variants (local only, not committed)

I replaced only the probe line in ProbeArrayAtomics (tests/gpu_alias_writes.hlsl) and rebuilt offscreen_check. The harness, the 4 committed 4-byte buffers and the expected 64 per buffer are unchanged.

Probe line RX 9070 XT WARP 10.0.26100.9818
Aliases[NonUniformResourceIndex(id % rangeCount)].InterlockedAdd(0, 1, previous) (current) 256,256,256,256 64,64,64,64
Same, without the returned value 256,256,256,256 64,64,64,64
NonUniformResourceIndex((id / 2) % rangeCount) (lane pairs share an index) 256,256,256,256 64,64,64,64
NonUniformResourceIndex((id / 64) % rangeCount) (one index per wave) 64,64,64,64 64,64,64,64
Aliases[0] for every thread 256,0,0,0 (exact) 256,0,0,0 (exact)
Store(0, id + 1) to Aliases[NonUniformResourceIndex(id)] for id < 4 1,2,3,4 (exact) 1,2,3,4 (exact)
Manual waterfall: first = WaveReadLaneFirst(want), the atomic on Aliases[first] when first == want, loop 64,64,64,64 64,64,64,64

The buffers are distinct and their descriptors resolve correctly: the store and index-0 rows are exact. The error appears only when the atomic's resource index varies within a wave. Each buffer then gains the whole wave's lane count (64 lanes × 4 waves = 256), and the manual waterfall is exact. One interpretation: this driver applies the wave-level atomic for every lane in each iteration of its non-uniform waterfall, not only for the lanes whose index matches. That is a hypothesis; I have not inspected the ISA.

Question

The probe already names this as an adapter defect. Should the RX 9070 XT measurement be added next to the WARP 10.0.19041 note in docs/experiments.md, with the test still failing here by design? Or would you rather have the title-address write path use an explicit WaveReadLaneFirst waterfall, which is exact on both adapters above? I can open either PR.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6535859170 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369). Originally posted by [denn0x](https://github.com/denn0x) on 2026-11-21T23:37:51Z. --- ## Observed At `9bdbb20` (main, after #332), `gpu_alias_lookup_writes_hardware` fails on an AMD Radeon RX 9070 XT. The array-atomics probe reads 256 in every buffer instead of 64. This is the same signature `docs/experiments.md` records for the Windows 10 in-box WARP 10.0.19041. The fixture itself is exact on this adapter. `gpu_alias_lookup_writes_warp` (WARP 10.0.26100.9818) passes. ```text backend=hardware debug_layer=enabled adapter=AMD Radeon RX 9070 XT vendor=1002 device=7550 driver=32.0.32015.7029 array_atomics threads=256 buffers=4 expected=64 actual=256,256,256,256 gpu_alias_lookup_writes add_sub words=2 add=0001f5a0 sub=000d4ca0 expected_add=0001f5a0 expected_sub=000d4ca0 mismatches=0 gpu_alias_lookup_writes other results=1047 words=147454 mismatches=0 gpu_alias_lookup_writes ranges=4 records=1047 stores=14 contenders=256 sum=128416 min=-1250 max=1241.62 misses=9 words_checked=147456 mismatches=0 debug_errors=0 debug_warnings=0 ``` The result is the same in 3 of 3 runs. Environment: Windows 11 build 26200, MSVC 19.50.35720, Windows SDK 10.0.26100.0, DXC 1.8.2502.11 (`cs_6_0`), D3D12 debug layer enabled. ## Probe variants (local only, not committed) I replaced only the probe line in `ProbeArrayAtomics` (`tests/gpu_alias_writes.hlsl`) and rebuilt `offscreen_check`. The harness, the 4 committed 4-byte buffers and the expected 64 per buffer are unchanged. | Probe line | RX 9070 XT | WARP 10.0.26100.9818 | |---|---|---| | `Aliases[NonUniformResourceIndex(id % rangeCount)].InterlockedAdd(0, 1, previous)` (current) | 256,256,256,256 | 64,64,64,64 | | Same, without the returned value | 256,256,256,256 | 64,64,64,64 | | `NonUniformResourceIndex((id / 2) % rangeCount)` (lane pairs share an index) | 256,256,256,256 | 64,64,64,64 | | `NonUniformResourceIndex((id / 64) % rangeCount)` (one index per wave) | 64,64,64,64 | 64,64,64,64 | | `Aliases[0]` for every thread | 256,0,0,0 (exact) | 256,0,0,0 (exact) | | `Store(0, id + 1)` to `Aliases[NonUniformResourceIndex(id)]` for `id < 4` | 1,2,3,4 (exact) | 1,2,3,4 (exact) | | Manual waterfall: `first = WaveReadLaneFirst(want)`, the atomic on `Aliases[first]` when `first == want`, loop | 64,64,64,64 | 64,64,64,64 | The buffers are distinct and their descriptors resolve correctly: the store and index-0 rows are exact. The error appears only when the atomic's resource index varies within a wave. Each buffer then gains the whole wave's lane count (64 lanes × 4 waves = 256), and the manual waterfall is exact. One interpretation: this driver applies the wave-level atomic for every lane in each iteration of its non-uniform waterfall, not only for the lanes whose index matches. That is a hypothesis; I have not inspected the ISA. ## Question The probe already names this as an adapter defect. Should the RX 9070 XT measurement be added next to the WARP 10.0.19041 note in `docs/experiments.md`, with the test still failing here by design? Or would you rather have the title-address write path use an explicit `WaveReadLaneFirst` waterfall, which is exact on both adapters above? I can open either PR. AI-assisted (Claude Code).
abilliontokens commented 2026-11-24 06:48:13 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by abilliontokens on 2026-11-21T23:46:42Z.


Second RDNA 4 adapter data point: the RX 9060 XT shows the same array-atomics signature as the RX 9070 XT report, on a newer driver.

  • Commit: 9bdbb20 (main)
  • Environment: Windows 11 Pro build 26200.9711; AMD Radeon RX 9060 XT (vendor 1002, device 7590), driver 32.0.32029.2010; NVIDIA GeForce RTX 5060 Ti (vendor 10de, device 2d04), driver 32.0.16.2124; in-box WARP 10.0.26100.9711. MSVC 14.44.35207, Windows SDK 10.0.26100.0, CMake 4.4.3. Debug layer unavailable on this machine (Graphics Tools not installed): every run reports debug_layer=unavailable, so no debug diagnostics are claimed.
$env:XBOX2WINDOWS_ADAPTER='RX 9060 XT'
ctest --preset dev --no-tests=error -R '^gpu_alias_lookup_writes_hardware$' -V
$env:XBOX2WINDOWS_ADAPTER='RTX 5060 Ti'
ctest --preset dev --no-tests=error -R '^gpu_alias_lookup_writes_hardware$' -V
Remove-Item Env:XBOX2WINDOWS_ADAPTER
ctest --preset dev --no-tests=error -R '^gpu_alias_lookup_writes_warp$' -V
Backend array_atomics actual (expected 64) Test Runs
RX 9060 XT 256,256,256,256 Failed (the probe names the adapter defect) 3/3 identical
RTX 5060 Ti 64,64,64,64 Passed 1
WARP 10.0.26100.9711 64,64,64,64 Passed 1

On the RX 9060 XT the rest of the fixture is exact, matching the 9070 XT report: add_sub … mismatches=0, other results=1047 words=147454 mismatches=0, ranges=4 records=1047 stores=14 contenders=256 sum=128416 min=-1250 max=1241.62 misses=9 words_checked=147456 mismatches=0.

This covers a second RDNA 4 SKU (device 7590) and a second driver (32.0.32029.2010 vs the report's 32.0.32015.7029): the inexact per-lane atomic through NonUniformResourceIndex is not specific to the 9070 XT or that driver version. It does not inspect the ISA, so the report's waterfall hypothesis remains a hypothesis; the manual-waterfall and per-wave-index variants in the report were not rerun here. The docs-note vs explicit-waterfall decision is the maintainer's; this is only the additional adapter measurement.

AI-assisted; runs executed locally on the configuration above.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7071098620 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7071098620). Originally posted by [abilliontokens](https://github.com/abilliontokens) on 2026-11-21T23:46:42Z. --- Second RDNA 4 adapter data point: the RX 9060 XT shows the same array-atomics signature as the RX 9070 XT report, on a newer driver. - **Commit:** `9bdbb20` (`main`) - **Environment:** Windows 11 Pro build 26200.9711; AMD Radeon RX 9060 XT (vendor `1002`, device `7590`), driver `32.0.32029.2010`; NVIDIA GeForce RTX 5060 Ti (vendor `10de`, device `2d04`), driver `32.0.16.2124`; in-box WARP `10.0.26100.9711`. MSVC 14.44.35207, Windows SDK 10.0.26100.0, CMake 4.4.3. Debug layer unavailable on this machine (Graphics Tools not installed): every run reports `debug_layer=unavailable`, so no debug diagnostics are claimed. ```powershell $env:XBOX2WINDOWS_ADAPTER='RX 9060 XT' ctest --preset dev --no-tests=error -R '^gpu_alias_lookup_writes_hardware$' -V $env:XBOX2WINDOWS_ADAPTER='RTX 5060 Ti' ctest --preset dev --no-tests=error -R '^gpu_alias_lookup_writes_hardware$' -V Remove-Item Env:XBOX2WINDOWS_ADAPTER ctest --preset dev --no-tests=error -R '^gpu_alias_lookup_writes_warp$' -V ``` | Backend | `array_atomics` actual (expected 64) | Test | Runs | |---|---|---|---| | RX 9060 XT | `256,256,256,256` | Failed (the probe names the adapter defect) | 3/3 identical | | RTX 5060 Ti | `64,64,64,64` | Passed | 1 | | WARP 10.0.26100.9711 | `64,64,64,64` | Passed | 1 | On the RX 9060 XT the rest of the fixture is exact, matching the 9070 XT report: `add_sub … mismatches=0`, `other results=1047 words=147454 mismatches=0`, `ranges=4 records=1047 stores=14 contenders=256 sum=128416 min=-1250 max=1241.62 misses=9 words_checked=147456 mismatches=0`. This covers a second RDNA 4 SKU (device `7590`) and a second driver (`32.0.32029.2010` vs the report's `32.0.32015.7029`): the inexact per-lane atomic through `NonUniformResourceIndex` is not specific to the 9070 XT or that driver version. It does not inspect the ISA, so the report's waterfall hypothesis remains a hypothesis; the manual-waterfall and per-wave-index variants in the report were not rerun here. The docs-note vs explicit-waterfall decision is the maintainer's; this is only the additional adapter measurement. _AI-assisted; runs executed locally on the configuration above._
R0Y00 commented 2026-11-24 06:48:13 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T23:57:40Z.


@denn0x @abilliontokens, please go ahead with a measurement note in docs/experiments.md linking the RX 9070 XT report and the RX 9060 XT report. At 9bdbb20, each adapter returned 256,256,256,256 on all three direct-probe runs, against 64,64,64,64 expected. On both adapters the original title-address fixture recorded zero mismatches in both groups (add/sub and all other checks). The direct probe should continue to fail the test under #332.

The explicit waterfall returned 64,64,64,64 on the RX 9070 XT. @abilliontokens, if you run the same variant on the RX 9060 XT, the direct and waterfall readbacks, shader revision and driver version would make a useful independent comparison here. The documentation can proceed now. The cause remains open. Please keep the existing write path and CI coverage for this change.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7071217103 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7071217103). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-21T23:57:40Z. --- @denn0x @abilliontokens, please go ahead with a measurement note in `docs/experiments.md` linking the [RX 9070 XT report](https://github.com/R0Y00/Xbox2Windows/issues/369) and the [RX 9060 XT report](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7071098620). At `9bdbb20`, each adapter returned `256,256,256,256` on all three direct-probe runs, against `64,64,64,64` expected. On both adapters the original title-address fixture recorded zero mismatches in both groups (add/sub and all other checks). The direct probe should continue to fail the test under #332. The explicit waterfall returned `64,64,64,64` on the RX 9070 XT. @abilliontokens, if you run the same variant on the RX 9060 XT, the direct and waterfall readbacks, shader revision and driver version would make a useful independent comparison here. The documentation can proceed now. The cause remains open. Please keep the existing write path and CI coverage for this change.
denn0x commented 2026-11-24 06:48:14 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by denn0x on 2026-11-22T00:00:26Z.


Opened #383 with the measurement note (documentation only; the probe, write path and CI coverage are unchanged).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7071247230 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7071247230). Originally posted by [denn0x](https://github.com/denn0x) on 2026-11-22T00:00:26Z. --- Opened #383 with the measurement note (documentation only; the probe, write path and CI coverage are unchanged).
Jess-Doit commented 2026-11-24 06:48:15 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Jess-Doit on 2026-11-22T00:46:27Z.


I ran the same source-built probe on a GTX 1060 6 GB and the in-box Windows 10 WARP using commit 65492448c51361dc81a667d34ccf3d103d938801. The host was Windows 10 22H2 build 19045.6456, with MSVC 19.44.35230.0 and Windows SDK 10.0.26100.0 DXC. The D3D12 debug layer was enabled on both backends.

$env:XBOX2WINDOWS_ADAPTER = 'GTX 1060'
.\out\build\gpu-check-release\offscreen_check.exe hardware --gpu-alias-lookup-writes
.\out\build\gpu-check-release\offscreen_check.exe warp --gpu-alias-lookup-writes
Adapter and driver Direct probe, expected 64 per buffer Fixture mismatches
GTX 1060 6 GB, 32.0.15.6094 64,64,64,64 in 3/3 runs 0
In-box WARP, 10.0.19041.5794 256,256,256,256 in 3/3 runs 2, both in the shared add/sub words

Both backends matched all 1,047 per-record results and the other 147,454 words, with zero debug errors or warnings. The GTX 1060 adds a Pascal hardware control. The WARP run reproduces the Windows 10 behavior already documented in docs/experiments.md.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7071770464 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7071770464). Originally posted by [Jess-Doit](https://github.com/Jess-Doit) on 2026-11-22T00:46:27Z. --- I ran the same source-built probe on a GTX 1060 6 GB and the in-box Windows 10 WARP using commit `65492448c51361dc81a667d34ccf3d103d938801`. The host was Windows 10 22H2 build `19045.6456`, with MSVC `19.44.35230.0` and Windows SDK `10.0.26100.0` DXC. The D3D12 debug layer was enabled on both backends. ```powershell $env:XBOX2WINDOWS_ADAPTER = 'GTX 1060' .\out\build\gpu-check-release\offscreen_check.exe hardware --gpu-alias-lookup-writes .\out\build\gpu-check-release\offscreen_check.exe warp --gpu-alias-lookup-writes ``` | Adapter and driver | Direct probe, expected 64 per buffer | Fixture mismatches | | --- | --- | --- | | GTX 1060 6 GB, `32.0.15.6094` | `64,64,64,64` in 3/3 runs | 0 | | In-box WARP, `10.0.19041.5794` | `256,256,256,256` in 3/3 runs | 2, both in the shared add/sub words | Both backends matched all 1,047 per-record results and the other 147,454 words, with zero debug errors or warnings. The GTX 1060 adds a Pascal hardware control. The WARP run reproduces the Windows 10 behavior already documented in `docs/experiments.md`.
abilliontokens commented 2026-11-24 06:48:17 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by abilliontokens on 2026-11-22T01:36:41Z.


Folding the GTX 1060 / in-box Win10 WARP measurements (@Jess-Doit) into the merged measurement note, per the measurement-only direction above — docs only, no probe or write-path change. @denn0x @Jess-Doit shout if you'd rather fold these in yourselves. AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7072315081 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7072315081). Originally posted by [abilliontokens](https://github.com/abilliontokens) on 2026-11-22T01:36:41Z. --- Folding the GTX 1060 / in-box Win10 WARP measurements (@Jess-Doit) into the merged measurement note, per the measurement-only direction above — docs only, no probe or write-path change. @denn0x @Jess-Doit shout if you'd rather fold these in yourselves. _AI-assisted._
abilliontokens commented 2026-11-24 06:48:17 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by abilliontokens on 2026-11-22T01:37:25Z.


PR with the folded-in measurements: R0Y00/Xbox2Windows#427. AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7072323302 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7072323302). Originally posted by [abilliontokens](https://github.com/abilliontokens) on 2026-11-22T01:37:25Z. --- PR with the folded-in measurements: R0Y00/Xbox2Windows#427. _AI-assisted._
roansystemlabs commented 2026-11-24 06:48:17 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by roansystemlabs on 2026-11-22T01:56:12Z.


I disassembled the array-atomics probe to check the compiler side of this report. No GPU is needed for this. The DXIL is the same on two DXC releases: the atomic's handle is created with nonUniformIndex = true.

Source: ProbeArrayAtomics in tests/gpu_alias_writes.hlsl at ac48a50 (main), with the same arguments CMake uses (-T cs_6_0 -E ProbeArrayAtomics -I src). I also compiled cs_6_6 to cover the createHandleFromBinding path.

Compilers:

  • Windows SDK 10.0.26100.0 dxc.exe: dxcompiler.dll 1.9.2602.17 (21d28f727)
  • The official GitHub release v1.8.2502 (dxc_2025_02_20.zip, SHA-256 70b1913a1bfce4a3e1a5311d16246f4ecdf3a3e613abec8aa529e57668426f85, Microsoft Authenticode signature valid): dxcompiler.dll 1.8.2502.8 (b4711839e). The report lists 1.8.2502.11. I could not find that build among the GitHub releases, so this is the nearest published one.
dxc -T cs_6_0 -E ProbeArrayAtomics -I src -Fo ProbeArrayAtomics.cso tests\gpu_alias_writes.hlsl
dxc -dumpbin ProbeArrayAtomics.cso

cs_6_0, identical on 1.8.2502.8 and 1.9.2602.17:

%8 = urem i32 %2, %7
%9 = add i32 %8, 0
%10 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 1, i32 0, i32 %9, i1 true)  ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
%11 = call i32 @dx.op.atomicBinOp.i32(i32 78, %dx.types.Handle %10, i32 0, i32 0, i32 undef, i32 undef, i32 1)

cs_6_6, identical on both:

%11 = call %dx.types.Handle @dx.op.createHandleFromBinding(i32 217, %dx.types.ResBind { i32 0, i32 7, i32 1, i8 1 }, i32 %10, i1 true)
%12 = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %11, %dx.types.ResourceProperties { i32 4107, i32 0 })
%13 = call i32 @dx.op.atomicBinOp.i32(i32 78, %dx.types.Handle %12, i32 0, i32 0, i32 undef, i32 undef, i32 1)

A full diff of the two cs_6_0 disassemblies differs only in the compiler identification (dxcoob 1.8.2502.8 vs 1.9.2602.17) and the validator version metadata (1.8 vs 1.9). As a control, the same source with NonUniformResourceIndex(...) removed compiles to i1 false on both compilers. That shows the flag comes from the intrinsic.

Conclusion (cautious): DXC marks the index non-uniform in both versions, so the problem is likely downstream of DXIL, in the driver's shader compiler. That fits the variants in the report: the bad result appears only when the index varies within a wave, and the explicit WaveReadLaneFirst waterfall is exact. It also fits the existing Windows 10 WARP 10.0.19041 note: a different consumer of the same kind of DXIL shows the same signature, while current WARP and the NVIDIA adapters are exact. I have not looked at the RDNA 4 ISA, so I can't confirm where the driver loses the per-lane loop. Someone with an RX 9070 XT or 9060 XT could capture the ISA of this shader, for example with Radeon GPU Analyzer, and check whether a non-uniform resource loop is emitted around the buffer_atomic_add.

Separately, I've prepared a small CTest check, array_atomics_dxil + array_atomics_dxil_controls. It needs DXC only, so it runs in the Windows CI. It disassembles the built ProbeArrayAtomics.cso and fresh cs_6_0/cs_6_6 compiles, and fails if the flag disappears. It would not fix or detect the RDNA 4 failure itself; it only keeps a compiler or probe change from confounding future measurements. I'll open it as a PR only if that is wanted. It leaves the probe, the write path and the existing tests unchanged.

AI-assisted: run and prepared with the support of Roan System; reviewed before posting.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7072558238 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7072558238). Originally posted by [roansystemlabs](https://github.com/roansystemlabs) on 2026-11-22T01:56:12Z. --- I disassembled the array-atomics probe to check the compiler side of this report. No GPU is needed for this. The DXIL is the same on two DXC releases: the atomic's handle is created with `nonUniformIndex = true`. **Source:** `ProbeArrayAtomics` in `tests/gpu_alias_writes.hlsl` at `ac48a50` (`main`), with the same arguments CMake uses (`-T cs_6_0 -E ProbeArrayAtomics -I src`). I also compiled `cs_6_6` to cover the `createHandleFromBinding` path. **Compilers:** - Windows SDK 10.0.26100.0 `dxc.exe`: `dxcompiler.dll 1.9.2602.17 (21d28f727)` - The official GitHub release `v1.8.2502` (`dxc_2025_02_20.zip`, SHA-256 `70b1913a1bfce4a3e1a5311d16246f4ecdf3a3e613abec8aa529e57668426f85`, Microsoft Authenticode signature valid): `dxcompiler.dll 1.8.2502.8 (b4711839e)`. The report lists 1.8.2502.11. I could not find that build among the GitHub releases, so this is the nearest published one. ```powershell dxc -T cs_6_0 -E ProbeArrayAtomics -I src -Fo ProbeArrayAtomics.cso tests\gpu_alias_writes.hlsl dxc -dumpbin ProbeArrayAtomics.cso ``` `cs_6_0`, identical on 1.8.2502.8 and 1.9.2602.17: ```llvm %8 = urem i32 %2, %7 %9 = add i32 %8, 0 %10 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 1, i32 0, i32 %9, i1 true) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex) %11 = call i32 @dx.op.atomicBinOp.i32(i32 78, %dx.types.Handle %10, i32 0, i32 0, i32 undef, i32 undef, i32 1) ``` `cs_6_6`, identical on both: ```llvm %11 = call %dx.types.Handle @dx.op.createHandleFromBinding(i32 217, %dx.types.ResBind { i32 0, i32 7, i32 1, i8 1 }, i32 %10, i1 true) %12 = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %11, %dx.types.ResourceProperties { i32 4107, i32 0 }) %13 = call i32 @dx.op.atomicBinOp.i32(i32 78, %dx.types.Handle %12, i32 0, i32 0, i32 undef, i32 undef, i32 1) ``` A full diff of the two `cs_6_0` disassemblies differs only in the compiler identification (`dxcoob 1.8.2502.8` vs `1.9.2602.17`) and the validator version metadata (`1.8` vs `1.9`). As a control, the same source with `NonUniformResourceIndex(...)` removed compiles to `i1 false` on both compilers. That shows the flag comes from the intrinsic. **Conclusion (cautious):** DXC marks the index non-uniform in both versions, so the problem is likely downstream of DXIL, in the driver's shader compiler. That fits the variants in the report: the bad result appears only when the index varies within a wave, and the explicit `WaveReadLaneFirst` waterfall is exact. It also fits the existing Windows 10 WARP 10.0.19041 note: a different consumer of the same kind of DXIL shows the same signature, while current WARP and the NVIDIA adapters are exact. I have not looked at the RDNA 4 ISA, so I can't confirm where the driver loses the per-lane loop. Someone with an RX 9070 XT or 9060 XT could capture the ISA of this shader, for example with Radeon GPU Analyzer, and check whether a non-uniform resource loop is emitted around the `buffer_atomic_add`. Separately, I've prepared a small CTest check, `array_atomics_dxil` + `array_atomics_dxil_controls`. It needs DXC only, so it runs in the Windows CI. It disassembles the built `ProbeArrayAtomics.cso` and fresh `cs_6_0`/`cs_6_6` compiles, and fails if the flag disappears. It would not fix or detect the RDNA 4 failure itself; it only keeps a compiler or probe change from confounding future measurements. I'll open it as a PR only if that is wanted. It leaves the probe, the write path and the existing tests unchanged. AI-assisted: run and prepared with the support of Roan System; reviewed before posting.
R0Y00 commented 2026-11-24 06:48:18 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T02:27:40Z.


@roansystemlabs, please open a focused PR for the DXC regression. In the existing Windows job, inspect the actual cs_6_0 ProbeArrayAtomics.cso used by the device test. Trace the atomic’s resource handle back to its creation and verify that it uses the probe’s dynamic UAV index with nonUniformIndex=true. Compile a synthetic control with the source intrinsic removed and show that the same check detects false. Both cases can share a CTest. Follow the handle and index through the instructions so that SSA renumbering or unrelated disassembly changes do not break the check.

Please record the DXC version used for each measurement, distinguishing 1.8.2502.8 from the original report’s 1.8.2502.11. Keep cs_6_6 and cross-version runs as manual diagnostics while the built probe targets cs_6_0. A pass establishes that the compiled probe retained the flag. #332 continues to check the actual per-device counts and fail on incorrect results.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7072920615 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7072920615). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-22T02:27:40Z. --- @roansystemlabs, please open a focused PR for the DXC regression. In the existing Windows job, inspect the actual `cs_6_0` `ProbeArrayAtomics.cso` used by the device test. Trace the atomic’s resource handle back to its creation and verify that it uses the probe’s dynamic UAV index with `nonUniformIndex=true`. Compile a synthetic control with the source intrinsic removed and show that the same check detects `false`. Both cases can share a CTest. Follow the handle and index through the instructions so that SSA renumbering or unrelated disassembly changes do not break the check. Please record the DXC version used for each measurement, distinguishing `1.8.2502.8` from the original report’s `1.8.2502.11`. Keep `cs_6_6` and cross-version runs as manual diagnostics while the built probe targets `cs_6_0`. A pass establishes that the compiled probe retained the flag. #332 continues to check the actual per-device counts and fail on incorrect results.
JB2WIN commented 2026-11-24 06:48:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by JB2WIN on 2026-11-22T03:10:21Z.


Another NVIDIA data point for the array-atomics probe (no failure here, for comparison with the RDNA 4 reports).

  • Commit: c2fc84c (main), dev preset, debug layer enabled
  • Windows 11 Pro 26200.9974, VS Build Tools 2026 (MSVC 19.51.36260.0), SDK 10.0.26100.8249 (DXC 1.8.2502.11)
backend=hardware debug_layer=enabled
adapter=NVIDIA GeForce RTX 3080 vendor=10de device=2206
driver=32.0.16.2124
array_atomics threads=256 buffers=4 expected=64 actual=64,64,64,64
backend=warp debug_layer=enabled
adapter=Microsoft Basic Render Driver vendor=1414 device=008c
driver=10.0.26100.9818
array_atomics threads=256 buffers=4 expected=64 actual=64,64,64,64

ctest --preset dev --no-tests=error -R '^gpu_alias_lookup_writes_(hardware|warp)$' -V: both passed.

This comment is AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7073370788 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7073370788). Originally posted by [JB2WIN](https://github.com/JB2WIN) on 2026-11-22T03:10:21Z. --- Another NVIDIA data point for the array-atomics probe (no failure here, for comparison with the RDNA 4 reports). - Commit: `c2fc84c` (main), dev preset, debug layer enabled - Windows 11 Pro 26200.9974, VS Build Tools 2026 (MSVC 19.51.36260.0), SDK 10.0.26100.8249 (DXC 1.8.2502.11) ```text backend=hardware debug_layer=enabled adapter=NVIDIA GeForce RTX 3080 vendor=10de device=2206 driver=32.0.16.2124 array_atomics threads=256 buffers=4 expected=64 actual=64,64,64,64 backend=warp debug_layer=enabled adapter=Microsoft Basic Render Driver vendor=1414 device=008c driver=10.0.26100.9818 array_atomics threads=256 buffers=4 expected=64 actual=64,64,64,64 ``` `ctest --preset dev --no-tests=error -R '^gpu_alias_lookup_writes_(hardware|warp)$' -V`: both passed. This comment is AI-assisted.
abilliontokens commented 2026-11-24 06:48:22 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by abilliontokens on 2026-11-22T02:30:09Z.


Independent comparison for the RX 9060 XT measurement, per the request in R0Y00's comment: denn0x's manual WaveReadLaneFirst waterfall probe variant run on the RX 9060 XT, direct and waterfall readbacks, shader revision and driver version.

Environment (measured)

  • Windows 11 Pro build 26200.9711; MSVC 14.44.35207; CMake preset dev.
  • AMD Radeon RX 9060 XT, vendor 1002, device 7590, driver 32.0.32029.2010.
  • NVIDIA GeForce RTX 5060 Ti, vendor 10de, device 2d04, driver 32.0.16.2124 (control).
  • In-box WARP 10.0.26100.9711 (Microsoft Basic Render Driver; control).
  • DXC: Windows SDK 10.0.26100.0 dxc.exe — dxcompiler.dll 1.8.2502.11 (239921522), dxil.dll 1.8.2502.11; -T cs_6_0 as CMake builds it. Same compiler line as the issue report.
  • debug_layer=unavailable on every run (Graphics Tools not installed), so no debug-layer diagnostics are claimed.

Commit measured: 97016d9 (origin/main head at measurement time). git diff 9bdbb20 97016d9 on tests/gpu_alias_writes.hlsl, tests/gpu_alias_lookup.cpp and tests/offscreen_check.cpp is empty, so the probe and harness are byte-identical to the 9bdbb20 reports. The waterfall edit below was local and uncommitted, replacing only the ProbeArrayAtomics body, exactly the scope denn0x described; the harness, buffers and expected 64 per buffer are unchanged.

$env:XBOX2WINDOWS_ADAPTER = 'RX 9060 XT'   # then 'RTX 5060 Ti'; unset for warp
out\build\dev-369probe\offscreen_check.exe hardware --gpu-alias-lookup-writes
out\build\dev-369probe\offscreen_check.exe warp --gpu-alias-lookup-writes

Readbacks (3 runs per cell, identical in every run)

Adapter / driver Direct probe (committed) Waterfall probe (local variant)
RX 9060 XT, 32.0.32029.2010 256,256,256,256 — test fails by design (probe names the adapter defect) 64,64,64,64 — whole test passes
RTX 5060 Ti, 32.0.16.2124 64,64,64,64 64,64,64,64
WARP 10.0.26100.9711 64,64,64,64 64,64,64,64

On the RX 9060 XT with the waterfall probe the rest of the fixture is also exact in all three runs, matching the direct-probe runs: add_sub … mismatches=0, other results=1047 words=147454 mismatches=0, ranges=4 records=1047 … words_checked=147456 mismatches=0.

The waterfall is exact on the RX 9060 XT. That independently confirms denn0x's RX 9070 XT waterfall row on the second RDNA 4 SKU (device 7590, driver 32.0.32029.2010): the per-lane InterlockedAdd through NonUniformResourceIndex reads 256 per buffer, while the explicit waterfall reads exactly 64, and the two NVIDIA/WARP controls stay exact under both probes.

Shader revision

  • Direct (committed tests/gpu_alias_writes.hlsl): SHA-256 6f693a7024d5d7ae60bcfa1679cfa3aa176ae306e49a818d9a4cec56fb33c162.
  • Waterfall (local edit, whole file): SHA-256 eea1222ea327e8c769654189714d821fc62b470be3f176a5711d5f8e1b14adfc.
  • dxc -dumpbin of the waterfall's ProbeArrayAtomics.cso: the atomic runs on a handle created with nonUniformIndex = i1 false (dx.op.createHandle(i32 57, i8 1, …, i1 false)), alongside dx.op.waveReadLaneFirst — i.e. the loop hands the driver a wave-uniform index per iteration, which is the mechanism denn0x's variant table and @roansystemlabs' DXIL note point at. That is the compiled shape, not a driver-ISA claim; the cause of the direct probe's defect remains open as in the report.

Waterfall HLSL used

denn0x described the variant but did not post exact HLSL, so this is a faithful reconstruction from his description ("first = WaveReadLaneFirst(want), the atomic on Aliases[first] when first == want, loop"). Body of ProbeArrayAtomics (everything above it in tests/gpu_alias_writes.hlsl unchanged):

void ProbeArrayAtomics(uint id : SV_DispatchThreadID)
{
    if (id >= recordCount) return;
    uint previous;
    const uint want = id % rangeCount;
    [loop]
    while (true) {
        const uint first = WaveReadLaneFirst(want);
        if (first == want) {
            Aliases[first].InterlockedAdd(0, 1, previous);
            break;
        }
    }
}

Served lanes leave the loop, so each iteration reads the value of the lowest-index still-active lane; lanes whose want differs keep looping until their index comes first. That is a property of this code, and the readbacks above are what was measured; no ISA was inspected and nothing here is inferred about the driver beyond the recorded numbers.

Per the direction above, this is measurement only — no probe, write-path, docs or CI change, nothing committed or pushed.

AI-assisted; runs executed locally on the configuration above.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7072945852 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7072945852). Originally posted by [abilliontokens](https://github.com/abilliontokens) on 2026-11-22T02:30:09Z. --- Independent comparison for the [RX 9060 XT measurement](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7071098620), per the request in [R0Y00's comment](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7071217103): denn0x's manual `WaveReadLaneFirst` waterfall probe variant run on the RX 9060 XT, direct and waterfall readbacks, shader revision and driver version. ## Environment (measured) - Windows 11 Pro build 26200.9711; MSVC 14.44.35207; CMake preset `dev`. - AMD Radeon RX 9060 XT, vendor `1002`, device `7590`, driver `32.0.32029.2010`. - NVIDIA GeForce RTX 5060 Ti, vendor `10de`, device `2d04`, driver `32.0.16.2124` (control). - In-box WARP 10.0.26100.9711 (Microsoft Basic Render Driver; control). - DXC: Windows SDK 10.0.26100.0 `dxc.exe` — `dxcompiler.dll 1.8.2502.11 (239921522)`, `dxil.dll 1.8.2502.11`; `-T cs_6_0` as CMake builds it. Same compiler line as the issue report. - `debug_layer=unavailable` on every run (Graphics Tools not installed), so no debug-layer diagnostics are claimed. Commit measured: `97016d9` (`origin/main` head at measurement time). `git diff 9bdbb20 97016d9` on `tests/gpu_alias_writes.hlsl`, `tests/gpu_alias_lookup.cpp` and `tests/offscreen_check.cpp` is empty, so the probe and harness are byte-identical to the `9bdbb20` reports. The waterfall edit below was local and uncommitted, replacing only the `ProbeArrayAtomics` body, exactly the scope denn0x described; the harness, buffers and expected 64 per buffer are unchanged. ```powershell $env:XBOX2WINDOWS_ADAPTER = 'RX 9060 XT' # then 'RTX 5060 Ti'; unset for warp out\build\dev-369probe\offscreen_check.exe hardware --gpu-alias-lookup-writes out\build\dev-369probe\offscreen_check.exe warp --gpu-alias-lookup-writes ``` ## Readbacks (3 runs per cell, identical in every run) | Adapter / driver | Direct probe (committed) | Waterfall probe (local variant) | |---|---|---| | RX 9060 XT, `32.0.32029.2010` | `256,256,256,256` — test fails by design (probe names the adapter defect) | `64,64,64,64` — whole test passes | | RTX 5060 Ti, `32.0.16.2124` | `64,64,64,64` | `64,64,64,64` | | WARP 10.0.26100.9711 | `64,64,64,64` | `64,64,64,64` | On the RX 9060 XT with the waterfall probe the rest of the fixture is also exact in all three runs, matching the direct-probe runs: `add_sub … mismatches=0`, `other results=1047 words=147454 mismatches=0`, `ranges=4 records=1047 … words_checked=147456 mismatches=0`. **The waterfall is exact on the RX 9060 XT.** That independently confirms denn0x's RX 9070 XT waterfall row on the second RDNA 4 SKU (device `7590`, driver `32.0.32029.2010`): the per-lane `InterlockedAdd` through `NonUniformResourceIndex` reads 256 per buffer, while the explicit waterfall reads exactly 64, and the two NVIDIA/WARP controls stay exact under both probes. ## Shader revision - Direct (committed `tests/gpu_alias_writes.hlsl`): SHA-256 `6f693a7024d5d7ae60bcfa1679cfa3aa176ae306e49a818d9a4cec56fb33c162`. - Waterfall (local edit, whole file): SHA-256 `eea1222ea327e8c769654189714d821fc62b470be3f176a5711d5f8e1b14adfc`. - `dxc -dumpbin` of the waterfall's `ProbeArrayAtomics.cso`: the atomic runs on a handle created with `nonUniformIndex = i1 false` (`dx.op.createHandle(i32 57, i8 1, …, i1 false)`), alongside `dx.op.waveReadLaneFirst` — i.e. the loop hands the driver a wave-uniform index per iteration, which is the mechanism denn0x's variant table and @roansystemlabs' DXIL note point at. That is the compiled shape, not a driver-ISA claim; the cause of the direct probe's defect remains open as in the report. ## Waterfall HLSL used denn0x described the variant but did not post exact HLSL, so this is a faithful reconstruction from his description ("`first = WaveReadLaneFirst(want)`, the atomic on `Aliases[first]` when `first == want`, loop"). Body of `ProbeArrayAtomics` (everything above it in `tests/gpu_alias_writes.hlsl` unchanged): ```hlsl void ProbeArrayAtomics(uint id : SV_DispatchThreadID) { if (id >= recordCount) return; uint previous; const uint want = id % rangeCount; [loop] while (true) { const uint first = WaveReadLaneFirst(want); if (first == want) { Aliases[first].InterlockedAdd(0, 1, previous); break; } } } ``` Served lanes leave the loop, so each iteration reads the value of the lowest-index still-active lane; lanes whose `want` differs keep looping until their index comes first. That is a property of this code, and the readbacks above are what was measured; no ISA was inspected and nothing here is inferred about the driver beyond the recorded numbers. Per the direction above, this is measurement only — no probe, write-path, docs or CI change, nothing committed or pushed. _AI-assisted; runs executed locally on the configuration above._
marquezinii commented 2026-11-24 06:48:28 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by marquezinii on 2026-11-22T07:43:30Z.


NVIDIA Blackwell data point for the array-atomics probe (no failure, for comparison with the RDNA 4 reports).

  • Commit: 0f6a757 (main), dev preset, debug layer unavailable (Graphics Tools not installed)
  • Windows 11 26H2, build 26300.9974; VS Build Tools 18 (MSVC 19.52.37029); SDK 10.0.26100.0
  • Command: ctest --preset dev -R gpu_alias_lookup_writes_hardware -V
backend=hardware debug_layer=unavailable
adapter=NVIDIA GeForce RTX 5070 vendor=10de device=2f04
driver=32.0.16.2124
array_atomics threads=256 buffers=4 expected=64 actual=64,64,64,64
gpu_alias_lookup_writes add_sub words=2 add=0001f5a0 sub=000d4ca0 expected_add=0001f5a0 expected_sub=000d4ca0 mismatches=0
gpu_alias_lookup_writes other results=1047 words=147454 mismatches=0
gpu_alias_lookup_writes ranges=4 records=1047 stores=14 contenders=256 sum=128416 min=-1250 max=1241.62 misses=9 words_checked=147456 mismatches=0

Passed in 0.72 s: 64 per buffer, not 256.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7076083729 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7076083729). Originally posted by [marquezinii](https://github.com/marquezinii) on 2026-11-22T07:43:30Z. --- NVIDIA Blackwell data point for the array-atomics probe (no failure, for comparison with the RDNA 4 reports). - Commit: `0f6a757` (main), dev preset, debug layer **unavailable** (Graphics Tools not installed) - Windows 11 26H2, build 26300.9974; VS Build Tools 18 (MSVC 19.52.37029); SDK 10.0.26100.0 - Command: `ctest --preset dev -R gpu_alias_lookup_writes_hardware -V` ```text backend=hardware debug_layer=unavailable adapter=NVIDIA GeForce RTX 5070 vendor=10de device=2f04 driver=32.0.16.2124 array_atomics threads=256 buffers=4 expected=64 actual=64,64,64,64 gpu_alias_lookup_writes add_sub words=2 add=0001f5a0 sub=000d4ca0 expected_add=0001f5a0 expected_sub=000d4ca0 mismatches=0 gpu_alias_lookup_writes other results=1047 words=147454 mismatches=0 gpu_alias_lookup_writes ranges=4 records=1047 stores=14 contenders=256 sum=128416 min=-1250 max=1241.62 misses=9 words_checked=147456 mismatches=0 ``` Passed in 0.72 s: 64 per buffer, not 256.
stan495 commented 2026-11-24 06:48:28 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-22T08:21:46Z.


Reproduced the identical actual=256,256,256,256 array-atomics probe signature on an RDNA 3 adapter (AMD Radeon RX 7900 XTX) with the current driver.

This confirms the behavior is not specific to RDNA 4 (RX 9070 XT / RX 9060 XT), but also present on RDNA 3 when executing divergent UAV-array atomic operations through NonUniformResourceIndex.

Environment

  • Commit: 185b9d6c (current main)
  • OS: Windows 11 build 26200
  • Toolchain: MSVC 19.50 (VS 2022 17.14), Windows SDK 10.0.26100.0, DXC 1.8.2502.11
  • Adapter: AMD Radeon RX 7900 XTX (vendor 0x1002, device 0x744c)
  • Driver: 32.0.32029.2010
  • D3D12 Debug Layer: Enabled

Command

ctest --preset dev -R 'gpu_alias_lookup_writes_hardware' -V

Observed Output

49: Test command: E:\02_Workspace\Xbox2Windows\out\build\dev\offscreen_check.exe "hardware" "--gpu-alias-lookup-writes"
49: Working Directory: E:/02_Workspace/Xbox2Windows/out/build/dev
49: Test timeout computed to be: 45
49: InterlockedAdd through a per-thread index into a UAV array is not applied exactly once per thread on this adapter (array_atomics counts above). This is an adapter defect, recorded for the Windows 10 in-box WARP 10.0.19041 in docs/experiments.md
49: backend=hardware debug_layer=enabled
49: adapter=AMD Radeon RX 7900 XTX vendor=1002 device=744c
49: driver=32.0.32029.2010
49: array_atomics threads=256 buffers=4 expected=64 actual=256,256,256,256
49: gpu_alias_lookup_writes add_sub words=2 add=0001f5a0 sub=000d4ca0 expected_add=0001f5a0 expected_sub=000d4ca0 mismatches=0
49: gpu_alias_lookup_writes other results=1047 words=147454 mismatches=0
49: gpu_alias_lookup_writes ranges=4 records=1047 stores=14 contenders=256 sum=128416 min=-1250 max=1241.62 misses=9 words_checked=147456 mismatches=0
49: debug_errors=0 debug_warnings=0
1/1 Test #49: gpu_alias_lookup_writes_hardware ...***Failed    0.14 sec

Observation

  • The probe fails identically with actual=256,256,256,256.
  • The fixture itself (WriteTitleAddresses) succeeds with 0 mismatches across all 1,047 records and 147,454 checked words, with 0 D3D12 debug warnings or errors.
  • This provides direct evidence that AMD driver's non-uniform dynamic indexing waterfall handling for UAV atomics affects both RDNA 3 and RDNA 4.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7076471364 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7076471364). Originally posted by [stan495](https://github.com/stan495) on 2026-11-22T08:21:46Z. --- Reproduced the identical `actual=256,256,256,256` array-atomics probe signature on an **RDNA 3** adapter (AMD Radeon RX 7900 XTX) with the current driver. This confirms the behavior is not specific to RDNA 4 (RX 9070 XT / RX 9060 XT), but also present on RDNA 3 when executing divergent UAV-array atomic operations through `NonUniformResourceIndex`. ### Environment - **Commit:** `185b9d6c` (current `main`) - **OS:** Windows 11 build 26200 - **Toolchain:** MSVC 19.50 (VS 2022 17.14), Windows SDK 10.0.26100.0, DXC 1.8.2502.11 - **Adapter:** AMD Radeon RX 7900 XTX (vendor `0x1002`, device `0x744c`) - **Driver:** `32.0.32029.2010` - **D3D12 Debug Layer:** Enabled ### Command ```powershell ctest --preset dev -R 'gpu_alias_lookup_writes_hardware' -V ``` ### Observed Output ```text 49: Test command: E:\02_Workspace\Xbox2Windows\out\build\dev\offscreen_check.exe "hardware" "--gpu-alias-lookup-writes" 49: Working Directory: E:/02_Workspace/Xbox2Windows/out/build/dev 49: Test timeout computed to be: 45 49: InterlockedAdd through a per-thread index into a UAV array is not applied exactly once per thread on this adapter (array_atomics counts above). This is an adapter defect, recorded for the Windows 10 in-box WARP 10.0.19041 in docs/experiments.md 49: backend=hardware debug_layer=enabled 49: adapter=AMD Radeon RX 7900 XTX vendor=1002 device=744c 49: driver=32.0.32029.2010 49: array_atomics threads=256 buffers=4 expected=64 actual=256,256,256,256 49: gpu_alias_lookup_writes add_sub words=2 add=0001f5a0 sub=000d4ca0 expected_add=0001f5a0 expected_sub=000d4ca0 mismatches=0 49: gpu_alias_lookup_writes other results=1047 words=147454 mismatches=0 49: gpu_alias_lookup_writes ranges=4 records=1047 stores=14 contenders=256 sum=128416 min=-1250 max=1241.62 misses=9 words_checked=147456 mismatches=0 49: debug_errors=0 debug_warnings=0 1/1 Test #49: gpu_alias_lookup_writes_hardware ...***Failed 0.14 sec ``` ### Observation - The probe fails identically with `actual=256,256,256,256`. - The fixture itself (`WriteTitleAddresses`) succeeds with **0 mismatches** across all 1,047 records and 147,454 checked words, with 0 D3D12 debug warnings or errors. - This provides direct evidence that AMD driver's non-uniform dynamic indexing waterfall handling for UAV atomics affects both RDNA 3 and RDNA 4.
rwZephyr commented 2026-11-24 06:48:40 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by rwZephyr on 2026-11-22T18:45:33Z.


Independent RX 9070 XT retest on driver 32.0.32029.2010 at f1f95cf62ea873f0b32fbe9ae1a629151b6e382a (main). AI-assisted report, tests run locally from unmodified source.

Windows 11 25H2 x64 build 26200.9974, MSVC 19.44.35230, Windows SDK 10.0.26100, DXC 1.8.2502.8. Both backends reported debug_layer=unavailable. The renderer identified the discrete Radeon RX 9070 XT (1002:7550) and WARP (1414:008c, 10.0.26100.9818).

With the workspace-local toolchain loaded, $intakePython pointing to its Python virtual environment, and debug CRT DLLs staged alongside the built executable:

cmake --preset dev "-DINTAKE_PYTHON=$intakePython"
cmake --build --preset dev --target offscreen_check
$env:XBOX2WINDOWS_ADAPTER = 'RX 9070 XT'
ctest --preset dev --no-tests=error -R '^gpu_alias_lookup_writes_hardware$' -V
ctest --preset dev --no-tests=error -R '^gpu_alias_lookup_writes_hardware$' -V
Remove-Item Env:XBOX2WINDOWS_ADAPTER
ctest --preset dev --no-tests=error -R '^gpu_alias_lookup_writes_warp$' -V

The direct probe expects 64,64,64,64. The RX 9070 XT returned 256,256,256,256 in both runs and failed with InterlockedAdd through a per-thread index into a UAV array is not applied exactly once per thread on this adapter. WARP returned 64,64,64,64 and passed. The rest of the fixture had zero mismatches on both backends across 1,047 records and 147,456 words. There were zero capability skips. This retest used the committed direct probe.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7083847358 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7083847358). Originally posted by [rwZephyr](https://github.com/rwZephyr) on 2026-11-22T18:45:33Z. --- Independent RX 9070 XT retest on driver `32.0.32029.2010` at `f1f95cf62ea873f0b32fbe9ae1a629151b6e382a` (`main`). AI-assisted report, tests run locally from unmodified source. Windows 11 25H2 x64 build `26200.9974`, MSVC `19.44.35230`, Windows SDK `10.0.26100`, DXC `1.8.2502.8`. Both backends reported `debug_layer=unavailable`. The renderer identified the discrete Radeon RX 9070 XT (`1002:7550`) and WARP (`1414:008c`, `10.0.26100.9818`). With the workspace-local toolchain loaded, `$intakePython` pointing to its Python virtual environment, and debug CRT DLLs staged alongside the built executable: ```powershell cmake --preset dev "-DINTAKE_PYTHON=$intakePython" cmake --build --preset dev --target offscreen_check $env:XBOX2WINDOWS_ADAPTER = 'RX 9070 XT' ctest --preset dev --no-tests=error -R '^gpu_alias_lookup_writes_hardware$' -V ctest --preset dev --no-tests=error -R '^gpu_alias_lookup_writes_hardware$' -V Remove-Item Env:XBOX2WINDOWS_ADAPTER ctest --preset dev --no-tests=error -R '^gpu_alias_lookup_writes_warp$' -V ``` The direct probe expects `64,64,64,64`. The RX 9070 XT returned `256,256,256,256` in both runs and failed with `InterlockedAdd through a per-thread index into a UAV array is not applied exactly once per thread on this adapter`. WARP returned `64,64,64,64` and passed. The rest of the fixture had zero mismatches on both backends across 1,047 records and 147,456 words. There were zero capability skips. This retest used the committed direct probe.
potatoeking5150-commits commented 2026-11-24 06:48:48 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by potatoeking5150-commits on 2026-11-22T22:22:11Z.


Additional AMD GPU test result: Radeon RX 6500 (RDNA 2)

I tested gpu_alias_lookup_writes_hardware on an AMD Radeon RX 6500 under Windows 11.

System details

  • GPU: AMD Radeon RX 6500
  • PCI vendor ID: 1002
  • PCI device ID: 743f
  • GPU architecture: RDNA 2
  • Driver: 32.0.21045.29003
  • Operating system: Windows 11 Home, build 26300

Test results

I ran the test three consecutive times. All three runs produced identical results:

array_atomics threads=256 buffers=4 expected=64 actual=256,256,256,256

The remaining fixture checks passed:

gpu_alias_lookup_writes add_sub ... mismatches=0
gpu_alias_lookup_writes other results=1047 words=147454 mismatches=0
gpu_alias_lookup_writes ranges=4 records=1047 stores=14 contenders=256 ... mismatches=0
debug_errors=0 debug_warnings=0

All three runs returned exit code 1 due to the atomic probe result.

This appears consistent with the previously documented behavior on some AMD RDNA 3 and RDNA 4 adapters. This test adds an RDNA 2 GPU to the observed results.

The main alias lookup write fixture comparisons completed with zero mismatches on all three runs. I have not established the underlying cause of the atomic probe discrepancy.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7086763218 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7086763218). Originally posted by [potatoeking5150-commits](https://github.com/potatoeking5150-commits) on 2026-11-22T22:22:11Z. --- ### Additional AMD GPU test result: Radeon RX 6500 (RDNA 2) I tested `gpu_alias_lookup_writes_hardware` on an AMD Radeon RX 6500 under Windows 11. **System details** - GPU: AMD Radeon RX 6500 - PCI vendor ID: `1002` - PCI device ID: `743f` - GPU architecture: RDNA 2 - Driver: `32.0.21045.29003` - Operating system: Windows 11 Home, build 26300 **Test results** I ran the test three consecutive times. All three runs produced identical results: ```text array_atomics threads=256 buffers=4 expected=64 actual=256,256,256,256 ``` The remaining fixture checks passed: ```text gpu_alias_lookup_writes add_sub ... mismatches=0 gpu_alias_lookup_writes other results=1047 words=147454 mismatches=0 gpu_alias_lookup_writes ranges=4 records=1047 stores=14 contenders=256 ... mismatches=0 debug_errors=0 debug_warnings=0 ``` All three runs returned exit code `1` due to the atomic probe result. This appears consistent with the previously documented behavior on some AMD RDNA 3 and RDNA 4 adapters. This test adds an RDNA 2 GPU to the observed results. The main alias lookup write fixture comparisons completed with zero mismatches on all three runs. I have not established the underlying cause of the atomic probe discrepancy.
R0Y00 commented 2026-11-24 06:48:50 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T22:58:22Z.


Thanks for the three RX 6500 runs. This adds an RDNA 2 observation at device 743f, driver 32.0.21045.29003 and Windows build 26300: the direct probe returned 256 in each of four slots (expected 64), while the original alias-write fixture reported zero mismatches. Please add the source commit or package tag when convenient. The probe remains a failure and the issue stays open. The new result does not establish a cause.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7087215402 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7087215402). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-22T22:58:22Z. --- Thanks for the three RX 6500 runs. This adds an RDNA 2 observation at device 743f, driver 32.0.21045.29003 and Windows build 26300: the direct probe returned 256 in each of four slots (expected 64), while the original alias-write fixture reported zero mismatches. Please add the source commit or package tag when convenient. The probe remains a failure and the issue stays open. The new result does not establish a cause.
romn4rch commented 2026-11-24 06:48:52 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by romn4rch on 2026-11-22T23:58:18Z.


Intel UHD Graphics: a different signature (256,192,128,64), and probe variants that decode it

At 787ace7, gpu_alias_lookup_writes_hardware fails on an Intel(R) UHD Graphics (8086:468B, driver 32.0.101.7026). The four buffers do not all read 256 as on the AMD adapters above. They form a staircase:

backend=hardware debug_layer=unavailable
adapter=Intel(R) UHD Graphics vendor=8086 device=468b
driver=32.0.101.7026
array_atomics threads=256 buffers=4 expected=64 actual=256,192,128,64
gpu_alias_lookup_writes add_sub words=2 add=0001f5a0 sub=000d4ca0 expected_add=0001f5a0 expected_sub=000d4ca0 mismatches=0
gpu_alias_lookup_writes other results=1047 words=147454 mismatches=0
gpu_alias_lookup_writes ranges=4 records=1047 stores=14 contenders=256 sum=128416 min=-1250 max=1241.62 misses=9 words_checked=147456 mismatches=0

The result was the same in 3 of 3 serial runs of ctest --preset dev --no-tests=error -R '^gpu_alias_lookup_writes_hardware$' -j 1 -V with XBOX2WINDOWS_ADAPTER=Intel, and in 4 direct runs of the renderer. On the same host, the NVIDIA GeForce RTX 3050 6GB Laptop GPU (10DE:25EC, driver 32.0.16.2114) and WARP 10.0.26100.10068 read 64,64,64,64. tests/gpu_alias_writes.hlsl and tests/gpu_alias_lookup.cpp are unchanged on current main.

Probe variants (local only, not committed). I replaced line 74 of tests/gpu_alias_writes.hlsl (Aliases[NonUniformResourceIndex(id % rangeCount)].InterlockedAdd(0, 1, previous);), rebuilt offscreen_check and ran offscreen_check hardware --gpu-alias-lookup-writes: three times on Intel and once each on NVIDIA and WARP. After the last variant, I restored the file and rebuilt. Intel then read 256,192,128,64 again.

Replacement for line 74 Intel (3 runs) NVIDIA WARP
original line 256,192,128,64 ×3 64,64,64,64 64,64,64,64
InterlockedOr(0, 1u << (id % rangeCount), previous) 15,14,12,8 ×3 1,2,4,8 1,2,4,8
InterlockedAdd(0, 1u << (8u * (id % rangeCount)), previous) 0x40404040,0x40404000,0x40400000,0x40000000 ×3 0x40,0x4000,0x400000,0x40000000 0x40,0x4000,0x400000,0x40000000
original without previous 256,192,128,64 ×3 64,64,64,64 64,64,64,64
index (id / 2) % rangeCount 256,192,128,64 ×3 64,64,64,64 64,64,64,64
index (id / 16) % rangeCount 64,64,64,64 on the first run after the rebuild, then 128,64,128,64 ×2 64,64,64,64 64,64,64,64
index (id / 64) % rangeCount 64,64,64,64 ×3 64,64,64,64 64,64,64,64
without NonUniformResourceIndex 256,192,128,64 ×3 64,64,64,64 64,64,64,64
manual loop: WaveReadLaneFirst(want), atomic on Aliases[first] when first == want 64,64,64,64 ×3 64,64,64,64 64,64,64,64
if (id == 0) Aliases[0].Store(0, WaveGetLaneCount()) 16 32 4

Reading. The OR and byte-lane variants show which threads reached which buffer. On Intel, buffer j received exactly the threads with id % 4 >= j. Every Intel row matches one model:

  1. Within a wave, the loop for the non-uniform index takes the index of the first pending lane.
  2. It performs the atomic for every lane that is still pending, not only for the lanes with that index.
  3. It then retires the lanes with that index.

With 16 lanes per wave, this gives 16 + 12 + 8 + 4 adds per wave, so 256,192,128,64 over 16 waves. Indices that are uniform per wave are exact: the / 64 rows, and the / 16 row on its first run. The manual loop is also exact. The two later / 16 runs (128,64,128,64) are what the same model gives if the cached shader runs 32 threads per wave. That first run took 1.8 s and the later ones 0.4 s. WaveGetLaneCount reported 16 only for its own shader, so the 32-lane part is an inference. The DXIL for the original line creates the handle with nonUniformIndex set (createHandle(..., i1 true)) followed by atomicBinOp, so any per-index loop is generated by the driver.

The same model with no lane retired (every lane in every pass) gives 256 in every slot at any wave width. That is the RDNA 2/3/4 and WARP 10.0.19041 signature, and it also fits the note in docs/experiments.md that InterlockedXor is applied an even number of times there. Under that variant of the model, the OR replacement above would read 15,15,15,15. If an AMD owner can run that one line, the result would show whether those adapters fail the same way.

Environment: Windows 11 build 26300.10075, MSVC 19.44.35230, SDK 10.0.26100, DXC 1.9.2602.17 (cs_6_0). The debug layer was unavailable on all three backends (Graphics Tools not installed). This does not establish the cause; it narrows what the driver's loop does on this adapter.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7087964756 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7087964756). Originally posted by [romn4rch](https://github.com/romn4rch) on 2026-11-22T23:58:18Z. --- **Intel UHD Graphics: a different signature (`256,192,128,64`), and probe variants that decode it** At `787ace7`, `gpu_alias_lookup_writes_hardware` fails on an Intel(R) UHD Graphics (`8086:468B`, driver `32.0.101.7026`). The four buffers do not all read 256 as on the AMD adapters above. They form a staircase: ```text backend=hardware debug_layer=unavailable adapter=Intel(R) UHD Graphics vendor=8086 device=468b driver=32.0.101.7026 array_atomics threads=256 buffers=4 expected=64 actual=256,192,128,64 gpu_alias_lookup_writes add_sub words=2 add=0001f5a0 sub=000d4ca0 expected_add=0001f5a0 expected_sub=000d4ca0 mismatches=0 gpu_alias_lookup_writes other results=1047 words=147454 mismatches=0 gpu_alias_lookup_writes ranges=4 records=1047 stores=14 contenders=256 sum=128416 min=-1250 max=1241.62 misses=9 words_checked=147456 mismatches=0 ``` The result was the same in 3 of 3 serial runs of `ctest --preset dev --no-tests=error -R '^gpu_alias_lookup_writes_hardware$' -j 1 -V` with `XBOX2WINDOWS_ADAPTER=Intel`, and in 4 direct runs of the renderer. On the same host, the NVIDIA GeForce RTX 3050 6GB Laptop GPU (`10DE:25EC`, driver `32.0.16.2114`) and WARP `10.0.26100.10068` read `64,64,64,64`. `tests/gpu_alias_writes.hlsl` and `tests/gpu_alias_lookup.cpp` are unchanged on current `main`. **Probe variants (local only, not committed).** I replaced line 74 of `tests/gpu_alias_writes.hlsl` (`Aliases[NonUniformResourceIndex(id % rangeCount)].InterlockedAdd(0, 1, previous);`), rebuilt `offscreen_check` and ran `offscreen_check hardware --gpu-alias-lookup-writes`: three times on Intel and once each on NVIDIA and WARP. After the last variant, I restored the file and rebuilt. Intel then read `256,192,128,64` again. | Replacement for line 74 | Intel (3 runs) | NVIDIA | WARP | |---|---|---|---| | original line | `256,192,128,64` ×3 | `64,64,64,64` | `64,64,64,64` | | `InterlockedOr(0, 1u << (id % rangeCount), previous)` | `15,14,12,8` ×3 | `1,2,4,8` | `1,2,4,8` | | `InterlockedAdd(0, 1u << (8u * (id % rangeCount)), previous)` | `0x40404040,0x40404000,0x40400000,0x40000000` ×3 | `0x40,0x4000,0x400000,0x40000000` | `0x40,0x4000,0x400000,0x40000000` | | original without `previous` | `256,192,128,64` ×3 | `64,64,64,64` | `64,64,64,64` | | index `(id / 2) % rangeCount` | `256,192,128,64` ×3 | `64,64,64,64` | `64,64,64,64` | | index `(id / 16) % rangeCount` | `64,64,64,64` on the first run after the rebuild, then `128,64,128,64` ×2 | `64,64,64,64` | `64,64,64,64` | | index `(id / 64) % rangeCount` | `64,64,64,64` ×3 | `64,64,64,64` | `64,64,64,64` | | without `NonUniformResourceIndex` | `256,192,128,64` ×3 | `64,64,64,64` | `64,64,64,64` | | manual loop: `WaveReadLaneFirst(want)`, atomic on `Aliases[first]` when `first == want` | `64,64,64,64` ×3 | `64,64,64,64` | `64,64,64,64` | | `if (id == 0) Aliases[0].Store(0, WaveGetLaneCount())` | `16` | `32` | `4` | **Reading.** The OR and byte-lane variants show which threads reached which buffer. On Intel, buffer `j` received exactly the threads with `id % 4 >= j`. Every Intel row matches one model: 1. Within a wave, the loop for the non-uniform index takes the index of the first pending lane. 2. It performs the atomic for every lane that is still pending, not only for the lanes with that index. 3. It then retires the lanes with that index. With 16 lanes per wave, this gives 16 + 12 + 8 + 4 adds per wave, so `256,192,128,64` over 16 waves. Indices that are uniform per wave are exact: the `/ 64` rows, and the `/ 16` row on its first run. The manual loop is also exact. The two later `/ 16` runs (`128,64,128,64`) are what the same model gives if the cached shader runs 32 threads per wave. That first run took 1.8 s and the later ones 0.4 s. `WaveGetLaneCount` reported 16 only for its own shader, so the 32-lane part is an inference. The DXIL for the original line creates the handle with `nonUniformIndex` set (`createHandle(..., i1 true)`) followed by `atomicBinOp`, so any per-index loop is generated by the driver. The same model with no lane retired (every lane in every pass) gives 256 in every slot at any wave width. That is the RDNA 2/3/4 and WARP `10.0.19041` signature, and it also fits the note in `docs/experiments.md` that `InterlockedXor` is applied an even number of times there. Under that variant of the model, the OR replacement above would read `15,15,15,15`. If an AMD owner can run that one line, the result would show whether those adapters fail the same way. Environment: Windows 11 build 26300.10075, MSVC 19.44.35230, SDK 10.0.26100, DXC 1.9.2602.17 (`cs_6_0`). The debug layer was unavailable on all three backends (Graphics Tools not installed). This does not establish the cause; it narrows what the driver's loop does on this adapter. _AI-assisted._
potatoeking5150-commits commented 2026-11-24 06:48:57 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by potatoeking5150-commits on 2026-11-23T02:29:19Z.


  • Commit: a4ade3032f
  • GPU: AMD Radeon RX 6500, device 743f
  • Driver: 32.0.21045.29003
  • Windows: Build 26300
  • Atomic probe: Expected 64, actual 256 in all four buffers.
  • Alias-write fixture: Zero mismatches.
  • Debug layer: Zero errors and warnings.
  • Related tests: Three GPU alias tests and bvh_atomics_hardware all
    passed.

On Sun, Nov 22, 2026 at 6:58 PM romanv9 @.***> wrote:

romanv9 left a comment (R0Y00/Xbox2Windows#369)
https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7087964756

Intel UHD Graphics: a different signature (256,192,128,64), and probe
variants that decode it

At 787ace7, gpu_alias_lookup_writes_hardware fails on an Intel(R) UHD
Graphics (8086:468B, driver 32.0.101.7026). The four buffers do not all
read 256 as on the AMD adapters above. They form a staircase:

backend=hardware debug_layer=unavailable
adapter=Intel(R) UHD Graphics vendor=8086 device=468b
driver=32.0.101.7026
array_atomics threads=256 buffers=4 expected=64 actual=256,192,128,64
gpu_alias_lookup_writes add_sub words=2 add=0001f5a0 sub=000d4ca0 expected_add=0001f5a0 expected_sub=000d4ca0 mismatches=0
gpu_alias_lookup_writes other results=1047 words=147454 mismatches=0
gpu_alias_lookup_writes ranges=4 records=1047 stores=14 contenders=256 sum=128416 min=-1250 max=1241.62 misses=9 words_checked=147456 mismatches=0

The result was the same in 3 of 3 serial runs of ctest --preset dev
--no-tests=error -R '^gpu_alias_lookup_writes_hardware$' -j 1 -V with
XBOX2WINDOWS_ADAPTER=Intel, and in 4 direct runs of the renderer. On the
same host, the NVIDIA GeForce RTX 3050 6GB Laptop GPU (10DE:25EC, driver
32.0.16.2114) and WARP 10.0.26100.10068 read 64,64,64,64.
tests/gpu_alias_writes.hlsl and tests/gpu_alias_lookup.cpp are unchanged
on current main.

Probe variants (local only, not committed). I replaced line 74 of
tests/gpu_alias_writes.hlsl (Aliases[NonUniformResourceIndex(id %
rangeCount)].InterlockedAdd(0, 1, previous);), rebuilt offscreen_check
and ran offscreen_check hardware --gpu-alias-lookup-writes: three times
on Intel and once each on NVIDIA and WARP. After the last variant, I
restored the file and rebuilt. Intel then read 256,192,128,64 again.
Replacement for line 74 Intel (3 runs) NVIDIA WARP
original line 256,192,128,64 ×3 64,64,64,64 64,64,64,64
InterlockedOr(0, 1u << (id % rangeCount), previous) 15,14,12,8 ×3 1,2,4,8
1,2,4,8
InterlockedAdd(0, 1u << (8u * (id % rangeCount)), previous)
0x40404040,0x40404000,0x40400000,0x40000000 ×3
0x40,0x4000,0x400000,0x40000000 0x40,0x4000,0x400000,0x40000000
original without previous 256,192,128,64 ×3 64,64,64,64 64,64,64,64
index (id / 2) % rangeCount 256,192,128,64 ×3 64,64,64,64 64,64,64,64
index (id / 16) % rangeCount 64,64,64,64 on the first run after the
rebuild, then 128,64,128,64 ×2 64,64,64,64 64,64,64,64
index (id / 64) % rangeCount 64,64,64,64 ×3 64,64,64,64 64,64,64,64
without NonUniformResourceIndex 256,192,128,64 ×3 64,64,64,64 64,64,64,64
manual loop: WaveReadLaneFirst(want), atomic on Aliases[first] when first
== want 64,64,64,64 ×3 64,64,64,64 64,64,64,64
if (id == 0) Aliases[0].Store(0, WaveGetLaneCount()) 16 32 4

Reading. The OR and byte-lane variants show which threads reached which
buffer. On Intel, buffer j received exactly the threads with id % 4 >= j.
Every Intel row matches one model:

  1. Within a wave, the loop for the non-uniform index takes the index
    of the first pending lane.
  2. It performs the atomic for every lane that is still pending, not
    only for the lanes with that index.
  3. It then retires the lanes with that index.

With 16 lanes per wave, this gives 16 + 12 + 8 + 4 adds per wave, so
256,192,128,64 over 16 waves. Indices that are uniform per wave are
exact: the / 64 rows, and the / 16 row on its first run. The manual loop
is also exact. The two later / 16 runs (128,64,128,64) are what the same
model gives if the cached shader runs 32 threads per wave. That first run
took 1.8 s and the later ones 0.4 s. WaveGetLaneCount reported 16 only
for its own shader, so the 32-lane part is an inference. The DXIL for the
original line creates the handle with nonUniformIndex set (createHandle(...,
i1 true)) followed by atomicBinOp, so any per-index loop is generated by
the driver.

The same model with no lane retired (every lane in every pass) gives 256
in every slot at any wave width. That is the RDNA 2/3/4 and WARP
10.0.19041 signature, and it also fits the note in docs/experiments.md
that InterlockedXor is applied an even number of times there. Under that
variant of the model, the OR replacement above would read 15,15,15,15. If
an AMD owner can run that one line, the result would show whether those
adapters fail the same way.

Environment: Windows 11 build 26300.10075, MSVC 19.44.35230, SDK
10.0.26100, DXC 1.9.2602.17 (cs_6_0). The debug layer was unavailable on
all three backends (Graphics Tools not installed). This does not establish
the cause; it narrows what the driver's loop does on this adapter.

AI-assisted.

—
Reply to this email directly, view it on GitHub
https://github.com/R0Y00/Xbox2Windows/issues/369?email_source=notifications&email_token=CV2U4BORZSYBHGF7VBWGALD52N4TJA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTOMBYG44TMNBXGU3KM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-7087964756,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/CV2U4BM4GIOPOOQM6UFMAXD52N4TJAVCNFSNUABGKJSXA33TNF2G64TZHMYTINRVG4ZDQNRTG45US43TOVSTWNRVGM2TQNJZGE3TBILWAI
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
https://github.com/notifications/mobile/ios/CV2U4BOXC2PQQ2CKDTG333D52N4TJA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTOMBYG44TMNBXGU3KM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJKTGN5XXIZLSL5UW64Y
and Android
https://github.com/notifications/mobile/android/CV2U4BIMEXM3BG7RRESO7CD52N4TJA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTOMBYG44TMNBXGU3KM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI.
Download it today!
You are receiving this because you commented.Message ID:
<R0Y00/Xbox2Windows/issues/369/7087964756 @.***>

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7089976979 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7089976979). Originally posted by [potatoeking5150-commits](https://github.com/potatoeking5150-commits) on 2026-11-23T02:29:19Z. --- - *Commit:* a4ade3032fec08767ed411cc83834a3543c626f2 - *GPU:* AMD Radeon RX 6500, device 743f - *Driver:* 32.0.21045.29003 - *Windows:* Build 26300 - *Atomic probe:* Expected 64, actual 256 in all four buffers. - *Alias-write fixture:* Zero mismatches. - *Debug layer:* Zero errors and warnings. - *Related tests:* Three GPU alias tests and bvh_atomics_hardware all passed. On Sun, Nov 22, 2026 at 6:58 PM romanv9 ***@***.***> wrote: > *romanv9* left a comment (R0Y00/Xbox2Windows#369) > <https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7087964756> > > *Intel UHD Graphics: a different signature (256,192,128,64), and probe > variants that decode it* > > At 787ace7, gpu_alias_lookup_writes_hardware fails on an Intel(R) UHD > Graphics (8086:468B, driver 32.0.101.7026). The four buffers do not all > read 256 as on the AMD adapters above. They form a staircase: > > backend=hardware debug_layer=unavailable > adapter=Intel(R) UHD Graphics vendor=8086 device=468b > driver=32.0.101.7026 > array_atomics threads=256 buffers=4 expected=64 actual=256,192,128,64 > gpu_alias_lookup_writes add_sub words=2 add=0001f5a0 sub=000d4ca0 expected_add=0001f5a0 expected_sub=000d4ca0 mismatches=0 > gpu_alias_lookup_writes other results=1047 words=147454 mismatches=0 > gpu_alias_lookup_writes ranges=4 records=1047 stores=14 contenders=256 sum=128416 min=-1250 max=1241.62 misses=9 words_checked=147456 mismatches=0 > > The result was the same in 3 of 3 serial runs of ctest --preset dev > --no-tests=error -R '^gpu_alias_lookup_writes_hardware$' -j 1 -V with > XBOX2WINDOWS_ADAPTER=Intel, and in 4 direct runs of the renderer. On the > same host, the NVIDIA GeForce RTX 3050 6GB Laptop GPU (10DE:25EC, driver > 32.0.16.2114) and WARP 10.0.26100.10068 read 64,64,64,64. > tests/gpu_alias_writes.hlsl and tests/gpu_alias_lookup.cpp are unchanged > on current main. > > *Probe variants (local only, not committed).* I replaced line 74 of > tests/gpu_alias_writes.hlsl (Aliases[NonUniformResourceIndex(id % > rangeCount)].InterlockedAdd(0, 1, previous);), rebuilt offscreen_check > and ran offscreen_check hardware --gpu-alias-lookup-writes: three times > on Intel and once each on NVIDIA and WARP. After the last variant, I > restored the file and rebuilt. Intel then read 256,192,128,64 again. > Replacement for line 74 Intel (3 runs) NVIDIA WARP > original line 256,192,128,64 ×3 64,64,64,64 64,64,64,64 > InterlockedOr(0, 1u << (id % rangeCount), previous) 15,14,12,8 ×3 1,2,4,8 > 1,2,4,8 > InterlockedAdd(0, 1u << (8u * (id % rangeCount)), previous) > 0x40404040,0x40404000,0x40400000,0x40000000 ×3 > 0x40,0x4000,0x400000,0x40000000 0x40,0x4000,0x400000,0x40000000 > original without previous 256,192,128,64 ×3 64,64,64,64 64,64,64,64 > index (id / 2) % rangeCount 256,192,128,64 ×3 64,64,64,64 64,64,64,64 > index (id / 16) % rangeCount 64,64,64,64 on the first run after the > rebuild, then 128,64,128,64 ×2 64,64,64,64 64,64,64,64 > index (id / 64) % rangeCount 64,64,64,64 ×3 64,64,64,64 64,64,64,64 > without NonUniformResourceIndex 256,192,128,64 ×3 64,64,64,64 64,64,64,64 > manual loop: WaveReadLaneFirst(want), atomic on Aliases[first] when first > == want 64,64,64,64 ×3 64,64,64,64 64,64,64,64 > if (id == 0) Aliases[0].Store(0, WaveGetLaneCount()) 16 32 4 > > *Reading.* The OR and byte-lane variants show which threads reached which > buffer. On Intel, buffer j received exactly the threads with id % 4 >= j. > Every Intel row matches one model: > > 1. Within a wave, the loop for the non-uniform index takes the index > of the first pending lane. > 2. It performs the atomic for every lane that is still pending, not > only for the lanes with that index. > 3. It then retires the lanes with that index. > > With 16 lanes per wave, this gives 16 + 12 + 8 + 4 adds per wave, so > 256,192,128,64 over 16 waves. Indices that are uniform per wave are > exact: the / 64 rows, and the / 16 row on its first run. The manual loop > is also exact. The two later / 16 runs (128,64,128,64) are what the same > model gives if the cached shader runs 32 threads per wave. That first run > took 1.8 s and the later ones 0.4 s. WaveGetLaneCount reported 16 only > for its own shader, so the 32-lane part is an inference. The DXIL for the > original line creates the handle with nonUniformIndex set (createHandle(..., > i1 true)) followed by atomicBinOp, so any per-index loop is generated by > the driver. > > The same model with no lane retired (every lane in every pass) gives 256 > in every slot at any wave width. That is the RDNA 2/3/4 and WARP > 10.0.19041 signature, and it also fits the note in docs/experiments.md > that InterlockedXor is applied an even number of times there. Under that > variant of the model, the OR replacement above would read 15,15,15,15. If > an AMD owner can run that one line, the result would show whether those > adapters fail the same way. > > Environment: Windows 11 build 26300.10075, MSVC 19.44.35230, SDK > 10.0.26100, DXC 1.9.2602.17 (cs_6_0). The debug layer was unavailable on > all three backends (Graphics Tools not installed). This does not establish > the cause; it narrows what the driver's loop does on this adapter. > > *AI-assisted.* > > — > Reply to this email directly, view it on GitHub > <https://github.com/R0Y00/Xbox2Windows/issues/369?email_source=notifications&email_token=CV2U4BORZSYBHGF7VBWGALD52N4TJA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTOMBYG44TMNBXGU3KM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-7087964756>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/CV2U4BM4GIOPOOQM6UFMAXD52N4TJAVCNFSNUABGKJSXA33TNF2G64TZHMYTINRVG4ZDQNRTG45US43TOVSTWNRVGM2TQNJZGE3TBILWAI> > . > Triage notifications, keep track of coding agent tasks and review pull > requests on the go with GitHub Mobile for iOS > <https://github.com/notifications/mobile/ios/CV2U4BOXC2PQQ2CKDTG333D52N4TJA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTOMBYG44TMNBXGU3KM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJKTGN5XXIZLSL5UW64Y> > and Android > <https://github.com/notifications/mobile/android/CV2U4BIMEXM3BG7RRESO7CD52N4TJA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTOMBYG44TMNBXGU3KM4TFMFZW63VHMNXW23LFNZ2KKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>. > Download it today! > You are receiving this because you commented.Message ID: > <R0Y00/Xbox2Windows/issues/369/7087964756 ***@***.***> >
R0Y00 commented 2026-11-24 06:48:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T03:05:16Z.


Thanks for pinning the RX 6500 run to a4ade3032. It reproduced 256,256,256,256; the Intel UHD report recorded 256,192,128,64. In both reports the title-address fixture still matched. Please keep those signatures separate in any measurement update, with the direct probe marked failed in both cases. The existing DXC non-uniform-index check continues to verify the compilation condition.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7090449780 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7090449780). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T03:05:16Z. --- Thanks for pinning the RX 6500 run to `a4ade3032`. It reproduced `256,256,256,256`; the Intel UHD report recorded `256,192,128,64`. In both reports the title-address fixture still matched. Please keep those signatures separate in any measurement update, with the direct probe marked failed in both cases. The existing DXC non-uniform-index check continues to verify the compilation condition.
R0Y00 commented 2026-11-24 06:49:11 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T14:08:58Z.


The opt-in waterfall diagnostic landed in #793. On the reported RX 6500 (device 743f, driver 32.0.21045.29003, Windows build 26300), the direct probe returned 256 in each slot and the explicit waterfall returned 64 in each slot. The original alias-write fixture still matched. To compare the two paths from main, run offscreen_check.exe hardware --gpu-alias-lookup-writes and offscreen_check.exe hardware --gpu-alias-atomic-waterfall with the adjacent shaders from that build. The direct probe retains its strict failure check. The Intel staircase is a separate observation and the cause remains open.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7103553798 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7103553798). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T14:08:58Z. --- The opt-in waterfall diagnostic landed in #793. On the reported RX 6500 (device 743f, driver 32.0.21045.29003, Windows build 26300), the direct probe returned 256 in each slot and the explicit waterfall returned 64 in each slot. The original alias-write fixture still matched. To compare the two paths from main, run `offscreen_check.exe hardware --gpu-alias-lookup-writes` and `offscreen_check.exe hardware --gpu-alias-atomic-waterfall` with the adjacent shaders from that build. The direct probe retains its strict failure check. The Intel staircase is a separate observation and the cause remains open.
romn4rch commented 2026-11-24 06:49:17 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by romn4rch on 2026-11-23T16:26:33Z.


Intel UHD Graphics at c639a01: direct probe and explicit waterfall side by side, and the wave width recorded by the probe itself

This is the Intel signature only, kept separate from the RX 6500 one. Same host as my earlier comment. The Intel driver is now 32.0.101.7092 (that comment used 32.0.101.7026). One c639a01 build, on AC power.

1. The two paths from main. Three rounds of offscreen_check.exe hardware --gpu-alias-lookup-writes and offscreen_check.exe hardware --gpu-alias-atomic-waterfall from the build directory. XBOX2WINDOWS_ADAPTER was set to Intel or NVIDIA, and WARP ran the same two options with warp.

Adapter Direct probe Explicit waterfall
Intel(R) UHD Graphics (8086:468B, 32.0.101.7092) 256,192,128,64, exit 1, 3 of 3 64,64,64,64, exit 0, 3 of 3
NVIDIA GeForce RTX 3050 6GB Laptop GPU (10DE:25EC, 32.0.16.2114) 64,64,64,64, exit 0, 3 of 3 64,64,64,64, exit 0, 3 of 3
WARP 10.0.26100.10068 64,64,64,64, exit 0, 3 of 3 64,64,64,64, exit 0, 3 of 3

On this Intel adapter the direct probe still fails with the staircase, and the explicit waterfall reads 64 in each slot. The alias-write fixture lines still report mismatches=0.

2. Wave width recorded in the same dispatch. Local only, not committed. I replaced line 74 of tests/gpu_alias_writes.hlsl with these two lines, where <index> is one of the expressions in the table:

Aliases[NonUniformResourceIndex(<index>)].InterlockedAdd(0, 1, previous);
if (WaveIsFirstLane()) Aliases[0].InterlockedOr(0, WaveGetLaneCount() << 16, previous);

The low 16 bits of each buffer still hold the count. Bits 16 and up of buffer 0 hold the OR of every wave's lane count in the dispatch, so mixed widths would show as more than one bit. For example, Intel printed actual=1048832,192,128,64 for the first row: width 16, then 256 in the low bits. The probe's own check fails on every adapter in this mode, because buffer 0 carries the width bits. For each variant I rebuilt, then ran offscreen_check.exe hardware --gpu-alias-lookup-writes five times on Intel (the first run directly after the rebuild) and once each on NVIDIA and WARP. Afterwards the file was restored and rebuilt, and Intel read 256,192,128,64 again.

<index> Intel counts Intel width NVIDIA counts, width WARP counts, width
id % rangeCount (the file's own index) 256,192,128,64 in 5 of 5 16 in 5 of 5 64,64,64,64, 32 64,64,64,64, 4
(id / 16) % rangeCount 64,64,64,64 in 5 of 5 16 in 5 of 5 64,64,64,64, 32 64,64,64,64, 4
(id / 8) % rangeCount 128,64,128,64 in 5 of 5 16 in 5 of 5 64,64,64,64, 32 64,64,64,64, 4

In my earlier comment, (id / 16) % rangeCount without the width line read 64,64,64,64 on the first run after the rebuild and 128,64,128,64 after that. A run at 34d03c7 on driver 32.0.101.7092 repeated this: 64,64,64,64 once, then 128,64,128,64 four times. With the width line it read 64,64,64,64 in 5 of 5, at width 16 each time. So whether the earlier change came from a different wave width is still open, because the extra line may change how the shader is compiled.

3. Reversed index, from that 34d03c7 run, without the width line, three Intel runs each:

Line 74 replaced with Intel (3 of 3) NVIDIA WARP
Aliases[NonUniformResourceIndex(rangeCount - 1u - (id % rangeCount))].InterlockedAdd(0, 1, previous); 64,128,192,256 64,64,64,64 64,64,64,64
Aliases[NonUniformResourceIndex(rangeCount - 1u - (id % rangeCount))].InterlockedOr(0, 1u << (id % rangeCount), previous); 8,12,14,15 8,4,2,1 8,4,2,1

Reversing the index reverses the staircase: the buffer that lane 0 selects gets the most adds.

A description that reproduces every Intel count so far (not a cause). In each wave, take the buffer index of the lowest pending lane. Every pending lane adds its own operand to that buffer, then the lanes whose own index it was leave, and this repeats until no lane is pending. With 16 lanes and id % 4 that gives 16, 12, 8 and 4 adds per wave to buffers 0–3, so 256,192,128,64 over 16 waves. With (id / 16) % 4 each wave holds one index, so the counts are exact. With (id / 8) % 4 each wave holds two, giving 16 and 8 adds per wave and 128,64,128,64 in total. The same rule also gives the OR, byte-lane, (id / 2) and (id / 64) results from my earlier comment and both reversed variants above. I wrote down its predictions for the three width variants before this run, and they matched. I had also predicted, from the earlier change, that runs after the first would report width 32; all 15 Intel runs reported 16. At width 32 the rule gives 128,64,128,64 for (id / 16) % 4.

Not covered: other Intel drivers and the debug layer (unavailable here). Environment: Windows 11 build 26300.10075; MSVC 19.44.35230 and the Windows SDK 10.0.26100 DXC 1.9.2602.17, as in my earlier runs.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7107139741 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7107139741). Originally posted by [romn4rch](https://github.com/romn4rch) on 2026-11-23T16:26:33Z. --- **Intel UHD Graphics at `c639a01`: direct probe and explicit waterfall side by side, and the wave width recorded by the probe itself** This is the Intel signature only, kept separate from the RX 6500 one. Same host as my earlier comment. The Intel driver is now 32.0.101.7092 (that comment used 32.0.101.7026). One `c639a01` build, on AC power. **1. The two paths from `main`.** Three rounds of `offscreen_check.exe hardware --gpu-alias-lookup-writes` and `offscreen_check.exe hardware --gpu-alias-atomic-waterfall` from the build directory. `XBOX2WINDOWS_ADAPTER` was set to `Intel` or `NVIDIA`, and WARP ran the same two options with `warp`. | Adapter | Direct probe | Explicit waterfall | |---|---|---| | Intel(R) UHD Graphics (`8086:468B`, 32.0.101.7092) | 256,192,128,64, exit 1, 3 of 3 | 64,64,64,64, exit 0, 3 of 3 | | NVIDIA GeForce RTX 3050 6GB Laptop GPU (`10DE:25EC`, 32.0.16.2114) | 64,64,64,64, exit 0, 3 of 3 | 64,64,64,64, exit 0, 3 of 3 | | WARP 10.0.26100.10068 | 64,64,64,64, exit 0, 3 of 3 | 64,64,64,64, exit 0, 3 of 3 | On this Intel adapter the direct probe still fails with the staircase, and the explicit waterfall reads 64 in each slot. The alias-write fixture lines still report `mismatches=0`. **2. Wave width recorded in the same dispatch.** Local only, not committed. I replaced line 74 of `tests/gpu_alias_writes.hlsl` with these two lines, where `<index>` is one of the expressions in the table: ```hlsl Aliases[NonUniformResourceIndex(<index>)].InterlockedAdd(0, 1, previous); if (WaveIsFirstLane()) Aliases[0].InterlockedOr(0, WaveGetLaneCount() << 16, previous); ``` The low 16 bits of each buffer still hold the count. Bits 16 and up of buffer 0 hold the OR of every wave's lane count in the dispatch, so mixed widths would show as more than one bit. For example, Intel printed `actual=1048832,192,128,64` for the first row: width 16, then 256 in the low bits. The probe's own check fails on every adapter in this mode, because buffer 0 carries the width bits. For each variant I rebuilt, then ran `offscreen_check.exe hardware --gpu-alias-lookup-writes` five times on Intel (the first run directly after the rebuild) and once each on NVIDIA and WARP. Afterwards the file was restored and rebuilt, and Intel read 256,192,128,64 again. | `<index>` | Intel counts | Intel width | NVIDIA counts, width | WARP counts, width | |---|---|---|---|---| | `id % rangeCount` (the file's own index) | 256,192,128,64 in 5 of 5 | 16 in 5 of 5 | 64,64,64,64, 32 | 64,64,64,64, 4 | | `(id / 16) % rangeCount` | 64,64,64,64 in 5 of 5 | 16 in 5 of 5 | 64,64,64,64, 32 | 64,64,64,64, 4 | | `(id / 8) % rangeCount` | 128,64,128,64 in 5 of 5 | 16 in 5 of 5 | 64,64,64,64, 32 | 64,64,64,64, 4 | In my earlier comment, `(id / 16) % rangeCount` without the width line read 64,64,64,64 on the first run after the rebuild and 128,64,128,64 after that. A run at `34d03c7` on driver 32.0.101.7092 repeated this: 64,64,64,64 once, then 128,64,128,64 four times. With the width line it read 64,64,64,64 in 5 of 5, at width 16 each time. So whether the earlier change came from a different wave width is still open, because the extra line may change how the shader is compiled. **3. Reversed index**, from that `34d03c7` run, without the width line, three Intel runs each: | Line 74 replaced with | Intel (3 of 3) | NVIDIA | WARP | |---|---|---|---| | `Aliases[NonUniformResourceIndex(rangeCount - 1u - (id % rangeCount))].InterlockedAdd(0, 1, previous);` | 64,128,192,256 | 64,64,64,64 | 64,64,64,64 | | `Aliases[NonUniformResourceIndex(rangeCount - 1u - (id % rangeCount))].InterlockedOr(0, 1u << (id % rangeCount), previous);` | 8,12,14,15 | 8,4,2,1 | 8,4,2,1 | Reversing the index reverses the staircase: the buffer that lane 0 selects gets the most adds. **A description that reproduces every Intel count so far (not a cause).** In each wave, take the buffer index of the lowest pending lane. Every pending lane adds its own operand to that buffer, then the lanes whose own index it was leave, and this repeats until no lane is pending. With 16 lanes and `id % 4` that gives 16, 12, 8 and 4 adds per wave to buffers 0–3, so 256,192,128,64 over 16 waves. With `(id / 16) % 4` each wave holds one index, so the counts are exact. With `(id / 8) % 4` each wave holds two, giving 16 and 8 adds per wave and 128,64,128,64 in total. The same rule also gives the OR, byte-lane, `(id / 2)` and `(id / 64)` results from my earlier comment and both reversed variants above. I wrote down its predictions for the three width variants before this run, and they matched. I had also predicted, from the earlier change, that runs after the first would report width 32; all 15 Intel runs reported 16. At width 32 the rule gives 128,64,128,64 for `(id / 16) % 4`. Not covered: other Intel drivers and the debug layer (unavailable here). Environment: Windows 11 build 26300.10075; MSVC 19.44.35230 and the Windows SDK 10.0.26100 DXC 1.9.2602.17, as in my earlier runs. _AI-assisted._
R0Y00 commented 2026-11-24 06:49:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T16:59:38Z.


Thanks for the paired Intel rerun. At driver 32.0.101.7092 the original probe still gives the 256/192/128/64 staircase in all three runs, while the repository waterfall produces 64 in each slot and the title-address fixture still matches. This is enough for a focused experimental note, with the locally instrumented width recorded separately and the AMD signature kept distinct. The strict direct probe and normal write path should stay as they are.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7107987708 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7107987708). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T16:59:38Z. --- Thanks for the paired Intel rerun. At driver 32.0.101.7092 the original probe still gives the 256/192/128/64 staircase in all three runs, while the repository waterfall produces 64 in each slot and the title-address fixture still matches. This is enough for a focused experimental note, with the locally instrumented width recorded separately and the AMD signature kept distinct. The strict direct probe and normal write path should stay as they are.
MasterDomino commented 2026-11-24 06:49:39 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-23T20:48:18Z.


RX 9070 XT retest on two more AMD drivers, with the D3D12 debug layer enabled. Same signature. Data only.

  • Adapter: AMD Radeon RX 9070 XT (1002:7550)
  • Drivers: 32.0.31035.1003 (two runs at d7c52d2) and 32.0.31044.16 (four runs at dae1ca2; Windows Update replaced the driver between the two)
  • Windows 11 Home 25H2, build 26200.8875
  • dev preset, MSVC 19.44.35221 (toolset 14.44.35207), Windows SDK 10.0.26100.0, DXC 1.8.2502.11 (239921522)
  • D3D12 debug layer: enabled, debug_errors=0 debug_warnings=0
ctest --preset dev --no-tests=error -R '^gpu_alias_lookup_writes_hardware$' -V

Identical in all 6 runs (2 on 32.0.31035.1003, 4 on 32.0.31044.16):

array_atomics threads=256 buffers=4 expected=64 actual=256,256,256,256
gpu_alias_lookup_writes add_sub words=2 add=0001f5a0 sub=000d4ca0 expected_add=0001f5a0 expected_sub=000d4ca0 mismatches=0
gpu_alias_lookup_writes other results=1047 words=147454 mismatches=0
gpu_alias_lookup_writes ranges=4 records=1047 stores=14 contenders=256 sum=128416 min=-1250 max=1241.62 misses=9 words_checked=147456 mismatches=0

With the earlier 32.0.32015.7029 and 32.0.32029.2010 reports, this makes four driver versions on device 7550 with the same direct-probe result and an exact fixture. The waterfall variant was not rerun, and nothing here addresses the cause.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7113579438 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7113579438). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-23T20:48:18Z. --- RX 9070 XT retest on two more AMD drivers, with the D3D12 debug layer enabled. Same signature. Data only. - Adapter: AMD Radeon RX 9070 XT (`1002:7550`) - Drivers: `32.0.31035.1003` (two runs at `d7c52d2`) and `32.0.31044.16` (four runs at `dae1ca2`; Windows Update replaced the driver between the two) - Windows 11 Home 25H2, build 26200.8875 - `dev` preset, MSVC 19.44.35221 (toolset 14.44.35207), Windows SDK 10.0.26100.0, DXC `1.8.2502.11 (239921522)` - D3D12 debug layer: enabled, `debug_errors=0 debug_warnings=0` ```powershell ctest --preset dev --no-tests=error -R '^gpu_alias_lookup_writes_hardware$' -V ``` Identical in all 6 runs (2 on `32.0.31035.1003`, 4 on `32.0.31044.16`): ```text array_atomics threads=256 buffers=4 expected=64 actual=256,256,256,256 gpu_alias_lookup_writes add_sub words=2 add=0001f5a0 sub=000d4ca0 expected_add=0001f5a0 expected_sub=000d4ca0 mismatches=0 gpu_alias_lookup_writes other results=1047 words=147454 mismatches=0 gpu_alias_lookup_writes ranges=4 records=1047 stores=14 contenders=256 sum=128416 min=-1250 max=1241.62 misses=9 words_checked=147456 mismatches=0 ``` With the earlier `32.0.32015.7029` and `32.0.32029.2010` reports, this makes four driver versions on device `7550` with the same direct-probe result and an exact fixture. The waterfall variant was not rerun, and nothing here addresses the cause. AI-assisted.
MasterDomino commented 2026-11-24 06:49:40 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-23T21:11:20Z.


RDNA 4 ISA for the array-atomics probe, as asked above. The driver's compiled code shows where the factor of 4 comes from. Measurement only, no project change.

Setup

  • Commit 1ccc326 (main), dev preset. ProbeArrayAtomics.cso and ProbeArrayAtomicsWaterfall.cso taken from the build tree (CMake's own dxc -T cs_6_0 lines, DXC 1.8.2502.11).
  • Radeon GPU Analyzer 2.15.0.30 (official rga-windows-x64-2.15.zip, SHA-256 matched the release digest), DX12 mode, which compiles through the installed driver: AMD Radeon RX 9070 XT (1002:7550), driver 32.0.31044.16, Windows 11 26H2 build 26300.9974.
rga.exe -s dx12 -c gfx1201 --cs-blob out\build\dev\ProbeArrayAtomics.cso --isa ProbeArrayAtomics.isa
rga.exe -s dx12 -c gfx1201 --cs-blob out\build\dev\ProbeArrayAtomicsWaterfall.cso --isa ProbeArrayAtomicsWaterfall.isa

Direct probe (Aliases[NonUniformResourceIndex(id % rangeCount)].InterlockedAdd(0, 1, previous)), wave64 (UC_VERSION_W64_BIT). Scheduling waits removed:

	s_bcnt1_i32_b64 s8, exec          ; number of active lanes in the whole wave
	...
	v_mov_b32_e32 v1, s8              ; the atomic's operand = that count
	...
	v_lshlrev_b32_e32 v0, 5, v0       ; per-lane descriptor offset (index * 32)
	s_mov_b64 s[4:5], exec
L0:
	v_readfirstlane_b32 s8, v0        ; non-uniform index loop
	v_cmpx_eq_u32_e64 s8, v0          ; exec = lanes with this index
	s_load_b128 s[12:15], s[0:1], s8 offset:0x0
	s_ctz_i32_b64 s9, exec
	s_lshl_b64 s[10:11], 1, s9
	s_and_saveexec_b64 s[10:11], s[10:11]   ; one lane only
	buffer_atomic_add_u32 v1, off, s[12:15], null
	s_mov_b64 exec, s[10:11]
	s_and_not1_wrexec_b64 s[4:5], s[4:5]
	s_cbranch_execnz L0

The atomic is combined across the wave (one lane adds the lane count instead of every lane adding 1). That is only valid if all lanes hit the same address. Here the count is taken once, before the non-uniform resource loop, so every iteration adds the whole wave's active-lane count (64), not the number of lanes that share that iteration's index (16). With id % 4, every wave visits all four buffers, so each buffer receives 64 per wave × 4 waves = 256, which is exactly the 256,256,256,256 readback.

Repository waterfall (ProbeArrayAtomicsWaterfall): the same combining happens, but the lane count (s_bcnt1_i32_b64 s12, exec) is taken inside the loop, after exec has been narrowed to the lanes of the current index, so each add carries that iteration's own count.

Runtime on the same adapter and driver, D3D12 debug layer enabled, debug_errors=0 debug_warnings=0, 3 runs each:

Diagnostic RX 9070 XT In-box WARP 10.0.26100.9818
offscreen_check hardware --gpu-alias-lookup-writes (direct) 256,256,256,256 ×3 —
offscreen_check <backend> --gpu-alias-atomic-waterfall 64,64,64,64 ×3 64,64,64,64 ×3

Limits: RGA builds its own D3D12 pipeline around the blob (auto-generated root signature), so this is the driver's code for this shader, not a capture of the pipeline offscreen_check creates at run time. The arithmetic matches the runtime counts exactly. One driver and one device. It does not cover the Intel staircase, which comes from a different compiler, or the Windows 10 WARP result. The direct probe still fails as intended.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7114124208 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7114124208). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-23T21:11:20Z. --- RDNA 4 ISA for the array-atomics probe, as asked [above](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7072558238). The driver's compiled code shows where the factor of 4 comes from. Measurement only, no project change. **Setup** - Commit `1ccc326` (`main`), `dev` preset. `ProbeArrayAtomics.cso` and `ProbeArrayAtomicsWaterfall.cso` taken from the build tree (CMake's own `dxc -T cs_6_0` lines, DXC `1.8.2502.11`). - Radeon GPU Analyzer 2.15.0.30 (official `rga-windows-x64-2.15.zip`, SHA-256 matched the release digest), DX12 mode, which compiles through the installed driver: AMD Radeon RX 9070 XT (`1002:7550`), driver `32.0.31044.16`, Windows 11 26H2 build 26300.9974. ```powershell rga.exe -s dx12 -c gfx1201 --cs-blob out\build\dev\ProbeArrayAtomics.cso --isa ProbeArrayAtomics.isa rga.exe -s dx12 -c gfx1201 --cs-blob out\build\dev\ProbeArrayAtomicsWaterfall.cso --isa ProbeArrayAtomicsWaterfall.isa ``` **Direct probe** (`Aliases[NonUniformResourceIndex(id % rangeCount)].InterlockedAdd(0, 1, previous)`), wave64 (`UC_VERSION_W64_BIT`). Scheduling waits removed: ```text s_bcnt1_i32_b64 s8, exec ; number of active lanes in the whole wave ... v_mov_b32_e32 v1, s8 ; the atomic's operand = that count ... v_lshlrev_b32_e32 v0, 5, v0 ; per-lane descriptor offset (index * 32) s_mov_b64 s[4:5], exec L0: v_readfirstlane_b32 s8, v0 ; non-uniform index loop v_cmpx_eq_u32_e64 s8, v0 ; exec = lanes with this index s_load_b128 s[12:15], s[0:1], s8 offset:0x0 s_ctz_i32_b64 s9, exec s_lshl_b64 s[10:11], 1, s9 s_and_saveexec_b64 s[10:11], s[10:11] ; one lane only buffer_atomic_add_u32 v1, off, s[12:15], null s_mov_b64 exec, s[10:11] s_and_not1_wrexec_b64 s[4:5], s[4:5] s_cbranch_execnz L0 ``` The atomic is combined across the wave (one lane adds the lane count instead of every lane adding 1). That is only valid if all lanes hit the same address. Here the count is taken **once, before** the non-uniform resource loop, so every iteration adds the **whole wave's** active-lane count (64), not the number of lanes that share that iteration's index (16). With `id % 4`, every wave visits all four buffers, so each buffer receives 64 per wave × 4 waves = **256**, which is exactly the `256,256,256,256` readback. **Repository waterfall** (`ProbeArrayAtomicsWaterfall`): the same combining happens, but the lane count (`s_bcnt1_i32_b64 s12, exec`) is taken **inside** the loop, after exec has been narrowed to the lanes of the current index, so each add carries that iteration's own count. Runtime on the same adapter and driver, D3D12 debug layer enabled, `debug_errors=0 debug_warnings=0`, 3 runs each: | Diagnostic | RX 9070 XT | In-box WARP `10.0.26100.9818` | |---|---|---| | `offscreen_check hardware --gpu-alias-lookup-writes` (direct) | `256,256,256,256` ×3 | — | | `offscreen_check <backend> --gpu-alias-atomic-waterfall` | `64,64,64,64` ×3 | `64,64,64,64` ×3 | Limits: RGA builds its own D3D12 pipeline around the blob (auto-generated root signature), so this is the driver's code for this shader, not a capture of the pipeline `offscreen_check` creates at run time. The arithmetic matches the runtime counts exactly. One driver and one device. It does not cover the Intel staircase, which comes from a different compiler, or the Windows 10 WARP result. The direct probe still fails as intended. AI-assisted.
R0Y00 commented 2026-11-24 06:49:41 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T21:18:34Z.


Please carry the matched direct and explicit-waterfall ISA measurements into the existing experiment note. On this driver the direct path counts active lanes before the descriptor loop narrows EXEC. The waterfall measurement supplies the independent 64-per-buffer control. Record those observations and the fixture's zero mismatches alongside the direct probe's four 256 counts. The DXC nonuniform regression and the strict per-device failure stay in place.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7114286021 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7114286021). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T21:18:34Z. --- Please carry the matched direct and explicit-waterfall ISA measurements into the existing experiment note. On this driver the direct path counts active lanes before the descriptor loop narrows EXEC. The waterfall measurement supplies the independent 64-per-buffer control. Record those observations and the fixture's zero mismatches alongside the direct probe's four 256 counts. The DXC nonuniform regression and the strict per-device failure stay in place.
trick-ye commented 2026-11-24 06:49:54 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by trick-ye on 2026-11-23T23:57:40Z.


RX 7800 XT (RDNA 3): direct and waterfall readbacks for the array-atomics probe, the pair described in https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7103553798. The direct probe reads 256 per buffer and the waterfall reads 64 per buffer, three runs each. An RX 7900 XTX direct result on the same driver version is already in https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7076471364; I found no RDNA 3 waterfall readback in this thread before posting.

Environment

  • Commit 45ad903, clean tree, dev preset. It was main when the checkout was cloned at 23:16 UTC on 2026-11-23; upstream main advanced before the runs.
  • AMD Radeon RX 7800 XT (1002:747e), driver 32.0.32029.2010 (AMD Software 26.11.2). It is the only display adapter in this PC.
  • Windows 11 Pro, build 26200.9974
  • MSVC 19.42.34436, Windows SDK 10.0.26100.0, DXC 1.9.2602.17
  • D3D12 debug layer enabled (backend=hardware debug_layer=enabled), debug_errors=0 debug_warnings=0 on every run below
  • Wave width: bvh_wave64_hardware in the same build prints native_lane_range=32..64. The width used by these two compute shaders was not measured.

Commands

From out/build/dev, each hardware command three times and each WARP command once:

.\offscreen_check.exe hardware --gpu-alias-lookup-writes
.\offscreen_check.exe hardware --gpu-alias-atomic-waterfall
.\offscreen_check.exe warp --gpu-alias-lookup-writes
.\offscreen_check.exe warp --gpu-alias-atomic-waterfall

Result

Expected: actual=64,64,64,64 on both paths.

Backend Path Probe line Outcome
RX 7800 XT direct array_atomics threads=256 buffers=4 expected=64 actual=256,256,256,256 ×3 adapter-defect failure text reported ×3
RX 7800 XT waterfall array_atomics_waterfall threads=256 buffers=4 expected=64 actual=64,64,64,64 ×3 no failure reported
WARP 10.0.26100.9818 direct array_atomics threads=256 buffers=4 expected=64 actual=64,64,64,64 no failure reported
WARP 10.0.26100.9818 waterfall array_atomics_waterfall threads=256 buffers=4 expected=64 actual=64,64,64,64 no failure reported

First numeric mismatch on the direct hardware path, the same in the three runs:

array_atomics threads=256 buffers=4 expected=64 actual=256,256,256,256

The fixture lines of the same direct hardware runs report no mismatch, including the signed-zero section:

gpu_alias_lookup_writes add_sub words=2 add=0001f5a0 sub=000d4ca0 expected_add=0001f5a0 expected_sub=000d4ca0 mismatches=0
gpu_alias_lookup_writes other results=2331 words=147454 mismatches=0
gpu_alias_lookup_writes signed_zero words=9 00000000/00000000 80000000/80000000 00000000/00000000 80000000/80000000 c49bc000/c49bc000 449b3c00/449b3c00 00000000/00000000 80000000/80000000 be000000/be000000
gpu_alias_lookup_writes ranges=4 records=2331 stores=14 contenders=256 sum=128416 min=-1250 max=1241.62 misses=9 words_checked=147456 mismatches=0

The registered test gpu_alias_lookup_writes_hardware also failed once in a full ctest --preset dev --no-tests=error -j 1 -R '_hardware$' run of this build with the same array_atomics line, and gpu_alias_lookup_writes_warp passed in the matching _warp$ run. No capability skip was reported in the eight standalone probe invocations or for either registered gpu_alias_lookup_writes test. The full WARP suite had unrelated capability skips.

Limits

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7117549298 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7117549298). Originally posted by [trick-ye](https://github.com/trick-ye) on 2026-11-23T23:57:40Z. --- RX 7800 XT (RDNA 3): direct and waterfall readbacks for the array-atomics probe, the pair described in https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7103553798. The direct probe reads 256 per buffer and the waterfall reads 64 per buffer, three runs each. An RX 7900 XTX direct result on the same driver version is already in https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7076471364; I found no RDNA 3 waterfall readback in this thread before posting. ## Environment - Commit `45ad903`, clean tree, `dev` preset. It was `main` when the checkout was cloned at 23:16 UTC on 2026-11-23; upstream `main` advanced before the runs. - AMD Radeon RX 7800 XT (`1002:747e`), driver `32.0.32029.2010` (AMD Software 26.11.2). It is the only display adapter in this PC. - Windows 11 Pro, build 26200.9974 - MSVC 19.42.34436, Windows SDK 10.0.26100.0, DXC `1.9.2602.17` - D3D12 debug layer enabled (`backend=hardware debug_layer=enabled`), `debug_errors=0 debug_warnings=0` on every run below - Wave width: `bvh_wave64_hardware` in the same build prints `native_lane_range=32..64`. The width used by these two compute shaders was not measured. ## Commands From `out/build/dev`, each hardware command three times and each WARP command once: ```powershell .\offscreen_check.exe hardware --gpu-alias-lookup-writes .\offscreen_check.exe hardware --gpu-alias-atomic-waterfall .\offscreen_check.exe warp --gpu-alias-lookup-writes .\offscreen_check.exe warp --gpu-alias-atomic-waterfall ``` ## Result Expected: `actual=64,64,64,64` on both paths. | Backend | Path | Probe line | Outcome | |---|---|---|---| | RX 7800 XT | direct | `array_atomics threads=256 buffers=4 expected=64 actual=256,256,256,256` ×3 | adapter-defect failure text reported ×3 | | RX 7800 XT | waterfall | `array_atomics_waterfall threads=256 buffers=4 expected=64 actual=64,64,64,64` ×3 | no failure reported | | WARP `10.0.26100.9818` | direct | `array_atomics threads=256 buffers=4 expected=64 actual=64,64,64,64` | no failure reported | | WARP `10.0.26100.9818` | waterfall | `array_atomics_waterfall threads=256 buffers=4 expected=64 actual=64,64,64,64` | no failure reported | First numeric mismatch on the direct hardware path, the same in the three runs: ```text array_atomics threads=256 buffers=4 expected=64 actual=256,256,256,256 ``` The fixture lines of the same direct hardware runs report no mismatch, including the signed-zero section: ```text gpu_alias_lookup_writes add_sub words=2 add=0001f5a0 sub=000d4ca0 expected_add=0001f5a0 expected_sub=000d4ca0 mismatches=0 gpu_alias_lookup_writes other results=2331 words=147454 mismatches=0 gpu_alias_lookup_writes signed_zero words=9 00000000/00000000 80000000/80000000 00000000/00000000 80000000/80000000 c49bc000/c49bc000 449b3c00/449b3c00 00000000/00000000 80000000/80000000 be000000/be000000 gpu_alias_lookup_writes ranges=4 records=2331 stores=14 contenders=256 sum=128416 min=-1250 max=1241.62 misses=9 words_checked=147456 mismatches=0 ``` The registered test `gpu_alias_lookup_writes_hardware` also failed once in a full `ctest --preset dev --no-tests=error -j 1 -R '_hardware$'` run of this build with the same `array_atomics` line, and `gpu_alias_lookup_writes_warp` passed in the matching `_warp$` run. No capability skip was reported in the eight standalone probe invocations or for either registered `gpu_alias_lookup_writes` test. The full WARP suite had unrelated capability skips. ## Limits - One adapter, one driver. Three runs per hardware path, one per WARP path. - Stock shaders only. I did not run the `InterlockedOr` variant suggested in https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7087964756, and I have no ISA capture. AI-assisted (Claude Code).
trick-ye commented 2026-11-24 06:49:54 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by trick-ye on 2026-11-24T00:00:19Z.


Follow-up to my comment above: the InterlockedOr variant from https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7087964756 reads 15,15,15,15 on the RX 7800 XT, in three of three runs. That comment says the OR replacement "would read 15,15,15,15" under its variant of the model and asks an AMD owner to run the line.

Method

Local only, not committed. In a separate worktree at 45ad903 I replaced the one probe line in ProbeArrayAtomics (tests/gpu_alias_writes.hlsl):

// original
Aliases[NonUniformResourceIndex(id % rangeCount)].InterlockedAdd(0, 1, previous);
// variant
Aliases[NonUniformResourceIndex(id % rangeCount)].InterlockedOr(0, 1u << (id % rangeCount), previous);

Then I rebuilt offscreen_check, ran the command below from out/build/dev three times on hardware and once on WARP, and restored the file (git status --short empty afterwards).

.\offscreen_check.exe hardware --gpu-alias-lookup-writes
.\offscreen_check.exe warp --gpu-alias-lookup-writes

Result

Backend Probe line with the OR variant
RX 7800 XT (1002:747e), driver 32.0.32029.2010 array_atomics threads=256 buffers=4 expected=64 actual=15,15,15,15 ×3
WARP 10.0.26100.9818 array_atomics threads=256 buffers=4 expected=64 actual=1,2,4,8

The harness still compares against expected=64, so every run of the variant reports the probe failure text, on WARP too; the actual= values are the result. The WARP value 1,2,4,8 matches the NVIDIA and WARP cells for this variant in the linked comment's table. With the original line, the same adapter reads 256,256,256,256 (previous comment).

Environment is the same as in my previous comment: Windows 11 Pro build 26200.9974, MSVC 19.42.34436, DXC 1.9.2602.17, D3D12 debug layer enabled (backend=hardware debug_layer=enabled), debug_errors=0 debug_warnings=0 on the three hardware runs and the WARP run. Wave width for this shader was not measured. No capability skip was reported in these four runs.

Limits

  • One adapter, one driver, one variant. I did not run the other replacement lines from that table, and I have no ISA capture.
  • This reports the readback only. It does not by itself establish which lanes perform the atomic on this adapter.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7117597648 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7117597648). Originally posted by [trick-ye](https://github.com/trick-ye) on 2026-11-24T00:00:19Z. --- Follow-up to my comment above: the `InterlockedOr` variant from https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7087964756 reads `15,15,15,15` on the RX 7800 XT, in three of three runs. That comment says the OR replacement "would read `15,15,15,15`" under its variant of the model and asks an AMD owner to run the line. ## Method Local only, not committed. In a separate worktree at `45ad903` I replaced the one probe line in `ProbeArrayAtomics` (`tests/gpu_alias_writes.hlsl`): ```hlsl // original Aliases[NonUniformResourceIndex(id % rangeCount)].InterlockedAdd(0, 1, previous); // variant Aliases[NonUniformResourceIndex(id % rangeCount)].InterlockedOr(0, 1u << (id % rangeCount), previous); ``` Then I rebuilt `offscreen_check`, ran the command below from `out/build/dev` three times on hardware and once on WARP, and restored the file (`git status --short` empty afterwards). ```powershell .\offscreen_check.exe hardware --gpu-alias-lookup-writes .\offscreen_check.exe warp --gpu-alias-lookup-writes ``` ## Result | Backend | Probe line with the OR variant | |---|---| | RX 7800 XT (`1002:747e`), driver `32.0.32029.2010` | `array_atomics threads=256 buffers=4 expected=64 actual=15,15,15,15` ×3 | | WARP `10.0.26100.9818` | `array_atomics threads=256 buffers=4 expected=64 actual=1,2,4,8` | The harness still compares against `expected=64`, so every run of the variant reports the probe failure text, on WARP too; the `actual=` values are the result. The WARP value `1,2,4,8` matches the NVIDIA and WARP cells for this variant in the linked comment's table. With the original line, the same adapter reads `256,256,256,256` (previous comment). Environment is the same as in my previous comment: Windows 11 Pro build 26200.9974, MSVC 19.42.34436, DXC `1.9.2602.17`, D3D12 debug layer enabled (`backend=hardware debug_layer=enabled`), `debug_errors=0 debug_warnings=0` on the three hardware runs and the WARP run. Wave width for this shader was not measured. No capability skip was reported in these four runs. ## Limits - One adapter, one driver, one variant. I did not run the other replacement lines from that table, and I have no ISA capture. - This reports the readback only. It does not by itself establish which lanes perform the atomic on this adapter. AI-assisted (Claude Code).
R0Y00 commented 2026-11-24 06:49:54 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T00:10:42Z.


Thanks, @trick-ye. This RDNA 3 waterfall control adds three repeats on the RX 7800 XT: the direct probe read 256 in each slot, and the waterfall read 64 in each slot. The OR variant independently read 15/15/15/15 on that adapter and 1/2/4/8 on WARP. These are device/driver readbacks. The observed wave width and ISA for these particular shaders remain unmeasured. The original probe still records its numeric mismatch as a failure.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7117787984 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7117787984). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T00:10:42Z. --- Thanks, @trick-ye. This RDNA 3 waterfall control adds three repeats on the RX 7800 XT: the direct probe read 256 in each slot, and the waterfall read 64 in each slot. The OR variant independently read 15/15/15/15 on that adapter and 1/2/4/8 on WARP. These are device/driver readbacks. The observed wave width and ISA for these particular shaders remain unmeasured. The original probe still records its numeric mismatch as a failure.
Asimmimx commented 2026-11-24 12:03:14 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Asimmimx on 2026-11-24T11:13:28Z.


RX 6600 (RDNA 2): direct, waterfall and InterlockedOr readbacks of the array-atomics probe. This is the same set that https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7103553798 and the follow-up above report for RDNA 3. The RDNA 2 data in this thread so far is the direct probe on an RX 6500 (743f), with no waterfall or OR readback.

Environment

  • Commit 153bb5f6 (main), clean tree, dev preset (Debug)
  • AMD Radeon RX 6600 (1002:73ff), driver 32.0.21045.29003. It is the only display adapter in this PC.
  • Windows 11 Pro 26H2, build 26300.9974
  • MSVC 19.51.36260 (Visual Studio 18), Windows SDK 10.0.26100.0, DXC 1.8.2502.11
  • D3D12 debug layer enabled, with debug_errors=0 debug_warnings=0 on every run below
  • Wave width: in the same build, bvh_wave64_hardware prints native_lane_range=32..64. I did not measure the width these two compute shaders use.

Commands

From out/build/dev, I ran each hardware command three times and each WARP command once:

.\offscreen_check.exe hardware --gpu-alias-lookup-writes
.\offscreen_check.exe hardware --gpu-alias-atomic-waterfall
.\offscreen_check.exe warp --gpu-alias-lookup-writes
.\offscreen_check.exe warp --gpu-alias-atomic-waterfall

Results

Probe RX 6600, 3 of 3 runs WARP 10.0.26100.9818
Direct (--gpu-alias-lookup-writes) actual=256,256,256,256, exit 1 actual=64,64,64,64, exit 0
Waterfall (--gpu-alias-atomic-waterfall) actual=64,64,64,64, exit 0 actual=64,64,64,64, exit 0
InterlockedOr variant (local only, see below) actual=15,15,15,15 actual=1,2,4,8

On the direct runs, the title-address fixture itself recorded no mismatches on hardware, in 3 of 3 runs:

gpu_alias_lookup_writes add_sub words=2 add=0001f5a0 sub=000d4ca0 expected_add=0001f5a0 expected_sub=000d4ca0 mismatches=0
gpu_alias_lookup_writes other results=2331 words=147454 mismatches=0
gpu_alias_lookup_writes ranges=4 records=2331 stores=14 contenders=256 sum=128416 min=-1250 max=1241.62 misses=9 words_checked=147456 mismatches=0

OR variant. This ran locally and is not committed. It is the one-line replacement from https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7087964756 in ProbeArrayAtomics (tests/gpu_alias_writes.hlsl):

Aliases[NonUniformResourceIndex(id % rangeCount)].InterlockedOr(0, 1u << (id % rangeCount), previous);

I rebuilt offscreen_check, ran the variant, then restored the file (git status --short was empty afterwards) and rebuilt. The restored direct probe read 256,256,256,256 again. Because the harness still compares against expected=64, the variant reports the probe failure text on both backends. The actual= values are the result.

All three readbacks match the RX 7800 XT (RDNA 3) values above. These are device and driver readbacks only. I did not capture the ISA, so they do not establish a cause on RDNA 2.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7129818815 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7129818815). Originally posted by [Asimmimx](https://github.com/Asimmimx) on 2026-11-24T11:13:28Z. --- RX 6600 (RDNA 2): direct, waterfall and `InterlockedOr` readbacks of the array-atomics probe. This is the same set that https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7103553798 and the follow-up above report for RDNA 3. The RDNA 2 data in this thread so far is the direct probe on an RX 6500 (`743f`), with no waterfall or OR readback. ## Environment - Commit `153bb5f6` (`main`), clean tree, `dev` preset (Debug) - AMD Radeon RX 6600 (`1002:73ff`), driver `32.0.21045.29003`. It is the only display adapter in this PC. - Windows 11 Pro 26H2, build 26300.9974 - MSVC 19.51.36260 (Visual Studio 18), Windows SDK 10.0.26100.0, DXC `1.8.2502.11` - D3D12 debug layer enabled, with `debug_errors=0 debug_warnings=0` on every run below - Wave width: in the same build, `bvh_wave64_hardware` prints `native_lane_range=32..64`. I did not measure the width these two compute shaders use. ## Commands From `out/build/dev`, I ran each hardware command three times and each WARP command once: ```powershell .\offscreen_check.exe hardware --gpu-alias-lookup-writes .\offscreen_check.exe hardware --gpu-alias-atomic-waterfall .\offscreen_check.exe warp --gpu-alias-lookup-writes .\offscreen_check.exe warp --gpu-alias-atomic-waterfall ``` ## Results | Probe | RX 6600, 3 of 3 runs | WARP `10.0.26100.9818` | |---|---|---| | Direct (`--gpu-alias-lookup-writes`) | `actual=256,256,256,256`, exit 1 | `actual=64,64,64,64`, exit 0 | | Waterfall (`--gpu-alias-atomic-waterfall`) | `actual=64,64,64,64`, exit 0 | `actual=64,64,64,64`, exit 0 | | `InterlockedOr` variant (local only, see below) | `actual=15,15,15,15` | `actual=1,2,4,8` | On the direct runs, the title-address fixture itself recorded no mismatches on hardware, in 3 of 3 runs: ```text gpu_alias_lookup_writes add_sub words=2 add=0001f5a0 sub=000d4ca0 expected_add=0001f5a0 expected_sub=000d4ca0 mismatches=0 gpu_alias_lookup_writes other results=2331 words=147454 mismatches=0 gpu_alias_lookup_writes ranges=4 records=2331 stores=14 contenders=256 sum=128416 min=-1250 max=1241.62 misses=9 words_checked=147456 mismatches=0 ``` **OR variant.** This ran locally and is not committed. It is the one-line replacement from https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7087964756 in `ProbeArrayAtomics` (`tests/gpu_alias_writes.hlsl`): ```hlsl Aliases[NonUniformResourceIndex(id % rangeCount)].InterlockedOr(0, 1u << (id % rangeCount), previous); ``` I rebuilt `offscreen_check`, ran the variant, then restored the file (`git status --short` was empty afterwards) and rebuilt. The restored direct probe read `256,256,256,256` again. Because the harness still compares against `expected=64`, the variant reports the probe failure text on both backends. The `actual=` values are the result. All three readbacks match the RX 7800 XT (RDNA 3) values above. These are device and driver readbacks only. I did not capture the ISA, so they do not establish a cause on RDNA 2. AI-assisted (Claude Code).
R0Y00 commented 2026-11-24 12:03:15 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T11:23:00Z.


Thanks for the RX 6600 comparison. This adds a distinct RDNA 2 result for all three variants: the direct probe still fails at 256 per buffer, the explicit waterfall reads 64 each, and the OR variant reads 15 in each slot on that driver. The address-write fixture itself stayed exact. A documentation-only addition linking this report is welcome; keep the strict direct probe and its failure status. The readbacks still leave the shader's wave width and driver lowering open.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7130025110 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7130025110). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T11:23:00Z. --- Thanks for the RX 6600 comparison. This adds a distinct RDNA 2 result for all three variants: the direct probe still fails at 256 per buffer, the explicit waterfall reads 64 each, and the OR variant reads 15 in each slot on that driver. The address-write fixture itself stayed exact. A documentation-only addition linking this report is welcome; keep the strict direct probe and its failure status. The readbacks still leave the shader's wave width and driver lowering open.
trick-ye commented 2026-11-24 13:00:54 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by trick-ye on 2026-11-24T12:32:35Z.


RX 7800 XT (RDNA 3): the two measurements that https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7117787984 lists as unmeasured for my earlier readbacks. (1) Radeon GPU Analyzer ISA for ProbeArrayAtomics and ProbeArrayAtomicsWaterfall on target gfx1101: both are compiled as wave64, and the direct probe takes one s_bcnt1_i32_b64 ..., exec before its per-resource loop. (2) Run-time readback from the instrumented direct probe from https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7107139741: buffer 0 reads 4194560 (upper field 64, low 16 bits 256) in 3 of 3 runs. The upper field is consistent with 64 lanes for the contributing waves; it does not establish the stock shader's width.

Environment

  • Hardware adapter: AMD Radeon RX 7800 XT (1002:747e), driver 32.0.32029.2010.
  • Commit e84829ded9ca2dff3710b879d37d28986b717cb6, dev preset (Debug). Upstream main was 54 commits ahead when I wrote this; tests/gpu_alias_writes.hlsl and tests/gpu_alias_atomic_waterfall.hlsl are unchanged between 45ad903 and e84829d.
  • DXC dxcompiler.dll: 1.9(5184-21d28f72)(1.9.2602.17) - 1.9.2602.17 (21d28f727).
  • Radeon GPU Analyzer 2.15.0.30 (10/02/2026), from the official rga-windows-x64-2.15.zip (268,732,151 bytes, SHA-256 1dd6fc63baa3ea00f0c4daf208b6139ca924566dd4305a77da0b6c5e52df2377), DX12 mode. rga -s dx12 -l lists gfx1101 (RDNA3) with AMD Radeon RX 7800 XT. The bundled amdxc64.dll and the one in the installed driver package both report file version 8.18.10.0514 but have different SHA-256 values; I did not establish which one RGA's default DX12 mode loads.
  • Operator-attested (not in the saved logs): Windows 11 build 26200.9974; MSVC 19.42.34436; Windows SDK 10.0.26100.0; the exit codes quoted below (the wrapper scripts printed them to the console only); that the worktree was at e84829d and used the same DXC; that RGA was run from its CLI only, with the network not blocked and the update check not invoked.
  • Debug layer (run-time part): backend=hardware debug_layer=enabled and debug_errors=0 debug_warnings=0 in all five renderer runs below. RGA compiles do not print a debug-layer status.

1. ISA from RGA (compile only, no draw)

Inputs are the two blobs in the dev build directory of the main checkout: ProbeArrayAtomics.cso (SHA-256 d5785ff72c7e1afa1f276f91c91bc507a2b321031f5f5ab26637243e3a625ec2) and ProbeArrayAtomicsWaterfall.cso (c92fa33f12d3f8e9732f35809f7747fd9906929274267fc6bb6535b180fac3c6). Both files have a last-write time of 2026-11-23 23:17:53 UTC, from my first build at 45ad903 (operator-attested). Operator-reported, hash not saved to a log: a fresh build of the direct probe at e84829d in a separate worktree produced the same SHA-256.

Reproduction commands (relative paths shown; the run used absolute paths and a separate output directory):

rga.exe -s dx12 -c gfx1101 --cs-blob out\build\dev\ProbeArrayAtomics.cso --isa ProbeArrayAtomics.isa
rga.exe -s dx12 -c gfx1101 --cs-blob out\build\dev\ProbeArrayAtomicsWaterfall.cso --isa ProbeArrayAtomicsWaterfall.isa

Same flags as https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7114124208 with the target changed. It is not a target-only comparison with that comment: commit, DXC build and driver differ too. Both logs printed Building for gfx1101... and Compute pipeline binary extracted successfully. RGA wrote gfx1101_ProbeArrayAtomics_comp.isa (SHA-256 c90157b7b4aa90bb1734f968f9c7a50af21ece894777f3d9ed595a093d3e96af) and gfx1101_ProbeArrayAtomicsWaterfall_comp.isa (4514ca46c75d926e8af3d400518dbe43e2b9be7de919ac332db94b60e7d355ee).

Both listings start with s_version UC_VERSION_GFX11|UC_VERSION_W64_BIT.

Direct probe (excerpts; s_delay_alu lines are dropped, and each ... skips other instructions, mostly the index arithmetic):

	s_mov_b64 s[0:1], exec
	v_cmpx_gt_u32_e64 s4, v0
	s_cbranch_execz L1
	...
	s_bcnt1_i32_b64 s6, exec
	...
	v_mov_b32_e32 v2, s6
	...
L0:
	v_readfirstlane_b32 s8, v0
	v_cmpx_eq_u32_e64 s8, v0
	s_load_b128 s[12:15], s[2:3], s8
	s_ctz_i32_b64 s9, exec
	s_lshl_b64 s[10:11], 1, s9
	s_and_saveexec_b64 s[10:11], s[10:11]
	s_waitcnt lgkmcnt(0)
	buffer_atomic_add_u32 v2, v1, s[12:15], 0 offen
	s_mov_b64 exec, s[10:11]
	s_and_not1_wrexec_b64 s[6:7], s[6:7]
	s_cbranch_execnz L0
L1:
	s_endpgm

The value added by buffer_atomic_add_u32 is v2, which holds the s_bcnt1_i32_b64 s6, exec taken once before loop L0. This is the structure the linked comment describes for gfx1201 (count taken once before the non-uniform resource loop).

Waterfall probe (excerpt from inside its loop, s_delay_alu lines omitted):

	v_cmpx_eq_i32_e64 s6, v1
	s_cbranch_execz L1
	s_bcnt1_i32_b64 s6, s[10:11]
	v_lshlrev_b32_e32 v0, 5, v0
	v_readfirstlane_b32 s7, v0
	s_waitcnt lgkmcnt(0)
	s_load_b128 s[16:19], s[2:3], s7
	s_bcnt1_i32_b64 s10, exec
	s_mul_i32 s6, s10, s6
	...
	buffer_atomic_add_u32 v1, v0, s[16:19], 0 offen

Here both s_bcnt1_i32_b64 instructions sit inside the loop (between L0 and the back-branch s_cbranch_scc1 L0), after v_cmpx_eq_i32_e64 in instruction order. Only the second reads exec; the first reads s[10:11], which is written earlier in the same iteration (s_and_b64 s[10:11], s[8:9], exec), before that comparison. I did not trace the values of either mask.

2. Wave width at run time (instrumented direct probe)

In a disposable worktree at e84829d, built with the same DXC, I added the second line of the linked method after line 74 of tests/gpu_alias_writes.hlsl, rebuilt offscreen_check, and afterwards restored the file and rebuilt:

    Aliases[NonUniformResourceIndex(id % rangeCount)].InterlockedAdd(0, 1, previous);
    if (WaveIsFirstLane()) Aliases[0].InterlockedOr(0, WaveGetLaneCount() << 16, previous);

Each run, from the worktree's build directory:

.\offscreen_check.exe hardware --gpu-alias-lookup-writes
Build Runs array_atomics line Exit (operator-observed, not in the saved logs)
Stock, before the edit 1 array_atomics threads=256 buffers=4 expected=64 actual=256,256,256,256 1
Instrumented 3 of 3 array_atomics threads=256 buffers=4 expected=64 actual=4194560,256,256,256 1
Stock, after restoring and rebuilding 1 array_atomics threads=256 buffers=4 expected=64 actual=256,256,256,256 1

4194560 is 0x00400100: bits 16 and up hold 64, the low 16 bits hold 256. Bits 16 and up are the OR of every contributing wave's WaveGetLaneCount(). The upper field is consistent with 64 lanes for the waves that contributed to the instrumented readback; it does not establish the stock shader's width. Expected by the probe: 64 per buffer. The exit code 1 is the probe's own check, which fails in the stock build (the result already reported here) and in the instrumented build (buffer 0 also carries the width bits). First mismatch for the failing probe is the array_atomics line above; every run also printed the fixture summary ending words_checked=147456 mismatches=0. No capability skip was reported.

Limits

  • The ISA is an observation from RGA's own compile of the blobs, not a capture of the pipeline the test created at run time. One RGA version, one target, one driver.
  • The readback applies only to waves that contributed in the instrumented direct probe; it does not establish the stock shader's width. As the linked method notes, the extra line may change how the shader is compiled. I did not capture ISA for the instrumented shader, the waterfall probe's run-time width, or the InterlockedOr variant.
  • RGA's wave64 flag and the instrumented probe's upper field are separate observations. Neither shows that the stock run-time pipeline used the ISA RGA printed.
  • One tested hardware adapter; the compiler DLL loaded by RGA was not identified. One stock run before and one after; three instrumented runs.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7131583650 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7131583650). Originally posted by [trick-ye](https://github.com/trick-ye) on 2026-11-24T12:32:35Z. --- RX 7800 XT (RDNA 3): the two measurements that https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7117787984 lists as unmeasured for my earlier readbacks. (1) Radeon GPU Analyzer ISA for `ProbeArrayAtomics` and `ProbeArrayAtomicsWaterfall` on target `gfx1101`: both are compiled as wave64, and the direct probe takes one `s_bcnt1_i32_b64 ..., exec` before its per-resource loop. (2) Run-time readback from the instrumented direct probe from https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7107139741: buffer 0 reads `4194560` (upper field 64, low 16 bits 256) in 3 of 3 runs. The upper field is consistent with 64 lanes for the contributing waves; it does not establish the stock shader's width. ## Environment - Hardware adapter: AMD Radeon RX 7800 XT (`1002:747e`), driver `32.0.32029.2010`. - Commit `e84829ded9ca2dff3710b879d37d28986b717cb6`, `dev` preset (Debug). Upstream `main` was 54 commits ahead when I wrote this; `tests/gpu_alias_writes.hlsl` and `tests/gpu_alias_atomic_waterfall.hlsl` are unchanged between `45ad903` and `e84829d`. - DXC `dxcompiler.dll: 1.9(5184-21d28f72)(1.9.2602.17) - 1.9.2602.17 (21d28f727)`. - Radeon GPU Analyzer `2.15.0.30 (10/02/2026)`, from the official `rga-windows-x64-2.15.zip` (268,732,151 bytes, SHA-256 `1dd6fc63baa3ea00f0c4daf208b6139ca924566dd4305a77da0b6c5e52df2377`), DX12 mode. `rga -s dx12 -l` lists `gfx1101 (RDNA3)` with `AMD Radeon RX 7800 XT`. The bundled `amdxc64.dll` and the one in the installed driver package both report file version `8.18.10.0514` but have different SHA-256 values; I did not establish which one RGA's default DX12 mode loads. - Operator-attested (not in the saved logs): Windows 11 build 26200.9974; MSVC 19.42.34436; Windows SDK 10.0.26100.0; the exit codes quoted below (the wrapper scripts printed them to the console only); that the worktree was at `e84829d` and used the same DXC; that RGA was run from its CLI only, with the network not blocked and the update check not invoked. - Debug layer (run-time part): `backend=hardware debug_layer=enabled` and `debug_errors=0 debug_warnings=0` in all five renderer runs below. RGA compiles do not print a debug-layer status. ## 1. ISA from RGA (compile only, no draw) Inputs are the two blobs in the `dev` build directory of the main checkout: `ProbeArrayAtomics.cso` (SHA-256 `d5785ff72c7e1afa1f276f91c91bc507a2b321031f5f5ab26637243e3a625ec2`) and `ProbeArrayAtomicsWaterfall.cso` (`c92fa33f12d3f8e9732f35809f7747fd9906929274267fc6bb6535b180fac3c6`). Both files have a last-write time of 2026-11-23 23:17:53 UTC, from my first build at `45ad903` (operator-attested). Operator-reported, hash not saved to a log: a fresh build of the direct probe at `e84829d` in a separate worktree produced the same SHA-256. Reproduction commands (relative paths shown; the run used absolute paths and a separate output directory): ```powershell rga.exe -s dx12 -c gfx1101 --cs-blob out\build\dev\ProbeArrayAtomics.cso --isa ProbeArrayAtomics.isa rga.exe -s dx12 -c gfx1101 --cs-blob out\build\dev\ProbeArrayAtomicsWaterfall.cso --isa ProbeArrayAtomicsWaterfall.isa ``` Same flags as https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7114124208 with the target changed. It is not a target-only comparison with that comment: commit, DXC build and driver differ too. Both logs printed `Building for gfx1101...` and `Compute pipeline binary extracted successfully.` RGA wrote `gfx1101_ProbeArrayAtomics_comp.isa` (SHA-256 `c90157b7b4aa90bb1734f968f9c7a50af21ece894777f3d9ed595a093d3e96af`) and `gfx1101_ProbeArrayAtomicsWaterfall_comp.isa` (`4514ca46c75d926e8af3d400518dbe43e2b9be7de919ac332db94b60e7d355ee`). Both listings start with `s_version UC_VERSION_GFX11|UC_VERSION_W64_BIT`. **Direct probe** (excerpts; `s_delay_alu` lines are dropped, and each `...` skips other instructions, mostly the index arithmetic): ```text s_mov_b64 s[0:1], exec v_cmpx_gt_u32_e64 s4, v0 s_cbranch_execz L1 ... s_bcnt1_i32_b64 s6, exec ... v_mov_b32_e32 v2, s6 ... L0: v_readfirstlane_b32 s8, v0 v_cmpx_eq_u32_e64 s8, v0 s_load_b128 s[12:15], s[2:3], s8 s_ctz_i32_b64 s9, exec s_lshl_b64 s[10:11], 1, s9 s_and_saveexec_b64 s[10:11], s[10:11] s_waitcnt lgkmcnt(0) buffer_atomic_add_u32 v2, v1, s[12:15], 0 offen s_mov_b64 exec, s[10:11] s_and_not1_wrexec_b64 s[6:7], s[6:7] s_cbranch_execnz L0 L1: s_endpgm ``` The value added by `buffer_atomic_add_u32` is `v2`, which holds the `s_bcnt1_i32_b64 s6, exec` taken once before loop `L0`. This is the structure the linked comment describes for `gfx1201` (count taken once before the non-uniform resource loop). **Waterfall probe** (excerpt from inside its loop, `s_delay_alu` lines omitted): ```text v_cmpx_eq_i32_e64 s6, v1 s_cbranch_execz L1 s_bcnt1_i32_b64 s6, s[10:11] v_lshlrev_b32_e32 v0, 5, v0 v_readfirstlane_b32 s7, v0 s_waitcnt lgkmcnt(0) s_load_b128 s[16:19], s[2:3], s7 s_bcnt1_i32_b64 s10, exec s_mul_i32 s6, s10, s6 ... buffer_atomic_add_u32 v1, v0, s[16:19], 0 offen ``` Here both `s_bcnt1_i32_b64` instructions sit inside the loop (between `L0` and the back-branch `s_cbranch_scc1 L0`), after `v_cmpx_eq_i32_e64` in instruction order. Only the second reads `exec`; the first reads `s[10:11]`, which is written earlier in the same iteration (`s_and_b64 s[10:11], s[8:9], exec`), before that comparison. I did not trace the values of either mask. ## 2. Wave width at run time (instrumented direct probe) In a disposable worktree at `e84829d`, built with the same DXC, I added the second line of the linked method after line 74 of `tests/gpu_alias_writes.hlsl`, rebuilt `offscreen_check`, and afterwards restored the file and rebuilt: ```hlsl Aliases[NonUniformResourceIndex(id % rangeCount)].InterlockedAdd(0, 1, previous); if (WaveIsFirstLane()) Aliases[0].InterlockedOr(0, WaveGetLaneCount() << 16, previous); ``` Each run, from the worktree's build directory: ```powershell .\offscreen_check.exe hardware --gpu-alias-lookup-writes ``` | Build | Runs | `array_atomics` line | Exit (operator-observed, not in the saved logs) | |---|---|---|---| | Stock, before the edit | 1 | `array_atomics threads=256 buffers=4 expected=64 actual=256,256,256,256` | 1 | | Instrumented | 3 of 3 | `array_atomics threads=256 buffers=4 expected=64 actual=4194560,256,256,256` | 1 | | Stock, after restoring and rebuilding | 1 | `array_atomics threads=256 buffers=4 expected=64 actual=256,256,256,256` | 1 | `4194560` is `0x00400100`: bits 16 and up hold 64, the low 16 bits hold 256. Bits 16 and up are the OR of every contributing wave's `WaveGetLaneCount()`. The upper field is consistent with 64 lanes for the waves that contributed to the instrumented readback; it does not establish the stock shader's width. Expected by the probe: 64 per buffer. The exit code 1 is the probe's own check, which fails in the stock build (the result already reported here) and in the instrumented build (buffer 0 also carries the width bits). First mismatch for the failing probe is the `array_atomics` line above; every run also printed the fixture summary ending `words_checked=147456 mismatches=0`. No capability skip was reported. ## Limits - The ISA is an observation from RGA's own compile of the blobs, not a capture of the pipeline the test created at run time. One RGA version, one target, one driver. - The readback applies only to waves that contributed in the instrumented direct probe; it does not establish the stock shader's width. As the linked method notes, the extra line may change how the shader is compiled. I did not capture ISA for the instrumented shader, the waterfall probe's run-time width, or the `InterlockedOr` variant. - RGA's wave64 flag and the instrumented probe's upper field are separate observations. Neither shows that the stock run-time pipeline used the ISA RGA printed. - One tested hardware adapter; the compiler DLL loaded by RGA was not identified. One stock run before and one after; three instrumented runs. AI-assisted (Claude Code).
ChazY11 commented 2026-11-24 13:00:55 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T12:57:59Z.


Intel Arc 140T also fails the probe, with the per-buffer pattern the UHD 770 shows

Adding a discrete Intel datapoint, because the pattern differs from the RDNA figures in the title and matches the
integrated Intel result already recorded in docs/experiments.md.

commit         06e2ff78
adapter        Intel(R) Arc(TM) 140T GPU (16GB)  vendor 8086  device 7d51
driver         32.0.101.8132
Windows        11 build 26300.9974
debug layer    enabled
command        ctest --preset dev -R '^gpu_alias_lookup_writes_hardware$' -V

array_atomics threads=256 buffers=4 expected=64 actual=256,192,128,64
add_sub   add=0001f5a0 sub=000d4ca0 expected_add=0001f5a0 expected_sub=000d4ca0 mismatches=0
other     results=2331 words=147454 mismatches=0
ranges=4  records=2331 stores=14 contenders=256 sum=128416 min=-1250 max=1241.62 misses=9 words_checked=147456 mismatches=0
result    gpu_alias_lookup_writes_hardware FAILED

Two things I think matter here:

  1. 256,192,128,64, not a uniform 256. The four buffers are over-counted by different factors, so whatever the
    driver does is not "every lane lands in every buffer" — buffer 4 is exactly right while the first is 4× over.
  2. The same pattern is already recorded for an Intel UHD Graphics 770 (driver 32.0.101.7092) in the signed-zero
    paragraph of the gpu_alias section. That makes the split follow the Intel driver rather than one integrated part,
    which narrows where a fix would have to come from.

Everything outside the atomics probe matches on this adapter, so the fixture's other 147,456 words are unaffected.

I recorded this in docs/experiments.md as a measurement bullet (#1496); this comment is the same data in the issue so it
is findable from the probe failure itself. Nothing was changed in the fixture or its expectations.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7132161002 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7132161002). Originally posted by [ChazY11](https://github.com/ChazY11) on 2026-11-24T12:57:59Z. --- ## Intel Arc 140T also fails the probe, with the per-buffer pattern the UHD 770 shows Adding a discrete Intel datapoint, because the pattern differs from the RDNA figures in the title and matches the integrated Intel result already recorded in `docs/experiments.md`. ```text commit 06e2ff78 adapter Intel(R) Arc(TM) 140T GPU (16GB) vendor 8086 device 7d51 driver 32.0.101.8132 Windows 11 build 26300.9974 debug layer enabled command ctest --preset dev -R '^gpu_alias_lookup_writes_hardware$' -V array_atomics threads=256 buffers=4 expected=64 actual=256,192,128,64 add_sub add=0001f5a0 sub=000d4ca0 expected_add=0001f5a0 expected_sub=000d4ca0 mismatches=0 other results=2331 words=147454 mismatches=0 ranges=4 records=2331 stores=14 contenders=256 sum=128416 min=-1250 max=1241.62 misses=9 words_checked=147456 mismatches=0 result gpu_alias_lookup_writes_hardware FAILED ``` Two things I think matter here: 1. **`256,192,128,64`, not a uniform `256`.** The four buffers are over-counted by different factors, so whatever the driver does is not "every lane lands in every buffer" — buffer 4 is exactly right while the first is 4× over. 2. **The same pattern is already recorded for an Intel UHD Graphics 770** (driver 32.0.101.7092) in the signed-zero paragraph of the `gpu_alias` section. That makes the split follow the Intel driver rather than one integrated part, which narrows where a fix would have to come from. Everything outside the atomics probe matches on this adapter, so the fixture's other 147,456 words are unaffected. I recorded this in `docs/experiments.md` as a measurement bullet (#1496); this comment is the same data in the issue so it is findable from the probe failure itself. Nothing was changed in the fixture or its expectations.
linusbrunotte-arch commented 2026-11-24 14:03:23 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by linusbrunotte-arch on 2026-11-24T13:13:11Z.


Polaris shows 256 per buffer in the direct probe and 64 in the waterfall

Source: ca4a98302544117caa71d85cd8c7e89f3749457f (main at test start). Windows 11 x64 build 26300.9974, offscreen_check Release built with Clang 23.1.6 in MSVC mode, Windows SDK 10.0.26100, DXC 1.9.2609.5. D3D12 debug layer unavailable. Radeon RX 590 Series (1002:67df) driver 31.0.21923.1000 where used; in-box WARP 10.0.26100.9818.

Backend Direct (expected 64 each) Explicit waterfall Title-address fixture
Radeon RX 590 FAIL, 256,256,256,256 PASS, 64,64,64,64 2,331 record results and 147,456 words, 0 mismatches
WARP PASS, 64,64,64,64 PASS, 64,64,64,64 2,331 record results and 147,456 words, 0 mismatches
$env:XBOX2WINDOWS_ADAPTER = 'RX 590'
ctest --no-tests=error -V -R '^gpu_alias_lookup_writes_(hardware|warp)$'
.\offscreen_check.exe hardware --gpu-alias-atomic-waterfall
.\offscreen_check.exe warp --gpu-alias-atomic-waterfall

Ran from the configured build directory. The strict CTest failure is in the direct probe. The separate waterfall processes exited 0. The readbacks establish the same 4× count pattern on this Polaris driver as on the reported RDNA adapters.

Codex (GPT-6) assisted with test execution and reporting.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7132517116 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7132517116). Originally posted by [linusbrunotte-arch](https://github.com/linusbrunotte-arch) on 2026-11-24T13:13:11Z. --- ### Polaris shows 256 per buffer in the direct probe and 64 in the waterfall Source: `ca4a98302544117caa71d85cd8c7e89f3749457f` (main at test start). Windows 11 x64 build 26300.9974, `offscreen_check` Release built with Clang 23.1.6 in MSVC mode, Windows SDK 10.0.26100, DXC 1.9.2609.5. D3D12 debug layer unavailable. Radeon RX 590 Series (`1002:67df`) driver `31.0.21923.1000` where used; in-box WARP `10.0.26100.9818`. | Backend | Direct (expected 64 each) | Explicit waterfall | Title-address fixture | |---|---|---|---| | Radeon RX 590 | **FAIL**, 256,256,256,256 | PASS, 64,64,64,64 | 2,331 record results and 147,456 words, 0 mismatches | | WARP | PASS, 64,64,64,64 | PASS, 64,64,64,64 | 2,331 record results and 147,456 words, 0 mismatches | ```powershell $env:XBOX2WINDOWS_ADAPTER = 'RX 590' ctest --no-tests=error -V -R '^gpu_alias_lookup_writes_(hardware|warp)$' .\offscreen_check.exe hardware --gpu-alias-atomic-waterfall .\offscreen_check.exe warp --gpu-alias-atomic-waterfall ``` Ran from the configured build directory. The strict CTest failure is in the direct probe. The separate waterfall processes exited 0. The readbacks establish the same 4× count pattern on this Polaris driver as on the reported RDNA adapters. Codex (GPT-6) assisted with test execution and reporting.
lantiumBot commented 2026-11-24 18:02:59 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lantiumBot on 2026-11-24T17:44:33Z.


RX 9060 XT (RDNA 4, gfx1200): the measurements the thread has for RDNA 3 but not yet for this target. (1) Radeon GPU Analyzer ISA for ProbeArrayAtomics and ProbeArrayAtomicsWaterfall on gfx1200, from blobs with the same SHA-256 as the ones in https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7131583650. (2) The InterlockedOr variant reads 15,15,15,15 in 3 of 3 runs, and its ISA shows where that value comes from. (3) The width-instrumented probe reads 4194560,256,256,256 in 3 of 3 runs. Measurement only, no project change.

Environment

  • Commit 68969ed86ac253615a910d24abd0177938584bd0 (main), clean tree before and after, dev preset (Debug). tests/gpu_alias_writes.hlsl, tests/gpu_alias_atomic_waterfall.hlsl and tests/gpu_alias_lookup.cpp are unchanged between e84829d and this commit.
  • AMD Radeon RX 9060 XT (1002:7590), driver 32.0.32029.2010. It is the only physical display adapter in this PC.
  • Windows 11 Pro 26H2, build 26300.10075. In-box WARP 10.0.26100.10068.
  • MSVC 19.52.37029, DXC 1.9.2602.17 (21d28f727) from Windows SDK 10.0.26100.0.
  • D3D12 debug layer unavailable on this machine (debug_layer=unavailable in every run), so no debug diagnostics are claimed.
  • Radeon GPU Analyzer 2.15.0.30 (10/02/2026), DX12 mode. rga -s dx12 -l lists gfx1200 (RDNA4) with AMD Radeon RX 9060 XT.

1. Stock probes and their gfx1200 ISA

With the out/build/dev build, each hardware command three times and each WARP command once:

.\offscreen_check.exe hardware --gpu-alias-lookup-writes
.\offscreen_check.exe hardware --gpu-alias-atomic-waterfall
.\offscreen_check.exe warp --gpu-alias-lookup-writes
.\offscreen_check.exe warp --gpu-alias-atomic-waterfall
Backend Direct Waterfall
RX 9060 XT actual=256,256,256,256, exit 1, 3 of 3 actual=64,64,64,64, exit 0, 3 of 3
WARP 10.0.26100.10068 actual=64,64,64,64, exit 0 actual=64,64,64,64, exit 0

Expected: 64 per buffer. The first mismatch on the direct hardware path is array_atomics threads=256 buffers=4 expected=64 actual=256,256,256,256. Every direct run, hardware and WARP, also printed the fixture summary ending records=2331 ... words_checked=147456 mismatches=0. No capability skip was reported. The direct readback repeats the earlier RX 9060 XT report (https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7071098620) at a newer commit. The earlier RX 9060 XT waterfall readback (https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7072945852) used a local manual-waterfall variant, so the repository waterfall row is new for this adapter.

ISA inputs are the two blobs of this build: ProbeArrayAtomics.cso (SHA-256 d5785ff72c7e1afa1f276f91c91bc507a2b321031f5f5ab26637243e3a625ec2) and ProbeArrayAtomicsWaterfall.cso (c92fa33f12d3f8e9732f35809f7747fd9906929274267fc6bb6535b180fac3c6). Both hashes equal the ones in the linked RDNA 3 comment, so the two ISA reports start from the same DXIL. That comment used the same driver version, 32.0.32029.2010, but did not identify which amdxc64.dll RGA loaded.

rga.exe -s dx12 -c gfx1200 --cs-blob ProbeArrayAtomics.cso --isa ProbeArrayAtomics.isa
rga.exe -s dx12 -c gfx1200 --cs-blob ProbeArrayAtomicsWaterfall.cso --isa ProbeArrayAtomicsWaterfall.isa

Each compile was run three ways: as above, with --offline --amdxc <amdxc64.dll of the installed driver package> (SHA-256 67b564e684796142371af3bf5ba04055fd9301fd3501f508113fa9ef0034b779), and with --offline --amdxc <amdxc64.dll bundled with RGA> (49fa70e3a73a3c6f9af56f27172532803c665971d7e6a98f9f68004081182841). The three listings are byte-identical per shader: gfx1200_ProbeArrayAtomics_comp.isa is a2c054b491eada633d92e32ff51e57a81ab881479dc2ed8b199f6c04dcdb1dca and gfx1200_ProbeArrayAtomicsWaterfall_comp.isa is cdeefb87b03ee5491c779bd503deadc226e696ee5133524a0f16cbdcf71bd1d9. So for these two shaders on this target, the listing is the same with the driver's amdxc64.dll, with RGA's bundled copy (same file version 8.18.10.0514, different SHA-256) and with RGA's default. Which DLL the default mode loads is still not identified.

Both listings start with s_version UC_VERSION_GFX12|UC_VERSION_W64_BIT.

Direct probe (s_delay_alu and s_wait_alu lines dropped; ... skips the index arithmetic):

	s_mov_b64 s[6:7], exec
	v_cmpx_gt_u32_e64 s4, v0
	s_cbranch_execz L1
	...
	s_bcnt1_i32_b64 s8, exec
	...
	v_mov_b32_e32 v1, s8
	...
	v_lshlrev_b32_e32 v0, 5, v0
	s_mov_b32 s0, s2
	s_mov_b64 s[2:3], exec
	s_mov_b64 s[4:5], exec
L0:
	v_readfirstlane_b32 s8, v0
	v_cmpx_eq_u32_e64 s8, v0
	s_load_b128 s[12:15], s[0:1], s8 offset:0x0
	s_ctz_i32_b64 s9, exec
	s_lshl_b64 s[10:11], 1, s9
	s_and_saveexec_b64 s[10:11], s[10:11]
	s_wait_kmcnt 0x0
	buffer_atomic_add_u32 v1, off, s[12:15], null
	s_mov_b64 exec, s[10:11]
	s_and_not1_wrexec_b64 s[4:5], s[4:5]
	s_cbranch_execnz L0
L1:
	s_endpgm

The operand of buffer_atomic_add_u32 is v1, which holds the s_bcnt1_i32_b64 s8, exec taken once before loop L0. This is the structure reported for gfx1201 in https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7114124208 and for gfx1101 in the linked RDNA 3 comment.

Waterfall probe (excerpt from inside its loop, same lines dropped):

	v_cmpx_eq_i32_e64 s4, v1
	s_cbranch_execz L1
	s_bcnt1_i32_b64 s4, s[12:13]
	v_lshlrev_b32_e32 v0, 5, v0
	v_readfirstlane_b32 s5, v0
	s_wait_kmcnt 0x0
	s_load_b128 s[16:19], s[0:1], s5 offset:0x0
	s_bcnt1_i32_b64 s12, exec
	s_mul_i32 s4, s12, s4
	...
	v_mov_b32_e32 v0, s4
	s_wait_kmcnt 0x0
	buffer_atomic_add_u32 v0, off, s[16:19], null

Both s_bcnt1_i32_b64 instructions sit inside the loop (between L0 and the back-branch s_cbranch_scc1 L0). The first reads s[12:13], written earlier in the same iteration by s_and_b64 s[12:13], vcc, exec; the second reads exec after v_cmpx_eq_i32_e64. I did not trace the values of either mask.

2. InterlockedOr variant

Local only, not committed. The one-line replacement from https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7087964756 in ProbeArrayAtomics:

Aliases[NonUniformResourceIndex(id % rangeCount)].InterlockedOr(0, 1u << (id % rangeCount), previous);

cmake --build --preset dev --target offscreen_check, then .\offscreen_check.exe <backend> --gpu-alias-lookup-writes:

Backend Probe line
RX 9060 XT array_atomics threads=256 buffers=4 expected=64 actual=15,15,15,15, 3 of 3
WARP 10.0.26100.10068 array_atomics threads=256 buffers=4 expected=64 actual=1,2,4,8

The harness still compares against 64, so the variant exits 1 on both backends; the actual= values are the result. These match the RX 7800 XT and RX 6600 readbacks above.

RGA on the variant blob (SHA-256 e402476b3e0668b6abbfdaa131efbd94e3cada6740e34585dcc7c6c82a79d65a), same three ways, byte-identical listings (fff60bee6f339f042759b8dbc08a9db0fbe5ddb7c2a19c36187de2efde293b56), wave64. Excerpt (same lines dropped, s_nop lines dropped too):

	v_lshlrev_b32_e64 v1, v0, 1                 ; per lane: 1 << (id % rangeCount)
	s_nand_saveexec_b64 vcc, 0
	v_cndmask_b32_e32 v4, 0, v1, vcc_lo
	v_or_b32_dpp v4, v4, v4 row_shr:1 row_mask:0xf bank_mask:0xf
	v_or_b32_dpp v4, v4, v4 row_shr:2 row_mask:0xf bank_mask:0xf
	v_or_b32_dpp v4, v4, v4 row_shr:4 row_mask:0xf bank_mask:0xf
	v_or_b32_dpp v4, v4, v4 row_shr:8 row_mask:0xf bank_mask:0xf
	s_movk_i32 s0, 0xffff
	v_permlanex16_b32 v5, v4, -1, s0 op_sel:[1,1]
	v_or_b32_dpp v4, v4, v5 quad_perm:[0,1,2,3] row_mask:0xa bank_mask:0xf
	v_readlane_b32 s0, v4, 31
	v_or_b32_e64_dpp v4, v4, s0 quad_perm:[0,1,2,3] row_mask:0xc bank_mask:0xf
	s_mov_b64 exec, vcc
	v_readlane_b32 s0, v4, 63
	v_lshlrev_b32_e32 v0, 5, v0
	v_mov_b32_e32 v1, s0
	...
L0:
	v_readfirstlane_b32 s8, v0
	v_cmpx_eq_u32_e64 s8, v0
	s_load_b128 s[12:15], s[0:1], s8 offset:0x0
	s_ctz_i32_b64 s9, exec
	s_lshl_b64 s[10:11], 1, s9
	s_and_saveexec_b64 s[10:11], s[10:11]
	s_wait_kmcnt 0x0
	buffer_atomic_or_b32 v1, off, s[12:15], null
	s_mov_b64 exec, s[10:11]
	s_and_not1_wrexec_b64 s[4:5], s[4:5]
	s_cbranch_execnz L0

The comment on the first line is mine. The operand of buffer_atomic_or_b32 is v1, loaded from lane 63 of v4 after the v_or_b32_dpp chain, and that chain runs once before loop L0. So the listing has the same shape as the add: the per-lane operands are combined before the loop that separates the lanes by resource index, and each iteration applies the combined value. A wave that holds all four indices then ORs 1|2|4|8 = 15 into each buffer, which is the readback.

3. Wave width at run time (instrumented direct probe)

Local only, not committed. The second line of the method in https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7107139741, added after line 74 of tests/gpu_alias_writes.hlsl:

    Aliases[NonUniformResourceIndex(id % rangeCount)].InterlockedAdd(0, 1, previous);
    if (WaveIsFirstLane()) Aliases[0].InterlockedOr(0, WaveGetLaneCount() << 16, previous);
Build Backend Runs array_atomics line Exit
Stock, before the edits RX 9060 XT 3 of 3 actual=256,256,256,256 1
Instrumented RX 9060 XT 3 of 3 actual=4194560,256,256,256 1
Instrumented WARP 1 actual=262208,64,64,64 1
Stock, after git checkout and rebuild RX 9060 XT 1 actual=256,256,256,256 1

4194560 is 0x00400100: bits 16 and up hold 64, the low 16 bits hold 256. 262208 is 0x00040040: width 4 on WARP, count 64. After the restore, git status --short was empty and ProbeArrayAtomics.cso had its stock SHA-256 again; the waterfall also read 64,64,64,64 once more.

RGA on the instrumented blob (SHA-256 4da0b82b2ab1d0f701dc40a95ad67d8c0924103f770e94332f057029647dd92b), same three ways, byte-identical listings (674d8989eb649ee592d221d56bbd326447468358a33b55275502dfffec4cc8b4), wave64. The linked RDNA 3 comment did not capture this one. With the s_delay_alu and s_wait_alu lines dropped, its loop L0 is the stock loop above instruction for instruction, with only register numbers changed (s10 for s9, v2 for v1); the wait-state lines differ slightly. The s_bcnt1_i32_b64 s8, exec is again taken once before the loop. The added line compiles to this tail (plus s_ctz_i32_b64 s9, exec and the v_mbcnt pair for v1, computed before the loop):

	s_mov_b64 exec, s[2:3]
	v_cmpx_eq_i32_e64 s9, v1
	s_cbranch_execz L1
	s_load_b128 s[8:11], s[0:1], 0x0
	s_ctz_i32_b64 s4, exec
	s_lshl_b64 s[4:5], 1, s4
	s_and_saveexec_b64 s[4:5], s[4:5]
	v_mov_b32_e32 v0, 0x400000
	s_wait_kmcnt 0x0
	buffer_atomic_or_b32 v0, off, s[8:11], null

WaveGetLaneCount() << 16 is the constant 0x400000 (64 << 16) in the listing, which agrees with the UC_VERSION_W64_BIT header and with the run-time upper field.

Limits

  • The ISA is RGA's own compile of each blob, with the pipeline RGA builds around it. It is not a capture of the pipeline offscreen_check created at run time. One RGA version, one target.
  • The run-time width is that of the instrumented shader. For the stock shader the evidence is the UC_VERSION_W64_BIT header of its RGA listing, not a run-time readback.
  • One adapter, one driver, one Windows build. Three runs per hardware row, one per WARP row and one for the restored build. Debug layer unavailable.
  • The byte-identical result across the two amdxc64.dll files covers these four blobs on gfx1200 only, and the DLL loaded by RGA's default mode is not identified.
  • I did not capture ISA for the other replacement lines of the Intel table, and nothing here covers the Intel staircase or the Windows 10 WARP result.
  • This describes the compiled code and the readbacks. It does not say whether the combined atomic is a driver defect or what a fix would be.

AI-assisted (Claude Code - Fable 5.2); runs executed locally on the adapter above.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7139638275 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7139638275). Originally posted by [lantiumBot](https://github.com/lantiumBot) on 2026-11-24T17:44:33Z. --- RX 9060 XT (RDNA 4, `gfx1200`): the measurements the thread has for RDNA 3 but not yet for this target. (1) Radeon GPU Analyzer ISA for `ProbeArrayAtomics` and `ProbeArrayAtomicsWaterfall` on `gfx1200`, from blobs with the same SHA-256 as the ones in https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7131583650. (2) The `InterlockedOr` variant reads `15,15,15,15` in 3 of 3 runs, and its ISA shows where that value comes from. (3) The width-instrumented probe reads `4194560,256,256,256` in 3 of 3 runs. Measurement only, no project change. ## Environment - Commit `68969ed86ac253615a910d24abd0177938584bd0` (`main`), clean tree before and after, `dev` preset (Debug). `tests/gpu_alias_writes.hlsl`, `tests/gpu_alias_atomic_waterfall.hlsl` and `tests/gpu_alias_lookup.cpp` are unchanged between `e84829d` and this commit. - AMD Radeon RX 9060 XT (`1002:7590`), driver `32.0.32029.2010`. It is the only physical display adapter in this PC. - Windows 11 Pro 26H2, build 26300.10075. In-box WARP `10.0.26100.10068`. - MSVC 19.52.37029, DXC `1.9.2602.17 (21d28f727)` from Windows SDK 10.0.26100.0. - D3D12 debug layer unavailable on this machine (`debug_layer=unavailable` in every run), so no debug diagnostics are claimed. - Radeon GPU Analyzer `2.15.0.30 (10/02/2026)`, DX12 mode. `rga -s dx12 -l` lists `gfx1200 (RDNA4)` with `AMD Radeon RX 9060 XT`. ## 1. Stock probes and their `gfx1200` ISA With the `out/build/dev` build, each hardware command three times and each WARP command once: ```powershell .\offscreen_check.exe hardware --gpu-alias-lookup-writes .\offscreen_check.exe hardware --gpu-alias-atomic-waterfall .\offscreen_check.exe warp --gpu-alias-lookup-writes .\offscreen_check.exe warp --gpu-alias-atomic-waterfall ``` | Backend | Direct | Waterfall | |---|---|---| | RX 9060 XT | `actual=256,256,256,256`, exit 1, 3 of 3 | `actual=64,64,64,64`, exit 0, 3 of 3 | | WARP `10.0.26100.10068` | `actual=64,64,64,64`, exit 0 | `actual=64,64,64,64`, exit 0 | Expected: 64 per buffer. The first mismatch on the direct hardware path is `array_atomics threads=256 buffers=4 expected=64 actual=256,256,256,256`. Every direct run, hardware and WARP, also printed the fixture summary ending `records=2331 ... words_checked=147456 mismatches=0`. No capability skip was reported. The direct readback repeats the earlier RX 9060 XT report (https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7071098620) at a newer commit. The earlier RX 9060 XT waterfall readback (https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7072945852) used a local manual-waterfall variant, so the repository waterfall row is new for this adapter. ISA inputs are the two blobs of this build: `ProbeArrayAtomics.cso` (SHA-256 `d5785ff72c7e1afa1f276f91c91bc507a2b321031f5f5ab26637243e3a625ec2`) and `ProbeArrayAtomicsWaterfall.cso` (`c92fa33f12d3f8e9732f35809f7747fd9906929274267fc6bb6535b180fac3c6`). Both hashes equal the ones in the linked RDNA 3 comment, so the two ISA reports start from the same DXIL. That comment used the same driver version, `32.0.32029.2010`, but did not identify which `amdxc64.dll` RGA loaded. ```powershell rga.exe -s dx12 -c gfx1200 --cs-blob ProbeArrayAtomics.cso --isa ProbeArrayAtomics.isa rga.exe -s dx12 -c gfx1200 --cs-blob ProbeArrayAtomicsWaterfall.cso --isa ProbeArrayAtomicsWaterfall.isa ``` Each compile was run three ways: as above, with `--offline --amdxc <amdxc64.dll of the installed driver package>` (SHA-256 `67b564e684796142371af3bf5ba04055fd9301fd3501f508113fa9ef0034b779`), and with `--offline --amdxc <amdxc64.dll bundled with RGA>` (`49fa70e3a73a3c6f9af56f27172532803c665971d7e6a98f9f68004081182841`). The three listings are byte-identical per shader: `gfx1200_ProbeArrayAtomics_comp.isa` is `a2c054b491eada633d92e32ff51e57a81ab881479dc2ed8b199f6c04dcdb1dca` and `gfx1200_ProbeArrayAtomicsWaterfall_comp.isa` is `cdeefb87b03ee5491c779bd503deadc226e696ee5133524a0f16cbdcf71bd1d9`. So for these two shaders on this target, the listing is the same with the driver's `amdxc64.dll`, with RGA's bundled copy (same file version `8.18.10.0514`, different SHA-256) and with RGA's default. Which DLL the default mode loads is still not identified. Both listings start with `s_version UC_VERSION_GFX12|UC_VERSION_W64_BIT`. **Direct probe** (`s_delay_alu` and `s_wait_alu` lines dropped; `...` skips the index arithmetic): ```text s_mov_b64 s[6:7], exec v_cmpx_gt_u32_e64 s4, v0 s_cbranch_execz L1 ... s_bcnt1_i32_b64 s8, exec ... v_mov_b32_e32 v1, s8 ... v_lshlrev_b32_e32 v0, 5, v0 s_mov_b32 s0, s2 s_mov_b64 s[2:3], exec s_mov_b64 s[4:5], exec L0: v_readfirstlane_b32 s8, v0 v_cmpx_eq_u32_e64 s8, v0 s_load_b128 s[12:15], s[0:1], s8 offset:0x0 s_ctz_i32_b64 s9, exec s_lshl_b64 s[10:11], 1, s9 s_and_saveexec_b64 s[10:11], s[10:11] s_wait_kmcnt 0x0 buffer_atomic_add_u32 v1, off, s[12:15], null s_mov_b64 exec, s[10:11] s_and_not1_wrexec_b64 s[4:5], s[4:5] s_cbranch_execnz L0 L1: s_endpgm ``` The operand of `buffer_atomic_add_u32` is `v1`, which holds the `s_bcnt1_i32_b64 s8, exec` taken once before loop `L0`. This is the structure reported for `gfx1201` in https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7114124208 and for `gfx1101` in the linked RDNA 3 comment. **Waterfall probe** (excerpt from inside its loop, same lines dropped): ```text v_cmpx_eq_i32_e64 s4, v1 s_cbranch_execz L1 s_bcnt1_i32_b64 s4, s[12:13] v_lshlrev_b32_e32 v0, 5, v0 v_readfirstlane_b32 s5, v0 s_wait_kmcnt 0x0 s_load_b128 s[16:19], s[0:1], s5 offset:0x0 s_bcnt1_i32_b64 s12, exec s_mul_i32 s4, s12, s4 ... v_mov_b32_e32 v0, s4 s_wait_kmcnt 0x0 buffer_atomic_add_u32 v0, off, s[16:19], null ``` Both `s_bcnt1_i32_b64` instructions sit inside the loop (between `L0` and the back-branch `s_cbranch_scc1 L0`). The first reads `s[12:13]`, written earlier in the same iteration by `s_and_b64 s[12:13], vcc, exec`; the second reads `exec` after `v_cmpx_eq_i32_e64`. I did not trace the values of either mask. ## 2. `InterlockedOr` variant Local only, not committed. The one-line replacement from https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7087964756 in `ProbeArrayAtomics`: ```hlsl Aliases[NonUniformResourceIndex(id % rangeCount)].InterlockedOr(0, 1u << (id % rangeCount), previous); ``` `cmake --build --preset dev --target offscreen_check`, then `.\offscreen_check.exe <backend> --gpu-alias-lookup-writes`: | Backend | Probe line | |---|---| | RX 9060 XT | `array_atomics threads=256 buffers=4 expected=64 actual=15,15,15,15`, 3 of 3 | | WARP `10.0.26100.10068` | `array_atomics threads=256 buffers=4 expected=64 actual=1,2,4,8` | The harness still compares against 64, so the variant exits 1 on both backends; the `actual=` values are the result. These match the RX 7800 XT and RX 6600 readbacks above. RGA on the variant blob (SHA-256 `e402476b3e0668b6abbfdaa131efbd94e3cada6740e34585dcc7c6c82a79d65a`), same three ways, byte-identical listings (`fff60bee6f339f042759b8dbc08a9db0fbe5ddb7c2a19c36187de2efde293b56`), wave64. Excerpt (same lines dropped, `s_nop` lines dropped too): ```text v_lshlrev_b32_e64 v1, v0, 1 ; per lane: 1 << (id % rangeCount) s_nand_saveexec_b64 vcc, 0 v_cndmask_b32_e32 v4, 0, v1, vcc_lo v_or_b32_dpp v4, v4, v4 row_shr:1 row_mask:0xf bank_mask:0xf v_or_b32_dpp v4, v4, v4 row_shr:2 row_mask:0xf bank_mask:0xf v_or_b32_dpp v4, v4, v4 row_shr:4 row_mask:0xf bank_mask:0xf v_or_b32_dpp v4, v4, v4 row_shr:8 row_mask:0xf bank_mask:0xf s_movk_i32 s0, 0xffff v_permlanex16_b32 v5, v4, -1, s0 op_sel:[1,1] v_or_b32_dpp v4, v4, v5 quad_perm:[0,1,2,3] row_mask:0xa bank_mask:0xf v_readlane_b32 s0, v4, 31 v_or_b32_e64_dpp v4, v4, s0 quad_perm:[0,1,2,3] row_mask:0xc bank_mask:0xf s_mov_b64 exec, vcc v_readlane_b32 s0, v4, 63 v_lshlrev_b32_e32 v0, 5, v0 v_mov_b32_e32 v1, s0 ... L0: v_readfirstlane_b32 s8, v0 v_cmpx_eq_u32_e64 s8, v0 s_load_b128 s[12:15], s[0:1], s8 offset:0x0 s_ctz_i32_b64 s9, exec s_lshl_b64 s[10:11], 1, s9 s_and_saveexec_b64 s[10:11], s[10:11] s_wait_kmcnt 0x0 buffer_atomic_or_b32 v1, off, s[12:15], null s_mov_b64 exec, s[10:11] s_and_not1_wrexec_b64 s[4:5], s[4:5] s_cbranch_execnz L0 ``` The comment on the first line is mine. The operand of `buffer_atomic_or_b32` is `v1`, loaded from lane 63 of `v4` after the `v_or_b32_dpp` chain, and that chain runs once before loop `L0`. So the listing has the same shape as the add: the per-lane operands are combined before the loop that separates the lanes by resource index, and each iteration applies the combined value. A wave that holds all four indices then ORs `1|2|4|8 = 15` into each buffer, which is the readback. ## 3. Wave width at run time (instrumented direct probe) Local only, not committed. The second line of the method in https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7107139741, added after line 74 of `tests/gpu_alias_writes.hlsl`: ```hlsl Aliases[NonUniformResourceIndex(id % rangeCount)].InterlockedAdd(0, 1, previous); if (WaveIsFirstLane()) Aliases[0].InterlockedOr(0, WaveGetLaneCount() << 16, previous); ``` | Build | Backend | Runs | `array_atomics` line | Exit | |---|---|---|---|---| | Stock, before the edits | RX 9060 XT | 3 of 3 | `actual=256,256,256,256` | 1 | | Instrumented | RX 9060 XT | 3 of 3 | `actual=4194560,256,256,256` | 1 | | Instrumented | WARP | 1 | `actual=262208,64,64,64` | 1 | | Stock, after `git checkout` and rebuild | RX 9060 XT | 1 | `actual=256,256,256,256` | 1 | `4194560` is `0x00400100`: bits 16 and up hold 64, the low 16 bits hold 256. `262208` is `0x00040040`: width 4 on WARP, count 64. After the restore, `git status --short` was empty and `ProbeArrayAtomics.cso` had its stock SHA-256 again; the waterfall also read `64,64,64,64` once more. RGA on the instrumented blob (SHA-256 `4da0b82b2ab1d0f701dc40a95ad67d8c0924103f770e94332f057029647dd92b`), same three ways, byte-identical listings (`674d8989eb649ee592d221d56bbd326447468358a33b55275502dfffec4cc8b4`), wave64. The linked RDNA 3 comment did not capture this one. With the `s_delay_alu` and `s_wait_alu` lines dropped, its loop `L0` is the stock loop above instruction for instruction, with only register numbers changed (`s10` for `s9`, `v2` for `v1`); the wait-state lines differ slightly. The `s_bcnt1_i32_b64 s8, exec` is again taken once before the loop. The added line compiles to this tail (plus `s_ctz_i32_b64 s9, exec` and the `v_mbcnt` pair for `v1`, computed before the loop): ```text s_mov_b64 exec, s[2:3] v_cmpx_eq_i32_e64 s9, v1 s_cbranch_execz L1 s_load_b128 s[8:11], s[0:1], 0x0 s_ctz_i32_b64 s4, exec s_lshl_b64 s[4:5], 1, s4 s_and_saveexec_b64 s[4:5], s[4:5] v_mov_b32_e32 v0, 0x400000 s_wait_kmcnt 0x0 buffer_atomic_or_b32 v0, off, s[8:11], null ``` `WaveGetLaneCount() << 16` is the constant `0x400000` (64 << 16) in the listing, which agrees with the `UC_VERSION_W64_BIT` header and with the run-time upper field. ## Limits - The ISA is RGA's own compile of each blob, with the pipeline RGA builds around it. It is not a capture of the pipeline `offscreen_check` created at run time. One RGA version, one target. - The run-time width is that of the instrumented shader. For the stock shader the evidence is the `UC_VERSION_W64_BIT` header of its RGA listing, not a run-time readback. - One adapter, one driver, one Windows build. Three runs per hardware row, one per WARP row and one for the restored build. Debug layer unavailable. - The byte-identical result across the two `amdxc64.dll` files covers these four blobs on `gfx1200` only, and the DLL loaded by RGA's default mode is not identified. - I did not capture ISA for the other replacement lines of the Intel table, and nothing here covers the Intel staircase or the Windows 10 WARP result. - This describes the compiled code and the readbacks. It does not say whether the combined atomic is a driver defect or what a fix would be. AI-assisted (Claude Code - Fable 5.2); runs executed locally on the adapter above.
lantiumBot commented 2026-11-24 21:01:24 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lantiumBot on 2026-11-24T20:43:43Z.


Proposal, scope question first: add the two local probe variants used in this thread as opt-in offscreen_check diagnostics, next to --gpu-alias-atomic-waterfall from #793, so the next readbacks do not need a source edit and a rebuild.

Both variants have been run by editing line 74 of tests/gpu_alias_writes.hlsl, rebuilding and restoring: the InterlockedOr line from https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7087964756 in four reports (Intel UHD with an RTX 3050 control on the same host, RX 7800 XT, RX 6600, RX 9060 XT), and the width line from https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7107139741 in three (the same Intel UHD and RTX 3050 host, RX 7800 XT, RX 9060 XT), each with a WARP control.

Slice

  • --gpu-alias-atomic-or: a separate entry point with Aliases[NonUniformResourceIndex(id % rangeCount)].InterlockedOr(0, 1u << (id % rangeCount), previous), same root signature, buffers and dispatch as the direct probe. Prints array_atomics_or threads=256 buffers=4 expected=1,2,4,8 actual=... and fails unless the four words are 1,2,4,8.
  • --gpu-alias-atomic-width: the direct InterlockedAdd probe plus if (WaveIsFirstLane()) Aliases[0].InterlockedOr(0, WaveGetLaneCount() << 16, previous). Prints the four counts from the low 16 bits and the upper field of buffer 0 as a separate wave_lane_count_bits= value. It passes or fails on the counts only; the width is reported, not judged. Gated on SM 6.0 and WaveOps like the waterfall diagnostic, with a capability skip otherwise.
  • Shared code: array_atomics_exact in tests/gpu_alias_lookup.cpp takes the expected words and an optional mask instead of the fixed 64.

Unchanged

  • ProbeArrayAtomics, --gpu-alias-lookup-writes, its strict failure and array_atomics_dxil stay as they are. The two new operations are not registered as CTest entries, like the waterfall diagnostic, so no test changes status on any adapter.

Verification I can provide

  • RX 9060 XT (driver 32.0.32029.2010) and in-box WARP, three runs each. Expected from the hand-edited runs already posted: 15,15,15,15 and 4194560,256,256,256 on the Radeon, 1,2,4,8 and 262208,64,64,64 on WARP, so both diagnostics must fail on the Radeon and pass on WARP, the width one on its counts (256 against 64).
  • A negative control for the comparison itself: the expected-words check rejects a readback that differs in one word.
  • A paragraph in docs/experiments.md with the two commands.

Is this slice wanted, and are the option names and the pass or fail rule for the width diagnostic acceptable? I will not start before an answer.

AI-assisted (Claude Code - Fable 5.2).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7143976785 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7143976785). Originally posted by [lantiumBot](https://github.com/lantiumBot) on 2026-11-24T20:43:43Z. --- Proposal, scope question first: add the two local probe variants used in this thread as opt-in `offscreen_check` diagnostics, next to `--gpu-alias-atomic-waterfall` from #793, so the next readbacks do not need a source edit and a rebuild. Both variants have been run by editing line 74 of `tests/gpu_alias_writes.hlsl`, rebuilding and restoring: the `InterlockedOr` line from https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7087964756 in four reports (Intel UHD with an RTX 3050 control on the same host, RX 7800 XT, RX 6600, RX 9060 XT), and the width line from https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7107139741 in three (the same Intel UHD and RTX 3050 host, RX 7800 XT, RX 9060 XT), each with a WARP control. **Slice** - `--gpu-alias-atomic-or`: a separate entry point with `Aliases[NonUniformResourceIndex(id % rangeCount)].InterlockedOr(0, 1u << (id % rangeCount), previous)`, same root signature, buffers and dispatch as the direct probe. Prints `array_atomics_or threads=256 buffers=4 expected=1,2,4,8 actual=...` and fails unless the four words are `1,2,4,8`. - `--gpu-alias-atomic-width`: the direct `InterlockedAdd` probe plus `if (WaveIsFirstLane()) Aliases[0].InterlockedOr(0, WaveGetLaneCount() << 16, previous)`. Prints the four counts from the low 16 bits and the upper field of buffer 0 as a separate `wave_lane_count_bits=` value. It passes or fails on the counts only; the width is reported, not judged. Gated on SM 6.0 and WaveOps like the waterfall diagnostic, with a capability skip otherwise. - Shared code: `array_atomics_exact` in `tests/gpu_alias_lookup.cpp` takes the expected words and an optional mask instead of the fixed 64. **Unchanged** - `ProbeArrayAtomics`, `--gpu-alias-lookup-writes`, its strict failure and `array_atomics_dxil` stay as they are. The two new operations are not registered as CTest entries, like the waterfall diagnostic, so no test changes status on any adapter. **Verification I can provide** - RX 9060 XT (driver `32.0.32029.2010`) and in-box WARP, three runs each. Expected from the hand-edited runs already posted: `15,15,15,15` and `4194560,256,256,256` on the Radeon, `1,2,4,8` and `262208,64,64,64` on WARP, so both diagnostics must fail on the Radeon and pass on WARP, the width one on its counts (256 against 64). - A negative control for the comparison itself: the expected-words check rejects a readback that differs in one word. - A paragraph in `docs/experiments.md` with the two commands. Is this slice wanted, and are the option names and the pass or fail rule for the width diagnostic acceptable? I will not start before an answer. AI-assisted (Claude Code - Fable 5.2).
FAJIFBEFJHA commented 2026-11-24 22:01:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by FAJIFBEFJHA on 2026-11-24T21:52:24Z.


I ran the array-atomics probes on an RX 7600 (1002:7480, gfx1102, driver 32.0.32029.2010) and in-box WARP (1414:008c, 10.0.26100.9818). The renderer came from main at 94dbdbf0894e72c6f81b551d0e3ef7616abe9a19 using the dev preset, Windows 11 Pro x64 build 26300.9974, MSVC 19.52.37029.0, SDK 10.0.26100.0 and DXC 1.8.2502.11 (cs_6_0). The D3D12 debug layer reported zero errors and warnings on both backends.

I repeated the two stock probes three times per backend with no game process detected before or after the run. Steam and Wallpaper Engine were running in the background. All 12 results matched the first set of runs.

$env:XBOX2WINDOWS_ADAPTER = 'RX 7600'
.\offscreen_check.exe hardware --gpu-alias-lookup-writes
.\offscreen_check.exe hardware --gpu-alias-atomic-waterfall
.\offscreen_check.exe warp --gpu-alias-lookup-writes
.\offscreen_check.exe warp --gpu-alias-atomic-waterfall
Probe RX 7600 WARP
Direct InterlockedAdd 256,256,256,256, exit 1 64,64,64,64, exit 0
Explicit waterfall 64,64,64,64, exit 0 64,64,64,64, exit 0
Local InterlockedOr variant 15,15,15,15, exit 1 1,2,4,8, exit 1
Local width variant 4194560,256,256,256, exit 1 262208,64,64,64, exit 1

The stock retest had 9 PASS, 3 direct hardware FAIL and 0 SKIP. The title-address fixture reported zero mismatches in 147456 words on every direct run. The OR and width rows are from the earlier set, three runs per backend. Both local edits kept the original four-word comparison against 64, which accounts for the WARP exit codes on those two rows. The stock shader and its DXIL were restored and the stock results repeated.

In the width variant, buffer 0 read 0x00400100 on RX 7600 and 0x00040040 on WARP. The low fields contain 256 and 64 respectively. The high fields are the OR of the reported lane counts from contributing waves and read 64 and 4. Those fields describe the instrumented shader. The stock shader's wave membership and the processing order of the indices remain unmeasured. The readbacks agree with the RX 7800 XT and RX 9060 XT reports. RX 7800 XT · RX 9060 XT

Scope question for @R0Y00

Would a separate parameterized measurement of UAV count and lane-to-resource assignment be useful for #369? LantiumBot's proposal exposes the existing fixed four-buffer OR and width variants as opt-in commands. The proposed sweep varies the inputs to test when the excess appears and which count model fits. LantiumBot's proposal

I would start with two UAVs and two assignments for 256 threads. The uniform control alternates buffers between groups. The discriminating case splits each wave's active lanes evenly between both indices. With that split verified in the same dispatch, the total across both buffers is 256 for the strict reference, 512 for a full-wave contribution per selected index and 384 for a contribution from lanes still pending at each index. The last total holds for either index order. Each shader would use its own membership record. A run with an unverified split would be inconclusive. The first pass would use direct InterlockedAdd and the explicit waterfall on RX 7600 and WARP. The current four-buffer probe and strict expectations stay in place. Larger resource counts and other distributions can follow if the first two cases leave a specific question open.

AI-assisted (Codex and ChatGPT). Measurements ran locally on the adapters above.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7145501455 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7145501455). Originally posted by [FAJIFBEFJHA](https://github.com/FAJIFBEFJHA) on 2026-11-24T21:52:24Z. --- I ran the array-atomics probes on an RX 7600 (`1002:7480`, `gfx1102`, driver `32.0.32029.2010`) and in-box WARP (`1414:008c`, `10.0.26100.9818`). The renderer came from `main` at `94dbdbf0894e72c6f81b551d0e3ef7616abe9a19` using the `dev` preset, Windows 11 Pro x64 build `26300.9974`, MSVC `19.52.37029.0`, SDK `10.0.26100.0` and DXC `1.8.2502.11` (`cs_6_0`). The D3D12 debug layer reported zero errors and warnings on both backends. I repeated the two stock probes three times per backend with no game process detected before or after the run. Steam and Wallpaper Engine were running in the background. All 12 results matched the first set of runs. ```powershell $env:XBOX2WINDOWS_ADAPTER = 'RX 7600' .\offscreen_check.exe hardware --gpu-alias-lookup-writes .\offscreen_check.exe hardware --gpu-alias-atomic-waterfall .\offscreen_check.exe warp --gpu-alias-lookup-writes .\offscreen_check.exe warp --gpu-alias-atomic-waterfall ``` | Probe | RX 7600 | WARP | | --- | --- | --- | | Direct `InterlockedAdd` | `256,256,256,256`, exit `1` | `64,64,64,64`, exit `0` | | Explicit waterfall | `64,64,64,64`, exit `0` | `64,64,64,64`, exit `0` | | Local `InterlockedOr` variant | `15,15,15,15`, exit `1` | `1,2,4,8`, exit `1` | | Local width variant | `4194560,256,256,256`, exit `1` | `262208,64,64,64`, exit `1` | The stock retest had 9 PASS, 3 direct hardware FAIL and 0 SKIP. The title-address fixture reported zero mismatches in 147456 words on every direct run. The OR and width rows are from the earlier set, three runs per backend. Both local edits kept the original four-word comparison against 64, which accounts for the WARP exit codes on those two rows. The stock shader and its DXIL were restored and the stock results repeated. In the width variant, buffer 0 read `0x00400100` on RX 7600 and `0x00040040` on WARP. The low fields contain 256 and 64 respectively. The high fields are the OR of the reported lane counts from contributing waves and read 64 and 4. Those fields describe the instrumented shader. The stock shader's wave membership and the processing order of the indices remain unmeasured. The readbacks agree with the RX 7800 XT and RX 9060 XT reports. [RX 7800 XT](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7131583650) · [RX 9060 XT](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7139638275) **Scope question for @R0Y00** Would a separate parameterized measurement of UAV count and lane-to-resource assignment be useful for #369? LantiumBot's proposal exposes the existing fixed four-buffer OR and width variants as opt-in commands. The proposed sweep varies the inputs to test when the excess appears and which count model fits. [LantiumBot's proposal](https://github.com/R0Y00/Xbox2Windows/issues/369#issuecomment-7143976785) I would start with two UAVs and two assignments for 256 threads. The uniform control alternates buffers between groups. The discriminating case splits each wave's active lanes evenly between both indices. With that split verified in the same dispatch, the total across both buffers is 256 for the strict reference, 512 for a full-wave contribution per selected index and 384 for a contribution from lanes still pending at each index. The last total holds for either index order. Each shader would use its own membership record. A run with an unverified split would be inconclusive. The first pass would use direct `InterlockedAdd` and the explicit waterfall on RX 7600 and WARP. The current four-buffer probe and strict expectations stay in place. Larger resource counts and other distributions can follow if the first two cases leave a specific question open. AI-assisted (Codex and ChatGPT). Measurements ran locally on the adapters above.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows#363
No description provided.