Commit Graph
259 Commits
Author SHA1 Message Date
Dean abed035468 Merge pull request #11313 from frankea/fix/agc-draw-index-multi-instanced
fix(agc): write the console's DRAW_INDEX_MULTI_INST packet for sceAgcDcbDrawIndexMultiInstanced
2026-10-27 15:02:15 +13:00
Dean 27ad7244d2 Merge pull request #11290 from frankea/fix/draw-index-indirect-multi-tags
fix(agc): bracket sceAgcDcbDrawIndexIndirectMulti with the console's tag markers
2026-10-27 14:28:45 +13:00
Dean a83ebf95ea Merge pull request #11306 from frankea/fix/agc-tag-marker-headers
fix(agc): write libSceAgc's tag markers with the console's header flags
2026-10-27 14:27:49 +13:00
Dean 66beccdd49 Merge pull request #10944 from ahmadmuj/fix/anyps5-unbuilt-split-exports
fix(prx): build and export the stubs that eight libraries never shipped
2026-10-27 10:56:58 +13:00
Ahmad Mujahid a073f12cd0 test: check the split-export stubs are linked without calling them 2026-10-26 18:34:31 +04:00
frankea 37857ceb29 fix(agc): write the console's DRAW_INDEX_MULTI_INST packet for sceAgcDcbDrawIndexMultiInstanced
On a PS5 the builder writes 15 dwords: a tag write of 0xc6000006, opcode 0x3a with its arguments, initiator 0x80 whatever the modifier, and a closing tag write; GetSize returns 60. AnyPS5 wrote NUM_INSTANCES and DRAW_INDEX_2 under argument meanings nothing confirms. The driver refuses 0x3a, whose field meanings are not known, and names it DRAW_INDEX_MULTI_INST as Linux's nvd.h does.
2026-10-25 23:14:39 -04:00
frankea c5ab2f5b90 fix(agc): return 0 from the wait and context state GetSize calls for an invalid argument
On a PS5, sceAgcAcbWaitOnAddressGetSize and sceAgcDcbWaitOnAddressGetSize return 56 for size 0, 64 for size 1 and 0 for any other 32-bit value, and sceAgcDcbContextStateOpGetSize returns 0 for an operation above 3. The ACB wait size takes a 32-bit argument instead of a byte.
2026-10-25 22:38:48 -04:00
frankea be69f66349 fix(agc): write tag markers with the console's header flags
sceAgcDcbWaitRegMem and sceAgcDcbDrawIndirectMulti now write their 0x342 tag writes with header flag bit 2 and sceAgcAcbWaitRegMem with no flags, as libSceAgc on a PS5 does, instead of the predicate bit. ValidateWait accepts both forms and Pm4::IsTagMarker no longer depends on the header flags.
2026-10-25 21:58:54 -04:00
frankea a2fef12732 fix(agc): bracket sceAgcDcbDrawIndexIndirectMulti with the console's tag markers
On a PS5 (firmware 13.40) the builder writes SET_UCONFIG_REG 0x342 = 0xc6000005 before its DRAW_INDEX_INDIRECT_MULTI packet and 0xc6000000 after it, 64 bytes in all, and sceAgcDcbDrawIndexIndirectMultiGetSize returns 64.
2026-10-25 20:06:59 -04:00
Ahmad Mujahid 11b193cf35 fix(prx): build and export the stubs that eight libraries never shipped
The 2026-10-21 split PRs added Export.cpp stub files to seven libraries
that have their own CMakeLists.txt, so core/libs/CMakeLists.txt never
adds Export.cpp for them and no target compiled the 101 stubs. A title
that imports one fails to load instead of throwing on the call.

