feat(agc): emulate mesh pipeline draws with a compute pass when VK_EXT_mesh_shader is unavailable #17611

Open
SuarezPM wants to merge 15 commits from upstream-pr/17611 into main
SuarezPM commented 2026-11-09 02:30:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by SuarezPM on 2026-11-09T02:30:14Z.


What

Emulates mesh-path draws through a compute pass on devices without VK_EXT_mesh_shader (or with APS5_FORCE_MESH_COMPUTE=1). Supported subset only (see Known limitations). Supersedes #9356: commits c0faaafc0f, fe9ac9351c and ecf0a2b4f7 by @billythemenace2 are cherry-picked with authorship preserved, reconciled onto current main (recompile-request serialization 64, disk-cache format 97) with fallback hardening and tests; commit 479fb1cb41 and the merge are mine.

Activation matrix (capability x flag):

  • device with mesh shaders, no flag: native mesh path (unchanged)
  • device without mesh shaders: compute fallback (automatic; exercised with APS5_NO_MESH_SHADER=1)
  • APS5_FORCE_MESH_COMPUTE=1: compute fallback even on mesh-capable devices, to compare native vs fallback pixels
  • layout==0 mesh draw on a mesh device: native layer-window path (returns early, no compute)
  • oversized layers on a mesh device (more than maxMeshOutputLayers): native layer-window path, not compute (draw-time decision matches the compile-time one)
  • mesh-path points output and tessellation capture in the fallback: throw (no silent wrong render)

Tested

