Commit Graph

17 Commits

Author SHA1 Message Date
Utku Halis 661f8e1e7c feat(libSceAgc): implement sceAgcAcbWaitUntilSafeForRendering 2026-10-12 08:26:47 +03:00
Lorkydey 43783f725c feat(libSceAgc): build versioned ACB atomic GDS commands 2026-10-11 18:28:46 +02:00
ploysius f7424ea95d refactor(libSceAgc): name three more exports after their versioned NIDs
OpenAGC's include/agc_nids.h names three more of the raw-NID exports, and
each name hashes to its NID:

  gQkqkLttcpw  sceAgcAcb_gQkqkLttcpw               -> sceAgcAcbAtomicGds_0900
  dolOmWH+huQ  sceAgcUnknownGetFusedShaderSize     -> sceAgcGetFusedShaderSize_0080
  V++UgBtQhn0  sceAgcGetDataPacketPayloadAddressUnk -> sceAgcGetDataPacketPayloadAddress_0090

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 14:02:51 -04:00
DotDebian 9837c69f0d feat(agc): implement sceAgcDcbPrimeUtcl2 and its size query
The DCB variant threw "not implemented" while the ACB one wrote a
5-dword packet. Both now go through Agc::Command::WritePrimeUtcl2 and
the size query returns 20 bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 10:05:28 +02:00
DotDebian 12d77169ab feat(agc): implement sceAgcAcbDmaDataGetSize
sceAgcAcbDmaData emits the 7-dword DMA_DATA packet through
Agc::Command::WriteDma, the writer sceAgcDcbDmaData shares, so its size
query returns the same 28 bytes instead of throwing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:12:38 +02:00
OverkillLabs a1814def3b style: strip explanatory comments per CONVENTIONS.md
Comments in this codebase may only mark technical debt (human-added
only), the end of #endif, and the end of a namespace, per
docs/dev/CONVENTIONS.md. Remove the inline rationale comments added in
the AGC PM4 opcode and shader recompiler robustness commits; the code
itself, the commit history, and the PR description now carry that
context instead.

Notably, Command::WriteMemSemaphore takes the corrected 4-argument
form (address, waitForMailbox, signalType, operation): an earlier
revision of this helper used a different, incompatible argument
order. sceAgc*MemSemaphore callers derive waitForMailbox/signalType
from the low two bits of clientCode, and operation from action
(0 = signal, 1 = wait). This ABI note previously lived as an inline
comment; it is recorded here instead per the no-comments convention.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 04:20:09 +03:00
OverkillLabs 0c41dc99d5 Agc: implement missing PM4 command-buffer opcodes (Jump/Rewind/Predication/MemSemaphore/CopyData/AtomicMem/DrawIndexMultiInstanced)
Fills in guest-facing sceAgc* entry points across Acb/Cb/DcbDraw/DcbFlow/DcbState/Misc
that were still stubbed with NotImplemented_nid_no_patch on current upstream, one layer
below upstream's Recorder rearchitecture:

- Command/Control.{hpp,cpp} (new): WriteJump, WriteRewind, WritePredication,
  WriteMemSemaphore helpers shared by the Acb/Dcb entry points below.
- Command/Memory.{hpp,cpp}: WriteCopyData, WriteAtomicMem helpers.
- Acb/Control.cpp: Jump/JumpGetSize, Rewind/RewindGetSize.
- Acb/Dispatch.cpp: DispatchIndirectGetSize.
- Acb/Memory.cpp: AcquireMemGetSize, CopyData(+Size), AtomicMem(+Size),
  AtomicGdsGetSize, PrimeUtcl2(+Size).
- Acb/Sync.cpp: CondExec(+Size), WaitOnAddressGetSize, EventWriteGetSize,
  QueueEndOfShaderActionGetSize, MemSemaphore.
