Commit Graph

818 Commits

Author SHA1 Message Date
Dean 001124896d
Merge pull request #2470 from oneandonlydean/up639/cmask-gpu-clear
fix(agc): apply CMASK fast clears per tile
2026-10-10 18:36:56 +13:00
Dean 0949984e5e
Merge pull request #1945 from TacoCat055/docs/relinker-python-tests
docs: explain relinker Python test discovery
2026-10-10 18:36:32 +13:00
Dean c323d49386
Merge pull request #2052 from esatturan/fix/ajm-atrac9-gapless-segments
fix(ajm): decode an ATRAC9 run's whole input and follow gapless segments
2026-10-10 18:36:09 +13:00
Dean 14469b74e8
Merge pull request #964 from JAB-dev/fix/ngs2-unset-matrix-passthrough
fix(libSceNgs2.native): mix ports without set levels through the default channel map
2026-10-10 18:36:02 +13:00
Dean Galvin 9c3a35b867 fix(agc): apply CMASK fast clears per tile
A CMASK that was neither all fast-cleared nor all expanded threw, so a
title that fast clears a target and then draws over part of it before the
eliminate could not run past it.

The CMASK is now decoded tile by tile: one nibble per 8x8 tile in
1024x512 metablocks of 4 KiB, addressed with the pipe-aligned
SW_64KB_Z_X CMASK equation for 16 pipes (addrlib
GFX10_CMASK_SW_PATTERN, Gfx10Lib::HwlComputeCmaskAddrFromCoord). Code 0
stores CB_COLOR_CLEAR_WORD into the tile's texels, 0xF keeps them; any
other code, a cleared tile of a DCC target and any other CMASK swizzle
mode throw. Edge tiles are included and the CMASK is then stored as
expanded.

For a resident target whose CMASK is host-imported the clear is a
compute pass recorded in stream order: it reads the nibbles from the
import, stores the clear into the cleared tiles through a UINT view of
the image and fills the CMASK expanded, so nothing waits for pending GPU
writes of the CMASK. Invalid codes it reads set a bit that the next
materialization throws on. Otherwise the CPU reads the CMASK and stores
the cleared tiles into guest memory, or fills the resident image when
every tile is cleared. A CMASK nothing has stored over since it was
expanded is skipped.

The decode requires CB_COLOR_ATTRIB3 FMASK_SW_MODE SW_64KB_Z_X with
CMASK_PIPE_ALIGNED, a 4 KiB aligned writable CMASK and texels of at most
64 bits, and CMASK_BASE_EXT is part of the draw key.

