Commit Graph
314 Commits
Author SHA1 Message Date
Adrià 0836dfdf4f Merge pull request #13701 from MarcZX10/feat/psn-unavailable-dialogs
feat(libSceIme): show a notice when PSN-only system dialogs open
2026-10-31 21:05:21 +01:00
Adrià 3197f0ad06 Merge pull request #13705 from MarcZX10/fix/pad-port0-connected-state
feat(libScePad): report port 0 as connected only while its controller is present, opt-in with ANYPS5_PAD_PORT0_STATE
2026-10-31 20:50:35 +01:00
MarcZX10 2318cf0b92 Merge remote-tracking branch 'upstream/main' into fix/env-reference-constant-names 2026-10-31 13:37:22 +00:00
MarcZX10 5b7ba8484a Merge remote-tracking branch 'upstream/main' into feat/host-free-space
# Conflicts:
#	core/libs/prx/libSceSaveData.native/Export.cpp
2026-10-31 00:26:47 +00:00
MarcZX10 7c6e12bd6f docs: say that an empty ANYPS5_FREE_SPACE is unset on Windows 2026-10-30 23:49:25 +00:00
MarcZX10 68a4689e62 Merge remote-tracking branch 'upstream/main' into fix/pad-port0-connected-state 2026-10-30 23:46:32 +00:00
Adrià 6362046d10 Merge pull request #12569 from MarcZX10/feat/host-volume-mute
feat(libSceAudioOut): host volume and mute hotkeys, opt-in mute on focus loss
2026-10-30 21:46:25 +01:00
Adrià 3410406e07 Merge pull request #13373 from mrfelek/perf/adaptive-staging
perf(agc): keep a staged element in place when its frames are faster
2026-10-30 20:57:01 +01:00
MarcZX10 0ca4999296 docs(ENVIRONMENT): list ANYPS5_PSN_DIALOGS
Add the row for the mode that shows a notice when a PlayStation Network
dialog opens, with its unset and invalid behaviour. The row is in its own
libSceIme section because the variable is read in that library.
2026-10-30 18:49:35 +00:00
MarcZX10 5d510f67dc docs(env): document ANYPS5_FREE_SPACE in the environment reference 2026-10-30 18:48:57 +00:00
mrfelek 17c3920ac4 perf(agc): keep a staged element in place when its frames are faster
Staging a swept write-only element (#7618) costs a copy-in and a
copy-back per use. In PPSA03912's town that saves GPU time, but in its
main menu the 202 MiB element is faster in place (73 vs 91 ms of GPU
time per frame), so the menu lost about a fifth of its frames.

Decide per element by measurement. The busiest element is probed in
its current mode, the other mode and its current mode again; the other
mode is kept when its frames are faster by more than twice the
standard error. A repeated answer doubles the wait for the next probe
from 20 s up to 160 s, and a jump of the frame GPU time by more than a
quarter (a scene change) probes again at once. The frame GPU time comes
from the whole-batch timestamps, which the first probe turns on.
Resource builds made under the other decision are not reused.
APS5_NO_ADAPTIVE_STAGING=1 stages every eligible element, as before.

The policy is in AdaptiveStaging.hpp, fed by the caller with frame
counts and time; agc_adaptive_staging covers keeping the faster mode,
frame noise, the back-off cap, a scene change and the share threshold.

AI-assisted. Tested by me on my own machine.
2026-10-30 16:38:05 +01:00
Adrià d09e7a46e9 fix(libScePad): resolve the merge with ShowPadStatus in the volume actions 2026-10-30 16:29:56 +01:00
MarcZX10 737bcb8f69 refactor(libScePad): own the shared host volume state
The volume, mute and focus state that libSceAudioOut applies and libSceVideoOut changes now lives in libScePad, which both libraries already link, instead of in libSceAudioOut. The tests that compile the state directly and the environment reference follow the file.
2026-10-30 16:29:55 +01:00
MarcZX10 31e13ce13f docs(env): list ANYPS5_VOLUME and ANYPS5_MUTE_ON_FOCUS_LOSS
Both are read in HostVolumeState.cpp when video output starts, and both refuse an invalid value with an error naming the variable.
2026-10-30 16:29:55 +01:00
MarcZX10 0b30ab25ac docs(env): APS5_TEST_DIRECT_READBACK is a presence switch
Old claim: the Kind column says "set", a label no other row uses.

What the code does: the test only checks whether the variable is set
(std::getenv(...) != nullptr); the value is not read.

Permalinks at audited SHA b1b5353cfc:
- https://github.com/boykopovar/AnyPS5/blob/b1b5353cfcee098ed17e3ba8a6e616bee97c9215/core/libs/prx/libSceAgcDriver/tests/execution/LayeredVolumeDraw.cpp#L273
2026-10-30 14:20:21 +00:00
MarcZX10 264e371850 docs(dev): document two test-only environment names found by the scanner
The corrected scanner now finds two names that the table did not list, both read by test programs: ANYPS5_GUEST_ENV_TEST_4C27 at core/libs/tests/GuestEnvironment.cpp#L29 (https://github.com/boykopovar/AnyPS5/blob/b1b5353cfcee098ed17e3ba8a6e616bee97c9215/core/libs/tests/GuestEnvironment.cpp#L29) and APS5_LOAD_EXEC_STANDARD_ERROR at core/libs/tests/GuestSystemServiceLoadExecStandardError.cpp#L72 (https://github.com/boykopovar/AnyPS5/blob/b1b5353cfcee098ed17e3ba8a6e616bee97c9215/core/libs/tests/GuestSystemServiceLoadExecStandardError.cpp#L72). Both are read by getenv through a local or constant name, which the old scanner did not follow, so --check reported no undocumented name before this change.
2026-10-30 14:08:37 +00:00
MarcZX10 31d5d4e297 docs(env): document ANYPS5_PAD_PORT0_STATE
Adds the row for the port 0 connection mode read when the pad input starts.
2026-10-30 14:02:55 +00:00
Adrià cc7b82ac6f Merge pull request #12702 from MarcZX10/feat/overlay-pad-status
feat(overlay): show controller status on demand or on connect, disconnect and battery drop
2026-10-30 13:05:28 +01:00
Dean 957970b247 Merge pull request #12147 from milescoviello/fix/prebuild-compile-budget
fix(agc): bound the SPIR-V that background compute pipeline builds compile at once
2026-10-30 22:20:34 +13:00
Adrià a36ff7f47e Merge pull request #12584 from Biologisten/fix/audio-pad-speaker-mute
feat(audio): add controller speaker fallback override
2026-10-30 07:12:28 +01:00
Adrià e4f5516fd6 Merge pull request #12974 from MarcZX10/feat/host-game-mode
feat(libkernel): opt-in host game mode request (APS5_GAME_MODE)
2026-10-30 06:36:04 +01:00
MarcZX10 38184b17ca docs(env): document ANYPS5_PAD_STATUS
The row names the variable, its values (1 shows the controller status
panel for 4 s on a connect, a disconnect or a battery drop to a lower
class; unset or 0 never shows it by itself) and that any other value is
refused, as the environment reference requires for every name the code
reads.
2026-10-30 05:54:56 +01:00
Adrià 84e114e4eb Merge pull request #12715 from MarcZX10/feat/log-to-file
feat(libc): copy the runtime log into a file with ANYPS5_LOG_FILE
2026-10-30 05:51:34 +01:00
Adrià 0c9c5db748 Merge pull request #12690 from MarcZX10/feat/host-system-report
feat(agc): host system report and an actionable missing-Vulkan-feature message
2026-10-30 02:52:18 +01:00
Adrià d0cf19b2cb Merge pull request #12233 from beardsciences/fix/nvidia-mesh-window-buffer
fix(shader): keep mesh register windows out of local memory on NVIDIA
2026-10-30 02:31:36 +01:00
Adrià f6fddd60d8 Merge pull request #9243 from fisherjoey/perf/draw-cache-indirect-admission
perf(agc): cache CPU-path indirect draws behind APS5_DRAW_CACHE_INDIRECT
2026-10-30 01:51:25 +01:00
Adrià 7a225bb303 Merge pull request #12686 from MarcZX10/feat/pad-rumble-intensity
feat(libSceVideoOut): add ANYPS5_RUMBLE to scale or turn off host controller vibration
2026-10-29 23:46:17 +01:00
MarcZX10 1b96282a6c docs(env): list APS5_GAME_MODE in the environment reference
Name the values, the Linux and macOS mechanisms, that only a missing
library is silent and only in auto, and that no failure is fatal.
2026-10-29 17:15:29 +00:00
Christian 6f79055a00 fix(shader): keep mesh register windows out of local memory on NVIDIA
On NVIDIA's proprietary driver, function arrays that live in local memory
and are read under a data-dependent branch return wrong values in
subgroups 1-3 of a mesh workgroup; subgroup 0 is correct. A wave64
geometry program whose relative addressing keeps its VGPRs in the vector
window therefore loses register writes in every wave but the first. In
the clipping geometry program of Sony's PS5 PSP emulator (PPSA07550) the
empty waves never cleared their candidate primitive slots and wrote
degenerate triangles over wave 0's, so the 3D menu drew spikes.

On that driver a mesh program's window now lives in a device-local
storage buffer of 256 workgroup slots of 65536 dwords, claimed through a
per-slot lock and released after the final barrier. The pool is created
before the first draw that uses it records anything, and its header is
zeroed in a batch of its own that is submitted and waited for; the pool
is published only after that wait, and a failure releases it. Direct
register accesses keep one function variable per register; a direct
store also writes the buffer when a buffer read can see it, relative
reads load the buffer, relative writes store only to it, and a direct
read that may follow a relative write loads the buffer and refreshes the
variable. A buffer entry is zeroed only when a buffer read can see it
before a write. APS5_NO_MESH_WINDOW_BUFFER=1 keeps the arrays.
2026-10-29 08:56:39 -04:00
Adrià 5454cd2e45 Merge pull request #11130 from imellag/perf/macos-mimalloc
feat(libs): let relinked macOS games opt into mimalloc
2026-10-29 12:58:23 +01:00
Adrià b62989b8bb Merge pull request #12432 from kiansaeidnia/feat/agc-dump-shaders-address-filter
feat(agc): APS5_DUMP_SHADERS takes a list of program addresses
2026-10-29 11:23:04 +01:00
Adrià 071ecaba53 Merge pull request #9723 from Sam-mon7/feat/sample-worker-queue
feat(agc): select the queue worker to sample
2026-10-29 10:40:44 +01:00
Adrià 8ab0b15bb4 Merge pull request #9626 from MarcZX10/codex/6139-bounded-registration-preparation
fix(agc): bound registered shader preparation memory
2026-10-29 10:40:33 +01:00
MarcZX10 c78f142772 docs(env): list ANYPS5_LOG_FILE in the libc environment table
The variable is read by the log copy in libc; the row gives its kind,
that an empty value counts as unset, the appending behaviour and the
startup error.
2026-10-29 05:57:24 +01:00
XairRrR 1c82f56296 docs(environment): list _wgetenv among the readers of environment names
The opening paragraph of docs/dev/ENVIRONMENT.md lists the calls through
which the code reads environment names, and so the reads that the
Conventions check holds to a row. It omits _wgetenv with a wide literal.
tools/env_reference.py has recognised that form since 65da8ac106, and the
code reads nine names through it on Windows, among them
ANYPS5_SHADER_CACHE_DIR, ANYPS5_SCREENSHOTS and APS5_DUMP_SUBMITS. The
paragraph now names _wgetenv beside GetEnvironmentVariableW.

AI-assisted: yes
2026-10-29 05:23:51 +01:00
MarcZX10 93d823f523 docs(env): list ANYPS5_HOST_REPORT in the environment reference
The variable is read in VulkanDevice.cpp; the row gives its values and the
refusal of any other.
2026-10-29 02:07:11 +00:00
MarcZX10 6dc9d58c2b docs(env): document ANYPS5_RUMBLE
List the controller vibration strength variable in the libScePad table with its default of 100, the paths it covers, the adaptive trigger effects it does not, and the error an invalid value raises.
2026-10-29 02:06:36 +00:00
Biologisten 315050d000 fix(audio): reject invalid APS5_PAD_SPEAKER_FALLBACK_DB values and read the gain once
A set-but-invalid value, including an empty one, a non-finite number, a
number outside -60 to 0 or trailing text, stops the title with an error
naming the variable and the value instead of silently keeping 0 dB. The
gain is parsed once when the AudioOut2 context is created, kept in the
context and passed to the mix loop, so the audio thread never reads the
environment.

The one-read rule is pinned end to end: a play that changes the variable
to a value that would stop the title after the context was created keeps
the parsed fold and never re-reads the environment.
2026-10-29 00:16:16 +01:00
Biologisten 84b5542fdc feat(audio): add controller speaker fallback override
Add APS5_PAD_SPEAKER_FALLBACK_DB for AudioOut2 controller-speaker ports
folded into the main mix when no controller speaker is present. The
default 0 dB keeps the existing unity mix; mute removes the fallback
copy so a title's own main-port copy is heard instead.
2026-10-29 00:16:16 +01:00
Adrià FranchandClaude Sonnet 5.5 949c9cf477 docs(env): point APS5_DRAW_CACHE_INDIRECT at the file that reads it
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-28 16:13:29 -06:00
Joey Fisher 898083cae3 perf(agc): cache CPU-path indirect draws behind APS5_DRAW_CACHE_INDIRECT
cacheDrawStages never admitted a draw an indirect packet runs on the CPU
path, so a title whose draws are mostly DRAW_INDEX_INDIRECT packets with
a patched user word the vertex program reads as a value missed the draw
cache on nearly every lookup whatever its size. On Demon's Souls 97 % of
the draw packets are such draws and the hit rate stayed at 9 % with
APS5_DRAW_CACHE_ENTRIES=32768.

APS5_DRAW_CACHE_INDIRECT admits them. A hit reuses the fragment stage
and skips the first vertex pass; the stage whose user word the record
patches is still re-materialized per record, as the hit path already
provided for.

Tested: agc_driver_draw_cache_reuse_indirect (three DRAW_INDIRECT draws
patching an unfolded user word: one insert and one hit with the knob,
none without), the other draw_cache_reuse, key_miss, register_key and
draw_cache_relocation tests on lavapipe and an RTX 5070 Ti.
2026-10-28 16:13:29 -06:00
Adrià d4cb89300f Merge pull request #12354 from Queuse/codex/document-loop-guard-limit
docs: clarify the shader loop guard limit
2026-10-28 14:58:00 +01:00
Emanuele 4c75091972 feat(libs): let relinked macOS games opt into mimalloc 2026-10-28 14:50:31 +01:00
Adrià bd15a91f99 Merge pull request #11696 from Astronaut10/perf/agc-shape-memo
perf(agc): repeat a draw shape's resident targets and pipeline instead of looking them up again
2026-10-28 14:49:03 +01:00
Adrià ca814b7bfa Merge pull request #12094 from MarcZX10/docs/environment-value-kinds
docs: correct kinds, defaults and sources of thirteen environment variable rows
2026-10-28 14:47:33 +01:00
Adrià bf31ed6c3f Merge pull request #12091 from MarcZX10/docs/environment-reference-accuracy
docs: correct eleven rows of the environment variable reference
2026-10-28 14:47:22 +01:00
KianandClaude Opus 5.5 ae305dfd5d feat(agc): APS5_DUMP_SHADERS takes a list of program addresses
A comma-separated list of hex program addresses (optional 0x prefix) now
writes only those programs' requests, so one expensive shader can be
captured without serializing every request a title prepares. Any other
value, such as 1, keeps writing every request. A filtered-out program
returns no name, so diagnostics never point at a file that was not
written, and it stays eligible for a later list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 23:26:48 +10:00
Queuze f5a61dc3c5 docs: clarify the shader loop guard limit 2026-10-28 07:27:36 -03:00
Cesar MoraandClaude Opus 5.5 2b349ff156 perf(agc): repeat a draw shape's resident targets and pipeline instead of looking them up again
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 08:33:40 +01:00
Adrià fddf0ffb75 Merge pull request #9129 from EagleBearerYS/fix/agc-draw-cache-byte-budget
fix(agc): bound the draw cache by bytes
2026-10-28 08:07:42 +01:00