feat(libSceAgcDriver): support polygon primitive type 21 #7175

Merged
pushkarreddyy merged 1 commit from upstream-pr/7175 into main 2026-10-18 10:52:23 +00:00
pushkarreddyy commented 2026-10-17 14:55:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-17T14:55:24Z.


What

Support primitive type 21 (PrimitiveType::Polygon, 0x15) in libSceAgcDriver:

  • In core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp, map primitive 21 to VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN in DecodeState alongside triangle fan (case 5).
  • Allow primitive restart for primitive 21 with an all-ones reset index in DrawRejection and in DrawPrecheck.cpp (precheckDraw).
  • In inactiveVertexPointSize, mark point size inactive for primitive 21 draws, consistent with triangle fans and strips.
  • In decodeConservativeRasterization and nonTriangleRejection, include primitive 21 alongside triangle fans and strips.
  • Add unit test coverage in core/libs/prx/libSceAgcDriver/tests/Graphics.cpp (PolygonPrimitiveTests and primitive restart tests) verifying state decoding, restart handling, raster primitive classification, and precheck acceptance, and add primitive 21 to inactiveVertexPointSizeTests, singleSampleMsaaTests, and conservativeRasterizationTests.
  • Document technical debt in docs/dev/debt/libSceAgcDriver.md.

Tested

  • Tested locally on Windows 11 with MinGW-w64 GCC 15.2.
  • Unit tests: PolygonPrimitiveTests verifies that VGT_PRIMITIVE_TYPE = 21 decodes to VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN, classifies as triangle primitive in RasterPrimitiveOf, preserves primitive restart when configured, and passes draw prechecks.
  • Conventions: python tools/check_conventions.py --base origin/main passes with 0 findings and 0 errors.

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
  • Fixes: none
  • Unblocks: PPSA01317 #6350
  • GPUs tested: NVIDIA GeForce RTX 3070, Driver 576.88, Windows 11
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4901098572 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7175). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-17T14:55:24Z. --- ### What Support primitive type 21 (`PrimitiveType::Polygon`, 0x15) in `libSceAgcDriver`: - In `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`, map primitive 21 to `VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN` in `DecodeState` alongside triangle fan (case 5). - Allow primitive restart for primitive 21 with an all-ones reset index in `DrawRejection` and in `DrawPrecheck.cpp` (`precheckDraw`). - In `inactiveVertexPointSize`, mark point size inactive for primitive 21 draws, consistent with triangle fans and strips. - In `decodeConservativeRasterization` and `nonTriangleRejection`, include primitive 21 alongside triangle fans and strips. - Add unit test coverage in `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` (`PolygonPrimitiveTests` and primitive restart tests) verifying state decoding, restart handling, raster primitive classification, and precheck acceptance, and add primitive 21 to `inactiveVertexPointSizeTests`, `singleSampleMsaaTests`, and `conservativeRasterizationTests`. - Document technical debt in `docs/dev/debt/libSceAgcDriver.md`. ### Tested - Tested locally on Windows 11 with MinGW-w64 GCC 15.2. - Unit tests: `PolygonPrimitiveTests` verifies that `VGT_PRIMITIVE_TYPE = 21` decodes to `VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN`, classifies as triangle primitive in `RasterPrimitiveOf`, preserves primitive restart when configured, and passes draw prechecks. - Conventions: `python tools/check_conventions.py --base origin/main` passes with 0 findings and 0 errors. ### 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](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: PPSA01317 #6350 - [x] GPUs tested: NVIDIA GeForce RTX 3070, Driver 576.88, Windows 11 - [x] AI-assisted: yes
oneandonlydean commented 2026-10-17 15:07:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T15:07:00Z.


Thanks @pushkarreddyy. Mapping primitive type 21 to VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN looks sound, and since 21 threw before, no title that works today changes.

One blocker: the new test will fail. The single-sample MSAA loop in tests/Graphics.cpp now includes 21u and expects DrawRejection to be empty. But nonTriangleRejection in Graphics/src/State.cpp still accepts only primitive types 4, 5 and 6 (plus 7/17 for rectangles), so for 21 it returns the "primitives other than triangles" rejection and agc_driver_graphics fails. The fix is to add 21u to that check, next to the one you already added in requireConservativeTriangles.

