Commit Graph

4098 Commits

Author SHA1 Message Date
Adrià 4fbf6ca5a3
Merge pull request #1960 from Raghav314/fix/agc-import-leaves-pages-unarmed
fix(agc): host imports write-protect only pages a collect already protects
2026-10-10 10:45:04 +02:00
Adrià 874c144712
Merge pull request #1909 from TheAggie/feat/libkernel-mmap-aligned-super
feat(libkernel): accept MAP_ALIGNED_SUPER in mmap
2026-10-10 10:44:57 +02:00
Adrià c5d77d6bd5
Merge pull request #2276 from hugodearaujo/perf/recompiler-dominance-lookups
perf(recompiler): look up dominance by binary search and track visited blocks in a bitmap
2026-10-10 10:43:47 +02:00
Adrià 8f442a7554
Merge pull request #2615 from oneandonlydean/fix/carry-2597
fix(libc): export the remaining exception entry points natively on Windows
2026-10-10 10:42:24 +02:00
Adrià 919c49b964
Merge pull request #2612 from oneandonlydean/fix/carry-2579
fix(libc): end the process without detach routines in _Exit on Windows
2026-10-10 10:41:16 +02:00
Dean 73a35466cd
Merge pull request #2628 from oneandonlydean/fix/carry-2606
test(agc): skip agc_driver_prepared_shaders_deferred_undecodable without a Vulkan device
2026-10-10 21:39:42 +13:00
Adrià 05e884ca08
Merge pull request #2618 from oneandonlydean/fix/carry-2549
fix(relinker): leave zero-filled PT_LOAD memory out of Windows files
2026-10-10 10:38:10 +02:00
Adrià 7cbd0fcbac
Merge pull request #2614 from oneandonlydean/fix/carry-2582
test(font): isolate guest_font system font lookup
2026-10-10 10:37:25 +02:00
Adrià 444edc3652
Merge pull request #1819 from TheAggie/feat/agc-pixel-stipple-fixed-point
feat(agc): accept the LINE_STIPPLE_TEX and POS_FIXED_PT pixel inputs
2026-10-10 10:37:00 +02:00
AlxcBTW 8b691387cb test(agc): skip agc_driver_prepared_shaders_deferred_undecodable without a Vulkan device
The --deferred-undecodable mode registers shaders through a Vulkan
device but, unlike --deferred, did not check for one first. On the
Windows CI runner, which has no Vulkan driver, vkCreateInstance returns
VK_ERROR_INCOMPATIBLE_DRIVER and the test fails instead of skipping, so
the windows job on main has failed since e5b32bb4. It now returns
VulkanTestSkipped like the other modes.
2026-10-10 21:31:34 +13:00
Adrià 6cc3358332
Merge pull request #2184 from EdouardSence/fix/libkernel-pthread-tid
fix(libkernel): start the pthread object with the thread id
2026-10-10 10:27:44 +02:00
hugodearaujo 82853352fe perf(recompiler): look up dominance by binary search and track visited blocks in a bitmap
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 05:26:03 -03:00
Adrià 85d16bcc23
Merge pull request #2347 from Pipodi/fix/sampled-heap-capacity
fix(recompiler): hold 64 images in a sampled image heap
2026-10-10 10:23:23 +02:00
Yassine 6158444f71 fix(relinker): leave zero-filled PT_LOAD memory out of Windows files
WindowsPeWriter stored every PE section with SizeOfRawData equal to its
virtual size, so the zero-filled tail of a PT_LOAD segment (p_memsz above
p_filesz, the .bss) was written to the executable byte for byte. A segment
with 256 MiB of .bss produced a 269 MB .exe, while the Linux output of the
same image is under 5 KB.

Each section is now stored up to its last non-zero byte, aligned to the file
alignment, and VirtualSize keeps the full size. The PE loader zero-fills the
part of a section beyond SizeOfRawData (Microsoft PE format, section table:
SizeOfRawData). A section with no non-zero byte gets no raw data and a zero
PointerToRawData.

windows_bss relinks an image with 64 MiB of .bss, checks the section table
and the mapped image, and on Windows runs the executable, which reads the
last word of the .bss.
2026-10-10 21:23:19 +13:00
AlxcBTW 649782b7b6 fix(libc): export the remaining exception entry points natively on Windows
On Windows libc exports __cxa_init_primary_exception, std::uncaught_exception
and std::uncaught_exceptions only as _nid_postfix symbols (GCC_GLOBAL_ALIAS
is empty there), so host modules bind libstdc++-6.dll's versions:

- std::make_exception_ptr, which std::promise's destructor uses for
  broken_promise, allocated the exception with libc and initialized it with
  libstdc++'s __cxa_init_primary_exception, whose header layout differs.
  A test that makes one and rethrows it dies with an access violation.
