feat(agc): implement deferred faults for descriptors read through null SRT pointers #1292
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1292"
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 Celegans12 on 2026-10-07T22:37:34Z.
What
Stacked on #759; please review the last commit only.
A capture evaluates every V#, T# and S# a shader uses, even behind a branch the wave won't take. If one is loaded through a null or unmapped pointer read from memory, the capture throws (
null or misaligned address,guest memory is not readable), while the console only faults when a wave runs thats_load. #759 covers only flat SRT reads.EvaluateRuntimeSourcesImpl, a descriptor dword read that #759 would record makes the whole descriptor zero; the flat walk records thes_load's dwords as before. If no record names that read, it still throws.ReadConstfaults at thes_load's pc. Onmaina zero V# is an absent buffer, a zero T# a null descriptor and a zero S# a valid sampler, so a zeroed descriptor binds and specializes like zeros read from memory: no new key.*(SRT + 0x98)only ifs_buffer_load_dword ..., 0x120is nonzero; the pointer is null in the skipped draws.EvaluateRuntimeSourcesImpl.Tested
main1be6f9f1with #759: configure-DBUILD_TESTING=ON, full build,--target libs,ctest:ctest --output-on-failure)VK_DRIVER_FILES): 485/485 pass;agc_driver_flat_storeis left out there because it takes several minutes on Windows llvmpipeagc_driver_guarded_null_pointer: a V# loaded through a pointer behind an SCC branch reads its payload when mapped, faults at thes_load's pc and address when null or unmapped and taken, and doesn't fault when skipped; a zero V# from memory and a zeroed one share one pipeline variant.agc_shader_memory: a compute V# through a null or unmapped pointer and a vertex V# through a null one get four records and zero words, with the variant, specialization and module of a zero V# from memory. Both tests fail on #759 alone.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-09T22:48:24Z.
Checked on a build merged onto current
main: full ctest green (552/552);agc_shader_memoryandagc_driver_guarded_null_pointerfail with the change reverted; CI green on this head. TechnicalDebt lines match the new behaviour. Merging.