Skip to content

fix(agc): initialize point size and limits from SDK defaults - #6821

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
JJenkx:fix/point-context-sdk-defaults
Oct 19, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
JJenkx:fix/point-context-sdk-defaults

Conversation

@JJenkx

@JJenkx JJenkx commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What

Cocoon (PPSA08766 v01.004.000), with #6801, #6653, #6743 and #6815, stops at missing register in context bank at DWORD 0x280: its first geometry point draw reads PA_SU_POINT_SIZE before the observed startup writes either point register.

Initialize PA_SU_POINT_SIZE to 0x00080008 and PA_SU_POINT_MINMAX to 0xffff0000 for new queues and CLEAR_STATE. These values match all eight public context tables in libSceAgc/Command/include/RegisterDefaultsData.hpp, aliased across fourteen SDK versions. Applying those SDK defaults to initial driver context is inferred and documented as debt; these are not measured GPU power-on reset values. Explicit writes and saved/restored contexts retain their values. This is one independent commit on main 82ddae75b; no shader decoder fallback or title-specific behavior is added.

Tested

Validation on Linux 7.2.9-arch1-1, GCC 16.2.1, Ryzen 9 7950X:

  • Full runtime libs plus agc_driver_tests and agc_driver_pm4_tests build; both tests pass without skips. PM4 coverage exercises constructor defaults, real SET_CONTEXT_REG writes, CLEAR_STATE and push-clear/pop restoration.
  • A separate inline QueueState API control, compiled against main and candidate headers, fails on main with initial point registers missing and passes with this change. This is not a full-driver executable negative control.
  • Native integration eb2333c0ea559b63b2056d5c5cab9bcf57d6d7b2 includes the four title prerequisites above. Full runtime build and five focused tests pass on RADV (driver, PM4, mesh, vertex point size, MSAA plane addressing; 7.13 s, zero skips).
  • That native run passes the missing-register stop, then ends after 16.04 s on VGT_SHADER_STAGES_EN=0x2135: combined tessellation and geometry is unsupported by the reference path. No matching game window was captured; gameplay and performance gains remain unverified. The launcher exits 134 and restores the temporary udmabuf limit to 64 MiB. feat(agc): draw tessellation followed by an NGG geometry stage #6612 addresses the next path and is being evaluated separately.
  • The prior diagnostic integration traced context writes and observed no writes to 0x280/0x281 before the missing-register refusal.

Local full-project CTest and console execution remain unvalidated. Independent Windows results are recorded below. Native evidence uses the integration above, not this standalone commit alone. No title assets, raw shader requests or raw title logs are attached.

Sanitized standalone and native validation. The later #6612 integration still refuses Cocoon's specific routing; see the bring-up follow-up.

Neithennn independently reports a full build and 1398/1398 CTest passes on Windows 11 Pro 26200, NVIDIA GeForce RTX 4080 driver 617.42, Ryzen 7 5800X, WinLibs GCC 15.2.0 r7 / Ninja / Release, bundled dependencies, BUILD_TESTING=ON, ANYPS5_NO_SHADER_CACHE=1. This exact PR head 9937067c9 was merged onto main f51724078; 21 focused PM4/point-position/graphics checks also pass with ANYPS5_REQUIRE_VULKAN=1. Unchanged main passes 1398/1398 on the same machine. No title run. Contributor-reported Windows/NVIDIA validation; not independently reproduced locally.

Independent follow-up from parl0v: Cocoon PPSA08766 01.004.000 on Windows 10 19045, RTX 3060 12 GB / NVIDIA 617.42, main 118266aec plus #6815 72959f7c0, #6801 8cf9d55a5 and #6821 c8d7e37f4, merged locally. The missing context-register DWORD 0x280 refusal is gone. Startup now stops after about 88 seconds at VGT_SHADER_STAGES_EN=0x2135: combined tessellation and geometry is unsupported by the reference path, matching the next refusal in the Linux integration. The window remains black with two presents; this does not establish gameplay or a visual/performance improvement. Contributor-reported Windows native validation; not independently reproduced locally.

