Commit Graph
14017 Commits
Author SHA1 Message Date
Dean ff96422459 Merge pull request #587 from nicolasabosch/fix/wave32-wide-subgroups
fix(shader): isolate wave32 operations in wide host subgroups
2026-10-05 14:25:04 +13:00
Dean ec46678f61 Merge pull request #588 from DotDebian/feat/relinker-sha1-memory-operand
feat(relinker): lower SHA-1 instructions with a memory operand
2026-10-05 14:24:22 +13:00
Dean 65b750aee6 Merge pull request #592 from DotDebian/fix/pngenc-filter-subset
fix(pngenc): restrict adaptive filtering to the requested filter subset
2026-10-05 14:23:41 +13:00
Dean 18d9745de4 Merge pull request #584 from DotDebian/feat/font-get-render-scaled-kerning
feat(font): implement sceFontGetRenderScaledKerning
2026-10-05 14:23:00 +13:00
Dean 4ae4f53ffb Merge pull request #338 from Pouare514/feat/prx-loader-tripwires
feat(prx): unknown loader tripwires for TLOU
2026-10-05 14:22:18 +13:00
Dean d5170a3ac3 Merge pull request #521 from Pouare514/fix/crashreport-hang-watchdog
feat(crashreport): hang watchdog with all-threads dump
2026-10-05 14:21:37 +13:00
Dean 1a7323ecfc Merge pull request #549 from Pouare514/fix/reserve-virtual-idempotent
fix(libkernel): idempotent fixed virtual reservation over registered range
2026-10-05 14:20:55 +13:00
Dean 62ed092cc9 Merge pull request #359 from DotDebian/feat/kernel-mlock
feat(libkernel): implement sceKernelMlock
2026-10-05 14:20:14 +13:00
Dean 11d17fcba7 Merge pull request #367 from DotDebian/fix/pthread-key-reuse
fix(libkernel): do not expose stale thread-specific values through a reused pthread key
2026-10-05 14:19:32 +13:00
Nahuel Genchi 331d16d44a fix(tools): count v_fmac_legacy_f32 and v_fma_legacy_f32 as decoded shader instructions
VOP2 0x06 and VOP3 0x140 were only matched by their RDNA 1 names.
2026-10-04 21:47:22 -03:00
Nahuel Genchi d32eb5d309 fix(shader): apply the DX9 zero rule to v_fma_legacy_f32
VOP3 0x140 was translated as a plain fma, so a zero source times an
infinity or a NaN gave NaN instead of the addend. A zero source now
gives +0 + src2, the same rule v_mul_legacy_f32 and v_mac_legacy_f32
already follow. The opcode also takes neg and abs on its sources.
2026-10-04 21:47:22 -03:00
Pouare514 15a4b73e6c fix(crashreport): single-dump timed watchdog with positive-only timeout 2026-10-05 02:31:17 +02:00
DotDebianandClaude Opus 5.5 bf635fae68 feat(shader): implement image_bvh64_intersect_ray
MIMG 0xe7 is the node test of image_bvh_intersect_ray with a 64-bit node
pointer: the pointer takes the first two address dwords (low, high), so
the instruction addresses 12 dwords, or 9 with A16.

The node index and address are computed from the whole pointer. A zero
base in the T# is a null BVH only for the 32-bit form: with 64-bit
pointers the T# may cover all of memory from base 0 and the pointer then
carries the node address, so only the T# size bounds the node.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 00:26:32 +00:00
Dean 8387b4da51 Merge pull request #573 from CnRJay/feat/ds-atomics-64
feat(shader): implement the 64-bit LDS atomics
2026-10-05 13:26:22 +13:00
DotDebianandClaude Opus 5.5 4dea441f01 fix(libkernel): do not expose stale thread-specific values through a reused pthread key
scePthreadKeyDelete frees a key slot and the next scePthreadKeyCreate
hands the same index out again, but every thread kept the value it had
stored under that index. The new key read the previous key's value
instead of NULL, and at thread exit its destructor was called on that
stale pointer.