- std::uncaught_exceptions read libstdc++'s thread state, which libc's
  throws never touch, so it returned 0 while an exception unwound. The
  AGC driver's deferred-label guard relies on it to tell a failed record
  from a finished one.

The three are now exported natively, like __cxa_throw and the rest.
__cxa_init_primary_exception also sets the reference count to 0, as the
Itanium ABI does: the exception_ptr created next takes the only
reference, so a made exception is destroyed once instead of leaking.
2026-10-10 21:20:29 +13:00
AlxcBTW bc8587a6fe fix(libc): end the process without detach routines in _Exit on Windows
On Windows std::_Exit ends in ExitProcess, which still runs every module's
DLL_PROCESS_DETACH and TLS callbacks after the other threads are gone. A
static destructor that joins a worker then waits forever: a title that calls
_Exit while libSceVideoOut's flip queue runs (ps5-opengl's retirement
fail-stop) stays alive in FlipQueue's destructor. _Exit and libkernel's _exit
now terminate the process with TerminateProcess, as _exit ends a POSIX
process: no atexit handlers, stream flushes or module destructors.
2026-10-10 21:20:29 +13:00
Samuel Jean c62da4004e test(font): isolate guest_font system font lookup 2026-10-10 21:20:29 +13:00
Adrià f6af6d11d3
Merge pull request #2123 from LuisBiceps/feat/libkernel-waitpid-no-children
feat(libkernel): report no child processes from waitpid
2026-10-10 10:18:56 +02:00
Scott Schuster c160d31649 feat(agc): accept the LINE_STIPPLE_TEX and POS_FIXED_PT pixel inputs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 10:18:16 +02:00
Adrià 7c33f29c69
Merge pull request #2085 from orbz22/fix/agc-denormal-clear-colors
perf(agc): fill-clear small-float denormal patterns on devices whose clears keep them
2026-10-10 10:16:09 +02:00
Adrià ddcb251a97
Merge pull request #2092 from authurtabo-byte/fix/agc-color-compare-forms
fix(agc): accept additional color comparison image forms
2026-10-10 10:13:30 +02:00
Adrià 4eff3bc293
Merge pull request #1913 from gunerky/codex/tls-test-groups
test(relinker): split TLS coverage into bounded CTest groups
2026-10-10 10:13:07 +02:00
Adrià eab888e02f
Merge pull request #2573 from oneandonlydean/fix/carry-2241
fix(agc): zero-fill a vertex fetch past the record count
2026-10-10 10:13:05 +02:00
Adrià 3539d1ce0b
Merge pull request #1959 from Raghav314/fix/recompiler-formatted-buffer-once
fix(recompiler): emit a formatted buffer access through one function per resource
2026-10-10 10:11:19 +02:00
Adrià Franch 8de5e70477 docs(technicaldebt): shorten the waitpid entry
Requested by @oneandonlydean in review.
2026-10-10 10:11:04 +02:00
LuisBiceps c059cc733f refactor(libkernel): move waitpid and its TechnicalDebt entry away from lines open pull requests change
waitpid now sits between exit and _exit, and its TechnicalDebt entry follows the packed horizontal gathers entry, so the open system and getuid pull requests and the thread cancellation test pull request no longer touch the same lines.
2026-10-10 10:11:04 +02:00
LuisBiceps ac6852ec26 test(libkernel): check every waitpid option set on every pid, with and without a status
Unknown options are now checked for every pid, with 0x80 and 0x80000040 added, and so are valid combinations such as WNOHANG | WUNTRACED. Each call is repeated with a null status. The TechnicalDebt entry cites kern_wait, which adds WEXITED and WTRAPPED, and lists pdfork.
2026-10-10 10:11:04 +02:00
LuisBiceps 918bc0a49c feat(libkernel): report no child processes from waitpid
waitpid returns -1 with ECHILD, or EINVAL for an option FreeBSD does not know, and leaves the status unwritten: AnyPS5 runs the title as one process and exports nothing that creates a child. VLC PPSA85300 stops on main at this import.
2026-10-10 10:11:04 +02:00
Raihan Abdul Majid bafca2ffda perf(agc): fill-clear small-float denormal patterns on devices whose clears keep them
FillClearColor refused half and B10G11R11 patterns with a denormal code,
since an implementation may flush them in a clear, so such fills over a
resident image took the CPU path: PPSA01325 fast-clears its 3840x2160
R16G16_SFLOAT target 0x515390000 with a denormal half every frame, a
33 MiB guest write and re-upload (about 85 ms).

