Skip to content

feat(agc): draw PS4 ES-GS-VS geometry shaders through a Vulkan geometry stage - #22439

Open
B-Howell wants to merge 70 commits into
boykopovar:mainfrom
B-Howell:claude/gcn-es-gs-copy-vs
Open

B-Howell wants to merge 70 commits into
boykopovar:mainfrom
B-Howell:claude/gcn-es-gs-copy-vs

Conversation

@B-Howell

@B-Howell B-Howell commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

What

A PS4 (GCN) title draws geometry shaders with VGT_SHADER_STAGES_EN 0xb0, which DecodeShaderStages refused (unsupported geometry routing, fast launch or wave-ID state). This PR draws that routing through a Vulkan vertex stage (the ES) and a Vulkan geometry stage (the GS). The VS slot holds the copy shader, which is read but not compiled.

Register decode. Mesa gfx7.json (mesa-25.2.8):

  • VGT_SHADER_STAGES_EN fields LS_EN [0,1], HS_EN [2,2], ES_EN [3,4], GS_EN [5,5], VS_EN [6,7]. With ES_STAGE_REAL = 2, GS_STAGE_ON = 1 and VS_STAGE_COPY_SHADER = 2, 0xb0 is ES real, GS on, and the copy shader on the VS stage.
  • VGT_GS_MODE: MODE [0,2] (GS_SCENARIO_G = 3), CUT_MODE [4,5], ES_PASSTHRU [13], COMPUTE_MODE [14], FAST_COMPUTE_MODE [15], ELEMENT_INFO_EN [16], SUPPRESS_CUTS [18], ONCHIP [21,22]. The other four bits are accepted because they only tune VGT scheduling and ring write combining, not what the stages compute: GS_C_PACK_EN [11], PARTIAL_THD_AT_EOI [17], ES_WRITE_OPTIMIZE [19] and GS_WRITE_OPTIMIZE [20]. Mesa's ac_vgt_gs_mode sets ES_WRITE_OPTIMIZE (GFX8 and older) and GS_WRITE_OPTIMIZE on every legacy GS draw.
  • VGT_GS_OUT_PRIM_TYPE OUTPRIM_TYPE [0,5]: POINTLIST 0, LINESTRIP 1, TRISTRIP 2. VGT_GS_INSTANCE_CNT: ENABLE [0], CNT [2,8]. VGT_GS_MAX_VERT_OUT [0,10]. VGT_ESGS_RING_ITEMSIZE, VGT_GSVS_RING_ITEMSIZE and VGT_GS_VERT_ITEMSIZE are each [0,14].
  • SPI_SHADER_PGM_RSRC2_VS: USER_SGPR [1,5], SO_EN [12].

shadPS4 143b58aa48 decodes this routing the same way. regs_vertex.h has EsGs = 0xB0u. vk_pipeline_cache.cpp binds HwStage::Export as SwStage::Vertex and HwStage::Geometry as SwStage::Geometry, and skips the draw on regs.vgt_gs_mode.onchip || regs.vgt_strmout_config.raw.

Decode (State.cpp). For a GCN guest, 0xb0 decodes as ShaderStages::legacyGeometry when VGT_GS_MODE is GS_SCENARIO_G, off chip, with no ES pass-through, compute mode, element info or suppressed cuts. It reads the input vertex count from the primitive type, plus the output topology, VGT_GS_MAX_VERT_OUT, the instance count, and the ESGS and per-vertex GSVS item sizes. These throw by name: stream-out, streams 1-3 (VGT_GS_VERT_ITEMSIZE_1-3), point output, adjacency, rect, quad and patch input, a GSVS ring item smaller than the vertex size times the maximum, and viewport depth remapping through a geometry shader. DrawDecode.cpp reads the ES, GS and copy VS from their own program and user-data registers (0xc8, 0x88 and 0x48).

ES. The ES is compiled as a Vulkan vertex shader. Its ESGS ring stores (soffset the ES2GS offset SGPR) become its output record of VGT_ESGS_RING_ITEMSIZE dwords.

GS. The GS is compiled as a Vulkan geometry shader with Invocations = instance count and OutputVertices = VGT_GS_MAX_VERT_OUT. Its input VGPRs carry the ES vertex offsets. An ESGS ring read becomes a read of that input vertex's record: component = (soffset + offset) / 256, as in shadPS4's RingAccessElimination (bucket = soffset.U32() / 256u). GSVS ring stores (soffset the GS2VS offset SGPR) go to a per-invocation array of VGT_GS_VERT_ITEMSIZE x VGT_GS_MAX_VERT_OUT dwords. s_sendmsg GS emit and cut become EmitVertex and EndPrimitive. This follows the way #22251 lowers the tessellation rings (TessellationLowering, TessellationBase and Get/SetTessellationAttribute).

Copy VS defines the outputs. ParseGeometryCopyProgram reads each export of the copy VS. Each enabled component is either a GSVS ring dword, read at soffset + offset = slot x VGT_GS_MAX_VERT_OUT x 64 bytes and addressed by the incoming v0 x 4, or a constant. The GS stores slot k of vertex v at byte (k x VGT_GS_MAX_VERT_OUT + v) x 4, and the copy reads slot k at 16 times that slot base, because the GSVS write descriptor is swizzled with 16-lane groups. Mesa does the same: ac_nir_lower_legacy_gs.c stores at base = offset * vertices_out (offset 4 per component) plus vertex x 4, and ac_nir_create_gs_copy_shader.c loads at offset * vertices_out * 16; shadPS4's RingAccessElimination maps a store offset to the copy read offset with * 16u. Every emit copies those dwords of the emitted vertex out of the array to the same export targets. shadPS4's ParseCopyShader derives the same layout (output_vertices = comp_stride / 64) and folds s_movk, s_addk, s_lshl and s_bfm scalar offsets. Here, scalar moves, adds, shifts, masks and multiplies with known sources are folded.

