fix(agc): leave a stage the title's pipeline ABI cannot prepare to its first use #6366

Merged
EagleBearerYS merged 8 commits from upstream-pr/6366 into main 2026-10-19 01:26:59 +00:00
EagleBearerYS commented 2026-10-15 13:20:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-15T13:20:49Z.


What

When a title creates a pipeline, sceAgcDriverResolveShaderAbi, sceAgcDriverResolveGraphicsStagesAbi and sceAgcDriverResolveGraphicsAbi prepare its stages. If the recompiler could not prepare a stage there, the call threw and the title stopped at pipeline creation. Two cases on main:

  • Resident Evil Village stops this way on a pixel shader whose T# pointer is a phi of user data and a ballot (GetImageResource dword 0 is not a valid runtime value).
  • A compute shader that calls user-data pointers stopped the same way, although its dispatch links the callees.

Such a stage is now left to its first use, like a stage registration cannot prepare:

  • ResolveShaderAbi and PrepareGraphicsStages catch the failure inside their own preparation transaction. The ShaderPreparationScope that libSceAgc opens around the call (sceAgcLinkShaders, sceAgcCreateInterpolantMapping, sceAgcCreatePrimState) still commits. A catch at the entry point would leave that scope aborted.
  • The shader is logged once ("could not be prepared when the title created its pipeline (…); preparing it when it is used") and marked deferred. The ABI key is recorded, so a repeated call prepares nothing.
  • ResolvePreparedGraphics skips the rectangles of a deferred stage that has no artifact yet. This also lets sceAgcDriverResolveGraphicsAbi through for a stage deferred at registration, which threw "rectangle ABI has missing stage artifacts".

The draw or dispatch that uses the stage prepares it as before, and fails there if it cannot. Resident Evil Village's pixel shader would still fail at a draw: the resource plan depends only on the code and the stage interface, so the draw builds the same plan.

Driver failures and ProcessShutdown still propagate. docs/dev/ARCHITECTURE.md gets a line.

