mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-18 23:07:07 -05:00
2.4 KiB
2.4 KiB
libSceJobManager technical debt
Functional
- sce::Job::JobManager (libSceJobManager) is written from the disassembly of the copies PPSA01474 and PPSA36082 ship in
sce_module, andguest_job_manager_testspasses against both of those modules as well: the memory size formula, the error codes, sync point ordering, the per-sequence limits and the priority order are the original's. Compute sequences submit throughsceAgcDriverSubmitAcbon the queue their mask bit selects and are checked the same way byagc_driver_job_manager_compute_tests: results, ordering against CPU dispatches and sync points, limits and sizes match the two modules. The command stream is simpler than the original's: every compute dispatch is submitted with its own label write and interrupt, where the original batches the label write and rewinds commands it encoded ahead, and the command buffers and labels live on the host heap. The per-queue command size incalculateRequiredMemorySizeis a constant (104, 148 and 32 bytes per dispatch, sync point and wait), which is what the original measures by running the builders of this project's libSceAgc. A compute dispatch on a CPU sequence throws (the original does not check), and a failingsceAgcDriverAddEqEventthrows.shutdownthrows while a compute sequence has work in flight, a sequence's label total is written as 32 bits, and since the label is host memory no GPU import covers, the driver drains recorded work before each label write. The manager's state lives on the host heap, with only the block header written to the title's memory; the original keeps everything in that block, and a block smaller than 0x2d8 bytes throws here. The worker sleep policy, the spin count and the persistent thread count are validated and stored but change nothing, a factory priority above 1 throws,shutdownthrows while a thread is blocked in a sequence wait, and using a sequence after itsdestroythrows.initializereturns 0 where the original returns the result of its last import (BG26hBGiNlw, not resolved to a name), thesceRazorCpuJobManager*profiler calls are not made, and a worker thread that cannot be created or configured throws where the original does not check. The order of the sequence and factory virtual functions is read from the modules' vtables only, since no title that calls them has been run