agc_driver_bda_device fails on NVIDIA Blackwell (RTX 5090, 621.01): read_bda_span gives the lanes on its dword path other lanes' results #22773
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by zarmstrong on 2026-11-18T08:27:27Z.
What happens
agc_driver_bda_devicefails on every run on NVIDIA Blackwell:AGC graphics: an anchored BDA read differs from the same read through the lookups at anchor 0x7fff12340101 + 0 + (0), 32 bits, 4 dwords. The wrong side is the plain lookup path,read_bda_span, not the anchored read: lanes that take its dword-by-dword path get other lanes' results.Title, test or build step
ctest
agc_driver_bda_deviceAnyPS5 commit
main72cf170a25, no pull requests on top. Also fails on9b60c84343.System
Windows 11 Pro 10.0.26200, NVIDIA GeForce RTX 5090 (
10de:2b85), driver 621.01, WinLibs GCC 15.2.0 r7, Release. Validation layer 1.4.363.Steps to reproduce
Stops after about 0.4 s.
Log
What was checked
72cf170a25, 10 of 10 on9b60c84343The validation layer is inserted in every run and reports no
VUID-lines. #21961 and #22441 list the same test failing onmainon an RTX 5080 (621.14). An RTX 4080 on 621.01 passed it on 2026-11-15 (#20870), so it looks specific to Blackwell.Which side is wrong. With a local print of every word that differs, the failing compare is the 64-lane
continuingprogram, read 3 (immediate 0, 32 bits, 4 dwords, all used). The anchorguest + 0x100is in the 16-byte range that maps to thewordsbuffer (bytes0xa0 + i). Lane 1 reads 16 bytes at anchor + 1, so its last byte, anchor + 16, is outside the range: the expected result isa4a3a2a1 a8a7a6a5 acabaaa9 00afaeadand an unmapped fault at0x7fff12340111. The anchored read returns exactly that. The plain read returns dword 0 correctly and 0 for dwords 1 to 3:("expected" is the plain lookup, "actual" the anchored read.) Lane 22 reads an unmapped address, yet its plain dwords 1 and 2 hold what lane 3 reads for its dwords 0 and 1, and lane 23 holds lane 4's, while lanes 1 to 4 get zeros. Which lanes differ changes between runs. The lanes that differ are the ones whose span is not mapped and aligned, so they take
read_bda_span's dword loop while the other lanes callload_bda_span.What changes it, 10 runs each on the RTX 5090:
APS5_BDA_BYTE_READS=1(no span read function)load_bda_spanwithoutDontInlineread_bda_spanwithoutDontInlineread_bda_dword_byteswithoutDontInlineOpVectorInsertDynamicreplaced by fourOpSelectsDontUnrollon the byte loop revertedload_bda_spancalled once before the selection, with a mask of 0 for the lanes that take the fallbackSo the fault needs
load_bda_spancalled out of line from one arm ofread_bda_span's per-lane selection while the other arm loops over calls toread_bda_dword_bytes. The module passes the validation layer's SPIR-V checks, so this looks like a driver bug. Real shaders reach the same function from every multi-dword BDA read with a probe (EmitBdaDwordReads,SpirvMemoryInstructions.cpp,SpirvRuntimeBuffer.cpp), so a wave in which some lanes cross a range end or an unaligned device address can return other lanes' data on Blackwell.Inlining
load_bda_spanis not a fix: it puts the loads back in the selection's arm, the shape that8c04efcfbcmoved out of line because it hung drivers 591.86 and 590.48.01 (#3291); the two-selection shape it tried next hung 595.x to 610.x (#4975). The last row keepsload_bda_spanout of line with its four loads and no call, and moves only its call out of the selection. I will open that as a PR, with a contract test inBdaContracts.cppfor the call's position; I can only test it on 621.01 here.AI-assisted: yes (Claude Code)