Commit Graph
12196 Commits
Author SHA1 Message Date
Adrià 46f27623c2 Merge pull request #6278 from hypermoist/perf/unwind-dl-find-object
perf(libc): find unwind tables with _dl_find_object on glibc
2026-10-19 07:53:50 +02:00
Yunus Shaikh 53cc193a3c Merge main into fix/agc-sample-location-grid-exact
#6503 took request serialization 36 for its float32 flush flag, so this branch's sample order moves to 37. The version relabels in ShaderMemory.cpp and RequestSerializerTests.cpp drop both trailing flags and the sample order.
2026-10-18 22:52:06 -07:00
Dean 2dcc94109e Merge pull request #7733 from MarcZX10/codex/fix-spirv-validator-exit-unwind-7732
fix(cmake): link MinGW spirv validator exit test runtime
2026-10-19 18:52:02 +13:00
Dean 323ece2445 Merge pull request #7445 from elliot1377/fix/agc-dispatch-split-base
fix(agc): split oversized dispatches with workgroup offset specialization
2026-10-19 18:51:58 +13:00
Dean 819ced2e1d Merge pull request #7674 from thuanquang/fix/mesh-layer-block
fix(shader): write a mesh shader's layer through a per-primitive block
2026-10-19 18:51:54 +13:00
Adrià 5710355fbd Merge pull request #6242 from fogydes/feat/sysmodule-ps5-module-table-mappings
feat(libSceSysmodule): register missing user and internal sysmodule IDs
2026-10-19 07:51:24 +02:00
Jota 502b55722a fix(relinker): detect output aliases with a filesystem probe outside Windows
Fresh outputs whose names differ only in case, or that the volume treats as the same name otherwise, were not detected outside Windows. On default macOS APFS, for example, Ä/ä, Ω/ω, Ж/ж and canonically equivalent NFC/NFD names refer to the same file, so one output silently overwrote another.

Outside Windows, create the first name in an identity directory next to the outputs and check whether the second name resolves to it. This lets the filesystem decide instead of folding text, so case-sensitive volumes still report distinct names.
2026-10-19 02:50:43 -03:00
Adrià 79c7076e91 Merge pull request #6265 from fogydes/feat/usb-storage-dialog-exports
feat(libSceUsbStorageDialog): implement common dialog lifecycle exports
2026-10-19 07:50:21 +02:00
Adrià 13c63f9116 Merge pull request #6307 from fogydes/feat/contentdelete-firmware-exports
feat(libSceContentDelete): export missing firmware content delete interfaces
2026-10-19 07:49:17 +02:00
pushkarreddyy bfd5b6e388 fix(recompiler): constrain ActiveMaskImplies template and make bounded test key dynamic 2026-10-19 11:15:37 +05:30
pushkarreddyy b7e0189265 feat(recompiler): support waterfall select conditions and key bounds in pointer image tables 2026-10-19 11:15:37 +05:30
hypermistandClaude Opus 5.5 1181068a68 fix(libc): keep exact math results independent of the host libm
drem, dremf, remainderl and remquol now set EDOM themselves for an
infinite x or a zero y, as fmodl does. Apple's libm never sets errno and
MinGW skips it for long double, so the host could not be relied on.

Guest long is 64 bits, but the host long is 32 bits on Windows. The
lrint, lround and scalbln exports now take and return std::int64_t,
round through llrint and llround, and clamp scalbln exponents to the int
range, where the result is already infinite or zero. The test uses
INT64_MAX instead of LONG_MAX and covers remainderl, dremf and a 2^40
lrint result.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 18:45:08 +13:00
fogydes 144c1a58ca feat(libSceVideoRecordingP): export missing firmware 3.20 video recording interfaces 2026-10-19 11:13:20 +05:30
Scott SchusterandClaude Fable 5.1 e8377c9144 perf(agc): a DMA_DATA prefetch keeps the draw pipeline
A DMA_DATA whose destination is nowhere writes no memory, so the draws ahead of it have nothing to order against. RADV issues one per draw, and each drained the pipeline and idled the queue worker until the committer caught up.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-19 07:43:15 +02:00
Adrià 9f5d4bd929 Merge pull request #6503 from ThatsLeo/perf/shader-hw-f32-flush
perf(shader): flush f32 denormals in hardware when a startup probe matches the emulation
2026-10-19 07:40:27 +02:00
TamaleroandClaude Opus 5.5 b574f2a51f fix(libkernel): claim a released direct memory range before unmapping its views
The checked release tested that the range was allocated, released the pool lock and then
unmapped a snapshot of its views. Two concurrent checked releases of one range both passed the
test and took the same snapshot; the second then unmapped views the first had already removed
and terminated on "unmap address is not registered" instead of returning ENOENT.

