Commit Graph
12196 Commits
Author SHA1 Message Date
Dean Galvin 441ff87188 fix(agc): give a depth-remapped vertex shader its push constant stage
A remapped vertex shader reads the scale and offset from the push block, but
the pipeline's push constant stages only counted programs with push data of
their own, so a shader with none got no stage in a non-GPL layout and its
scale and offset never arrived. The result now says it reads them, and the
push stages include the vertex stage for it. The draw test gains a fetchless
remapped vertex shader with no push data.
2026-10-18 22:51:26 +13:00
milescovielloandClaude Opus 5.5 3fdef48e54 perf(shader): mark live values of a reclaimed program without a hash set
IrProgram::ReclaimUnusedValues put every live value into an
unordered_set, one allocation each, and looked every value of the
program up in it again. Values enter the program only through
CreateValue, which numbers them with nextValueId, so an id names at
most one of them. The marks of those values now live in a vector
indexed by id, after a check that the id's owner is the same pointer.
A value the program does not own, such as one in the resource plan's
value storage, which may reuse an id, still goes into a set. The values
kept and removed are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 09:47:56 +00:00
cadenasynysterandClaude Opus 5.5 9f3e867eec feat(libc): implement std::__throw_bad_variant_access
Onimusha: Way of the Sword (PPSA27836 01.000.001) imports
_ZSt26__throw_bad_variant_accessv (9G6z-nF6njg) from libc, and its
bundled libc.prx does not export it, so the title fails to load with
an unresolved import.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GtXavMkgCTCdmRpweviHcQ
2026-10-18 11:41:56 +02:00
Crimson cb28abeb89 fix(shader): fault on misaligned 64-bit device-memory LDS atomics 2026-10-18 12:31:11 +03:00
Yunus Shaikh 0700f72070 test(agc): compare a depth recipe's replay with its recorded draw where depth reads back at other locations 2026-10-18 02:29:39 -07:00
Yunus Shaikh f90ffa8795 test(agc): split the sample order tests' depth location counts by row 2026-10-18 02:29:38 -07:00
Dean 9caecfd2d5 Merge pull request #6881 from Scramblrrrr/codex/runtime-volume-bias-poison-main
fix(shader): poison unsupported biased volume table entries
2026-10-18 22:27:05 +13:00
Dean 09127eada2 Merge pull request #7273 from mazen320/fix/windows-junction
fix(libkernel): report Windows directory junctions
2026-10-18 22:22:54 +13:00
Dean 1e949afe2c Merge pull request #7372 from pushkarreddyy/fix/json2-parser-null-text
fix(json2): return parse error on null text or zero size
2026-10-18 22:22:50 +13:00
milescovielloandClaude Opus 5.5 c5c932ba18 perf(shader): skip masked-select families that have no candidate select
MaskedSelectEliminator::Eliminate runs UnreadLanes::Remove for four
mask families every round, and each Remove walks every instruction of
the program before it knows whether any select belongs to its family.