Ngs2, Ngs2.native and AvPlayer.native build with hidden visibility, so
their stub files also need default visibility. libSceNgs2 already
compiled PendingExports.cpp, but its 6 stubs stayed local.
2026-10-25 15:10:46 +04:00
Adrià 2816bd2754 Merge pull request #9600 from shahulmubeen-a/fix/agc-register-list-any-byte
fix(libSceAgc): accept register lists at any byte address
2026-10-25 09:16:21 +01:00
boykopovar fdf9ca7574 fix(sdk): reconcile public headers after rebase 2026-10-24 23:17:47 +03:00
boykopovar 35cf8d56cd refactor(sdk): add canonical headers for core libraries 2026-10-24 23:17:37 +03:00
hypermistandClaude Opus 5.5 21eb4895e7 test(agc): reject a null marker buffer before reading its text
A null command buffer with an unreadable text pointer must take the
checked error path in sceAgcAcbPushMarker; without the buffer check
before measuring the text, the test faults.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-24 14:46:36 +02:00
MarcZX10 7abff614b4 fix(agc): validate marker buffer before reading text 2026-10-24 14:46:36 +02:00
hypermistandClaude Opus 5.5 b3ca7ad515 feat(agc): push and set debug markers from a text span
sceAgcAcbPushMarkerSpan, sceAgcAcbSetMarkerSpan, sceAgcDcbPushMarkerSpan and
sceAgcDcbSetMarkerSpan take (buffer, text, length, color) and, on the console,
build the same user-data marker packet as their NUL-terminated counterparts
with the length given by the caller. They now share the existing marker
packets: the text is cut at the given length and terminated, and the set
variants push and pop as sceAgc*SetMarker does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-24 14:46:36 +02:00
Adrià f8fe60d3df Merge pull request #8944 from xdCloudy/feat/ps5-agc-exports
feat(libSceAgc): declare PS5 pending exports
2026-10-24 14:32:24 +02:00
hypermistandClaude Opus 5.5 1159e12357 Merge remote-tracking branch 'upstream/main' into fix/agc-semaphore-memory-firmware
Keep this PR's semaphore entry and main's workload entry.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 14:58:12 +13:00
Dean 842d625686 Merge pull request #9812 from Pacuka/fix/agc-mem-semaphore-address
fix(libSceAgc): take the semaphore address second in Acb/Dcb MemSemaphore
2026-10-24 14:20:36 +13:00
Adrià Franch d73dff01b6 Merge upstream/main into fix/agc-semaphore-memory-firmware 2026-10-23 18:30:57 +02:00
Adrià e7fbd58bbc Merge pull request #6747 from krishalivaibhav/codex/command-memory-reuse
fix(agc): synchronize pending writes before command allocation
2026-10-23 16:20:43 +02:00
Adrià af4700b98d Merge pull request #7692 from PhialsBasement/fix/agc-versioned-defaults-compact-types
test(libSceAgc): find MRT0 through the compact versioned register defaults
2026-10-23 13:14:16 +02:00
xdCloudy 580629ed0e feat(libSceAgc): declare pending PS5 exports 2026-10-23 01:43:21 +01:00
Dean bd1d3994ce Merge pull request #8296 from hypermoist/fix/agc-capture-instrumentation-query-sizes
fix(agc): return the console results of the capture, shader instrumentation and occlusion query size calls
2026-10-23 11:42:34 +13:00
Dean f4757d4c2f Merge pull request #8402 from hypermoist/fix/agc-interpolant-mapping-firmware
fix(libSceAgc): match interpolant mapping variants to firmware
2026-10-23 11:35:27 +13:00
PacukaandClaude Opus 5.5 795c390339 fix(libSceAgc): take the semaphore address second in Acb/Dcb MemSemaphore
PPSA03396 calls sceAgcAcbMemSemaphore and sceAgcDcbMemSemaphore as
(cb, address, waitForMailbox, signalType, operation). Both read the
address from the fourth argument instead, so the call aborted with
"null or misaligned address 0x1".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 18:11:12 +02:00
Shahul Mubeen AandClaude Opus 5.5 a30c574aea fix(libSceAgc): accept register lists at any byte address
sceAgcCbSetShRegistersDirect and sceAgcCbSetUcRegistersDirect refused a
register list that was not 4-byte aligned. PPSA26344 passes the sh
register list of a shader header that sits 1 byte past an 8-byte
boundary (core_common_subcore.core_b1_fx.sprig.xpps; the unaligned
headers themselves are accepted since #902), and the title aborted with
"null or misaligned address 0x8021363131" after about 11 minutes in the
open world.

The list entries are now copied byte for byte, as #7606 does for register
range values. A null list with a count still throws.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 20:48:42 +05:30
hypermist b83fe2069e Merge remote-tracking branch 'upstream/main' into fix/agc-capture-instrumentation-query-sizes
# Conflicts:
#	core/libs/prx/libSceAgc/DcbDraw/src/Stats.cpp
#	core/libs/prx/libSceAgc/Unimplemented.cpp
2026-10-22 16:30:36 +13:00
hypermist dfa27f30c2 Merge remote-tracking branch 'upstream/main' into fix/agc-semaphore-memory-firmware
# Conflicts:
#	core/libs/prx/libSceAgc/Misc/src/Semaphore.cpp
#	core/libs/prx/libSceAgc/Unimplemented.cpp
#	core/libs/prx/libSceAgc/tests/Semaphore.cpp
#	docs/dev/debt/libSceAgc.md
2026-10-22 16:19:38 +13:00
boykopovar 682165a929 fix(agc): restore occlusion query size argument 2026-10-21 21:56:02 +03:00
boykopovar df4d0beae6 fix(agc): restore geometry shader resource merging 2026-10-21 21:53:55 +03:00
boykopovar c311d6dc2a fix(agc): take offchip lds enable from the front shader half 2026-10-21 21:53:54 +03:00
boykopovar faebf639e9 fix(agc): restore semaphore memory clearing and errors 2026-10-21 21:53:53 +03:00
boykopovar d6966f9792 fix(agc): preserve wait packet control bits during patching 2026-10-21 21:53:52 +03:00
boykopovar 51d788e87c fix(agc): restore wait patch scalar argument widths 2026-10-21 21:53:51 +03:00
boykopovar 218be372ea fix(agc): restore protected export argument and return types 2026-10-21 21:53:25 +03:00
krishalivaibhav 0b5ba44703 fix(agc): synchronize pending writes before command allocation 2026-10-22 00:21:35 +05:30
Adrià 5bd9912658 Merge pull request #8317 from hypermoist/feat/agc-static-buffers
feat(libSceAgc): implement static buffers and qwords
2026-10-21 15:32:19 +02:00
Adrià 275e896797 Merge pull request #7696 from MaxLikesCode/feat/agc-set-index-indirect-args
feat(libSceAgc): implement sceAgcDcbSetIndexIndirectArgs
2026-10-21 12:52:39 +02:00
hypermist f4e00d3ca6 Merge remote-tracking branch 'origin/feat/agc-acb-workload-packets' into fix/agc-semaphore-memory-firmware
# Conflicts:
#	docs/dev/debt/libSceAgc.md
2026-10-21 17:03:14 +13:00
xdCloudy 6fa316546c fix(libSceAgc): drop interpolant export duplicates 2026-10-21 02:53:31 +01:00
xdCloudy abc62e78f4 feat(prx): add missing libSceAgc exports 2026-10-21 02:37:09 +01:00
hypermistandClaude Opus 5.5 966018783f fix(agc): keep the registered-stream throw for the workload calls
Review on #8302: the ACB workload calls and the DCB stream-inactive call
throw again for a registered stream until a title is shown stopping on
them (as #3789 did for the DCB calls, and as #4709 kept). The debt
entry keeps the firmware's packet layout as the record of what is
missing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 12:23:37 +13:00
hypermist 2fb54c8d28 Merge remote-tracking branch 'upstream/main' into feat/agc-acb-workload-packets 2026-10-21 12:12:46 +13:00
hypermistandClaude Opus 5.5 e95f842140 fix(libSceAgc): match interpolant mapping variants to firmware
Add the unversioned sceAgcCreateInterpolantMapping and
sceAgcUpdateInterpolantMapping and stop sceAgcUpdateInterpolantMapping_10000
throwing for split f16 defaults, all matching libSceAgc bit for bit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 01:24:01 +13:00
Adrià 84be26d93e Merge pull request #7606 from hugodearaujo/fix/agc-register-range-any-alignment
fix(libSceAgc): accept register range values at any byte address, as the console does
2026-10-20 12:55:13 +02:00
hypermistandClaude Opus 5.5 35a2cbcedb fix(libSceAgc): use firmware semaphore memory results
sceAgcSetAmmSemaphoreMemory and sceAgcGetSemaphoreLabel return the
firmware's errors instead of throwing, registration clears the whole
memory, and sceAgcSetSemaphoreMemory shares the registration with its
1 GiB size limit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-20 22:57:30 +13:00
hypermistandClaude Opus 5.5 fec563d92c feat(libSceAgc): implement static buffers and qwords
sceAgcSetStaticBuffer, sceAgcGetStaticBuffer, sceAgcSetStaticQword and
sceAgcGetStaticQword read and write the six 16-byte slots at 0xfe0040000
that the driver already maps for the fetch shader table, through a new
AgcDriverStaticTable_nid_postfix accessor.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-20 22:52:52 +13:00
hypermistandClaude Opus 5.5 6a4913cc7c feat(agc): write the workload packets on the ACB and for an inactive stream
sceAgcAcbSetWorkloadsActive, sceAgcAcbSetWorkloadComplete and
sceAgcAcbSetWorkloadStreamInactive build the same packets as the DCB calls,
and sceAgcDcbSetWorkloadStreamInactive writes a 9-dword IT_NOP with the
stream id, the size of the console's user-data packet. The debt entry now
records the console layout read from libSceAgcDriver.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-20 22:32:46 +13:00
hypermistandClaude Opus 5.5 22cd2ec5c7 fix(agc): return the console results of the capture, shader instrumentation and occlusion query size calls
sceAgcDriverRequestCaptureStart, sceAgcDriverRequestCaptureStop and
sceAgcDriverTriggerCapture return 0x8A6C1000 without doing anything.
sceAgcSetShaderInstrumentation keeps the flags and returns 0, and
sceAgcGetShaderInstrumentation returns them.
sceAgcDcbBeginOcclusionQueryGetSize is 0x10 for type 0, 0x120 for type 1
and 0 otherwise; sceAgcDcbEndOcclusionQueryGetSize is 0x10.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-20 22:18:40 +13:00