A release now claims its pages in the pool under the pool lock before it looks at the views,
and frees them, dropping the claim, after the unmap. A checked release of pages another release
has claimed returns ENOENT as if they were already free; a plain release waits for that release
to finish. The pages stay allocated while claimed, so they still cannot be reallocated during
the unmap's lease wait.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 22:40:10 -07:00
al3w0f205 55d4a9fa1d feat(libSceAgcDriver): support quad-list primitive type
Primitive type 19 (DI_PT_QUADLIST, 0x13) is used by Unity and other engines for UI quads, sprites and font glyphs. Because Vulkan lacks native quad-list primitive topology, quad draws are expanded on the CPU into indexed triangle lists with 6 indices per 4-vertex quad, respecting the first/last provoking vertex configuration and discarding incomplete trailing vertices. Adds unit tests and documents the functional debt.
2026-10-19 07:39:59 +02:00
hypermistandClaude Opus 5.5 298fbdc917 fix(libc): walk program headers outside the unwind cache lock
dl_iterate_phdr takes the loader lock. Calling it with the base cache
mutex held inverts the order against a thread inside dlopen whose
constructor throws and reaches FindFrameFast. Probe first, then lock
only for the lookup and the insert; racing misses compute the same
bases and emplace keeps the first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 18:33:35 +13:00
fogydes a03d891ec0 feat(libSceUsbStorageDialog): implement common dialog lifecycle exports 2026-10-19 11:00:59 +05:30
Dean Galvin 9e32729ab5 Merge main into pr-7154
# Conflicts:
#	core/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hpp
#	core/libs/prx/libSceAgcDriver/Graphics/src/ShaderResources.cpp
2026-10-19 18:29:52 +13:00
fogydes 52ac9dc161 feat(libSceContentDelete): export missing firmware content delete interfaces 2026-10-19 10:55:39 +05:30
Werner d15c38b4de fix(relinker): compare page indices of one type when building Windows sections
dataEnd was a std::uint64_t and last a std::size_t, which are different
types on macOS, so std::min did not compile with Apple clang.
2026-10-19 05:22:58 +00:00
Dean 4ffb0cd12b Merge pull request #7377 from EagleBearerYS/fix/shader-pixel-bda-single-exit
fix(shader): end a pixel shader's failed BDA reads through one exit
2026-10-19 18:22:07 +13:00
Dean ade174f250 Merge pull request #7050 from SP4C3B4R-8/fix/depth-retire-whole-plane
fix(agc): retire a depth surface on a storage write only when the write covers a whole plane
2026-10-19 18:22:02 +13:00
Dean bc9b1e6d74 Merge pull request #6917 from milescoviello/perf/guest-lease-snapshot
perf(libc): keep the guest allocation lease snapshot until the registry changes
2026-10-19 18:21:58 +13:00
fogydes fcdf046855 feat(libSceSysmodule): register missing user and internal sysmodule IDs 2026-10-19 10:51:17 +05:30
Adrià 50d269e1a4 Merge pull request #5138 from veosett/codex/guest-relative-section-symbols
fix(relinker): accept section-relative guest module relocations
2026-10-19 07:16:19 +02:00
Adrià Franch 59449dcf00 test(shader): downgrade fixtures drop the f32 flush flag byte 2026-10-19 07:05:57 +02:00
Dean Galvin fac38912d9 Merge main into pr-7489
# Conflicts:
#	core/libs/prx/libSceAgcDriver/CMakeLists.txt
2026-10-19 18:04:50 +13:00
ionut27001 8f93589389 test(libkernel): pick a foreign process group guest_kill cannot own
guest_kill requires killpg(1000, ...) to fail with ESRCH, but getpid
returns the host process id. When Windows gives the test process id
1000, group 1000 is the caller's own, killpg succeeds as the test itself
requires for killpg(self, 0), and Require aborts with 0xc0000409. Use
self + 1000, which is never the caller's group.
2026-10-19 08:01:26 +03:00
Adrià Franch 3c95095c21 test(shader): read a version 35 request without the f32 flush flag 2026-10-19 07:00:21 +02:00
ThatsLeo ac14d6317d perf(shader): flush f32 denormals in hardware when a startup probe matches the emulation
Devices with DenormFlushToZero for f32 run the mixed denormal-flush programs with and
without the hardware mode at startup; when every result matches, add, sub, mul, fma,
floor and ceil in the default rounding mode drop their software flush.
2026-10-19 07:00:13 +02:00
Yunus Shaikh ef6ec1e242 test(agc): check coverage enters per-sample shaders in guest order and exports in host order
A per-sample shader under a non-uniform quad sample mask keeps only the invocations whose guest sample the mask names, since gl_SampleMaskIn is reordered before it gates them. The depth export is reordered back, so a depth probe at the mask's host samples runs exactly the guests the mask kept.
2026-10-18 21:58:24 -07:00
Yunus Shaikh 44e8786ba0 test(agc): require the position input when the sample order alone reorders
The pixel input collector requests FragCoord for a position input, dithered alpha to coverage, a quad mask, varying sample locations or ReordersSamples. The last term is the only one that applies to a shader carrying just an order word, so a pass with an ancillary input and a reordered order must read FragCoord while the same pass with a kept order must not.
2026-10-18 21:58:23 -07:00
Yunus Shaikh 9b7f8cd2e3 test(agc): check the location table's index against the sample order
An iterated PERSP_SAMPLE on a reordered order that varies across the 2x2 grid indexes locations[quad * 8 + guest]. The check parses the recompiled module and follows each InterpolateAtOffset's offset operand back through its OpLoad to the table's OpAccessChain index, which must be the order word's nibble at the shader's SampleId (GuestSampleIndex, not the host index) or'd with the FragCoord-derived quad term, and the selected order words must be the ones the pass carried.
2026-10-18 21:58:22 -07:00
Adrià 72a3d9f2a4 Merge pull request #6534 from dogukanatlihan/fix/windows-stack-anonymous-mmap
fix(libkernel): replace anonymous Windows stack mappings
2026-10-19 06:58:04 +02:00
Jota 44304875c3 test(agc): keep the queue-idle store out of the file write cases
agc_driver_storage_file_write expects the unrelated surface's image to
stay pending through all twelve cases, and the source image to stay
pending until the write flushes it. Queue 0 stores every pending image
once the queues stay quiet for 50 ms (IdleResultsQuietPeriod), so any
pause of that length on a loaded host flushes them and the test fails
with "an unrelated pending GPU image was flushed".

