feat(agc): return null from the workload builders for unregistered streams #4709
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4709"
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 fdfawef324 on 2026-10-12T19:37:00Z.
What
sceAgcDcbSetWorkloadStreamInactive,sceAgcAcbSetWorkloadsActive,sceAgcAcbSetWorkloadCompleteandsceAgcAcbSetWorkloadStreamInactivethrew for every call.sceAgcDcbSetWorkloadsActiveread the workload ids before checking the stream.The prosper console oracle measured all six workload builders on a PS5 (ACB at lines 48-56, DCB at lines 196-204). Each was called with three argument patterns and no workload stream registered. Every call returned null and wrote nothing. Pattern b passes stream 1 with the workload ids at address 2 and still returns null without faulting, so the console checks the stream before it reads the ids. Here that call read address 2 and crashed.
Changes:
NotImplementedfor a registered stream. That packet is not measured, KytyPS5 has no body for these four, and the two references disagree on the DCB layout: KytyPS5 writes anIT_NOP, while OpenAGC derives a SET_UCONFIG_REG, WRITE_DATA and SET_WORKLOAD sequence from the driver. No layout is guessed.sceAgcDcbSetWorkloadsActivenow checks the stream before it reads the ids, in OpenAGC's order. Its packet for a registered stream is unchanged.Unimplemented.cpp. The ACB ones live inAcb/src/Control.cppso no CMake change is needed.docs/dev/debt/libSceAgc.mdrecords what is measured and what is not.Other functions in the same import list were left alone:
sceAgcCbMemsetExclusivefaulted on the oracle (agcbuild.unmeasured.tsv,fault:11), so they have no measurement. The shader instrumentation calls are not in the oracle at all. Markers are in #2847, instrumentation in #2850 andsceAgcAcquireMemSetEnginein #1060.Tested
Windows Server 2025, RTX 3060, GCC 15.2 (winlibs), Release.
testWorkloadStreamsinagc_commands, against the three measured patterns for all six calls. It checks that each returns null and leaves the buffer and cursor untouched. It also covers an exhausted and a null buffer, and a registered stream that throws without touching the buffer.1acfa7f78the test fails withsceAgcDcbSetWorkloadStreamInactive not implemented. Run alone, thesceAgcDcbSetWorkloadsActivepattern b segfaults (read of 0x0000000000000002inlibSceAgc.prx). With the change it passes (0.13 s after the rebase).agc_initialization,agc_commands,agc_platform_tests,agc_packet_info_tests,agc_register_command_tests,agc_cb_cond_write_tests,agc_payload_range_tests,agc_end_of_shader_action_size_tests,agc_branch_patch_tests,agc_predication_tests,agc_shader_fusion,agc_context_state_size_tests,agc_interpolant_mapping,guest_shader_link,agc_gs_oversubscription_tests,agc_dma_data_tests,agc_write_data_patch_tests,agc_prime_utcl2_tests,agc_cond_exec_patch_tests,agc_shader_helpers).tools/check_conventions.pypasses.682ef0c17. The commits between1acfa7f78and682ef0c17only change docs and CI files. The 20 tests above were run again after the rebase and pass.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T19:38:43Z.
Progress report (
2f4cc89→f8257a1)📈 System libraries: 86.45% (+0.09%, +3 implemented functions)
✅ 3 implemented
sceAgcAcbSetWorkloadCompletesceAgcAcbSetWorkloadStreamInactivesceAgcAcbSetWorkloadsActiveImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T19:45:03Z.
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.
main)core/libs/prx/libSceAgc/Unimplemented.cppL18-37docs/dev/debt/libSceAgc.mdL35Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-12T20:41:36Z.
Checked the six workload builders against the prosper console oracle rows you cite (ACB lines 48-56, DCB 196-204): null in all three patterns matches. Built on Linux merged onto main: all 20 libSceAgc tests pass, and the new
testWorkloadStreamsfails without the change. The registered-stream throw keeps the unmeasured packet out. Merging.