A pipeline ABI whose state does not decode also leaves its stages to their first use (6bd8647c27). On our own test tree, which carries this PR and other open PRs (not main), Resident Evil Village (PPSA01556) aborted 11 minutes into its save load, before control, with AGC graphics: VGT_SHADER_STAGES_EN=0x2030: unsupported geometry input or output assembly. sceAgcDriverResolveGraphicsStagesAbi decodes the stage routing and programs from the stages' registered state and the call's context and primitive registers before it prepares anything, and DecodeShaderStages refused that combined state outside the preparation this PR already guards. A refused decode now defers every stage of the call like a stage whose preparation fails: each is logged once with the decode's reason and prepared by the draw that uses it, which decodes its own state; a repeated call prepares and logs nothing. With this commit added (and one fix elsewhere that doesn't touch this path), the tree loaded that save to control with no driver failure and held control for about 8 minutes (Windows 11, RTX 3070 Laptop GPU, driver 617.42). That run prepares shaders lazily (#5872's APS5_LAZY_SHADER_PREPARE=1), which marks every stage deferred at registration, so the deferral itself logs nothing there.

A completeness review of every path of the pipeline call found three more cases that could end a title before the stage's first use. No title has hit them yet.

A stage whose registration preparation failed is left to its first use too (19a3e07106). The scope libSceAgc opens around a pipeline call (sceAgcLinkShaders, sceAgcCreatePrimState, sceAgcCreateInterpolantMapping) no longer rethrows a failure the background registration preparation stored. The ABI calls log such a stage once with the stored reason and prepare the call's other stages, and the stage's first draw or dispatch rethrows the same exception. This replaces this PR's earlier choice that stored registration failures propagate at the pipeline call: that call cannot know whether the title will use the pipeline, and the abort now happens where the stage is used, with the same message.

Vertex inputs and rect-list pairs (502085c15c, e986ee0f7a). A stage whose vertex inputs the decode refuses at the pipeline call (NGG vertex shaders that use their workgroup, and mesh, hull and domain stages, which registration does not decode) is left to its first draw, which decodes the same header. A rect-list pair the pipeline call cannot build (no pixel shader, a pixel with no artifact, or one the rect-list builder refuses) is left to its draw, and a draw now builds only its own fragment's pair, so another fragment's refusal no longer fails an unrelated draw. Rect-list pairs are still built per pixel shader, not per variant: when a pixel's passthrough pair is refused, the rect-list draw of its normal variant fails with that reason. The pipeline call's abort hid that case before.

Overlap: #5872 (shader preparation on first use) is on main now, and this branch merges main with it. The prepared-shader modes are the union of both lists. With #5872's lazy mode on, every snapshot starts deferred, so this line doesn't print for such a stage, and the draw reports the failure as before. #5872's LazyRegistration check now requires that the pipeline ABI of a lazily registered shader it cannot prepare leaves the stage deferred with no prepared entry, where it used to throw; its dispatch and shutdown failure checks are unchanged. The merge also makes the tests' stderr capture flush main's async driver log before reading it, and has the undecodable-state check match the decode's VGT_SHADER_STAGES_EN=0x2030: reason, which main's geometry subgroup check now gives first.

#6612 (tessellation followed by an NGG geometry stage) and #6639 (point lists with their point size) change the lines of PrepareGraphicsStages that 19a3e07106 and 502085c15c reorder, where the push offset now comes first and the vertex-input decode sits in a try. Whichever merges second keeps that order and puts #6612's wave = Graphics::StageWaveSize(...) and #6639's Graphics::ApplyPointSize(decoded.state, *vertex) into the if (vertex) block after the try.

Related: #5884 (AnthonyClemens) draws line-strip output of NGG geometry programs as mesh lines, one of the states VGT_SHADER_STAGES_EN=0x2030: unsupported geometry input or output assembly refuses, and merges cleanly with this PR. With it, such stages decode at the pipeline call and are prepared there instead of at first use. JJenkx's Cocoon (PPSA08766) report (#6651) passes that refusal at startup with #5884.

Tested

Resident Evil Village (PPSA01556), Windows 11, NVIDIA GeForce RTX 3070 Laptop GPU (driver 617.42), on main 6ea62f9b40, before and with this branch's two commits (the same commits; the head is only rebased onto 71bd2876e5). Both arms ran with the same env, APS5_NO_GPL=1, which skips Vulkan graphics pipeline libraries and saves about 2.5 GB of host memory during Resident Evil Village's pipeline creation on this 16 GB machine. The title was relinked with main's relinker.

  • Main:
    • Before: shader 0x207e84c500 stage 5: ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; chain: …, then FATAL: abort() at pipeline creation, 5 min 48 s in.
    • With this branch: Shader 0x207e85cf00 could not be prepared when the title created its pipeline (shader 0x207e85cf00 stage 5: ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; …); preparing it when it is used, once. Resident Evil Village then runs on to main's next stop at the intro video, mprotect of uncommitted memory outside the guest arena (#5703 fixes it). No other runtime-value line.
  • Main with #5703 (open, 187e5fc0ac) in both arms:
    • Before: the same FATAL, 28 s in.
    • With this branch: the deferral line once, then through the start-up dialogs and the intro video, about 7.7 min, with no other runtime-value line and no access violation. The deferred shader is not drawn in that time. It stops before the title on an unrelated check, the depth target's sample count differs from the rasterizer's; a separate fix for that is coming.
  • On our own test trees, which also carry other open PRs (not main), an earlier local form of this deferral (every stage of an ABI call left to its first use) took Resident Evil Village to its title and first scene with no runtime-value failure.

Linux, GitHub runner with Mesa lavapipe, head 695ec6cc4f on main 71bd2876e5:

  • the four new tests fail with the fix's two source files reverted to main's, and pass 5 runs in a row with them;
  • ^agc: 601 tests, 0 failures.
  • With the same two commits on a08de6827: the fix commit alone passed the 21 prepared-shader, user-data-call, tessellation and shutdown tests, and the four new tests passed 10 runs in a row.

Windows:

  • RTX 3070 Laptop GPU, driver 617.42, NVIDIA's Vulkan driver only, WinLibs MinGW Release build: with the fix's two source files reverted to main's, all four new tests fail with the reasons in the table below (s_swappc_b64 … is not statically resolvable; GetImageResource dword 0 is not a valid runtime value for the pixel and the vertex stage; rectangle ABI has missing stage artifacts). With them, all four pass 5 runs in a row.
  • GitHub runner (WinLibs MinGW): the build passes and ^agc passes 594 of 595. The four new tests skip there (no Vulkan device). agc_driver_pm4_replay_tool fails the same way with main's sources in the same run (the tool exits 0xc0000139 on the runner).

The undecodable-state follow-up (6bd8647c27, 661d3cba8d), Linux, GitHub runner with Mesa lavapipe (run): with ShaderRegistry.cpp reverted to 695ec6cc4f's, agc_driver_prepared_shaders_abi_deferred_undecodable_state fails in all 3 runs with AGC graphics: VGT_SHADER_STAGES_EN=0x2030: unsupported geometry input or output assembly, and the other 12 prepared-shader modes pass. With it, all 13 pass 10 runs in a row. On the Windows runner the 13 skip (no Vulkan device). On a Linux cloud worker (Ubuntu 24.04, GCC 13.3, lavapipe) the whole ^agc sweep passes, 561 tests there.

The completeness follow-ups (19a3e07106, 502085c15c, e986ee0f7a), Linux, GitHub runner with Mesa lavapipe (run): with ShaderRegistry.cpp reverted to 661d3cba8d's, the three new modes (registration_failure, vertex_inputs, rectangle_pairs) fail in all 3 runs and the other prepared-shader modes and agc_driver_prepared_publication pass. With it, all 17 pass 10 runs in a row. On the Windows runner they skip (no Vulkan device). On a Linux cloud worker, with these three and one more commit not in this PR, the whole ^agc sweep passes (606 tests there) and CI's test-registration check passes.

Eight new agc_driver_prepared_shaders_abi_deferred_* modes. Each is red with the fix reverted:

Mode Without the fix With it
compute ResolveShaderAbi throws "s_swappc_b64 call target … is not statically resolvable" resolved twice with one preparation; the dispatch prepares the shader at use and every lane holds 3 × (5 + 64)
pixel throws "GetImageResource dword 0 is not a valid runtime value" (a phi of user data and a ballot) logged once with that reason, no second preparation, and a resolve inside a ShaderPreparationScope commits; the draw fails at use with the same reason, and the next ABI call throws the stored driver failure
stages nested and direct ResolveGraphicsStagesAbi throw the same reason for a vertex shader one line each, no second preparation; the scope commits
rectangle "rectangle ABI has missing stage artifacts" returns, with a pixel shader deferred at registration and with one deferred at its ABI call
undecodable state ResolveGraphicsStagesAbi throws "VGT_SHADER_STAGES_EN=0x2030: unsupported geometry input or output assembly" for a geometry-routed vertex shader, with the registers sceAgcCreatePrimState passes deferred once with that reason, a repeated call prepares and logs nothing, and a later draw prepares the stage at its first use
registration failure the scope and every ABI entry point rethrow a stored registration failure ("GetImageResource dword 0 is not a valid runtime value") for a pixel, a compute and a vertex stage each logged once with the stored reason, nothing logged on a second pass, and the dispatch fails at use with the same reason
vertex inputs ResolveGraphicsStagesAbi throws "statically bound vertex attributes are not implemented" logged once with that reason, no front-end build, and the draw fails with the same text
rectangle pairs the rect-list pairing throws "custom per-vertex interpolation is unsupported" logged once with that reason; a draw with a null pixel on the same front succeeds, and the passthrough draw fails with the builder's text

Cost: I timed the success path of each entry point on main and on this branch (on a08de6827): 5 and 6 interleaved runs, 7 × 20,000 resolved-key calls and 7 × 100 new keys each.

  • Resolved keys took 1.9-2.6 µs per call; new keys 20-46 µs.
  • Every branch median was within the run-to-run spread, -2.5 % to +7.7 %. The largest difference is on a path this branch doesn't change.

The merge of main 82ddae75b6 (with #5872, the async driver log and the geometry subgroup check), on GitHub's runners (run): the 19 prepared-shader modes and the async-log tests pass 5 runs in a row on Linux and Windows (the GPU modes skip on Windows). The run's other failures are libc's precise_wait on Linux, a timing test; guest_kqueue on Windows, which fails on main there; and guest_shader_link on Windows, which timed out once in five. On main 82ddae75b6 alone it times out the same way, on the ninth run after 8 passes (run).

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: PPSA01556 #5169 (pipeline creation; to reach its title, Resident Evil Village also needs #5703 and a fix for the depth-sample check above)
  • GPUs tested: NVIDIA GeForce RTX 3070 Laptop GPU, driver 617.42, Windows 11; Mesa lavapipe (CPU), Linux
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4873940979 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6366). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-15T13:20:49Z. --- ### What When a title creates a pipeline, `sceAgcDriverResolveShaderAbi`, `sceAgcDriverResolveGraphicsStagesAbi` and `sceAgcDriverResolveGraphicsAbi` prepare its stages. If the recompiler could not prepare a stage there, the call threw and the title stopped at pipeline creation. Two cases on main: - Resident Evil Village stops this way on a pixel shader whose T# pointer is a phi of user data and a ballot (`GetImageResource dword 0 is not a valid runtime value`). - A compute shader that calls user-data pointers stopped the same way, although its dispatch links the callees. Such a stage is now left to its first use, like a stage registration cannot prepare: - `ResolveShaderAbi` and `PrepareGraphicsStages` catch the failure inside their own preparation transaction. The `ShaderPreparationScope` that libSceAgc opens around the call (`sceAgcLinkShaders`, `sceAgcCreateInterpolantMapping`, `sceAgcCreatePrimState`) still commits. A catch at the entry point would leave that scope aborted. - The shader is logged once ("could not be prepared when the title created its pipeline (…); preparing it when it is used") and marked deferred. The ABI key is recorded, so a repeated call prepares nothing. - `ResolvePreparedGraphics` skips the rectangles of a deferred stage that has no artifact yet. This also lets `sceAgcDriverResolveGraphicsAbi` through for a stage deferred at registration, which threw "rectangle ABI has missing stage artifacts". The draw or dispatch that uses the stage prepares it as before, and fails there if it cannot. Resident Evil Village's pixel shader would still fail at a draw: the resource plan depends only on the code and the stage interface, so the draw builds the same plan. Driver failures and `ProcessShutdown` still propagate. `docs/dev/ARCHITECTURE.md` gets a line. **A pipeline ABI whose state does not decode also leaves its stages to their first use (6bd8647c27).** On our own test tree, which carries this PR and other open PRs (not `main`), Resident Evil Village (PPSA01556) aborted 11 minutes into its save load, before control, with `AGC graphics: VGT_SHADER_STAGES_EN=0x2030: unsupported geometry input or output assembly`. `sceAgcDriverResolveGraphicsStagesAbi` decodes the stage routing and programs from the stages' registered state and the call's context and primitive registers before it prepares anything, and `DecodeShaderStages` refused that combined state outside the preparation this PR already guards. A refused decode now defers every stage of the call like a stage whose preparation fails: each is logged once with the decode's reason and prepared by the draw that uses it, which decodes its own state; a repeated call prepares and logs nothing. With this commit added (and one fix elsewhere that doesn't touch this path), the tree loaded that save to control with no driver failure and held control for about 8 minutes (Windows 11, RTX 3070 Laptop GPU, driver 617.42). That run prepares shaders lazily (#5872's `APS5_LAZY_SHADER_PREPARE=1`), which marks every stage deferred at registration, so the deferral itself logs nothing there. A completeness review of every path of the pipeline call found three more cases that could end a title before the stage's first use. No title has hit them yet. **A stage whose registration preparation failed is left to its first use too (19a3e07106).** The scope libSceAgc opens around a pipeline call (`sceAgcLinkShaders`, `sceAgcCreatePrimState`, `sceAgcCreateInterpolantMapping`) no longer rethrows a failure the background registration preparation stored. The ABI calls log such a stage once with the stored reason and prepare the call's other stages, and the stage's first draw or dispatch rethrows the same exception. This replaces this PR's earlier choice that stored registration failures propagate at the pipeline call: that call cannot know whether the title will use the pipeline, and the abort now happens where the stage is used, with the same message. **Vertex inputs and rect-list pairs (502085c15c, e986ee0f7a).** A stage whose vertex inputs the decode refuses at the pipeline call (NGG vertex shaders that use their workgroup, and mesh, hull and domain stages, which registration does not decode) is left to its first draw, which decodes the same header. A rect-list pair the pipeline call cannot build (no pixel shader, a pixel with no artifact, or one the rect-list builder refuses) is left to its draw, and a draw now builds only its own fragment's pair, so another fragment's refusal no longer fails an unrelated draw. Rect-list pairs are still built per pixel shader, not per variant: when a pixel's passthrough pair is refused, the rect-list draw of its normal variant fails with that reason. The pipeline call's abort hid that case before. Overlap: #5872 (shader preparation on first use) is on `main` now, and this branch merges `main` with it. The prepared-shader modes are the union of both lists. With #5872's lazy mode on, every snapshot starts deferred, so this line doesn't print for such a stage, and the draw reports the failure as before. #5872's `LazyRegistration` check now requires that the pipeline ABI of a lazily registered shader it cannot prepare leaves the stage deferred with no prepared entry, where it used to throw; its dispatch and shutdown failure checks are unchanged. The merge also makes the tests' stderr capture flush `main`'s async driver log before reading it, and has the undecodable-state check match the decode's `VGT_SHADER_STAGES_EN=0x2030:` reason, which `main`'s geometry subgroup check now gives first. #6612 (tessellation followed by an NGG geometry stage) and #6639 (point lists with their point size) change the lines of `PrepareGraphicsStages` that 19a3e07106 and 502085c15c reorder, where the push offset now comes first and the vertex-input decode sits in a `try`. Whichever merges second keeps that order and puts #6612's `wave = Graphics::StageWaveSize(...)` and #6639's `Graphics::ApplyPointSize(decoded.state, *vertex)` into the `if (vertex)` block after the `try`. Related: #5884 (AnthonyClemens) draws line-strip output of NGG geometry programs as mesh lines, one of the states `VGT_SHADER_STAGES_EN=0x2030: unsupported geometry input or output assembly` refuses, and merges cleanly with this PR. With it, such stages decode at the pipeline call and are prepared there instead of at first use. JJenkx's Cocoon (PPSA08766) report (#6651) passes that refusal at startup with #5884. ### Tested Resident Evil Village (PPSA01556), Windows 11, NVIDIA GeForce RTX 3070 Laptop GPU (driver 617.42), on main 6ea62f9b40, before and with this branch's two commits (the same commits; the head is only rebased onto 71bd2876e5). Both arms ran with the same env, `APS5_NO_GPL=1`, which skips Vulkan graphics pipeline libraries and saves about 2.5 GB of host memory during Resident Evil Village's pipeline creation on this 16 GB machine. The title was relinked with main's relinker. - **Main:** - Before: `shader 0x207e84c500 stage 5: ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; chain: …`, then `FATAL: abort()` at pipeline creation, 5 min 48 s in. - With this branch: `Shader 0x207e85cf00 could not be prepared when the title created its pipeline (shader 0x207e85cf00 stage 5: ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; …); preparing it when it is used`, once. Resident Evil Village then runs on to main's next stop at the intro video, `mprotect of uncommitted memory outside the guest arena` (#5703 fixes it). No other runtime-value line. - **Main with #5703 (open, 187e5fc0ac) in both arms:** - Before: the same FATAL, 28 s in. - With this branch: the deferral line once, then through the start-up dialogs and the intro video, about 7.7 min, with no other runtime-value line and no access violation. The deferred shader is not drawn in that time. It stops before the title on an unrelated check, `the depth target's sample count differs from the rasterizer's`; a separate fix for that is coming. - On our own test trees, which also carry other open PRs (not main), an earlier local form of this deferral (every stage of an ABI call left to its first use) took Resident Evil Village to its title and first scene with no runtime-value failure. Linux, GitHub runner with Mesa lavapipe, head 695ec6cc4f on main 71bd2876e5: - the four new tests fail with the fix's two source files reverted to main's, and pass 5 runs in a row with them; - `^agc`: 601 tests, 0 failures. - With the same two commits on a08de6827: the fix commit alone passed the 21 prepared-shader, user-data-call, tessellation and shutdown tests, and the four new tests passed 10 runs in a row. Windows: - RTX 3070 Laptop GPU, driver 617.42, NVIDIA's Vulkan driver only, WinLibs MinGW Release build: with the fix's two source files reverted to main's, all four new tests fail with the reasons in the table below (`s_swappc_b64 … is not statically resolvable`; `GetImageResource dword 0 is not a valid runtime value` for the pixel and the vertex stage; `rectangle ABI has missing stage artifacts`). With them, all four pass 5 runs in a row. - GitHub runner (WinLibs MinGW): the build passes and `^agc` passes 594 of 595. The four new tests skip there (no Vulkan device). `agc_driver_pm4_replay_tool` fails the same way with main's sources in the same run (the tool exits 0xc0000139 on the runner). **The undecodable-state follow-up (6bd8647c27, 661d3cba8d)**, Linux, GitHub runner with Mesa lavapipe ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/38826240815)): with `ShaderRegistry.cpp` reverted to 695ec6cc4f's, `agc_driver_prepared_shaders_abi_deferred_undecodable_state` fails in all 3 runs with `AGC graphics: VGT_SHADER_STAGES_EN=0x2030: unsupported geometry input or output assembly`, and the other 12 prepared-shader modes pass. With it, all 13 pass 10 runs in a row. On the Windows runner the 13 skip (no Vulkan device). On a Linux cloud worker (Ubuntu 24.04, GCC 13.3, lavapipe) the whole `^agc` sweep passes, 561 tests there. **The completeness follow-ups (19a3e07106, 502085c15c, e986ee0f7a)**, Linux, GitHub runner with Mesa lavapipe ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/38836887170)): with `ShaderRegistry.cpp` reverted to 661d3cba8d's, the three new modes (`registration_failure`, `vertex_inputs`, `rectangle_pairs`) fail in all 3 runs and the other prepared-shader modes and `agc_driver_prepared_publication` pass. With it, all 17 pass 10 runs in a row. On the Windows runner they skip (no Vulkan device). On a Linux cloud worker, with these three and one more commit not in this PR, the whole `^agc` sweep passes (606 tests there) and CI's test-registration check passes. Eight new `agc_driver_prepared_shaders_abi_deferred_*` modes. Each is red with the fix reverted: | Mode | Without the fix | With it | |---|---|---| | compute | `ResolveShaderAbi` throws "s_swappc_b64 call target … is not statically resolvable" | resolved twice with one preparation; the dispatch prepares the shader at use and every lane holds 3 × (5 + 64) | | pixel | throws "GetImageResource dword 0 is not a valid runtime value" (a phi of user data and a ballot) | logged once with that reason, no second preparation, and a resolve inside a `ShaderPreparationScope` commits; the draw fails at use with the same reason, and the next ABI call throws the stored driver failure | | stages | nested and direct `ResolveGraphicsStagesAbi` throw the same reason for a vertex shader | one line each, no second preparation; the scope commits | | rectangle | "rectangle ABI has missing stage artifacts" | returns, with a pixel shader deferred at registration and with one deferred at its ABI call | | undecodable state | `ResolveGraphicsStagesAbi` throws "VGT_SHADER_STAGES_EN=0x2030: unsupported geometry input or output assembly" for a geometry-routed vertex shader, with the registers `sceAgcCreatePrimState` passes | deferred once with that reason, a repeated call prepares and logs nothing, and a later draw prepares the stage at its first use | | registration failure | the scope and every ABI entry point rethrow a stored registration failure ("GetImageResource dword 0 is not a valid runtime value") for a pixel, a compute and a vertex stage | each logged once with the stored reason, nothing logged on a second pass, and the dispatch fails at use with the same reason | | vertex inputs | `ResolveGraphicsStagesAbi` throws "statically bound vertex attributes are not implemented" | logged once with that reason, no front-end build, and the draw fails with the same text | | rectangle pairs | the rect-list pairing throws "custom per-vertex interpolation is unsupported" | logged once with that reason; a draw with a null pixel on the same front succeeds, and the passthrough draw fails with the builder's text | Cost: I timed the success path of each entry point on main and on this branch (on a08de6827): 5 and 6 interleaved runs, 7 × 20,000 resolved-key calls and 7 × 100 new keys each. - Resolved keys took 1.9-2.6 µs per call; new keys 20-46 µs. - Every branch median was within the run-to-run spread, -2.5 % to +7.7 %. The largest difference is on a path this branch doesn't change. **The merge of `main` 82ddae75b6** (with #5872, the async driver log and the geometry subgroup check), on GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/38907790533)): the 19 prepared-shader modes and the async-log tests pass 5 runs in a row on Linux and Windows (the GPU modes skip on Windows). The run's other failures are libc's `precise_wait` on Linux, a timing test; `guest_kqueue` on Windows, which fails on `main` there; and `guest_shader_link` on Windows, which timed out once in five. On `main` 82ddae75b6 alone it times out the same way, on the ninth run after 8 passes ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/38911837922)). ### Checklist - [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: PPSA01556 #5169 (pipeline creation; to reach its title, Resident Evil Village also needs #5703 and a fix for the depth-sample check above) - [x] GPUs tested: NVIDIA GeForce RTX 3070 Laptop GPU, driver 617.42, Windows 11; Mesa lavapipe (CPU), Linux - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-15 13:26:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T13:26:40Z.


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 6639 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp L1316-1318
PR 6801 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp L1316-1318
PR 6966 core/libs/prx/libSceAgcDriver/tests/execution/PreparedShaders.cpp L786

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 1341 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 1368 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 1395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 2434 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 4891 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5021 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5115 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Shaders/ShaderRegistry.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
core/libs/prx/libSceAgcDriver/tests/execution/PreparedShaders.cpp
PR 5371 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5426 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5431 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 5499 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5609 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawCache.hpp
PR 5925 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ARCHITECTURE.md
PR 6044 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ARCHITECTURE.md
PR 6185 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6186 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6188 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawCache.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 6192 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6280 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6300 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6360 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6481 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6486 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6501 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6535 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6539 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawCache.hpp
PR 6606 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6612 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawCache.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 6701 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6718 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6747 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6759 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6763 core/libs/prx/libSceAgcDriver/CMakeLists.txt
docs/dev/ARCHITECTURE.md
PR 6788 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6808 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6820 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6856 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6867 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Shaders/ShaderRegistry.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
core/libs/prx/libSceAgcDriver/tests/execution/PreparedShaders.cpp
PR 6868 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6931 docs/dev/ARCHITECTURE.md
PR 6937 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6941 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6946 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawCache.hpp
core/libs/prx/libSceAgcDriver/Execution/include/Driver/Shaders/ShaderRegistry.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
docs/dev/ARCHITECTURE.md
PR 6947 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawCache.hpp
core/libs/prx/libSceAgcDriver/Execution/include/Driver/Shaders/ShaderRegistry.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
docs/dev/ARCHITECTURE.md
PR 6963 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6977 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp
PR 7201 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7223 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7332 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7450 docs/dev/ARCHITECTURE.md
PR 7505 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7604 core/libs/prx/libSceAgcDriver/CMakeLists.txt
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6193189618 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6366#issuecomment-6193189618). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-15T13:26:40Z. --- <!-- 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 6639](https://www.github.com/boykopovar/AnyPS5/pull/6639) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp` [L1316-1318](https://github.com/boykopovar/AnyPS5/blob/134a3510c81326b1eb6278117d393ac30897d0aa/core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp#L1316-L1318) | | | | [PR 6801](https://www.github.com/boykopovar/AnyPS5/pull/6801) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp` [L1316-1318](https://github.com/boykopovar/AnyPS5/blob/134a3510c81326b1eb6278117d393ac30897d0aa/core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp#L1316-L1318) | | | | [PR 6966](https://www.github.com/boykopovar/AnyPS5/pull/6966) | `core/libs/prx/libSceAgcDriver/tests/execution/PreparedShaders.cpp` [L786](https://github.com/boykopovar/AnyPS5/blob/134a3510c81326b1eb6278117d393ac30897d0aa/core/libs/prx/libSceAgcDriver/tests/execution/PreparedShaders.cpp#L786) | | | 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 1341](https://www.github.com/boykopovar/AnyPS5/pull/1341) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 1368](https://www.github.com/boykopovar/AnyPS5/pull/1368) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 1395](https://www.github.com/boykopovar/AnyPS5/pull/1395) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 2434](https://www.github.com/boykopovar/AnyPS5/pull/2434) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 4891](https://www.github.com/boykopovar/AnyPS5/pull/4891) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5115](https://www.github.com/boykopovar/AnyPS5/pull/5115) | `core/libs/prx/libSceAgcDriver/Execution/include/Driver/Shaders/ShaderRegistry.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/PreparedShaders.cpp` | | [PR 5371](https://www.github.com/boykopovar/AnyPS5/pull/5371) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5426](https://www.github.com/boykopovar/AnyPS5/pull/5426) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5431](https://www.github.com/boykopovar/AnyPS5/pull/5431) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp` | | [PR 5499](https://www.github.com/boykopovar/AnyPS5/pull/5499) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 5609](https://www.github.com/boykopovar/AnyPS5/pull/5609) | `core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawCache.hpp` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`docs/dev/ARCHITECTURE.md` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`docs/dev/ARCHITECTURE.md` | | [PR 6185](https://www.github.com/boykopovar/AnyPS5/pull/6185) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6186](https://www.github.com/boykopovar/AnyPS5/pull/6186) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawCache.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp` | | [PR 6192](https://www.github.com/boykopovar/AnyPS5/pull/6192) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6280](https://www.github.com/boykopovar/AnyPS5/pull/6280) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6300](https://www.github.com/boykopovar/AnyPS5/pull/6300) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6360](https://www.github.com/boykopovar/AnyPS5/pull/6360) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6481](https://www.github.com/boykopovar/AnyPS5/pull/6481) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6486](https://www.github.com/boykopovar/AnyPS5/pull/6486) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6501](https://www.github.com/boykopovar/AnyPS5/pull/6501) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6535](https://www.github.com/boykopovar/AnyPS5/pull/6535) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6539](https://www.github.com/boykopovar/AnyPS5/pull/6539) | `core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawCache.hpp` | | [PR 6606](https://www.github.com/boykopovar/AnyPS5/pull/6606) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6612](https://www.github.com/boykopovar/AnyPS5/pull/6612) | `core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawCache.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp` | | [PR 6701](https://www.github.com/boykopovar/AnyPS5/pull/6701) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6718](https://www.github.com/boykopovar/AnyPS5/pull/6718) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6747](https://www.github.com/boykopovar/AnyPS5/pull/6747) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6759](https://www.github.com/boykopovar/AnyPS5/pull/6759) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6763](https://www.github.com/boykopovar/AnyPS5/pull/6763) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`docs/dev/ARCHITECTURE.md` | | [PR 6788](https://www.github.com/boykopovar/AnyPS5/pull/6788) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6808](https://www.github.com/boykopovar/AnyPS5/pull/6808) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6820](https://www.github.com/boykopovar/AnyPS5/pull/6820) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6856](https://www.github.com/boykopovar/AnyPS5/pull/6856) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6867](https://www.github.com/boykopovar/AnyPS5/pull/6867) | `core/libs/prx/libSceAgcDriver/Execution/include/Driver/Shaders/ShaderRegistry.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/execution/PreparedShaders.cpp` | | [PR 6868](https://www.github.com/boykopovar/AnyPS5/pull/6868) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6931](https://www.github.com/boykopovar/AnyPS5/pull/6931) | `docs/dev/ARCHITECTURE.md` | | [PR 6937](https://www.github.com/boykopovar/AnyPS5/pull/6937) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6941](https://www.github.com/boykopovar/AnyPS5/pull/6941) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawCache.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/include/Driver/Shaders/ShaderRegistry.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp`<br>`docs/dev/ARCHITECTURE.md` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt`<br>`core/libs/prx/libSceAgcDriver/Execution/include/Driver/Draw/DrawCache.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/include/Driver/Shaders/ShaderRegistry.hpp`<br>`core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp`<br>`docs/dev/ARCHITECTURE.md` | | [PR 6963](https://www.github.com/boykopovar/AnyPS5/pull/6963) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7223](https://www.github.com/boykopovar/AnyPS5/pull/7223) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7450](https://www.github.com/boykopovar/AnyPS5/pull/7450) | `docs/dev/ARCHITECTURE.md` | | [PR 7505](https://www.github.com/boykopovar/AnyPS5/pull/7505) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` | | [PR 7604](https://www.github.com/boykopovar/AnyPS5/pull/7604) | `core/libs/prx/libSceAgcDriver/CMakeLists.txt` |
Scramblrrrr commented 2026-10-19 02:08:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Scramblrrrr on 2026-10-19T02:08:01Z.


Windows cross-test on clean main324e0e48e found six of the new ABI-deferral modes aborting during logger initialization: the test's inline FlushAsyncLog call instantiates its own PE-local AsyncLog, then the driver attempts to register a different end-flush callback. All six reproduce without our 007 stack. Small two-file fix in #7709 moves the existing flush helper into the driver translation unit; unchanged fixtures, 29/29 prepared/logger/shutdown tests pass on88c8320e3. The same fix on our refreshed 007 stack passes114/114 focused native checks. No title/FPS claim. AI-assisted: Codex.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6258125491 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/6366#issuecomment-6258125491). Originally posted by [Scramblrrrr](https://github.com/Scramblrrrr) on 2026-10-19T02:08:01Z. --- Windows cross-test on clean main324e0e48e found six of the new ABI-deferral modes aborting during logger initialization: the test's inline FlushAsyncLog call instantiates its own PE-local AsyncLog, then the driver attempts to register a different end-flush callback. All six reproduce without our 007 stack. Small two-file fix in #7709 moves the existing flush helper into the driver translation unit; unchanged fixtures, 29/29 prepared/logger/shutdown tests pass on88c8320e3. The same fix on our refreshed 007 stack passes114/114 focused native checks. No title/FPS claim. AI-assisted: Codex.
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!6366
No description provided.