Copy VS control flow. A PS4 copy VS selects its stream block with s_lshr_b32 s10, s2, 24, s_cmpk_eq_u32 s10, 0 and s_cbranch_scc0 to the end. s2 is the stream-out configuration SGPR, which follows the user SGPRs when SO_EN is set. Its stream ID (bits 24-25, as in radeonsi's GS copy shader) is 0, and its buffer bits are 0, because only stream 0 without stream-out is drawn. That SGPR is therefore read as 0. Scalar compares then give a known SCC, and forward s_branch and s_cbranch_scc0/1 on a known SCC are followed. These throw: any other branch, a backward branch, a write to EXEC, an export of a computed value, and a GSVS read whose address is not the incoming v0 x 4.

Bounds. A GSVS store at a constant address past the item throws. A store at a computed address past it goes to a spare dword that no output reads.

Configuration in caches and requests. The geometry configuration is in the shader key, the pipeline journal (format 23) and serialized requests (version 70). This PR stacks on #22328, which uses 69 (and #22251, which uses 68). Main ends at request version 65 (windowSelects) and journal format 20 (#28218's early-Z byte). Request versions 66 and 67 were written only by earlier heads of this PR and #22328, in other layouts, and are refused. Journal format 21 was written only by earlier heads of this PR, without that byte, and is refused; 22 is left for #22251 and #22328, whose tessellation byte also used 20. Shader validation accepts the copied geometry stage's execution modes, clip and cull distances, and its PrimitiveId/InvocationId inputs.

The gaps are recorded in docs/dev/debt/changes/claude-gcn-es-gs-copy-vs.md. 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/GcnGeometry.cpp (agc_driver_gcn_geometry) is new and uses hand-assembled gfx7 programs:
    • Pixel check. An ES writes two dwords per point to the ESGS ring. A GS reads them, expands each point to a quad (4 GSVS vertices of 5 dwords, emit x4, cut), and the copy VS exports position and one parameter. Two points are drawn. Their quads have the expected colours (red, and half red), and four pixels outside both quads keep the clear colour.
    • Copy layout. GSVS dwords and constants map to export components; scalar offsets built with s_addk_i32, s_lshl_b32 and s_bfm_b32 are folded. A stream-select block is followed when the stream-out configuration SGPR is given, and throws when it is not. A taken s_cbranch_scc0 skips the export it jumps over, and an SCC overwritten by s_add_u32 after the compare is not trusted.
    • Copy refusals: a computed export, a wrong slot stride, s_cbranch_execz, an EXEC write, and a moved v0.
    • Stage decode of 0xb0, with refusals of stream-out, on-chip GS, streams 1-3, point output and a short GSVS item.
    • Program decode: the ES, GS, copy VS and PS come from their own registers and user data.
  • RequestSerializerTests.cpp: a version 70 geometry round trip; version 69 and older requests still read, 66, 67 and 71 are refused.
  • tests/ShaderMemory.cpp expects version 70 (65 at the time of the run below). Windows Defender quarantines agc_shader_memory_tests.exe here, so it ran on Linux (WSL, GCC 11.4) at 8b64e1c900b: agc_shader_memory, agc_shader_memory_coherent_atomic_loads and request_serializer, 3/3 pass. Later commits do not touch the serializer or that test.
  • Validation: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, VK_ADD_LAYER_PATH set to the 1.4.363.1 SDK, VK_LOADER_DEBUG=layer, and ctest -V on request_serializer, agc_driver_gcn_geometry, agc_driver_gcn_tessellation, agc_driver_tessellation_geometry, agc_driver_pipeline_journal, agc_pipeline_journal, agc_driver_register_key, agc_graphics_profile_draw and agc_driver_prepared_graphics.
    • This PR (8e00caff807; c89e3c5819e only adds tests, and agc_driver_gcn_geometry was rerun on it): 9/9 pass, 25 Insert instance layer "VK_LAYER_KHRONOS_validation" lines, no was not found but was requested by env var VK_INSTANCE_LAYERS, no VUID-.
    • main (c8542bb73d5): 7/7 pass, 23 layer inserts, no VUID-. agc_driver_gcn_geometry and agc_driver_gcn_tessellation do not exist on main; the new test cannot build there, because main has no GCN geometry decode.
  • Linux layout guards (reported by tablefrogpillow on c89e3c5819e): PipelineJournal.cpp's Linux x86_64 libstdc++ static_asserts still said State 1008 and ShaderStages 164, so the Linux build failed. 258b5932450 sets them to 1064 and 224, read from a WSL Ubuntu GCC 11.4 build of this head, and adds guards for GeometryConfiguration (48) and GeometryCopyExport (32). The recipe codec and CanonicalPipelineState already carried legacyGeometry. On WSL the old file fails with both assertions and the new head builds agc_driver_gcn_geometry_tests, agc_driver_gcn_tessellation_tests and agc_driver_graphics_tests; agc_pipeline_journal passes, and the two GCN tests skip there because WSL has no Vulkan loader. The guards are compiled out on Windows, so the Windows binaries and the validation results above are unchanged. 61c3102e80d merges the feat(shader): lower PS4 on-chip tessellation LDS through the off-chip ring #22328 head a589520069d; it changes no AGC or shader file.
  • AMD and software GPUs (tablefrogpillow, report, Linux, head 258b5932450, Khronos validation 1.4.363, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1): agc_driver_gcn_geometry and agc_driver_gcn_tessellation pass on RX Vega 56 (RADV gfx900, GCN5), a Ryzen 7000 iGPU (RADV gfx1036, RDNA2), RX 7900 GRE (RADV gfx1100, RDNA3) and lavapipe, with no VUID-.
  • NVIDIA on Linux (domx4q, report, Arch Linux, GCC 16.2.1 Release, head 258b5932450 merged onto main 1adc0e2f4b, Khronos validation 1.4.363.1, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1): the Linux build succeeds, and request_serializer, agc_driver_gcn_geometry, agc_driver_gcn_tessellation, agc_driver_tessellation_geometry, the journal, register-key, profile, prepared-graphics, shader-memory and agc_driver_graphics tests pass 12/12 on an RTX 4090 (620.70.06) against 10/10 on main, with no VUID- on either and no missing-layer line.
  • Bloodborne CUSA00900 1.09, run on a local tree with feat(agc): draw PS4 LS-HS-VS tessellation through the off-chip ring lowering #22251, fix(shader): follow carry adds and a sole hull invocation in tessellation addresses #22327, feat(shader): lower PS4 on-chip tessellation LDS through the off-chip ring #22328 and this PR. Before, Continue stopped at about 53 s on VGT_SHADER_STAGES_EN=0xb0. With the first version of this PR, it stopped on the game's copy VS (control flow in a copy program at pc 0x1c): the stream-select branch above, now handled. Now the 0xb0 draws pass and the game loads toward the world, reaching the item-tip loading screen. It stops about 16 s later, at about 69 s, on an unrelated EVENT_WRITE event type 56 is not implemented (PIXEL_PIPE_STAT_CONTROL). Gameplay is not reached yet, so these draws' pixels were not checked in the game.
  • check_conventions passes. pr_overlap lists only PRs that share lines in the same files (the serializer and journal version lines, ShaderMemory.cpp L8918, State.hpp, DrawDecode.cpp); none implements GCN geometry shaders. A search of open PRs for geometry shader, copy shader, ESGS and GSVS found none.
  • Independent review (Codex), three passes:
    • Pass 1, NO-GO. A clamp of out-of-range GSVS stores onto the last real dword. Copy-program branches and EXEC writes skipped silently. Missing debt. All fixed (spare dword; constant out-of-range stores throw; control flow and EXEC refused; debt updated).
    • Pass 2, NO-GO. An overwritten v0 was still taken as the vertex index. Fixed, with a test.
    • Pass 3, on 8e00caff807: GO. It asked for tests of a taken branch and of an SCC overwritten between the compare and the branch; both were added in c89e3c5819e, and agc_driver_gcn_geometry passes again with the layer loaded and no VUID-.
  • 2026-11-20, head 358fbde4846: merged the updated feat(shader): lower PS4 on-chip tessellation LDS through the off-chip ring #22328 branch (current main c8f72e905cc). The geometry configuration moves to request serialization version 66, still before main's fix(agc): draw a last provoking vertex through the barycentric tessellation stages without VK_EXT_provoking_vertex #21938 barycentrics flag. The positional GraphicsCompileContext initializers in DrawCapture.cpp, ShaderRegistry.cpp and GcnGeometry.cpp gain main's barycentrics flag before tessellationConstants and geometry, and main's barycentrics test drops the geometry byte before reading a request as version 62. 358fbde4846 gives the geometry program-decode fixture a CB_COLOR0_INFO format for fix(agc): skip a pixel program whose color masks reach no formatted target #21747. Windows 11, WinLibs GCC 15.2.0 r7, RTX 4080 SUPER, driver 621.14, with 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): agc_driver_gcn_geometry plus the 10 tests listed on feat(agc): draw PS4 LS-HS-VS tessellation through the off-chip ring lowering #22251 pass 11/11 in 3 of 3 runs; main passes its 9. The layer loads in every log, no was not found line, no VUID- on either side. WSL Ubuntu, GCC 11.4: the agc_shader_memory_tests ctests and request_serializer pass 36/36, and PipelineJournal.cpp compiles with its Linux layout guards. debt_fold.py --check and check_conventions pass.
  • 2026-11-21, head 0ffacd193bc: merged the updated feat(shader): lower PS4 on-chip tessellation LDS through the off-chip ring #22328 branch bb91cb8b2c5 (with main 56d4f9fe7e0). The only conflict was RequestSerializerTests.cpp: main's single-sample dithered alpha-to-coverage test now expects this branch's version 66 and treats 67 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_geometry, agc_driver_gcn_tessellation, agc_driver_tessellation, agc_driver_tessellation_depth_range_remap, agc_driver_tessellation_geometry, agc_driver_graphics, agc_tessellation_lowering and agc_tessellation_factor_ring 9/9; main 56d4f9fe7e0 4/4 on the tessellation and serializer tests. Both logs load the layer, neither has was not found, 0 VUID- in each. check_conventions and debt_fold.py --check pass.
  • 2026-11-22, head 8eba1cbb53e: merged the updated feat(shader): lower PS4 on-chip tessellation LDS through the off-chip ring #22328 branch 86ed1185e95 (with main 1d1587ced3b), no conflicts. Red windows on the previous head was main's, not this branch's: guest_freetype_ot_glyph_mutation(_patched) (feat(freetype): implement glyph mutation exports #18482, reverted in revert(libSceFreeType): undo the glyph mutation exports (#18482) #25141), audio_out2_port_layouts (fix(libSceAudioOut): avoid partial output write in sceAudioOut2UserGetSupportedAttributes #25046, reverted in revert(libSceAudioOut2): undo the user atomic attr outputs change (#25046) #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 feat(shader): lower PS4 on-chip tessellation LDS through the off-chip ring #22328 eight plus agc_driver_gcn_geometry 9/9; main 786bc3afa1c 4/4 on the tessellation and serializer tests. Both logs load the layer, neither has was not found, 0 VUID- in each. check_conventions passes.
  • 2026-11-27, head 73f688b955a: @oneandonlydean's restart finding fixed. restartFinishedDraw now reads a geometry program's PA_CL_VS_OUT_CNTL export layout from the copy program, like the two other decode sites; all three use the new PositionExportProgram, which GcnGeometry.cpp checks (GS takes the copy program, ES and copy take their own, a GS with no copy program after it takes its own). Merged main 1bc92752d23; the only conflict was the core/shader/recompiler/CMakeLists.txt symbol list (kept ParseGeometryCopyProgram and main's NaN-speculation symbols). 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): agc_driver_gcn_geometry passes 3/3 and agc_driver_draw_recapture_on_change passes; the layer loads in every log, no was not found, 0 VUID-. A restarted ES-GS-VS draw with clip distances was not run (no fixture drives the recapture path through a geometry draw). check_conventions passes.
  • 2026-11-27, head 9519fe4d288: CodeRabbit fixes c2ea4d4c0de plus a merge of main 6653a47801b. The fixes: restarted draws reread changed copy-program exports; draw keys cover the geometry configuration and every register the GCN geometry decode reads; GCN indirect user-data words use the hidden word count; MSG_GS_DONE keeps emit and cut; a geometry s_barrier emits no Workgroup barrier; the copy parser accepts a load into its own address register; ring address terms refuse on overflow; polygon mode follows the geometry output primitive. Main's split state took request serialization version 64, so this stack's fields move to 65-67 (the conflicts were RequestSerializer.cpp, RequestSerializerTests.cpp and ShaderMemory.cpp). New checks are in GcnGeometry.cpp, including SPIR-V emit, cut and barrier counts. 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_geometry, agc_driver_gcn_tessellation, the four agc_driver_draw_recapture_on_change*, agc_graphics_profile_draw, agc_driver_stencil_ref_export_push_budget, agc_driver_push_constant_assembly and agc_command_batch_fence_failure pass 10/10; on main 6653a47801b the 8 that exist there pass 8/8. Both logs load the layer, neither has was not found, 0 VUID- in each. agc_shader_memory_tests (its version fixtures changed in the merge) is not built on Windows, and Linux was not run locally. check_conventions and debt_fold.py --check pass.
  • 2026-11-27, head 75aef74e924: merged feat(shader): lower PS4 on-chip tessellation LDS through the off-chip ring #22328 58c5304937a (with main ea49f32e898; versions stay 65/66/67); 6bbf38cc2b0 collapses a zero-width viewport for GCN geometry only when it outputs triangle strips (GcnGeometry.cpp checks; the line-strip check fails without the fix). 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_gcn_geometry, agc_driver_draw_recapture_on_change_inline, agc_driver_draw_recapture_on_change_finisher, agc_driver_tessellation, agc_driver_tessellation_geometry, agc_driver_graphics, agc_tessellation_lowering 10/10. Every log loads the layer, no was not found, 0 VUID-. check_conventions and debt_fold.py --check pass.
  • 2026-11-27, head d4c1ba3a31c: CodeRabbit's copy-program note fixed in bbafa86a109: ParseGeometryCopyProgram now throws on any buffer, typed buffer, flat, LDS or image access other than the GSVS ring read, where it used to drop it (a copy-program store parsed without error and never ran). GcnGeometry.cpp adds a copy program ending in buffer_store_dword; without the fix agc_driver_gcn_geometry fails with a copy program was accepted. Merged main c2787d822ad; the only conflict was the UserDataWords role line in DrawDecode.cpp (kept this branch's LinkedOnlyRole, main's hiddenUserWords term was already here). Main still ends at request serialization version 64 and has not changed the serializer or journal since the last merge, so 65/66/67 do not collide. 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): agc_driver_gcn_geometry, agc_driver_gcn_indirect_draw_location, agc_driver_gcn_tessellation, agc_driver_tessellation_geometry, agc_driver_draw_recapture_on_change_inline and _finisher 6/6 on the merged head; main c2787d822ad 4/4 on the four that exist there. Every log loads the layer, no was not found, 0 VUID-. check_conventions and debt_fold.py --check pass.
  • 2026-11-28, head dbb26e7a016: following akimfomin's note, 2ffa22b8311 makes the pixel check catch a duplicated primitive or a twisted strip. Each quad is blended at a quarter of its colour over the clear colour, and five points per quad are sampled. Two temporary controls fail it: drawing twice (red 144, expected 80) and swapping two GS vertex x stores (a sample near an edge keeps the clear colour). Merged feat(shader): lower PS4 on-chip tessellation LDS through the off-chip ring #22328 8dd935bb29f (tessellation constants read with the draw's memory), clean, no version change. Same setup as above: agc_driver_gcn_geometry, agc_driver_gcn_indirect_draw_location, agc_driver_gcn_tessellation, agc_driver_tessellation_geometry, agc_driver_draw_recapture_on_change_inline and _finisher 6/6, 10 layer inserts, no was not found, 0 VUID-; main c2787d822ad 4/4, 0 VUID-. feat(shader): lower PS4 on-chip tessellation LDS through the off-chip ring #22328's new ShaderMemory.cpp check is in agc_shader_memory_tests, which is not built on Windows here; CI runs it. check_conventions and debt_fold.py --check pass.
  • 2026-11-28, head 1e7436042b4: CodeRabbit's three notes. (1) Evaluate remembers solved terms and stops at the first operand it cannot solve, so a shared ISub32(a, a) chain is no longer 2^n calls; the new agc_geometry_lowering test (31 shared steps) passes in 0.07 s and times out at 10 s without the fix. (2) The copy parser refuses GSVS reads through two descriptors, or after the descriptor SGPRs are rewritten; whether the one descriptor is really the GSVS ring is not checked (recorded in debt). (3) It refuses a GSVS read with the LDS modifier. Each GcnGeometry.cpp refusal fails with its fix reverted. Same Windows setup with ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer: agc_geometry_lowering, agc_driver_gcn_geometry, agc_driver_gcn_indirect_draw_location, agc_driver_gcn_tessellation, agc_driver_tessellation_geometry and the two agc_driver_draw_recapture_on_change tests 7/7, 10 layer inserts, no was not found, 0 VUID-; main c2787d822ad (the main in this head) 4/4, 0 VUID-. check_conventions, debt_fold.py --check and check_test_registration pass.
  • 2026-11-28, head 84c6ee2d4bd: MarcZX10's overflow point. GeometryRingDwords computes GSVS ring sizes in 64 bits and refuses rings that do not fit 32-bit addresses; the copy parser, lowering and SPIR-V ring use it. agc_geometry_lowering covers the largest accepted ring (1024 vertices x 32767 dwords) and a wrapping VGT_GS_MAX_VERT_OUT, and fails with the check disabled. Windows RTX 4080 SUPER, LunarG 1.4.363.1 validation: 6/6 focused tests, 0 VUID-; main 1d9818437fd 3/3, 0 VUID-.
  • 2026-12-04, head 681916a0952: merged main fb41bd71986. The only conflict was the pipeline journal format line: main's fix(agc): run quad-masked early-Z stores under early fragment tests #28218 took format 20 for its early-Z byte. This head writes format 23 (main's byte plus this stack's fields); 21 was written only by earlier heads of this PR without the early-Z byte, and 22 is left for feat(agc): draw PS4 LS-HS-VS tessellation through the off-chip ring lowering #22251 and feat(shader): lower PS4 on-chip tessellation LDS through the off-chip ring #22328, whose tessellation byte also used 20. Request serialization is unchanged (main still ends at 64; this PR writes 67). New check in tests/execution/PipelineJournal.cpp: the journal is written as 23, and the same file stamped 19, 20, 21, 22 or 24 is not replayed while 23 is. 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 the new check), agc_driver_pipeline_journal_undecodable_module, the six agc_pipeline_journal* tests, agc_driver_gcn_geometry, agc_driver_gcn_tessellation, agc_driver_tessellation_geometry and agc_geometry_lowering 13/13, 34 layer inserts, no was not found, 0 VUID-; main fb41bd71986 10/10 on the ten that exist there, 25 layer inserts, 0 VUID-. Linux layout guards: PipelineJournal.cpp compiles under WSL Ubuntu GCC 11.4 (-fsyntax-only with the build's flags), so State is still 1064 there; with the guard changed to 1063 it fails. check_conventions and debt_fold.py --check pass.
  • 2026-12-05, head 6572d764e74: merged main b71ffddc0f1. Main's 13117947f91 took request serialization version 65 for its windowSelects byte, so RequestSerializer.cpp, RequestSerializerTests.cpp and ShaderMemory.cpp conflicted. Requests are now written as version 70, laid out as the stack now writes them: windowSelects from 65, the on-chip byte from 68 (feat(agc): draw PS4 LS-HS-VS tessellation through the off-chip ring lowering #22251), the tessellation constants from 69 (feat(shader): lower PS4 on-chip tessellation LDS through the off-chip ring #22328) and the geometry configuration from 70. 66 and 67, written only by earlier heads of this PR and feat(shader): lower PS4 on-chip tessellation LDS through the off-chip ring #22328 in other layouts, are refused; 71 is refused as unwritten. The journal stays at format 23. 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_geometry, agc_geometry_lowering, agc_driver_gcn_tessellation, agc_driver_pipeline_journal (format check), agc_driver_pipeline_journal_undecodable_module, the six agc_pipeline_journal* tests, agc_driver_tessellation, agc_driver_tessellation_geometry, agc_driver_tessellation_depth_range_remap, agc_tessellation_factor_ring, agc_tessellation_lowering, agc_driver_register_key and agc_driver_graphics 19/19, 37 layer inserts, no was not found, 0 VUID-; main b71ffddc0f1 16/16 without the three GCN tests, 28 inserts, 0 VUID-. agc_shader_memory was not run locally (Defender quarantines it on Windows); CI covers it. check_conventions and debt_fold.py --check pass.

