fix(agc): accept unused geometry output register #2066

Merged
MarcZX10 merged 4 commits from upstream-pr/2066 into main 2026-10-10 04:43:36 +00:00
MarcZX10 commented 2026-10-09 06:31:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T06:31:43Z.


What

Treat VGT_GS_OUT_PRIM_TYPE as optional when the geometry stage is disabled and the primitive type supplies the value. Require the special register when the enabled geometry path actually consumes it. Do not add an empty special-register slot at offset zero to the decoded context state. This follows the next failure reported in #2026 and is a separate stage-state fix from #2063.

Tested

  • Rebased linearly onto upstream main 3692f56f09930a08939d5f3896beffb690a282e9; current head 89661f8f.
  • Linux x86_64, GCC 12.2, Release: built libSceAgcDriver, agc_shader_helpers_tests, agc_driver_tests, and agc_driver_prepared_shaders_tests.
  • Focused CTest: agc_shader_helpers, agc_driver, agc_driver_prepared_shaders, agc_driver_prepared_shaders_indirect, and agc_driver_prepared_shaders_uncached passed (5/5, 4.35 s total).
  • python3 tools/check_conventions.py --base upstream/main and git diff --check upstream/main...HEAD pass.
  • The regression cases are grouped in a dedicated test helper so they do not share the insertion hunk with PR #2293. #2066 handles optional geometry output register state; #2293 handles patch/hull stage mismatches. They are independent fixes; neither depends on the other.
  • Independent Windows report on the immediately previous PR head bbe1daa2 (before rebase): Windows 11 Pro 25H2, RTX 5060 Ti (NVIDIA 617.42), MinGW-w64 GCC 15.2.0, Release, full build plus libs; cherry-picked onto main d70b8998. agc_shader_helpers passed and full CTest passed (510/510) (report). This is prior-head Windows evidence; the rebased head still needs the official current-base matrix.
  • No game runtime or hardware validation was performed. Eligibility, Conventions, report, and all three relinker jobs pass on this head. The automated PR workflow skipped the full Linux and Windows Build jobs; an authorized collaborator must start Build for those under #2113.

Checklist

  • Based on current main; no other open pull request implements the same functions
  • One topic per PR; follow-ups go in a new pull request
  • No code comments except technical debt comments
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation files or images added to the repository
  • No new third-party code
  • Generic behavior, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4796908603 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2066). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T06:31:43Z. --- ### What Treat `VGT_GS_OUT_PRIM_TYPE` as optional when the geometry stage is disabled and the primitive type supplies the value. Require the special register when the enabled geometry path actually consumes it. Do not add an empty special-register slot at offset zero to the decoded context state. This follows the next failure reported in #2026 and is a separate stage-state fix from #2063. ### Tested - Rebased linearly onto upstream `main` `3692f56f09930a08939d5f3896beffb690a282e9`; current head `89661f8f`. - Linux x86_64, GCC 12.2, Release: built `libSceAgcDriver`, `agc_shader_helpers_tests`, `agc_driver_tests`, and `agc_driver_prepared_shaders_tests`. - Focused CTest: `agc_shader_helpers`, `agc_driver`, `agc_driver_prepared_shaders`, `agc_driver_prepared_shaders_indirect`, and `agc_driver_prepared_shaders_uncached` passed (5/5, 4.35 s total). - `python3 tools/check_conventions.py --base upstream/main` and `git diff --check upstream/main...HEAD` pass. - The regression cases are grouped in a dedicated test helper so they do not share the insertion hunk with PR #2293. #2066 handles optional geometry output register state; #2293 handles patch/hull stage mismatches. They are independent fixes; neither depends on the other. - Independent Windows report on the immediately previous PR head `bbe1daa2` (before rebase): Windows 11 Pro 25H2, RTX 5060 Ti (NVIDIA 617.42), MinGW-w64 GCC 15.2.0, Release, full build plus `libs`; cherry-picked onto `main` `d70b8998`. `agc_shader_helpers` passed and full CTest passed (510/510) ([report](https://github.com/boykopovar/AnyPS5/pull/2066#issuecomment-6081917496)). This is prior-head Windows evidence; the rebased head still needs the official current-base matrix. - No game runtime or hardware validation was performed. Eligibility, Conventions, report, and all three relinker jobs pass on this head. The automated PR workflow skipped the full Linux and Windows Build jobs; an authorized collaborator must start Build for those under #2113. ### Checklist - [x] Based on current `main`; no other open pull request implements the same functions - [x] One topic per PR; follow-ups go in a new pull request - [x] No code comments except technical debt comments - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in TechnicalDebt - [x] No notes, investigation files or images added to the repository - [x] No new third-party code - [x] Generic behavior, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
