perf(shader): name a poisoned guarded SRT read in the fault buffer #6785

Merged
milescoviello merged 2 commits from upstream-pr/6785 into main 2026-10-20 21:00:29 +00:00
milescoviello commented 2026-10-16 11:46:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-16T11:46:43Z.


What

A ReadConst of a guarded flattened-SRT slot (#759) loads the slot's flag and, when it is set, calls record_bda_fault with the poison record's pc and address, then stops the invocation. Each of those calls is expensive for NVIDIA's compiler in a large module. Crimson Desert (PPSA25286) creates compute pipelines from modules of up to 1.9 million SPIR-V words, and every one I captured has guarded reads. The largest has 2,769 of them (679 guards), and its pipeline takes about 104 s and 5.65 GiB of host memory to create. That compile is where my 16 GiB runs of the title ended: at 643 s the process held 11,237 MiB of anonymous memory and 5,114 MiB of guest memory when the cap killed it.

I tried other shapes of the same check on that module (capture replay, vkCreateComputePipelines time / peak RSS of the replay):

Fault site Time Peak
main: call record_bda_fault(reason, address, bytes, pc) 104 s 5.65 GiB
call a one-argument DontInline helper that loads the record itself 99 s 5.66 GiB
record_bda_fault with an empty body (calls kept) 88 s 5.12 GiB
inline the record (compare-exchange and stores) at each site, mine or the driver's without DontInline still compiling at 104 and 127 s, stopped
keep the record in Private variables, or return it from a guest function, and record once in main still compiling at 118 to 283 s, stopped
one plain store to a fault-buffer word 73 s 3.12 GiB
(no check at all, for reference) 45 s 2.35 GiB

The cost is the call sites, not the record's body or arguments. For the write itself, an OpAtomicStore takes 73.9 s / 3.12 GiB, the same as the plain store; an OpAtomicCompareExchange takes 81.2 s / 3.62 GiB and an OpAtomicUMax 82.2 s / 3.59 GiB. Folding the checks away when a capture has no poison would be cheapest, but #759 keeps poisoned and clean captures on one variant, specialization and pipeline, so this PR keeps that.

How

  • A poisoned guarded read writes its record's flattened-SRT word, with the stage in the top 8 bits, to a new fault-buffer word (BdaAbi::SrtGuardWord, after the written-page list) with a relaxed device-scope OpAtomicStore, and stops as before. There is no call.
  • ShaderResources keeps the flattened SRT of each stage with poisoned reads. When that word is set, BdaResources::CheckFault reads the pc and address from it and throws the same BDA access failed: address=… instruction=… bytes=4 stage=… reason=1.
  • Poisoned and clean captures still share one variant, specialization and pipeline. The existing fault-buffer words keep their offsets, and the host still reads record_bda_fault's record, so modules cached before this change keep working.
  • One difference: when several invocations of a dispatch fault through different guards, the report is the record last in the word's modification order rather than the first to compare-exchange the fault record. A fault recorded through record_bda_fault in the same dispatch is reported first. Either way the dispatch throws an Unmapped fault for a poisoned read that ran, with that read's own pc and address. MarcZX100 pointed out that my first version used a plain store, which is a data race.

Tested

Linux (Ubuntu 24.04, GCC 13.3, Release), RTX 4070 Ti, NVIDIA 595.99.

  • agc_shader_memory: the guarded-pointer case now also requires each guarded read's site to store to the guard word once and not call record_bda_fault (one guard for the branch program, three for the pointer chain). With main's emitter it fails 3 of 3: a guarded read calls record_bda_fault 1 times in main and stores its record to the fault buffer's guard word 0 times. With this change it passes 3 of 3.
  • agc_driver_guarded_null_pointer (GPU), which checks the faults' pc, address and reason, and that skipped reads don't fault: passes 3 of 3 with ANYPS5_NO_SHADER_CACHE=1. It now also dispatches two workgroups, one reading through a null pointer (pc 0x2c) and one through an unmapped one (pc 0x38). The reported fault must be exactly one of the two records, with its own pc and address; here it was the unmapped one in 10 of 10 runs.
  • ctest (^agc_driver_|^agc_vertex_barrier|recompiler|shader_cache|request_serializer|spirv|^agc_shader|bda|journal, 501 tests, ANYPS5_ENABLE_SPIRV_TOOLS=ON), rebased onto main eb901bcf4: 499 pass. agc_driver_store_over_untracked fails the same way on main (#6385 addresses it), and so does agc_driver_graphics in a case #5804 added (#6789 fixes it).

Crimson Desert (PPSA25286, 01.000.568), 900 s limit, 16 GiB cap, scripted pad input. On main the title stops 14 s in, on the refusal #6612 removes, so both runs use my test stack: #6612, #6613, #6706, #6708, #6748 and #6178. They differ only in this change.

Without this change With it (two runs)
Module A pipeline 1,378,667 words, 33.2 s 1,356,247 words, 20.0 s
Module B pipeline 1,835,715 words, 87.3 s 1,686,049 words, 62.1 / 61.7 s
Module C pipeline 1,916,980 words, killed during it 1,759,155 words, 69.6 / 70.5 s
End the 16 GiB cap at 643 s, after 18 draws (anonymous memory 11,237 MiB) an unrelated stop at 603 / 593 s, after 26 draws

Anonymous memory peaked at 8,927 MiB during module C's compile. The later stop is a compute shader's DIM 2D image_store to a cube T#, which I'll take up separately. With the three modules captured from these runs, replaying vkCreateComputePipelines alone (3 runs each, the replay's peak RSS):

Module Without this change With it
A 32.2–32.8 s, 1.58 GiB 20.0 s, 1.26 GiB
B 89.4–89.7 s, 4.34 GiB 63.9–64.5 s, 2.75 GiB
C 103.6–103.9 s, 5.65 GiB 72.3–72.5 s, 2.96 GiB

These runs and replays were made with the plain store of 38a04fd69. On the prototype of module C, the atomic store costs the same (73.9 s against 73 s).

Validated on Windows 11 with an AMD Radeon 860M (RDNA 3.5, driver 32.0.13058.8001) by @LeandroLP23 (comment), in one build of main 6efb7261b with this head and 13 other pull requests: agc_driver_graphics, agc_driver_guarded_null_pointer, agc_driver_store_over_untracked and agc_shader_memory pass 3 runs of 3. 713 of 716 agc_* tests pass; the 3 that fail fail the same way on main there.

Not checked on a console.

Title capture

As the perf label asks, these are captures of one title and scene on one machine. MXGP26 (PPSA30839) ran from boot with APS5_TRACE_SECONDS=0:60, ANYPS5_NO_SHADER_CACHE=1 and a fresh run directory (cold AnyPS5 and NVIDIA caches), so the shaders compile inside the window. NVIDIA RTX 4070 Ti (595.99.02), Ubuntu 24.04, release libs, Xvfb display, no input. main dbac9fa15b was captured five times: before the PR captures, after them, and three more times in a row after that. Each PR capture and the first two main captures followed a rebuild of the release libraries; the last three main captures did not, and they came out lower. The change is main with this PR merged on top as a local merge commit (a97e59c0c062). The time is the wall time of the Shader.PrepareArtifact slices on the shader prepare threads in each trace.

capture presents frame p50 / p90 artifacts prepared prepare time, total per artifact, mean / median
main 1 194 16.7 / 32.8 ms 935 87.3 s 93.4 / 27.7 ms
main 2 195 16.7 / 34.0 ms 956 91.4 s 95.6 / 29.6 ms
main 3 166 16.7 / 28.4 ms 961 82.1 s 85.4 / 27.3 ms
main 4 161 16.7 / 27.9 ms 946 77.6 s 82.1 / 24.7 ms
main 5 183 16.7 / 22.7 ms 939 78.4 s 83.5 / 22.8 ms
this PR 171 16.7 / 30.7 ms 949 97.5 s 102.7 / 28.4 ms

The five main captures span 17.7% in total prepare time, and the 13 prepare threads run in parallel with the title, so a title capture can't resolve a recompiler change of a few percent. The replay measurement above is this change's measurement. This PR's capture is above all five main captures in total prepare time. With one capture of the change I can't tell that apart from noise, and the replay measurement above points the other way. I can repeat the capture if that would help.

main 1 trace, digest, main 2 trace, digest, main 3 trace, digest, main 4 trace, digest, main 5 trace, digest, this PR trace, digest

{"commit":"dbac9fa15b61","dirty":false,"env":{"APS5_TRACE_SECONDS":"0:60"},"gpu":"NVIDIA GeForce RTX 4070 Ti","driver":"NVIDIA 595.99.02","os":"Linux 6.8.0-147-generic","resolution":"3840x2160","window":{"spec":"seconds 0:60","first_present":0,"ms":120148.301},"presents":194,"frame_ms":{"p50":16.686,"p90":32.765,"p99":2921.590,"max":112847.624},"gpu_busy_ms_per_present":6.483,"worker_busy_pct":{"queue worker 0x0":88.481,"queue worker 0x20":73.127},"top_phases_ms_per_frame":{"Driver.Packet":1000.862,"Driver.Packet.dispatch":503.561,"Driver.Dispatch":503.451,"Shader.PrepareArtifact":450.125,"Driver.Packet.memory_wait":424.003,"Vulkan.GraphicsPipeline":132.519,"Vulkan.GraphicsPipelineLibrary":126.497,"Vulkan.GraphicsPipelinePrebuild":77.312},"trace_dropped":false,"trace":"aps5-trace-dbac9fa15b61-3.json.gz"}
{"commit":"a97e59c0c062","dirty":false,"env":{"APS5_TRACE_SECONDS":"0:60"},"gpu":"NVIDIA GeForce RTX 4070 Ti","driver":"NVIDIA 595.99.02","os":"Linux 6.8.0-147-generic","resolution":"3840x2160","window":{"spec":"seconds 0:60","first_present":0,"ms":116676.419},"presents":171,"frame_ms":{"p50":16.688,"p90":30.749,"p99":1896.658,"max":110772.656},"gpu_busy_ms_per_present":4.641,"worker_busy_pct":{"queue worker 0x0":88.436,"queue worker 0x20":72.015},"top_phases_ms_per_frame":{"Driver.Packet":1094.783,"Shader.PrepareArtifact":569.992,"Driver.Packet.dispatch":556.118,"Driver.Dispatch":556.049,"Driver.Packet.memory_wait":458.826,"Vulkan.GraphicsPipeline":141.434,"Vulkan.GraphicsPipelineLibrary":134.980,"Vulkan.GraphicsPipelinePrebuild":80.718},"trace_dropped":false,"trace":"aps5-trace-a97e59c0c062-3.json.gz"}
  • Khronos validation layer (LunarG SDK 1.4.363), NVIDIA RTX 4070 Ti (595.99.02), Ubuntu 24.04: VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ctest -R '^agc_' -V on main e2a2914aa1 and on main + this PR (c76299f217, a local merge). main: 815 of 815 pass; with this PR: 815 of 815 pass. Neither log reports the layer missing. VUIDs on main: VUID-VkImageViewCreateInfo-usage-02275 ×6, VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 ×18, VUID-vkCmdCopyBuffer-srcBuffer-00118 ×2, VUID-vkCmdDraw-multisampledRenderToSingleSampled-07285 ×2, VUID-vkCmdWaitEvents-srcStageMask-01158 ×2, VUID-vkSetEvent-event-09543 ×2; with this PR: VUID-VkImageViewCreateInfo-usage-02275 ×6, VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 ×18, VUID-vkCmdCopyBuffer-srcBuffer-00118 ×2, VUID-vkCmdDraw-multisampledRenderToSingleSampled-07285 ×2, VUID-vkCmdWaitEvents-srcStageMask-01158 ×2, VUID-vkSetEvent-event-09543 ×2. None is new with this PR.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 595.99, Ubuntu 24.04; AMD Radeon 860M, driver 32.0.13058.8001, Windows 11 (tests, by @LeandroLP23)
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4887903306 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6785). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-16T11:46:43Z. --- ### What A `ReadConst` of a guarded flattened-SRT slot (#759) loads the slot's flag and, when it is set, calls `record_bda_fault` with the poison record's pc and address, then stops the invocation. Each of those calls is expensive for NVIDIA's compiler in a large module. Crimson Desert (PPSA25286) creates compute pipelines from modules of up to 1.9 million SPIR-V words, and every one I captured has guarded reads. The largest has 2,769 of them (679 guards), and its pipeline takes about 104 s and 5.65 GiB of host memory to create. That compile is where my 16 GiB runs of the title ended: at 643 s the process held 11,237 MiB of anonymous memory and 5,114 MiB of guest memory when the cap killed it. I tried other shapes of the same check on that module (capture replay, `vkCreateComputePipelines` time / peak RSS of the replay): | Fault site | Time | Peak | |---|---|---| | `main`: call `record_bda_fault(reason, address, bytes, pc)` | 104 s | 5.65 GiB | | call a one-argument `DontInline` helper that loads the record itself | 99 s | 5.66 GiB | | `record_bda_fault` with an empty body (calls kept) | 88 s | 5.12 GiB | | inline the record (compare-exchange and stores) at each site, mine or the driver's without `DontInline` | still compiling at 104 and 127 s, stopped | | | keep the record in Private variables, or return it from a guest function, and record once in `main` | still compiling at 118 to 283 s, stopped | | | one plain store to a fault-buffer word | 73 s | 3.12 GiB | | (no check at all, for reference) | 45 s | 2.35 GiB | The cost is the call sites, not the record's body or arguments. For the write itself, an `OpAtomicStore` takes 73.9 s / 3.12 GiB, the same as the plain store; an `OpAtomicCompareExchange` takes 81.2 s / 3.62 GiB and an `OpAtomicUMax` 82.2 s / 3.59 GiB. Folding the checks away when a capture has no poison would be cheapest, but #759 keeps poisoned and clean captures on one variant, specialization and pipeline, so this PR keeps that. ### How - A poisoned guarded read writes its record's flattened-SRT word, with the stage in the top 8 bits, to a new fault-buffer word (`BdaAbi::SrtGuardWord`, after the written-page list) with a relaxed device-scope `OpAtomicStore`, and stops as before. There is no call. - `ShaderResources` keeps the flattened SRT of each stage with poisoned reads. When that word is set, `BdaResources::CheckFault` reads the pc and address from it and throws the same `BDA access failed: address=… instruction=… bytes=4 stage=… reason=1`. - Poisoned and clean captures still share one variant, specialization and pipeline. The existing fault-buffer words keep their offsets, and the host still reads `record_bda_fault`'s record, so modules cached before this change keep working. - One difference: when several invocations of a dispatch fault through different guards, the report is the record last in the word's modification order rather than the first to compare-exchange the fault record. A fault recorded through `record_bda_fault` in the same dispatch is reported first. Either way the dispatch throws an Unmapped fault for a poisoned read that ran, with that read's own pc and address. MarcZX100 [pointed out](https://github.com/boykopovar/AnyPS5/pull/6785#pullrequestreview-5547353782) that my first version used a plain store, which is a data race. ### Tested Linux (Ubuntu 24.04, GCC 13.3, Release), RTX 4070 Ti, NVIDIA 595.99. - `agc_shader_memory`: the guarded-pointer case now also requires each guarded read's site to store to the guard word once and not call `record_bda_fault` (one guard for the branch program, three for the pointer chain). With `main`'s emitter it fails 3 of 3: `a guarded read calls record_bda_fault 1 times in main and stores its record to the fault buffer's guard word 0 times`. With this change it passes 3 of 3. - `agc_driver_guarded_null_pointer` (GPU), which checks the faults' pc, address and reason, and that skipped reads don't fault: passes 3 of 3 with `ANYPS5_NO_SHADER_CACHE=1`. It now also dispatches two workgroups, one reading through a null pointer (pc 0x2c) and one through an unmapped one (pc 0x38). The reported fault must be exactly one of the two records, with its own pc and address; here it was the unmapped one in 10 of 10 runs. - ctest (`^agc_driver_|^agc_vertex_barrier|recompiler|shader_cache|request_serializer|spirv|^agc_shader|bda|journal`, 501 tests, `ANYPS5_ENABLE_SPIRV_TOOLS=ON`), rebased onto `main` eb901bcf4: 499 pass. `agc_driver_store_over_untracked` fails the same way on `main` (#6385 addresses it), and so does `agc_driver_graphics` in a case #5804 added (#6789 fixes it). Crimson Desert (PPSA25286, 01.000.568), 900 s limit, 16 GiB cap, scripted pad input. On `main` the title stops 14 s in, on the refusal #6612 removes, so both runs use my test stack: #6612, #6613, #6706, #6708, #6748 and #6178. They differ only in this change. | | Without this change | With it (two runs) | |---|---|---| | Module A pipeline | 1,378,667 words, 33.2 s | 1,356,247 words, 20.0 s | | Module B pipeline | 1,835,715 words, 87.3 s | 1,686,049 words, 62.1 / 61.7 s | | Module C pipeline | 1,916,980 words, killed during it | 1,759,155 words, 69.6 / 70.5 s | | End | the 16 GiB cap at 643 s, after 18 draws (anonymous memory 11,237 MiB) | an unrelated stop at 603 / 593 s, after 26 draws | Anonymous memory peaked at 8,927 MiB during module C's compile. The later stop is a compute shader's DIM 2D `image_store` to a cube T#, which I'll take up separately. With the three modules captured from these runs, replaying `vkCreateComputePipelines` alone (3 runs each, the replay's peak RSS): | Module | Without this change | With it | |---|---|---| | A | 32.2–32.8 s, 1.58 GiB | 20.0 s, 1.26 GiB | | B | 89.4–89.7 s, 4.34 GiB | 63.9–64.5 s, 2.75 GiB | | C | 103.6–103.9 s, 5.65 GiB | 72.3–72.5 s, 2.96 GiB | These runs and replays were made with the plain store of 38a04fd69. On the prototype of module C, the atomic store costs the same (73.9 s against 73 s). Validated on Windows 11 with an AMD Radeon 860M (RDNA 3.5, driver 32.0.13058.8001) by @LeandroLP23 ([comment](https://github.com/boykopovar/AnyPS5/pull/6785#issuecomment-6252345022)), in one build of `main` 6efb7261b with this head and 13 other pull requests: `agc_driver_graphics`, `agc_driver_guarded_null_pointer`, `agc_driver_store_over_untracked` and `agc_shader_memory` pass 3 runs of 3. 713 of 716 `agc_*` tests pass; the 3 that fail fail the same way on `main` there. Not checked on a console. ### Title capture As the `perf` label asks, these are captures of one title and scene on one machine. MXGP26 (PPSA30839) ran from boot with `APS5_TRACE_SECONDS=0:60`, `ANYPS5_NO_SHADER_CACHE=1` and a fresh run directory (cold AnyPS5 and NVIDIA caches), so the shaders compile inside the window. NVIDIA RTX 4070 Ti (595.99.02), Ubuntu 24.04, release libs, Xvfb display, no input. `main` dbac9fa15b61 was captured five times: before the PR captures, after them, and three more times in a row after that. Each PR capture and the first two `main` captures followed a rebuild of the release libraries; the last three `main` captures did not, and they came out lower. The change is `main` with this PR merged on top as a local merge commit (a97e59c0c062). The time is the wall time of the `Shader.PrepareArtifact` slices on the `shader prepare` threads in each trace. | capture | presents | frame p50 / p90 | artifacts prepared | prepare time, total | per artifact, mean / median | |---|---:|---:|---:|---:|---:| | `main` 1 | 194 | 16.7 / 32.8 ms | 935 | 87.3 s | 93.4 / 27.7 ms | | `main` 2 | 195 | 16.7 / 34.0 ms | 956 | 91.4 s | 95.6 / 29.6 ms | | `main` 3 | 166 | 16.7 / 28.4 ms | 961 | 82.1 s | 85.4 / 27.3 ms | | `main` 4 | 161 | 16.7 / 27.9 ms | 946 | 77.6 s | 82.1 / 24.7 ms | | `main` 5 | 183 | 16.7 / 22.7 ms | 939 | 78.4 s | 83.5 / 22.8 ms | | this PR | 171 | 16.7 / 30.7 ms | 949 | 97.5 s | 102.7 / 28.4 ms | The five `main` captures span 17.7% in total prepare time, and the 13 prepare threads run in parallel with the title, so a title capture can't resolve a recompiler change of a few percent. The replay measurement above is this change's measurement. This PR's capture is above all five `main` captures in total prepare time. With one capture of the change I can't tell that apart from noise, and the replay measurement above points the other way. I can repeat the capture if that would help. [`main` 1 trace](https://github.com/milescoviello/AnyPS5/releases/download/perf-mxgp-2026-10-19/mxgp-main-aps5-trace-dbac9fa15b61-3.json.gz), [digest](https://github.com/milescoviello/AnyPS5/releases/download/perf-mxgp-2026-10-19/mxgp-main-digest.txt), [`main` 2 trace](https://github.com/milescoviello/AnyPS5/releases/download/perf-mxgp-2026-10-19/mxgp-main2-aps5-trace-dbac9fa15b61-3.json.gz), [digest](https://github.com/milescoviello/AnyPS5/releases/download/perf-mxgp-2026-10-19/mxgp-main2-digest.txt), [`main` 3 trace](https://github.com/milescoviello/AnyPS5/releases/download/perf-mxgp-2026-10-19/mxgp-main3-aps5-trace-dbac9fa15b61-3.json.gz), [digest](https://github.com/milescoviello/AnyPS5/releases/download/perf-mxgp-2026-10-19/mxgp-main3-digest.txt), [`main` 4 trace](https://github.com/milescoviello/AnyPS5/releases/download/perf-mxgp-2026-10-19/mxgp-main4-aps5-trace-dbac9fa15b61-3.json.gz), [digest](https://github.com/milescoviello/AnyPS5/releases/download/perf-mxgp-2026-10-19/mxgp-main4-digest.txt), [`main` 5 trace](https://github.com/milescoviello/AnyPS5/releases/download/perf-mxgp-2026-10-19/mxgp-main5-aps5-trace-dbac9fa15b61-3.json.gz), [digest](https://github.com/milescoviello/AnyPS5/releases/download/perf-mxgp-2026-10-19/mxgp-main5-digest.txt), [this PR trace](https://github.com/milescoviello/AnyPS5/releases/download/perf-mxgp-2026-10-19/mxgp-6785-aps5-trace-a97e59c0c062-3.json.gz), [digest](https://github.com/milescoviello/AnyPS5/releases/download/perf-mxgp-2026-10-19/mxgp-6785-digest.txt) ```json {"commit":"dbac9fa15b61","dirty":false,"env":{"APS5_TRACE_SECONDS":"0:60"},"gpu":"NVIDIA GeForce RTX 4070 Ti","driver":"NVIDIA 595.99.02","os":"Linux 6.8.0-147-generic","resolution":"3840x2160","window":{"spec":"seconds 0:60","first_present":0,"ms":120148.301},"presents":194,"frame_ms":{"p50":16.686,"p90":32.765,"p99":2921.590,"max":112847.624},"gpu_busy_ms_per_present":6.483,"worker_busy_pct":{"queue worker 0x0":88.481,"queue worker 0x20":73.127},"top_phases_ms_per_frame":{"Driver.Packet":1000.862,"Driver.Packet.dispatch":503.561,"Driver.Dispatch":503.451,"Shader.PrepareArtifact":450.125,"Driver.Packet.memory_wait":424.003,"Vulkan.GraphicsPipeline":132.519,"Vulkan.GraphicsPipelineLibrary":126.497,"Vulkan.GraphicsPipelinePrebuild":77.312},"trace_dropped":false,"trace":"aps5-trace-dbac9fa15b61-3.json.gz"} {"commit":"a97e59c0c062","dirty":false,"env":{"APS5_TRACE_SECONDS":"0:60"},"gpu":"NVIDIA GeForce RTX 4070 Ti","driver":"NVIDIA 595.99.02","os":"Linux 6.8.0-147-generic","resolution":"3840x2160","window":{"spec":"seconds 0:60","first_present":0,"ms":116676.419},"presents":171,"frame_ms":{"p50":16.688,"p90":30.749,"p99":1896.658,"max":110772.656},"gpu_busy_ms_per_present":4.641,"worker_busy_pct":{"queue worker 0x0":88.436,"queue worker 0x20":72.015},"top_phases_ms_per_frame":{"Driver.Packet":1094.783,"Shader.PrepareArtifact":569.992,"Driver.Packet.dispatch":556.118,"Driver.Dispatch":556.049,"Driver.Packet.memory_wait":458.826,"Vulkan.GraphicsPipeline":141.434,"Vulkan.GraphicsPipelineLibrary":134.980,"Vulkan.GraphicsPipelinePrebuild":80.718},"trace_dropped":false,"trace":"aps5-trace-a97e59c0c062-3.json.gz"} ``` - Khronos validation layer (LunarG SDK 1.4.363), NVIDIA RTX 4070 Ti (595.99.02), Ubuntu 24.04: `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 ctest -R '^agc_' -V` on `main` e2a2914aa1 and on `main` + this PR (c76299f217, a local merge). `main`: 815 of 815 pass; with this PR: 815 of 815 pass. Neither log reports the layer missing. VUIDs on `main`: `VUID-VkImageViewCreateInfo-usage-02275` ×6, `VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605` ×18, `VUID-vkCmdCopyBuffer-srcBuffer-00118` ×2, `VUID-vkCmdDraw-multisampledRenderToSingleSampled-07285` ×2, `VUID-vkCmdWaitEvents-srcStageMask-01158` ×2, `VUID-vkSetEvent-event-09543` ×2; with this PR: `VUID-VkImageViewCreateInfo-usage-02275` ×6, `VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605` ×18, `VUID-vkCmdCopyBuffer-srcBuffer-00118` ×2, `VUID-vkCmdDraw-multisampledRenderToSingleSampled-07285` ×2, `VUID-vkCmdWaitEvents-srcStageMask-01158` ×2, `VUID-vkSetEvent-event-09543` ×2. None is new with this PR. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 595.99, Ubuntu 24.04; AMD Radeon 860M, driver 32.0.13058.8001, Windows 11 (tests, by @LeandroLP23) - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-16 11:47:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T11:47:53Z.

Review: CHANGES_REQUESTED


The new guard path can have multiple invocations in one dispatch store different stage/record values to the same SrtGuardWord: EmitReadConst emits a plain OpStore, then only stops the current invocation. The description explicitly says the record is whichever stored last when a program does not stop invocations. Unordered non-atomic writes to one storage-buffer word are a Vulkan shader memory-model data race, so the winner is not defined by Vulkan. Please select a record with an atomic operation (for example, an atomic compare-exchange for first-writer-wins) or otherwise synchronize the writers, and add a regression that exercises multiple invocations faulting through distinct guard records.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5547353782 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6785#pullrequestreview-5547353782). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T11:47:53Z. **Review:** CHANGES_REQUESTED --- The new guard path can have multiple invocations in one dispatch store different stage/record values to the same `SrtGuardWord`: `EmitReadConst` emits a plain `OpStore`, then only stops the current invocation. The description explicitly says the record is whichever stored last when a program does not stop invocations. Unordered non-atomic writes to one storage-buffer word are a Vulkan shader memory-model data race, so the winner is not defined by Vulkan. Please select a record with an atomic operation (for example, an atomic compare-exchange for first-writer-wins) or otherwise synchronize the writers, and add a regression that exercises multiple invocations faulting through distinct guard records.
github-actions[bot] commented 2026-10-16 11:54:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-16T11:54:21Z.


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.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 8295 core/libs/prx/libSceAgcDriver/tests/execution/GuardedNullPointer.cpp L120

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5021 core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp
PR 5371 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6188 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6192 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6194 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6202 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6223 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6235 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6290 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6292 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6412 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/libs/prx/libSceAgcDriver/tests/execution/GuardedNullPointer.cpp
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6488 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6615 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6636 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6645 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6683 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6801 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 6946 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 6947 core/libs/prx/libSceAgcDriver/Graphics/include/BdaResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/BdaAbi.hpp
PR 6970 core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 7002 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 7201 core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp
PR 7371 core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp
PR 7484 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/include/BdaResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
core/shader/recompiler/BdaAbi.hpp
PR 7684 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 7689 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 7800 core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
PR 7816 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 7888 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 8004 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
PR 8077 core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6214932784 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6785#issuecomment-6214932784). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-16T11:54:21Z. --- <!-- pr-overlap --> 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**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 8295](https://www.github.com/boykopovar/AnyPS5/pull/8295) | `core/libs/prx/libSceAgcDriver/tests/execution/GuardedNullPointer.cpp` [L120](https://github.com/boykopovar/AnyPS5/blob/c6145997ef43e32b0c2119779fe2b5e863e751a6/core/libs/prx/libSceAgcDriver/tests/execution/GuardedNullPointer.cpp#L120) | | | Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/shader/recompiler/SpirvBackend/src/SpirvMemory/SpirvMemoryInstructions.cpp` | | [PR 5371](https://www.github.com/boykopovar/AnyPS5/pull/5371) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6192](https://www.github.com/boykopovar/AnyPS5/pull/6192) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6194](https://www.github.com/boykopovar/AnyPS5/pull/6194) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6202](https://www.github.com/boykopovar/AnyPS5/pull/6202) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6223](https://www.github.com/boykopovar/AnyPS5/pull/6223) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6235](https://www.github.com/boykopovar/AnyPS5/pull/6235) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` | | [PR 6290](https://www.github.com/boykopovar/AnyPS5/pull/6290) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` | | [PR 6292](https://www.github.com/boykopovar/AnyPS5/pull/6292) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6412](https://www.github.com/boykopovar/AnyPS5/pull/6412) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/GuardedNullPointer.cpp` | | [PR 6481](https://www.github.com/boykopovar/AnyPS5/pull/6481) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6488](https://www.github.com/boykopovar/AnyPS5/pull/6488) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` | | [PR 6615](https://www.github.com/boykopovar/AnyPS5/pull/6615) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6636](https://www.github.com/boykopovar/AnyPS5/pull/6636) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6645](https://www.github.com/boykopovar/AnyPS5/pull/6645) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` | | [PR 6683](https://www.github.com/boykopovar/AnyPS5/pull/6683) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` | | [PR 6801](https://www.github.com/boykopovar/AnyPS5/pull/6801) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/Graphics/include/BdaResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/BdaAbi.hpp` | | [PR 6970](https://www.github.com/boykopovar/AnyPS5/pull/6970) | `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 7002](https://www.github.com/boykopovar/AnyPS5/pull/7002) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp` | | [PR 7371](https://www.github.com/boykopovar/AnyPS5/pull/7371) | `core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp` | | [PR 7484](https://www.github.com/boykopovar/AnyPS5/pull/7484) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 7642](https://www.github.com/boykopovar/AnyPS5/pull/7642) | `core/libs/prx/libSceAgcDriver/Graphics/include/BdaResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/BdaResources.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`<br>`core/shader/recompiler/BdaAbi.hpp` | | [PR 7684](https://www.github.com/boykopovar/AnyPS5/pull/7684) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` | | [PR 7689](https://www.github.com/boykopovar/AnyPS5/pull/7689) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 7800](https://www.github.com/boykopovar/AnyPS5/pull/7800) | `core/libs/prx/libSceAgcDriver/Graphics/include/ShaderResources.hpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp` | | [PR 7816](https://www.github.com/boykopovar/AnyPS5/pull/7816) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` | | [PR 7888](https://www.github.com/boykopovar/AnyPS5/pull/7888) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` | | [PR 8004](https://www.github.com/boykopovar/AnyPS5/pull/8004) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` | | [PR 8077](https://www.github.com/boykopovar/AnyPS5/pull/8077) | `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` |
milescoviello commented 2026-10-16 12:01:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-16T12:01:26Z.


Thanks, you're right: the plain stores race. 37d8a8843 writes the guard word with a relaxed device-scope OpAtomicStore, so the reported record is one of the writers' whole records, whichever is last in the word's modification order.

I measured the options on the 1,916,980-word module before choosing:

Guard write vkCreateComputePipelines Replay peak
plain store (previous head) 73 s 3.12 GiB
OpAtomicStore 73.9 s 3.12 GiB
OpAtomicCompareExchange (first writer wins) 81.2 s 3.62 GiB
OpAtomicUMax 82.2 s 3.59 GiB

I kept the store because the host reports one poisoned read that ran either way, and which invocation writes first isn't ordered either. If you'd rather have first-writer-wins, I can switch to the compare-exchange.

For the regression, agc_driver_guarded_null_pointer now dispatches two workgroups: one reads through a null pointer (pc 0x2c), the other through an unmapped one (pc 0x38). The reported fault must be exactly one of the two records with its own pc and address. It passes 3 of 3 (10 of 10 reported the unmapped one here). With main plus #6784 so that it builds, the 498-test area run has only agc_driver_graphics (the #5804 case noted in #6784) and agc_driver_store_over_untracked failing, both as on main.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6215043159 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6785#issuecomment-6215043159). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-16T12:01:26Z. --- Thanks, you're right: the plain stores race. 37d8a8843 writes the guard word with a relaxed device-scope `OpAtomicStore`, so the reported record is one of the writers' whole records, whichever is last in the word's modification order. I measured the options on the 1,916,980-word module before choosing: | Guard write | `vkCreateComputePipelines` | Replay peak | |---|---|---| | plain store (previous head) | 73 s | 3.12 GiB | | `OpAtomicStore` | 73.9 s | 3.12 GiB | | `OpAtomicCompareExchange` (first writer wins) | 81.2 s | 3.62 GiB | | `OpAtomicUMax` | 82.2 s | 3.59 GiB | I kept the store because the host reports one poisoned read that ran either way, and which invocation writes first isn't ordered either. If you'd rather have first-writer-wins, I can switch to the compare-exchange. For the regression, `agc_driver_guarded_null_pointer` now dispatches two workgroups: one reads through a null pointer (pc 0x2c), the other through an unmapped one (pc 0x38). The reported fault must be exactly one of the two records with its own pc and address. It passes 3 of 3 (10 of 10 reported the unmapped one here). With `main` plus #6784 so that it builds, the 498-test area run has only `agc_driver_graphics` (the #5804 case noted in #6784) and `agc_driver_store_over_untracked` failing, both as on `main`. AI-assisted: yes
MarcZX10 commented 2026-10-16 12:03:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T12:03:24Z.

Review: APPROVED


The follow-up replaces the competing plain stores to SrtGuardWord with a device-scope relaxed atomic store, so one complete guard record wins modification order without introducing an inter-invocation data race. The added two-workgroup regression exercises different null and unmapped guards and requires exactly one corresponding record. I also checked that the host decodes the winning record using the encoded stage and flattened-SRT offset. The required checks pass; platform build/runtime jobs were skipped by path filters, so this approval is based on source review and the reported local regression run.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5547507439 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6785#pullrequestreview-5547507439). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-16T12:03:24Z. **Review:** APPROVED --- The follow-up replaces the competing plain stores to `SrtGuardWord` with a device-scope relaxed atomic store, so one complete guard record wins modification order without introducing an inter-invocation data race. The added two-workgroup regression exercises different null and unmapped guards and requires exactly one corresponding record. I also checked that the host decodes the winning record using the encoded stage and flattened-SRT offset. The required checks pass; platform build/runtime jobs were skipped by path filters, so this approval is based on source review and the reported local regression run.
LeandroLP23 commented 2026-10-18 16:33:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-18T16:33:15Z.


AMD on Windows: the tests this PR names pass on an RDNA 3.5 GPU.

Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release. main 6efb7261b with this PR (a4fc2cfea) merged, together with #7296, #7446, #7377, #7445, #6708, #6748, #6706, #6613, #7449, #7391, #7489, #7484, #7514. They were built once, so the result is for the combination; each merge was clean.

  • agc_driver_graphics, agc_driver_guarded_null_pointer, agc_driver_store_over_untracked, agc_shader_memory: pass, 3 runs of 3.
  • Every agc_* test on the combined build: 713 of 716 pass. The 3 that fail, agc_driver_host_import_lifetime, agc_driver_quad_pixel_mask and agc_driver_layered_volume_vertex_no_gpl, fail the same way on unchanged main here, so none comes from these PRs.

AI-assisted

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6252345022 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6785#issuecomment-6252345022). Originally posted by [LeandroLP23](https://github.com/LeandroLP23) on 2026-10-18T16:33:15Z. --- AMD on Windows: the tests this PR names pass on an RDNA 3.5 GPU. Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release. `main` `6efb7261b` with this PR (`a4fc2cfea`) merged, together with #7296, #7446, #7377, #7445, #6708, #6748, #6706, #6613, #7449, #7391, #7489, #7484, #7514. They were built once, so the result is for the combination; each merge was clean. - `agc_driver_graphics`, `agc_driver_guarded_null_pointer`, `agc_driver_store_over_untracked`, `agc_shader_memory`: pass, 3 runs of 3. - Every `agc_*` test on the combined build: 713 of 716 pass. The 3 that fail, `agc_driver_host_import_lifetime`, `agc_driver_quad_pixel_mask` and `agc_driver_layered_volume_vertex_no_gpl`, fail the same way on unchanged `main` here, so none comes from these PRs. AI-assisted
milescoviello commented 2026-10-18 18:45:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-18T18:45:59Z.


Thanks @LeandroLP23 for the AMD run on Windows. I added it to the description.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6253713074 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6785#issuecomment-6253713074). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-18T18:45:59Z. --- Thanks @LeandroLP23 for the AMD run on Windows. I added it to the description. AI-assisted: yes (Claude Code)
milescoviello commented 2026-10-19 21:35:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-19T21:35:39Z.


The title capture the perf label asks for is now in the description, with both summary lines, the traces and the digests: MXGP26 from boot, a cold shader cache, main dbac9fa15b against main + this PR (a97e59c0c062). The five main captures span 17.7% in total shader prepare time, so the capture can't resolve this change, and the replay measurement in the description is still its measurement. This PR's capture is above all five main captures in total prepare time. With one capture of the change I can't tell that apart from noise, and the replay measurement above points the other way. I can repeat the capture if that would help.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6277888225 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6785#issuecomment-6277888225). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-19T21:35:39Z. --- The title capture the `perf` label asks for is now in the description, with both summary lines, the traces and the digests: MXGP26 from boot, a cold shader cache, `main` dbac9fa15b61 against `main` + this PR (a97e59c0c062). The five `main` captures span 17.7% in total shader prepare time, so the capture can't resolve this change, and the replay measurement in the description is still its measurement. This PR's capture is above all five `main` captures in total prepare time. With one capture of the change I can't tell that apart from noise, and the replay measurement above points the other way. I can repeat the capture if that would help. AI-assisted: yes (Claude Code)
milescoviello commented 2026-10-20 03:06:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-20T03:06:43Z.


Rebased onto main a020d02560 (now c76299f217). #6373 renamed the fault record's last field from reserved to otherFaults. That made one conflict, in BdaResources::CheckFault. The empty-record check now uses main's otherFaults == 0 and still calls checkSrtGuard() before it returns. agc_shader_memory, agc_driver_graphics, agc_driver_guarded_null_pointer and agc_driver_store_over_untracked pass, also under Khronos validation 1.4.363, with no VUIDs and no layer-missing lines.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6282388242 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6785#issuecomment-6282388242). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-20T03:06:43Z. --- Rebased onto `main` a020d02560 (now c76299f217). #6373 renamed the fault record's last field from `reserved` to `otherFaults`. That made one conflict, in `BdaResources::CheckFault`. The empty-record check now uses `main`'s `otherFaults == 0` and still calls `checkSrtGuard()` before it returns. `agc_shader_memory`, `agc_driver_graphics`, `agc_driver_guarded_null_pointer` and `agc_driver_store_over_untracked` pass, also under Khronos validation 1.4.363, with no VUIDs and no layer-missing lines. AI-assisted: yes (Claude Code)
adriadam10 commented 2026-10-20 21:01:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-20T21:01:19Z.


Re-checked against current main: the guard word encoding (record never 0, stage in the top 8 bits, emit-time failure past 2^24), the host decode bounds, the untouched fault-buffer offsets, the relaxed atomic store, and that both new test checks fail on main. The merge with current main is clean and the PR's hunks are unchanged; merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6301394234 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6785#issuecomment-6301394234). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-20T21:01:19Z. --- Re-checked against current main: the guard word encoding (record never 0, stage in the top 8 bits, emit-time failure past 2^24), the host decode bounds, the untouched fault-buffer offsets, the relaxed atomic store, and that both new test checks fail on `main`. The merge with current main is clean and the PR's hunks are unchanged; merged.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!6785
No description provided.