Checklist

Summary by CodeRabbit

  • New Features
    • Added support for legacy GCN geometry shaders, including geometry processing and copy-shader exports.
    • Added support for legacy GCN tessellation in on-chip and off-chip configurations.
  • Bug Fixes
    • Improved validation and handling of geometry and tessellation settings, including geometry output limits.
  • Compatibility
    • Updated saved pipeline and shader request formats to retain geometry and tessellation settings.

B-Howell and others added 14 commits November 17, 2026 04:34
…owering

A GCN title routes tessellation as VGT_SHADER_STAGES_EN 0x45 (LS_EN 1,
HS_EN 1, VS_EN 1 = VS_STAGE_DS, no ES or GS), which DecodeShaderStages
refused. Decode it for GCN guests, read the local, hull and domain
programs from the LS, HS and VS registers with their own user data, and
give each stage the GCN wave inputs: LS v0 VertexID, v1 RelAutoIndex,
v2 and v3 InstanceID; HS v0 PatchID, v1 the packed relative patch and
control point, then the off-chip SGPR when OC_LDS_EN is set and the
factor SGPR; domain v0 and v1 the tessellation coordinate, v2 the
relative patch, v3 PatchID and the off-chip SGPR when OC_LDS_EN is set.
The GCN local shader is a whole program ending in s_endpgm and links its
fetch shader like a GCN vertex shader.