Each case now takes the GPU mutex, which StoreIdleResults also takes,
right after its producer, and produces again an image the idle store
reached before the hold. The unrelated check moves inside the case,
under the same hold.
2026-10-19 01:56:57 -03:00
Yunus Shaikh 245cec763f Merge main into fix/agc-sample-location-grid-exact
Resolves sameDecode in DrawRegisterKey.cpp, keeping this branch's sample-order comparison and #6530's merged-coverage comparison.
2026-10-18 21:53:18 -07:00
MarcZX10 31483262cf fix(libc): avoid coarse Windows C++ condition waits 2026-10-19 04:52:44 +00:00
Dean 574762f121 Merge pull request #6659 from JJenkx/perf/spirv-single-input-validation
perf(shader): validate optimizer input once
2026-10-19 17:52:07 +13:00
Dean b2a3cd8b17 Merge pull request #6690 from xXPBSXx/test/netctl-callbacks-plain
test(libSceNetCtl): cover the plain callback registration in guest_sce_net
2026-10-19 17:52:04 +13:00
Dean 859017b4ce Merge pull request #7698 from tibzejoker/perf/f16-single-convert
perf(shader): convert one f16 value instead of an (x, 0.0) pair
2026-10-19 17:52:01 +13:00
Jota 21325fba43 test(relinker): give the desktop entry test its own temporary directory 2026-10-19 04:51:37 +00:00
Adrià Franch 95751ecab8 fix(libkernel): drop duplicate include after rebase 2026-10-19 06:42:38 +02:00
Doğukan Atlıhan 1ad6c746b8 fix(libkernel): replace anonymous Windows stack mappings 2026-10-19 06:42:30 +02:00
MarcZX10 f7cef86629 fix(cmake): link MinGW spirv validator exit test runtime 2026-10-19 04:33:56 +00:00
Werner 9f4c27190e fix(relinker): keep zero-filled PT_LOAD memory out of the Windows load image
WindowsLoadImage backed each PT_LOAD up to its memory size, so the
zero-filled tail of a segment was allocated and copied into its section
before the writer dropped it again: 64 MiB of zero-filled memory cost
131 MiB and 0.2 s for --windows and --macos. Only the file-backed pages are
stored now; a pointer written into zero-filled memory backs just the pages
it touches, and the section keeps the rest as virtual size. A relocation
into the end of a zero-filled area no longer pulls the whole area into the
executable file.
2026-10-19 04:29:35 +00:00
Adrià 676d423968 Merge pull request #6532 from ArjenS-LA/feat/guest-bcopy
feat(libc): implement overlap-safe bcopy
2026-10-19 06:09:37 +02:00
ionut27001andClaude Opus 5.5 46f518997e fix(libc): return jrand48 and mrand48 zero-extended as measured on a PS5
In a payload process on a PS5 (firmware 12.70), jrand48 and mrand48
return the high 32 bits of the new 48-bit state zero-extended to the
64-bit long, as FreeBSD 11.0 does, so a result with bit 31 set comes
back between 0x80000000 and 0xFFFFFFFF. Here they sign-extended it, as
FreeBSD 11.1 and later do with an (int32_t) cast. lrand48 and nrand48
already matched the payload process. The tests now pin its results for
three seeds and the first six mrand48 values after srand48(1), compare
with the host as 32-bit values, and the debt entry records the
measurement.

AI-assisted: yes

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 07:09:32 +03:00
Adrià ceab3dd674 Merge pull request #6523 from billythemenace2/fix/agc-mesh-support-before-validation
fix(agc): refuse mesh-path draws on a device without mesh shaders before validating them
2026-10-19 06:08:33 +02:00