docs(debt): record that an image load misses the same shader's stores to the T# #22719
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/22719"
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 MichonGoddijn231849 on 2026-11-18T05:06:28Z.
What
A debt entry records that an
image_loadof a T# that the same shader also stores to does not see the shader's own stores.ResourceTracker'sImageKeyincludes the opcode's resource class. SoImageRead(classSampled) andImageWrite(classStorage) on the same descriptor source become two image resources with two bindings. The load then goes through the sampled path, either a view of the surface's cached storage image or a snapshot. Vulkan does not make that coherent with the dispatch's own storage writes, so a load after a store of the same texel can return the texel as it was before the dispatch. RDNA2 hardware returns the stored value.Only
docs/dev/debt/changes/docs-image-load-after-store-same-shader.mdis added; no code changes. A fix would read a written source through its storage binding. That changes the class of every read-write image and interacts with the store-only format paths (rawSintStorage,rawFloat16Storagerequire!read), so it belongs in its own PR.Measurement:
tools/hw-oraclewith thevulkanruntime andagc_oracle_runner. The program is a 2D 8×4 image pre-filled with 0xAB bytes; per laneimage_storeof four distinct dwords to texel (lane & 7, lane >> 3), thens_waitcnt vmcnt(0), thenimage_loadof the same texel, with and withoutglcon both:32_32_32_32_UINT(75)32_UINT(20)glcand noglc)0xabababab× 40xabababab0xababababA store-then-load sweep over every guest format the runner accepts gave the same split. NVIDIA differed on 19 to 32 of 32 lanes for every format. AMD differed for the one-channel formats and for 1 to 3 of 32 lanes of some two-channel ones, and matched for the four-channel formats.
Tested
Windows 11 Pro 10.0.26200, AnyPS5 at
main, on the two GPUs above. The fragment passestools/debt_fold.py --checkandtools/check_conventions.py. Not tested on a PS5.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code