The new TessellationConfiguration.onChip records OC_LDS_EN clear. Hull
outputs kept in LDS (on chip) are refused by name and recorded as debt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ip byte

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… ring

With SPI_SHADER_PGM_RSRC2_HS.OC_LDS_EN clear a GCN hull shader keeps its
output control points and patch constants in LDS, and the domain shader
reads them there. The offsets come from the tessellation constant buffer,
a V# in four user data words laid out as shadPS4's
TessellationDataConstantBuffer, so the lowering refused them.

The lowering now finds the constant buffer that on-chip LDS addresses
read and throws TessellationConstantsRequired naming its user data words
when the request carries no values. The driver then reads its nine dwords
from guest memory, remembers the words for that program, and prepares the
stage again with GraphicsCompileContext.tessellationConstants, which is
part of the shader key and the serialized request (version 64). The
lowering replaces the buffer's reads with those values, so the addresses
become affine. Hull writes and domain reads at or above hs_output_base
become off-chip ring accesses rebased by it, and the existing ring
lowering places control points and patch constants. A hull with
hs_output_base 0 is pass-through: each invocation copies its input
control point to its output control point.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ests

The on-chip tessellation byte moved new requests to version 63, but
agc_shader_memory still expected 62, kept 63 in its unsupported list and
stripped six trailing bytes from a tessellated merged-hull request when
making its version 56 fixture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ests