Linux x86_64, NVIDIA GeForce RTX 2060 SUPER (driver 615.78.08). Unit/execution coverage local (below) plus real-hardware runs by contributors (see Real hardware):

  • focal set (mesh/layered/graphics/shader-memory/request-serializer, 22 tests): default 22/22; APS5_FORCE_MESH_COMPUTE=1: 22/22 + 1 skip (mesh barycentric, expected message); APS5_NO_MESH_SHADER=1: 22/22 + 8 pre-existing skips, 0 fail
  • Rebase re-verification on RTX 2060 SUPER (driver 620.70.06, Linux x86_64, 23 tests after main added agc_driver_layered_volume_mesh): default 23/23; APS5_FORCE_MESH_COMPUTE=1: 22 pass + 1 skip (mesh barycentric, expected message); APS5_NO_MESH_SHADER=1: 14 pass + 9 pre-existing skips (mesh-less skip guards, follow-up), 0 fail
  • Vulkan validation (ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, -V logs): default 22/22, VUID-=0, no missing-layer warnings; FORCE 22/22 + 1 skip, VUID-=0; NOMESH 22/22 + 8 skips, VUID-=0
  • Rebase validation-layer comparison on the same machine/GPU (validation layer build older than system headers, so both sides log the same pre-existing pNext-chain and SPIR-V capability VUIDs): same 3 VUID types and per-test counts on main and this branch, same single pre-existing vector_window_writes failure on both, no missing-layer warnings either side, no new VUIDs from this branch
  • Real hardware without VK_EXT_mesh_shader (thanks @sherySJ and @GiannisG1): Intel HD 520 (Mesa ANV) — mesh, layered_volume_draw, graphics pass, 0 validation errors; NVIDIA GTX 1050 Ti (Pascal) and Intel HD 630 (Mesa ANV) — agc_driver_mesh now runs and passes (skips on main), no new VUIDs vs main; 34 homebrew titles on the GTX (headless Xvfb, 90 s each): 12 that died on "device does not support mesh shaders" now run the full session, 19 advance to the honest barycentric refusal, Rush 2 / Wave Race advance to the FMASK gap, Doom 3 BFG stops where main stops (headless run proves progress, not correct pixels)
  • Apple M4 MoltenVK 1.4.2 without VK_EXT_mesh_shader on head de5c510e8b (thanks @Jazeupoi): vkQuake renders 1166 frames ~44 fps with correct drawing where main stops at startup; 15 catalog homebrew titles 15 s each: 8 run with correct UI (SpeedBreaker 57 FPS, PSXS5 37, SwanStationPS5 60, DevilutionX 60, PSFlyCast 40, OGBox 39, Mario 64 52, FBNeo 60), 4 pass mesh draws then stop at 8-sample target vs 1/2/4 offered (not from this PR), 2 stop at barycentric #9387, PS5SX2 stops at viewport depth [-1,1] without depth_range_unrestricted
  • NVIDIA GTX 1060 3GB (Pascal, driver 581.80), Windows 11 (thanks @vgpastor): ccleste stops at the declared barycentric refusal with this head alone (12.5 s) exactly as on main (18.4 s); combined with an adapted #9387 carry plus the carry author's cache-policy guard and #24931, it runs 900.3 s with 34,794 presents, 0 VUID lines and no device loss (the full 33 MB trace read to EOF, no dropped events), with gameplay visually confirmed across the session; the same four focused graphics/mesh/barycentric tests pass, no skips. Those are follow-up commits, not part of this PR. The FIFO present-queue device loss on this GPU is #24931 plus APS5_NO_PRESENT_QUEUE=1, also orthogonal
  • AMD RX 5700 XT (RDNA1, gfx1010, driver 32.0.21045.5002), Windows 11 (thanks @DannyOppenheimer): 41 mesh/layered/graphics/barycentric/shader-memory/serializer tests on main b8b8f49250 and on the same tree with this head merged, both 0 failed and 0 VUIDs with the layer inserted in every Vulkan test. agc_driver_mesh skips on main and passes here; agc_driver_layered_volume_draw takes the target.meshAsCompute branch and its "mesh draw run as compute" check passes. First RDNA1 (gfx1010) data point, one generation from the console's gfx1013
  • AMD Radeon R9700 (RDNA4, gfx1201) with mesh shaders, Windows (thanks @Helldiverr): six focused tests pass 3/3 on all modes with 0 VUIDs, on the native mesh path by default and through the compute pass with APS5_FORCE_MESH_COMPUTE=1; a temporary probe counted 40 compute dispatches in the forced run (37 in agc_driver_mesh, 13 of them indirect) and removing the two dispatches fails exactly the three tests that depend on them. First run where both routes execute on one card
  • NVIDIA GTX 1050 Ti (Pascal, driver 580.178.04), Linux, SPIR-V 1.3 target without VK_EXT_mesh_shader (thanks @GiannisG1): 47 catalog titles that stop at the mesh-stage recompile on main, 90 s each headless Xvfb, head 59203ed861 merged onto main e09d1349b5 with -DANYPS5_ENABLE_SPIRV_TOOLS=ON -- 20 keep running the full session vs 0 on main (Crux2, DK64 Rekompiled, DevilutionX x2, James Pond 2, Links Awakening, Mario 64, OGBox, PSFlyCast, Rush 2, Second Coat London, Shining Force III, Ship of Harkinian, SpeedBreaker, SwanStationPS5, TrinityX360, VLC, Wave Race 64, Wind Waker HD, osu!); 25 stop at the mesh-path pixel shader (stage 5) with SPV_EXT_mesh_shader extension requires SPIR-V 1.4 or later (log-confirmed: Lantern Miner shader 0x200790c00 stage 5; pixel module still declares the mesh extension on the compute path -- emitter follow-up, not this PR); Conker (guest memory unreadable at 0x4009000000 after passing the mesh draws, honest throw, separate triage still open) and ProsperoAI (debug-label run 7199688305: no host device loss, title-side 10 s fence timeout + abort; cold cache ~5.5 s preparing draw-8 pair 0x201d80900/0x201d80f00, warm cache reaches the same stage-5 emitter ceiling at 0x201d86400 as the 25; dispatch 1x1x1 rules out huge dispatch; Dean flag withdrawn, emitter follow-up covers it)
  • Merged current main (bc4cddf422, #25434 included) and fixed the prebuild collision it introduced: Pipeline::Prebuild returns false when MeshDrawRunsAsCompute is set, so the compiled mesh program is never handed to a graphics pipeline library on a device without VK_EXT_mesh_shader, and the constructor now requires that no stage is still Mesh when meshCompute is set. Re-verified with the validation layer: 23 focused tests pass in default, APS5_FORCE_MESH_COMPUTE=1 and APS5_NO_MESH_SHADER=1, 0 VUID- lines, layer inserted in every run
  • python3 tools/check_conventions.py --base origin/main: All conventions checks passed
  • Serialization 64 (blacklist 58-61 kept) / format 97 taken on this branch (main is at 63/96; the new disk-format version covers the new mesh record layout in artifacts)

Known limitations (follow-ups, not in this PR): compute readbacks have no eviction yet; multi-record CPU indirect mesh draws run as compute throw instead of dispatching per record (see debt entry); a mesh shader writing a viewport index other than the fallback path has no dedicated throw (no cheap signal; documented for review); no execution-level test pins the per-draw meshAsCompute override; no defensive meshAsCompute => !meshWindowBuffer assert in Recompiler/SpirvEmitter (only the two driver constructors set the flags).

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
  • Fixes: none (supersedes #9356, does not close it; will comment there)
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 2060 SUPER, driver 615.78.08, Linux x86_64 (AGC/shader-recompiler validation-layer runs) + contributor runs: Intel HD 520 (Mesa ANV), NVIDIA GTX 1050 Ti (Pascal), Intel HD 630 (Mesa ANV), llvmpipe; 34 homebrew titles on the GTX (headless); Apple M4 MoltenVK 1.4.2 without mesh shaders: vkQuake + 15 catalog titles on de5c510e8b; NVIDIA GTX 1060 3GB (Pascal) on Windows 11, ccleste with the combined #9387 carry; AMD RX 5700 XT (RDNA1) on Windows 11, 41-test A/B against main; AMD R9700 (RDNA4) on Windows, both routes on one card with a negative control; NVIDIA GTX 1050 Ti title run 20/47 full-session (pixel-stage ceiling is follow-up)
  • AI-assisted: yes

Overlap note: tools/pr_overlap.py fails closed listing open PRs with adjacent files (the tool timed out on a full scan here, so this note is manual). #16413 landed and is integrated in this branch (its async MaterializeInBackground path now hosts the re-derived per-draw override; no action left). #15548 stacks on top of this PR and needs a rebase after landing (size asserts already account for the mesh key field). Manually compared hunk-by-hunk against current main: #15917 touches adjacent lines in the same functions (buildTarget, emitVariant, SpirvTarget, cache-key append, Emit mesh-window area; different lines, should auto-merge); #16115, #16260, #16088, #16474, #16887 share files but all hunks are 25+ lines away; docs-only adjacency in ENVIRONMENT.md/debt files is append-style. #9356 overlap is by design (superseded).

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5217759540 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17611). Originally posted by [SuarezPM](https://github.com/SuarezPM) on 2026-11-09T02:30:14Z. --- ### What Emulates mesh-path draws through a compute pass on devices without `VK_EXT_mesh_shader` (or with `APS5_FORCE_MESH_COMPUTE=1`). Supported subset only (see Known limitations). Supersedes #9356: commits c0faaafc0f, fe9ac9351c and ecf0a2b4f7 by @billythemenace2 are cherry-picked with authorship preserved, reconciled onto current main (recompile-request serialization 64, disk-cache format 97) with fallback hardening and tests; commit 479fb1cb41 and the merge are mine. Activation matrix (capability x flag): - device with mesh shaders, no flag: native mesh path (unchanged) - device without mesh shaders: compute fallback (automatic; exercised with APS5_NO_MESH_SHADER=1) - APS5_FORCE_MESH_COMPUTE=1: compute fallback even on mesh-capable devices, to compare native vs fallback pixels - layout==0 mesh draw on a mesh device: native layer-window path (returns early, no compute) - oversized layers on a mesh device (more than `maxMeshOutputLayers`): native layer-window path, not compute (draw-time decision matches the compile-time one) - mesh-path points output and tessellation capture in the fallback: throw (no silent wrong render) ### Tested Linux x86_64, NVIDIA GeForce RTX 2060 SUPER (driver 615.78.08). Unit/execution coverage local (below) plus real-hardware runs by contributors (see Real hardware): - focal set (mesh/layered/graphics/shader-memory/request-serializer, 22 tests): default 22/22; APS5_FORCE_MESH_COMPUTE=1: 22/22 + 1 skip (mesh barycentric, expected message); APS5_NO_MESH_SHADER=1: 22/22 + 8 pre-existing skips, 0 fail - Rebase re-verification on RTX 2060 SUPER (driver 620.70.06, Linux x86_64, 23 tests after main added agc_driver_layered_volume_mesh): default 23/23; APS5_FORCE_MESH_COMPUTE=1: 22 pass + 1 skip (mesh barycentric, expected message); APS5_NO_MESH_SHADER=1: 14 pass + 9 pre-existing skips (mesh-less skip guards, follow-up), 0 fail - Vulkan validation (ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, -V logs): default 22/22, VUID-=0, no missing-layer warnings; FORCE 22/22 + 1 skip, VUID-=0; NOMESH 22/22 + 8 skips, VUID-=0 - Rebase validation-layer comparison on the same machine/GPU (validation layer build older than system headers, so both sides log the same pre-existing pNext-chain and SPIR-V capability VUIDs): same 3 VUID types and per-test counts on main and this branch, same single pre-existing vector_window_writes failure on both, no missing-layer warnings either side, no new VUIDs from this branch - Real hardware without VK_EXT_mesh_shader (thanks @sherySJ and @GiannisG1): Intel HD 520 (Mesa ANV) — mesh, layered_volume_draw, graphics pass, 0 validation errors; NVIDIA GTX 1050 Ti (Pascal) and Intel HD 630 (Mesa ANV) — agc_driver_mesh now runs and passes (skips on main), no new VUIDs vs main; 34 homebrew titles on the GTX (headless Xvfb, 90 s each): 12 that died on "device does not support mesh shaders" now run the full session, 19 advance to the honest barycentric refusal, Rush 2 / Wave Race advance to the FMASK gap, Doom 3 BFG stops where main stops (headless run proves progress, not correct pixels) - Apple M4 MoltenVK 1.4.2 without VK_EXT_mesh_shader on head de5c510e8b (thanks @Jazeupoi): vkQuake renders 1166 frames ~44 fps with correct drawing where main stops at startup; 15 catalog homebrew titles 15 s each: 8 run with correct UI (SpeedBreaker 57 FPS, PSXS5 37, SwanStationPS5 60, DevilutionX 60, PSFlyCast 40, OGBox 39, Mario 64 52, FBNeo 60), 4 pass mesh draws then stop at 8-sample target vs 1/2/4 offered (not from this PR), 2 stop at barycentric #9387, PS5SX2 stops at viewport depth [-1,1] without depth_range_unrestricted - NVIDIA GTX 1060 3GB (Pascal, driver 581.80), Windows 11 (thanks @vgpastor): ccleste stops at the declared barycentric refusal with this head alone (12.5 s) exactly as on main (18.4 s); combined with an adapted #9387 carry plus the carry author's cache-policy guard and #24931, it runs 900.3 s with 34,794 presents, 0 VUID lines and no device loss (the full 33 MB trace read to EOF, no dropped events), with gameplay visually confirmed across the session; the same four focused graphics/mesh/barycentric tests pass, no skips. Those are follow-up commits, not part of this PR. The FIFO present-queue device loss on this GPU is #24931 plus `APS5_NO_PRESENT_QUEUE=1`, also orthogonal - AMD RX 5700 XT (RDNA1, gfx1010, driver 32.0.21045.5002), Windows 11 (thanks @DannyOppenheimer): 41 mesh/layered/graphics/barycentric/shader-memory/serializer tests on `main` `b8b8f49250` and on the same tree with this head merged, both 0 failed and 0 VUIDs with the layer inserted in every Vulkan test. `agc_driver_mesh` skips on main and passes here; `agc_driver_layered_volume_draw` takes the `target.meshAsCompute` branch and its "mesh draw run as compute" check passes. First RDNA1 (gfx1010) data point, one generation from the console's gfx1013 - AMD Radeon R9700 (RDNA4, gfx1201) with mesh shaders, Windows (thanks @Helldiverr): six focused tests pass 3/3 on all modes with 0 VUIDs, on the native mesh path by default and through the compute pass with `APS5_FORCE_MESH_COMPUTE=1`; a temporary probe counted 40 compute dispatches in the forced run (37 in `agc_driver_mesh`, 13 of them indirect) and removing the two dispatches fails exactly the three tests that depend on them. First run where both routes execute on one card - NVIDIA GTX 1050 Ti (Pascal, driver 580.178.04), Linux, SPIR-V 1.3 target without `VK_EXT_mesh_shader` (thanks @GiannisG1): 47 catalog titles that stop at the mesh-stage recompile on `main`, 90 s each headless Xvfb, head `59203ed861` merged onto `main` `e09d1349b5` with `-DANYPS5_ENABLE_SPIRV_TOOLS=ON` -- 20 keep running the full session vs 0 on `main` (Crux2, DK64 Rekompiled, DevilutionX x2, James Pond 2, Links Awakening, Mario 64, OGBox, PSFlyCast, Rush 2, Second Coat London, Shining Force III, Ship of Harkinian, SpeedBreaker, SwanStationPS5, TrinityX360, VLC, Wave Race 64, Wind Waker HD, osu!); 25 stop at the mesh-path pixel shader (stage 5) with SPV_EXT_mesh_shader extension requires SPIR-V 1.4 or later (log-confirmed: Lantern Miner shader 0x200790c00 stage 5; pixel module still declares the mesh extension on the compute path -- emitter follow-up, not this PR); Conker (guest memory unreadable at 0x4009000000 after passing the mesh draws, honest throw, separate triage still open) and ProsperoAI (debug-label run 7199688305: no host device loss, title-side 10 s fence timeout + abort; cold cache ~5.5 s preparing draw-8 pair 0x201d80900/0x201d80f00, warm cache reaches the same stage-5 emitter ceiling at 0x201d86400 as the 25; dispatch 1x1x1 rules out huge dispatch; Dean flag withdrawn, emitter follow-up covers it) - Merged current `main` (`bc4cddf422`, #25434 included) and fixed the prebuild collision it introduced: `Pipeline::Prebuild` returns false when `MeshDrawRunsAsCompute` is set, so the compiled mesh program is never handed to a graphics pipeline library on a device without `VK_EXT_mesh_shader`, and the constructor now requires that no stage is still Mesh when `meshCompute` is set. Re-verified with the validation layer: 23 focused tests pass in default, `APS5_FORCE_MESH_COMPUTE=1` and `APS5_NO_MESH_SHADER=1`, 0 `VUID-` lines, layer inserted in every run - python3 tools/check_conventions.py --base origin/main: All conventions checks passed - Serialization 64 (blacklist 58-61 kept) / format 97 taken on this branch (main is at 63/96; the new disk-format version covers the new mesh record layout in artifacts) Known limitations (follow-ups, not in this PR): compute readbacks have no eviction yet; multi-record CPU indirect mesh draws run as compute throw instead of dispatching per record (see debt entry); a mesh shader writing a viewport index other than the fallback path has no dedicated throw (no cheap signal; documented for review); no execution-level test pins the per-draw meshAsCompute override; no defensive meshAsCompute => !meshWindowBuffer assert in Recompiler/SpirvEmitter (only the two driver constructors set the flags). ### 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] Fixes: none (supersedes #9356, does not close it; will comment there) - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 2060 SUPER, driver 615.78.08, Linux x86_64 (AGC/shader-recompiler validation-layer runs) + contributor runs: Intel HD 520 (Mesa ANV), NVIDIA GTX 1050 Ti (Pascal), Intel HD 630 (Mesa ANV), llvmpipe; 34 homebrew titles on the GTX (headless); Apple M4 MoltenVK 1.4.2 without mesh shaders: vkQuake + 15 catalog titles on de5c510e8b; NVIDIA GTX 1060 3GB (Pascal) on Windows 11, ccleste with the combined #9387 carry; AMD RX 5700 XT (RDNA1) on Windows 11, 41-test A/B against main; AMD R9700 (RDNA4) on Windows, both routes on one card with a negative control; NVIDIA GTX 1050 Ti title run 20/47 full-session (pixel-stage ceiling is follow-up) - [x] AI-assisted: yes Overlap note: tools/pr_overlap.py fails closed listing open PRs with adjacent files (the tool timed out on a full scan here, so this note is manual). #16413 landed and is integrated in this branch (its async MaterializeInBackground path now hosts the re-derived per-draw override; no action left). #15548 stacks on top of this PR and needs a rebase after landing (size asserts already account for the mesh key field). Manually compared hunk-by-hunk against current main: #15917 touches adjacent lines in the same functions (buildTarget, emitVariant, SpirvTarget, cache-key append, Emit mesh-window area; different lines, should auto-merge); #16115, #16260, #16088, #16474, #16887 share files but all hunks are 25+ lines away; docs-only adjacency in ENVIRONMENT.md/debt files is append-style. #9356 overlap is by design (superseded).
kurexw commented 2026-11-16 23:12:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by kurexw on 2026-11-16T23:12:51Z.

Review: COMMENTED


Tested on an Apple M4 (macOS 27.2, MoltenVK 1.4.2 from the LunarG Vulkan SDK 1.4.363.1, x86-64 build under Rosetta 2). This MoltenVK has no VK_EXT_mesh_shader, so it takes the compute route this PR adds.

Not tested on current main. A trial merge onto main at 459f4f8c22 conflicts in 15 files:

  • core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cpp
  • core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
  • core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp
  • core/libs/prx/libSceAgcDriver/Graphics/include/Pipeline.hpp
  • core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp
  • core/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cpp
  • core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
  • core/shader/recompiler/CacheKey.hpp
  • core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
  • core/shader/recompiler/Recompiler.cpp
  • core/shader/recompiler/Recompiler.hpp
  • core/shader/recompiler/ShaderDiskCache.hpp
  • core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp
  • core/shader/recompiler/tests/RequestSerializerTests.cpp
  • docs/dev/ENVIRONMENT.md

So I built the head (70015a5ccf) as it is and compared it with its own merge-base (47adcad89a). Same tests, same environment, three runs per side.

The merge-base doesn't build on macOS. libc (RunReport.cpp), libkernel (Stdio.cpp), libSceLibcInternal (BasicString.cpp) and libSceAgcDriver (VulkanDevice.cpp, ::environ) fail to compile, so every AGC test was Not Run on both sides. I applied the same four-file shim to the base and the head; it's below.

  • Three of the lines are compile-only.
  • The extern char** environ; declaration is what current main has.
  • The Stdio.cpp lines do change runtime behaviour: they drop the macOS MNT_NOEXEC flag from sceKernelFstatfs/statfs results. None of the tests below calls statfs.
  • Of the shimmed files, the PR changes only VulkanDevice.cpp, and the shim applies to it unchanged.
Build shim applied to both sides
diff --git a/core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp b/core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
index a67a7f5d7f..4311750b99 100644
--- a/core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
+++ b/core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
@@ -74,6 +74,7 @@
 #include <windows.h>
 #else
 #include <unistd.h>
+extern char** environ;
 #endif
 #include <atomic>
 #include <chrono>
diff --git a/core/libs/prx/libSceLibcInternal/BasicString.cpp b/core/libs/prx/libSceLibcInternal/BasicString.cpp
index 30fcbbd434..001b74f47c 100644
--- a/core/libs/prx/libSceLibcInternal/BasicString.cpp
+++ b/core/libs/prx/libSceLibcInternal/BasicString.cpp
@@ -42,7 +42,7 @@ void Reserve(String* string, std::size_t size) {
 
 std::size_t Clamp(const String* source, std::size_t position, std::size_t count) {
     if (position > source->size) _ZNKSs5_XranEv_nid_postfix(source);
-    return std::min(count, source->size - position);
+    return std::min<std::size_t>(count, source->size - position);
 }
 
 void EraseRange(String* string, std::size_t position, std::size_t count) {
diff --git a/core/libs/prx/libc/src/RunReport.cpp b/core/libs/prx/libc/src/RunReport.cpp
index 53b018ccaf..cebe783520 100644
--- a/core/libs/prx/libc/src/RunReport.cpp
+++ b/core/libs/prx/libc/src/RunReport.cpp
@@ -2,6 +2,7 @@
 #include "prx/libc/include/General.hpp"
 
 #include <algorithm>
+#include <thread>
 #include <array>
 #include <atomic>
 #include <cctype>
diff --git a/core/libs/prx/libkernel/File/src/Stdio.cpp b/core/libs/prx/libkernel/File/src/Stdio.cpp
index 28f0f94b88..694d81330b 100644
--- a/core/libs/prx/libkernel/File/src/Stdio.cpp
+++ b/core/libs/prx/libkernel/File/src/Stdio.cpp
@@ -712,8 +712,6 @@ static int FillStatfs(const struct statvfs& host, KernelStatfs* fs) {
     if (host.f_flag & ST_RDONLY) fs->f_flags |= KERNEL_MNT_RDONLY;
     if (host.f_flag & ST_NOSUID) fs->f_flags |= KERNEL_MNT_NOSUID;
 #ifdef __APPLE__
-    struct statfs mount{};
-    if (::fstatfs(descriptor, &mount) == 0 && (mount.f_flags & MNT_NOEXEC)) fs->f_flags |= KERNEL_MNT_NOEXEC;
 #else
     if (host.f_flag & ST_NOEXEC) fs->f_flags |= KERNEL_MNT_NOEXEC;
 #endif

Method: ctest --test-dir build -R '^(agc_driver_.*(mesh|barycentric|layered_volume).*|agc_mesh_.*|agc_fragment_barycentric|agc_driver_unobserved_provoking_vertex|agc_shader_memory|request_serializer)$' -V, with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation and VK_LOADER_DEBUG=layer. All 15 test processes that create a Vulkan instance logged Insert instance layer "VK_LAYER_KHRONOS_validation" (layer 1.4.363) on both sides. None logged the missing-layer message, and there were 0 VUID- lines on either side. All three runs were identical.

Test merge-base + shim this PR + shim
agc_driver_mesh Skipped ("the device has no VK_EXT_mesh_shader") Passed ("Mesh tests passed")
agc_driver_mesh_barycentric_emulation, _draw_relocation, _index_cache, _provoking_layer, _provoking_vertex, _vector_window_waves, _vector_window_writes Skipped Skipped ("the device has no VK_EXT_mesh_shader")
agc_driver_layered_volume_mesh Skipped Skipped ("mesh execution requires a supported 32- or 64-lane host subgroup layout")
agc_driver_layered_volume_draw, _submit, _vertex, _vertex_no_gpl, agc_driver_pixel_barycentric_emulation, agc_driver_unobserved_provoking_vertex, agc_fragment_barycentric, agc_mesh_output_budget, agc_shader_memory, request_serializer Passed Passed

So on an Apple GPU, the compute route passes the Mesh.cpp checks, and nothing in this set regresses. But the driver-level mesh execution tests (MeshProvokingVertex.cpp, MeshDrawRelocation.cpp, MeshBarycentricEmulation.cpp, ...) still skip as soon as the device lacks VK_EXT_mesh_shader (for example TargetHasCapability(..., spv::CapabilityMeshShadingEXT) at MeshProvokingVertex.cpp:204). They never submit a mesh draw through the compute route on MoltenVK. Gating them on "mesh shaders or the compute route" would let them cover the path this PR adds on exactly the devices it targets. As it stands, this run doesn't show that a submitted mesh-path draw renders correctly through compute.

Overlap: #15548 shares 705 of this PR's 717 added lines (comparing the added lines of each diff against its own merge-base). Both carry the commits of #9356 (billythemenace2, opened 2026-10-21), which is the oldest of the three; this PR was opened 2026-11-09 and #15548 on 2026-11-03.

I didn't test Linux, Windows or another GPU, or any title.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5929578056 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17611#pullrequestreview-5929578056). Originally posted by [kurexw](https://github.com/kurexw) on 2026-11-16T23:12:51Z. **Review:** COMMENTED --- Tested on an Apple M4 (macOS 27.2, MoltenVK 1.4.2 from the LunarG Vulkan SDK 1.4.363.1, x86-64 build under Rosetta 2). This MoltenVK has no `VK_EXT_mesh_shader`, so it takes the compute route this PR adds. **Not tested on current `main`.** A trial merge onto `main` at 459f4f8c22 conflicts in 15 files: - `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cpp` - `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` - `core/libs/prx/libSceAgcDriver/Graphics/include/Draw.hpp` - `core/libs/prx/libSceAgcDriver/Graphics/include/Pipeline.hpp` - `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp` - `core/libs/prx/libSceAgcDriver/Graphics/src/ShaderValidation.cpp` - `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` - `core/shader/recompiler/CacheKey.hpp` - `core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp` - `core/shader/recompiler/Recompiler.cpp` - `core/shader/recompiler/Recompiler.hpp` - `core/shader/recompiler/ShaderDiskCache.hpp` - `core/shader/recompiler/SpirvBackend/include/SpirvBackend/SpirvEmitter.hpp` - `core/shader/recompiler/tests/RequestSerializerTests.cpp` - `docs/dev/ENVIRONMENT.md` So I built the head (70015a5ccf) as it is and compared it with its own merge-base (47adcad89a). Same tests, same environment, three runs per side. **The merge-base doesn't build on macOS.** `libc` (RunReport.cpp), `libkernel` (Stdio.cpp), `libSceLibcInternal` (BasicString.cpp) and `libSceAgcDriver` (VulkanDevice.cpp, `::environ`) fail to compile, so every AGC test was Not Run on both sides. I applied the same four-file shim to the base and the head; it's below. - Three of the lines are compile-only. - The `extern char** environ;` declaration is what current `main` has. - The `Stdio.cpp` lines do change runtime behaviour: they drop the macOS `MNT_NOEXEC` flag from `sceKernelFstatfs`/`statfs` results. None of the tests below calls statfs. - Of the shimmed files, the PR changes only `VulkanDevice.cpp`, and the shim applies to it unchanged. <details><summary>Build shim applied to both sides</summary> ```diff diff --git a/core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp b/core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp index a67a7f5d7f..4311750b99 100644 --- a/core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp +++ b/core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp @@ -74,6 +74,7 @@ #include <windows.h> #else #include <unistd.h> +extern char** environ; #endif #include <atomic> #include <chrono> diff --git a/core/libs/prx/libSceLibcInternal/BasicString.cpp b/core/libs/prx/libSceLibcInternal/BasicString.cpp index 30fcbbd434..001b74f47c 100644 --- a/core/libs/prx/libSceLibcInternal/BasicString.cpp +++ b/core/libs/prx/libSceLibcInternal/BasicString.cpp @@ -42,7 +42,7 @@ void Reserve(String* string, std::size_t size) { std::size_t Clamp(const String* source, std::size_t position, std::size_t count) { if (position > source->size) _ZNKSs5_XranEv_nid_postfix(source); - return std::min(count, source->size - position); + return std::min<std::size_t>(count, source->size - position); } void EraseRange(String* string, std::size_t position, std::size_t count) { diff --git a/core/libs/prx/libc/src/RunReport.cpp b/core/libs/prx/libc/src/RunReport.cpp index 53b018ccaf..cebe783520 100644 --- a/core/libs/prx/libc/src/RunReport.cpp +++ b/core/libs/prx/libc/src/RunReport.cpp @@ -2,6 +2,7 @@ #include "prx/libc/include/General.hpp" #include <algorithm> +#include <thread> #include <array> #include <atomic> #include <cctype> diff --git a/core/libs/prx/libkernel/File/src/Stdio.cpp b/core/libs/prx/libkernel/File/src/Stdio.cpp index 28f0f94b88..694d81330b 100644 --- a/core/libs/prx/libkernel/File/src/Stdio.cpp +++ b/core/libs/prx/libkernel/File/src/Stdio.cpp @@ -712,8 +712,6 @@ static int FillStatfs(const struct statvfs& host, KernelStatfs* fs) { if (host.f_flag & ST_RDONLY) fs->f_flags |= KERNEL_MNT_RDONLY; if (host.f_flag & ST_NOSUID) fs->f_flags |= KERNEL_MNT_NOSUID; #ifdef __APPLE__ - struct statfs mount{}; - if (::fstatfs(descriptor, &mount) == 0 && (mount.f_flags & MNT_NOEXEC)) fs->f_flags |= KERNEL_MNT_NOEXEC; #else if (host.f_flag & ST_NOEXEC) fs->f_flags |= KERNEL_MNT_NOEXEC; #endif ``` </details> **Method:** `ctest --test-dir build -R '^(agc_driver_.*(mesh|barycentric|layered_volume).*|agc_mesh_.*|agc_fragment_barycentric|agc_driver_unobserved_provoking_vertex|agc_shader_memory|request_serializer)$' -V`, with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` and `VK_LOADER_DEBUG=layer`. All 15 test processes that create a Vulkan instance logged `Insert instance layer "VK_LAYER_KHRONOS_validation"` (layer 1.4.363) on both sides. None logged the missing-layer message, and there were 0 `VUID-` lines on either side. All three runs were identical. | Test | merge-base + shim | this PR + shim | | --- | --- | --- | | `agc_driver_mesh` | Skipped ("the device has no VK_EXT_mesh_shader") | **Passed** ("Mesh tests passed") | | `agc_driver_mesh_barycentric_emulation`, `_draw_relocation`, `_index_cache`, `_provoking_layer`, `_provoking_vertex`, `_vector_window_waves`, `_vector_window_writes` | Skipped | Skipped ("the device has no VK_EXT_mesh_shader") | | `agc_driver_layered_volume_mesh` | Skipped | Skipped ("mesh execution requires a supported 32- or 64-lane host subgroup layout") | | `agc_driver_layered_volume_draw`, `_submit`, `_vertex`, `_vertex_no_gpl`, `agc_driver_pixel_barycentric_emulation`, `agc_driver_unobserved_provoking_vertex`, `agc_fragment_barycentric`, `agc_mesh_output_budget`, `agc_shader_memory`, `request_serializer` | Passed | Passed | So on an Apple GPU, the compute route passes the `Mesh.cpp` checks, and nothing in this set regresses. But the driver-level mesh execution tests (`MeshProvokingVertex.cpp`, `MeshDrawRelocation.cpp`, `MeshBarycentricEmulation.cpp`, ...) still skip as soon as the device lacks `VK_EXT_mesh_shader` (for example `TargetHasCapability(..., spv::CapabilityMeshShadingEXT)` at `MeshProvokingVertex.cpp:204`). They never submit a mesh draw through the compute route on MoltenVK. Gating them on "mesh shaders or the compute route" would let them cover the path this PR adds on exactly the devices it targets. As it stands, this run doesn't show that a submitted mesh-path draw renders correctly through compute. **Overlap:** #15548 shares 705 of this PR's 717 added lines (comparing the added lines of each diff against its own merge-base). Both carry the commits of #9356 (billythemenace2, opened 2026-10-21), which is the oldest of the three; this PR was opened 2026-11-09 and #15548 on 2026-11-03. I didn't test Linux, Windows or another GPU, or any title.
MarcZX10 commented 2026-11-20 15:26:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T15:26:51Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

Changes are required before merge: fix compute fallback activation so it honors the layer limit and documented force flag consistently.

What I ran

Reviewed head 70015a5ccffd2c9a10a9acd362ef4ec6e42d1ba2 using the prepared diff and pinned reader. No tests were run. Author-reported test results are not independently verified.

Results

Check Result Note
Diff and targeted code review failed Fallback activation is inconsistent
Tests not run Not independently verified

Findings

Blocking

  • core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp:1297: the overload called throughout draw planning discards maxMeshOutputLayers and returns compute only when mesh shaders are unavailable. The context overload separately forces compute for APS5_FORCE_MESH_COMPUTE, but the bool, uint32_t, State overload used by DrawCapture.cpp and MeshArgumentRulesFor does not receive that override. Consequently, mesh capable devices with oversized layer draws will not use the compute fallback even though the description says those draws do; forcing compute also does not affect the capture-side target selection. Use one shared activation decision that accounts for the force flag and the layer requirement, so all call sites agree.

Non-blocking

None.

Not verified

No tests or Vulkan validation were run. The author-reported hardware runs and test results were not independently confirmed. Full text was available and read for 33 of 36 changed files; core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp, core/libs/prx/libSceAgcDriver/tests/Graphics.cpp, and core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp were excluded by the review folder size rule and were not read. The diff artifact was read only through line 2050 of 2264; remaining diff content was not reviewed.

To get this to a good state

Unify fallback selection and ensure the force and oversized-layer cases are consistently handled across compilation, capture, and draw recording; then rerun the focal tests and Vulkan validation on the new head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5995105524 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17611#pullrequestreview-5995105524). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-20T15:26:51Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested Changes are required before merge: fix compute fallback activation so it honors the layer limit and documented force flag consistently. ## What I ran Reviewed head `70015a5ccffd2c9a10a9acd362ef4ec6e42d1ba2` using the prepared diff and pinned reader. No tests were run. Author-reported test results are not independently verified. ## Results | Check | Result | Note | |---|---|---| | Diff and targeted code review | failed | Fallback activation is inconsistent | | Tests | not run | Not independently verified | ## Findings ### Blocking - `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp:1297`: the overload called throughout draw planning discards `maxMeshOutputLayers` and returns compute only when mesh shaders are unavailable. The context overload separately forces compute for `APS5_FORCE_MESH_COMPUTE`, but the `bool, uint32_t, State` overload used by `DrawCapture.cpp` and `MeshArgumentRulesFor` does not receive that override. Consequently, mesh capable devices with oversized layer draws will not use the compute fallback even though the description says those draws do; forcing compute also does not affect the capture-side target selection. Use one shared activation decision that accounts for the force flag and the layer requirement, so all call sites agree. ### Non-blocking None. ## Not verified No tests or Vulkan validation were run. The author-reported hardware runs and test results were not independently confirmed. Full text was available and read for 33 of 36 changed files; `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp`, `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`, and `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` were excluded by the review folder size rule and were not read. The diff artifact was read only through line 2050 of 2264; remaining diff content was not reviewed. ## To get this to a good state Unify fallback selection and ensure the force and oversized-layer cases are consistently handled across compilation, capture, and draw recording; then rerun the focal tests and Vulkan validation on the new head.
Jazeupoi commented 2026-11-21 02:18:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Jazeupoi on 2026-11-21T02:18:58Z.

Review: COMMENTED


This complements @kurexw's run, which covered tests but no title: here a whole game renders through the compute route on MoltenVK.

Tested with real games on an Apple M4 (macOS 27.0.1, MoltenVK 1.4.2, x86-64 Release under Rosetta 2; this MoltenVK has neither VK_EXT_mesh_shader nor VK_KHR_fragment_shader_barycentric). I built the head 70015a5ccf on its own merge-base (47adcad89a) plus #11049 and #17425 for the macOS build. That base needed five local-only macOS compile fixes, already solved on current main and unrelated to this PR: missing <thread> in RunReport.cpp, the Apple branch of FillStatfs, size_t/uint64_t mismatches in BasicString.cpp, libSceAppContent and libSceNpCppWebApi, and ::environ in VulkanDevice.cpp.

Title current main (adbc1273c5) this PR
vkQuake stops at startup: the device has no mesh shader support plays: 1,166 frames presented in 28 s (~44 FPS average, 52 on screen), 44 shaders compiled with no failures, clean exit; the level, enemies, weapon and HUD draw correctly
ccleste stops stops: "a pixel shader on the mesh path reads barycentrics, and this device has neither VK_KHR_fragment_shader_barycentric nor mesh shaders"
PSteroid5 stops stops with the same error

So the compute route unblocks one title on macOS. The other two need pixel-shader barycentrics without mesh shaders, which is what #9387 addresses.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6002155105 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17611#pullrequestreview-6002155105). Originally posted by [Jazeupoi](https://github.com/Jazeupoi) on 2026-11-21T02:18:58Z. **Review:** COMMENTED --- This complements @kurexw's run, which covered tests but no title: here a whole game renders through the compute route on MoltenVK. Tested with real games on an Apple M4 (macOS 27.0.1, MoltenVK 1.4.2, x86-64 Release under Rosetta 2; this MoltenVK has neither `VK_EXT_mesh_shader` nor `VK_KHR_fragment_shader_barycentric`). I built the head `70015a5ccf` on its own merge-base (`47adcad89a`) plus #11049 and #17425 for the macOS build. That base needed five local-only macOS compile fixes, already solved on current `main` and unrelated to this PR: missing `<thread>` in `RunReport.cpp`, the Apple branch of `FillStatfs`, `size_t`/`uint64_t` mismatches in `BasicString.cpp`, `libSceAppContent` and `libSceNpCppWebApi`, and `::environ` in `VulkanDevice.cpp`. | Title | current `main` (`adbc1273c5`) | this PR | |---|---|---| | vkQuake | stops at startup: the device has no mesh shader support | **plays**: 1,166 frames presented in 28 s (~44 FPS average, 52 on screen), 44 shaders compiled with no failures, clean exit; the level, enemies, weapon and HUD draw correctly | | ccleste | stops | stops: "a pixel shader on the mesh path reads barycentrics, and this device has neither VK_KHR_fragment_shader_barycentric nor mesh shaders" | | PSteroid5 | stops | stops with the same error | So the compute route unblocks one title on macOS. The other two need pixel-shader barycentrics without mesh shaders, which is what #9387 addresses. AI-assisted: yes (Claude Code)
Jazeupoi commented 2026-11-21 16:44:47 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Jazeupoi on 2026-11-21T16:44:47Z.

Review: COMMENTED


More Mac data for this PR, from 15 catalog homebrew titles that stop on main with AGC graphics: device does not support mesh shaders (PS5SX2 stops earlier, on its viewport depth range).

Apple M4, macOS 27.0.1, MoltenVK 1.4.2 (no VK_EXT_mesh_shader), x86_64 under Rosetta. Head de5c510e8b merged into main of 2026-11-21, 15 s per title, no game data.

Title With this PR What it shows
SpeedBreaker (PPSA90505) runs, 57 FPS setup screen asking for the disc image
PSXS5 (PPSA97510) runs, 37 FPS empty library
SwanStationPS5 (PPSA98510) runs, 60 FPS empty library
DevilutionX (PPSA98514) runs, 60 FPS its "Data File Error" dialog (no MPQ)
PSFlyCast (PPSA99247) runs, 40 FPS home screen, still fading in at the capture
OGBox (PPSA99251) runs, 39 FPS first-run storage setup
Mario 64 (PPSA99310) runs, 52 FPS "Game files needed" dialog
FBNeo PS5 (PPSA99924) runs, 60 FPS empty ROM list
DK64, Conker's Bad Fur Day, Rush 2, Wave Race 64 (PPSA64064, PPSA64065, PPSA69423, PPSA69424) past the mesh draws, then stop the device cannot render color with the target's sample count: a 3840x2160 8-sample color target, while MoltenVK offers 1, 2 and 4. It's created even with the game's MSAA set to None, so it's not from this PR
PSP5, ProsperoCraft (PPSA99131, PPSA99874) stop the declared barycentric limitation (#9387)
PS5SX2 (PPSA99203) stops viewport depth [-1, 1] on a mesh draw, the case docs/dev/debt/libSceAgcDriver.md lists as still throwing without VK_EXT_depth_range_unrestricted

All eight that run draw their UI correctly in the window captures, with no missing or garbled elements.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6006646487 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17611#pullrequestreview-6006646487). Originally posted by [Jazeupoi](https://github.com/Jazeupoi) on 2026-11-21T16:44:47Z. **Review:** COMMENTED --- More Mac data for this PR, from 15 catalog homebrew titles that stop on `main` with `AGC graphics: device does not support mesh shaders` (PS5SX2 stops earlier, on its viewport depth range). Apple M4, macOS 27.0.1, MoltenVK 1.4.2 (no `VK_EXT_mesh_shader`), x86_64 under Rosetta. Head `de5c510e8b` merged into `main` of 2026-11-21, 15 s per title, no game data. | Title | With this PR | What it shows | |---|---|---| | SpeedBreaker (PPSA90505) | runs, 57 FPS | setup screen asking for the disc image | | PSXS5 (PPSA97510) | runs, 37 FPS | empty library | | SwanStationPS5 (PPSA98510) | runs, 60 FPS | empty library | | DevilutionX (PPSA98514) | runs, 60 FPS | its "Data File Error" dialog (no MPQ) | | PSFlyCast (PPSA99247) | runs, 40 FPS | home screen, still fading in at the capture | | OGBox (PPSA99251) | runs, 39 FPS | first-run storage setup | | Mario 64 (PPSA99310) | runs, 52 FPS | "Game files needed" dialog | | FBNeo PS5 (PPSA99924) | runs, 60 FPS | empty ROM list | | DK64, Conker's Bad Fur Day, Rush 2, Wave Race 64 (PPSA64064, PPSA64065, PPSA69423, PPSA69424) | past the mesh draws, then stop | `the device cannot render color with the target's sample count`: a 3840x2160 8-sample color target, while MoltenVK offers 1, 2 and 4. It's created even with the game's MSAA set to None, so it's not from this PR | | PSP5, ProsperoCraft (PPSA99131, PPSA99874) | stop | the declared barycentric limitation (#9387) | | PS5SX2 (PPSA99203) | stops | viewport depth [-1, 1] on a mesh draw, the case `docs/dev/debt/libSceAgcDriver.md` lists as still throwing without `VK_EXT_depth_range_unrestricted` | All eight that run draw their UI correctly in the window captures, with no missing or garbled elements. AI-assisted: yes (Claude Code)
MarcZX10 commented 2026-11-22 04:49:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T04:49:42Z.

Review: COMMENTED


Reviewed — no blocking findings

The reviewed diff shows no verified blocking defect, but I did not read every changed file at the pinned head, so a formal approval is not justified.

What I ran

Inspected the prepared diff for head de5c510e8be89f14befcacdf8d33586097d1cf0a and used repo_read.py to read targeted source ranges in Draw.cpp and VulkanDevice.cpp. No tests or builds were run. The description’s test results are author-reported, not independently verified.

Results

Check Result Note
Prepared diff review passed All 37 changed-file diffs inspected
Targeted source review passed Relevant draw and device ranges read
Tests and build not run No programmatic checks performed
Full changed-file review not run Not every changed file was read at the pinned head

Findings

Blocking

None verified in the inspected code.

Non-blocking

  • .gitignore:126 adds a line that appears to be a leftover merge-conflict marker. Remove it to avoid ignoring a file with that literal name. Pinned diff source

Sources

Not verified

The changed files VulkanDevice.cpp, tests/Graphics.cpp, and tests/ShaderMemory.cpp were excluded from the prepared full-text folder because they were too large; their diff hunks were inspected, but their full contents were not read. I also did not read every other changed file’s full contents at the pinned head. No build, test run, or hardware behavior was independently confirmed.

To get this to a good state

Nothing is required. Optionally remove the stray .gitignore line. The remaining review work is to read the changed files not inspected at the pinned head and run the relevant checks before requesting approval.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6010435034 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17611#pullrequestreview-6010435034). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-22T04:49:42Z. **Review:** COMMENTED --- # Reviewed — no blocking findings The reviewed diff shows no verified blocking defect, but I did not read every changed file at the pinned head, so a formal approval is not justified. ## What I ran Inspected the prepared diff for head `de5c510e8be89f14befcacdf8d33586097d1cf0a` and used `repo_read.py` to read targeted source ranges in `Draw.cpp` and `VulkanDevice.cpp`. No tests or builds were run. The description’s test results are author-reported, not independently verified. ## Results | Check | Result | Note | |---|---|---| | Prepared diff review | passed | All 37 changed-file diffs inspected | | Targeted source review | passed | Relevant draw and device ranges read | | Tests and build | not run | No programmatic checks performed | | Full changed-file review | not run | Not every changed file was read at the pinned head | ## Findings ### Blocking None verified in the inspected code. ### Non-blocking - `.gitignore:126` adds a line that appears to be a leftover merge-conflict marker. Remove it to avoid ignoring a file with that literal name. [Pinned diff source](https://github.com/boykopovar/AnyPS5/blob/de5c510e8be89f14befcacdf8d33586097d1cf0a/.gitignore#L126) ## Sources - [Draw.cpp at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/de5c510e8be89f14befcacdf8d33586097d1cf0a/core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp) - [VulkanDevice.cpp at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/de5c510e8be89f14befcacdf8d33586097d1cf0a/core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp) ## Not verified The changed files `VulkanDevice.cpp`, `tests/Graphics.cpp`, and `tests/ShaderMemory.cpp` were excluded from the prepared full-text folder because they were too large; their diff hunks were inspected, but their full contents were not read. I also did not read every other changed file’s full contents at the pinned head. No build, test run, or hardware behavior was independently confirmed. ## To get this to a good state Nothing is required. Optionally remove the stray `.gitignore` line. The remaining review work is to read the changed files not inspected at the pinned head and run the relevant checks before requesting approval.
MarcZX10 commented 2026-11-22 05:57:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T05:57:19Z.

Review: COMMENTED


Reviewed — comments

The compute fallback has substantial reported hardware and validation coverage, but I did not inspect every changed file or run checks, so the evidence is insufficient for a formal decision.

What I ran

Read the prepared diff and selected source ranges at head f858499c771723667055f87c65db98fa96533831 using repo_read.py. No build or tests were run in this review.

Results

Check Result Note
Source inspection not run Partial review only
Build and tests not run Author-reported results were not independently verified

Findings

Blocking

None identified in the portions inspected.

Non-blocking

The review is incomplete: VulkanDevice.cpp, tests/Graphics.cpp, and tests/ShaderMemory.cpp were excluded from the review bundle, and I did not inspect all included changed files. A formal approval is not supported by this evidence.

Not verified

Read the description, commits, manifest, diff, and selected ranges of Draw.cpp. The excluded changed files were core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp, core/libs/prx/libSceAgcDriver/tests/Graphics.cpp, and core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp. The remaining changed files and the full behavior of the fallback were not fully reviewed. The reported build, tests, validation-layer results, and hardware runs were not independently confirmed.

To get this to a good state

Complete inspection of the remaining changed files and run the relevant checks before a formal review decision.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6010626692 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17611#pullrequestreview-6010626692). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-22T05:57:19Z. **Review:** COMMENTED --- # Reviewed — comments The compute fallback has substantial reported hardware and validation coverage, but I did not inspect every changed file or run checks, so the evidence is insufficient for a formal decision. ## What I ran Read the prepared diff and selected source ranges at head `f858499c771723667055f87c65db98fa96533831` using `repo_read.py`. No build or tests were run in this review. ## Results | Check | Result | Note | |---|---|---| | Source inspection | not run | Partial review only | | Build and tests | not run | Author-reported results were not independently verified | ## Findings ### Blocking None identified in the portions inspected. ### Non-blocking The review is incomplete: `VulkanDevice.cpp`, `tests/Graphics.cpp`, and `tests/ShaderMemory.cpp` were excluded from the review bundle, and I did not inspect all included changed files. A formal approval is not supported by this evidence. ## Not verified Read the description, commits, manifest, diff, and selected ranges of `Draw.cpp`. The excluded changed files were `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp`, `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`, and `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp`. The remaining changed files and the full behavior of the fallback were not fully reviewed. The reported build, tests, validation-layer results, and hardware runs were not independently confirmed. ## To get this to a good state Complete inspection of the remaining changed files and run the relevant checks before a formal review decision.
MarcZX10 commented 2026-11-25 12:32:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T12:32:53Z.

Review: DISMISSED


Reviewed — changes requested

Changes are required before merge: fix the mesh compute fallback’s indirect draw handling so it processes or explicitly rejects every resolved record.

What I ran

Reviewed head 640a4428ac22435bd3d7203523e7c9f2b2537e4c. Read the prepared description, commits, diff, and manifest; used the pinned reader for changed source and test context. No build or tests were run.

Results

Check Result Note
Source review failed Indirect fallback records beyond the first are not drawn
Build and tests not run Reader access only

Findings

Blocking

  • core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp:352 — The guard permits multiple resolved records when indirect.path == Gpu, but fallback selection changes that path to MeshCompute before CPU-resolving records. For that path, recordMeshArguments copies only indirect.records.front() into one argument buffer, and the fallback issues one dispatch and one indirect draw. Thus a mesh-path indirect draw with multiple resolved records silently drops all but its first record. Extend the fallback to dispatch and draw each record, or reject multi-record fallback requests before recording them.

Non-blocking

None.

Not verified

No commands, build, or tests were run. The full changed-file texts for core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp, core/libs/prx/libSceAgcDriver/tests/Graphics.cpp, and core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp were excluded from the review folder; the reader was used for targeted ranges in the first two, and ShaderMemory.cpp was not inspected beyond its path. Other included changed files were not all read in full, so this review does not claim a complete audit of every changed line. Author-reported hardware and test results were not independently verified.

To get this to a good state

Process each resolved indirect record through the fallback, or fail explicitly when more than one record is present; then run the focused graphics and mesh fallback tests on the new head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6057653766 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17611#pullrequestreview-6057653766). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-25T12:32:53Z. **Review:** DISMISSED --- # Reviewed — changes requested Changes are required before merge: fix the mesh compute fallback’s indirect draw handling so it processes or explicitly rejects every resolved record. ## What I ran Reviewed head `640a4428ac22435bd3d7203523e7c9f2b2537e4c`. Read the prepared description, commits, diff, and manifest; used the pinned reader for changed source and test context. No build or tests were run. ## Results | Check | Result | Note | |---|---|---| | Source review | failed | Indirect fallback records beyond the first are not drawn | | Build and tests | not run | Reader access only | ## Findings ### Blocking - `core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp:352` — The guard permits multiple resolved records when `indirect.path == Gpu`, but fallback selection changes that path to `MeshCompute` before CPU-resolving records. For that path, `recordMeshArguments` copies only `indirect.records.front()` into one argument buffer, and the fallback issues one dispatch and one indirect draw. Thus a mesh-path indirect draw with multiple resolved records silently drops all but its first record. Extend the fallback to dispatch and draw each record, or reject multi-record fallback requests before recording them. ### Non-blocking None. ## Not verified No commands, build, or tests were run. The full changed-file texts for `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp`, `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`, and `core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp` were excluded from the review folder; the reader was used for targeted ranges in the first two, and `ShaderMemory.cpp` was not inspected beyond its path. Other included changed files were not all read in full, so this review does not claim a complete audit of every changed line. Author-reported hardware and test results were not independently verified. ## To get this to a good state Process each resolved indirect record through the fallback, or fail explicitly when more than one record is present; then run the focused graphics and mesh fallback tests on the new head.
MarcZX10 commented 2026-11-25 22:07:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T22:07:18Z.

Review: COMMENTED


Reviewed — no blocking findings

Nothing blocks this change; the points below are optional.

What I ran

Reviewed head 59203ed86130d51e13a03cd43f0c23728d208d5e. I read the prepared description, commit list, manifest and diff, then inspected relevant source at the pinned head through repo_read.py. I did not run commands or tests.

Results

Check Result Note
Diff and targeted source review passed Core fallback path inspected
Tests not run Contributor runs are author-reported

Findings

Blocking

None identified in the code inspected.

Non-blocking

None.

Not verified

The full text of changed files excluded from the review bundle was not read, including VulkanDevice.cpp and ShaderMemory.cpp; their relevant diff hunks were inspected where available. Other changed files were not individually audited. No tests were run. Author-reported test and hardware results were not independently verified.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6065654415 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17611#pullrequestreview-6065654415). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-25T22:07:18Z. **Review:** COMMENTED --- # Reviewed — no blocking findings Nothing blocks this change; the points below are optional. ## What I ran Reviewed head `59203ed86130d51e13a03cd43f0c23728d208d5e`. I read the prepared description, commit list, manifest and diff, then inspected relevant source at the pinned head through `repo_read.py`. I did not run commands or tests. ## Results | Check | Result | Note | |---|---|---| | Diff and targeted source review | passed | Core fallback path inspected | | Tests | not run | Contributor runs are author-reported | ## Findings ### Blocking None identified in the code inspected. ### Non-blocking None. ## Not verified The full text of changed files excluded from the review bundle was not read, including `VulkanDevice.cpp` and `ShaderMemory.cpp`; their relevant diff hunks were inspected where available. Other changed files were not individually audited. No tests were run. Author-reported test and hardware results were not independently verified. ## To get this to a good state Nothing is required.
ligmaSec commented 2026-12-03 22:35:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T22:35:55Z.

Review: COMMENTED


I compiled the exact request serializer. A request using meshAsCompute round-trips here, but main c1601e56d5 rejects it as truncated. This reader also rejects main’s version 64 split-state capture, and both layouts claim version 64. A further exact version 64 cross-check with typed storage merges in #17056 failed in both directions. Reconcile the request version and legacy decoding when resolving the current conflicts in RequestSerializer.cpp, cache keys, mesh draw, and device integration.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6179820998 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17611#pullrequestreview-6179820998). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T22:35:55Z. **Review:** COMMENTED --- I compiled the exact request serializer. A request using `meshAsCompute` round-trips here, but main `c1601e56d5` rejects it as truncated. This reader also rejects main’s version 64 split-state capture, and both layouts claim version 64. A further exact version 64 cross-check with typed storage merges in #17056 failed in both directions. Reconcile the request version and legacy decoding when resolving the current conflicts in `RequestSerializer.cpp`, cache keys, mesh draw, and device integration. AI-assisted: yes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/17611:upstream-pr/17611'
git switch 'upstream-pr/17611'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/17611'
git switch 'upstream-pr/17611'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/17611'
git switch 'upstream-pr/17611'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/17611'
git switch 'main'
git merge --squash 'upstream-pr/17611'
git switch 'main'
git merge --ff-only 'upstream-pr/17611'
git switch 'main'
git merge 'upstream-pr/17611'
git push origin 'main'
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!17611
No description provided.