Tests: CMASK sizes and nibble addresses against addrlib; decode
rejections and draw key coverage; CPU eliminate of full, partial,
out-of-range-nibble and DCC decompress cases and invalid codes. The new
agc_driver_cmask_fast_clear GPU test draws over fast-cleared and partly
fast-cleared linear and SW_64KB_R_X targets, eliminates partial, edge
and checkerboard CMASKs through the compute pass and checks that an
invalid code it reads throws.
2026-10-10 18:20:06 +13:00
Dean ac57f46711
Merge pull request #2275 from mrk1987/fix/libkernel-rwlock-concurrent-first-lock
fix(libkernel): initialize guest rwlocks before they are shared
2026-10-10 17:46:25 +13:00
Dean ea8f654350
Merge pull request #2178 from oneandonlydean/up639/resummarize-blits
fix(agc): draw nothing for resummarize draws without depth or color work
2026-10-10 17:44:46 +13:00
Dean b57e66fa60
Merge pull request #2152 from MathiasDevelopes/feat/videoout-pre-vblank-start-events
feat(libSceVideoOut): deliver pre-vblank start events
2026-10-10 17:44:23 +13:00
Dean 9ac075e8c0
Merge pull request #1926 from fisherjoey/fix/exit-teardown-order
fix(ajm, apr): keep AJM and APR state alive through static teardown
2026-10-10 17:42:42 +13:00
Dean de723ac54b
Merge pull request #1804 from gdrosa/fix/libc-guest-wide-printf
fix(libc): format guest wide printf arguments on Linux
2026-10-10 17:41:26 +13:00
Dean 5b6c778a95
Merge pull request #1769 from TideOPL/pr/stride0-raw-range
fix(agc): apply the raw OOB_SELECT range rules to zero-stride vertex buffers
2026-10-10 17:41:11 +13:00
Dean a8ce7b7e21
Merge pull request #1727 from SleglJan/feat/libkernel-socket-read-write
fix(libkernel): read and write guest sockets
2026-10-10 17:41:03 +13:00
Dean 9fd45aa4fb
Merge pull request #1632 from MarcZX100/fix/amd-proprietary-subgroup-clock
fix(agc): detect AMD proprietary narrow clock
2026-10-10 17:40:02 +13:00
Dean 17874f1177
Merge pull request #2044 from CouchRiv/fix-agc-completion-label-pm4
fix(agc): store labels the GPU cannot reach in stream order
2026-10-10 17:16:19 +13:00
Joey Fisher 78388c247e docs(debt): record the deliberately leaked AJM, APR and NGS2 state 2026-10-09 20:14:14 -06:00
Adrià 67bb99865a
Merge pull request #1518 from ArjenS-LA/fix/windows-file-timestamps
fix(libkernel): preserve Windows file timestamp precision
2026-10-10 03:15:32 +02:00
Adrià 426fe62282
Merge pull request #2028 from overlordxrz-source/feat/libkernel-get-module-list
feat(libkernel): implement sceKernelGetModuleList and sceKernelGetModuleInfo
2026-10-10 03:15:01 +02:00
Adrià 419069e6d3
Merge pull request #1606 from mohdfaour03/fix/libc-guest-tm-layout
fix(libc): convert times into the guest's 56-byte tm on Windows
2026-10-10 03:14:40 +02:00
Adrià 6637eee34d
Merge pull request #1600 from awake-devel/fix/libkernel-unwind-info-linux
fix(libkernel): report guest unwind tables in sceKernelGetModuleInfoForUnwind on Linux
2026-10-10 03:13:40 +02:00
Adrià 527b18ea59
Merge pull request #1556 from MarcZX100/docs/fedora-static-cmake-deps
docs(build): note Fedora static link packages
2026-10-10 03:10:35 +02:00
Adrià 7f1b6a0b30
Merge pull request #1507 from ArjenS-LA/fix/libc-wcsrtombs
fix(libc): convert wcsrtombs using guest characters
2026-10-10 03:05:55 +02:00
Adrià 0eb7f098dd
Merge pull request #1499 from yabanana/codex/macos-unwind-register-context
feat(libc): support x86-64 unwind register contexts on macOS
2026-10-10 03:04:54 +02:00
Adrià 85d4bfcf34
Merge pull request #1496 from hugodearaujo/fix/videoout-output-mode-errors
fix(videoout): answer output mode queries with the console's codes
2026-10-10 03:04:33 +02:00
Adrià ba6f1e5bd6
Merge pull request #1487 from Celegans12/feat/agc-forced-degamma-srgb
feat(agc): accept samplers that force sRGB decoding of sRGB textures
2026-10-10 03:03:19 +02:00
Adrià 3fe03f7227
Merge pull request #1473 from LeandroLP23/fix/shader-lg-compare-amd-wave32
fix(shader): emit ordered not-equal through an integer NaN check
2026-10-10 03:02:02 +02:00
Mohd Faour 0aae158635 fix(libc): convert times into the guest's 56-byte tm on Windows
gmtime, localtime, mktime, strftime and asctime took and returned the
host std::tm. The guest's FreeBSD tm has tm_gmtoff and tm_zone after the
nine calendar fields, so on Windows, where std::tm is 36 bytes, a title
reading those fields read past the thread-local result, and gmtime_s left
them unwritten. Windows gmtime_s also accepts only 1969-12-31 12:00 to
3001-01-19 21:59 UTC, where the guest libc converts any time.

