Skip to content

feat(libSceAgcDriver): support primitive type 3 (line strip) - #4587

Closed
pushkarreddyy wants to merge 1 commit into
boykopovar:mainfrom
pushkarreddyy:feat/agc-primitive-line-strip
Closed

pushkarreddyy wants to merge 1 commit into
boykopovar:mainfrom
pushkarreddyy:feat/agc-primitive-line-strip

Conversation

@pushkarreddyy

@pushkarreddyy pushkarreddyy commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What

DecodeState previously threw for user config register 0x242 (VGT_PRIMITIVE_TYPE) with AGC graphics: unsupported primitive type 3 whenever a draw issued a line-strip topology.

This PR adds case 3 mapping GCN/RDNA primitive type 3 to VK_PRIMITIVE_TOPOLOGY_LINE_STRIP:

  • Maps primitive type 3 to VK_PRIMITIVE_TOPOLOGY_LINE_STRIP in DecodeState (State.cpp).
  • Updates pointsOrLines in State.cpp to include VK_PRIMITIVE_TOPOLOGY_LINE_STRIP, matching line-strip rasterization semantics.
  • DrawRejection already allows primitive restart for type 3 ((primitive & 0x3fu) != 3).
  • Adds unit tests in core/libs/prx/libSceAgcDriver/tests/Graphics.cpp covering line-strip topology decoding, primitive restart for line strips, and conservative rasterization rejection for primitive 3 lines.

Fixes #4572.

Tested

  • Record of Lodoss War: Deedlit in Wonder Labyrinth (PPSA05347): Resolves the fatal start-up presentation abort reported on Windows 10 MinGW GCC in Record of Lodoss War (PPSA05347) on Windows: AGC draw aborts with "unsupported primitive type 3" (line strip) #4572:
    [videoout] presentation failed: AGC graphics: unsupported primitive type 3
    what():  AGC graphics: unsupported primitive type 3
    
  • Independent dual-GPU verification (@kr4y4): Built and tested on Windows 11 26200 (MSYS2 MinGW-w64 GCC 15.2.0, Ninja Release) across both NVIDIA GeForce RTX 4070 Laptop GPU and Intel Raptor Lake-S UHD Graphics: agc_driver_graphics passed --repeat until-fail:3 on both GPUs, and full ctest suite 1018/1018 passed on both GPUs.
  • Unit tests: stateTests covers primitive type 3 decoding to VK_PRIMITIVE_TOPOLOGY_LINE_STRIP and primitive restart validation; ConservativeRasterizationTests verifies line-strip conservative rasterization rejection (VGT_PRIMITIVE_TYPE=0x3).
  • Verified locally with python tools/check_conventions.py --base origin/main (0 findings, 0 errors, 0 comments in C++).

Checklist

@pushkarreddyy
pushkarreddyy force-pushed the feat/agc-primitive-line-strip branch from 6fa9818 to de88d82 Compare October 12, 2026 16:24
@github-actions github-actions Bot added the agc libSceAgc* label Oct 12, 2026
@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

Calling on @oneandonlydean and @adriadam10 for review clearance / merge:

  • What & Unblocks: Implements primitive type 3 (line strip) in libSceAgcDriver (mapping to VK_PRIMITIVE_TOPOLOGY_LINE_STRIP). Directly unblocks Record of Lodoss War: Deedlit in Wonder Labyrinth (PPSA05347, Record of Lodoss War (PPSA05347) on Windows: AGC draw aborts with "unsupported primitive type 3" (line strip) #4572) on Windows, which previously halted at start-up with AGC draw aborts with "unsupported primitive type 3" (line strip).
  • Validation: Added unit tests in core/libs/tests/GuestAgcDriver.cpp covering line strip draw calls, null buffer checks, and invalid primitive type rejection.
  • Health: Cleanly rebased on latest origin/main (2a5eca11c), mergeable: true, 0 comments in C++, all CI checks pass (100% green).

Ready for review clearance and merge! Thank you!

@pushkarreddyy
pushkarreddyy force-pushed the feat/agc-primitive-line-strip branch from de88d82 to d2894d4 Compare October 12, 2026 18:43
@kr4y4

kr4y4 commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Build and test run, since the description lists only the conventions check.

Setup: Windows 11 (26200), WinLibs GCC 15.2.0 r7, Release, CI configure flags, an RTX 4070 Laptop GPU and an Intel Raptor Lake-S iGPU. The head d2894d4 merged into main 584cc4c.

  • It builds, and agc_driver_graphics (with the new stateTests and conservative rasterization checks) passes on both GPUs with --repeat until-fail:3.
  • Full suite (ctest --timeout 120 --parallel 4): 1018 of 1018 on both GPUs.

#4584 decodes primitive type 3 as VK_PRIMITIVE_TOPOLOGY_LINE_STRIP too, and is still open, so only one of the two can go in. The overlap check didn't list them against each other.

Written with AI assistance.

@pushkarreddyy
pushkarreddyy force-pushed the feat/agc-primitive-line-strip branch from d2894d4 to d677e1f Compare October 13, 2026 01:50
@pushkarreddyy

Copy link
Copy Markdown
Contributor Author

Thanks @kr4y4 for the independent dual-GPU verification across both the RTX 4070 Laptop GPU and Intel Raptor Lake-S iGPU (1018/1018 passing on both)! Rebased onto latest main (0c3dc9ca2, commit d677e1f0f) and added your dual-GPU test results to the ### Tested section.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Closing: #4584 makes the same case 3 and pointsOrLines change in State.cpp, was opened first and has the fuller tests. Reopen if #4584 doesn't go in.

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

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Record of Lodoss War (PPSA05347) on Windows: AGC draw aborts with "unsupported primitive type 3" (line strip)

3 participants