MarcZX10 commented 2026-10-09 08:13:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T08:13:53Z.


Rebased the change onto current upstream main 25f10087, added tests for the disabled-geometry default and the missing hull/geometry-register error cases, and pushed head fdeb1392. The focused Linux agc_shader_helpers CTest passes (1/1), the affected driver library and test executable build, and conventions/diff checks pass. Fork Build 37903659493 is running on this head.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6077117410 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2066#issuecomment-6077117410). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T08:13:53Z. --- Rebased the change onto current upstream `main` `25f10087`, added tests for the disabled-geometry default and the missing hull/geometry-register error cases, and pushed head `fdeb1392`. The focused Linux `agc_shader_helpers` CTest passes (1/1), the affected driver library and test executable build, and conventions/diff checks pass. Fork Build [37903659493](https://github.com/MarcZX100/AnyPS5/actions/runs/37903659493) is running on this head.
MarcZX10 commented 2026-10-09 08:25:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T08:25:06Z.


Rebased the reviewed diff onto current upstream main 6cc0503d and pushed head a16e44fe. The updated Linux focused build and agc_shader_helpers CTest pass (1/1); conventions and diff checks pass. Fork Build 37904790326 is running on the new head. The PR description records the prior full-build failure from the missing SPIR-V test include path, covered by #2093.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6077277461 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2066#issuecomment-6077277461). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T08:25:06Z. --- Rebased the reviewed diff onto current upstream `main` `6cc0503d` and pushed head `a16e44fe`. The updated Linux focused build and `agc_shader_helpers` CTest pass (1/1); conventions and diff checks pass. Fork Build [37904790326](https://github.com/MarcZX100/AnyPS5/actions/runs/37904790326) is running on the new head. The PR description records the prior full-build failure from the missing SPIR-V test include path, covered by #2093.
MarcZX10 commented 2026-10-09 08:38:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T08:38:52Z.


Latest fork Build completed with the same baseline failure on Linux and Windows: agc_shader_fusion_tests cannot include spirv/unified1/spirv.hpp from VulkanTestDevice.hpp. The relinker jobs passed. This matches #2093; I recorded the exact result in the PR description and kept this PR's scope separate.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6077474944 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2066#issuecomment-6077474944). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T08:38:52Z. --- Latest fork Build completed with the same baseline failure on Linux and Windows: `agc_shader_fusion_tests` cannot include `spirv/unified1/spirv.hpp` from `VulkanTestDevice.hpp`. The relinker jobs passed. This matches #2093; I recorded the exact result in the PR description and kept this PR's scope separate.
MarcZX10 commented 2026-10-09 09:25:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T09:25:25Z.


Rebased to current upstream main d9484c71; head 47a1a186. The three-file diff is unchanged, the focused agc_shader_helpers test passed on the preceding head a16e44fe, and local conventions/diff checks pass. The earlier full Build failure was the missing SPIRV-Headers include, fixed by #2099 now on this base. Under #2113, could an upstream collaborator start the full Build for PR #2066 on this head?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6078168878 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2066#issuecomment-6078168878). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T09:25:25Z. --- Rebased to current upstream `main` `d9484c71`; head `47a1a186`. The three-file diff is unchanged, the focused `agc_shader_helpers` test passed on the preceding head `a16e44fe`, and local conventions/diff checks pass. The earlier full Build failure was the missing SPIRV-Headers include, fixed by #2099 now on this base. Under #2113, could an upstream collaborator start the full Build for PR #2066 on this head?
MarcZX10 commented 2026-10-09 11:34:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T11:34:13Z.