Checklist

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two defaults match the public SDK context tables, and the test covers construction, explicit register writes, CLEAR_STATE reset, and context push/pop restoration. The initial QueueState behavior is documented as inferred rather than measured hardware reset state. The reported PM4 tests pass on Linux; the PR also clearly limits its title claim to passing the missing-register stop, with later behavior still unsupported.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

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 6588 docs/dev/debt/libSceAgcDriver.md L10
PR 6887 docs/dev/debt/libSceAgcDriver.md L10
PR 6965 docs/dev/debt/libSceAgcDriver.md L10
PR 6973 docs/dev/debt/libSceAgcDriver.md L10
PR 6987 docs/dev/debt/libSceAgcDriver.md L10
PR 6989 docs/dev/debt/libSceAgcDriver.md L10
PR 6995 docs/dev/debt/libSceAgcDriver.md L10
PR 7002 docs/dev/debt/libSceAgcDriver.md L10

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 1395 core/libs/prx/libSceAgcDriver/Execution/include/QueueState.hpp
PR 4448 docs/dev/debt/libSceAgcDriver.md
PR 4449 docs/dev/debt/libSceAgcDriver.md
PR 5058 docs/dev/debt/libSceAgcDriver.md
PR 5499 docs/dev/debt/libSceAgcDriver.md
PR 5925 docs/dev/debt/libSceAgcDriver.md
PR 6146 docs/dev/debt/libSceAgcDriver.md
PR 6185 core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
PR 6186 core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
PR 6194 docs/dev/debt/libSceAgcDriver.md
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6252 docs/dev/debt/libSceAgcDriver.md
PR 6300 docs/dev/debt/libSceAgcDriver.md
PR 6548 docs/dev/debt/libSceAgcDriver.md
PR 6549 core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6636 docs/dev/debt/libSceAgcDriver.md
PR 6683 docs/dev/debt/libSceAgcDriver.md
PR 6727 docs/dev/debt/libSceAgcDriver.md
PR 6741 docs/dev/debt/libSceAgcDriver.md
PR 6808 docs/dev/debt/libSceAgcDriver.md
PR 6867 docs/dev/debt/libSceAgcDriver.md
PR 6868 docs/dev/debt/libSceAgcDriver.md
PR 6941 docs/dev/debt/libSceAgcDriver.md
PR 6946 docs/dev/debt/libSceAgcDriver.md
PR 6947 docs/dev/debt/libSceAgcDriver.md
PR 6958 docs/dev/debt/libSceAgcDriver.md
PR 6966 docs/dev/debt/libSceAgcDriver.md
PR 6977 docs/dev/debt/libSceAgcDriver.md
PR 7008 core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7254 docs/dev/debt/libSceAgcDriver.md
PR 7256 docs/dev/debt/libSceAgcDriver.md
PR 7258 docs/dev/debt/libSceAgcDriver.md
PR 7332 docs/dev/debt/libSceAgcDriver.md
PR 7390 docs/dev/debt/libSceAgcDriver.md
PR 7426 docs/dev/debt/libSceAgcDriver.md
PR 7432 docs/dev/debt/libSceAgcDriver.md
PR 7446 docs/dev/debt/libSceAgcDriver.md
PR 7449 docs/dev/debt/libSceAgcDriver.md
PR 7505 docs/dev/debt/libSceAgcDriver.md
PR 7604 docs/dev/debt/libSceAgcDriver.md
PR 7642 docs/dev/debt/libSceAgcDriver.md
PR 7659 core/libs/prx/libSceAgcDriver/Execution/include/QueueState.hpp
core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7683 core/libs/prx/libSceAgcDriver/tests/Pm4.cpp
docs/dev/debt/libSceAgcDriver.md
PR 7800 docs/dev/debt/libSceAgcDriver.md
PR 7803 docs/dev/debt/libSceAgcDriver.md

@github-actions github-actions Bot added docs agc libSceAgc* labels Oct 16, 2026
@Neithennn

Copy link
Copy Markdown
Contributor

Windows NVIDIA run, since the description lists RADV and Linux only.

Windows 11 Pro 26200, NVIDIA GeForce RTX 4080 (driver 617.42), AMD Ryzen 7 5800X, WinLibs GCC 15.2.0 r7, Ninja, Release, bundled dependencies, BUILD_TESTING=ON, ANYPS5_NO_SHADER_CACHE=1. Head 9937067c9 merged onto main f51724078; full build succeeds.

  • agc_driver_pm4 and the other agc_driver_pm4_* tests (ring, failure, replay, stall watchdog), agc_driver_inactive_vertex_point_size, agc_driver_pixel_fixed_point_position, agc_driver_graphics: 21/21 pass, with ANYPS5_REQUIRE_VULKAN=1.
  • Full ctest -j 8: 1398/1398. Unchanged main on the same machine: 1398/1398.

No title run.

AI-assisted: yes (runs done with Claude Code).

@MarcZX10

Copy link
Copy Markdown
Contributor

Thanks for the independent Windows NVIDIA run and the full 1,398-test result. That broadens the validation beyond the reported RADV/Linux environment; no title run is claimed, and your note makes that scope clear.

AI-assisted: yes

@JJenkx
JJenkx force-pushed the fix/point-context-sdk-defaults branch from 9937067 to c8d7e37 Compare October 19, 2026 06:52
@JJenkx

JJenkx commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto main 7f596df48dc743ee26fa83ab7f43c859cfdd339b; new head is c8d7e37f4c092bfccdf3c80d865d1dfd4141d7fd. Resolved the additive debt-file conflict by retaining both entries. Source changes are unchanged by the rebase.

Validation on the refreshed head: full libs build, convention checks, and the agc_driver and agc_driver_pm4 tests passed with no skips. This refresh was checked on Linux; the earlier Windows results remain specific to their previously reported revision.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 19, 2026
@adriadam10 adriadam10 self-assigned this Oct 19, 2026
@adriadam10
adriadam10 merged commit 87aee04 into boykopovar:main Oct 19, 2026
12 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked the two values against the public SDK context tables in RegisterDefaultsData.hpp (all match), that nothing else in the driver writes 0x280/0x281, and that the new Pm4 test fails without the change (initial-state check). Debt entry states the values are inferred. Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* docs unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants