AGC: cached address-draw reuse reads stale constants after a UnitShadow write #19350
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 lgqdaxia on 2026-11-13T05:04:42Z.
What happens
A draw that reuses a cached address space reads an old constant after newer GPU-written bytes have been recorded in a live UnitShadow:
a draw after a unit-shadow write read 40 instead of 210.Title, test or build step
agc_driver_address_draw_space_reuse_shadow_publish, a small GPU regression added to the existingAddressDrawSpaceReuse.cppfixture. It checks that the draw actually takes the cached-space reuse path before checking its output.AnyPS5 commit
maina6fbf9ce96, with only the test-only commit b670d70290dd. The production fix is the following, separate commit on that branch.System
Windows 11 Pro 10.0.26300; NVIDIA GeForce RTX 3080 Laptop GPU, driver 621.14; MinGW UCRT64 GCC 15.2.0, Release. Khronos validation layer 1.4.366.
Steps to reproduce
In a checkout with the pinned submodules initialized and the Windows build prerequisites available:
Set
VK_LAYER_PATHto the validation-layer installation if it is not registered with the loader.The fixture warms the draw cache with constant 40, writes constant 210 into a whole-unit GPU shadow, marks that shadow live, and draws again with the same address space. Expected: the draw reads 210. Actual on main: it reads 40. The CPU-overwrite control writes 90 after the shadow and expects 90; the fresh-build control disables address-draw reuse and expects 210.
Log
What was checked
With the same fixture and GPU, the fresh-build and CPU-overwrite controls pass on main. Publishing shadows before
RetakeSpacerefreshes its mirrors makes all 8 related tests pass, including cache-off, transitions, verification and held-space cases. Both runs loaded the validation layer, skipped no tests and logged zeroVUID-errors.Fresh
UploadFinishalready callsStorageTexture::PublishShadowsOnlyover the address-space bounds.RetakeSpaceomits it, while space-only reuse skips the ordinary direct-region revalidation. A new UnitShadow need not change the allocation generation or import epoch, so those cache checks can still succeed with stale imported bytes.AI-assisted: yes