The tessellation constants flag moves new requests to version 64, which
writes two trailing bytes for a tessellated request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry stage

A GCN title routes geometry shaders as VGT_SHADER_STAGES_EN 0xb0
(ES_EN 2 = ES_STAGE_REAL, GS_EN 1, VS_EN 2 = VS_STAGE_COPY_SHADER),
which DecodeShaderStages refused. Decode it for GCN guests with
VGT_GS_MODE GS_SCENARIO_G off chip and read the export, geometry and
copy programs from the ES, GS and VS registers.

The ES is compiled as a Vulkan vertex shader whose ESGS ring stores
(soffset the ES2GS offset SGPR) become its output record. The GS is
compiled as a Vulkan geometry shader: its input VGPRs carry the ES
vertex offsets, ESGS ring reads become reads of the input record of
that vertex, GSVS ring stores (soffset the GS2VS offset SGPR) go to a
per-invocation array of VGT_GS_VERT_ITEMSIZE times VGT_GS_MAX_VERT_OUT
dwords, and s_sendmsg GS emit and cut become EmitVertex and
EndPrimitive. The copy VS is not compiled: its exports, each component
a GSVS ring dword or a constant, define the outputs every emit copies
out of that array for the emitted vertex.

Request serialization goes to version 63 and the pipeline journal to
format 20 for the geometry configuration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Request serialization moves to version 65 and the pipeline journal to
format 21, after boykopovar#22251 (63, journal 20) and boykopovar#22328 (64).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…am offsets

