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 blawesom on 2026-10-19T06:47:52Z.
What
agc_driver_image_table_vouched_lookupsfails onmainon RADV with:The zero counters suggest the cached dispatch never went through the vouch path at all on this device.
Bisect
23c201722("perf(agc): validate a cached draw or dispatch by its shared table block's vouch", the test's introducing commit): passes on this machine23629c284~1(before the #6454 merge): passes23629c284(Merge pull request #6454 "perf(agc): share one image table per heap and write epoch through capture, compare, resolution and descriptors"): fails — same assertion, deterministic (3/3 solo, cold shader cache,MESA_SHADER_CACHE_DISABLE=true)Environment
BUILD_TESTING=ONtests/agc_driver_image_table_cache_bounds_tests --vouched-lookups, ~0.5 sNot the Mesa tessellation bug (#5444) and not the BDA anchor regression (#7584) — this one is separate and newer. Not checked whether NVIDIA is affected.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-19T06:52:12Z.
I traced the zero vouch count to the guard in
Driver::validateVariant:VouchSharedRegionsis only called whenvariant.sharedis non-empty, vouch validation is enabled, legacy validation is off, andvariant.runs.size() == regions.size(). InsideVouchSharedRegions, entries are also skipped before the counter increments if their region span is invalid or the weak block has expired / has an empty range. Could you capture those values on the failing third dispatch (shared.size(),runs.size(),regions.size(), plus how many shared entries have a live non-empty block and valid region bounds)? That would distinguish missing shared metadata from the count guard or expired block case. The current counters alone do not identify which condition prevented the vouch path.Imported from boykopovar/AnyPS5. Originally posted by simonbbby on 2026-10-19T08:30:10Z.
@MarcZX10 I captured the requested values on the failing third dispatch, with a passing NVIDIA control.
Exact main
3fdd1f52e968c57d2b6890b11863f96aee0c11ce, Ubuntu 24.04, GCC 13.3, Release. RADV gfx1036 (Ryzen 9950X iGPU, Mesa 25.2.8) reproduces the same assertion; RTX 3090 / NVIDIA 595.99.02 passes. Built the realImageTableCacheBoundsexecution fixture, ran--vouched-lookupsin fresh processes withAPS5_WRITE_WATCH_IMPORTS=watch, shader caches and the pipeline journal disabled, and the corresponding ICD restricted. Loader logs verify the selected vendor/device.At
Driver::validateVariantforhit = dispatch(WideSlots[1]):variant.shared.size()variant.runs.size()regions.size()vouchedValidation()validateLegacy()The NVIDIA entry is
first=12, count=262144, offset=0, region=2, regions=32896. RADV has no entries, rather than entries whose weak blocks expired. The run/region count guard and enable/legacy settings agree, so they do not explain this failure.I also traced insertion of the variant used by that hit. On the second dispatch, both have 32899 captured regions, of which 32898 are SRT regions. RADV's
shaderMemory->SuppliedBlocks()is already empty andfresh->sharedremains empty. NVIDIA has one supplied block; 32896 SRT regions alias its words, andAppendSharedWordscreates the entry above. An entry log onShaderMemory::supplyWordsrecords no call on RADV before its failure; NVIDIA calls it on the second dispatch, passing the prechecks withpaged=falseandoverlapping=false.Thus the observed chain is missing supplied blocks at insertion → empty cached
sharedmetadata →VouchSharedRegionsskipped → zero vouch/refusal counters. It is upstream of the weak-block/range checks. I have not established why RADV bypasses the shared-supply callback, nor whether that omission is a correctness problem beyond the test's counter expectation.All logging was local only. I restored all four source files byte-for-byte, rebuilt, and repeated the uninstrumented test: RADV fails 3/3 with the original assertion; NVIDIA passes 3/3. The instrumented run had the same vendor split. Clean source checkout; no proposed fix, title run, Windows run, validation-layer or performance claim.
Imported from boykopovar/AnyPS5. Originally posted by root-over on 2026-10-19T09:08:23Z.
Also fails on an older AMD generation, so it is not specific to RDNA 4:
main6b8228b2b, AMD Ryzen 5 5625U iGPU (Vega, RADV RENOIR), Mesa 26.0.8, Ubuntu, GCC 15.2.0, Release. Same message,(0 vouched, 0 refused, 0 columns read, 0 reused), 3/3. The same build passes with lavapipe on the same machine (VK_DRIVER_FILES=.../lvp_icd.json).Imported from boykopovar/AnyPS5. Originally posted by DavidAmsellem on 2026-10-19T13:49:57Z.
Following @simonbbby's trace one step further: I found why RADV never calls
supplyWords. It is the write watch on the host-imported test block, not the vouch path.main5eba12d6b, AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release. Local logging only; tree restored afterwards, and the test still fails 3/3 undercteston the clean tree.Chain
supplyWordsis only reached fromResourceMaterializer::Unwritten(), afterruntime.unchangedSince(...)succeeds. On the second dispatch (samectestenvironment,APS5_WRITE_WATCH_IMPORTS=watch):stampWriteson the wide table (first dispatch)+0x210000covering the tableShaderMemory::Vouchedon the table (second dispatch)UnchangedSince= falseUnchangedSince= truesupplyWordspaged=0 overlapping=0reused.compared)reused.unwritten)That is why the second assertion still passes on RADV (
reused == 1counts both paths), and why the third dispatch then hasshared.size() == 0and zero vouch counters.No unstamped store and no
MarkWrittentouches the table's 64 KiB blocks in that window. The onlyMarkWrittenis the kernel's output page, in a different block. The generation moves through the dirty-page collect.Cause
The driver's own probe already says this, but the test bypasses it. Without the variable, on this machine:
On lavapipe it is
0 of 4 … after a GPU read, 4 after a GPU write, 0 after the import. On RADV, importing a host pointer and reading it from the GPU both resolve the write protection, so a watched imported range looks CPU-written. The test forcesAPS5_WRITE_WATCH_IMPORTS=watch, which keeps trusting the watch on a device where the probe would unwatch it, so the vouch is right to refuse.Two checks:
Dispatch(block, 0)over the narrow table at the start ofVouchedLookups) does not help. The stamp then lands after the import (generation 44), and the GPU read in the wide dispatch alone moves the range to 47 withUnchangedSince= false. The GPU read is enough by itself.GuestArenaon Linux too, as on Windows, does not change anything. It is still private memory, so it is still a host pointer import.APS5_WRITE_WATCH_IMPORTSwatch(thectestsetting)probe)So the test only holds on devices whose host imports keep write protection through a GPU read. That also fits @root-over's Vega result and the NVIDIA pass. The dma-buf probe on the same RADV machine reports
keep write protection: yes, so this looks specific to host pointer imports of private memory.Possible fix (test only)
Instead of forcing
watch, ask the device:PrepareImportWatchreturnsImportWatch::Unwatchhere, and other tests already branch on it. Skip with 77 when imported ranges are compared, or back the block with memory that goes through the dma-buf import. I have not changed the driver. I can't say whether real titles are affected, since their guest memory normally takes the dma-buf path.On the bisect: on this machine the test already failed at its introducing commit
23c201722(3/3, earlier today), unlike @blawesom's result. That is consistent with this cause, which depends on the device rather than on #6454.GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38; lavapipe (LLVM 20.1.2) as control.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-19T16:48:16Z.
An AMD proprietary driver data point: on
maindbac9fa15(which contains23629c284),agc_driver_image_table_vouched_lookupspasses 3 of 3 undercteston an RX 6700 XT (gfx1031, RDNA 2), AMD's Windows driver 32.0.21045.5002, Windows 11 26200, withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1and the test's ownAPS5_WRITE_WATCH_IMPORTS=watch.This doesn't separate RADV from Linux: if the cause is the write watch on the host-imported block, as @DavidAmsellem found, Windows takes a different write-watch path. I didn't capture
shared.size()here.