feat(agc): primitive restart with an all-ones index for strips, and for lists with VK_EXT_primitive_topology_list_restart #115

Merged
oneandonlydean merged 1 commit from upstream-pr/115 into main 2026-09-30 09:27:43 +00:00
oneandonlydean commented 2026-09-29 00:01:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-09-29T00:01:23Z.


What

Follows #60. Indexed draws with GE_MULTI_PRIM_IB_RESET_EN were rejected outright. They're now drawn with Vulkan's primitiveRestartEnable when the result is exact:

  • Strips (line strip, triangle strip, and the adjacency strip types): Vulkan core restarts on the all-ones index.
  • Lists (point, line, triangle): only when the device has VK_EXT_primitive_topology_list_restart. The feature is detected and enabled in VulkanDevice, and passed through Context::primitiveListRestart.
  • The reset index (VGT_MULTI_PRIM_IB_RESET_INDX) must be all ones for the draw's index size, which is what Vulkan restarts on. Any other value is still rejected by name.
  • Patches and rect lists are still rejected.

State::primitiveRestart is part of the pipeline key.

Tested

  • Linux (CachyOS, RTX 4090, which has the list-restart extension): Astro Bot's indexed strip and list draws with restart enabled now render.

  • New cases in agc_driver_graphics_tests:

    • restart on patches is rejected;
    • restart on an indexed strip is accepted and decoded;
    • a reset index other than all ones is rejected.

    They ran on this branch merged with #113, which makes the target link again.

  • ctest: 57/57 pass.

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 in TechnicalDebt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: #113 (to build the test target)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4670750102 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/115). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-09-29T00:01:23Z. --- ### What Follows #60. Indexed draws with `GE_MULTI_PRIM_IB_RESET_EN` were rejected outright. They're now drawn with Vulkan's `primitiveRestartEnable` when the result is exact: - **Strips** (line strip, triangle strip, and the adjacency strip types): Vulkan core restarts on the all-ones index. - **Lists** (point, line, triangle): only when the device has `VK_EXT_primitive_topology_list_restart`. The feature is detected and enabled in `VulkanDevice`, and passed through `Context::primitiveListRestart`. - **The reset index** (`VGT_MULTI_PRIM_IB_RESET_INDX`) must be all ones for the draw's index size, which is what Vulkan restarts on. Any other value is still rejected by name. - **Patches and rect lists** are still rejected. `State::primitiveRestart` is part of the pipeline key. ### Tested - Linux (CachyOS, RTX 4090, which has the list-restart extension): Astro Bot's indexed strip and list draws with restart enabled now render. - New cases in `agc_driver_graphics_tests`: - restart on patches is rejected; - restart on an indexed strip is accepted and decoded; - a reset index other than all ones is rejected. They ran on this branch merged with #113, which makes the target link again. - `ctest`: 57/57 pass. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in TechnicalDebt - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source (none added) - [x] Generic behaviour, not specific to one title - [x] Depends on: #113 (to build the test target) - [x] AI-assisted: yes
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!115
No description provided.