A smaller point: the draw precheck (DrawPrecheck.cpp) still rejects indexed draws with primitive restart for type 21. It fails closed, so it isn't dangerous, but the PR's claim that restart works for polygons isn't true end to end yet. Either allow it there (with a test) or drop the claim.

After a new head we'll run full CI (the Linux and Windows build lanes were skipped on this PR's own run).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6235488062 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7175#issuecomment-6235488062). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-17T15:07:00Z. --- Thanks @pushkarreddyy. Mapping primitive type 21 to `VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN` looks sound, and since 21 threw before, no title that works today changes. One blocker: **the new test will fail.** The single-sample MSAA loop in `tests/Graphics.cpp` now includes `21u` and expects `DrawRejection` to be empty. But `nonTriangleRejection` in `Graphics/src/State.cpp` still accepts only primitive types 4, 5 and 6 (plus 7/17 for rectangles), so for 21 it returns the "primitives other than triangles" rejection and `agc_driver_graphics` fails. The fix is to add `21u` to that check, next to the one you already added in `requireConservativeTriangles`. A smaller point: the draw precheck (`DrawPrecheck.cpp`) still rejects indexed draws with primitive restart for type 21. It fails closed, so it isn't dangerous, but the PR's claim that restart works for polygons isn't true end to end yet. Either allow it there (with a test) or drop the claim. After a new head we'll run full CI (the Linux and Windows build lanes were skipped on this PR's own run).
pushkarreddyy commented 2026-10-17 15:15:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-17T15:15:04Z.


Hi @oneandonlydean,

Thank you for the quick and thorough review! Both points have been addressed in the amended commit:

  1. **
    onTriangleRejection**: Added *primitive != 21u to
    onTriangleRejection in Graphics/src/State.cpp (alongside 4, 5, 6), so single-sample MSAA and single-sample depth scans accept polygon draws and pass the 21u assertion in singleSampleMsaaTests.
  2. DrawPrecheck.cpp: Added ype == 21 to the strip set in DrawPrecheck.cpp (const bool strip = type == 3 || type == 5 || type == 6 || type == 21;), enabling primitive restart for indexed polygon draws end-to-end.
  3. Unit Tests: Added dedicated assertions in ests/Graphics.cpp verifying that an indexed draw with primitive restart and type 21 passes DrawRejection and decodes with primitiveRestart == true.

