perf(agc): handle uniform pattern-fill kernels as clears #1335
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1335"
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 TibixDev on 2026-10-07T23:48:26Z.
What
Recognize the exact typed pattern-fill kernel. Use the existing clear path when its pattern is uniform and the destination is aligned and does not alias its inputs. Keep shader execution for other cases.
Preserve dispatch bounds, descriptor bounds, queued labels, and partial workgroups. #1201/#1202 change fill scheduling but do not recognize this kernel.
Tested
Fedora 44, Release, RX 6600: graphics and PM4 tests; real dispatch tests with Vulkan validation, HLE on and off, wave32/wave64, indirect and partial dispatches, default import settings and forced copies, and GPU-to-label ordering.
Semantics: 16 native RX 6600 cases checked typed R32_UINT loads/stores, execution masks, and descriptor bounds. PS5 hardware was not tested. Isolated comparison: upstream
e9846679versus the same revision plus this PR. Complete fill-and-publish medians fell from 0.592 → 0.303 ms at 4 KiB, 1.175 → 0.431 ms at 1 MiB, and 92.070 → 7.370 ms at 64 MiB. Six pinned processes per variant in ABBA order; the pattern changes each fill and every output word is checked. These are component timings, not title frame time. Windows was not tested.Checklist
main; no duplicate open PR.Imported from boykopovar/AnyPS5. Originally posted by TibixDev on 2026-10-08T06:10:56Z.
Rebased on
e9846679with no production changes.Measured upstream
e9846679against the same revision plus this PR (ce280a19). Fedora 44, GCC 16 Release, Ryzen 5 5600, CPU 3, RX 6600 with host RADV and its matching host library directory. Supportinglibcandlibkernelbinaries are identical between variants.The same fixture submits the real wave32 pattern-fill command stream to each driver. Each size has one warmup and nine measured fills. The uniform pattern alternates each time, so an unchanged result cannot satisfy the next fill. The timer includes submission, wait-idle, and publication to the host buffer; every output word is checked after the timer. Buffers are ordinary unregistered host allocations, with default import settings. Six processes per variant in ABBA × 3 order. Validation is off for timing, and no game or build ran alongside it.
Both variants pass the command-stream correctness cases under RADV core and sync validation. The PR's full pattern-fill suite also passes with default imports, host imports disabled, and HLE disabled. It covers wave32/wave64, indirect and partial dispatches, bounds, nonuniform fallback, and GPU-to-label ordering. Graphics, PM4, and contribution checks pass.
This is not title frame time. PS5 hardware and Windows were not tested. AI-assisted.
Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T19:42:57Z.
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
ce280a19, merged ontomain8b393b6ein one build with 31 other PRs that had no Windows run.agc_driver_pattern_buffer_fill.guest_offline_imports, broken by #2359 (reported there).No title was run.
🤖 Addressed by Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T22:03:48Z.
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/libSceAgcDriver/Execution/src/Driver/Memory/BufferFill.cppL91-98, L100-104Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-09T23:20:50Z.
Checked the exact-kernel match (code words, descriptor strides/formats, thread shape), the uniform/alignment/alias conditions and the dispatch/descriptor clamps against the diff;
agc_driver_pattern_buffer_fillpasses on Linux (Vulkan) and CI is green on the current head, plus @popcoder565's Windows run. Merging.Note for whoever lands second between this and #2081: both touch
fillBufferinBufferFill.cppand will need a small rebase.