Skip to content

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

Merged
oneandonlydean merged 4 commits into
boykopovar:mainfrom
MarcZX10:codex/fix-agc-optional-prim-register
Oct 10, 2026
Merged

oneandonlydean merged 4 commits into
boykopovar:mainfrom
MarcZX10:codex/fix-agc-optional-prim-register

Conversation

@MarcZX10

@MarcZX10 MarcZX10 commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

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 fix(agc): skip prim state preparation for a patch/hull mismatch #2293. fix(agc): accept unused geometry output register #2066 handles optional geometry output register state; fix(agc): skip prim state preparation for a patch/hull mismatch #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 ci(build): require manual full builds and auto-test relinker for contr #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

@MarcZX10

MarcZX10 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

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.

@MarcZX10
MarcZX10 force-pushed the codex/fix-agc-optional-prim-register branch from fdeb139 to a16e44f Compare October 9, 2026 08:24
@MarcZX10

MarcZX10 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

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.

@MarcZX10

MarcZX10 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

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
MarcZX10 force-pushed the codex/fix-agc-optional-prim-register branch from a16e44f to 47a1a18 Compare October 9, 2026 09:25
@MarcZX10

MarcZX10 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

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
MarcZX10 force-pushed the codex/fix-agc-optional-prim-register branch 7 times, most recently from db4b27b to bbe1daa Compare October 9, 2026 11:34
@MarcZX10

MarcZX10 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

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

rmz-24 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

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. bbe1daa cherry-picked onto current main d70b899 (applies cleanly).

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

AI-assisted: yes

@MarcZX10

MarcZX10 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

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
MarcZX10 force-pushed the codex/fix-agc-optional-prim-register branch from bbe1daa to 7b90e37 Compare October 9, 2026 20:14
@MarcZX10

MarcZX10 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

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
MarcZX10 force-pushed the codex/fix-agc-optional-prim-register branch 2 times, most recently from 8461e59 to e3c463f Compare October 9, 2026 21:11
@MarcZX10

MarcZX10 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

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
MarcZX10 force-pushed the codex/fix-agc-optional-prim-register branch from e3c463f to 802cefe Compare October 9, 2026 21:17
@MarcZX10

MarcZX10 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

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
MarcZX10 force-pushed the codex/fix-agc-optional-prim-register branch from 802cefe to 67da925 Compare October 9, 2026 21:19
@MarcZX10

MarcZX10 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

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
MarcZX10 force-pushed the codex/fix-agc-optional-prim-register branch from 67da925 to 266ac57 Compare October 9, 2026 21:36
@MarcZX10

MarcZX10 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

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?

@MarcZX10
MarcZX10 force-pushed the codex/fix-agc-optional-prim-register branch from 266ac57 to 89661f8 Compare October 9, 2026 22:43
oneandonlydean added a commit to oneandonlydean/AnyPS5 that referenced this pull request Oct 10, 2026
oneandonlydean added a commit to oneandonlydean/AnyPS5 that referenced this pull request Oct 10, 2026
@oneandonlydean
oneandonlydean merged commit 7cca958 into boykopovar:main Oct 10, 2026
9 of 10 checks passed
SleglJan pushed a commit to SleglJan/AnyPS5 that referenced this pull request Oct 10, 2026
…nal-prim-register

fix(agc): accept unused geometry output register
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.

3 participants