Local pre-flight checks (python tools/check_conventions.py --base origin/main) pass cleanly with 0 findings and 0 errors.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6235576706 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7175#issuecomment-6235576706). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-17T15:15:04Z. --- Hi @oneandonlydean, Thank you for the quick and thorough review! Both points have been addressed in the amended commit: 1. ** onTriangleRejection**: Added *primitive != 21u to onTriangleRejection in Graphics/src/State.cpp (alongside 4, 5, 6), so single-sample MSAA and single-sample depth scans accept polygon draws and pass the 21u assertion in singleSampleMsaaTests. 2. **DrawPrecheck.cpp**: Added ype == 21 to the strip set in DrawPrecheck.cpp (const bool strip = type == 3 || type == 5 || type == 6 || type == 21;), enabling primitive restart for indexed polygon draws end-to-end. 3. **Unit Tests**: Added dedicated assertions in ests/Graphics.cpp verifying that an indexed draw with primitive restart and type 21 passes DrawRejection and decodes with primitiveRestart == true. Local pre-flight checks (python tools/check_conventions.py --base origin/main) pass cleanly with 0 findings and 0 errors.
github-actions[bot] commented 2026-10-17 15:30:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-17T15:30:25Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 6529 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp L120, L1042-1043
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp L120
PR 6639 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp L196, L8747
PR 6801 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp L196, L8747
PR 7250 docs/dev/debt/libSceAgcDriver.md L48-49

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 1191 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
PR 1395 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 2434 docs/dev/debt/libSceAgcDriver.md
PR 4040 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 4448 docs/dev/debt/libSceAgcDriver.md
PR 4650 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 5058 docs/dev/debt/libSceAgcDriver.md
PR 5372 docs/dev/debt/libSceAgcDriver.md
PR 5441 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5499 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 5500 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5925 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 5999 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6054 docs/dev/debt/libSceAgcDriver.md
PR 6188 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6194 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6222 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6235 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6273 docs/dev/debt/libSceAgcDriver.md
PR 6297 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6300 docs/dev/debt/libSceAgcDriver.md
PR 6320 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6412 docs/dev/debt/libSceAgcDriver.md
PR 6472 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6481 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6498 docs/dev/debt/libSceAgcDriver.md
PR 6535 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6548 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6563 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6727 docs/dev/debt/libSceAgcDriver.md
PR 6783 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6786 docs/dev/debt/libSceAgcDriver.md
PR 6808 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6867 docs/dev/debt/libSceAgcDriver.md
PR 6868 docs/dev/debt/libSceAgcDriver.md
PR 6946 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6947 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6972 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6977 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6989 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6995 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7002 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7154 docs/dev/debt/libSceAgcDriver.md
PR 7332 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
docs/dev/debt/libSceAgcDriver.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6235796743 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7175#issuecomment-6235796743). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-17T15:30:25Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 6529](https://www.github.com/boykopovar/AnyPS5/pull/6529) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp` [L120](https://github.com/boykopovar/AnyPS5/blob/09127eada211876af9645337ca2c117a4b128fe4/core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp#L120), [L1042-1043](https://github.com/boykopovar/AnyPS5/blob/09127eada211876af9645337ca2c117a4b128fe4/core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp#L1042-L1043)<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` [L120](https://github.com/boykopovar/AnyPS5/blob/09127eada211876af9645337ca2c117a4b128fe4/core/libs/prx/libSceAgcDriver/tests/Graphics.cpp#L120) | | | | [PR 6639](https://www.github.com/boykopovar/AnyPS5/pull/6639) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` [L196](https://github.com/boykopovar/AnyPS5/blob/09127eada211876af9645337ca2c117a4b128fe4/core/libs/prx/libSceAgcDriver/tests/Graphics.cpp#L196), [L8747](https://github.com/boykopovar/AnyPS5/blob/09127eada211876af9645337ca2c117a4b128fe4/core/libs/prx/libSceAgcDriver/tests/Graphics.cpp#L8747) | | | | [PR 6801](https://www.github.com/boykopovar/AnyPS5/pull/6801) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` [L196](https://github.com/boykopovar/AnyPS5/blob/09127eada211876af9645337ca2c117a4b128fe4/core/libs/prx/libSceAgcDriver/tests/Graphics.cpp#L196), [L8747](https://github.com/boykopovar/AnyPS5/blob/09127eada211876af9645337ca2c117a4b128fe4/core/libs/prx/libSceAgcDriver/tests/Graphics.cpp#L8747) | | | | [PR 7250](https://www.github.com/boykopovar/AnyPS5/pull/7250) | `docs/dev/debt/libSceAgcDriver.md` [L48-49](https://github.com/boykopovar/AnyPS5/blob/09127eada211876af9645337ca2c117a4b128fe4/docs/dev/debt/libSceAgcDriver.md#L48-L49) | | | Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 1191](https://www.github.com/boykopovar/AnyPS5/pull/1191) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp` | | [PR 1395](https://www.github.com/boykopovar/AnyPS5/pull/1395) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 2434](https://www.github.com/boykopovar/AnyPS5/pull/2434) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 4040](https://www.github.com/boykopovar/AnyPS5/pull/4040) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 4448](https://www.github.com/boykopovar/AnyPS5/pull/4448) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 4650](https://www.github.com/boykopovar/AnyPS5/pull/4650) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 5058](https://www.github.com/boykopovar/AnyPS5/pull/5058) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5372](https://www.github.com/boykopovar/AnyPS5/pull/5372) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 5441](https://www.github.com/boykopovar/AnyPS5/pull/5441) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5499](https://www.github.com/boykopovar/AnyPS5/pull/5499) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 5500](https://www.github.com/boykopovar/AnyPS5/pull/5500) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 5925](https://www.github.com/boykopovar/AnyPS5/pull/5925) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 5999](https://www.github.com/boykopovar/AnyPS5/pull/5999) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6054](https://www.github.com/boykopovar/AnyPS5/pull/6054) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6188](https://www.github.com/boykopovar/AnyPS5/pull/6188) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cpp`<br>`core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6194](https://www.github.com/boykopovar/AnyPS5/pull/6194) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6222](https://www.github.com/boykopovar/AnyPS5/pull/6222) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6223](https://www.github.com/boykopovar/AnyPS5/pull/6223) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6235](https://www.github.com/boykopovar/AnyPS5/pull/6235) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6273](https://www.github.com/boykopovar/AnyPS5/pull/6273) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6297](https://www.github.com/boykopovar/AnyPS5/pull/6297) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6300](https://www.github.com/boykopovar/AnyPS5/pull/6300) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6320](https://www.github.com/boykopovar/AnyPS5/pull/6320) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6412](https://www.github.com/boykopovar/AnyPS5/pull/6412) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6472](https://www.github.com/boykopovar/AnyPS5/pull/6472) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6481](https://www.github.com/boykopovar/AnyPS5/pull/6481) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6498](https://www.github.com/boykopovar/AnyPS5/pull/6498) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6535](https://www.github.com/boykopovar/AnyPS5/pull/6535) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6548](https://www.github.com/boykopovar/AnyPS5/pull/6548) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6563](https://www.github.com/boykopovar/AnyPS5/pull/6563) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6727](https://www.github.com/boykopovar/AnyPS5/pull/6727) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6783](https://www.github.com/boykopovar/AnyPS5/pull/6783) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6786](https://www.github.com/boykopovar/AnyPS5/pull/6786) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6808](https://www.github.com/boykopovar/AnyPS5/pull/6808) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6867](https://www.github.com/boykopovar/AnyPS5/pull/6867) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6868](https://www.github.com/boykopovar/AnyPS5/pull/6868) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawPrecheck.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6972](https://www.github.com/boykopovar/AnyPS5/pull/6972) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6989](https://www.github.com/boykopovar/AnyPS5/pull/6989) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 6995](https://www.github.com/boykopovar/AnyPS5/pull/6995) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7002](https://www.github.com/boykopovar/AnyPS5/pull/7002) | `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` | | [PR 7154](https://www.github.com/boykopovar/AnyPS5/pull/7154) | `docs/dev/debt/libSceAgcDriver.md` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp`<br>`core/libs/prx/libSceAgcDriver/tests/Graphics.cpp`<br>`docs/dev/debt/libSceAgcDriver.md` |
oneandonlydean commented 2026-10-17 15:37:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T15:37:26Z.


