Commit Graph
14017 Commits
Author SHA1 Message Date
Adrià 153d5d469d Merge pull request #5519 from Zinebyte/fix/import-audit-module-sidecars
fix(tools): ignore non-module sidecars in import audit
2026-10-14 23:39:08 +02:00
Adrià Franch 1df5ae9a33 docs(debt): cube faces read through DIM 2D blend neighbouring faces near the edges 2026-10-14 23:39:07 +02:00
Adrià Franch 55e7118e33 fix(shader): count cubeFaceCompatible in the shader disk cache after the rebase 2026-10-14 23:39:07 +02:00
Adrià FranchandClaude 56bb6377d2 perf(agc): refresh pure data words of a cached draw stage instead of recapturing it
A draw stage whose captured words differ from a cached variant only at pure
data positions (read by the shader as data, never as an address, descriptor
or decode input) is now a hit: the live words are patched into the cached
compiled result, as the dispatch cache's EqualData hits do. The positions are
recorded at insert from the stage's resource capture, minus the words the
draw decode reads. Patched draws take no draw recipe.

APS5_NO_DRAW_STAGE_DATA_HITS=1 turns it off; APS5_VERIFY_DRAW_DATA_HITS=1
builds the stage anyway and throws on any difference. The draw-cache profile
line counts stage data hits and refreshed words.

Co-Authored-By: Claude <[email protected]>
2026-10-14 23:38:22 +02:00
billythemenace2andClaude Opus 5.5 3b96840e68 fix(shader): read cube T#s through DIM 2D image_sample and image_load as face 0
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-14 23:37:33 +02:00
notaxeltvandCursor e90616b16c feat(libc): ignore name in _Cnd_init_with_default_name_override
Absent PPSA34015 import; forward to _Cnd_init like Ampr's named init.

Co-authored-by: Cursor <[email protected]>
2026-10-14 23:35:41 +02:00
Adrià 3f0936a4d3 Merge pull request #5522 from Nesyth/perf/agc-split-storage-write-back
perf(agc): write back a storage image spanning adjacent registered ranges on the GPU through each range's import
2026-10-14 23:35:13 +02:00
Ondra97 241053ad9f fix(libkernel): preserve condition signals across cancellation 2026-10-14 23:34:45 +02:00
Dean Galvin d16745be14 docs(agc): record the accepted VGT_SHADER_STAGES_EN 0x02002008 as debt 2026-10-15 10:33:50 +13:00
mitul72 e52e140f5c fix(shader): read explicit-LOD 2D samples through 1D T#s as measured
A 2D image_sample_l through a 1D T# now takes the 1D runtime mode, as
image_sample_lz already does, instead of failing the runtime image
interface. Measured on RDNA2 (gfx1036) with tools/hw-oracle against the
same sample with DIM 1D: u inside, on and past the edges, v of 0, 0.5, 1,
-0.25 and 3, LOD -1 to 6 on a 5-level R32_FLOAT texture, point, linear and
linear-mip filtering, wrap, clamp and border addressing, and HEIGHT or
DEPTH 3. All 4725 rows matched: the 1D T# decides the addressing and v is
ignored.

The execution test samples a 5-level 1D T# with distinct mip contents at
LODs -1 to 6, fractional ones included, with u inside, on and past the
edges, under point filtering with wrap and clamp and linear filtering with
linear mips and wrap, clamp and border addressing. Every result must match
the same image_sample_l with DIM 1D bit for bit; point-filtered results
must also be the expected texel of the expected level, and linear-mip
results the blend of the two levels the LOD selects.
2026-10-15 10:33:22 +13:00
mrfelek 495b4f50df feat(libSceJson2): implement sce::Json::String find, rfind, substr, append, clear, reserve and npos 2026-10-15 10:32:57 +13:00
Adrià f59d91ffc3 Merge pull request #494 from MichonGoddijn231849/perf/draw-data-hits
perf(agc): draws that differ only in user data reuse their shape's decode and stages
2026-10-14 23:32:50 +02:00
f1c786de2f test(shader): pin GPU-selected formatted loads for every buffer format
agc_driver_gpu_buffer_format loads the V#'s records and word3 from memory
and moves them into SGPRs with v_readfirstlane, so the recompiler sees a
GPU-selected descriptor and the load goes through the format table. It
checks buffer_load_format x/xy/xyz/xyzw and d16_xyzw on two lanes for
formats 1-77, selectors 0/1/4-7 on 1-, 2- and 4-component formats, loads
with a component past NUM_RECORDS, and that formats 0 and 78 stop the
invocation before its stores.

