Repository navigation
fix(agc): copy a shader, context or user config register to memory with COPY_DATA - #5477
Conversation
- skip pure PM4 NOP packets in the Metal packet loop (upstream PR boykopovar#5481) - note the dispatch registers after direct and indirect Metal dispatch so COPY_DATA from a shader register works there (upstream PR boykopovar#5477) - NullImageDescriptor delegates to IsNullTextureResource (upstream PR boykopovar#4779) - tests: pm4 compute replay reads the dispatch initiator and group counts back through COPY_DATA; metal utility tests cover a type-0 image descriptor Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DgW4n3qYgi5jAAohEmXRQj
* perf(agc): fast-skip pure PM4 NOP packets during queue execution (cherry picked from commit 139bf04) Ported from upstream PR boykopovar#5481 * fix(agc): copy a shader, context or user config register to memory with COPY_DATA A dispatch now leaves its initiator and, for DISPATCH_DIRECT, its group counts in the shader registers, where the CP puts them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 5e36c08) Ported from upstream PR boykopovar#5477 * fix(agc): accept reported vertex stage state (cherry picked from commit 632331d) Ported from upstream PR boykopovar#4341 * fix(agc): initialize stencil control and reference masks (cherry picked from commit 85e0d98bba896002539365bb29a7a39a8e43f501) (cherry picked from commit 13dca48) Ported from upstream PR boykopovar#5347 * fix(agc): accept inactive vertex point size on non-point draws (cherry picked from commit d4b59ce) Ported from upstream PR boykopovar#4715 * fix(agc): treat type-0 texture descriptors as null (cherry picked from commit 7e1e1ce) Ported from upstream PR boykopovar#4779 * fix(agc): fall back out-of-range sceAgcInit versions to table 13 Pointer-shaped NID kW3GLb7QfPg calls from public homebrew succeed on console; returning an error left those titles failing init after boykopovar#4835. (cherry picked from commit 939f784) Ported from upstream PR boykopovar#5163 (debt-doc hunk dropped: file absent on main) * fix(agc): clamp sceAgcInit versions above 13 inline (cherry picked from commit 0cc5102) Ported from upstream PR boykopovar#5163 (second commit) * metal: adapt the shared AGC driver slice to the Metal execution loop - skip pure PM4 NOP packets in the Metal packet loop (upstream PR boykopovar#5481) - note the dispatch registers after direct and indirect Metal dispatch so COPY_DATA from a shader register works there (upstream PR boykopovar#5477) - NullImageDescriptor delegates to IsNullTextureResource (upstream PR boykopovar#4779) - tests: pm4 compute replay reads the dispatch initiator and group counts back through COPY_DATA; metal utility tests cover a type-0 image descriptor Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DgW4n3qYgi5jAAohEmXRQj --------- Co-authored-by: Kikoarl <7354010+Kikoarl@users.noreply.github.com> Co-authored-by: LeandroLP23 <leandroplacidi@gmail.com> Co-authored-by: MarcZX100 <marczxrr@gmail.com> Co-authored-by: MathiasDevelopes <25400788+MathiasDevelopes@users.noreply.github.com> Co-authored-by: lorkydey <57268822+Lorkydey@users.noreply.github.com> Co-authored-by: mazen <mazenshaar@hotmail.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Windows test of #5477: Windows 10 (19045), MinGW-w64 GCC 15.2, Release,
AI-assisted (Claude Code). |
…th COPY_DATA A dispatch now leaves its initiator and, for DISPATCH_DIRECT, its group counts in the shader registers, where the CP puts them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rs it reads Co-Authored-By: Claude <noreply@anthropic.com>
|
Rebased onto current Checked: |
5e36c08 to
5d9def6
Compare
What
PS5 FSR4 Showcase (PPSA99011) stops with
AGC driver: COPY_DATA at DWORD 69: COPY_DATA register, GDS or reference-clock source is not implementedonce #5163 gets it pastsceAgcInit. Right after aDISPATCH_DIRECTit copies three SH registers to memory with COPY_DATA (control0x00100200:SRC_SEL0, register;DST_SEL2, memory):0x2e0c:COMPUTE_PGM_LO0x2e07:COMPUTE_NUM_THREAD_X0x2e00:COMPUTE_DISPATCH_INITIATORChanges:
0x2c00, context registers at0xa000and user config registers at0xc000.COUNT_SELcopies two consecutive registers.ResolveStoreleaves such a copy toExecute: the value depends on the registers at the packet's place in the stream.COMPUTE_DISPATCH_INITIATOR, and the group counts of aDISPATCH_DIRECTintoCOMPUTE_DIM_X/Y/Z. After each dispatch,Pm4::NoteDispatchRegistersdoes the same in the queue's shader registers. It runs in both the worker and the dispatch-ahead pass.DISPATCH_INDIRECTclears the three counts, because they come from memory, so a later copy of them throws.0x207-0x213from the shader registers, so they are unchanged.Copies to a register, and GDS and reference-clock sources, are rejected as before.
Tested
Windows 11 (26300), AMD Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), WinLibs GCC 15.2.0, Release, on
maina0f5916a2.agc_driver_pm4(extended) passes. It covers:ResolveStoredoes not resolve a register copy.tools/check_conventions.pypasses.--windows --trap-sdk-syscall-stubs), with this branch and fix(agc): return 0 for out-of-range sceAgcInit without table lookup #5163 merged locally, 3 runs of 60 s:FSR4_SHOWCASE_SUBMIT probe_ms=0.61and reachesFSR4_SHOWCASE_CHAPTER index=0 title=FSR 4 on PlayStation 5.MUBUF resource descriptor register range overflow, and 1 of 3 runs with its ownvkQueueSubmit(...) = -4.ctest -R '^agc_' -j 1on this machine, test shader cache emptied: 480 passed, 2 skipped, and 1 failed,agc_driver_layered_volume_vertex_no_gpl. That test fails onmainon this driver too: GPL-off pipelines on it, AMD Windows: identical AGC executables invert GPL pass/fail results after relocation #4768.conventions_ci_gate, which fails on any fork.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)