Repository navigation
feat(agc): implement deferred faults for reads through null SRT pointers - #759
Conversation
55640cf to
4303b6f
Compare
4303b6f to
ccec334
Compare
ccec334 to
06645dd
Compare
06645dd to
f40fed6
Compare
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
|
Thanks for the RADV run, it's good to see 0x80003aa700 get through on AMD too. The conflict with |
Capturing a shader threw "null or misaligned address" when the flat SRT walk read through a pointer loaded from memory that is null or unmapped, even when the program skips that s_load. Such a read now yields zero and a record with its pc and address, as does a slot whose address needs it. The registered artifact checks one flag word per guarded slot at each ReadConst; the capture appends the flags and the records to the flattened SRT, and a set flag raises an Unmapped BDA fault through the fault buffer and stops the invocation as a BDA read does. Nothing per capture enters a key: poisoned and clean captures share one variant and specialization. Descriptors, branch conditions, uniform fills, table bases and user-data pointers that need such a value still throw, and poisoned results stay out of the dispatch and draw caches. The shader disk cache format becomes 21.
6fb7f68 to
56f8a62
Compare
|
I've rebuilt this as a pure runtime check, following boykopovar's guidance. It now sits directly on At registration, every flat SRT slot that can depend on a read through a pointer loaded from memory gets a guard: its oneandonlydean mentioned this is the next fix Astro Bot needs. I haven't run Astro Bot on the new head myself, so a run from someone with the title would be very welcome. Otherwise it's ready for review. Details
|
|
Astro Bot (PPSA21567, retail) run on the new head 56f8a62. No regression from this PR, but the run doesn't reach its code yet. Setup: RX 9070 XT (RDNA4), RADV / Mesa 26.2.4, Linux 7.2.9. Scripted input, headless gamescope, from boot. All stacks are on
Tested and written by Claude (AI assistant) on a contributor's machine. |
|
Astro Bot (PPSA21567) now reaches this PR's code, and it gets past the stop. Tested on head 56f8a62, Linux, RX 9070 XT (RADV), scripted and headless. Base:
No frame is presented yet in these runs. Tested and written by Claude (AI assistant) on a contributor's machine. |
What
Capturing a shader throws
AGC driver: null or misaligned addresswhen the flat SRT walk reads through a pointer loaded from memory that is null or unmapped, even if the program skips thats_load; the console faults only when a wave runs it. Following boykopovar's guidance, this is a pure runtime check: shaders still compile at registration and nothing per capture enters a key.ReadConstof a flat slot that can depend on such a read (ComputeGuardedFlatSlots) checks a flag word in the flattened SRT. A set flag raises anUnmappedBDA fault with the recorded pc and address and stops the invocation like an unmapped BDA read. These programs get the fault buffer (ShaderInfo::usesFaultBuffer).SrtRuntime::accessible) is not made; the slot reads 0 and the capture appends the flags and{pc, address}records.s_cbranch_execz.EvaluateRawReadandEvaluateRuntimeSourcesImpl.Tested
main1be6f9f: 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(GPU): skipped null reads (SCC branch,s_cbranch_execz) don't fault; executed ones fault at their pc and address, even with one lane or an empty EXEC; all runs of a program share one pipeline variant.agc_shader_memory: null, unmapped and chained records, one variant, specialization and module for poisoned and clean captures, replay, and the remaining throws. Neither test builds onmain; both pass with-DANYPS5_ENABLE_SPIRV_TOOLS=ON.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)