feat(libSceAgcDriver): keep the HS offchip parameters as the console reports them #15868
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15868"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by zaryabzip on 2026-11-04T20:33:52Z.
What
sceAgcDriverGetHsOffchipParamstops throwing, andsceAgcDriverSetHsOffchipParamstops ignoring its arguments. The two now share one stored pair, which behaves as a console title measured it in PS5_Vulkan's hardware findings, in the same paragraph as the tessellation factor ring. In a fresh title,Getread (0, 0).Set(granularity, buffering)kept the granularity in 2 bits and the buffering in 9, so a buffering of 1023 read back as 511.mainalready follows that paragraph for the ring:sceAgcDriverGetTFRingreports the console's default (debt entry "Tessellation factor ring"). The parameters are the next sentence.mainGetbefore anySetNotImplementedSet(g, b),g <= 3,b <= 511Getreturns (g, b)Set(g, 1023)Getreturns (g, 511)Setwithg > 3, orbabove 511 other than 1023Getwith a null outputstd::invalid_argument, assceAgcDriverGetTFRingdoesNotImplementedSignature.
Setwas declared as threeuint64_ts and ignored them, a form with no source. It now takes(uint16_t granularity, uint16_t buffering):Get's two values;Get's parameters are renamed to match. Nothing in the tree calls either function.Effect. Nothing reads the pair. Tessellated draws run as Vulkan tessellation stages, as the ring's entry already says, so this only answers titles that query or set it. The homebrew PPSA99011 imports
Get, per its existing debt entry. That entry moves next to the ring's, says what is now kept, and keeps the unmeasured parts.Getwas counted as a stub, so libSceAgcDriver gains one function.Test.
agc_tessellation_factor_ringgainsCheckHsOffchipParam:Getreports (0, 0) first;Setround-trips (2, 256) and (3, 511), and stores 1023 as 511, also read from another thread;No row asks an unmeasured value to throw. The test can't build on
main, becauseSet's declaration changes there. As a control, puttingmain's bodies back under the new signature (Getthrowing,Setkeeping nothing) makes the first row fail.Overlap:
git merge-treemerges this cleanly withmainand with the other open pull requests that touch these six files and merge withmain, almost all of them through the debt file. The one exception is EagleBearerYS's #6146. InlibSceAgcDriver.mdit deletes the "HTILE address of a depth array slice" line, right next to thesceAgcDriverGetHsOffchipParamline this PR moves to Functional. Both deletions are wanted, so whichever PR lands second keeps both.Tested
a3cf940700(comment):mainb611e634f7.638187daec.agc_tessellation_factor_ringpasses, and--repeat until-fail:3passes every round. Noagc_unsupportedtest is registered.main's bodies under the new signature (Setstoring nothing,Getnot implemented), it aborts with "sceAgcDriverGetHsOffchipParam not implemented".Checked so far, on macOS (arm64, where no full build is possible):
clang++ -fsyntax-only.tools/check_conventions.py --base mainpasses.tools/progress.py --module libSceAgcDriverreportssceAgcDriverGetHsOffchipParamas newly implemented, with nothing else changed.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)