RADV: Bug in complex situation involving buffer-less MSAA, atomics, subgroups and buffer writes together.
AMD Radeon Vulkan (RADV) issue template
Description
This is quite complex, I am writing to a render pass with MSAA but without any attachment, and my writes are via atomic operations triggered by a subgroup operation to a storage buffer.
Neither AMD drivers (gpu and gpu pro) exhibit this bug, nor AMD drivers on Windows, or NVidia or Intel GPUs. This problem happens exclusively on RADV.
Screenshots/video files
The black squares should not be there, sounds like a bug in subgroups, atomic ops or some cache not being flushed. Tested on other GPUs and other machines and it's all the same with RADV.
Steps to reproduce
Run RenderDoc capture linked at the bottom.
System information
System: Kernel: 5.4.0-65-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Gnome 3.36.4 wm: gnome-shell dm: GDM3 Distro: Ubuntu 20.04.1 LTS (Focal Fossa) CPU: Topology: 8-Core model: AMD Ryzen 7 2700 bits: 64 type: MT MCP arch: Zen+ rev: 2 L2 cache: 4096 KiB flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 102388 Speed: 1380 MHz min/max: 1550/3200 MHz Core speeds (MHz): 1: 1456 2: 1406 3: 1414 4: 1409 5: 1403 6: 1387 7: 1539 8: 1545 9: 1407 10: 1510 11: 1390 12: 1508 13: 1516 14: 1550 15: 1407 16: 1526 Graphics: Device-1: AMD Tonga PRO [Radeon R9 285/380] vendor: XFX Pine driver: amdgpu v: kernel bus ID: 09:00.0 chip ID: 1002:6939 Display: x11 server: X.Org 1.20.9 driver: nvidia unloaded: fbdev,modesetting,nouveau,vesa compositor: gnome-shell resolution: 1920x1080~60Hz OpenGL: renderer: AMD Radeon R9 380 Series (TONGA DRM 3.35.0 5.4.0-65-generic LLVM 10.0.0) v: 4.6 Mesa 20.0.8 direct render: Yes
If applicable
X.Org X Server 1.20.9 X Protocol Version 11, Revision 0 Build Operating System: Linux 4.15.0-130-generic x86_64 Ubuntu
API captures (if applicable, optional)
https://cloud.tmm.cx/s/rMmbfKLAQLd9StQ/download?path=%2F&files=radv_bug.rdc.bz2
Further information (optional)
- Does the issue reproduce with the LLVM backend (
RADV_DEBUG=llvm
) or on the AMDGPU-PRO drivers?
No, issue is only RADV
- Does your environment set any of the variables
ACO_DEBUG
,RADV_DEBUG
, andRADV_PERFTEST
?
No
EDIT: Bug does not happen with RADV_PERFTEST=aco either.