Repository navigation
Conversation
PS4 color and depth targets, PS4 graphics EOP events, and the PS4 tile modes (1D/2D thin and display, depth with tile split, PRT, linear general) on the AGC executor, with a GPU detiler for every mode. Textures sampled over the padded corner of a render target are GPU block copies, and the PS4 SDK pattern-fill compute kernel runs as a GPU fill when it repeats one dword, so render targets and HTILE are cleared without a CPU drain. Two-dword patterns keep running the kernel: as fills, Limbo's clears of its 64-bit target made its gameplay advance about half as far per frame. Tests cover the tiling equations against addrlib formulas, the GPU detiler for every mode and element size, and the fill ranges.
…p test The 4 KiB display buffer alignment check now names linear and PS4 buffers, because PS4 tiled display buffers may be 4 KiB aligned too. video_out_flip_ps4 still looked for the old text when a PS4 buffer set is changed to the PS5 tiled layout, so it failed although the change is still refused.
…count A PS4 (GCN) guest's RELEASE_MEM with DATA_SEL 4, which libSceGnmDriver lowers EVENT_WRITE_EOP with that selector to, now writes an 800 MHz count of the host's steady clock that starts when libSceAgcDriver loads. ntamas94 measured the counter on a PS4 Pro in base mode: 798.017 MHz, 0.25% under the 800 MHz sceGnmGetGpuCoreClockFrequency reports, reading zero about 2 s before the app started. A PS5 guest's DATA_SEL 4 still throws, named as boykopovar#7911 does on main; 5 stays GDS data and 6 and 7 are reserved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
@savvaniss This PR now conflicts with main in |
GuestTextureResource keeps this branch's gcnPitch, gcnPow2Pad and gcnLinearGeneral and main's fmaskCmaskAddress. layeredDepthStorage drops the layer-pitch refusal, since main's LayeredDepthStorage now places each layer at GuestLayerOffset, and keeps this branch's refusal of level-major PS4 surfaces, whose layers GuestLayerOffset does not place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in main 07da04f through the boykopovar#9431 merge offered as Get-fix#22. The PM4 tests keep this branch's GCN DATA_SEL 4 counter test and main's new MEM_SEMAPHORE test side by side. The debt file takes main's point-size, vertex-path point list and MEM_SEMAPHORE entries and keeps this branch's RELEASE_MEM system counter entry, which main did not change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@oneandonlydean merged, no rebase. The head is now
On the RX 9070 XT with the validation layer:
AI-assisted: yes (Claude Code) |
|
A run of this head on Windows with an NVIDIA card, next to the AMD runs in the description. Windows 11 Pro 10.0.26300, WinLibs GCC 15.2.0 (MinGW-w64), Release, NVIDIA GeForce RTX 4070, driver 610.88.
AI-assisted: yes (Claude Code) |
|
This head These are AI-assisted: yes (Claude Code) |
|
A Windows run of
AI-assisted: yes (Claude Code) |
What
Get-fix#19, moved upstream on top of #9431 as Get-fix asked.
PS4 titles write the GPU's 64-bit counter with
EVENT_WRITE_EOPandDATA_SEL = 4, and libSceGnmDriver lowers that packet to aRELEASE_MEMwith the same selector. On #9431 the AGC driver rejects that selector:main(#7911) throws forDATA_SEL = 4because the PS5 counter is not known. Gang Beasts and the Hasbro Family Fun Pack (CUSA03312) both write it, and the Hasbro bring-up has been running on a local 100 MHz stand-in.ntamas94 measured the counter on a PS4 Pro in base mode (FW 10.71), with the packets Gang Beasts writes, timed against the TSC over 124 s:
DATA_SEL = 4advances at 798.017 MHz of console time. That is 0.25% under the 800 MHz thatsceGnmGetGpuCoreClockFrequency()reports and that Gang Beasts divides by.This PR applies that rule:
ShaderRecompiler::GcnGuestShaders()),RELEASE_MEMwithDATA_SEL = 4writes an 800 MHz count of the host's steady clock. The count starts at zero when libSceAgcDriver loads. It is written wherever the driver resolves the packet: on execution, as a deferred label (DecodeLabelWrite), and as a run-time store inDecodeStores.DATA_SEL = 4still throws "RELEASE_MEM of the 64-bit system counter (DATA_SEL 4) is not implemented", as fix(agc): name the RELEASE_MEM system counter instead of GDS data #7911 does on main.DATA_SEL = 5still throws as GDS data, and 6 and 7 now throw as reserved. The selector checks are fix(agc): name the RELEASE_MEM system counter instead of GDS data #7911's, so this branch and main agree when they meet.DATA_SEL = 3value moved into the same helper (ReleaseMemValue) unchanged.What it does not do, recorded in
docs/dev/debt/libSceAgcDriver.md:sceGnmGetGpuCoreClockFrequency, so there is no second value to keep in step with.DATA_SEL = 3to be the TSC divided by 16, a 40-bit count. The driver still writes 100 MHz of the host's steady clock for it.shadPS4 names the selector
PerfCounterand writes the TSC scaled to the GPU core clock.Nothing in it depends on the title.
Tested
Windows 11 Pro 26300, WinLibs GCC 15.2.0, Release, AMD Radeon RX 9070 XT (driver 32.0.31041.1004),
ANYPS5_GPU=AMD.Base. This branch is now
781ffafe9f, built in two merges:main07da04f947merged into feat(libSceAgcDriver): draw PS4 (GCN) command buffers #9431's head26d651d3e0, asmerge/9431-main(4e8243ac48). That merge is offered to Get-fix as chore: merge main into ps4/agc-gcn Get-fix/AnyPS5#22.merge/9431-mainmerged into this branch. Two files conflicted:tests/Pm4.cpp:main's newtestMemSemaphorelanded where this PR addstestGcnReleaseMemSystemCounter. Both are kept, unchanged.docs/dev/debt/libSceAgcDriver.md:maininserted its point-list and MEM_SEMAPHORE entries next to the RELEASE_MEM entry and did not change that entry. The merge keepsmain's entries and this PR's text of the RELEASE_MEM entry.agc_driver_pm4gainstestGcnReleaseMemSystemCounter. With GCN shaders on, twoRELEASE_MEMpackets are executed 20 ms apart, and the test checks three things:With
Execution/src/Pm4.cppas onmerge/9431-main, on781ffafe9f, it fails with "RELEASE_MEM of the 64-bit system counter (DATA_SEL 4) is not implemented".Validation layer: run with
ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ctest -V, onmain07da04f947and on this branch. The tests:agc_driver_pm4,agc_driver,agc_driver_graphics,agc_driver_register_key,agc_driver_gcn_detileandagc_driver_pattern_buffer_fillagc_driver_flipand the 16video_out_flip_*modesagc_gcn_decode,texture_format_lookup,agc_driver_resource_cache_replaced_textureandagc_depth_copy_kept_bytesagc_driver_depth_*testsResults:
main: 48 of 49 pass (agc_driver_gcn_detileis not onmain).agc_driver_depth_plane_partial_store, "repeated lookups of the first layer of an unchanged array proved no refresh", on every run on this machine.VUID-line orwas not found but was requested by env var VK_INSTANCE_LAYERS. EverySelected GPUline names the RX 9070 XT.CUSA03312: the Hasbro titles ran on
ps4/limbo-gpuat93eeee0141(feat: run PS4 games on the AGC driver — Limbo (CUSA01664) in game (integration branch) #6977's head then) on a local 100 MHz stand-in for this until feat(agc): write RELEASE_MEM DATA_SEL 4 for PS4 guests as an 800 MHz count Get-fix/AnyPS5#19. Not rerun on this base: the titles also need feat(libSceGnmDriver): build PS4 command buffers and submit them #9432.tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.py --branch feat/gcn-release-mem-perf-counter, againstmain88f99678bf: no open pull request conflicts with this PR's own lines. Every row comes from feat(libSceAgcDriver): draw PS4 (GCN) command buffers #9431:merge/9431-mainalone.Checklist
main; no other open PR implements the same functions (stacked on feat(libSceAgcDriver): draw PS4 (GCN) command buffers #9431)NotImplemented_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)main, offered as chore: merge main into ps4/agc-gcn Get-fix/AnyPS5#22)🤖 Generated with Claude Code