removeFullWaveSelects now also collects the selects of Once-region
blocks during the walk it already does. A family runs only when one of
them is still in its block, has uses and has a mask of that family,
checked when the family's turn comes. That is the test Remove starts
with, so a skipped family would have returned 0 without changing the
program, and the result is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 09:21:11 +00:00
Dean Galvin 5a5f2b42fd test(agc): read the prepared module's specialization constants from the artifact's SPIR-V 2026-10-18 22:14:53 +13:00
Nithishvelan M ffd24c8185 test(libSceSaveDataDialog.native): cover uninitialized open and null arguments in guest test 2026-10-18 14:40:23 +05:30
David f982c1c5bd test(agc): check where the barycentric tessellation stages keep clip distances 2026-10-18 13:08:53 +04:00
David 6491e12466 fix(shader): keep clip distances in the blocks between the barycentric tessellation stages
#7330 passes the vertex clip distances as separate ClipDistance arrays so
the control stage's input matches the vertex shader's output. SPIRV-Cross,
which MoltenVK uses, cannot translate a separate ClipDistance array in a
tessellation evaluation stage, so on MoltenVK every pipeline of the
barycentric tessellation route failed to compile. The control stage now
reads the separate array the vertex shader writes and passes it on inside
its per-vertex block, which the evaluation stage reads and writes.
2026-10-18 13:08:53 +04:00
Ondra97 393506c161 fix(libkernel): account for fixed flexible memory replacements 2026-10-18 11:07:14 +02:00
Nithishvelan M 0585eccbca test(libSceConvertKeycode): cover null character buffer in guest test 2026-10-18 14:35:58 +05:30
Dean cb1d6e5bd6 Merge pull request #7123 from thuanquang/fix/guest-frame-chain-zero-record
fix(libkernel): end guest thread, fiber and context frame chains at a zero record
2026-10-18 22:04:31 +13:00
Nithishvelan M 41ddc4b8b9 test(libSceContentDelete): cover null param and uninitialized terminate in guest test 2026-10-18 14:34:27 +05:30
Dean 04b55dda2e Merge pull request #6406 from MarcZX100/codex/preserve-linux-gnu-segments-6394
fix(relinker): preserve GNU stack and RELRO headers on Linux
2026-10-18 22:04:27 +13:00
AlxcBTW 06ca6a066b fix(libScePad): smooth a slow-reporting mouse over its measured report interval 2026-10-18 11:00:03 +02:00
AlxcBTW 367d46e480 feat(libScePad): bind L2 to R and the first mouse side button 2026-10-18 11:00:02 +02:00
AlxcBTW 53af7be7ee feat(libScePad): toggle mouse capture with F7 beside the middle button 2026-10-18 11:00:02 +02:00
AlxcBTW 438e1baa3e feat(libScePad): ramp keyboard-driven triggers over TriggerRampMs 2026-10-18 11:00:01 +02:00
AlxcBTW 64a9979268 feat(libScePad): ramp keyboard sticks over KeyboardRampMs 2026-10-18 11:00:01 +02:00
AlxcBTW a0f14cdf14 feat(libScePad): tilt keyboard sticks partially while a modifier key is held 2026-10-18 11:00:01 +02:00
Maz bd0caa451b Merge upstream/main into fix/windows-junction
Keep the drive-absolute junction note and the updated setitimer debt from main.
2026-10-18 12:57:10 +04:00
Maz 7212dae71a fix(libkernel): reject Windows volume mount points in junction reads
A mounted folder uses the junction reparse tag and would otherwise be returned as a relative Volume GUID path. Only a drive path is reported, through the absolute-link text helpers.
2026-10-18 12:53:48 +04:00
Dean cdb7ed0355 Merge pull request #7350 from T3cm0/bionic/err-warn-psignal
feat(libSceLibcInternal): implement err, warn, psignal and sys_signame
2026-10-18 21:52:15 +13:00
AlxcBTW 0d704d32f6 perf(agc): skip the label run's leading barrier right after a render pass end 2026-10-18 10:50:38 +02:00
Maz e964264d23 Merge branch fix/windows-absolute-symlink into fix/windows-junction
Keep the junction reader and try the absolute symbolic-link reader first.
2026-10-18 12:50:08 +04:00
T3cm0andClaude Opus 5.5 3fd2a2fe23 feat(libSceVrTracker2): answer as the console's module before initialization
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 03:50:03 -05:00
AlxcBTW 91033ce36f perf(agc): skip the staging and write-back leading barriers a trailing barrier already covers 2026-10-18 10:50:02 +02:00
Scramblrrrr 5a35a71116 feat(videoout): allow opting out of HDR presentation 2026-10-18 05:43:09 -03:00
Jan ŠléglandClaude Opus 5.5 5c29d125e1 fix(shader): leave out the all-zero position distance when guest distances fill all eight
A vertex or tessellation evaluation program whose PA_CL_VS_OUT_CNTL
enables eight guest clip distances (CLIP_DIST_ENA 0xff, both distance
vectors) failed to compile with "guest clip distances plus the all-zero
clip position distance exceed 8 clip distances", at registration and at
the draw. A program whose guest clip and cull distances together take
eight (four of each, say) compiled, but its draw failed in the pipeline
validator with "more than eight clip and cull distances in one shader".

The all-zero position distance is now added only while the guest clip and
cull distances leave one of the eight slots free. Otherwise the program
keeps its guest distances, and a primitive with a vertex at clip position
(0,0,0,0) is not removed; the EmitSetAttribute debt entry says so.

agc_position_invariance compiles one program with seven and eight clip
distances, and with three and four clip distances beside four cull
distances: the clip distance arrays are 8, 8, 4 and 4, so the all-zero
position distance is in the first and third only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 10:40:52 +02:00
Dean Galvin bfe5a3fee3 test(agc): check the prepared module carries only the depth remap mode as a specialization constant 2026-10-18 21:40:24 +13:00
Dean Galvin 69c7efa9d3 test(agc): do not expect the remap mode as a specialization constant in a direct build 2026-10-18 21:38:46 +13:00
Ondra97 8627ac7965 test(libkernel): cover direct replacement flexible budget 2026-10-18 10:36:27 +02:00
Scramblrrrr 107482caed chore: merge current shader registry main update 2026-10-18 05:21:08 -03:00
SP4C3B4R-8andClaude Opus 5.5 a714d1b370 fix(agc): retire a depth surface on a storage write only when the write covers a whole plane
Since #454 a written storage image retires every depth surface its described size overlaps, and a retired
surface reads guest memory, which never received the depth image. PPSA15304 writes storage views that
overlap the scene depth without covering it (the largest reaches 0x11e0000 of its 0x12b0000 depth plane),
so the whole depth was thrown away and the scene came out almost black.