Rebased PR #2066 linearly onto current main (d70b8998). On head bbe1daa2, libSceAgcDriver and agc_shader_helpers_tests build, and agc_shader_helpers passes (1/1); conventions and diff checks pass, and GitHub reports it mergeable. No hardware runtime was available. Under #2113, could a collaborator with write access run Actions → Build for this PR so the full Linux, Windows and relinker checks are recorded on the rebased head?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6080040089 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2066#issuecomment-6080040089). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T11:34:13Z. --- Rebased PR #2066 linearly onto current `main` (`d70b8998`). On head `bbe1daa2`, `libSceAgcDriver` and `agc_shader_helpers_tests` build, and `agc_shader_helpers` passes (1/1); conventions and diff checks pass, and GitHub reports it mergeable. No hardware runtime was available. Under #2113, could a collaborator with write access run Actions → Build for this PR so the full Linux, Windows and relinker checks are recorded on the rebased head?
rmz-24 commented 2026-10-09 13:31:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by rmz-24 on 2026-10-09T13:31:01Z.


Windows run: Windows 11 Pro 25H2 (10.0.26200.9457), RTX 5060 Ti (NVIDIA 617.42), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON, full build plus libs. bbe1daa2 cherry-picked onto current main d70b8998 (applies cleanly).

  • agc_shader_helpers passes.
  • Full ctest: 510/510.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6081917496 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2066#issuecomment-6081917496). Originally posted by [rmz-24](https://github.com/rmz-24) on 2026-10-09T13:31:01Z. --- Windows run: Windows 11 Pro 25H2 (10.0.26200.9457), RTX 5060 Ti (NVIDIA 617.42), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, `-DANYPS5_ENABLE_SPIRV_TOOLS=ON`, full build plus `libs`. bbe1daa2 cherry-picked onto current `main` d70b8998 (applies cleanly). - `agc_shader_helpers` passes. - Full ctest: 510/510. AI-assisted: yes
MarcZX10 commented 2026-10-09 13:32:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T13:32:27Z.


Thanks for the Windows report: it covers the exact PR head bbe1daa2 on current main, and the full Windows CTest passes (510/510), including agc_shader_helpers. That supplies the Windows evidence. The upstream PR still reports only Conventions; under CONTRIBUTING, could an authorized collaborator run the official Build for this head to record Linux and the relinker matrix?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6081947864 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2066#issuecomment-6081947864). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T13:32:27Z. --- Thanks for the Windows report: it covers the exact PR head `bbe1daa2` on current `main`, and the full Windows CTest passes (510/510), including `agc_shader_helpers`. That supplies the Windows evidence. The upstream PR still reports only Conventions; under CONTRIBUTING, could an authorized collaborator run the official Build for this head to record Linux and the relinker matrix?
MarcZX10 commented 2026-10-09 20:14:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T20:14:44Z.


Rebased PR #2066 onto current upstream main 8b393b6e; pushed head 7b90e37d. The complete PR diff remains three files (26 insertions, 7 deletions), with the same three logical commits.

On the rebased head, Linux x86_64/GCC 12.2 Release builds passed for libSceAgcDriver, agc_shader_helpers_tests, agc_driver_tests, and agc_driver_prepared_shaders_tests. Six focused CTests passed: agc_shader_helpers, agc_driver, and all four prepared-shader variants. The conventions checker and git diff --check also pass.

The Windows full-build/510-test report in this PR is from the immediately previous head bbe1daa2 cherry-picked onto d70b8998, before this rebase. It remains useful evidence for the same patch, but does not replace testing the current base. The upstream status currently shows Conventions only; under #2113, could an authorized collaborator run Actions → Build for this head to record the full Linux, Windows, and relinker matrix? No game runtime or hardware test was performed.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6088510406 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2066#issuecomment-6088510406). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T20:14:44Z. --- Rebased PR #2066 onto current upstream `main` `8b393b6e`; pushed head `7b90e37d`. The complete PR diff remains three files (26 insertions, 7 deletions), with the same three logical commits. On the rebased head, Linux x86_64/GCC 12.2 Release builds passed for `libSceAgcDriver`, `agc_shader_helpers_tests`, `agc_driver_tests`, and `agc_driver_prepared_shaders_tests`. Six focused CTests passed: `agc_shader_helpers`, `agc_driver`, and all four prepared-shader variants. The conventions checker and `git diff --check` also pass. The Windows full-build/510-test report in this PR is from the immediately previous head `bbe1daa2` cherry-picked onto `d70b8998`, before this rebase. It remains useful evidence for the same patch, but does not replace testing the current base. The upstream status currently shows Conventions only; under #2113, could an authorized collaborator run Actions → Build for this head to record the full Linux, Windows, and relinker matrix? No game runtime or hardware test was performed.
MarcZX10 commented 2026-10-09 21:11:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T21:11:51Z.