The expected values were captured on the format switch (2d3a970da) and
are identical with the table.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Gemini <[email protected]>
2026-10-15 10:32:47 +13:00
EdouardSenceandClaude Opus 5.5 d9544111d7 fix(shader): decode a GPU-selected formatted load from a format table
A formatted load whose V# is selected on the GPU emitted all 77 format
cases in its shared function, and drivers that inline every function,
like RADV, copied all of them into each call site. The load now reads the
format's component count, widths, byte and bit offsets and type from a
constant table and runs one path for its four components, with the
existing conversion of each (type, width) pair selected at run time.
Stores and loads through a prepared V# keep the format switch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 10:32:47 +13:00
MichonandClaude Opus 5.5 a17f25b5ae test(agc): CB resolves into 4 KiB and 64 KiB standard targets
The resolve decode keeps a SW_4KB_S, SW_64KB_S and SW_64KB_R_X destination's tile mode. An execution case
(ctest agc_tiled_resolve) fast-clears a 4x source through its CMASK and resolves it into each of those
targets, reading the resolved color back from guest memory; a linear destination still throws.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-15 10:32:36 +13:00
MiniRML 0f0aecea85 fix(tools): cache oracle targets per visible device selection 2026-10-14 14:32:08 -07:00
MichonandClaude Opus 5.5 620676bf9d fix(agc): CB resolve into any tiled color target
A multisample resolve writes into a resident 4 KiB or 64 KiB standard target as well as a 64 KiB render-target one (GTA V's fidelity mode resolves into a SW_64KB_S target).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-15 10:32:07 +13:00
SorabandClaude Opus 5.5 404075b0a6 perf(agc): compare sampled snapshots outside the write watch only after a write-watch mark
On Windows every direct host import leaves the write watch, and a sampled
texture snapshot over it was compared with guest memory at every lookup:
its generation stays 0, so UnchangedSince never holds. ASTRO BOT
(PPSA21564) compared about 31 GB per 10 s at the title.

The lookup now keys such a snapshot by UntrackedHint, NewestStamp,
ForgetSerial and the recorder's newest write note, taken before the
snapshot is read or compared, as StorageTexture::compareUntracked does,
and skips the compare while the key is unchanged and no recorded work
writes the surface. The byte compare still decides after any mark.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 23:30:29 +02:00
MiniRML 0103e485d2 fix(tools): encode filenames in PR overlap links 2026-10-14 14:29:41 -07:00
Nahid DelicandClaude Opus 5.5 f7b2ebd8b4 fix(shader): allow 32 sampler pairs per shader
A pixel shader of MXGP 26 (PPSA30839) uses 17 samplers, over the limit
of 16 sampler pairs. The sampler heap now holds 64 descriptors, ShaderData
grows by 32 sampler metadata records and the runtime ABI version moves
to 13.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 23:29:15 +02:00
Zinebyte 875a159f64 fix(relinker): preserve weak imports in Linux guest modules 2026-10-14 17:26:22 -04:00
eljackjoestar-cmd 76eb60af61 fix(shader): decode forced degamma on biased RGBA8_UINT samples 2026-10-14 23:25:53 +02:00
MiniRML 99f7f6fe06 fix(tools): reject empty hardware oracle input files 2026-10-14 14:22:51 -07:00
notaxeltvandCursor 70c080458a feat(libc): raise logic_error::_Doraise and _Xruntime_error
Co-authored-by: Cursor <[email protected]>
2026-10-14 23:21:34 +02:00
Adrià 4808d9c203 Merge pull request #5542 from winstrex/perf/bda-table-hits
perf(agc): share snapshot copies and the BDA table of repeated address-based builds
2026-10-14 23:17:47 +02:00
Yossi Yadgar e4d0e2dc77 docs(debt): narrow the last-vertex strip entry to vertex slot reads 2026-10-15 00:15:10 +03:00
Yossi Yadgar e8ab547b2c test(agc): check the strip guard on interpolated and slot-read inputs
A pixel shader that interpolates its input with v_interp_p1/p2 compiles
to a per-vertex input without vertexOrder and passes a last-vertex
strip; the same input read through v_interp_mov P10 is vertexOrder and
still throws on a strip, not on a list. The synthetic matrix gets
vertexOrder as a third axis. The first check fails with the guard on
perVertex, the second without the v_interp_mov record.
2026-10-15 00:15:10 +03:00
Yossi Yadgar 7e624831a9 fix(agc): refuse last-vertex strips only for reads of a vertex slot
With fragmentShaderBarycentric (RADV, NVIDIA), v_interp_p1_f32 and
v_interp_p2_f32 are translated as P0 + I * P10 + J * P20 over the
per-vertex values, so every smooth input became per-vertex. A triangle
strip drawn with PROVOKING_VTX_LAST then threw "last provoking vertex
with explicit per-vertex triangle-strip interpolation is unsupported"
for any shader that interpolates, which stops OliSe Player (PPSA01153)
and RetroArch's ES-DE frontend (PPSA99169), both ps5-opengl titles
whose shaders use only v_interp_p1/p2.

I and J come from gl_BaryCoordKHR[1] and [2], in the same vertex order
as the pervertexEXT values, so the result is b0 * v0 + b1 * v1 + b2 * v2
whatever order the device gives an odd strip triangle. Only a shader
that reads a slot itself depends on that order. The translator now
records the inputs read through v_interp_mov_f32 or 16-bit
interpolation, FragmentParameter carries that as vertexOrder, and the
strip check refuses those alone. 16-bit interpolation would cancel out
the same way but has not been checked, so it stays refused.
2026-10-15 00:15:10 +03:00
Ondra97 eb8146b734 fix(libc): skip guest exit handlers when closing the host window 2026-10-14 23:14:16 +02:00
fdfawef324andClaude Opus 5.5 ce0679c03b fix(libkernel): use precise waits for select and poll on pipes on Windows
On Windows, select over pipes polls readiness in HostPoll and sleeps
std::this_thread::sleep_for(1 ms) between rounds, and poll with pipes
but no native sockets sleeps sleep_for(slice). winpthreads ends these
sleeps on 15.6 ms timer ticks (#1471), so a guest select or poll with a
short timeout on an idle pipe waits about 15 ms per call instead of its
timeout, and a longer wait checks the pipes only every 15.6 ms.

Both paths now sleep with PreciseSleepUntil. Each sleep requests at
most 1 ms and ends no later than the deadline; the old HostPoll sleep
could pass its deadline by a whole tick. poll on pipes also stops
spinning through the last partial millisecond before its deadline,
where the remaining time truncated to 0 ms and no sleep was made.
Infinite timeouts still sleep 1 ms per round.

The pipes are now checked about every 1.5 ms instead of every 15.6 ms:
a pipe that becomes ready is noticed sooner, and a thread blocked on an
idle pipe wakes about ten times as often. A 1 ms poll on an idle pipe
returns after about 1.5 ms instead of spinning for 1 ms.

guest_poll times 20 polls with a 2 ms timeout on an empty pipe read end
and guest_select times 20 selects with a 1 ms timeout on it; each set
must take less than 200 ms. A 1 ms poll does not reach the old sleep,
because the remaining time truncates to 0 ms and the old loop spins
until the deadline, so the poll check uses 2 ms. On Windows Server 2025
both sets took 312 ms before this change and about 50 ms and 30 ms
after it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 17:14:11 -04:00
MiniRML 4a9f7ac565 fix(tools): preserve Unicode paths in NID CLI output 2026-10-14 14:11:42 -07:00
Adrià 0ae1deb850 Merge pull request #5906 from TheAggie/perf/agc-draw-snapshot-reuse
perf(agc): reuse draw snapshots across draws that nothing wrote between
2026-10-14 23:10:06 +02:00
Dean Galvin 7aae95733c test(agc): word the pipeline cache file skip as a device limitation
tools/check_skips.py accepts only device-limitation skip reasons, so the Linux job rejected this one.
2026-10-15 10:08:27 +13:00
MiniRML 2df4c76f5b fix(tools): validate inner ELF metadata before unwrapping SELF 2026-10-14 14:07:38 -07:00
snipeTRandClaude Opus 5.5 5b697f8c47 feat(opus): decode at 8, 12, 16 and 24 kHz
Accept every creation rate listed by the public decoder research in
libSceOpusDec and libSceOpusCeltDec, resampling FFmpeg's 48 kHz output.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 00:06:48 +03:00
milescovielloandClaude Opus 5.5 d47651847d fix(pad): accept vibration mode 5
Crimson Desert (PPSA25286) calls scePadSetVibrationMode(handle, 5)
at start-up, and main rejects any mode above 3 with
SCE_PAD_ERROR_INVALID_ARG (0x80920001). The title then carries on
with the call failed.

The modes are not documented. SharpProspero names 1 (advanced) and 2
(compatible); mode 3 was accepted for PPSA21480. The call now also
accepts 5, which a shipped title passes, and keeps rejecting the values
no title has been seen to use (4, 6 and above). The mode is stored as
before and has no other effect.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-14 21:05:40 +00:00
Adrià FranchandClaude 94ea410c9e perf(agc): admit a draw key at its first sight when its shape is known
Since #5216 a key gets its entry at its second sight, so a shape whose
user words change on every draw never got an entry and its data-only hits
never started. A key whose shape was seen before but has no entry is now
admitted at its first sight. A shape that already has an entry serves
data-only hits from it, and its new keys are still admitted at their
second sight, so per-draw keys don't churn the cache. Shapes are
remembered in a second sightings table of the same size.

agc_driver_draw_cache_reuse draws three times with new pixel user words
over a cached shape (three data-only hits, the vertex stages reused, no
insert), then three keys of a new shape (the second one is admitted), and
runs again with APS5_VERIFY_DRAW_DATA_HITS=1.

Co-Authored-By: Claude <[email protected]>
2026-10-14 23:03:45 +02:00
David 3a0d2cdbec test(relinker): trap a GS access in a module without a TLS segment
The Windows TLS builder returns early for a module without PT_TLS. A GS access
there must still be trapped; left in place it would read the host's thread
environment block.
2026-10-15 01:02:17 +04:00
David 7b9b91765d test(relinker): cover GS loads, stores and ALU reads trapped in Windows output
Each form converts and is replaced by ud2 and NOP padding of its own length,
leaving the next instruction in place. The forms are the ones Wine's ntdll in
Prospero Win (PPSA99995) uses, plus a register-address form shorter than the
jump an FS access is rewritten with.
2026-10-15 01:02:17 +04:00
David 4ceb020b55 fix(relinker): trap guest GS accesses in Windows output instead of refusing the module
On Windows the host owns GS (the thread environment block), so a guest
instruction that reads or writes through GS cannot be translated the way FS
thread-pointer accesses are. Such an instruction refused the whole module.
Overwrite it in place with ud2 and NOP padding instead, so the module converts
and the instruction reports itself through the crash reporter if it runs.
2026-10-15 01:01:58 +04:00
Mehran ec615c145a perf(agc): skip the register read log while no log is open 2026-10-15 00:00:31 +03:00
notaxeltvandCursor 784cb4d3db feat(libScePlayerSelectionDialog): run common-dialog state machine without UI
Co-authored-by: Cursor <[email protected]>
2026-10-14 23:00:30 +02:00
Adrià fa539dd9ba Merge pull request #5486 from MarcZX100/docs/runtime-param-json
docs: explain required app metadata in runtime layout
2026-10-14 22:58:00 +02:00
Adrià f2aa48a8e2 Merge pull request #5402 from codingreapermaps/feat/agc-fractional-even-partitioning
fix(agc): accept fractional-even tessellation partitioning
2026-10-14 22:57:20 +02:00
JAB-devandClaude Sonnet 5.5 cd95f1a426 perf(libSceSysmodule): cache the unwind region of loaded images on Windows
sceSysmoduleGetModuleInfoForUnwind called VirtualQuery and GetMappedFileNameA on every call. VirtualQuery on a large image section costs time proportional to the section (2 us for 16 KiB, 51 us for 8 MiB, 167 us for 32 MiB), and a title that unwinds exceptions while loading calls it for every frame of every throw.

The region and file name of an address inside an image of the Windows loader's module list are kept per region and used while the loader still reports the same image (base, time stamp and size). Other addresses are queried every time.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-14 22:57:08 +02:00
MiniRML d5547c1b42 fix(tools): parse Windows compile commands without losing backslashes 2026-10-14 13:56:48 -07:00
Adrià ffbc26c7d0 Merge pull request #5264 from hugodearaujo/fix/pad-vibration-mode-errors
fix(libScePad): check scePadSetVibrationMode's arguments in the console's order
2026-10-14 22:56:29 +02:00
Adrià 92b892f15a Merge pull request #5247 from devavijitsingh/feat/web-conversion-recovery
fix(web): remove incomplete folder output on failure
2026-10-14 22:55:41 +02:00
Adrià 799982fac6 Merge pull request #5236 from David-cmrg/fix/systemservice-loadexec-exit-like-shell
fix(libSceSystemService): end LoadExec exit without running guest exit handlers
2026-10-14 22:54:40 +02:00
MiniRML 9936b8b9ee fix(tools): reserve program header space when unwrapping SELF 2026-10-14 13:53:31 -07:00