RTX 4070: Linux Vulkan atomic add throughput (u32, random access) degrades above 1MiB buffer size

Atomic add throughput (u32, random access) on RTX 4070 is ~32G adds / s up to 16MiB buffer size except on Linux Vulkan, which degrades above 1MiB buffer size.

The graph is from a microbenchmark ( GitHub - Draradech/atomic_add · GitHub ) specifically made for this report. WGSL/wgpu/rust and CUDA/cpp.

Affected environments: Linux Vulkan, Proton Vulkan, Proton DX12

Unaffected environments: Linux CUDA, Windows CUDA, Windows Vulkan, Windows DX12

Every run that ends up on the Linux Vulkan driver path is affected (including DX12 via Proton).

The use case is a chaotic attractor renderer.
https://draradech.github.io/deJong/ (javascript/webgpu)
GitHub - Draradech/deJong at rust · GitHub (rust/wgpu)

additional info:

Tested drivers:
Windows 565, 616.92
Linux 580, 595, 610.57.04, 615.71.09

OS: Linux Mint 22.3 “Zena”
Ubuntu base: noble / 24.04
Session: X11, Cinnamon

Kernel:
7.0.0-31-generic
#31~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC

GPU:
NVIDIA GeForce RTX 4070

Loaded NVIDIA driver:
610.57.04

Driver packages:
nvidia-driver-610-open 610.57.04-0ubuntu0.24.04.3
nvidia-dkms-610-open 610.57.04-0ubuntu0.24.04.3
nvidia-utils-610 610.57.04-0ubuntu0.24.04.3
libnvidia-gl-610 610.57.04-0ubuntu0.24.04.3

Vulkan driver:
NVIDIA proprietary driver 610.57.04
Vulkan API 1.4.341

Rust dependencies:
wgpu 30.0.0
naga 30.0.0

Benchmark commit:
17479c1

vulkaninfo.txt (4.0 KB)
nvidia-bug-report.log.gz (1.1 MB)

Workaround: attach VkMemoryDedicatedAllocateInfo to the memory allocation. The windows driver appears to have heuristics doing that automatically in some cases.

Note: the driver doesn’t advertise this in VkMemoryDedicatedRequirements:
buffer dedicated allocation: prefers=false, requires=false