Updated on current upstream main bbc44381 (head e3c463f7). The rebased Linux Release build passed for the AGC driver and its helper/driver/prepared-shader tests; all six focused CTests passed, and conventions/diff checks pass. I moved the #2066 regression cases into a dedicated helper to avoid sharing the test insertion hunk with #2293. The PRs address separate behavior and have no dependency.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6089336226 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2066#issuecomment-6089336226). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T21:11:51Z. --- Updated on current upstream main `bbc44381` (head `e3c463f7`). The rebased Linux Release build passed for the AGC driver and its helper/driver/prepared-shader tests; all six focused CTests passed, and conventions/diff checks pass. I moved the #2066 regression cases into a dedicated helper to avoid sharing the test insertion hunk with #2293. The PRs address separate behavior and have no dependency.
MarcZX10 commented 2026-10-09 21:17:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T21:17:19Z.


Rebased onto current main 73ba24aa and updated the Tested section. The change remains the same three-file diff; #1823 adds Opus files and does not overlap it. On this exact head 802cefe1, the four AGC targets build, all six focused CTests pass, and conventions plus diff checks pass. No game or hardware runtime was tested.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6089410415 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2066#issuecomment-6089410415). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T21:17:19Z. --- Rebased onto current `main` `73ba24aa` and updated the Tested section. The change remains the same three-file diff; #1823 adds Opus files and does not overlap it. On this exact head `802cefe1`, the four AGC targets build, all six focused CTests pass, and conventions plus diff checks pass. No game or hardware runtime was tested.
MarcZX10 commented 2026-10-09 21:19:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T21:19:14Z.


Kept the branch current with main 87b998a9 (the mlock change does not touch AGC) and reran the focused validation on head 67da925f: all four AGC targets build, six CTests pass, and conventions/diff checks pass. GitHub has repeatedly cancelled the previous queued Conventions job when the head advanced; I will report the new run separately once it starts/completes. No full Build or hardware runtime was claimed.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6089436003 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2066#issuecomment-6089436003). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T21:19:14Z. --- Kept the branch current with `main` `87b998a9` (the mlock change does not touch AGC) and reran the focused validation on head `67da925f`: all four AGC targets build, six CTests pass, and conventions/diff checks pass. GitHub has repeatedly cancelled the previous queued Conventions job when the head advanced; I will report the new run separately once it starts/completes. No full Build or hardware runtime was claimed.
MarcZX10 commented 2026-10-09 21:36:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T21:36:38Z.


Rebased the existing PR onto upstream main 00159cff and pushed current head 266ac575. The Linux Release build passed for the AGC driver and three related targets. agc_shader_helpers and agc_driver passed; the prepared-shader executable passed the default, uncached, and indirect modes, and the injected-failure mode failed as expected. Conventions and git diff --check pass. The earlier Windows 510/510 run predates this rebase. Could an authorized collaborator run the required upstream Build and relinker matrix on this exact head under #2113?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6089664092 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2066#issuecomment-6089664092). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-09T21:36:38Z. --- Rebased the existing PR onto upstream `main` `00159cff` and pushed current head `266ac575`. The Linux Release build passed for the AGC driver and three related targets. `agc_shader_helpers` and `agc_driver` passed; the prepared-shader executable passed the default, uncached, and indirect modes, and the injected-failure mode failed as expected. Conventions and `git diff --check` pass. The earlier Windows 510/510 run predates this rebase. Could an authorized collaborator run the required upstream Build and relinker matrix on this exact head under #2113?
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!2066
No description provided.