Each slot now carries a sequence number, as in FreeBSD libthr. A thread
value is visible to scePthreadGetspecific and to the exit destructors
only while its sequence matches the slot's, so a new key starts as NULL
in every thread, as POSIX requires, and a deleted key reads NULL.

scePthreadGetspecific stays lock-free and scePthreadSetspecific no
longer takes the key lock.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 00:26:20 +00:00
DotDebianandClaude Opus 5.5 774b34986c feat(libkernel): implement sceKernelMlock
Lock the guest pages of the range with VirtualLock or mlock, following FreeBSD mlock(2): the range is widened to guest pages, a zero length succeeds, a wrapping range is EINVAL and a range that is not mapped and accessible is ENOMEM. The Windows working set limits and the Linux RLIMIT_MEMLOCK soft limit are raised when the lock needs it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 00:25:56 +00:00
raghav314andClaude Opus 5.5 2771eeea77 feat(ajm): implement DecodeSingle, GetGaplessDecode and GetCodecInfo
sceAjmBatchJobDecodeSingle runs a single-frame decode job with the stream
sideband. sceAjmBatchJobGetGaplessDecode and sceAjmBatchJobGetCodecInfo
append run jobs without buffers that return the gapless-decode and codec-info
sidebands.

A run job without input or output buffers no longer decodes: it reports the
instance state with a zero result instead of PARTIAL_INPUT on MP3 and Opus.

RUN_GET_CODEC_INFO (bit 11) writes the ATRAC9 codec info after the gapless
sideband. Codec info for other codecs, and codec info together with
RUN_MULTIPLE_FRAMES, throw.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 05:55:12 +05:30
Dean e440e2c22b Merge pull request #579 from CnRJay/fix/ampr-wait-signatures
fix(libs): take the AMPR wait and counter signatures from ampr_emu
2026-10-05 13:20:59 +13:00
Pouare514 20cbc8e306 fix(prx): keep main's GetConnectionStatus body and Http blank line untouched 2026-10-05 02:18:52 +02:00
DotDebianandClaude Opus 5.5 da9752bd5f feat(shader): implement buffer_atomic_csub
MUBUF opcode 0x34 subtracts the data register from a buffer dword and
clamps the result to zero, returning the previous value. The form without
glc throws: no GFX10 target is known to provide it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 02:15:47 +02:00
Pouare514 ac7bc704c3 fix(prx): export tripwire NIDs under recomputed real names, restore main's hunks 2026-10-05 02:13:22 +02:00
Pouare514 66a95ada20 feat(prx): unknown loader tripwires for TLOU 2026-10-05 02:12:32 +02:00
hamb3randsaulo benigno a347b02b48 feat(pad): map Xbox View button to PS5 touchpad
Controllers other than DualShock 4 and DualSense lack a dedicated touchpad button. Maps the SDL Back button (View on Xbox) to PadButton::TouchPad for non-PlayStation controllers.

Co-Authored-By: saulo benigno <[email protected]>
2026-10-05 03:11:15 +03:00
hamb3randsaulo benigno c2fa7fd97f fix(avplayer): add decode-ahead buffers for application video output
When an application requests only 2 video buffers and holds one during playback, decode-ahead frames allow the decoder to stay ahead and prevent stalls under SyncModeNone.

Co-Authored-By: saulo benigno <[email protected]>
2026-10-05 03:10:07 +03:00
ChadandClaude Opus 5.5 e017894bb4 fix(agc): free per-thread driver state at thread exit without emutls
On MinGW, thread_local storage is emutls: libgcc frees a thread's blocks
from a winpthread key destructor when the thread function returns, and
the CRT runs the thread_local destructors later, from the module's TLS
callback at thread detach. The destructors of the driver's non-trivial
thread_locals (the deferred label queue, packet profile, capture and
revalidation scratch vectors, build profile, memory counters, disk cache
buffers) therefore ran on freed storage. Under the debug heap the flip
test failed on every run at the queue worker's exit after the injected
flip failure; without it the use-after-free showed up as intermittent
heap corruption or a stack overflow on the Windows CI job.