ClearKeepsDenormals probes the device once per format: a 1x1 image
cleared with denormal codes (half 0x0001, 0x83ff, 0x0200, 0x8001;
11/10-bit 0x001) and read back. When the bits survive, FillClear takes
the refused pattern again with SmallFloat decoding denormals exactly.
NaNs, float32 denormals and the SNORM minimum stay refused.

agc_driver_recorder_tests clears an R16G16_SFLOAT resident image with a
normal, a denormal and a NaN pattern: the denormal is cleared exactly
when the probe says the device keeps it, and the NaN is refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UTjpbMX7BUFMZZaxJE98zV
2026-10-10 10:10:51 +02:00
Alex Collini 381d5b37b7 fix(recompiler): hold 64 images in a sampled image heap
A shader reported in review binds 40 sampled images of one class, more
than 32. The cap only bounds the compact heap arrays, so no layout or
ABI version changes. The test covers 40 images and a full class through
the constant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 10:09:43 +02:00
Alex Collini ea22c8286d fix(recompiler): hold 32 images in a sampled image heap
A compute program of PPSA26344 binds 29 sampled images of one class, more
than the 16 a typed sampled heap held, and failed with "shader image heap
capacity exceeded". Heap arrays are declared with their compact length,
so shaders that fitted before keep their layout and SPIR-V.

Bindless image tables keep 16 slots: they were sized by the same constant,
and each slot costs an image entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 10:09:42 +02:00
Adrià faf6a11701
Merge pull request #1917 from TheAggie/feat/agc-radv-gfx10-packets
feat(agc): accept the GFX10 packet forms RADV emits
2026-10-10 10:09:36 +02:00
authurtabo-byte af635e22eb build(agc): include RDNA decoder headers
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-10-10 01:08:04 -07:00
authurtabo-byte 42bc9426d3 test(agc): correct bilinear comparison reference
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-10-10 01:08:04 -07:00
authurtabo-byte a76b0dc461 fix(agc): reject unsupported color comparison forms
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-10-10 01:08:04 -07:00
authurtabo-byte e50bd2f824 fix(agc): retain anisotropic compare rejection and test sRGB forms 2026-10-10 01:08:03 -07:00
authurtabo-byte f7ca33cb9d fix(agc): accept additional color comparison image forms 2026-10-10 01:08:03 -07:00
gunerky 6767bc7a35 docs(relinker): keep test investigation in PR description 2026-10-10 10:07:33 +02:00
gunerky 047a25820a docs(relinker): record unresolved TLS test delays 2026-10-10 10:07:33 +02:00
gunerky b2ff4f4b02 test(relinker): split TLS coverage into bounded CTest groups 2026-10-10 10:07:33 +02:00
Adrià 2c4828a63d
Merge pull request #2072 from STUPIDCONTEM/fix/srt-signed-comparison
fix(shader): evaluate signed comparisons in SRT expressions
2026-10-10 10:07:30 +02:00
Adrià 5560b54d69
Merge pull request #2071 from STUPIDCONTEM/fix/linked-shader-stage-abi
fix(agc): prepare combined shader layouts when linking
2026-10-10 10:06:56 +02:00
Adrià d185c31678
Merge pull request #2348 from Pipodi/fix/1d-storage-through-2d-stores
fix(shader): write 1D storage images through 2D image stores
2026-10-10 10:06:36 +02:00
Dean ac75a96dd7
Merge pull request #1908 from TheAggie/fix/libkernel-sched-other-priority
fix(libkernel): accept SCHED_OTHER in sched_get_priority_max/min
2026-10-10 21:05:56 +13:00
Dean 4faa14ef6a
Merge pull request #1783 from babyhuey/feat/libc-wide-ctype
feat(libc): implement the C locale wide character class functions
2026-10-10 21:05:48 +13:00
Dean 64c13bc98d
Merge pull request #2032 from Aryansh1520/fix/audioout2-drop-haptics-without-pad
fix(audioout): drop vibration ports when no pad audio device is open
2026-10-10 21:05:41 +13:00
Adrià 89a1fb4ea8
Merge pull request #2190 from obojeoboje/fix/test-registration-command-only
fix(tools): ignore test names when checking executable registration
2026-10-10 10:02:58 +02:00
Adrià 0bc8313a25
Merge pull request #2177 from MarcZX100/codex/fix-color-compare-negative-wrap
fix(shader): normalize negative color comparison wrap indices
2026-10-10 10:02:56 +02:00
Adrià 933b3ca5b1
Merge pull request #2595 from oneandonlydean/revert/1629
revert(agc): undo #1629's sceAgcDcbResetQueue packet sequence
2026-10-10 10:02:22 +02:00
Adrià d4b5cd6131
Merge pull request #2230 from QRMOE/fix/libkernel-pthread-rename-limit
fix(libkernel): reject overlong POSIX thread names
2026-10-10 10:01:28 +02:00