feat(shader): lower PS4 on-chip tessellation LDS through the off-chip ring #22328
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/22328"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by B-Howell on 2026-11-17T12:06:08Z.
What
When
SPI_SHADER_PGM_RSRC2_HS.OC_LDS_ENis clear, a PS4 (GCN) hull shader keeps its output control points and patch constants in LDS, and the domain shader reads them from there. #22251 refuses this case by name, because the LDS offsets come from the tessellation constant buffer that the title binds. That buffer is a V# in four user data words, laid out as shadPS4143b58aa48src/shader_recompiler/frontend/tessellation.hTessellationDataConstantBuffer:ls_stride,hs_cp_stride,num_patches,hs_output_base("basically 0 when passthrough"),patch_const_size,patch_const_base,patch_output_size, and two factor fields. shadPS4 reads this buffer from the bound user data when it specializes a stage (Info::ReadTessConstantBuffer, keyed throughRuntimeInfo), and for a pass-through hull it copies the input attributes to the outputs (hull_shader_transform.cpp). This PR does the same through AnyPS5's off-chip ring lowering:TessellationLowering.cpp). For an on-chip hull or domain stage, the lowering walks back from every LDS address to theReadConstBuffers it uses. Each must read through a V# held in four consecutive user data words, and all of them through the same V#; otherwise the stage throws. If the request has no values for that buffer, the lowering throws the newTessellationConstantsRequired, which names the user data word. Otherwise every read of that V# below dword 9 is replaced by its value, so the addresses become affine.hs_output_base, become off-chip ring accesses (ControlOutput). Domain LDS reads becomeEvaluationInput. Each is rebased byhs_output_base, using the instruction's full effective address including its DS offset; a computed address is rebased too. The existing ring lowering then places control points and patch constants. Hull reads belowhs_output_basestay reads of the local stage's control points.hs_output_base0 is pass-through, which is how the Gnm driver lays such hulls out: each invocation copies its input control point (ls_stridebytes) to its output control point at the start of the program. A pass-through hull whosehs_cp_strideis notls_stride, or whose output and input control point counts differ, throws.GraphicsCompileContext::tessellationConstants. They are part of the shader key (CacheKey.hpp), so the prepared key and the disk key cover them too, and of the serialized request (version 66, after main's version 63 barycentrics flag and version 64 split state and #22251's 65; written only when tessellation is present). This PR adds no pipeline journal bytes, so it uses #22251's journal format 22.recompileReporting,CountedCompileandPrepareShaderWithDiagnosticspassTessellationConstantsRequiredthrough unwrapped.DrawCapture.cpp). When an on-chip HS or VS-stage domain program throwsTessellationConstantsRequired, the driver remembers the user data word for that program (PreparedShaderState::tessellationConstants). It reads the nine dwords at the V#'s base withGuestMemory::Read, reading words past the V#'s size as 0 as the SRT walker'sReadConstBufferdoes, and prepares the stage again. Later draws of that program read the values before preparing.Draw.cpp). On-chip tessellation draws keep no stage draw entries and record no recipe. Each such draw re-reads the buffer and selects its shaders by the values, so rewriting the buffer in place cannot leave a stale shader. This costs draw-cache speed on those draws.Nothing is keyed to a title, a shader or a value.
Tested
Windows 11 Pro 10.0.26300, WinLibs GCC 15.2, RTX 4080 SUPER, driver 621.14.
tests/execution/GcnTessellation.cpp(agc_driver_gcn_tessellation) adds hand-assembled gfx7 programs. Three new Vulkan draws each check the pixels of three patches; patch 1 has zero factors and must stay at the clear colour:tc[3] + rel * tc[6] + InvocationID * tc[1](hs_output_base192), with the same domain shader.ds_readoffset rather thantc[3].TessellationConstantsRequirednaming user data words 4 and 0.RequestSerializerTests.cpp: a version 66 round trip with values, a truncated version 66 request is rejected, and older versions still read.ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,VK_ADD_LAYER_PATHset to the 1.4.363.1 SDK,VK_LOADER_DEBUG=layer, ctest-Vonrequest_serializer,agc_driver_gcn_tessellation,agc_driver_tessellation,agc_driver_tessellation_depth_range_remap,agc_driver_tessellation_geometry,agc_tessellation_lowering,agc_tessellation_factor_ring,agc_tessellation_pipeline_cache,agc_driver_prepared_graphics,agc_driver_prepared_unregistered_graphics,agc_driver_pipeline_journal,agc_pipeline_journal,agc_driver_register_keyandagc_graphics_profile_draw:agc_driver_gcn_tessellationfails, witha hull shader that keeps its outputs on chip ... writes them to LDS, which is not implemented.Insert instance layer "VK_LAYER_KHRONOS_validation"lines, nowas not found but was requested by env var VK_INSTANCE_LAYERS, and noVUID-.0x2d56e0100twice. The first preparation throwsTessellationConstantsRequired, and the second is given the values. The on-chip draw then renders. Before, Continue stopped at about 49 s with this hull. Now it stops at the next draw, at about 53 s, onVGT_SHADER_STAGES_EN=0xb0(ES, GS and the VS copy shader), which is unsupported. Gameplay is not reached yet.check_conventionspasses.pr_overlapfailed closed: it lists every PR that shares a file with the stacked branch, including #22251's files. I checked the open PRs with tessellation or hull in the title (#18235, #9387, #20111, #21938): none lowers on-chip LDS or reads the tessellation constant buffer.hs_output_base, the region check ignored the DS offset, a retry could wrapDrawCompilePending, and draw caches could keep stale values. All four are fixed. The second pass was still NO-GO, on cache reuse; on-chip draws now skip stage entries and recipe recording. The third pass was GO. It asked for a driver-level test that rewrites the buffer between two cached draws, which this PR does not have.33f8d6a5a87and movedagc_shader_memoryto version 64 (88d2f038970, test only: rejects 65, strips 8 bytes from the tessellated fixture). Linux (GCC 11.4): all 35agc_shader_memory_testsctests plusrequest_serializerpass.check_conventionspasses.88d2f038(merged onto mainf0c01bc69d): Arch Linux, GCC 16.2.1, RTX 4090 (Ada), driver 620.70.06, Khronos layer 1.4.363.1,ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1, the validation-line tests plusagc_shader_memory*: 16 of 16 pass (main 15 of 15;agc_driver_gcn_tessellationis new), including the version 64request_serializerandagc_shader_memorycases. Nowas not found, 0VUID-on both main and this PR.a589520069merged onto main3c07e1d05e: Windows 11 25H2, WinLibs GCC 15.2.0, AMD Radeon 760M iGPU, AMD Software 26.11.2, Khronos layer 1.4.363.agc_driver_gcn_tessellation(new, not on main) passes 3 of 3 runs, the layer loads in every run, and no log has aVUID-line. No negative control: the test does not build on main.a589520069merged onto main26604382a5: Linux 7.3.4, GCC 16.2.1, Mesa 26.2.6 RADV, RX 7900 XT (gfx1100) and 7800X3D iGPU (gfx1036), Khronos layer 1.4.363.1. Full suite and-R '^agc'with the layer: no new failures against main on either GPU, the layer loads in every run, and there are 0VUID-and 0SYNC-HAZARDlines.119ae930d5f: merged the updated #22251 branch (current mainc8f72e905cc). With #21938 on version 63 and #22251 on 64, the tessellation constants move to version 65, written after the on-chip flag and before main's barycentrics flag.GraphicsCompileContextkeeps main'semulateBarycentricsbeforetessellationConstants, so main's positional initializers still set the flag. Windows 11, WinLibs GCC 15.2.0 r7, RTX 4080 SUPER, driver 621.14, withANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer(LunarG 1.4.363.1): the same 10 tests as #22251 pass 10/10 in 3 of 3 runs;mainpasses its 9. The layer loads in every log, nowas not foundline, noVUID-on either side. WSL Ubuntu, GCC 11.4: theagc_shader_memory_testsctests andrequest_serializerpass 36/36.debt_fold.py --checkandcheck_conventionspass.bb91cb8b2c5: merged the updated #22251 branch963751c48c2(with main56d4f9fe7e0). The only conflict wasRequestSerializerTests.cpp: main's single-sample dithered alpha-to-coverage test now expects this branch's version 65 and treats 66 as the unsupported version. Windows 11, WinLibs GCC 15.2.0 r7, RTX 4080 SUPER,ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer(LunarG 1.4.363.1):request_serializer,agc_driver_gcn_tessellation,agc_driver_tessellation,agc_driver_tessellation_depth_range_remap,agc_driver_tessellation_geometry,agc_driver_graphics,agc_tessellation_loweringandagc_tessellation_factor_ring8/8;main56d4f9fe7e04/4 on the tessellation and serializer tests. Both logs load the layer, neither haswas not found, 0VUID-in each.check_conventionsanddebt_fold.py --checkpass.86ed1185e95: merged the updated #22251 branch38769b3646a(with main1d1587ced3b), no conflicts. Redwindowson the previous head was main's, not this branch's:guest_freetype_ot_glyph_mutation(_patched)(#18482, reverted in #25141),audio_out2_port_layouts(#25046, reverted in #25143). Windows 11, WinLibs GCC 15.2.0 r7, RTX 4080 SUPER,ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer(LunarG 1.4.363.1): the #22251 six plusagc_tessellation_loweringandagc_tessellation_factor_ring8/8;main786bc3afa1c4/4 on the tessellation and serializer tests. Both logs load the layer, neither haswas not found, 0VUID-in each.check_conventionspasses.86ed1185e9merged onto main61f7f5925c: Windows 11 Pro 10.0.26100, WinLibs GCC 15.2.0 r7, NVIDIA GeForce RTX 3070 (Ampere), driver 616.56, Khronos layer 1.4.363,ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer, the validation-line tests, 3 runs each: main 20 of 20, this PR 21 of 21 (the extra one isagc_driver_gcn_tessellation, which drew rather than skipped). The layer loads in every run and neither side has aVUID-line.agc_shader_memory_testswas not run (Defender quarantines it there), so the version 65 tessellation constants in theagc_shader_memoryfixture is not covered by this run.715ebdfed68: merged the updated #22251 (with mainea49f32e898); the tessellation constants are now request version 66.c614dad1c0dfixes three on-chip lowering points CodeRabbit raised on #22439 (computed hull output reads keep their relative-patch term; negative computed LDS terms; pass-through component limits), with newGcnTessellation.cppdraws and refusals. Each fix reverted alone makes the test fail (thePRIM_GRP_SIZE is 0refusal, patch 2 at the clear colour withPRIM_GRP_SIZE4, the negative-term domain accepted, the over-limit hull accepted).715ebdfed68adds a version 65 replay with emulated barycentrics. Windows 11, WinLibs GCC 15.2.0 r7, RTX 4080 SUPER,ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer(LunarG 1.4.363.1):request_serializer,agc_driver_gcn_tessellation,agc_driver_tessellation,agc_driver_tessellation_depth_range_remap,agc_driver_tessellation_geometry,agc_driver_graphics,agc_tessellation_loweringandagc_tessellation_factor_ring8/8 on78a86c6655a(this head minus that serializer test, which passes on its own);main61426d5bf1d7/7 on the same set without the GCN test. Every log loads the layer, none haswas not found, 0VUID-on either side.check_conventionsanddebt_fold.py --checkpass.agc_shader_memory(version fixture updates) was not run locally: Defender quarantines it on Windows; CI covers it.58c5304937a:d901b8c10e4refuses an on-chip pass-through hull whose LDS read can follow its own LDS write (refusal test, plus a draw of a pass-through hull that reads first); merged #2225166a4b647e79; debt entry updated. Windows 11, WinLibs GCC 15.2.0 r7, RTX 4080 SUPER,ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer(LunarG 1.4.363.1):request_serializer,agc_driver_register_key,agc_driver_gcn_tessellation,agc_driver_tessellation,agc_driver_tessellation_depth_range_remap,agc_driver_tessellation_geometry,agc_driver_graphics,agc_tessellation_lowering,agc_tessellation_factor_ring9/9. Every log loads the layer, nowas not found, 0VUID-.check_conventionsanddebt_fold.py --checkpass.8dd935bb29f: the pinned on-chip tessellation constants are read through the draw'sShaderMemory(ShaderMemory::ReadWords), so they are among the regions the draw checks again before commit (CodeRabbit 4724301846); newverifyReadWordsRegionscheck. Windows 11, WinLibs GCC 15.2.0 r7, RTX 4080 SUPER,ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer(LunarG 1.4.363.1):request_serializer,agc_driver_register_key,agc_driver_gcn_tessellation,agc_driver_tessellation,agc_driver_tessellation_depth_range_remap,agc_driver_tessellation_geometry,agc_driver_graphics,agc_tessellation_lowering,agc_tessellation_factor_ring9/9, nowas not found, 0VUID-; all 43agc_shader_memoryctests pass.check_conventionsanddebt_fold.py --checkpass.8dd935bb29merged onto main69d574e9a2: Windows 11 Pro 10.0.26100, WinLibs GCC 15.2.0, NVIDIA GeForce RTX 3070, driver 616.56,ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer, the same validation-line tests as the earlier run, 3 runs each: main 22 of 22, this PR 23 of 23 (the extra one isagc_driver_gcn_tessellation, which drew rather than skipped). The layer loads in every run and neither side has aVUID-line.agc_shader_memory_testswas not run (Defender quarantines it there).a5ae94d2dae: merged the updated #22251 (52d24faa56b, with main9a1d772cf16, which has the #27860 macOS test fix); no conflicts. Windows 11, WinLibs GCC 15.2.0 r7, RTX 4080 SUPER,ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer(LunarG 1.4.363.1):request_serializer,agc_driver_register_key,agc_driver_gcn_tessellation,agc_driver_tessellation,agc_driver_tessellation_depth_range_remap,agc_driver_tessellation_geometry,agc_driver_graphics,agc_tessellation_lowering,agc_tessellation_factor_ring9/9;main9a1d772cf168/8 on the same set without the GCN test. Every log that creates a device loads the layer, nowas not found, 0VUID-on either side.check_conventionsanddebt_fold.py --checkpass.8f95147aa32: merged #22251066594b729b. CodeRabbit 17:35Z: the pass-through hull now also checks its patch and total output components (60f9b20e636);agc_driver_gcn_tessellationrefuses it on targets withmaxControlPerPatchOutputComponents0 andmaxControlTotalOutputComponents15 and fails with the old check. The same test now checks that an on-chip hull with no LDS access, drawn with a domain shader that reads hull outputs, is refused at the stage interface check. Windows 11, WinLibs GCC 15.2.0 r7, RTX 4080 SUPER,ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer(LunarG 1.4.363.1):request_serializer,agc_driver_register_key,agc_driver_gcn_tessellation,agc_driver_tessellation,agc_driver_tessellation_depth_range_remap,agc_driver_tessellation_geometry,agc_driver_graphics,agc_tessellation_lowering,agc_tessellation_factor_ring9/9 on #25489's merge of this head (6ab0c65dc21), 7 layer inserts, nowas not found, 0VUID-;main9a1d772cf168/8 on the same set earlier today.check_conventionsanddebt_fold.py --checkpass.84ed23f1d90: CodeRabbit 18:28Z: the pass-through hull also checks that its control, patch and shared outputs fit the per-vertex output locations (the emitter places patch outputs after the control points), and an ordinary on-chip hull gets the merged hull's location, patch and total checks.agc_driver_gcn_tessellationrefuses both on narrowed targets and fails without the change. Windows 11, WinLibs GCC 15.2.0 r7, RTX 4080 SUPER,ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer(LunarG 1.4.363.1): the same 9 tests pass 9/9, 6 layer inserts, nowas not found, 0VUID-;main9a1d772cf168/8 on the same set earlier today.check_conventionsanddebt_fold.py --checkpass.786b293d3e9: merged #22251a373e8b6f88(with maind9a511f9323), no conflicts. Main's #28218 took pipeline journal format 20 for its early-Z byte, which #22251 also used for its on-chip byte; #22251 now writes format 22 with both bytes and checks that 19, 20, 21 and 23 are refused. This PR adds no journal bytes, so it stays at 22 (23 is #22439's). Request serialization is unchanged: this PR writes 66. Windows 11, WinLibs GCC 15.2.0 r7, RTX 4080 SUPER,ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer(LunarG 1.4.363.1):request_serializer,agc_driver_pipeline_journal(with #22251's format check),agc_driver_pipeline_journal_undecodable_module, the sixagc_pipeline_journal*tests,agc_driver_gcn_tessellation,agc_driver_tessellation,agc_driver_tessellation_depth_range_remap,agc_driver_tessellation_geometry,agc_tessellation_lowering,agc_tessellation_factor_ring,agc_driver_register_keyandagc_driver_graphics17/17, 35 layer inserts, nowas not found, 0VUID-;maind9a511f932316/16 on the same set without the GCN test, 28 layer inserts, 0VUID-.PipelineJournal.cppcompiles under WSL Ubuntu GCC 11.4 with its Linux layout guards.check_conventionsanddebt_fold.py --checkpass.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T19:01:24Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: the retry in
DrawCapture.cppassigns a new value to theinvocationlambda, which does not compile.What I ran
a589520069deeb6dc6c0e3ff5e9e6762d37ef6df, basemain. Diff read in full from the review folder (diff.patch, 1344 lines), with head text checked through the repository reader.reviewedinfiles.jsonwere read through the diff.tests/Graphics.cppandtests/ShaderMemory.cppwere too large for full text, so I read their diff hunks only.Results
DrawCapture.cpp)Findings
Blocking
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cpp:265:invocationis declared as a lambda at:223(auto invocation = [&] { ... }). The retry insidecapturethen assigns the result ofInvocationFor(...)to it. A closure type cannot be assigned from another type, so this does not compile. Every build would fail at this line, which conflicts with the author's reported test runs. Fix: keep the retried result in its own local variable (typed asInvocationForreturns) and pass that toCaptureInvocationat:266. I did not read the signature ofCaptureInvocation, so check its last parameter when making the change.Non-blocking
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cpp:125: the hidden user-word count is now0for every GCN stage that is not fragment, not0x04c-based, which covers vertex draws too, not only tessellation. The description does not mention this. Confirm that the existing GCN draw tests still pass, or scope the change to tessellation.Not verified
core/shader/recompiler/Optimization/src/TessellationLowering.cpp(placeOnChip, around theaddressValueuses). I did not confirm thataddressValueincludes the DS offset when it is set (:1052), which the description relies on.To get this to a good state
invocationassignment inDrawCapture.cpp(:223and:265) so the retry compiles.agc_driver_gcn_tessellationand the other listed tests on the new head.DrawDecode.cpp:125leaves non-tessellation GCN draws unchanged, or limit it to tessellation.Sources
invocation(DrawCapture.cpp:223)DrawCapture.cpp:265)DrawDecode.cpp:125)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T18:49:00Z.
Review: COMMENTED
Reviewed — comments
The review covers head
119ae930d5f71e542746d81f1636aed0657938c2; no checks were run, and the large execution test file could not be fully reviewed.What I ran
No commands or tests were run. I read the prepared description, commits, manifest and diff, then used
repo_read.pyto inspect changed source and test ranges at the pinned head.Results
Findings
Blocking
None.
Non-blocking
Not verified
I read the description, commits, manifest and diff, along with changed source ranges for
DrawCapture.cpp,Draw.cpp,TessellationLowering.cpp,CacheKey.hpp,State.cpp, and changed test ranges inGraphics.cppandShaderMemory.cpp. The newGcnTessellation.cppis excluded fromfiles/due to size; only relevant portions were read throughrepo_read.py. The rest of that file and the full changed contents ofShaderMemory.cppwere not read. No tests, build, or runtime checks were run. The author’s reported results were not independently verified.To get this to a good state
Nothing is required. Optional: review the complete
GcnTessellation.cpptest source before making a formal decision.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T04:39:33Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head
86ed1185e95bdc7060ce4f73a7dc3ae9cb05c4fausing the prepared diff andrepo_read.pyfor targeted source reads. No build or test commands were run; test results below are author-reported.Results
Findings
Blocking
None.
Non-blocking
Not verified
review/files/because they were too large:core/libs/prx/libSceAgcDriver/tests/Graphics.cpp,core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp, andcore/libs/prx/libSceAgcDriver/tests/execution/GcnTessellation.cpp. Their changed hunks were read throughrepo_read.py; unchanged portions were not reviewed.To get this to a good state
Nothing is required. Optional: add a driver-level regression test for buffer rewrites between cached draws.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-27T20:40:33Z.
Review: COMMENTED
Actionable comments posted: 2
5adf5bca-3af0-48d6-bb37-a12bcad6b830Reviewing files that changed from the base of the PR and between
ea49f32e89and715ebdfed6.core/libs/prx/libSceAgcDriver/Execution/include/Driver/Shaders/ShaderRegistry.hppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawCapture.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawLookup.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawRegisterKey.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawRelocate.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderDiagnostics.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/execution/GcnTessellation.cppcore/shader/recompiler/CacheKey.hppcore/shader/recompiler/ControlFlow/src/RequestSerializer.cppcore/shader/recompiler/Optimization/include/Optimization/ShaderStageInputInfo.hppcore/shader/recompiler/Optimization/include/Optimization/TessellationLowering.hppcore/shader/recompiler/Optimization/src/TessellationLowering.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/Translation/src/InstructionTranslator.cppcore/shader/recompiler/Translation/src/ShaderInputInfoBuilder.cppcore/shader/recompiler/tests/RequestSerializerTests.cppdocs/dev/debt/changes/claude-gcn-ls-hs-vs-tessellation.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-27T20:40:50Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the reviewed code and reported checks support merging.
What I ran
Reviewed head
715ebdfed6897a1409884044450183632af5bb0d. Readdescription.md,commits.md,manifest.json, and the relevant portions ofdiff.patch; examined changed source filesDrawCapture.cpp,State.cpp,TessellationLowering.cpp, andTessellationLowering.hpp. No tests were run in this review; the test results below are author-reported.Results
Findings
Blocking
None identified in the code inspected.
Non-blocking
None.
Not verified
Did not read every file listed in
manifest.json. In particular, the full contents ofGraphics.cpp,ShaderMemory.cpp, andGcnTessellation.cppwere not reviewed; those files were marked excluded or too large in the manifest. Other changed files were not examined beyond relevant diff sections. Tests, builds, hardware behavior, and author-reported results were not independently verified.files.jsonwas not available through the review reader.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-27T23:09:53Z.
Review: COMMENTED
Actionable comments posted: 2
bb0f347a-9634-46d8-8a5a-bf62a355d92eReviewing files that changed from the base of the PR and between
715ebdfed6and58c5304937.core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/tests/RegisterKey.cppcore/libs/prx/libSceAgcDriver/tests/TessellationLowering.cppcore/libs/prx/libSceAgcDriver/tests/execution/GcnTessellation.cppcore/shader/recompiler/Optimization/src/TessellationLowering.cppdocs/dev/debt/changes/claude-gcn-ls-hs-vs-tessellation.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-28T06:29:35Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change based on the inspected source; the prepared tests are author-reported and were not run in this review.
What I ran
8dd935bb29f991add1863b6303624f6b4838d8b8using the prepared diff andrepo_read.pysource reader.Results
Findings
Blocking
None identified in the inspected code.
Non-blocking
None.
Not verified
The full changed-file set was not reviewed. In particular, the full text for
Graphics.cppandShaderMemory.cppis excluded from the review folder, and the remaining changed files and later portions of the diff were not inspected. I therefore cannot confirm all changed behavior or test coverage.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-30T17:20:28Z.
Review: COMMENTED
Reviewed — no blocking findings
No blocking defect was verified in the implementation hunks examined; a full-file review and local checks were not completed.
What I ran
Reviewed head
a5ae94d2dae0092ac1b61c9a10af54ec6ff6b886. Inspected the prepared description, commits, manifest, diff, and changed code ranges usingrepo_read.py. No tests or other checks were run.Results
Negative control
Not run. No test was run, so no negative control was available.
Findings
Blocking
None verified in the implementation hunks examined.
Non-blocking
None recorded.
Sources
Not verified
The two large test files,
core/libs/prx/libSceAgcDriver/tests/Graphics.cppandcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp, were available only through the pinned reader; I inspected targeted ranges, not their full contents. The remaining changed files were available infiles/, but I did not read every full file. Runtime behavior, CI results, and the author-reported runs were not independently verified.files.jsonlists no rule-excluded files.To get this to a good state
Nothing is required. An optional follow-up is a driver-level regression that changes the tessellation constants between cached draws and checks that the next draw uses the updated values.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-30T17:35:20Z.
Review: COMMENTED
Actionable comments posted: 3
Architecture findings (1)
Advisory architecture findings (1)
5e38b84e-50e3-48e3-a7ba-7a099a6adb49Reviewing files that changed from the base of the PR and between
8dd935bb29anda5ae94d2da.core/libs/prx/libSceAgcDriver/Execution/include/ShaderMemory.hppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/Draw.cppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/shader/recompiler/CacheKey.hppcore/shader/recompiler/Optimization/src/TessellationLowering.cppcore/shader/recompiler/Recompiler.cppcore/shader/recompiler/Recompiler.hppcore/shader/recompiler/Translation/src/ShaderInputInfoBuilder.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-30T18:28:23Z.
Review: COMMENTED
Actionable comments posted: 1
Architecture findings (1)
Advisory architecture findings (1)
025cf83c-9cb2-48f9-8642-2f4b5916f027Reviewing files that changed from the base of the PR and between
a5ae94d2daand8f95147aa3.core/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/execution/GcnTessellation.cppcore/shader/recompiler/Optimization/src/TessellationLowering.cppdocs/dev/debt/changes/claude-gcn-ls-hs-vs-tessellation.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-30T18:41:35Z.
Review: COMMENTED
Reviewed — comments
The diff and targeted source context were reviewed at head
8f95147aa32d0420a0ac0df477b786abf6ae297d; no tests were run, and two changed files were excluded from the review folder.What I ran
Read the prepared description, commit summary, manifest, and diff. Used
repo_read.pyto inspect targeted source ranges at the pinned head. No tests or builds were run; the reported test results below come from the PR description.Results
Findings
Blocking
No blocking findings identified in the code inspected. The review is incomplete for the excluded full files; see Not verified.
Non-blocking
None.
Not verified
The full text of
core/libs/prx/libSceAgcDriver/tests/Graphics.cppandcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppwas excluded fromfiles/because the files were too large. Their diffs are present indiff.patch, but their full contents and surrounding context were not reviewed. No tests were run independently.To get this to a good state
Nothing is required. Optional: review the excluded files and run the relevant checks on this head before relying on this review as a complete approval.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-30T19:15:09Z.
Review: COMMENTED
Reviewed — no blocking findings
The reviewed changes show no verified blocking defect; a draw-level regression test for updated tessellation constants would strengthen coverage.
What I ran
Reviewed head
84ed23f1d90b6b43f8deb26e51c3a9473778605e. I inspected the prepared diff and targeted source ranges; I ran no tests or builds.Results
Negative control
Not run; no tests were run in this review.
Findings
Blocking
None.
Non-blocking
ReadWordscoverage checks region accounting, not this draw-to-draw behavior ShaderMemory.cpp:13764.Sources
Behavior claims are based on the changed code at the pinned head, including Draw.cpp and TessellationLowering.cpp.
Not verified
No tests, builds, GPU runs, or console behavior were verified in this review. The two large files omitted from
files/(Graphics.cppandShaderMemory.cpp) were inspected through targeted reader ranges; no changed files were excluded from the review.To get this to a good state
Nothing is required. The draw-level test above is optional.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T22:13:27Z.
Review: COMMENTED
This head writes optional on-chip tessellation state in request version 66, while #23811 recognizes version 66 as an intermediate mesh request layout with a different tail. I compiled this head’s exact serializer and verified that it reads its own request. Please reconcile that version before either format gets used to save captures. The active-state payload also participates in the shader cache key, so keep the replay-copy and cache-key changes together if the series is reordered.
The trial merge onto
a1b75b0947was clean. Paired Vulkan controls are pending.I also fed the version 66 capture produced by this exact head to the #23811 reader. It rejected the capture as
RequestSerializer: truncated data. The two readers accept their own layouts.AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-04T03:37:52Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
Reviewed head
786b293d3e9b655b1951a3b1e382a6586bccea40against the prepared diff. No tests or builds were run. The pinned reader returned a partial source range, then failed while logging because the run folder is read-only. The author-reported test results were not independently verified.Results
Negative Control
Not run.
Findings
Blocking
None verified in the reviewed hunks.
Non-blocking
Sources
Behavior claims were checked against the pinned tessellation lowering and draw cache handling.
Not verified
core/libs/prx/libSceAgcDriver/tests/Graphics.cppandcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppwas excluded from the run folder by size. Their changed hunks were present in the prepared diff, but the pinned reader could not complete follow-up reads.files/; 2 were excluded by size. The prepared diff contained changed hunks for all 30.To get this to a good state
Nothing is required.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.