- Cb/Dispatch.cpp: DispatchGetSize only (sceAgcCbDispatch itself left untouched --
  upstream's modifier mask 0xa038u|0x41u there is correct as-is).
- DcbDraw/DrawIndexed.cpp: DrawIndexMultiInstanced(+GetSize), still unimplemented
  even after upstream's own indexed-draw work.
- DcbFlow/Control.cpp: Jump, Rewind(+Size), and a real WaitUntilSafeForRendering that
  emits AgcDriver::RenderingWaitPacketHeader (recognized by the executor's fence wait
  in Driver.cpp) instead of upstream's plain-NOP stub, which the executor does not
  special-case.
- DcbFlow/Memory.cpp: AcquireMemGetSize, CopyData(+Size), DmaDataGetSize,
  AtomicMem(+Size), AtomicGdsGetSize, WriteDataGetSize.
- DcbFlow/Sync.cpp: CondExec(+Size), WaitOnAddressGetSize,
  StallCommandBufferParserGetSize, MemSemaphore.
- DcbState/Predication.cpp: SetPredication only (the file's 3 GetSize functions are
  left as upstream's diagnostic stubs, not real fixes).
- Misc/PacketInfo.cpp: sceAgcDcbGetSystemSoftwareVersion.

ABI correction: Command::WriteMemSemaphore takes the corrected 4-argument form
(address, waitForMailbox, signalType, operation). The Acb/DcbFlow sceAgc*MemSemaphore
entry points still expose the older (action, clientCode, address) guest signature;
their bodies now decode `action` into the signal/wait operation and the low two bits
of `clientCode` into signalType/waitForMailbox before calling the corrected helper.

Not ported (already superseded or out of scope per review): WriteMarker/WriteCustomNop/
WriteEventWrite/WriteCondExec/WriteDispatchIndirectAddress (duplicate upstream's
existing Marker/EventWrite/DispatchIndirect logic), Acb DmaData/DmaDataGetSize/
WriteData/EventWrite (already implemented upstream), DcbFlow EventWrite(+Size)
(upstream's version handles the 8-byte occlusion-address case more completely),
DcbDraw's other DrawIndex* entry points (already implemented upstream),
Misc/Trinity.cpp, Patch/WriteData.cpp, DcbState/Marker.cpp (all superseded by
upstream equivalents).
2026-09-28 13:25:15 +03:00
Dean Galvin 0c06382d89 feat(agc): ACB markers, index buffer unbinding and address in errors
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ButHENCbXXt8h4EZuWUabJ
2026-09-28 19:47:33 +13:00
devilismyfriend 9c2a75601d feat(libs): agc packet builders, savedata memory, offline service stubs
- libSceAgc: SetIndexCount, SetBaseIndirectArgs, DispatchIndirect, wait
  and write-data patch functions, relaxed checks for what titles send,
  NOP fillers for LOD stats and wait-until-safe, NotImplemented stubs.
- libSceSaveData.native: short mount points, backup events, save-data
  memory slots.
- user/system service, store dialog, video-out flip modes and queue-full
  error, pad read, fibers, offline behaviour for network/NP modules, and
  new export-only modules Ampr, JpegEnc, Json2, MsgDialog.native,
  NpCppWebApi, NpUtility.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177gthrWEBBfBu5xJDXgBfo
2026-09-25 16:27:49 -07:00
boykopovar d765867146 feat(libs): add new sceAgcDriver functions def 2026-09-24 08:00:36 +03:00
boykopovar f5bc2d7649 feat(libs): add new sceAgc functions def 2026-09-24 07:54:15 +03:00
boykopovar bdff4874de feat(agc): add draw packets and register defaults with strict validation 2026-09-13 18:14:51 +03:00
boykopovar 888abd280f refactor(libSceAgc): add subdirs + new separated src 2026-09-13 15:06:31 +03:00
boykopovar 114c11aa88 feat(libSceAgc): implement command packet functions 2026-09-13 14:34:15 +03:00
boykopovar abc72da741 feat(libs): define vabi macros + add to declarations 2026-09-10 08:07:03 +03:00
boykopovar e62c08f625 feat(libs): add new functions declarations 2026-09-09 09:12:30 +03:00
boykopovar 8730fa1e6e refactor(libSceAgc): create libSceAgc cmake project structure 2026-09-08 11:03:13 +03:00