Full CI on d8536140a (run 39044632528) fails agc_driver_graphics on both Linux and Windows. The failing line is AGC graphics: the precheck rejected a direct polygon draw, so the Driver::precheckDraw path still rejects type 21 in that test. Main's latest push build passes this test, so it comes from this change. Could you take a look?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6235884261 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7175#issuecomment-6235884261). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-17T15:37:26Z. --- Full CI on d8536140a (run 39044632528) fails `agc_driver_graphics` on both Linux and Windows. The failing line is `AGC graphics: the precheck rejected a direct polygon draw`, so the `Driver::precheckDraw` path still rejects type 21 in that test. Main's latest push build passes this test, so it comes from this change. Could you take a look?
MarcZX10 commented 2026-10-17 15:39:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T15:39:48Z.


I checked run 39044632528 because its event metadata says workflow_dispatch from main. The Windows job log confirms PR_NUMBER=7175, PR_HEAD=d8536140a85566cd2383433f5a2a63ed5a8084a7, fetched refs/pull/7175/head, and merged it before building. Both Linux and Windows failed agc_driver_graphics with the direct-polygon assertion reported above. The later Build run on this same head skipped both application lanes, so it does not provide a passing rerun of that failure.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6235914982 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7175#issuecomment-6235914982). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T15:39:48Z. --- I checked run 39044632528 because its event metadata says `workflow_dispatch` from `main`. The Windows job log confirms `PR_NUMBER=7175`, `PR_HEAD=d8536140a85566cd2383433f5a2a63ed5a8084a7`, fetched `refs/pull/7175/head`, and merged it before building. Both Linux and Windows failed `agc_driver_graphics` with the direct-polygon assertion reported above. The later Build run on this same head skipped both application lanes, so it does not provide a passing rerun of that failure.
pushkarreddyy commented 2026-10-17 15:46:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-17T15:46:46Z.


Thanks @oneandonlydean for the CI run and finding!

The failure in PolygonPrimitiveTests() was caused by makeState() having an active pixel program (queue.shader[0x008] = 0x100), which causes AgcDriver::Graphics::DrawRejection to validate that SPI_PS_INPUT_ENA (DWORD 0x1b3) and SPI_PS_INPUT_ADDR (DWORD 0x1b4) are present in context before clearing a draw. Because PolygonPrimitiveTests() did not set 0x1b3 and 0x1b4, DrawRejection(queue, false) returned "AGC graphics: missing register at DWORD 0x1b3", triggering the Require check.