A copy VS can build a GSVS ring scalar offset with s_addk_i32,
s_lshl_b32, s_bfm_b32 or s_mul_i32 rather than one s_movk_i32, as
shadPS4 143b58aa48 ParseCopyShader handles. Fold those when their
sources are known constants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y GSVS stores apart

The copy VS parser read every program as straight-line code. A branch,
s_setpc, s_swappc, s_call or a write to EXEC now throws instead of being
skipped. A GSVS store at a constant address past VGT_GS_VERT_ITEMSIZE
times VGT_GS_MAX_VERT_OUT dwords throws; a computed one past it goes to
a spare dword that no output reads instead of the item's last dword.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A PS4 copy VS selects its stream block with s_lshr_b32 of the stream-out
configuration SGPR, s_cmpk_eq_u32 and s_cbranch_scc0. With
SPI_SHADER_PGM_RSRC2_VS.SO_EN set, that SGPR follows the user SGPRs; it
is read as 0, since only stream 0 without stream-out is drawn. Scalar
compares now set a known SCC, forward s_branch and s_cbranch_scc0/1 on a
known SCC are followed, and any other control flow still throws. The
GSVS read address must also come from the incoming v0, not one written
earlier in the program.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…efore it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tablefrogpillow

Copy link
Copy Markdown
Contributor

Heads-up — this doesn't build on Linux (same class as #22359). On a RADV/Linux box (GCC 13.3, -DBUILD_TESTING=ON) at head c89e3c58, building the GCN geometry/tessellation test targets fails:

core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp:50:29: error: static assertion failed: State changed: update CanonicalPipelineState and the recipe codec
core/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp:51:36: error: static assertion failed: ShaderStages changed: update the recipe codec

Those are the sizeof(State) == 1008 / sizeof(ShaderStages) == 164 guards, wrapped in #if defined(__linux__) && defined(__x86_64__) && defined(__GLIBCXX__), so they compile only on Linux/libstdc++. Your Tested run was Windows 11 + RTX 4080, where that whole block is #if'd out. This PR adds the geometry config to ShaderStages (and State), so their sizes no longer match the asserted 1008/164.

