Preamble
Experienced data corruption in my engine when baking assets in compute on a separate queue while main world rendered. Used Fable 5.1 and GPT-6 Astra to isolate it here: GitHub - dsvensson/nvidia-bug · GitHub
Any artifact mentioned here are either in this repository, or produced by it.
This is way outside my field of expertise but all second opinions converged at this being a driver bug. Is this perhaps a security issue given that two shaders should absolutely not be able to manipulate each other’s memory?
Summary
A D3D12 compute shader produces incorrect accumulator values when dispatched on a COMPUTE-type queue while a DIRECT queue renders with a pixel shader containing a dynamically indexed private array. The incorrect values carry a marker supplied only to the pixel shader. Changing that marker changes the values appearing in the compute accumulator, without changing either shader binary.
The issue reproduces on an RTX 4090 with drivers 610.88 and 616.64. On 616.64, both 20-dispatch marker runs failed in every dispatch. The device was not removed. A separate debug run reproduced the incorrect output with zero D3D12 debug-layer errors or warnings.
The attached standalone reproducer initializes every location before reading it, writes each compute thread’s output to a distinct buffer row, and compares it against an identical isolated dispatch. There are no resources shared between the concurrently executing compute and pixel shaders. This is a rendering/compute correctness report; the exact internal cause is unknown.
Environment
| Component | Tested configuration |
|---|---|
| GPU | NVIDIA GeForce RTX 4090 |
| Current tested driver | GeForce 616.64; DXGI reports 32.0.16.1664 |
| Earlier tested driver | GeForce 610.88; DXGI reports 32.0.16.1088 |
| OS | Windows 11 Pro 25H2, build 26200.9278 |
| Hardware GPU scheduling | Configured on, registry HwSchMode=2; reproduced with both On/Off |
| API | D3D12, feature level 12_0, default queue flags and priorities |
| Shaders | DXC 1.8.2502.11, shader model 6.0, -O3 |
| Build | x64 Release, MSVC 19.51.36248.0, Windows SDK 10.0.26100.0 |
| Test date | 2026-09-09 |
Each raw log reports the driver queried by that process. Source and executable SHA-256 values are recorded in the accompanying environment.json files. The updated driver was also checked with nvidia-smi, which reported 616.64.
Reproduction
The report archive includes the tested executable and its DXC DLLs in bin/; it can be run directly with .\bin\async-compute-local-memory.exe --slices 20 after extracting the archive.
Build with CMake and an installed x64 Visual Studio C++ toolchain/Windows SDK:
cmake -S . -B build -A x64
cmake --build build --config Release
.\build\Release\async-compute-local-memory.exe --slices 20
The build copies the SDK’s dxcompiler.dll and dxil.dll beside the executable. No engine, assets, external shader files or third-party libraries are required. Keep the rendering window open. The process exits 2 when a comparison fails, 0 when all comparisons match, and 1 for a runtime or setup error. A closed window cancels the run with exit 3.
Then change only the graphics marker and run two controls:
.\build\Release\async-compute-local-memory.exe --slices 20 --tag 0x4B6B0000
.\build\Release\async-compute-local-memory.exe --slices 12 --quiesce
.\build\Release\async-compute-local-memory.exe --slices 12 --serial
Expected: the concurrent and isolated dispatches produce identical accumulator/integer-state words. The graphics marker is not an input to the compute shader and must not affect its output.
Actual: concurrent dispatches contain graphics-marker words in their accumulators. The isolated dispatches do not. The quiesced and serialized configurations matched in these trials.
Direct evidence of the graphics values appearing in compute output
These are actual observations from dispatch 0 of the two 616.64 runs:
| Graphics marker | Compute thread | Accumulator index | Concurrent result | Isolated result |
|---|---|---|---|---|
0x4A5A0000 |
589824 | 37 | 0x4A5A0007 |
0xBE5DF5F0 |
0x4B6B0000 |
589824 | 37 | 0x4B6B0007 |
0xBE5DF5F0 |
The pixel shader stores asfloat(tag | (payload & 0xFFFF)) in its private array. Payloads come from pixel coordinates, frame number or pass number. The tag is bound through the graphics root signature only. The compute shader receives only its thread base, thread count and iteration count, plus its own UAVs. All shader fingerprints are identical between these two runs.
In the default run, all 1,919,426 differing accumulator words had the default marker in their upper 16 bits. With the alternative marker, all 1,963,628 differing accumulator words had the alternative marker. Neither isolated-control run had any accumulator word with its run’s marker. These marker totals check the upper 16 bits; the full-word examples above show payloads.
Results on 616.64
Unless listed otherwise, each dispatch has 1,048,576 threads, 20,000 iterations per thread, 64 accumulator floats and eight integer-state words. The render size is 1280x720, with four passes alternating 64- and 2048-element pixel arrays. Each tested dispatch has its own identical isolated control. Counts below are thread instances summed across the indicated dispatches.
| Configuration | Bad / tested dispatches | Differing threads | Marker words in differing accumulators |
|---|---|---|---|
| Default | 20 / 20 | 546,285 | 1,919,426 |
--tag 0x4B6B0000 |
20 / 20 | 563,787 | 1,963,628 |
--quiesce |
0 / 12 | 0 | 0 |
--serial |
0 / 12 | 0 | 0 |
--second-direct |
0 / 12 | 0 | 0 |
--same-size (64 elements) |
0 / 12 | 0 | 0 |
--same-size --lmem-a 2048 |
12 / 12 | 932,584 | 3,940,341 |
--lmem-b 256 |
0 / 12 | 0 | 0 |
--passes 1 (64 elements) |
0 / 12 | 0 | 0 |
--passes 1 --lmem-a 2048 |
12 / 12 | 561,470 | 1,768,186 |
--acc 4 |
0 / 12 | 0 | 0 |
--state 1 (groupshared) |
0 / 12 | 0 | 0 |
--state 2 (explicit UAV) |
0 / 12 | 0 | 0 |
REPRO_DEBUG=1 |
4 / 4 | 96,001 | 337,537 |
The integer-state words and checked thread headers matched throughout this matrix. The control accumulators had zero marker matches. The debug run reported zero errors, zero warnings and zero discarded messages. GPU-based validation was not enabled.
The full results directory contains every log, the exact arguments in results.json, compiled DXIL and readable DXIL listings. The test script also passed six small configurations covering partial thread groups, one- and seven-element arrays and all three compute storage modes, plus 18 invalid-argument cases and the help check.
Earlier driver and reproducer checks
On 610.88, the first hardened build failed in 20/20 default dispatches (669,964 differing threads) and 20/20 alternative-marker dispatches (661,043 differing threads). Its queue and alternate compute-storage controls were clean in 12 trials each. The large, same-size case failed in 12/12. Those logs are preserved separately.
Before adding markers and expanded output, the original program failed in 4/4 dispatches (15,498 differing threads). Changing only the pixel shader to initialize both read locations still failed in 4/4 (21,888 differing threads). Thus the original uninitialized reads were not required for reproduction. Those intermediate logs are in results/preliminary/.
After the driver update, the same first hardened binary failed in 4/4 on 616.64 (147,817 differing threads). The final build additionally requests COMMON as the initial state for default-heap buffers, removing warning 1328 about the runtime ignoring an initial UAV state. This host-side change did not change any compiled shader. The 616.64 matrix above uses that final build.
Interpretation and scope
The controlled marker substitution strongly connects the incorrect compute values to values written by the concurrent pixel shader. The storage controls and retained DXIL arrays make private shader-state handling a useful starting point for investigation. Native shader assembly and driver allocation/state tracking have not been inspected, so this report does not assign the defect to a particular allocation, cache operation or hardware unit.
The one-pass large-array case demonstrates that changing shaders or changing their private-array size between draws is not necessary. Conversely, the clean smaller-array trials do not establish a universal size threshold. Queue and storage changes also affect timing and scheduling, and their clean results should not be interpreted as guarantees on other workloads or hardware.
The recorded first-failure wave examples often affect only one lane at the selected word. They do not support the original claim that each event replaces one complete 128-byte line. DXIL retains the arrays even for --acc 4, so native register placement is not asserted for that control. Earlier reports of reproduction with hardware GPU scheduling disabled were not repeated here.
Please investigate this incorrect-output case on RTX 4090 and confirm whether a driver fix or a recommended workaround is available. Draining graphics before dispatch, or serializing the dispatch on the rendering queue, avoided the error in the attached tests.