A written storage view now retires a surface only when the bytes its written level holds, per array layer
or depth slice (CoveredMipBytes, whole tile blocks, no padding), cover the surface's whole depth or stencil
plane; a partial overlap leaves the surface alive, as before #454. Thick 3D views hold no whole block per
slice and retire nothing. agc_driver_depth_storage_reuse now checks that a half-width write keeps the
surface sampled from the depth image and that a write over the whole plane retires it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GN8FJFTedayRXLHythXkZ4
2026-10-18 10:18:12 +02:00
Lberonio 241429c45c fix(agc): clear a queue's flip event latch once its own interrupts stop
A queue that delivered an end-of-pipe interrupt from its own release stopped
delivering the flip's event for the rest of the run, so a title that raises a
release interrupt once and then waits on the flip event never saw it again.

Count the flips a queue has taken since its last delivered release interrupt:
four consecutive flips keep the latch, a fifth clears it and raises the event,
so the queue recovers within five flips. Gran Turismo 7 (PPSA01317) pairs two
flips with one release interrupt per frame, which stays under the limit, and a
title that flips without further release interrupts recovers.

Extend agc_driver_eop_interrupts: a latched queue still delivers its own
releases, flips keep reaching the video output while their event is suppressed,
an event returns once the latch clears, and a release followed by two flips
raises none.
2026-10-18 11:13:59 +03:00
Dean e5c2b3c325 Merge pull request #7288 from milescoviello/perf/shader-registry-chunks
perf(agc): share unchanged shader registry chunks between published versions
2026-10-18 21:12:00 +13:00
Scramblrrrr fd0d1f172d chore: merge current main into volume table rejection fix
# Conflicts:
#	core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
2026-10-18 05:09:40 -03:00
David b37ca1961f Merge remote-tracking branch 'origin/main' into feat/shader-barycentric-tessellation-last-vertex
# Conflicts:
#	core/shader/recompiler/SpirvBackend/src/BarycentricGeometryShader.cpp
2026-10-18 12:06:43 +04:00
Dean Galvin d6f03d5f17 fix(agc): close the anonymous namespace in the depth range remap test 2026-10-18 21:06:17 +13:00
T3cm0andClaude Opus 5.5 53a1fe47d6 feat(libSceLibcInternal): implement err, warn, psignal and sys_signame
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 03:02:13 -05:00
Dean ed01d79d3c Merge pull request #7271 from gjonn/feat/agc-format43-native-repack
feat(agc): sample texture format 43 through a lossless B10G11R11 copy
2026-10-18 20:51:59 +13:00
Yunus Shaikh 0623263512 fix(agc): keep a settled import compared while a storage image overlaps it
Since #6678, a Windows host import under 1 MiB returns to the write watch
once its deferred settle read has completed, and GuestMemory::Rewatch
stamps every block of it as a CPU store. The return waited only while
storage results were pending over the import. A storage image can take
its generation before the stamp and have results pending only after it:
an image's first upload takes its generation and then imports its block,
a recorded draw marks its targets pending once it is recorded, and the
settle is polled at the import lookups between the two. The image's
next refresh then takes the stamp for a CPU store over its results,
drops them and uploads the guest bytes again, so the GPU's output is
lost. On an RTX 3070 this also splits the first two draws of
agc_driver_address_passes into two passes.

A settled import that a live storage image overlaps now stays compared,
as every import under 1 MiB was before #6678. Imports with no image over
them still return to the write watch. Keeping the import compared, rather
than waiting for the image to go, checks each settled import against the
live images once instead of at every poll. The [buffers] line counts the
imports kept compared.

agc_import_settle_storage_image makes an image whose first upload imports
its block, waits for the settle read, clears the image on the GPU, then
refreshes and stores it. On the old code the refresh drops the clear.
2026-10-18 00:47:31 -07:00
TamaleroandClaude Opus 5.5 9f5efd4f97 test(libkernel): pass the release under test with its declared calling convention
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 00:46:13 -07:00
Romans Pokrovskis a2d6c16bcd fix(audio): route legacy vibration PCM with per-port timing 2026-10-18 10:07:29 +03:00
Dean 1c523bdb48 Merge pull request #6437 from fma-rc/fix/libkernel-amm-range-256
fix(libkernel): report a 256 GiB AMM range starting on a 64 GiB boundary
2026-10-18 20:03:09 +13:00