Skip to content

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

Closed
ErenYeager1836 wants to merge 1 commit into
boykopovar:mainfrom
ErenYeager1836:carry/libSceAgcDriver-primitive-type-3-line-strip
Closed

ErenYeager1836 wants to merge 1 commit into
boykopovar:mainfrom
ErenYeager1836:carry/libSceAgcDriver-primitive-type-3-line-strip

Conversation

@ErenYeager1836

@ErenYeager1836 ErenYeager1836 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What

Maps AMD RDNA2 primitive type 3 (VGT_PRIMITIVE_TYPE=0x3) to VK_PRIMITIVE_TOPOLOGY_LINE_STRIP in AGC graphics state decoding.

  • Decodes VK_PRIMITIVE_TOPOLOGY_LINE_STRIP when primitive == 3.
  • Treats VK_PRIMITIVE_TOPOLOGY_LINE_STRIP as a line topology for rasterizer line offset calculations alongside VK_PRIMITIVE_TOPOLOGY_POINT_LIST and VK_PRIMITIVE_TOPOLOGY_LINE_LIST.
  • Adds unit tests in core/libs/prx/libSceAgcDriver/tests/Graphics.cpp verifying primitive restart decoding for line strips and rejecting unsupported conservative rasterization of line strips.

Carried from @pushkarreddyy with attribution preserved.

Tested

Linux and Windows: core/libs/prx/libSceAgcDriver/tests/Graphics.cpp unit tests pass for primitive restart decoding on line strip topology.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • AI-assisted: yes

Maps AMD RDNA2 primitive type 3 (VGT_PRIMITIVE_TYPE=0x3) to VK_PRIMITIVE_TOPOLOGY_LINE_STRIP, handles rasterization line offset decoding, and adds tests for primitive restart and conservative rasterization rejection in Graphics.cpp.
@github-actions github-actions Bot added the agc libSceAgc* label Oct 13, 2026
@xXPBSXx

xXPBSXx commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Thanks for the test. Line strip support (primitive type 3) has already landed in #4584, which adds LineStripTests in tests/Graphics.cpp; those cover the same topology decode, the line primitive class, primitive restart on a line strip and the indexed-strip precheck, so the three new assertions in stateTests look redundant to them.

The new case in ConservativeRasterizationTests (type 3 rejected as "lines", VGT_PRIMITIVE_TYPE=0x3) is not covered by LineStripTests, and State.cpp already names type 3 "lines" there (primitive == 2u || primitive == 3u). Keeping only that case, rebased on current main, would be the useful part. I read the diff only; I have not built or run it.

AI-assisted (Claude Code).

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Closing: no title is known to reach this. With the queue at 700+ open PRs, please hold off on new PRs that don't name a title needing the change until it's down. If a title stops on this on current main, reopen with the title ID and the log line.

@pushkarreddyy

Copy link
Copy Markdown
Contributor

@oneandonlydean @xXPBSXx Thanks for clarifying! Good to know primitive type 3 line strip support was already landed in #4584.

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.

4 participants