Convert through a GuestTm with the guest layout on both hosts. Compute
the UTC fields from the day count, so every time whose year fits an int
converts, and on Windows take the local offset and zone name from the
CRT. gmtime reports the zone as UTC like the guest libc. localtime and
mktime keep the CRT's range on Windows; recorded in TechnicalDebt.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 02:13:17 +02:00
clem-gb 1bd1923718 fix(libkernel): report guest unwind tables in sceKernelGetModuleInfoForUnwind on Linux
A title that ships its own libc.prx unwinds C++ exceptions with that
libc's libunwind, which asks sceKernelGetModuleInfoForUnwind where each
frame's eh_frame is. On Linux the call always reported no tables, so
no C++ exception thrown in guest code could be caught. For the main
executable and .guest.prx images, report the PT_GNU_EH_FRAME tables
that sceKernelGetModuleInfoFromAddr finds, as Windows does from
.ehmeta. Other host images still report none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HeC9bA3n74TzJRYv9AgBE8
2026-10-10 02:09:56 +02:00
ArjenS-LA 705e49d407 fix(libkernel): preserve Windows file timestamp precision 2026-10-10 01:51:56 +02:00
hugodearaujo cadcbfd3a8 fix(videoout): answer output mode queries with the console's codes
Measured on a PS5 (firmware 13.60) through dlopen of
libSceVideoOut.sprx on a handle the payload opened.
sceVideoOutInitializeOutputOptions writes 0xFF to byte 2 of the 64-byte
options and returns INVALID_ADDRESS for a null pointer.
sceVideoOutIsOutputSupported checks the handle, then the reserved
arguments, then the mode, then the options. It never answers 0: a mode
the display lacks returns UNSUPPORTED_OUTPUT_MODE, and a value that is
not a mode returns 0x8029001E. Options must keep the initialized words,
except word 3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 01:42:40 +02:00
overlordxrz-source 8a41d280af feat(libkernel): implement sceKernelGetModuleInfo
Fill takes either info struct, so sceKernelGetModuleInfo reports the
name and segments sceKernelGetModuleInfoFromAddr reports for the same
image, on Linux and Windows.
2026-10-09 19:39:49 -04:00
overlordxrz-source 6d42f3a910 feat(libkernel): implement sceKernelGetModuleList 2026-10-09 19:39:49 -04:00
Adrià Franch ec2df2691a docs(tech-debt): record the FORCE_DEGAMMA measurement on RDNA2
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 01:38:23 +02:00
Celegans12 619ec7ad39 feat(agc): accept samplers that force sRGB decoding of sRGB textures
A sampler with FORCE_DEGAMMA (S# word 0 bit 20) threw at decode, so
every dispatch or draw sampling through one was skipped.

DecodeSamplerResource now records the bit, but accepts it only for a
caller that pairs the sampler with its images. The direct sampler
binding does, and RequireDegammaFormat checks each sampled image
against its paired samplers: only already sRGB formats (8, 8_8 and
8_8_8_8 SRGB, BC1, BC2, BC3 and BC7 SRGB) pass, decoded once, as
shadPS4 (PS4) models it. Other textures and unpaired decodes still
throw; gfx10 behaviour is not measured.
2026-10-10 01:38:17 +02:00
Adrià 787239eca5
Merge pull request #1459 from nauroth/claude/strtol-c17-prefix
fix(libc): stop the strtol family at a binary prefix on Linux
2026-10-10 01:31:16 +02:00
Adrià Franch 8404c4987d docs(technicaldebt): move the ordered not-equal line away from the f32 denormal entries
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-10 01:28:00 +02:00
LeandroLP23 4f03d9f4d6 fix(shader): emit ordered not-equal through an integer NaN check
The AMD Windows driver returns 1 for a NaN operand when any float form
of ordered not-equal feeds a ballot on a 32-wide subgroup, which is how
e32 compares are read in wave32. FPOrdNotEqual32 is now emitted as an
unordered not-equal with both operands checked for NaN on their bits,
which gives the same result for every input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 01:27:52 +02:00
Adrià 8c6780d606
Merge pull request #1300 from TibixDev/pr/ngs2-atrac9-streaming
fix(ngs2): decode ATRAC9 across streamed waveform blocks
2026-10-10 01:25:02 +02:00
Adrià 76bff21fbe
Merge pull request #1421 from popcoder565/fix/kernel-raise-exception-ntcontinue
fix(libkernel): stop losing and deadlocking sceKernelRaiseException deliveries on Windows
2026-10-10 01:23:17 +02:00
Adrià c5424ab69c
Merge pull request #1916 from johnmaia/feat/libkernel-sigaction
feat(libkernel): implement sigaction
2026-10-10 01:20:54 +02:00
Adrià 00dd2ba844
Merge pull request #1017 from NahuelGenchi/fix/v-fma-f64-subnormals
fix(shader): round v_fma_f64 once for subnormal operands and results
2026-10-10 01:19:26 +02:00
Adrià 624b2b7eff
Merge pull request #1135 from orbz22/fix/kernel-aio-keep-offset-windows
fix(kernel): keep the file offset in Windows AIO reads and writes
2026-10-10 01:09:52 +02:00
MarcZX100 10957e0dc4 docs(build): show Fedora static package command 2026-10-09 23:03:15 +00:00
MarcZX100 6074d658f8 docs(build): note Fedora static link packages 2026-10-09 23:03:15 +00:00
Adrià 0df342c640
Merge pull request #1179 from MichonGoddijn231849/feat/pixel-ancillary-whole-word
feat(recompiler): pixel ancillary word used whole
2026-10-10 00:56:51 +02:00
Adrià dc4b7104e5
Merge pull request #2205 from XairRrR/feat/gamelivestreaming-status2
feat(libs): implement sceGameLiveStreamingGetCurrentStatus2
2026-10-10 00:55:16 +02:00
Adrià c2f1139436
Merge pull request #1824 from Mouhand-Kaddo/feat/sce-zlib
feat(zlib): implement sequential libSceZlib decompression
2026-10-10 00:54:10 +02:00
TibixDev 4a04a78bfc fix(ngs2): decode ATRAC9 across streamed waveform blocks
Keep logical sample and skip counts across byte-only continuation buffers, assemble split superframes, and allow callbacks to refill, pause or reset the stream. Preserve decoded audio while waiting for input and reject truncated closed streams.

Validated with seven NGS2 tests, an ASan/UBSan streaming test build, and PPSA03747 repeatedly supplying continuation buffers during playback. Flag semantics follow the pinned KytyPS5 source documented in TechnicalDebt.md.

Written with AI assistance.
2026-10-10 00:50:23 +02:00
Adrià c9d42619a6
Merge pull request #1292 from Celegans12/feat/agc-draw-null-srt
feat(agc): implement deferred faults for descriptors read through null SRT pointers
2026-10-10 00:48:27 +02:00
Adrià Franch ab658fcfb0 docs(technical-debt): state what raise does for each recorded signal 2026-10-09 23:42:52 +01:00
john.maia cfe4a277c4 feat(libkernel): implement sigaction
EVO-PLAYER (PPSA99039) v0.11.0 stops at sigaction once its earlier
imports resolve: it installs a crash handler for SIGSEGV, SIGBUS and
SIGABRT and a quit handler for SIGTERM, SIGINT and SIGHUP at start-up.

sigaction records the handler, flags and mask of signals 1 to 128 and
reports them back, with FreeBSD's EINVAL cases. signal shares the table
and records SA_RESTART, as FreeBSD's libc does. Plain handlers on the
signals signal already delivers run as signal handlers do; SA_SIGINFO
handlers and other signals are recorded only, and raise of such a
signal throws.

Assisted by Claude Code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DwFnKjMxmwGDWiuYYf1v4D
2026-10-09 23:42:43 +01:00