I have updated PolygonPrimitiveTests() in core/libs/prx/libSceAgcDriver/tests/Graphics.cpp to set queue.context[0x1b3] = 2 and queue.context[0x1b4] = 2 (matching stateTests() and ConservativeRasterizationTests()), verified conventions pass with 0 errors, and force-pushed commit 555b7e824.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6236028230 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7175#issuecomment-6236028230). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-17T15:46:46Z. --- Thanks @oneandonlydean for the CI run and finding! The failure in `PolygonPrimitiveTests()` was caused by `makeState()` having an active pixel program (`queue.shader[0x008] = 0x100`), which causes `AgcDriver::Graphics::DrawRejection` to validate that `SPI_PS_INPUT_ENA` (DWORD `0x1b3`) and `SPI_PS_INPUT_ADDR` (DWORD `0x1b4`) are present in context before clearing a draw. Because `PolygonPrimitiveTests()` did not set `0x1b3` and `0x1b4`, `DrawRejection(queue, false)` returned `"AGC graphics: missing register at DWORD 0x1b3"`, triggering the `Require` check. I have updated `PolygonPrimitiveTests()` in `core/libs/prx/libSceAgcDriver/tests/Graphics.cpp` to set `queue.context[0x1b3] = 2` and `queue.context[0x1b4] = 2` (matching `stateTests()` and `ConservativeRasterizationTests()`), verified conventions pass with 0 errors, and force-pushed commit `555b7e824`.
MarcZX10 commented 2026-10-17 17:55:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T17:55:21Z.


I checked the updated head 555b7e824. The previous full CI failure was on d8536140a, and the updated head currently has only eligibility/conventions/report checks; Linux and Windows build/test jobs are skipped. The new test setup addresses the reported missing-register cause, but the direct-polygon precheck path still needs an actual rerun on this head to confirm the original failure is cleared.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6238102406 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7175#issuecomment-6238102406). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T17:55:21Z. --- I checked the updated head `555b7e824`. The previous full CI failure was on `d8536140a`, and the updated head currently has only eligibility/conventions/report checks; Linux and Windows build/test jobs are skipped. The new test setup addresses the reported missing-register cause, but the direct-polygon precheck path still needs an actual rerun on this head to confirm the original failure is cleared.
gjonn commented 2026-10-17 19:46:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by gjonn on 2026-10-17T19:46:01Z.


Another data point from PPSA01317 on current main, Windows 11, RTX 5090 Laptop: this PR fixes its abort AGC graphics: unsupported primitive type 21, which hits right after the title's first frames. With this PR cherry-picked (it applied cleanly), the title gets past that draw and keeps booting.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6239869412 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7175#issuecomment-6239869412). Originally posted by [gjonn](https://github.com/gjonn) on 2026-10-17T19:46:01Z. --- Another data point from PPSA01317 on current main, Windows 11, RTX 5090 Laptop: this PR fixes its abort `AGC graphics: unsupported primitive type 21`, which hits right after the title's first frames. With this PR cherry-picked (it applied cleanly), the title gets past that draw and keeps booting. AI-assisted: yes
pushkarreddyy commented 2026-10-18 10:29:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-18T10:29:33Z.


@oneandonlydean Cleanly rebased onto latest origin/main (f07df0796).

The register setup in PolygonPrimitiveTests() now includes the SPI input registers (0x1b3 / 0x1b4) required by DrawRejection, and @gjonn confirmed on hardware (RTX 5090) that this PR resolves the runtime abort on Gran Turismo 7 (PPSA01317). Ready for review when convenient!

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6248766752 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7175#issuecomment-6248766752). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-18T10:29:33Z. --- @oneandonlydean Cleanly rebased onto latest `origin/main` (`f07df0796`). The register setup in `PolygonPrimitiveTests()` now includes the SPI input registers (`0x1b3` / `0x1b4`) required by `DrawRejection`, and @gjonn confirmed on hardware (RTX 5090) that this PR resolves the runtime abort on *Gran Turismo 7* (`PPSA01317`). Ready for review when convenient!
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!7175
No description provided.