ShaderRecompiler::ThreadOwned keeps such state behind a trivially
destructible thread_local pointer and deletes it from its own pthread key
destructor, which receives the objects directly instead of reading
emutls. The driver no longer registers any thread_local destructor.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-04 19:08:54 -05:00
hamb3randsaulo benigno 3b2edec285 fix(video): set per-monitor v2 DPI awareness on Windows
Avoid Windows DPI virtualization so SDL, the drawable and the swapchain use physical pixels.

Co-Authored-By: saulo benigno <[email protected]>
2026-10-05 03:08:42 +03:00
DotDebianandClaude Opus 5.5 bfe9bf9af4 fix(pngenc): restrict adaptive filtering to the requested filter subset
A filter_type naming a subset of the PNG filters used only the first
filter of the mask, because stb's writer is either fully adaptive or
forced to one filter. Decoder::Png::Encode now takes the set of allowed
filter types, filters the rows and writes the chunks itself, and keeps
stb for deflate only. Output for the all-filters and single-filter
cases is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 02:08:31 +02:00
Nicolas Abosch f1d8ec8913 fix(shader): isolate wave32 operations in wide host subgroups 2026-10-04 21:02:46 -03:00
DotDebianandClaude Opus 5.5 e11b4b5554 feat(relinker): lower SHA-1 instructions with a memory operand
SHA1RNDS4/NEXTE/MSG1/MSG2 with a memory source made `--to-intel` fail
the whole relink. The stub now spills a scratch xmm, loads the operand
into it with the unaligned load already used for SHA-256 and runs the
register-form lowering. The SHA1RNDS4 immediate is read after the SIB
byte and displacement. RIP-relative operands still fail: the stub runs
at a different address.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 02:02:13 +02:00
Dean 9651ec9a92 Merge pull request #574 from CnRJay/fix/shader-memory-select
fix(shader): splat the bindless table hit into a bool vector for SPIR-V 1.3
2026-10-05 12:59:53 +13:00
Dean 07404b67e4 Merge pull request #581 from DotDebian/fix/mimg-a16-bias-dword
fix(shader): give the a16 bias of image samples its own address dword
2026-10-05 12:50:04 +13:00
Chad 7030c57393 Merge remote-tracking branch 'upstream/main' into feat/ampr-nop-04-writes
# Conflicts:
#	docs/dev/TechnicalDebt.md
2026-10-04 18:49:51 -05:00
DotDebianandClaude Opus 5.5 52c13a0bde feat(font): implement sceFontGetRenderScaledKerning
Return the kerning between two character codes at the render scale of
the font, the one set by sceFontSetupRenderScalePixel and
sceFontSetupRenderScalePoint, and fail with NOT_BOUND_RENDERER when no
renderer is bound. sceFontGetKerning keeps its behaviour and shares the
FreeType lookup.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 01:49:49 +02:00
Dean b5d54c9db8 Merge pull request #578 from DotDebian/feat/ajm-dec-mp3-parse-frame
feat(ajm): implement sceAjmDecMp3ParseFrame
2026-10-05 12:49:23 +13:00
Chad e3f18eec00 Merge remote-tracking branch 'upstream/main' into fix/ampr-wait-signatures
# Conflicts:
#	docs/dev/TechnicalDebt.md
2026-10-04 18:49:15 -05:00
Dean 7c0c8e753c Merge pull request #575 from DotDebian/feat/agc-cb-registers-direct-size
feat(agc): implement the Sh and Uc RegistersDirect size queries
2026-10-05 12:49:13 +13:00
Dean 53485db448 Merge pull request #565 from Phi1ow/complete-pad-angular-velocity-deadband
feat(pad): implement scePadSetAngularVelocityDeadbandState
2026-10-05 12:49:03 +13:00
ChadandClaude Opus 5.5 6f5cb736ae fix(libs): match the AMPR 04_00 measure checks of ampr_emu
The WriteAddressFromCounter_04_00 measure checks only the address and the
counter pair measure only the address and an even start, as in ampr_emu.
TechnicalDebt records that AMPR commands are larger than the console
records, which affects titles that pad with Nop to an exact offset, and
that the at-start flag of the 04_00 writes is ignored.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-04 18:48:45 -05:00
Dean d5cf8a0add Merge pull request #558 from Phi1ow/implement-error-dialog
feat(errordialog): implement the libSceErrorDialog state machine
2026-10-05 12:48:20 +13:00
ChadandClaude Opus 5.5 53928c712e docs: record that s_getreg_b32 reads round to nearest even after s_setreg_b32
s_setreg_b32 has no effect, so a read of the MODE round fields after it
wrote another mode still reports round to nearest even, the rounding the
recompiled code uses. The refused HW_ID test row is named as hardware
register 4, which has no name on gfx10.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-04 18:48:04 -05:00
Dean 221ea3c0bd Merge pull request #535 from DotDebian/feat/audioout-set-mix-level-pad-spk
feat(libSceAudioOut): implement sceAudioOutSetMixLevelPadSpk
2026-10-05 12:47:38 +13:00
ChadandClaude Opus 5.5 4b5baea6c4 fix(shader): refuse v_dot2_f32_f16 without op_sel_hi on the accumulator
Its meaning for the f32 accumulator is not known, like op_sel and neg_hi,
and the integer dots already refuse anything but op_sel_hi set on every
source.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-04 18:47:31 -05:00
Dean b57f722ca4 Merge pull request #542 from Pouare514/tools/nid-names
feat(tools): suggest real names for Unknown NID stubs from hash-verified DB
2026-10-05 12:46:56 +13:00
ChadandClaude Opus 5.5 7907e876d6 test(shader): order the contended LDS 64-bit atomics with barriers
On a device whose subgroups are narrower than the wave, the recompiled
wave runs as several subgroups, so one subgroup's zeroing write could
land after another's atomics, and a read could run before another
subgroup's atomics. An s_barrier after the zeroing writes and another
after the atomics order them on any subgroup width.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-04 18:46:54 -05:00
Dean f83ee125ce Merge pull request #516 from Pouare514/fix/tlou-rtc
fix(libs): TLOU sceRtcParseDateTime ISO 8601 subset parser
2026-10-05 12:46:14 +13:00
Dean e682ed35a1 Merge pull request #406 from Pouare514/feat/crashreport-thread-dump
feat(crashreport): dump all threads on fatal crash plus hang watchdog
2026-10-05 12:45:32 +13:00
Dean ac7b0f9d87 Merge pull request #405 from Pouare514/feat/libc-quick-exit
feat(libc): implement at_quick_exit and quick_exit
2026-10-05 12:44:51 +13:00
Dean d220149542 Merge pull request #299 from Pouare514/fix/relinker-tls-tail
fix(relinker): tolerate trailing data in TLS scan
2026-10-05 12:44:41 +13:00
ChadandClaude Opus 5.5 1566e1b397 feat(agc): implement packet and range predication and the predication sizes
sceAgcSetPacketPredication sets or clears the predicate bit of a type-3
packet header, and sceAgcSetRangePredication does so for every type-3
packet between two addresses, skipping type-2 fillers. The z-pass, bool
and disable predication size queries return the size of the
SET_PREDICATION packet sceAgcDcbSetPredication writes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-04 18:35:47 -05:00
DotDebianandClaude Opus 5.5 7a4e1a2245 fix(shader): give the a16 bias of image samples its own address dword
With a16 the bias is a half that occupies a full address dword and the
coordinates start in the next one. The layout packed the first
coordinate into the upper half of the bias dword, so image_sample_b,
image_sample_b_cl, image_sample_b_o and the biased gathers read their
coordinates from the wrong halves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 01:30:17 +02:00