(sizeof is compiler-stable and this same box builds current main fine, so it's the struct-size change, not the toolchain.) Same fix as #22359: bump both sizeof(...) == values (read from a Linux x86_64 GCC build) and update CanonicalPipelineState + the recipe codec's encode/decode so the serialized format stays in sync. Happy to re-run the GCN geometry/tessellation tests on our 3 AMD gens + Vega once it builds on Linux.

AI-assisted: yes

@github-actions github-actions Bot added build shader core/shader docs agc libSceAgc* unblocks title Names a title ID on the Unblocks line labels Nov 17, 2026
@B-Howell

Copy link
Copy Markdown
Contributor Author

@PrivacyOnion @MarcZX10 when you have time, could one of you give this a first review? It draws PS4 ES-GS-VS geometry shaders through a Vulkan geometry stage and gets Bloodborne past VGT_SHADER_STAGES_EN=0xb0. It is stacked on #22251 and #22328, so only the commits after #22328's head are new here. The Linux test build that tablefrogpillow reported is being answered separately.

B-Howell and others added 4 commits November 17, 2026 11:53
…essellation

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ip-tessellation

Brings in boykopovar#22251's merge of origin/main (cf2cc25).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…metry configuration

ShaderStages gained legacyGeometry, so the Linux x86_64 libstdc++ guards
no longer matched and the build failed there. The sizes are read from a
GCC 11.4 Linux build. The new GeometryConfiguration and GeometryCopyExport
get guards like the mesh and tessellation configurations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@B-Howell

Copy link
Copy Markdown
Contributor Author

@tablefrogpillow thank you, that was a real break, and I could only see it on Linux.

Fixed in 258b5932450. The two guards now say State 1064 and ShaderStages 224, read from a WSL Ubuntu GCC 11.4 build of this head. I also added guards for the new GeometryConfiguration (48) and GeometryCopyExport (32), like the mesh and tessellation ones. The recipe codec and CanonicalPipelineState already carry legacyGeometry (encodeGeometry/decodeGeometry), so only the sizes were stale.

On WSL the old file fails with exactly your two assertions. The new head builds agc_driver_gcn_geometry_tests, agc_driver_gcn_tessellation_tests and agc_driver_graphics_tests, and agc_pipeline_journal passes. WSL here has no Vulkan loader, so the two GCN tests skip; your runs on the AMD GPUs and Vega would be the first GPU runs of them on Linux. The head also merges the newest #22328 (a589520069d), which touches no AGC or shader file.

@tablefrogpillow

Copy link
Copy Markdown
Contributor

Builds clean on Linux now (thanks for the fix, 258b5932), so here's the cross-HW run I'd offered. agc_driver_gcn_geometry + agc_driver_gcn_tessellation, head 258b5932, Khronos validation 1.4.363, ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1:

GPU arch geometry tessellation
RX Vega 56 (RADV VEGA10, gfx900, Wave64) GCN5 Pass Pass
Ryzen 7000 iGPU (RADV RAPHAEL, gfx1036) RDNA2 Pass Pass
RX 7900 GRE (RADV NAVI31, gfx1100) RDNA3 Pass, 0 VUID Pass
lavapipe SW Pass Pass

0 VUID throughout. GCN5 is the native arch for the ES-GS-VS ring (RDNA uses NGG), so good to see the PS4 geometry pipeline — drawn through the Vulkan geometry stage — pass on real GCN hardware as well as RDNA2/RDNA3. GCN geometry tests passed / GCN tessellation tests passed on all four stacks.

AI-assisted: yes

@oneandonlydean
oneandonlydean dismissed MarcZX10’s stale review December 3, 2026 15:07

MarcZX10 change request on 1e74360 asked: Changes are required before merge: make the geometry-ring address calculations overflow-safe before using them as vector sizes, indexes, or offsets. His later review of the current head 84c6ee2 states no blocking findings (Blocking: None identified in the code inspected.) so the request no longer applies.

@github-actions github-actions Bot added the review queue Next in the maintainer review queue: checks pass, no open change request, no conflict label Dec 3, 2026

@ligmaSec ligmaSec left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The request format collides with two other open branches at version 67. I compiled the exact-head serializers for this PR, #23811, and #23553. They read their own captures. This PR rejected the #23553 capture as truncated and the #23811 capture with an emulated-barycentrics flag error. Both other readers also rejected this PR’s capture. Please reconcile the version assignment as these branches land so a saved request always identifies a single layout.

The trial merge onto a1b75b0947 was clean. The format checks were native standalone tests. Paired Vulkan execution is pending.

AI-assisted: yes.

@B-Howell

B-Howell commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

@ligmaSec thanks. 67 is the third number of this stack (#22251 writes 65, #22328 writes 66, this PR 67). Main ends at request version 64 and journal format 19, so the clash is only with the open #23811 and #23553. On the journal, #28488 also takes format 20, the number #22251 uses, and this PR uses 21.

The plan is the one on #22251: the first branch to land keeps its number. This PR lands after #22251 and #22328, so when it merges main after any other format change it moves its geometry fields and journal format to the next free numbers. The serializer test will expect the new number and reject the next, the reader will refuse the skipped numbers, and I'll ask for a fresh approval.

I also corrected the description, which still listed the older 64-66 numbers.

B-Howell and others added 2 commits December 3, 2026 19:46
Main's boykopovar#28218 took pipeline journal format 20 for its early-Z byte.
This branch's journal now carries that byte too, so it moves from 21
to 23: 21 was written only by earlier heads of this branch without the
early-Z byte, and 22 is left for boykopovar#22251 and boykopovar#22328, whose tessellation
byte also used 20.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ones

The journal is written as format 23. A journal stamped 19 or 20 (main),
21 (earlier heads of this branch), 22 (left for boykopovar#22251 and boykopovar#22328) or 24
is not replayed; the same bytes stamped 23 are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Dec 4, 2026
@B-Howell

B-Howell commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

Merged main fb41bd71986 (head 681916a0952). The only conflict was the pipeline journal format line: #28218 took format 20 on main for its early-Z byte. This PR now writes journal format 23 with main's byte included. 21 was only on earlier heads of this PR and is refused, and 22 is kept for #22251/#22328, whose tessellation byte also used 20. Request serialization stays at 67, since main still ends at 64. A new check in PipelineJournal.cpp covers this: the journal is written as 23, and 19 to 22 and 24 are not replayed. The focused AGC tests pass 13/13 with the validation layer loaded and 0 VUID-, against 10/10 on main. Details are under Tested.

@github-actions github-actions Bot removed the review queue Next in the maintainer review queue: checks pass, no open change request, no conflict label Dec 4, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — comments

Nothing blocks this; the points below are optional.

What I ran

Reviewed head 681916a0952f1b52bf9e24b9a78758cb808aac8d. I inspected the prepared description, commits, manifest and diff, the full GeometryLowering.cpp text, and targeted diff/source excerpts for State.cpp, DrawDecode.cpp and TessellationLowering.cpp. No tests or builds were run here; test results in the description are author-reported.

cat description.md commits.md manifest.json diff.patch
python3 repo_read.py cat core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp 1410 1558

Results

Check Result Note
Prepared review artifacts passed Read; diff output was truncated
Source review not run Targeted excerpts only
Tests and build not run Author-reported results not reproduced

Negative control

Not run; no tests were executed in this review.

Findings

Blocking

None identified in the inspected excerpts. This is not a full-file review.

Non-blocking

The change spans 61 files. Complete review of the remaining files before treating this as a merge recommendation.

Sources

Not verified

  • Full-file behavior of the 61 changed files; four changed paths received targeted inspection, and the other 57 were not reviewed.
  • Full texts unavailable in the review folder: core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp, core/libs/prx/libSceAgcDriver/tests/Graphics.cpp and core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp.
  • Build, tests, Vulkan validation and console behavior on this head.

To get this to a good state

Nothing is required. Optional: complete the remaining source review before making a formal merge decision.

B-Howell added a commit to B-Howell/AnyPS5 that referenced this pull request Dec 4, 2026
… byte

main's boykopovar#28218 took journal format 20 for its pixelEarlyZ byte, the
number this branch used for the tessellation onChip byte, so a journal
written by main would have been read in this branch's layout. The
journal now carries both bytes as format 22; 21 was written only by
earlier heads of boykopovar#22439 and is refused like 19 and 20, and 23 belongs
to boykopovar#22439.

FormatNumberTests checks that the journal is written as 22 and that the
same file stamped 19, 20, 21 or 23 is not replayed while 22 is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Dec 4, 2026
main's 1311794 took request serialization version 65 for its
windowSelects byte. This branch keeps the stack's layout after it and
writes version 70: windowSelects from 65, the tessellation onChip byte
from 68 and its constants from 69 (as boykopovar#22251 and boykopovar#22328 now write
them), and the geometry configuration from 70. 66 and 67, written only
by earlier heads of this branch and boykopovar#22328, are refused; 71 is refused
as unwritten. The pipeline journal stays at format 23.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
B-Howell added a commit to B-Howell/AnyPS5 that referenced this pull request Dec 5, 2026
main's 1311794 took request serialization version 65 for its
windowSelects byte, the number this branch used for the tessellation
onChip byte. Requests are now written as version 68: windowSelects is
read from 65 and onChip from 68 after it. 66 and 67 were written only
by earlier heads of boykopovar#22328 and boykopovar#22439 in other layouts, so they are
refused like 50 and 58 to 61; 69 is refused as unwritten. The pipeline
journal stays at format 22 (main still writes 20).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
B-Howell added a commit to B-Howell/AnyPS5 that referenced this pull request Dec 5, 2026
…ip-tessellation

boykopovar#22251 now writes request serialization version 68 after main's 65
(windowSelects). This branch's tessellation constants follow its onChip
byte as version 69. 66 and 67, written only by earlier heads of this
branch and boykopovar#22439, are refused; 70 is refused as unwritten. The
pipeline journal stays at format 22.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@B-Howell

B-Howell commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged main b71ffddc0f1 into 6572d764e74. It conflicted in RequestSerializer.cpp, its tests and ShaderMemory.cpp: main's 13117947f91 took request version 65 (windowSelects).

Change: requests are now version 70, in the stack's new layout (65 windowSelects, 68 on-chip byte from #22251, 69 tessellation constants from #22328, 70 geometry configuration). 66 and 67, written only by older heads of this PR and #22328, are refused; 71 is refused as unwritten. The journal stays at 23.

Tested on Windows 11, RTX 4080 SUPER, Khronos layer on: 19/19 (serializer, GCN geometry and tessellation, geometry lowering, journal, tessellation, register key, graphics), 0 VUID-; main 16/16, 0 VUID-.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Dec 5, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — comments

Nothing blocks this; the points below are optional.

What I ran

Reviewed the prepared diff at head 6572d764e7443cc9ec10d207aa3d8593396ee60c; I did not run commands that compile or tests. I read the description, commits, manifest, and portions of the diff, plus targeted source excerpts from GeometryLowering.cpp, State.cpp, and DrawDecode.cpp through repo_read.py.

Results

Check Result Note
Targeted source review not run Manual inspection only
Tests and build not run Author-reported results were not rerun
Negative control not run No test mutation was made

Negative control

Not run; no test mutation was made.

Findings

Blocking

No blocking finding is reported from the inspected excerpts. The review is incomplete, so this is not a merge approval.

Non-blocking

No source-level non-blocking finding raised.

Sources

Not verified

The review folder excluded ShaderResources.cpp, Graphics.cpp, and ShaderMemory.cpp because they were too large. I did not read those files through the reader or inspect all other changed files and hunks. The author-reported test and hardware results were not independently verified.

To get this to a good state

Nothing is required. Optionally, complete review of the uninspected changed files and rerun relevant checks on this head before making a formal approval decision.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Dec 5, 2026
superSniper4576154 pushed a commit to superSniper4576154/AnyPS5 that referenced this pull request Dec 6, 2026
…sembly refusal

"unsupported geometry input or output assembly" did not say which of its
two conditions failed. The message now carries the input primitive type,
VGT_GS_MAX_VERT_OUT and VGT_GS_OUT_PRIM_TYPE, so a title's refusal names
the assembly that needs support.

PPSA38500 reaches this for 21 NGG geometry pipelines with
VGT_SHADER_STAGES_EN 0x2030 (ES_EN 2, GS_EN, PRIMGEN_EN): the merged ES+GS
mesh path, not the GCN ES-GS-VS copy-shader routing of open PR boykopovar#22439, nor
the tessellation ESGS item size of boykopovar#26630 or the vertex-workgroup line lists
of boykopovar#26600, none of which applies to it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build docs needs rebase Conflicts with main, rebase needed shader core/shader unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants